Commit 990e6c8c authored by zhangdy's avatar zhangdy

first

parents
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
}],
"stage-2"
],
"plugins": ["transform-runtime"],
"comments": false,
"env": {
"test": {
"presets": ["env", "stage-2"],
"plugins": ["istanbul"]
}
}
}
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.idea
{
"search.followSymlinks": false
}
\ No newline at end of file
MIT License
Copyright (c) 2016-present taylorchen709
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
\ No newline at end of file
require('./check-versions')()
process.env.NODE_ENV = 'production'
var ora = require('ora')
var rm = require('rimraf')
var path = require('path')
var chalk = require('chalk')
var webpack = require('webpack')
var config = require('../config')
var webpackConfig = require('./webpack.prod.conf')
var spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, function (err, stats) {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false,
chunks: false,
chunkModules: false
}) + '\n\n')
console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})
var chalk = require('chalk')
var semver = require('semver')
var packageConfig = require('../package.json')
var shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
var versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
},
]
if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}
module.exports = function () {
var warnings = []
for (var i = 0; i < versionRequirements.length; i++) {
var mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (var i = 0; i < warnings.length; i++) {
var warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}
/* eslint-disable */
require('eventsource-polyfill')
var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
hotClient.subscribe(function (event) {
if (event.action === 'reload') {
window.location.reload()
}
})
require('./check-versions')()
var config = require('../config')
if (!process.env.NODE_ENV) {
process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
}
var opn = require('opn')
var path = require('path')
var express = require('express')
var webpack = require('webpack')
var proxyMiddleware = require('http-proxy-middleware')
var webpackConfig = require('./webpack.dev.conf')
// default port where dev server listens for incoming traffic
var port = process.env.PORT || config.dev.port
// automatically open browser, if not set will be false
var autoOpenBrowser = !!config.dev.autoOpenBrowser
// Define HTTP proxies to your custom API backend
// https://github.com/chimurai/http-proxy-middleware
var proxyTable = config.dev.proxyTable
var app = express()
var compiler = webpack(webpackConfig)
var devMiddleware = require('webpack-dev-middleware')(compiler, {
publicPath: webpackConfig.output.publicPath,
quiet: true
})
var hotMiddleware = require('webpack-hot-middleware')(compiler, {
log: () => {}
})
// force page reload when html-webpack-plugin template changes
compiler.plugin('compilation', function (compilation) {
compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
hotMiddleware.publish({ action: 'reload' })
cb()
})
})
// proxy api requests
Object.keys(proxyTable).forEach(function (context) {
var options = proxyTable[context]
if (typeof options === 'string') {
options = { target: options }
}
app.use(proxyMiddleware(options.filter || context, options))
})
// handle fallback for HTML5 history API
app.use(require('connect-history-api-fallback')())
// serve webpack bundle output
app.use(devMiddleware)
// enable hot-reload and state-preserving
// compilation error display
app.use(hotMiddleware)
// serve pure static assets
var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
app.use(staticPath, express.static('./static'))
var uri = 'http://localhost:' + port
var _resolve
var readyPromise = new Promise(resolve => {
_resolve = resolve
})
console.log('> Starting dev server...')
devMiddleware.waitUntilValid(() => {
console.log('> Listening at ' + uri + '\n')
// when env is testing, don't need open it
if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {
// opn(uri)
}
_resolve()
})
var server = app.listen(port)
module.exports = {
ready: readyPromise,
close: () => {
server.close()
}
}
var path = require('path')
var config = require('../config')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
exports.assetsPath = function (_path) {
var assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function (options) {
options = options || {}
var cssLoader = {
loader: 'css-loader',
options: {
minimize: process.env.NODE_ENV === 'production',
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
var loaders = [cssLoader]
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', { indentedSyntax: true }),
scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function (options) {
var output = []
var loaders = exports.cssLoaders(options)
for (var extension in loaders) {
var loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
var utils = require('./utils')
var config = require('../config')
var isProduction = process.env.NODE_ENV === 'production'
module.exports = {
loaders: utils.cssLoaders({
sourceMap: isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap,
extract: isProduction
})
}
var path = require('path')
var utils = require('./utils')
var config = require('../config')
var vueLoaderConfig = require('./vue-loader.conf')
function resolve(dir) {
return path.join(__dirname, '..', dir)
}
module.exports = {
entry: {
app: './src/main.js'
},
externals: {
'vue': 'Vue',
'vue-router': 'VueRouter',
'element-ui': 'ELEMENT',
'vuex': 'Vuex',
'axios': 'axios',
'echarts': 'echarts'
// 'CKEditor':'CKEditor',
// 'DecoupledEditor':'DecoupledEditor'
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
'assets': resolve('src/assets'),
'scss_vars': '@/styles/vars.scss'
}
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test')]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
use:[
{
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
loader: 'image-webpack-loader',// 压缩图片
options: {
disable: true
}
}
]
},
// {
// test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
// loader: 'url-loader',
// options: {
// limit: 10000,
// name: utils.assetsPath('img/[name].[hash:7].[ext]')
// }
// },
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
]
}
}
var utils = require('./utils')
var webpack = require('webpack')
var config = require('../config')
var merge = require('webpack-merge')
var baseWebpackConfig = require('./webpack.base.conf')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
// add hot-reload related code to entry chunks
Object.keys(baseWebpackConfig.entry).forEach(function (name) {
baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
})
module.exports = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
},
// cheap-module-eval-source-map is faster for development
devtool: '#cheap-module-eval-source-map',
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/dev.env')
}),
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
}),
new FriendlyErrorsPlugin()
]
})
var path = require('path')
var utils = require('./utils')
var webpack = require('webpack')
var config = require('../config')
var merge = require('webpack-merge')
var baseWebpackConfig = require('./webpack.base.conf')
var CopyWebpackPlugin = require('copy-webpack-plugin')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
// var env = config.build.env
var env = require('../config/prod.env')
var webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true
})
},
devtool: config.build.productionSourceMap ? '#source-map' : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
sourceMap: false,
// exclude: /\/node_modules\/@ckeditor/
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css')
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: {
safe: true
}
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: 'dependency'
}),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: function (module, count) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, '../node_modules')
) === 0
)
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
chunks: ['vendor']
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
if (config.build.productionGzip) {
var CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' +
config.build.productionGzipExtensions.join('|') +
')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
if (config.build.bundleAnalyzerReport) {
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
}
module.exports = webpackConfig
var merge = require('webpack-merge')
var prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})
// see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
var argv = require('minimist')(process.argv.slice(2));
module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
productionSourceMap: false,
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
bundleAnalyzerReport: process.env.npm_config_report
},
dev: {
env: require('./dev.env'),
host: 'jieziman.com',
port: 8088,
autoOpenBrowser: true,
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {//转发:本地请求资源的时候:localhost转发到这个路径下请求资源 防止跨域
// '/api': {
// target: 'http://devijzm.yl9158.com/',
// changeOrigin: true,
// pathRewrite: {
// '^/api': ''
// }
// }
},
cssSourceMap: false
}
}
'use strict'
let argv = require('minimist')(process.argv.slice(2));
let env = '"'+argv.env+'"';
module.exports = {
NODE_ENV: '"production"',
env: env
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" name="viewport" content="width=device-width,initial-scale=1.0">
<title>智链互联跨境电商ERP</title>
<link rel="icon" type="image/x-icon" href="/static/logo.ico">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://jzm-oss.oss-cn-hangzhou.aliyuncs.com/static/element-ui.css">
<!-- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> -->
<!-- <link rel="stylesheet" href="/static/element-ui/element-ui.css"></link> -->
</head>
<body>
<div id="app">
</div>
<script src="https://cdn.staticfile.org/vue/2.5.16/vue.min.js"></script>
<script src="https://cdn.staticfile.org/vue-router/3.0.1/vue-router.min.js"></script>
<script src="https://cdn.staticfile.org/vuex/3.0.1/vuex.min.js"></script>
<script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>
<!-- <script src="/static/ckeditor.js"></script>
<script src="https://cdn.ckeditor.com/ckeditor5/17.0.0/decoupled-document/ckeditor.js"></script> -->
<script src="http://gosspublic.alicdn.com/aliyun-oss-sdk-6.5.0.min.js"></script>
<!-- <script src="https://unpkg.com/wangeditor/release/wangEditor.min.js" async></script> -->
<script src="https://cdn.bootcdn.net/ajax/libs/wangEditor/3.1.1/wangEditor.min.js" async></script>
<!-- <script src="https://unpkg.com/element-ui/lib/index.js"></script> -->
<!-- <script src="/static/element-ui/element-ui.js"></script> -->
<script src="https://jzm-oss.oss-cn-hangzhou.aliyuncs.com/static/element-ui.js"></script>
<script src="https://cdn.staticfile.org/echarts/4.0.3/echarts.min.js"></script>
<script type="text/javascript" src="//www.17track.net/externalcall.js"></script>
<!-- <script src="/static/threed-real-sdk-1.1.0.js"></script> -->
<script src="https://3drealoss.oss-cn-beijing.aliyuncs.com/threed-real-sdk-1.2.1.js"></script>
<script src="http://html2canvas.hertzen.com/dist/html2canvas.min.js"></script>
</body>
</html>
<!-- <style>
html {font-size:625%;}
</style> -->
<script>
window.onload = function(){
let jieziman=true
if(window.location.host.indexOf('printwe.net')>0){
jieziman=false
}else{
jieziman=true
}
document.getElementsByTagName("title")[0].innerText = jieziman?'智链互联跨境电商ERP':'红茄跨境电商ERP'
}
</script>
\ No newline at end of file
{
"name": "vueadmin",
"version": "1.0.1",
"description": "vue+element",
"author": "zdy",
"license": "MIT",
"scripts": {
"dev": "node build/dev-server.js --env=dev",
"start": "node build/dev-server.js",
"build": "node build/build.js --env=www",
"buildUat": "node build/build.js --env=uat",
"buildSit": "node build/build.js --env=sit",
"buildDev": "node build/build.js --env=dev"
},
"dependencies": {
"@ckeditor/ckeditor5-build-decoupled-document": "^17.0.0",
"@ckeditor/ckeditor5-vue": "^1.0.1",
"ali-oss": "^6.5.1",
"axios": "0.18.0",
"crypto-js": "^3.1.9-1",
"echarts": "^4.0.3",
"element-ui": "^2.10.0",
"font-awesome": "^4.7.0",
"nprogress": "^0.2.0",
"qs": "6.5.2",
"vue": "^2.2.2",
"vue-quill-editor": "^3.0.6",
"vue-router": "^2.3.0",
"vuex": "^2.0.0-rc.6"
},
"devDependencies": {
"autoprefixer": "^6.7.2",
"axios-mock-adapter": "^1.7.1",
"babel-core": "^6.22.1",
"babel-loader": "^6.2.10",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-polyfill": "^6.16.0",
"babel-preset-env": "^1.2.1",
"babel-preset-es2015": "^6.0.0",
"babel-preset-stage-2": "^6.22.0",
"babel-register": "^6.22.0",
"chalk": "^1.1.3",
"connect-history-api-fallback": "^1.3.0",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.26.1",
"eventsource-polyfill": "^0.9.6",
"express": "^4.14.1",
"extract-text-webpack-plugin": "^2.0.0",
"file-loader": "^0.10.0",
"friendly-errors-webpack-plugin": "^1.1.3",
"function-bind": "^1.0.2",
"html-webpack-plugin": "^2.28.0",
"http-proxy-middleware": "^0.17.3",
"image-webpack-loader": "^6.0.0",
"json-loader": "^0.5.4",
"less": "3.8.0",
"less-loader": "4.1.0",
"minimist": "1.2.0",
"mockjs": "^1.0.1-beta3",
"node-sass": "^4.11.0",
"opn": "^4.0.2",
"optimize-css-assets-webpack-plugin": "^1.3.0",
"ora": "^1.0.0",
"rimraf": "^2.6.0",
"sass-loader": "^7.0.0",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"url-loader": "^0.5.8",
"vue-loader": "^11.1.4",
"vue-style-loader": "^2.0.0",
"vue-template-compiler": "^2.2.4",
"webpack": "^2.2.1",
"webpack-bundle-analyzer": "^2.2.1",
"webpack-dev-middleware": "^1.10.0",
"webpack-hot-middleware": "^2.16.1",
"webpack-merge": "^2.6.1"
},
"engines": {
"node": ">= 4.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
<template>
<div id="app">
<transition name="fade"
mode="out-in">
<router-view></router-view>
</transition>
</div>
</template>
<script>
export default {
name: 'app',
components: {
}
}
</script>
<style lang="scss">
body {
margin: 0px;
padding: 0px;
// min-width: 1280px;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
font-size: 14px;
-webkit-font-smoothing: antialiased;
}
*{
box-sizing: border-box;
}
#app {
position: absolute;
top: 0px;
bottom: 0px;
width: 100%;
}
.el-submenu [class^=fa] {
vertical-align: baseline;
margin-right: 10px;
}
.el-menu-item [class^=fa] {
vertical-align: baseline;
margin-right: 10px;
}
.toolbar {
background: #f2f2f2;
padding: 10px;
//border:1px solid #dfe6ec;
margin: 10px 0px;
.el-form-item {
margin-bottom: 10px;
}
}
.fade-enter-active,
.fade-leave-active {
transition: all .2s ease;
}
.fade-enter,
.fade-leave-active {
opacity: 0;
}
.el-form-item__label{
font-size: 12px!important;
}
.el-form--inline .el-form-item{
margin-bottom: -5px!important;
}
.el-table{
font-size: 13px!important;
color: #333;
}
.el-table thead{
color:#434649;
}
.el-input.is-disabled .el-input__inner {
background-color: #FFF!important;
}
.el-radio__input.is-disabled+span.el-radio__label{
color: #606266!important
}
.el-checkbox__input.is-disabled+span.el-checkbox__label{
color: #606266!important
}
</style>
\ No newline at end of file
@font-face {
font-family: 'webfont';
font-display: swap;
src: url('//at.alicdn.com/t/webfont_haalegwist.eot'); /* IE9*/
src: url('//at.alicdn.com/t/webfont_haalegwist.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('//at.alicdn.com/t/webfont_haalegwist.woff2') format('woff2'),
url('//at.alicdn.com/t/webfont_haalegwist.woff') format('woff'), /* chrome、firefox */
url('//at.alicdn.com/t/webfont_haalegwist.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
url('//at.alicdn.com/t/webfont_haalegwist.svg#站酷高端黑') format('svg'); /* iOS 4.1- */
}
body{
font-family:"webfont" !important;
font-size:14px;font-style:normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
\ No newline at end of file
/* ---------------------global CSS----------------------- */
/* display */
.dn{ display: none; }
.di{ display: inline; }
.db{ display: block; }
.dib{ display: inline-block; }
/* if the element is block level(eg. div, li), using 'inline_any' instead */
.df{ display: flex; }
.dif{ display: inline-flex; }
/* height */
.h14{ height: 14px; }
.h16{ height: 16px; }
.h18{ height: 18px; }
.h20{ height: 20px; }
.h22{ height: 22px; }
.h24{ height: 24px; }
/* line-height */
.lh14{ line-height: 14px; }
.lh16{ line-height: 16px; }
.lh18{ line-height: 18px; }
.lh20{ line-height: 20px; }
.lh22{ line-height: 22px; }
.lh24{ line-height: 24px; }
.lh30{ line-height: 30px; }
.lh40{ line-height: 40px; }
/* width (fixed width value)*/
.w20{ width: 20px; }
.w50{ width: 50px; }
.w70{ width: 70px; }
.w100{ width: 100px; }
.w150{ width: 150px; }
.w192{ width:192px }
.w200{ width: 200px; }
.w210{ width: 210px; }
/* percent width value */
.pct25{ width: 25%; }
.pct30{ width: 30%; }
.pct33{ width: 33.3%; }
.pct45{ width: 45%; }
.pct50{ width: 50%; }
.pct70{ width: 70%; }
.wpt100{ width: 100%; }
/* margin */
.m0{ margin: 0; }
.m10{margin: 10px;}
.ml5{ margin-left: 5px; }
.ml10{ margin-left: 10px; }
.ml15{ margin-left: 15px; }
.ml20{ margin-left: 20px; }
.ml30{ margin-left: 30px; }
.ml40{ margin-left: 40px!important; }
.mr5{ margin-right: 5px; }
.mr10{ margin-right: 10px; }
.mr15{ margin-right: 15px; }
.mr20{ margin-right: 20px; }
.mr30{ margin-right: 30px; }
.mr27{ margin-right: 27px;}
.mt5{ margin-top: 5px; }
.mt10{ margin-top: 10px; }
.mt15{ margin-top: 15px; }
.mt20{ margin-top: 20px; }
.mt40{ margin-top: 40px; }
.mt50{ margin-top: 50px; }
.mb5{ margin-bottom: 5px; }
.mb10{ margin-bottom: 10px; }
.mb15{ margin-bottom: 15px; }
.mb20{ margin-bottom: 20px; }
.mb40{ margin-bottom: 40px; }
/* padding */
.p0{ padding: 0; }
.pl5{ padding-left: 5px; }
.p5{ padding: 5px; }
.pt5{ padding-top: 5px; }
.pr5{ padding-right: 5px; }
.pb5{ padding-bottom: 5px; }
.p10{ padding: 10px; }
.pl10{ padding-left: 10px; }
.pt10{ padding-top: 10px; }
.pr10{ padding-right: 10px; }
.pb10{ padding-bottom: 10px; }
.p15{ padding: 15px; }
.pl15{ padding-left: 15px; }
.pt15{ padding-top: 15px; }
.pr15{ padding-right: 15px; }
.pb15{ padding-bottom: 15px; }
.p20{ padding: 20px; }
.pl20{ padding-left: 20px; }
.pt20{ padding-top: 20px; }
.pr20{ padding-right: 20px; }
.pb20{ padding-bottom: 20px; }
.pt30{padding-top: 30px; }
.pl30{padding-left: 30px; }
.pbr0{padding-right: 30px; }
.pb30{padding-bottom: 30px; }
/* border-color name rule: border(b)-position(l/r/t/b/d)-width(null/2)-style(null/sh)-color(first one letter/first two letter) |-> All colors are safe color*/
.bd{ border: 1px solid rgba(0,0,0,.12); }
.bl{ border-left: 1px solid rgba(0,0,0,.12); }
.br{ border-right: 1px solid rgba(0,0,0,.12); }
.bt{ border-top: 1px solid rgba(0,0,0,.12); }
.bb{ border-bottom: 1px solid rgba(0,0,0,.12); }
/* background-color name rule: bg - (key word/Hex color) |-> All colors are safe color */
.bgwh{ background-color: #fff; }
.bg-default{ background-color: #eee; }
.bg-blue{ background: #367EE2;}
/* safe color */
.g0{ color: #000; }
.g3{ color: #333; }
.gc{ color: #ccc};
.wh{ color: #ffffff; }
.gf5{color: #f56c6c}
.g19{color: #19AA8D}
.txt-blue{ color: #547DF9;}
.icon-color{color: #367EE2;}
.gray-nine{
color:#999
}
.f-red {
color: #ec4339;
}
.f-yellow{
color:#f96
}
.f-blue{
color: #367EE2
}
/* font-size */
.f12{ font-size: 12px; }
.f13{ font-size: 13px; }
.f14{ font-size: 14px; }
.f16{ font-size: 16px; }
.f18{ font-size: 18px; }
.f20{ font-size: 20px; }
.f24{ font-size: 24px; }
/* font-style */
.n{ font-weight: normal;font-style: normal; }
.b{ font-weight: bold; }
.i{ font-style: italic; }
/* text-align */
.tc{ text-align: center; }
.tr{ text-align: right; }
.tl{ text-align: left; }
.tj{ text-align: justify; }
/*flex align*/
.jsb{ justify-content: space-between; }
.jsa{ justify-content: space-around; }
.jsc{ justify-content: center; }
.ac{ align-items: center; }
.fw{ flex-wrap: wrap }
.fc{ flex-direction: column; }
.fr{flex-direction: row-reverse}
/* text-decoration */
.tdl{ text-decoration: underline; }
.tdn,.tdn:hover,.tdn a:hover,a.tdl:hover{ text-decoration: none; }
/* letter-spacing */
.lt-1{ letter-spacing: -1px; }
.lt0{ letter-spacing: 0; }
.lt1{ letter-spacing: 1px; }
/* white-space */
.nowrap{ white-space: nowrap; }
/* word-wrap */
.bk{ word-wrap: break-word; }
/* float */
.l{ float: left; }
.r{ float: right; }
/* clear */
.cl{ clear: both; }
/* position */
.rel{ position: relative; }
.abs{ position: absolute; }
.fixd{ position: fixed; }
/*z-index*/
.zx1{ z-index: 1; }
.zx2{ z-index: 2; }
/* cursor */
.poi{ cursor: pointer; }
.def{ cursor: default; }
/* overflow */
.ovh{ overflow: hidden; }
.ova{ overflow: auto; }
/* visibility */
.vh{ visibility: hidden; }
.vv{ visibility: visible; }
/* zoom */
.z{*zoom:1;}
/* ------------------- multiply CSS ------------------ */
/* 块状元素水平居中 */
.auto{ margin-right: auto;margin-left: auto; }
/* 清除浮 动*/
.fix{*zoom:1;}
.fix:after{ display: table;clear: both;content: ''; }
/* 基于display:table-cell的自适应布局 */
.cell{display:table-cell; *display:inline-block; width:2000px; *width:auto;}
/* 双栏自适应cell部分连续英文字符换行 */
.cell_bk{ display: table;width: 100%;table-layout: fixed;word-wrap: break-word; }
/* 单行文字溢出虚点显 示*/
.ell{ overflow: hidden;white-space: nowrap;text-overflow: ellipsis; }
/* css3过渡动画效果 */
.trans{ -webkit-transition: all .3s;transition: all .3s; }
/* 无框文本框文本域 */
.bd_none{ border: 0;outline: none; }
/* 绝对定位隐藏 */
.abs_out{ position: absolute;top: -999em;left: -999em; }
.abs_clip{ position: absolute;clip: rect(0 0 0 0); }
/* 按钮禁用 */
.disabled{ cursor: default !important;pointer-events: none;color: #acacac !important;border-color: #acacac !important;outline: 0 !important;text-shadow: 1px 1px #fff !important; }
.disabled:hover{ text-decoration: none !important; }
/*inline-block与float等宽列表*/
.inline_box{ font-family: Arial;font-size: 1em;letter-spacing: -.25em; }
.inline_two,.inline_three,.inline_four,.inline_five,.inline_six,.inline_any{ display: inline-block;vertical-align: top;letter-spacing: 0; }
.float_two,.float_three,.float_four,.float_five,.float_six{ float: left; }
.inline_two,.float_two{ width: 49.9%; }
.inline_three,.float_three{ width: 33.3%; }
.inline_four,.float_four{ width: 24.9%; }
.inline_five,.float_five{ width: 19.9%; }
.inline_six,.float_six{ width: 16.6%; }
.inline_fix{ display: inline-block;overflow: hidden;width: 100%;height: 0; }
.dis-flex{
display:flex
}
.content-height{
// background: #F5F5F5;
min-width: 1280px;
min-height: 359px;
overflow:hidden;
padding: 0 20px;
box-sizing: border-box;
margin-top: 58px;
button {
display: inline-block;
margin-bottom: 0;
// border: 1px solid transparent;
border-radius: 2px;
padding: 0 12px;
font-weight: 400;
line-height: 32px;
text-align: center;
vertical-align: middle;
white-space: nowrap;
cursor: pointer;
user-select: none;
touch-action: manipulation;
border-radius: 4px;
border:none
}
a{cursor:pointer;text-decoration: none;}
}
.myorder-content{
min-width: 1280px;
margin: 20px 0px 40px;
overflow:hidden;
display: flex;
}
.content-right{
width: 87%
}
.contain-page{
width: 1100px;
margin: 0 auto;
}
.el-pagination.is-background .el-pager li:not(.disabled).active{
background-color: #F5222D!important;
}
li{
list-style:none;
}
.font-color{
color:#666666
}
.el-dialog__header{
background:#eee;
padding: 8px 20px 8px;
}
.el-dialog__headerbtn{
top: 5px;
right: 10px;
}
.el-table thead tr th {
background-color: #eee!important;
}
.el-table--border th{
border-right: 1px solid #ddd!important;
border-bottom: 1px solid #ddd;
}
.el-table--border td{
border-right: 1px solid #ddd!important
}
.el-table td{
border-bottom: 1px solid #ddd;
}
.custom-tree-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
padding-right: 8px;
border-bottom:1px solid #dddddd;
}
.el-tree-node__content{
height: 36px;
}
.el-input-number .el-input__inner {
text-align: left!important
}
.btn {
display: inline-block;
vertical-align: middle;
height: 34px;
min-width: 80px;
margin-right: 10px;
font-size: 13px;
}
.btn-primary {
color: #fff;
background-color: #367EE2;
border-color: #367EE2;
}
.item-collection-white{
border: 1px solid #ccc;
border-bottom:none;
min-width: 100px;
height: 39px;
border-radius: 4px 4px 0 0;
padding: 8px 2px;
box-sizing:border-box;
float: left;
margin-left: 10px;
text-align: center;
cursor:pointer;
}
.item-collection{
background-color: #367EE2;
border: 1px solid #367EE2;
color: #fff;
min-width: 100px;
height: 39px;
border-radius: 4px 4px 0 0;
padding: 8px 2px;
box-sizing:border-box;
float: left;
margin-left: 10px;
text-align: center
}
.el-dropdown-link {
cursor: pointer;
color: #367EE2;
font-size: 13px;
}
.el-table th{
padding: 5px 0;
}
.el-table .cell{
padding-right: 2px!important;
padding-left: 2px!important;
}
.el-table td{
padding: 2px 0;
}
.break-two{
display: -webkit-box;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
/*! autoprefixer: on */
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
-webkit-line-clamp: 2;
}
.el-button{
font-size: 13px;
}
.btn-myj-orange {
background-color: #f96!important;
border: 1px solid #f96;
color: #fff;
}
.clean::after {
content: '';
position: absolute;
left: 0;
width: 43px;
height: 41px;
background: url(../img/otherIcon.png?v=31) no-repeat -1130px -90px;
}
.vc{
vertical-align: middle;
}
.el-table .discard-row {
color: #999;
}
@color-primary: #333333;;
\ No newline at end of file
import { router } from '../router'
import qs from 'qs';
import {rootUrl} from '@/config'
let apiPrefix = process.env.NODE_ENV === 'production' ? '/' : '/api';
let AxiosIns = axios.create({
baseURL: rootUrl,
timeout: 50000,
transformRequest: [data => {
if(data instanceof FormData){
return data
}else{
return qs.stringify(data)
}
}],
headers: { 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' },
withCredentials: true
})
let timer = [];
let delay = 300;
let loading = null;
let options = {
// lock: true,
text: '拼命加载中',
background: 'rgba(0, 0, 0, 0.2)',
// target: "#app",
}
let isLoginOut=false
AxiosIns.interceptors.request.use((config) => {
if (loading == null) {
loading = ELEMENT.Loading.service(options);
}
// loading = ELEMENT.Loading.service(options);
timer.push(setTimeout(() => {
}, delay))
return config;
})
AxiosIns.interceptors.response.use((response) => {
for (let t of timer) {
clearTimeout(t);
}
if (loading != null) {
loading.close();
loading = null;
}
// loading.close()
try {
if (response.data && response.data.success !== true) {
let msg = Array.isArray(response.data.errorMsg) ? response.data.errorMsg[0] : (response.data.errorMsg?response.data.errorMsg:response.data.errMsg);
if ((msg == "LOGIN_CHECK_ERROR"||msg=="LOGIN_TIME_OUT") && (!isLoginOut)) {
isLoginOut=true
ELEMENT.Message({
message: '登录信息过期,请重新登录',
type: 'warning',
showClose: true,
});
setTimeout(() => {
isLoginOut=false
window.localStorage.removeItem("user")
router.push({path: '/login'})
}, 1000)
loading.close();
loading = null;
}
if(!isLoginOut){
ELEMENT.Message({
message: msg || '接口调用失败',
type: 'warning',
showClose: true,
})
loading.close();
loading = null;
}
}
} catch (e) {
}
return response.data;
}, (error) => {
for (let t of timer) {
clearTimeout(t);
}
// loading.close();
try {
if (error.response.data.status!= 404&&error.response.data.status!= 400) {
loading.close();
loading = null;
ELEMENT.Message({
message:'接口调用失败',
type: 'warning',
showClose: true,
});
}else{
loading.close();
loading = null;
ELEMENT.Message({
message:'接口调用失败',
type: 'warning',
showClose: true,
});
}
} catch (e) {
loading.close();
loading = null;
ELEMENT.Message({
message:'接口调用失败',
type: 'warning',
showClose: true,
});
}
return Promise.reject(error);
})
Vue.prototype.axios = AxiosIns;
const CryptoJS = require('crypto-js'); //引用AES源码js
const key = CryptoJS.enc.Utf8.parse('0388039203920300'); //十六位十六进制数作为密钥
const iv = CryptoJS.enc.Utf8.parse('smkldospdorenyla'); //十六位十六进制数作为密钥偏移量
//解密方法
function Decrypt(word) {
let encryptedHexStr = CryptoJS.enc.Hex.parse(word);
let srcs = CryptoJS.enc.Base64.stringify(encryptedHexStr);
let decrypt = CryptoJS.AES.decrypt(srcs, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 });
let decryptedStr = decrypt.toString(CryptoJS.enc.Utf8);
return decryptedStr.toString();
}
//加密方法
function Encrypt(word) {
// console.log(currentKey)
// let key=CryptoJS.enc.Utf8.parse(currentKey)
let srcs = CryptoJS.enc.Utf8.parse(word);
let encrypted = CryptoJS.AES.encrypt(srcs, key, {iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 });
return encrypted.toString();
}
function md5(str, times = 1) {
for (let i = 0; i < times; i++) {
str = CryptoJS.MD5(str).toString();
}
return str;
}
export default {
Decrypt ,
Encrypt,
md5
}
// import OSS from 'ali-oss'
var SIGN_REGEXP = /([yMdhsm])(\1*)/g;
var DEFAULT_PATTERN = 'yyyy-MM-dd';
function padding(s, len) {
var len = len - (s + '').length;
for (var i = 0; i < len; i++) { s = '0' + s; }
return s;
};
export default {
getQueryStringByName: function (name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
var context = "";
if (r != null)
context = r[2];
reg = null;
r = null;
return context == null || context == "" || context == "undefined" ? "" : context;
},
formatDate: {
format: function (date, pattern) {
pattern = pattern || DEFAULT_PATTERN;
return pattern.replace(SIGN_REGEXP, function ($0) {
switch ($0.charAt(0)) {
case 'y': return padding(date.getFullYear(), $0.length);
case 'M': return padding(date.getMonth() + 1, $0.length);
case 'd': return padding(date.getDate(), $0.length);
case 'w': return date.getDay() + 1;
case 'h': return padding(date.getHours(), $0.length);
case 'm': return padding(date.getMinutes(), $0.length);
case 's': return padding(date.getSeconds(), $0.length);
}
});
},
parse: function (dateString, pattern) {
var matchs1 = pattern.match(SIGN_REGEXP);
var matchs2 = dateString.match(/(\d)+/g);
if (matchs1.length == matchs2.length) {
var _date = new Date(1970, 0, 1);
for (var i = 0; i < matchs1.length; i++) {
var _int = parseInt(matchs2[i]);
var sign = matchs1[i];
switch (sign.charAt(0)) {
case 'y': _date.setFullYear(_int); break;
case 'M': _date.setMonth(_int - 1); break;
case 'd': _date.setDate(_int); break;
case 'h': _date.setHours(_int); break;
case 'm': _date.setMinutes(_int); break;
case 's': _date.setSeconds(_int); break;
}
}
return _date;
}
return null;
}
},
client(data) {
return new OSS({
region: data.region,
accessKeyId: data.accessKeyId,
accessKeySecret: data.accessKeySecret,
bucket: data.bucket
})
},
copyUrl(data){
let url = data;
let oInput = document.createElement('input');
oInput.value = url;
document.body.appendChild(oInput);
oInput.select(); // 选择对象;
document.execCommand("Copy");
ELEMENT.Message({
message: '复制成功',
type: 'success',
showClose: true,
});
oInput.remove()
},
};
This diff is collapsed.
<template>
<el-dialog
title="选择模板"
:visible.sync="dialogVisibleTemplate"
width="50%"
:show-close="false">
<div>
<el-select v-model="tempalteValue" placeholder="请选择" size="small" class="w100">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-input
placeholder="支持精确搜索和模糊搜索"
size="small"
class="pct50"
v-model="searchMsg">
</el-input>
<button class="btn btn-primary" @click="getMessageTemplateList">搜索</button>
<el-table
ref="multipleTable"
:data="tableDataTemplate"
tooltip-effect="dark"
border
max-height="300"
style="width: 100%"
class="mt20"
>
<el-table-column
label="序号"
align="center"
width="80"
>
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column
label="名称"
align="center"
prop="templateName"
>
</el-table-column>
<el-table-column
label="模板内容"
align="center"
width="300"
>
<template slot-scope="scope">
<el-tooltip effect="light" :content="scope.row.templateDescription" placement="top">
<div class="break-two" style="width:290px">{{scope.row.templateDescription}}</div>
</el-tooltip>
</template>
</el-table-column>
<el-table-column
label="操作"
width="80">
<template slot-scope="scope">
<div class="el-dropdown-link" @click="chooseTemplate(scope.row)">{{choosedId==scope.row.id?'取消关联':'选择'}}</div>
</template>
</el-table-column>
</el-table>
<div class="pull-right">
<el-pagination
@size-change="sizeChangeTemplate"
@current-change="currentChangeTemplate"
:current-page="listParamsTemplate.currentPage"
:page-sizes="[30, 50, 100, 300]"
:page-size="listParamsTemplate.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="listParamsTemplate.total"
style="float:right;display:inline-block"
></el-pagination>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="chooseTemplate({templateName:'',id:''})" type="primary">关 闭</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
props: {
dialogVisibleTemplate:{
type:Boolean,
default: false,
},
choosedId:{
type:String,
default: '',
}
},
data() {
return {
tableDataTemplate:[],
listParamsTemplate:{
currentPage: 1,
pageSize: 50,
total: 0,
templateName:'',
templateDescription:''
},
searchMsg:'',
options: [{
value: '1',
label: '模板名称'
}, {
value: '2',
label: '模板内容'
}],
tempalteValue: '1'
}
},
mounted(){
this.getMessageTemplateList()
},
methods:{
chooseTemplate(val){
this.$emit('chooseTemplate',val)
},
getMessageTemplateList(){
let{listParamsTemplate,tempalteValue,choosedId}=this
if(tempalteValue==1){
this.listParamsTemplate.templateName=this.searchMsg
this.listParamsTemplate.templateDescription=''
}else{
this.listParamsTemplate.templateDescription=this.searchMsg
this.listParamsTemplate.templateName=''
}
this.axios({
url:'assistant/activity/pageWishCampaignTemplateQuery',
params:listParamsTemplate,
method: "get"
}).then(res => {
if(res.success){
let data=res.module
this.tableDataTemplate=data.result
this.listParamsTemplate.total=data.total
}
})
},
currentChangeTemplate(val) {
this.listParamsTemplate.currentPage = val;
this.getMessageTemplateList();
},
sizeChangeTemplate(val){
this.listParamsTemplate.pageSize = val;
this.getMessageTemplateList();
},
},
}
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div>
<div class="productInfoModule" style="position: absolute;right: 120px;margin-bottom:0;border:none;z-index:1;" v-if="activeAnchor">
<div class="location-href-box">
<div class="locationHref location-href fixed-box">
<div class="maodian">
<ul>
<li class="locationHrefUP"></li>
<li class="locationHrefIn" v-for="(item,index) in stepsArr" :key="index" @click="jump(index)"><a>{{item.title}}</a>
</li>
<li class="locationHrefDown"></li>
</ul>
</div>
<div class="scroll-top" @click="backTopClick">
<i class="el-icon-arrow-up"/>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
stepsArr: {
type: Array,
default:[],
}
},
data() {
return {
screenWidth: document.body.clientWidth,
activeAnchor:true,
}
},
mounted() {
this.$nextTick(function() {
window.addEventListener('scroll', this.onScroll)
if(this.screenWidth<1300){
this.activeAnchor=false
}
})
window.onresize = () => {
return (() => {
this.screenWidth = document.body.clientWidth
if(this.screenWidth<1300){
this.activeAnchor=false
}else{
this.activeAnchor=true
}
})()
}
},
methods: {
backTopClick(){
document.documentElement.scrollTop = document.body.scrollTop = 0;
},
onScroll() {
var jump = document.querySelectorAll('.product-info-module')
var distance =
document.documentElement.scrollTop ||
window.pageYOffset ||
document.body.scrollTop
jump.forEach((item, index) => {
if (distance >= item.offsetTop) {
this.activeStep = index
}
})
},
// 锚点点击
jump(index) {
console.log(index)
this.activeStep = index
// 用 class=".step-jump" 添加锚点,此时的类名要放在tr上,放在td上不对,
// 以后做的时候要注意这点,不是表格的时候,如何放置锚点
let jump = document.querySelectorAll('.product-info-module')
// 通过 offsetTop 获取对象到窗体顶部的距离,然后赋值给 scrollTop,就能实现锚点的功能
let total = jump[index].offsetTop
console.log(total)
// scrollTop滚动条距离页面的距离
let distance =
document.documentElement.scrollTop ||
window.pageYOffset ||
document.body.scrollTop
// console.log(distance)
// 平滑滚动,时长500ms,每10ms一跳,共50跳
let step = total / 50
if (total > distance) {
smoothDown()
} else {
let newTotal = distance - total
step = newTotal / 50
smoothUp()
}
function smoothDown() {
if (distance < total) {
distance += step
document.body.scrollTop = distance
document.documentElement.scrollTop = distance
window.pageYOffset = distance
setTimeout(smoothDown, 10)
} else {
document.body.scrollTop = total
document.documentElement.scrollTop = total
window.pageYOffset = total
}
}
function smoothUp() {
if (distance > total) {
distance -= step
document.body.scrollTop = distance
document.documentElement.scrollTop = distance
window.pageYOffset = distance
setTimeout(smoothUp, 10)
} else {
document.body.scrollTop = total
document.documentElement.scrollTop = total
window.pageYOffset = total
}
}
}
},
}
</script>
<style lang="less" scoped>
.productInfoModule {
border-radius: 4px;
margin: 0 auto 30px;
}
.location-href-box {
position: absolute;
margin-top: -80px;
}
.location-href.fixed-box {
position: fixed;
right: auto;
margin-top: 80px;
z-index: 10;
.scroll-top{
height:30px;
width:30px;
background:#999;
border-radius: 2px;
color: #fff;
cursor: pointer;
line-height: 30px;
text-align: center;
font-size: 20px;
}
}
.location-href{
.maodian {
border-left: 1px solid #ddd;
margin-left: 5px;
margin-bottom: 10px;
}
ul {
list-style-type: none;
padding: 0;
width: 100px;
position: relative;
left: -7px;
margin: 0;
li {
display: block;
box-sizing: border-box;
}
.locationHrefUP{
padding: 8px;
padding-left: 10px;
background: url(../../assets/img/rightNavIcon.png) no-repeat 1px -6px;
}
.locationHrefDown {
padding: 8px;
padding-left: 10px;
background: url(../../assets/img/rightNavIcon.png) no-repeat 1px -1px;
}
}
.locationHrefIn a {
color: #999;
line-height: 26px;
padding-left: 20px;
display: block;
box-sizing: border-box;
background: url(../../assets/img/rightNavIcon.png) no-repeat 1px -18px;
}
}
</style>
\ No newline at end of file
<template>
<el-table :data="tableData" border style="width: 100%" ref="multipleTable" @selection-change="handleSelectionChange" v-if="tableShow">
<el-table-column type="selection" width="40" align="center">
</el-table-column>
<template v-for="item in tableHeader">
<table-column v-if="item.children && item.children.length" :key="item.id" :coloumn-header="item"></table-column>
<el-table-column v-else :key="item.id" :label="item.label" :prop="item.prop" align="center"></el-table-column>
</template>
</el-table>
</template>
<script>
import tableColumn from './tableColumn'
export default {
props: {
// 表格的数据
tableData: {
type: Array,
required: true
},
// 多级表头的数据
tableHeader: {
type: Array,
required: true
},
sizeCode:{
type:Array,
required:true,
},
tableShow:{
type:Boolean,
required:true,
}
},
components: {
tableColumn
},
updated(){
if(this.tableShow){
this.tableCheckInit()
}
},
mounted(){
this.tableCheckInit()
},
methods:{
tableCheckInit(){
this.$nextTick(()=>{
this.tableData.forEach(row => {
if(this.sizeCode.indexOf(row.Type) >= 0){
this.$refs.multipleTable.toggleRowSelection(row,true);
}
})
})
},
handleSelectionChange(val) {
this.$emit('getCurrentSize',val)
},
tableCheckChange() {
this.$nextTick(()=>{
for (let row of this.tableData) {
let flag = false;
for (let size of this.sizeCode) {
if (row.Type === size.Type) {
flag = true;
}
}
if (flag) {
this.$refs.multipleTable.toggleRowSelection(row, true);
} else {
this.$refs.multipleTable.toggleRowSelection(row, false);
}
}
});
}
},
// watch:{
// sizeCode(newName, oldName){
// this.tableCheckInit()
// }
// }
}
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div>
<el-dialog
title="主图图搜"
:visible.sync="dialogVisibleImg"
width="55%"
@close="cancelClick">
<div class="container-o-box default mt10">
<div class="com-block m-bottom10 p10">
<div>系统有以下相似产品:</div>
<div class="product-same" >
<div class="produce-img" v-for="(item,index) in tableData" :key="index">
<img :src="item.mainImageUrl"/>
<div class="tc">spu编码:{{item.spuCode}}</div>
<div class="tc">spu名:{{item.spuName}}</div>
<div class="tc">标题:{{item.name}}</div>
</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="cancelClick">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
props: {
dialogVisibleImg:{
type: Boolean,
default: false,
},
},
data() {
return {
tableData:[
],
}
},
methods:{
cancelClick(){
this.$emit('cancelClick')
},
startCollect(fileURL){
console.log('fileURL --> ', fileURL);
let that = this;
this.axios({
url:'assistant/systemProductSeries/imageQueryPage',
data:{
mainImageUrl:fileURL,
isSpu:true
},
method: "post"
}).then(res => {
if(res.success){
that.tableData = res.module.result;
}
})
},
}
}
</script>
<style lang="less" scoped>
.container-o-box{
clear:both;
.default{
margin: 0;
width: 100%;
}
.com-block {
width: 100%;
background-color: #fff;
box-shadow: 0 0 0 0;
}
.product-same{
display:flex;
flex-wrap: wrap;
justify-content: flex-start;
.produce-img{
border:1px solid #ccc;
width:200px;
height:250px;
margin:10px 16px;
img{
width:100%;
height:180px;
vertical-align: bottom;
}
div{
border-top:1px solid #ccc
}
}
}
}
</style>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template>
<div>
<el-dialog
:title="titleName?titleName:'同步状态'"
:visible.sync="syncPollingVisible"
:show-close="false"
width="35%"
:before-close="handleClose"
>
<div
v-loading="loading"
element-loading-text="进行中..."
element-loading-spinner="el-icon-loading"
></div>
<div v-html="msg" class="syncPollingMsg"></div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleClose()">关 闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
props: {
syncPollingVisible: {
type: Boolean,
default: false,
},
batchCode: {
type: String,
default: "",
},
titleName:{
type:String,
default:''
}
},
data() {
return {
batchCode: "",
completed: false, //异步是否完成
msg: "",
loading: true,
};
},
mounted() {},
methods: {
getPollSelectSyncStatus() {
this.axios({
url: "assistant/info/get/pollSelectSyncStatus",
params: {
batchCode: this.batchCode,
},
method: "post",
}).then((res) => {
if (res.success) {
this.msg = res.module.msg;
this.completed = res.module.code == 1 ? true : false;
if (res.module.code == 1) {
this.loading = false;
}
}
});
},
pollingQuery() {
let setTime;
var _this = this;
var i = 1;
setTime = setInterval(function () {
if (!_this.completed && _this.syncPollingVisible) {
//未完成且窗口打开则需要查询
console.log(
"第" +
i +
"次查询,完成" +
_this.completed +
",是否打开" +
_this.syncPollingVisible
);
_this.getPollSelectSyncStatus();
i++;
} else {
clearInterval(setTime);
}
}, 3000);
},
stopSync() {
console.log("停止同步,同步批次" + this.batchCode);
this.completed = false;
this.syncPollingVisible = false;
this.loading = true;
this.msg = '';
this.axios({
url: "assistant/info/get/stopSync",
params: {
batchCode: this.batchCode,
},
method: "post",
}).then((res) => {});
},
handleClose() {
if (this.completed) {
this.$emit("closeSync", false);
this.stopSync();
} else {
this.$confirm("确认关闭?将停止同步!")
.then((_) => {
this.$emit("closeSync", false);
this.stopSync();
})
.catch((_) => {});
}
},
},
};
</script>
<style lang="less" scoped>
.syncPollingMsg {
margin-top: 30px;
margin-left: 30px;
}
</style>
\ No newline at end of file
<template>
<el-table-column :label="coloumnHeader.label" :prop="coloumnHeader.label" align="center">
<template v-for="item in coloumnHeader.children">
<tableColumn v-if="item.children && item.children.length" :key="item.id" :coloumn-header="item"></tableColumn>
<el-table-column v-else :key="item.name" :label="item.label" :prop="item.prop" align="center"></el-table-column>
</template>
</el-table-column>
</template>
<script>
export default {
name: 'tableColumn',
props: {
coloumnHeader: {
type: Object,
required: true
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div :class="backIsShow?'crumbs-edit':'myj-crumbs'">
<span>当前位置:</span>
<span>{{firstCrumbs}} </span>
<span v-if="secondCrumbs" class="simsun">&gt;</span>
<span v-if="secondCrumbs">{{secondCrumbs}}</span>
<span v-if="thirdCrumbs" class="simsun">&gt;</span>
<span v-if="thirdCrumbs">{{thirdCrumbs}}</span>
</div>
</template>
<script>
export default {
props: {
backIsShow:{
type: Boolean,
default: false,
},
firstCrumbs: {
type: String,
default: '',
},
secondCrumbs: {
type: String,
default: '',
},
thirdCrumbs: {
type: String,
default: '',
},
},
data() {
return {
}
},
}
</script>
<style lang="less" scoped>
.crumbs-edit{
padding: 10px;
margin: 0 auto 10px;
background-color: #fff;
box-shadow: 0 0 4px 0 rgba(0, 34, 77, .15);
}
.myj-crumbs {
height: 33px;
line-height: 33px;
color: #000;
font-size: 13px;
padding-left: 10px;
padding-right: 10px;
border: 1px solid #ccc;
background-color: #eee;
.simsun {
font-family: simsun;
}
}
</style>
\ No newline at end of file
This diff is collapsed.
<template>
<div class="left-menu">
<div class="menu-top" v-for="item in getCurSide" :key="item.name">
<div class="first-title">{{item.name}}</div>
<div>
<div v-for="itemChild in item.children" :key="itemChild.name" @click="leftMenuClick(itemChild.path)" :class="activeMenu == itemChild.path?'second-title activeMenu':'second-title'">{{itemChild.name}}</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
collapsed: {
type: Boolean,
default: true,
},
dynamicTags:{
type: Array,
default: [],
},
},
data() {
return {
activeMenu:'',
getCurSide:[],
path:''
}
},
methods: {
getLeftMenu(){
const {path}=this
let url
if(path.indexOf('order')>0){
url='assistant/info/get/getOrderQuantity'
}
if(path.indexOf('product')>0){
url='assistant/info/get/getGeneralService'
this.getCurSide=[
{
"name": "通用服务",
"children": [
{
"path": "/product/productList",
"name": "定制产品",
}
]
},
{
"name": "Wish",
"children": [
{
"path": "/product/1",
"name": "定制产品",
},
{
"path": "/product/2",
"name": "待发布",
},
{
"path": "/product/3",
"name": "在线产品",
},
]
},{
"name": "Shopify",
"children": [
{
"path": "/product/4",
"name": "定制产品",
},
{
"path": "/product/5",
"name": "待发布",
},
{
"path": "/product/6",
"name": "在线产品",
},
]
},{
"name": "Shopline",
"children": [
{
"path": "/product/7",
"name": "定制产品",
},
{
"path": "/product/8",
"name": "待发布",
},
{
"path": "/product/9",
"name": "在线产品",
},
]
}]
}
if(path.indexOf('customerService')>0){
url='assistant/tickets/questions/getSideBar'
}
this.activeMenu = this.$route.path;
},
leftMenuClick(value){
this.$router.push({path:value})
this.$nextTick(() => {
this.activeMenu = this.$route.path;
})
}
},
mounted() {
this.path=this.$route.path
this.getLeftMenu()
},
watch: {
"$route": function() {
this.path=this.$route.path
this.getLeftMenu()
}
}
}
</script>
<style scoped lang="less">
.left-menu {
width: 160px;
height: 410px;
border: 1px solid #ccc;
background: #FFFFFF;
margin-right: 20px;
.menu-top{
text-align: left;
// padding:32px 45px 0 45px;
font-size: 16px;
color: #333333;
.first-title{
height: 32px;
line-height: 32px;
color: #000;
vertical-align: top;
padding-left: 5px;
background-color: #eee;
border-bottom: 1px solid #dbdbdb;
font-weight: 700;
font-size: 13px
}
.second-title{
color: #000;
line-height: 28px;
vertical-align: top;
height: 28px;
border-bottom: 1px solid #dbdbdb;
cursor: pointer;
padding-left: 12px;
font-size: 13px
}
.second-title:nth-last-child(1){
border-bottom:none
}
.activeMenu{
color: #fff;
background-color: #367EE2
}
}
}
</style>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
let host = window.location.protocol + '//' + window.location.host + '/';
// host = 'http://'+process.env.env+'.rubansh.com/';
let protocol=window.location.protocol
let currenthost=window.location.host
console.log(window.location.host)
if (window.location.host === 'sit.rubansh.com:8088') host = 'http://sitsmallmi.rubansh.com/erp-assistant-service/';
export const devtools = true;
export const productionTip = true;
if(process.env.env=='dev'){
host = `${protocol}//sitsmallmi.rubansh.com/erp-assistant-service/`;
}
else if(process.env.env=='sit'){
host = `${protocol}//sitsmallmi.rubansh.com/erp-assistant-service/`;
}
else if(process.env.env=='www'){
host = `${protocol}//${currenthost}/erp-assistant-service/`;
}
export const rootUrl = host;
export const domain = process.env.env;
\ No newline at end of file
import babelpolyfill from 'babel-polyfill'
// import Vue from 'vue'
import App from './App'
// import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'
import '@/assets/css/common.less'
// import '@/assets/css/alibaba.less'
// import './assets/theme/theme-green/index.css'
// import store from './vuex'
import store from './vuex/index'
import {router} from './router'
import './common/axiosSetting'
import CKEditor from '@ckeditor/ckeditor5-vue';
Vue.use( CKEditor );
// import 'font-awesome/css/font-awesome.min.css'
// Vue.use(ElementUI)
//引用富文本编辑器
// import VueQuillEditor from 'vue-quill-editor'
//引入富文本css
// require styles
// import 'quill/dist/quill.core.css'
// import 'quill/dist/quill.snow.css'
// import 'quill/dist/quill.bubble.css'
//富文本编辑器添加实例
// Vue.use(VueQuillEditor, /* { default global options } */)
ELEMENT.Dialog.props.lockScroll.default = false;
ELEMENT.Dialog.props.closeOnClickModal.default = false;
window.log = message => console.log(message)
let basicBtn=currentBtnName=>{
let eglishPermission=[]
if(currentBtnName.permissions.length>0){
currentBtnName.permissions[0].basic.map((v, i) => {
eglishPermission.push(v.btnName)
})
return eglishPermission
}
}
let specialBtn=currentBtnName=>{
let specialPermission=[]
if(currentBtnName.permissions.length>1){
currentBtnName.permissions[1].basic.map((v, i) => {
specialPermission.push(v.btnName)
})
}
return specialPermission
}
const hasPermission = userPermission => {
let permissionBtnArray = [];
let permissions = JSON.parse(localStorage.getItem('permissions'));
let path = router.history.current.path;
permissions.forEach(permission => {
if (permission.permissionPaths.indexOf(path) > -1) {
permissionBtnArray = permission.permissionBtnNameArray;
}
});
return permissionBtnArray.includes(userPermission);
}
//全局方法挂载
Vue.prototype.$_has = hasPermission
new Vue({
el: '#app',
template: '<App/>',
router,
store,
components: { App },
// render: h => h(App)
})
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
//test
export const increment = ({commit}) => {
commit('INCREMENT')
}
export const decrement = ({commit}) => {
commit('DECREMENT')
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment