First commit

This commit is contained in:
2025-10-02 10:33:06 +08:00
parent 198b8bf2a6
commit c38eed4a22
5512 changed files with 958855 additions and 0 deletions

12
web/.babelrc Executable file
View File

@@ -0,0 +1,12 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime"]
}

9
web/.editorconfig Executable file
View File

@@ -0,0 +1,9 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

4
web/.eslintignore Executable file
View File

@@ -0,0 +1,4 @@
/build/
/config/
/dist/
/*.js

29
web/.eslintrc.js Executable file
View File

@@ -0,0 +1,29 @@
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: true,
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential',
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard'
],
// required to lint *.vue files
plugins: [
'vue'
],
// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
}

14
web/.gitignore vendored Executable file
View File

@@ -0,0 +1,14 @@
.DS_Store
node_modules/
/dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln

10
web/.postcssrc.js Executable file
View File

@@ -0,0 +1,10 @@
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}

21
web/README.md Executable file
View File

@@ -0,0 +1,21 @@
# longbing_back
> 独立后台
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
```
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

41
web/build/build.js Executable file
View File

@@ -0,0 +1,41 @@
'use strict'
require('./check-versions')()
process.env.NODE_ENV = 'production'
const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')
const spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
chunks: false,
chunkModules: false
}) + '\n\n')
if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1)
}
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'
))
})
})

54
web/build/check-versions.js Executable file
View File

@@ -0,0 +1,54 @@
'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
const 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 () {
const warnings = []
for (let i = 0; i < versionRequirements.length; i++) {
const 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 (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}

BIN
web/build/logo.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

121
web/build/utils.js Executable file
View File

@@ -0,0 +1,121 @@
'use strict'
const path = require('path')
const config = require('../config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const packageConfig = require('../package.json')
exports.assetsPath = function (_path) {
const assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function (options) {
options = options || {}
const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
}
const postcssLoader = {
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap
}
}
function generateSassResourceLoader() {
var loaders = [
cssLoader,
'sass-loader',
{
loader: 'sass-resources-loader',
options: {
// 多个文件时用数组的形式传入,单个文件时可以直接使用 path.resolve(__dirname, '../static/style/common.scss'
resources: path.resolve(__dirname, '../src/style/theme.scss')
}
}
];
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
}
// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [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: generateSassResourceLoader('sass', { indentedSyntax: true }),
scss: generateSassResourceLoader('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function (options) {
const output = []
const loaders = exports.cssLoaders(options)
for (const extension in loaders) {
const loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
exports.createNotifierCallback = () => {
const notifier = require('node-notifier')
return (severity, errors) => {
if (severity !== 'error') return
const error = errors[0]
const filename = error.file && error.file.split('!').pop()
notifier.notify({
title: packageConfig.name,
message: severity + ': ' + error.name,
subtitle: filename || '',
icon: path.join(__dirname, 'logo.png')
})
}
}

22
web/build/vue-loader.conf.js Executable file
View File

@@ -0,0 +1,22 @@
'use strict'
const utils = require('./utils')
const config = require('../config')
const isProduction = process.env.NODE_ENV === 'production'
const sourceMapEnabled = isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap
module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction
}),
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
}

96
web/build/webpack.base.conf.js Executable file
View File

@@ -0,0 +1,96 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
function resolve (dir) {
return path.join(__dirname, '..', dir)
}
const createLintingRule = () => ({
test: /\.(js|vue)$/,
loader: 'eslint-loader',
enforce: 'pre',
include: [resolve('src'), resolve('test')],
options: {
formatter: require('eslint-friendly-formatter'),
emitWarning: !config.dev.showEslintErrorsInOverlay
}
})
module.exports = {
context: path.resolve(__dirname, '../'),
entry: {
app: './src/main.js'
},
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'),
}
},
module: {
rules: [
...(config.dev.useEslint ? [createLintingRule()] : []),
{
test: /\.sass$/,
loaders: ['style', 'css', 'sass']
},
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
]
},
node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
}
}

95
web/build/webpack.dev.conf.js Executable file
View File

@@ -0,0 +1,95 @@
'use strict'
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const path = require('path')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const portfinder = require('portfinder')
const HOST = process.env.HOST
const PORT = process.env.PORT && Number(process.env.PORT)
const devWebpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
},
// cheap-module-eval-source-map is faster for development
devtool: config.dev.devtool,
// these devServer options should be customized in /config/index.js
devServer: {
clientLogLevel: 'warning',
historyApiFallback: {
rewrites: [
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
],
},
hot: true,
contentBase: false, // since we use CopyWebpackPlugin.
compress: true,
host: HOST || config.dev.host,
port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay
? { warnings: false, errors: true }
: false,
publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: {
poll: config.dev.poll,
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/dev.env')
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
module.exports = new Promise((resolve, reject) => {
portfinder.basePort = process.env.PORT || config.dev.port
portfinder.getPort((err, port) => {
if (err) {
reject(err)
} else {
// publish the new Port, necessary for e2e tests
process.env.PORT = port
// add port to devServer config
devWebpackConfig.devServer.port = port
// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
},
onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback()
: undefined
}))
resolve(devWebpackConfig)
}
})
})

145
web/build/webpack.prod.conf.js Executable file
View File

@@ -0,0 +1,145 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const env = require('../config/prod.env')
const webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true,
usePostCSS: true
})
},
devtool: config.build.productionSourceMap ? config.build.devtool : 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 UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false
}
},
sourceMap: config.build.productionSourceMap,
parallel: true
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css'),
// Setting the following option to `false` will not extract CSS from codesplit chunks.
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
allChunks: true,
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: config.build.productionSourceMap
? { safe: true, map: { inline: false } }
: { 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'
}),
// keep module.id stable when vendor modules does not change
new webpack.HashedModuleIdsPlugin(),
// enable scope hoisting
new webpack.optimize.ModuleConcatenationPlugin(),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks (module) {
// 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',
minChunks: Infinity
}),
// This instance extracts shared chunks from code splitted chunks and bundles them
// in a separate chunk, similar to the vendor chunk
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
new webpack.optimize.CommonsChunkPlugin({
name: 'app',
async: 'vendor-async',
children: true,
minChunks: 3
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
if (config.build.productionGzip) {
const 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) {
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
}
module.exports = webpackConfig

7
web/config/dev.env.js Executable file
View File

@@ -0,0 +1,7 @@
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})

76
web/config/index.js Executable file
View File

@@ -0,0 +1,76 @@
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 8888, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: true,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
/**
* Source Maps
*/
productionSourceMap: true,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}

4
web/config/prod.env.js Executable file
View File

@@ -0,0 +1,4 @@
'use strict'
module.exports = {
NODE_ENV: '"production"'
}

12
web/index.html Executable file
View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>龙兵科技</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

12534
web/package-lock.json generated Executable file

File diff suppressed because it is too large Load Diff

81
web/package.json Executable file
View File

@@ -0,0 +1,81 @@
{
"name": "longbing_back",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "akang <815101207@qq.com>",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"lint": "eslint --ext .js,.vue src",
"build": "node build/build.js"
},
"dependencies": {
"axios": "^0.19.0",
"element-ui": "^2.10.1",
"moment": "^2.24.0",
"vue": "^2.5.2",
"vue-i18n": "^8.12.0",
"vue-router": "^3.0.1",
"vuex": "^3.1.1"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-eslint": "^8.2.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"eslint": "^4.15.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-vue": "^4.0.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"node-notifier": "^5.1.2",
"node-sass": "^4.12.0",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"rimraf": "^2.6.0",
"sass-loader": "^7.1.0",
"sass-resources-loader": "^2.0.1",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}

6
web/runtime/services.php Executable file
View File

@@ -0,0 +1,6 @@
<?php
// This cache file is automatically generated at:2019-07-01 11:25:20
declare (strict_types = 1);
return array (
0 => 'think\\migration\\Service',
);

21
web/src/App.vue Executable file
View File

@@ -0,0 +1,21 @@
<template>
<div id="app">
<router-view/>
</div>
</template>
<script>
export default {
name: 'App'
// created () {
// this.$api.getTest().then(res => {
// console.log(res)
// })
// }
}
</script>
<style lang='scss'>
@import url('./style/reset.css');
@import url('./style/icon.css');
</style>

127
web/src/api/index.js Executable file
View File

@@ -0,0 +1,127 @@
import axios from 'axios'
import qs from 'qs'
// import router from '../router'
// api 模块化
import apis from './modules'
axios.defaults.timeout = 10000
axios.defaults.baseURL = process.env.NODE_ENV === 'development' ? 'http://47.100.26.121:85' : ''
axios.interceptors.request.use(config => {
if (localStorage.getItem('token')) {
config.headers = {
'Authorization': localStorage.getItem('token'),
'Content-Type': 'application/x-www-form-urlencoded'
}
}
return config
}, error => {
return Promise.reject(error)
})
axios.interceptors.response.use(res => {
// if (res.data.code === '401') { // token验证不合法或者没有
// localStorage.removeItem('token') // 删除token
// localStorage.removeItem('ms_username') // 删除用户名
// router.push('/login')
// }
return res
}, err => {
return Promise.resolve(err.response)
})
/**
* 封装get方法
* @param url
* @param data
* @returns {Promise}
*/
export function get (url, params = {}) {
return new Promise((resolve, reject) => {
axios.get(url, {
params: params
})
.then(response => {
resolve(response.data)
})
.catch(err => {
reject(err)
})
})
}
/**
* 封装post请求
* @param url
* @param data
* @returns {Promise}
*/
export function post (url, data = {}) {
return new Promise((resolve, reject) => {
axios.post(url, qs.stringify(data))
.then(response => {
resolve(response.data)
}, err => {
reject(err)
})
})
}
/**
* 封装patch请求
* @param url
* @param data
* @returns {Promise}
*/
export function patch (url, data = {}) {
return new Promise((resolve, reject) => {
axios.patch(url, data)
.then(response => {
resolve(response.data)
}, err => {
reject(err)
})
})
}
/**
* 封装put请求
* @param url
* @param data
* @returns {Promise}
*/
export function put (url, data = {}) {
return new Promise((resolve, reject) => {
axios.put(url, data)
.then(response => {
resolve(response.data)
}, err => {
reject(err)
})
})
}
/**
* @method 获取七牛token
* @param url
* @param data
* @returns {Promise}
*/
export function getQiniuToken (url, data = {}) {
return new Promise((resolve, reject) => {
axios.get(url, data)
.then(response => {
resolve(response.data)
}, err => {
reject(err)
})
})
}
/**
* 获取数据的接口
*/
export const api = {
...apis
}

View File

@@ -0,0 +1 @@
// import {get, post} from '../index'

5
web/src/api/modules/index.js Executable file
View File

@@ -0,0 +1,5 @@
import survey from './survey'
export default {
...survey
}

7
web/src/api/modules/survey.js Executable file
View File

@@ -0,0 +1,7 @@
import { get } from '../index'
export default {
getRoutes () {
return get('/admin/test')
}
}

BIN
web/src/assets/logo.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

65
web/src/components/ad.vue Executable file
View File

@@ -0,0 +1,65 @@
<!-- 左侧边栏广告 -->
<template>
<div class="lb-ad" :class="!switchs ? 'ad-collapse' : ''">
<div class="ad-main"></div>
<div class="flod" @click="handleFold">{{switchs ? '折叠' : '展开'}}</div>
</div>
</template>
<script>
export default {
data () {
return {
key: '广告',
switchs: false
}
},
methods: {
handleFold () {
let {switchs} = this
this.switchs = !switchs
}
}
}
</script>
<style lang="scss" scoped>
.lb-ad{
width: 220px;
position: relative;
transition: width 0.2s linear;
margin-top: 20px;
.ad-main{
position: absolute;
top: 0;
left: 0;
width: 220px;
background: #fff;
height: 100%;
font-size: 14px;
padding: 10px;
}
.flod{
position: absolute;
top: 0;
bottom: 0;
left: -20px;
margin: auto;
width: 20px;
height: 80px;
background: #BFBFBF;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
cursor: pointer;
color: #fff;
font-size: 14px;
}
}
.ad-collapse{
width: 0px;
}
</style>

View File

@@ -0,0 +1,12 @@
import Vue from 'vue'
import TopNav from './topNav.vue'
import LbButton from './lbButton.vue'
import LbSwitch from './lbSwitch.vue'
import LbTips from './lbTips.vue'
import LbPage from './lbPage.vue'
Vue.component('top-nav', TopNav)
Vue.component('lb-button', LbButton)
Vue.component('lb-switch', LbSwitch)
Vue.component('lb-tips', LbTips)
Vue.component('lb-page', LbPage)

View File

@@ -0,0 +1,71 @@
<template>
<el-button
:disabled="isDisabled"
:type="type"
:plain="plain"
:round="round"
:icon="icon"
:size="size"
@click="handleClick"
>
<slot></slot>
</el-button>
</template>
<script>
export default {
props: {
type: {
type: String,
default: ''
},
disabled: {
type: Boolean,
default: false
},
plain: {
type: Boolean,
default: false
},
round: {
type: Boolean,
default: false
},
icon: {
type: String,
default: ''
},
size: {
type: String,
default: 'medium'
},
opType: {
type: String,
default: ''
}
},
data () {
return {
isDisabled: this.disabled,
currentIndex: this.$store.state.operate.currentIndex
}
},
created () {
let {isOnly, auth, pagePermission} = this.$route.meta
if (this.opType) {
if (isOnly) {
this.isDisabled = auth.indexOf(this.opType) === -1
} else {
this.isDisabled = pagePermission[this.currentIndex].auth.indexOf(this.opType) === -1
}
}
},
methods: {
handleClick () {
this.$emit('click')
}
}
}
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,96 @@
<template>
<div class="lb-page">
<div v-if="batch">
<div>已选{{selected}}</div>
<div>
<span>批量</span>
<slot></slot>
<!-- <lb-button>批量下架</lb-button>
<lb-button>批量上架</lb-button>
<lb-button>批量删除</lb-button> -->
</div>
</div>
<span v-else></span>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[5,10,20]"
:page-size="currentPageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</div>
</template>
<script>
export default {
props: {
batch: {
type: Boolean,
default: true
},
page: {
type: Number,
default: 1
},
pageSize: {
type: Number,
default: 10
},
total: {
type: Number,
default: 0
},
selected: {
type: Number,
default: 0
}
},
data () {
return {
currentPage: this.page,
currentPageSize: this.pageSize
}
},
methods: {
handleSizeChange (val) {
this.currentPageSize = val
this.$emit('handleSizeChange', val)
},
handleCurrentChange (val) {
this.currentPage = val
this.$emit('handleCurrentChange', val)
}
}
}
</script>
<style lang="scss" scoped>
.lb-page{
width: 100%;
margin-top: 20px;
display: flex;
justify-content: space-between;
height: 40px;
font-size: 14px;
color: #101010;
>div{
display: flex;
align-items: center;
white-space: nowrap;
>div{
&:first-child{
height: 40px;
padding-right: 30px;
margin-right: 30px;
border-right: 1px solid #E8E8E8;
line-height: 40px;
}
.el-button{
margin-left: 10px;
}
}
}
}
</style>

View File

@@ -0,0 +1,109 @@
<template>
<el-switch
v-model="val"
:disabled='isDisabled'
:width='coreWidth'
:active-icon-class='activeIconClass'
:inactive-icon-class='inactiveIconClass'
:active-text='activeText'
:inactive-text='inactiveText'
:active-value='activeValue'
:inactive-value='inactiveValue'
:active-color='activeColor'
:inactive-color='inactiveColor'
:name='name'
@change="handleSwitchValue"
>
</el-switch>
</template>
<script>
export default {
props:
{
opType: {
type: String,
default: ''
},
value: {
type: [Boolean, String, Number],
default: false
},
disabled: {
type: Boolean,
default: false
},
width: {
type: Number,
default: 40
},
activeIconClass: {
type: String,
default: ''
},
inactiveIconClass: {
type: String,
default: ''
},
activeText: String,
inactiveText: String,
activeColor: {
type: String,
default: ''
},
inactiveColor: {
type: String,
default: ''
},
activeValue: {
type: [Boolean, String, Number],
default: true
},
inactiveValue: {
type: [Boolean, String, Number],
default: false
},
name: {
type: String,
default: ''
},
validateEvent: {
type: Boolean,
default: true
},
id: String
},
data () {
return {
val: this.value,
coreWidth: this.width,
isDisabled: this.disabled,
currentIndex: this.$store.state.operate.currentIndex
}
},
created () {
let {isOnly, auth, pagePermission} = this.$route.meta
if (this.opType) {
if (isOnly) {
this.isDisabled = auth.indexOf(this.opType) === -1
} else {
this.isDisabled = pagePermission[this.currentIndex].auth.indexOf(this.opType) === -1
}
}
},
computed: {
checked () {
return this.value === this.activeValue
}
},
methods: {
handleSwitchValue (val) {
this.$emit('change', val)
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,30 @@
<template>
<div class="lb-tips">
<i class="iconfont icon-warn"></i>
<span>{{title}}</span>
</div>
</template>
<script>
export default {
props: {
title: {
type: String,
default: ''
}
}
}
</script>
<style lang="scss" scoped>
.lb-tips{
width: 100%;
background: #F4F4F4;
height: 60px;
line-height: 60px;
padding: 0 0 0 30px;
i{
color: $themeColor;
}
}
</style>

View File

@@ -0,0 +1,85 @@
<template>
<div class="lb-top-nav" v-if="nav.length">
<div class="nav-item" v-if='nav.length === 1'>{{$t('menu.' + nav[0].title)}}</div>
<div
v-else-if="nav.length > 1"
v-for="(item) in nav"
class="nav-item"
:class="activeNav === item.index && 'nav-item-active'"
:key='item.index'
@click="handleNav(item.index)"
>{{$t('menu.' + item.title)}}</div>
</div>
</template>
<script>
export default {
props: {
active: {
type: Number,
default: 0
}
},
data () {
return {
activeNav: this.active,
nav: []
}
},
methods: {
handleNav (index) {
if (this.activeNav === index) return
this.activeNav = index
this.$store.commit('setCurrentIndex', index)
this.$emit('changNav', index)
}
},
created () {
let {pagePermission} = this.$route.meta
if (pagePermission) {
this.nav = pagePermission
this.activeNav = this.nav[0].index
}
}
}
</script>
<style lang="scss" scoped>
.lb-top-nav{
width: 100%;
height: 60px;
border-bottom: 1px solid #E1E1E1;
display: flex;
align-items: center;
padding: 0 10px;
font-size: 14px;
white-space: nowrap;
.nav-item{
height: 60px;
padding: 0 20px;
line-height: 60px;
cursor: pointer;
&::after{
position: absolute;
content: '';
width: 0%;
bottom: 0;
left: 0;
right: 0;
margin: auto;
height: 0px;
background: $themeColor;
transform: all 0.3 linear;
}
}
.nav-item-active{
color: $themeColor;
position: relative;
&::after{
width: 90%;
height: 2px;
}
}
}
</style>

View File

@@ -0,0 +1,52 @@
<template>
<div class="lb-container">
<top-nav :nav='nav' @changNav='handleNav'></top-nav>
<transition name="slide-fade">
<router-view></router-view>
</transition>
</div>
</template>
<script>
export default {
data () {
return {
nav: []
}
},
created () {
console.log(this.$route)
this.nav = this.$route.meta.topMenu || []
},
methods: {
handleNav (index) {}
},
watch: {
$route: {
deep: true,
handler (val) {
this.nav = val.meta.topMenu || []
console.log(val)
}
}
}
}
</script>
<style lang="scss" scoped>
.lb-container{
width: 100%;
height: 500px;
background: #f60;
.slide-fade-enter-active {
transition: all 1s ease;
}
.slide-fade-leave-active {
transition: all 0s ease;
}
.slide-fade-enter, .slide-fade-leave-to {
transform: translateX(20px);
opacity: 0;
}
}
</style>

29
web/src/components/footer.vue Executable file
View File

@@ -0,0 +1,29 @@
<!-- 页面底部 -->
<template>
<div class="lb-footer">
{{key}}
</div>
</template>
<script>
export default {
data () {
return {
key: '技术支持'
}
}
}
</script>
<style lang="scss" scoped>
.lb-footer{
width: 100%;
height: 49px;
display: flex;
justify-content: center;
align-items: center;
border-top: 1px solid #ccc;
color: #ccc;
font-size: 12px;
}
</style>

127
web/src/components/header.vue Executable file
View File

@@ -0,0 +1,127 @@
<!-- 页面头部 -->
<template>
<div class="lb-header">
<div class="lb-left">
<div class="logo">
<img src="" alt="">
</div>
<div v-if="isIndex" class="admin-title">
<span>龙兵科技有限公司</span>
<el-tag type="danger" effect="dark" :disable-transitions='true' size="small">体验版</el-tag>
</div>
<div v-else class="menu-title">{{$t('menu.' + title)}}</div>
</div>
<div class="lb-right">
<el-avatar shape="square" size="small" :src="avatar"></el-avatar>
<!-- 用户名下拉菜单 -->
<el-dropdown class="user-name" trigger="hover" @command="handleCommand">
<span class="el-dropdown-link">
<span>龙兵科技有限公司</span>
<i class="el-icon-caret-bottom"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="loginout">退出登录</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</template>
<script>
export default {
data () {
return {
avatar: require('../assets/logo.png'),
isIndex: true,
title: ''
}
},
created () {
this.handleTitle(this.$route.meta.title)
},
methods: {
handleTitle (title) {
this.isIndex = !title
this.title = title
},
handleCommand () {
console.log('用户退出')
}
},
watch: {
$route: {
handler (val, oldVal) {
this.handleTitle(val.meta.title)
},
// 深度观察监听
deep: true
}
}
}
</script>
<style lang="scss" scoped>
.lb-header{
width: 100%;
height: 70px;
border-bottom: 1px solid #EEEEEE;
background: #FFFFFF;
display:flex;
justify-content: space-between;
align-items: center;
.lb-left{
display: flex;
height: 70px;
.logo{
width: 120px;
height: 70px;
background: #273543;
display: flex;
justify-content: center;
align-items: center;
img{
width: 34px;
height: 34px;
border-radius: 50%;
background: #fff;
border: 1px solid #fff;
}
}
.admin-title{
padding: 0 32px;
display: flex;
align-items: center;
span{
margin-right: 5px;
}
}
.menu-title {
height: 70px;
width: 160px;
border-right: 1px solid #eeeeee;
height: 100%;
display: flex;
font-size: 16px;
color: #101010;
align-items: center;
justify-content: center;
}
}
.lb-right{
display:flex;
justify-content: center;
align-items: center;
padding: 0 30px;
cursor: pointer;
.el-dropdown-link{
cursor: pointer;
}
.el-dropdown-menu__item{
text-align: center;
}
span{
margin: 0 5px 0 10px;
}
}
}
</style>

67
web/src/components/layout.vue Executable file
View File

@@ -0,0 +1,67 @@
<!-- 公共组件 -->
<template>
<div class="home">
<lb-header></lb-header>
<div class="container">
<sidebar></sidebar>
<!-- 内容区域 -->
<div class="main">
<transition name="slide-fade">
<router-view></router-view>
</transition>
</div>
<ad></ad>
</div>
<lb-footer></lb-footer>
</div>
</template>
<script>
import lbHeader from './header'
import lbFooter from './footer'
import sidebar from './sidebar'
import ad from './ad'
export default {
name: 'Home',
data () {
return {
}
},
components: {
lbHeader,
lbFooter,
sidebar,
ad
}
}
</script>
<style lang="scss" scoped>
.home{
width: 100%;
height: 100vh;
.container{
width: 100%;
height: calc(100vh - 70px - 50px);
display: flex;
background: #F0F0F0;
.main{
flex: 1;
overflow-x: hidden;
margin: 20px 20px 0 20px;
background: #fff;
position: relative;
}
}
}
.slide-fade-enter-active {
transition: all 1s ease;
}
.slide-fade-leave-active {
transition: all 0s ease;
}
.slide-fade-enter, .slide-fade-leave-to {
transform: translateX(20px);
opacity: 0;
}
</style>

181
web/src/components/sidebar.vue Executable file
View File

@@ -0,0 +1,181 @@
<!-- 右侧边栏 -->
<template>
<div class="lb-sidebar">
<div class="menu">
<ul class="menu-top">
<router-link
v-for="(item,index) in routes"
tag='li'
:key='index'
active-class="menu-active"
:to="item.path"
>
<i class="iconfont" :class="item.meta.icon"></i>
{{$t('menu.' + item.meta.menuName)}}
</router-link>
</ul>
<!-- <ul>
<router-link
v-for="(item,index) in routes"
tag='li'
:key='index'
active-class="menu-active"
:to="item.path"
>{{item.meta.menuName}}</router-link>
</ul> -->
</div>
<div v-if="subnav.length > 0" class="submenu">
<el-collapse
v-for="(item, index) in subnav"
:key="index"
v-model="activeNames"
>
<el-collapse-item :title="$t('menu.' + item.name)" :name='index'>
<div
class="item"
v-for="(items, indexs) in item.url"
:key="indexs">
<router-link
tag='span'
active-class="el-collapse-item-active"
:to="items.url">{{$t('menu.' + items.name)}}</router-link>
</div>
</el-collapse-item>
</el-collapse>
</div>
</div>
</template>
<script>
export default {
data () {
return {
routes: [], // 路由表
subnav: [], // 二级菜单表
activeNames: [] // 二级菜单展开的配置
}
},
created () {
this.handleRoute()
this.handleSubnav(this.$route.name)
},
methods: {
/**
* @method 处理路由表,渲染到侧边栏
*/
handleRoute () {
let {routes} = this.$store.getters // JSON.parse(localStorage.getItem('routes'))
this.routes = routes.filter(item => {
if (!item.hidden) {
return item
}
})
},
/**
* @method 处理二级菜单导航
*/
handleSubnav (name) {
let {routes} = this
for (let i = 0, len = routes.length; i < len; i++) {
let children = routes[i].children
for (let j = 0, l = children.length; j < l; j++) {
if (children[j].name === name) {
this.subnav = routes[i].meta.subNavName || []
this.openSubnav()
break
}
}
}
},
/**
* @method 展开二级菜单
*/
openSubnav () {
let arr = []
this.subnav.forEach((item, index) => {
arr.push(index)
})
this.activeNames = arr
}
},
watch: {
$route: {
handler (val, oldVal) {
this.handleSubnav(val.name)
},
// 深度观察监听
deep: true
}
}
}
</script>
<style lang="scss" scoped>
.lb-sidebar{
display: flex;
.menu{
display: flex;
flex-direction: column;
justify-content: space-between;
width: 120px;
height: calc(100vh - 70px - 50px);
background: #273543;
.menu-top{
width: 100%;
color:#cccccc;
font-size: 14px;
text-align: center;
line-height: 50px;
li{
width: 100%;
height: 50px;
border-top: 1px solid #cccccc;;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
i{
margin-right: 10px;
}
&:hover{
color: #09f;
}
}
.menu-active{
background: #fff;
color: #273543;
&:hover{
color: #273543;
}
}
}
}
.submenu{
width: 159px;
background: #fff;
padding: 0 15px;
.el-collapse{
border-top: 1px;
.item{
cursor: pointer;
text-align: center;
&:hover{
span{
color: #09f;
}
.el-collapse-item-active{
color: #273543;
}
}
.el-collapse-item-active{
width: 100%;
display: inline-block;
background: #F0F0F0;
border-radius: 2px;
text-align: center;
}
}
}
}
}
</style>

15
web/src/i18n/index.js Executable file
View File

@@ -0,0 +1,15 @@
import Vue from 'vue'
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
// 注册i18n实例并引入语言文件文件格式等下解析
const i18n = new VueI18n({
locale: 'zh',
messages: {
'zh': require('./langs/zh.json'),
'en': require('./langs/en.json')
}
})
export default i18n

26
web/src/i18n/langs/en.json Executable file
View File

@@ -0,0 +1,26 @@
{
"common":{
"login":"Login",
"logout":"Logout",
"exit":"Exit"
},
"action":{
"operation": "Operation",
"view":"View",
"add": "Add",
"edit": "Edit",
"delete": "Delete",
"batchDelete": "Batch Delete",
"search": "Search",
"loading": "loading",
"submit": "Submit",
"comfirm": "Comfirm",
"cancel": "Cancel",
"reset": "Reset",
"save": "Save"
},
"menu":{
"set":"Business Card Set",
"businessCard": "Business Card"
}
}

63
web/src/i18n/langs/zh.json Executable file
View File

@@ -0,0 +1,63 @@
{
"common":{
"login":"登录",
"logout":"退出登录",
"exit":"退出"
},
"action":{
"operation":"操作",
"view":"查看",
"add":"添加",
"edit":"编辑",
"delete":"删除",
"batchDelete":"批量删除",
"search":"搜索",
"loading":"加载中...",
"submit":"提交",
"comfirm":"确定",
"cancel":"取消",
"reset":"重置",
"save": "保存"
},
"menu":{
"Survey":"概况",
"Cardset":"名片设置",
"BusinessCard":"名片",
"CardManage":"名片管理",
"ImpressionLabel":"印象标签",
"MobileSet":"手机端创建设置",
"ClientSet":"获客功能设置",
"DefaultContent":"默认内容",
"Authorisation":"强制授权",
"Malls":"商城",
"MallsManage":"商城管理",
"OrderManage":"订单管理",
"MallsSet":"商城设置",
"GoodsList":"商品列表",
"GoodsClassify":"商品分类",
"RefundManage":"退款管理",
"DealSet":"交易设置",
"OrderOvertime":"订单超时",
"VirtualPaymentSet":"虚拟支付设置",
"StaffChoiceGoods":"员工选择商品",
"PickUpSet":"自提设置",
"Dynamic":"动态",
"DynamicSet":"动态设置",
"DynamicManage":"动态管理",
"CommentManage":"评论管理",
"Website":"官网",
"WebsiteManage":"官网管理",
"ProductManage":"产品管理",
"NewsList":"新闻列表",
"CaseManage":"案例管理",
"OtherFunctions":"其他功能",
"ProClassfiyManage":"分类管理",
"NewsClassfiyManage":"分类管理",
"CaseClassfiyManage":"分类管理",
"ProductList":"产品列表",
"About":"关于我们",
"DevHistory":"发展历程",
"BusinessScope":"业务范围",
"Recruit":"人才招聘"
}
}

35
web/src/main.js Executable file
View File

@@ -0,0 +1,35 @@
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import ElementUI from 'element-ui'
import router from './router'
import 'element-ui/lib/theme-chalk/index.css'
import store from './store'
import {api} from './api' // 接口
import i18n from './i18n' // 语言包
import routes from './permission'
import './components/basics'
import reg from './utils/reg'
Vue.config.productionTip = false
Vue.use(ElementUI, { size: 'small', zIndex: 3000 })
Vue.prototype.$api = api
Vue.prototype.$reg = reg
router.beforeEach((to, from, next) => {
if (!store.getters.isAuth) {
store.dispatch('getUserPromission', {to, next, routes})
} else {
next()
}
})
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
i18n,
store,
components: { App },
template: '<App/>'
})

645
web/src/permission.js Executable file
View File

@@ -0,0 +1,645 @@
export default [
{
path: '/',
redirect: '/survey',
hidden: true // 是否展示在侧边栏的菜单里
},
// 概览
{
path: '/survey',
component: 'Layout',
redirect: '/survey/index',
meta: {
menuName: 'Survey', // 一级菜单标题
icon: 'icon-gaikuang' // 一级菜单的图标
},
children: [
{
path: 'index',
name: 'Survey',
component: '/survey/index',
meta: {
title: '', // 页面头部的标题
isOnly: true, // 单独页面
auth: ['view', 'add', 'edit', 'del', 'outport'], // 单独页面按钮操作权限
pagePermission: []
}
}
]
},
// 名片
{
path: '/businessCard',
component: 'Layout',
redirect: '/businessCard/manage',
meta: { // 所有要展示在菜单里的路由都添加在这边
menuName: 'BusinessCard', // 一级菜单标题
icon: 'icon-mingpian', // 一级菜单的图标
subNavName: [
{
name: 'CardManage', // 二级菜单的下拉的标题
url: [
{
name: 'CardManage', // 三级菜单的标题
url: '/businessCard/manage' // 三级菜单的路由
},
{
name: 'ImpressionLabel', // 三级菜单的标题
url: '/businessCard/tag' // 三级菜单的路由
}
]
},
{
name: 'Cardset',
url: [
{
name: 'MobileSet',
url: '/businessCard/mobileSet'
},
{
name: 'ClientSet',
url: '/businessCard/clientSet'
}
]
}
]
},
children: [ // 子菜单路由表
// 名片管理
{
path: 'manage',
name: 'CardManage',
component: '/businessCard/manage/index',
meta: {
title: 'Cardset', // 页面头部的标题
isOnly: false, // 多页面
auth: [],
pagePermission: [ // 页面权限
{
title: 'Cardset',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport'] // 按钮操作权限
},
{
title: 'DefaultContent',
index: 1,
auth: ['view', 'add', 'edit', 'del', 'outport'] // 按钮操作权限
}
]
}
},
// 印象标签
{
path: 'tag',
name: 'ImpressionLabel',
component: '/businessCard/manage/tag',
meta: {
title: 'Cardset',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'ImpressionLabel',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport'] // 按钮操作权限
}
]
}
},
// 手机端创建设置
{
path: 'mobileSet',
name: 'MobileSet',
component: '/businessCard/set/mobileSet',
meta: {
title: 'Cardset',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'MobileSet',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport'] // 按钮操作权限
}
]
}
},
// 获客功能设置
{
path: 'clientSet',
name: 'ClientSet',
component: '/businessCard/set/clientSet',
meta: {
title: 'Cardset',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'Authorisation',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport'] // 按钮操作权限
}
]
}
}
]
},
// 商城
{
path: '/malls',
component: 'Layout',
redirect: '/malls/list',
meta: { // 所有要展示在菜单里的路由都添加在这边
menuName: 'Malls', // 一级菜单标题
icon: 'icon-gouwudai', // 一级菜单的图标
subNavName: [
{
name: 'MallsManage', // 二级菜单的下拉的标题
url: [
{
name: 'GoodsList', // 三级菜单的标题
url: '/malls/list' // 三级菜单的路由
},
{
name: 'GoodsClassify', // 三级菜单的标题
url: '/malls/classify' // 三级菜单的路由
}
]
},
{
name: 'OrderManage',
url: [
{
name: 'OrderManage',
url: '/malls/orderManage'
},
{
name: 'RefundManage',
url: '/malls/refundManage'
}
]
},
{
name: 'MallsSet',
url: [
{
name: 'DealSet',
url: '/malls/dealSet'
},
{
name: 'VirtualPaymentSet',
url: '/malls/virtualPayment'
},
{
name: 'StaffChoiceGoods',
url: '/malls/staffGoods'
}
]
}
]
},
children: [ // 子菜单路由表
// 商品列表
{
path: 'list',
name: 'GoodsList',
component: '/malls/goods/list',
meta: {
title: 'MallsSet', // 页面头部的标题
isOnly: false, // 多页面
auth: [],
pagePermission: [ // 页面权限
{
title: 'GoodsList',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport'] // 按钮操作权限
}
]
}
},
// 商品分类
{
path: 'classify',
name: 'GoodsClassify',
component: '/malls/goods/classify',
meta: {
title: 'MallsSet',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'GoodsClassify',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport'] // 按钮操作权限
}
]
}
},
// 订单管理
{
path: 'orderManage',
name: 'OrderManage',
component: '/malls/order/manage',
meta: {
title: 'MallsSet',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'OrderManage',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport'] // 按钮操作权限
}
]
}
},
// 退款管理
{
path: 'refundManage',
name: 'RefundManage',
component: '/malls/order/refund',
meta: {
title: 'MallsSet',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'RefundManage',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport'] // 按钮操作权限
}
]
}
},
// 交易设置
{
path: 'dealSet',
name: 'DealSet',
component: '/malls/set/deal',
meta: {
title: 'MallsSet',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'OrderOvertime',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport'] // 按钮操作权限
},
{
title: 'PickUpSet',
index: 1,
auth: ['view', 'add', 'edit', 'del', 'outport'] // 按钮操作权限
}
]
}
},
// 虚拟支付设置
{
path: 'virtualPayment',
name: 'VirtualPaymentSet',
component: '/malls/set/payment',
meta: {
title: 'MallsSet',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'VirtualPaymentSet',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport'] // 按钮操作权限
}
]
}
},
// 员工选择商品
{
path: 'staffGoods',
name: 'StaffChoiceGoods',
component: '/malls/set/staffGoods',
meta: {
title: 'MallsSet',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'StaffChoiceGoods',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport'] // 按钮操作权限
}
]
}
}
]
},
// 动态
{
path: '/dynamic',
component: 'Layout',
redirect: '/dynamic/manage',
meta: {
menuName: 'Dynamic',
icon: 'icon-dongtai',
subNavName: [
{
name: 'DynamicManage', // 二级菜单的下拉的标题
url: [
{
name: 'DynamicManage', // 三级菜单的标题
url: '/dynamic/manage' // 三级菜单的路由
},
{
name: 'CommentManage', // 三级菜单的标题
url: '/dynamic/comment' // 三级菜单的路由
}
]
}
]
},
children: [
{
path: 'manage',
name: 'DynamicManage',
component: '/dynamic/manage',
meta: {
title: 'DynamicSet',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'DynamicManage',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport'] // 按钮操作权限
}
]
}
},
{
path: 'comment',
name: 'CommentManage',
component: '/dynamic/comment',
meta: {
title: 'DynamicSet',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'CommentManage',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport'] // 按钮操作权限
}
]
}
}
]
},
// 官网
{
path: '/website',
component: 'Layout',
redirect: '/website/proManage',
meta: {
menuName: 'Website',
icon: 'icon-guanwang',
subNavName: [
{
name: 'ProductManage', // 产品管理
url: [
{
name: 'ProClassfiyManage',
url: '/website/proManage'
},
{
name: 'ProductList',
url: '/website/proList'
}
]
},
{
name: 'NewsList', // 新闻列表
url: [
{
name: 'NewsClassfiyManage',
url: '/website/newsManage'
},
{
name: 'NewsList',
url: '/website/newsList'
}
]
},
{
name: 'CaseManage', // 案列管理
url: [
{
name: 'CaseClassfiyManage',
url: '/website/caseManage'
},
{
name: 'CaseManage',
url: '/website/case'
}
]
},
{
name: 'OtherFunctions', // 其他功能
url: [
{
name: 'About',
url: '/website/about'
},
{
name: 'DevHistory',
url: '/website/history'
},
{
name: 'BusinessScope',
url: '/website/business'
},
{
name: 'Recruit',
url: '/website/recruit'
}
]
}
]
},
children: [
{
path: 'proManage',
name: 'ProClassfiyManage', // 产品分类管理
component: '/website/product/manage',
meta: {
title: 'WebsiteManage',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'ProClassfiyManage',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport']
}
]
}
},
{
path: 'proList',
name: 'ProductList', // 产品列表
component: '/website/product/list',
meta: {
title: 'WebsiteManage',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'ProductList',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport']
}
]
}
},
{
path: 'newsManage',
name: 'NewsClassfiyManage', // 新闻分类管理
component: '/website/news/manage',
meta: {
title: 'WebsiteManage',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'NewsClassfiyManage',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport']
}
]
}
},
{
path: 'newsList',
name: 'NewsList', // 新闻列表
component: '/website/news/list',
meta: {
title: 'WebsiteManage',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'NewsList',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport']
}
]
}
},
{
path: 'caseManage',
name: 'CaseClassfiyManage', // 案列分类管理
component: '/website/case/manage',
meta: {
title: 'WebsiteManage',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'CaseClassfiyManage',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport']
}
]
}
},
{
path: 'case',
name: 'CaseManage', // 案列管理
component: '/website/case/case',
meta: {
title: 'WebsiteManage',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'CaseManage',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport']
}
]
}
},
{
path: 'about',
name: 'About', // 其他关于我们
component: '/website/other/about',
meta: {
title: 'WebsiteManage',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'About',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport']
}
]
}
},
{
path: 'history',
name: 'DevHistory', // 其他发展历程
component: '/website/other/history',
meta: {
title: 'WebsiteManage',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'DevHistory',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport']
}
]
}
},
{
path: 'business',
name: 'BusinessScope', // 其他业务范围
component: '/website/other/business',
meta: {
title: 'WebsiteManage',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'BusinessScope',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport']
}
]
}
},
{
path: 'recruit',
name: 'Recruit', // 其他人才招聘
component: '/website/other/recruit',
meta: {
title: 'WebsiteManage',
isOnly: false,
auth: [],
pagePermission: [
{
title: 'Recruit',
index: 0,
auth: ['view', 'add', 'edit', 'del', 'outport']
}
]
}
}
]
},
{
path: '*',
redirect: '/404',
hidden: true
}
]

View File

@@ -0,0 +1 @@
module.exports = file => require('@/view' + file + '.vue').default

View File

@@ -0,0 +1 @@
module.exports = file => () => import('@/views/' + file + '.vue')

143
web/src/router/index.js Executable file
View File

@@ -0,0 +1,143 @@
import Vue from 'vue'
import Router from 'vue-router'
// import Layout from '@/components/layout'
Vue.use(Router)
const constantRoutes = [
// 无权限路由
{
path: '/login',
name: 'Login',
component: () => import('@/view/login'),
hidden: true
},
// 404
{
path: '/404',
name: '404',
component: () => import('@/view/404'),
hidden: true
}
// 权限路由
// {
// path: '/',
// redirect: '/survey',
// hidden: true // 是否展示在侧边栏的菜单里
// },
// // 概览
// {
// path: '/survey',
// component: Layout,
// redirect: '/survey/index',
// meta: {
// menuName: '概览', // 侧边一级菜单标题
// icon: 'icon-gaikuang' // 侧边一级菜单的图标
// },
// children: [
// {
// path: 'index',
// name: 'Survey',
// component: () => import('@/view/survey'),
// meta: {
// title: '', // 页面头部的标题
// permission: ['view', 'add', 'edit', 'del', 'outport']
// }
// }
// ]
// },
// // 名片
// {
// path: '/businessCard',
// component: Layout,
// redirect: '/businessCard/manage',
// meta: { // 所有要展示在菜单里的路由都添加在这边
// menuName: '名片', // 侧边一级菜单标题
// icon: 'icon-mingpian', // 侧边一级菜单的图标
// subNavName: [
// {
// name: '名片管理', // 二级菜单的下拉的标题
// url: [
// {
// name: '名片管理', // 二级菜单的子菜单的标题
// url: '/businessCard/manage' // 二级菜单的子菜单的路由
// },
// {
// name: '印象标签', // 二级菜单的子菜单的标题
// url: '/businessCard/tag' // 二级菜单的子菜单的路由
// }
// ]
// },
// {
// name: '名片设置',
// url: [
// {
// name: '手机端创建设置',
// url: '/businessCard/mobileSet'
// },
// {
// name: '获客功能设置',
// url: '/businessCard/clientSet'
// }
// ]
// }
// ]
// },
// children: [ // 子菜单路由表
// {
// path: 'manage',
// name: 'Manage',
// component: () => import('@/view/businessCard/manage'),
// meta: {
// title: '名片设置', // 页面头部的标题
// permission: ['view', 'add', 'edit', 'del', 'outport'] // 操作按钮的权限
// }
// },
// {
// path: 'tag',
// name: 'Tag',
// component: () => import('@/view/businessCard/tag'),
// meta: {
// title: '名片设置',
// permission: ['view', 'add', 'edit', 'del', 'outport']
// }
// },
// {
// path: 'mobileSet',
// name: 'MobileSet',
// component: () => import('@/view/businessCard/mobileSet'),
// meta: {
// title: '名片设置',
// permission: ['view', 'add', 'edit', 'del', 'outport']
// }
// },
// {
// path: 'clientSet',
// name: 'ClientSet',
// component: () => import('@/view/businessCard/clientSet'),
// meta: {
// title: '名片设置',
// permission: ['view', 'add', 'edit', 'del', 'outport']
// }
// }
// ]
// },
// {
// path: '*',
// redirect: '/404',
// hidden: true
// }
]
// const createRouter = () => new Router({
// linkActiveClass: 'active',
// scrollBehavior: () => ({ y: 0 }),
// routes: constantRoutes
// })
// const router = createRouter() constantRoutes
// 路由表
export default new Router({
linkActiveClass: 'active',
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
})

109
web/src/router/test.js Executable file
View File

@@ -0,0 +1,109 @@
const arr = [
{
path: '/',
redirect: '/survey',
hidden: true // 是否展示在侧边栏的菜单里
},
// 概览
{
path: '/survey',
component: 'Layout',
redirect: '/survey/index',
meta: {
menuName: '概览', // 侧边一级菜单标题
icon: 'icon-gaikuang' // 侧边一级菜单的图标
},
children: [
{
path: 'index',
name: 'Survey',
component: '/survey/index',
meta: {
title: '', // 页面头部的标题
permission: ['view', 'add', 'edit', 'del', 'outport']
}
}
]
},
// 名片
{
path: '/businessCard',
component: 'Layout',
redirect: '/businessCard/manage',
meta: { // 所有要展示在菜单里的路由都添加在这边
menuName: '名片', // 侧边一级菜单标题
icon: 'icon-mingpian', // 侧边一级菜单的图标
subNavName: [
{
name: '名片管理', // 二级菜单的下拉的标题
url: [
{
name: '名片管理', // 二级菜单的子菜单的标题
url: '/businessCard/manage' // 二级菜单的子菜单的路由
},
{
name: '印象标签', // 二级菜单的子菜单的标题
url: '/businessCard/tag' // 二级菜单的子菜单的路由
}
]
},
{
name: '名片设置',
url: [
{
name: '手机端创建设置',
url: '/businessCard/mobileSet'
},
{
name: '获客功能设置',
url: '/businessCard/clientSet'
}
]
}
]
},
children: [ // 子菜单路由表
{
path: 'manage',
name: 'Manage',
component: '/businessCard/manage',
meta: {
title: '名片设置', // 页面头部的标题
permission: ['view', 'add', 'edit', 'del', 'outport'] // 操作按钮的权限
}
},
{
path: 'tag',
name: 'Tag',
component: '/businessCard/tag',
meta: {
title: '名片设置',
permission: ['view', 'add', 'edit', 'del', 'outport']
}
},
{
path: 'mobileSet',
name: 'MobileSet',
component: '/businessCard/mobileSet',
meta: {
title: '名片设置',
permission: ['view', 'add', 'edit', 'del', 'outport']
}
},
{
path: 'clientSet',
name: 'ClientSet',
component: '/businessCard/clientSet',
meta: {
title: '名片设置',
permission: ['view', 'add', 'edit', 'del', 'outport']
}
}
]
},
{
path: '*',
redirect: '/404',
hidden: true
}
]

22
web/src/store/index.js Executable file
View File

@@ -0,0 +1,22 @@
import Vue from 'vue'
import Vuex from 'vuex'
import routes from './modules/routes'
import operate from './modules/operate'
Vue.use(Vuex)
const store = new Vuex.Store({
modules: {
routes,
operate
},
state: {
},
getters: {
},
mutations: {
},
actions: {}
})
export default store

View File

@@ -0,0 +1,18 @@
const state = {
currentIndex: 0
}
const getters = {
currentIndex: state => {
return state.currentIndex
}
}
const mutations = {
setCurrentIndex (state, index = 0) {
state.currentIndex = index
}
}
export default {
state,
getters,
mutations
}

65
web/src/store/modules/routes.js Executable file
View File

@@ -0,0 +1,65 @@
// import {api} from '@/api'
import router from '@/router'
import Layout from '@/components/layout'
const _import = require('../../router/_import_' + process.env.NODE_ENV)
const state = {
isAuth: false,
routes: []
}
const getters = {
isAuth: state => {
return state.isAuth
},
routes: state => {
return state.routes
}
}
const mutations = {
saveRoutes (state, routes = []) {
state.routes = routes
state.isAuth = true
}
}
const actions = {
getUserPromission ({commit}, obj) {
commit('saveRoutes', obj.routes)
routerGo(obj.routes, obj)
// 正式请求接口获取路由
/* api.getRoutes().then(res => {
commit('saveRoutes', res.data)
routerGo(res.data, obj)
})
*/
}
}
export default {
state,
getters,
mutations,
actions
}
function routerGo (routes, obj) {
let getRouter = filterAsyncRouter(routes) // 过滤路由
router.options.routes.push(...getRouter)
router.addRoutes(getRouter) // 动态添加路由
localStorage.setItem('routes', JSON.stringify(getRouter))
obj.next({...obj.to, replace: true})
}
function filterAsyncRouter (asyncRouterMap) { // 遍历后台传来的路由字符串,转换为组件对象
const accessedRouters = asyncRouterMap.filter(route => {
if (route.component) {
if (route.component === 'Layout') { // Layout组件特殊处理
route.component = Layout
} else {
route.component = _import(route.component)
}
}
if (route.children && route.children.length) {
route.children = filterAsyncRouter(route.children)
}
return true
})
return accessedRouters
}

132
web/src/style/icon.css Executable file

File diff suppressed because one or more lines are too long

65
web/src/style/reset.css Executable file
View File

@@ -0,0 +1,65 @@
html,body,div,p,h1,h2,h3,h4,h5,h6,button,img,textarea,input,ul,li{
margin: 0;
padding: 0;
box-sizing: border-box;
list-style: none;
}
html,
body,
#app {
width: 100%;
height: 100%;
overflow: hidden;
font-size: 14px;
color: #666666;
}
body {
font-family: 'SourceHanSansSC-regular', 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif;
}
a {
text-decoration: none
}
.page-main{
padding: 20px;
width: 100%;
min-width: 1100px;
}
/* .content-box {
position: absolute;
left: 176px;
right: 0;
top: 70px;
bottom: 0;
padding-bottom: 30px;
-webkit-transition: left .3s ease-in-out;
transition: left .3s ease-in-out;
background: #f0f0f0;
}
.content {
width: auto;
height: 100%;
padding: 10px;
overflow-y: scroll;
box-sizing: border-box;
position: relative;
}
.main-common{
width: 100%;
padding: 20px;
background: #fff;
border-radius: 5px;
}
.content-collapse {
left: 65px;
}
.container {
padding: 30px;
background: #fff;
border: 1px solid #ddd;
border-radius: 5px;
} */

3
web/src/style/theme.scss Executable file
View File

@@ -0,0 +1,3 @@
$themeColor:#19C865;
$fontColor: #666666;
$bgColor: #F4F4F4;

7
web/src/utils/reg.js Executable file
View File

@@ -0,0 +1,7 @@
export default {
tel: /^1[3-9]\d{9}$/,
phone: /0\d{2,3}-\d{7,8}$/,
phone400: /^400[0-9]{7}$/,
email: /\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/,
number: /^\+?[0-9]*$/
}

19
web/src/view/404/index.vue Executable file
View File

@@ -0,0 +1,19 @@
<template>
<div>
{{key}}
</div>
</template>
<script>
export default {
data () {
return {
key: '页面不存在'
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,41 @@
<template>
<!-- 名片 -->
<div class="lb-bcard-manage">
<top-nav @changNav='handleNav'></top-nav>
<keep-alive>
<cardMange v-if="navSwitch === 0"/>
<defaultContent v-if="navSwitch === 1"/>
</keep-alive>
</div>
</template>
<script>
import cardMange from './subPage/cardMange'
import defaultContent from './subPage/defaultContent'
export default {
data () {
return {
navSwitch: -1
}
},
components: {
cardMange,
defaultContent
},
created () {
let routes = this.$route.meta.pagePermission
this.navSwitch = routes[0].index
},
methods: {
handleNav (index) {
this.navSwitch = index
}
}
}
</script>
<style lang="scss" scoped>
.lb-bcard-manage{
width: 100%;
}
</style>

View File

@@ -0,0 +1,176 @@
<template>
<div class="lb-card-manage">
<div class="lb-form">
<el-form :inline="true" :model="formInline">
<el-form-item label="部门">
<el-select v-model="formInline.region" placeholder="请选择部门">
<el-option label="开发部" value="kf"></el-option>
<el-option label="市场部" value="sc"></el-option>
</el-select>
</el-form-item>
<el-form-item label="搜索">
<el-input v-model="formInline.user" placeholder="搜索员工"></el-input>
</el-form-item>
</el-form>
</div>
<el-table
border
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
label="全选"
width="55">
</el-table-column>
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<lb-page
:page='page'
:pageSize='pageSize'
:total='total'
:selected='multipleSelection.length'
@handleSizeChange='handleSizeChange'
@handleCurrentChange='handleCurrentChange'
>
<lb-button>设置默认名片</lb-button>
</lb-page>
</div>
</template>
<script>
export default {
props: ['showIndex'],
data () {
return {
tableData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}],
formInline: {
user: '',
region: ''
},
page: 1,
pageSize: 10,
total: 0,
multipleSelection: []
}
},
created () {
console.log('名片管理')
},
methods: {
toggleSelection (rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row)
})
} else {
this.$refs.multipleTable.clearSelection()
}
},
handleSelectionChange (val) {
this.multipleSelection = val
},
handleSizeChange (val) {
this.pageSize = val
},
handleCurrentChange (val) {
this.page = val
}
}
}
</script>
<style lang="scss" scoped>
.lb-card-manage{
width: 100%;
padding: 0 24px;
.lb-form{
margin: 32px 0;
width: 100%;
height: 104px;
background: #F4F4F4;
display: flex;
align-items: center;
padding-left: 50px;
.el-form-item{
white-space: nowrap;
}
}
.el-table .thead{
color: #909399;
}
.bot{
width: 100%;
margin-top: 20px;
display: flex;
justify-content: space-between;
height: 40px;
font-size: 14px;
color: #101010;
>div{
display: flex;
align-items: center;
white-space: nowrap;
>div{
&:first-child{
height: 40px;
padding-right: 30px;
margin-right: 30px;
border-right: 1px solid #E8E8E8;
line-height: 40px;
}
.el-button{
margin-left: 10px;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,374 @@
<template>
<div class="lb-default-content">
<lb-tips :title='tips'></lb-tips>
<div class="card">
<!-- 效果展示 -->
<div class="card-show"></div>
<!-- 内容设置 -->
<div class='card-form'>
<div class="title">编辑名片默认内容</div>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position='right' label-width="120px" size="mini">
<el-collapse v-model="activeNames" @change="handleChange">
<el-collapse-item title="名片样式" name="1">
<div>与现实生活一致与现实生活的流程逻辑保持一致遵循用户习惯的语言和概念</div>
<div>在界面中一致所有的元素和结构需保持一致比如设计样式图标和文本元素的位置等</div>
</el-collapse-item>
<el-collapse-item title="名片信息" name="2">
<el-form-item label="员工姓名" prop="name">
<el-input v-model="ruleForm.name"></el-input>
</el-form-item>
<el-form-item label="头像" prop="avatar">
<el-upload
class="avatar-uploader"
action="https://jsonplaceholder.typicode.com/posts/"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="ruleForm.avatar" :src="ruleForm.avatar" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<el-form-item label="手机号" prop="tel">
<el-input v-model="ruleForm.tel"></el-input>
</el-form-item>
<el-form-item label="微信号" prop="weNum">
<el-input v-model="ruleForm.weNum"></el-input>
</el-form-item>
<el-form-item label="电话" prop="telephone">
<el-input v-model="ruleForm.telephone"></el-input>
</el-form-item>
<el-form-item label="400电话" prop="phone400">
<el-input v-model="ruleForm.phone400"></el-input>
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-input v-model="ruleForm.email"></el-input>
</el-form-item>
</el-collapse-item>
<el-collapse-item title="虚拟数据" name="3">
<el-form-item label="浏览人数" prop="fakeNum">
<el-input v-model="ruleForm.fakeNum"></el-input>
</el-form-item>
<div class='item-tips'>虚拟浏览人数</div>
<el-form-item label="浏览人数" prop="realNum">
<el-input v-model="ruleForm.realNum"></el-input>
</el-form-item>
<div class='item-tips'>虚拟靠谱人数</div>
</el-collapse-item>
<el-collapse-item title="个人简介" name="4">
<el-form-item label="个人简介" prop="profile">
<el-input type="textarea" :rows="2" placeholder="请输入个人简介" v-model="ruleForm.profile"></el-input>
</el-form-item>
</el-collapse-item>
<el-collapse-item title="语音介绍" name="5">
<el-form-item label="语音介绍" prop="audio">
<div class="audio-name">
<span>{{ruleForm.audioName}}</span>
<el-upload
class="upload-audio"
action="https://jsonplaceholder.typicode.com/posts/"
:show-file-list="false"
:on-success="handleAudioSuccess"
:before-upload="beforeAudioUpload">
<el-button size="small">选择媒体文件</el-button>
</el-upload>
</div>
</el-form-item>
<el-form-item label="语音时长(秒)" prop="sec">
<el-input :disabled="true" v-model="ruleForm.sec"></el-input>
</el-form-item>
</el-collapse-item>
<el-collapse-item title="我的视频" name="6">
<el-form-item label="视频" prop="sec">
<div class="audio-name">
<span>{{ruleForm.videoName}}</span>
<el-upload
class="upload-audio"
action="https://jsonplaceholder.typicode.com/posts/"
:show-file-list="false"
:on-success="handleAudioSuccess"
:before-upload="beforeAudioUpload">
<el-button size="small">选择媒体文件</el-button>
</el-upload>
</div>
</el-form-item>
<el-form-item label="视频封面图" prop="sec">
<el-upload
class="avatar-uploader"
action="https://jsonplaceholder.typicode.com/posts/"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="ruleForm.avatar" :src="ruleForm.avatar" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-collapse-item>
<el-collapse-item title="我的图片" name="7">
<el-form-item label="详情图片" prop="sec">
<el-upload
class="avatar-uploader"
action="https://jsonplaceholder.typicode.com/posts/"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="ruleForm.avatar" :src="ruleForm.avatar" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<el-form-item label="详情链接" prop="sec">
<el-upload
class="avatar-uploader"
action="https://jsonplaceholder.typicode.com/posts/"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="ruleForm.avatar" :src="ruleForm.avatar" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<div class='item-tips'>请输入链接网址或者appid</div>
</el-collapse-item>
<el-collapse-item title="VR全景设置" name="8">
<el-form-item label="VR展示标题" prop="sec">
<el-input v-model="ruleForm.cWeNum"></el-input>
</el-form-item>
<div class='item-tips'>名片详情页VR展示的版块的标题</div>
<el-form-item label="VR封面图" prop="sec">
<el-upload
class="avatar-uploader"
action="https://jsonplaceholder.typicode.com/posts/"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="ruleForm.avatar" :src="ruleForm.avatar" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<el-form-item label="VR链接地址" prop="sec">
<el-input v-model="ruleForm.cWeNum"></el-input>
</el-form-item>
<div class='item-tips'>名片详情页VR展示的版块的链接</div>
<el-form-item label="VR链接地址" prop="sec">
<el-input v-model="ruleForm.cWeNum"></el-input>
</el-form-item>
</el-collapse-item>
<el-collapse-item title="背景音乐" name="9">
<el-form-item label="背景音乐" prop="sec">
<div class="audio-name">
<span>{{ruleForm.musicName}}</span>
<el-upload
class="upload-audio"
action="https://jsonplaceholder.typicode.com/posts/"
:show-file-list="false"
:on-success="handleAudioSuccess"
:before-upload="beforeAudioUpload">
<el-button size="small">选择媒体文件</el-button>
</el-upload>
</div>
</el-form-item>
<div class='item-tips'>进入员工名片后的背景音乐</div>
<el-form-item label="是否自动播放" prop="musicSwitch">
<el-radio-group v-model="ruleForm.musicSwitch">
<el-radio label="1">关闭</el-radio>
<el-radio label="2">自动播放</el-radio>
</el-radio-group>
</el-form-item>
</el-collapse-item>
<el-collapse-item title="企业微信" name="10">
<el-form-item label="企业微信" prop="realNum">
<el-input v-model="ruleForm.cWeNum"></el-input>
</el-form-item>
<div class='item-tips'>员工企业微信账号当使用企业微信通知员工时此条数据必填否则消息无法通知成功有问题请联系技术</div>
</el-collapse-item>
</el-collapse>
</el-form>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'DefaultContent',
props: ['showIndex'],
data () {
return {
tips: '默认内容:企业可编辑一套名片页默认内容,快速对员工名片页初始化装修',
val: true,
activeNames: ['1'],
ruleForm: {
name: '', // 姓名
avatar: '', // 头像
tel: '', // 手机号
weNum: '', // 微信号
telephone: '', // 固话号码
phone400: '', // 400电话
email: '', // 邮箱
fakeNum: '0', // 虚拟浏览人数
realNum: '0', // 浏览人数
profile: '', // 个人简介
audio: '',
audioName: '', // 音频名称
sec: '', // 音频秒数
videoName: '', // 视频名称
videoPic: '', // 视频封面图
music: '', // 背景音乐
musicName: '', // 背景音乐名称
musicSwitch: '1', // 背景是否自动播放
cWeNum: '' // 企业微信
},
rules: {
name: {required: true, message: '请输入员工姓名', trigger: 'blur'},
avatar: {required: true, message: '请上传头像', trigger: 'change'},
tel: {required: true, pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur'},
weNum: {required: true, message: '请输入微信号', trigger: 'blur'},
telephone: {required: false, pattern: /0\d{2,3}-\d{7,8}$/, message: '请输入正确的电话', trigger: 'blur'},
phone400: {required: false, pattern: /^400[0-9]{7}$/, message: '请输入正确的400电话', trigger: 'blur'},
email: {required: true, pattern: /\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/, message: '请输入正确的邮箱', trigger: 'blur'},
fakeNum: {required: true, pattern: /^\+?[0-9]*$/, message: '请输入正确的人数', trigger: 'blur'},
realNum: {required: true, pattern: /^\+?[0-9]*$/, message: '请输入正确的人数', trigger: 'blur'},
profile: {required: true, message: '请输入个人简介', trigger: 'blur'},
cWeNum: {required: true, message: '请输入微信号', trigger: 'blur'}
}
}
},
created () {
console.log('名片设置')
},
methods: {
handleChange (val) {
},
handleAvatarSuccess (res, file) {
let imgUrl = URL.createObjectURL(file.raw)
console.log(imgUrl)
this.ruleForm.avatar = imgUrl
},
beforeAvatarUpload (file) {
const isLt2M = file.size / 1024 / 1024 < 2
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!')
}
return isLt2M
},
beforeAudioUpload (file) {
console.log(file)
const isAudio = file.type === 'audio/mp3' || file.type === 'audio/mpeg'
const isLt2M = file.size / 1024 / 1024 < 20
this.getTimes(file)
if (!isAudio) {
this.$message.error('上传音频文件只能是 mp3和mpeg 格式!')
}
if (!isLt2M) {
this.$message.error('上传音频文件大小不能超过 20MB!')
}
return isAudio && isLt2M
},
handleAudioSuccess (res, file) {
console.log(res, file)
},
getTimes (file) {
// 获取录音时长
let url = URL.createObjectURL(file)
console.log(url)
// 经测试发现audio也可获取视频的时长
let audioElement = new Audio(url)
audioElement.addEventListener('loadedmetadata', (_event) => {
console.log(_event)
this.sec = parseInt(audioElement.duration)
console.log(this.sec)
})
}
}
}
</script>
<style lang="scss" scoped>
.lb-default-content{
width: 100%;
padding: 0 24px;
margin: 32px 0;
.card{
width: 100%;
display: flex;
margin-top: 30px;
&-show{
min-width: 300px;
height: 540px;
border: 1px solid #ccc;
margin-right: 20px;
}
&-form{
width: 100%;
height: 300px;
.title{
width: 100%;
height: 40px;
background: $bgColor;
line-height: 40px;
padding: 0 20px;
}
.el-form{
.el-collapse-item__content{
.el-input-number{
width: 300px;
text-align: left;
.el-input{
.el-input__inner{
text-align: left !important;
}
}
}
.el-form-item{
.el-input{
width: 300px;
}
.el-textarea{
width: 300px;
}
.avatar-uploader {
width: 98px;
height: 98px;
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader:hover {
border-color: #409EFF;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 98px;
height: 98px;
line-height: 98px;
text-align: center;
}
.avatar {
width: 98px;
height: 98px;
display: block;
}
.audio-name{
width: 300px;
border: 1px solid #C3C3C3;
display: flex;
justify-content: space-between;
border-radius: 5px;
align-items: center;
overflow: hidden;
white-space: nowrap;
padding-left: 20px;
}
}
.item-tips{
margin-left: 120px;
}
}
}
}
}
}
</style>

View File

@@ -0,0 +1,95 @@
<template>
<div class="lb-tag">
<top-nav></top-nav>
<div class="lb-tag-main">
<lb-tips :title='title'></lb-tips>
<div class="c-tags">
<div class="label">企业标签</div>
<el-tag
:key="tag"
v-for="tag in dynamicTags"
closable
type="success"
size="medium"
:disable-transitions="false"
@close="handleClose(tag)">
{{tag}}
</el-tag>
<el-input
class="input-new-tag"
v-if="inputVisible"
v-model="inputValue"
ref="saveTagInput"
size="small"
@keyup.enter.native="handleInputConfirm"
@blur="handleInputConfirm"
>
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ 新增标签</el-button>
</div>
</div>
</div>
</template>
<script>
export default {
data () {
return {
title: '企业标签将显示在您企业名下所有员工的名片中最多30个标签。',
dynamicTags: ['标签一', '标签二', '标签三'],
inputVisible: false,
inputValue: ''
}
},
methods: {
handleClose (tag) {
this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1)
},
showInput () {
this.inputVisible = true
this.$nextTick(_ => {
this.$refs.saveTagInput.$refs.input.focus()
})
},
handleInputConfirm () {
let inputValue = this.inputValue
if (inputValue) {
this.dynamicTags.push(inputValue)
}
this.inputVisible = false
this.inputValue = ''
}
}
}
</script>
<style lang="scss" scoped>
.lb-tag{
width: 100%;
&-main{
padding: 20px;
}
.c-tags{
margin-top: 30px;
.label{
margin-bottom: 20px;
}
.el-tag + .el-tag {
margin-left: 10px;
}
.button-new-tag {
margin-left: 10px;
height: 29px;
line-height: 29px;
padding-top: 0;
padding-bottom: 0;
}
.input-new-tag {
width: 90px;
margin-left: 10px;
vertical-align: bottom;
}
}
}
</style>

View File

@@ -0,0 +1,108 @@
<template>
<div class="lb-client-set">
<top-nav></top-nav>
<div class="page-main">
<el-form :model="ruleForm" ref="ruleForm" label-width="120px">
<el-form-item label="强制授权">
<el-radio-group v-model="ruleForm.auth">
<el-radio label="1">开启</el-radio>
<el-radio label="2">关闭</el-radio>
</el-radio-group>
</el-form-item>
<div class="item-tips">开启此功能后会强制要求用户授权手机号, 此功能影响用户体验, 谨慎开启强制授权手机号与用户授权登录无关</div>
<el-form-item label="交换名片">
<el-radio-group v-model="ruleForm.change">
<el-radio label="1">开启</el-radio>
<el-radio label="2">关闭</el-radio>
</el-radio-group>
</el-form-item>
<div class="item-tips">客户进入员工名片后是否弹出交换名片窗口</div>
<el-form-item label="大图模式">
<el-radio-group v-model="ruleForm.bigPic">
<el-radio label="1">开启</el-radio>
<el-radio label="2">关闭</el-radio>
</el-radio-group>
</el-form-item>
<div class="item-tips">开启大图模式后用户点击详情图片可以预览图片并且可以长按图片识别二维码或者保存</div>
<el-form-item label="名片版式">
<el-radio-group v-model="ruleForm.cardStyle">
<el-radio label="1">开启</el-radio>
<el-radio label="2">关闭</el-radio>
</el-radio-group>
</el-form-item>
<div class="item-tips">名片详情页面员工名片信息展示方式</div>
<el-form-item label="个性签名">
<el-radio-group v-model="ruleForm.sign">
<el-radio label="1">开启</el-radio>
<el-radio label="2">关闭</el-radio>
</el-radio-group>
</el-form-item>
<div class="item-tips">员工名片是否显示个性签名栏目</div>
<el-form-item label="交换名片">
<el-input v-model="ruleForm.btnText" placeholder="请输入内容"></el-input>
</el-form-item>
<div class="item-tips">名片详情页咨询按钮文字</div>
<el-form-item label="交换手机号">
<el-input v-model="ruleForm.tel" placeholder="请输入手机号"></el-input>
</el-form-item>
<div class="item-tips">名片详情页交换手机号自定义文字</div>
<el-form-item>
<lb-button type='success' size='medium' @click="onSubmit">保存</lb-button>
</el-form-item>
</el-form>
</div>
</div>
</template>
<script>
export default {
data () {
return {
key: '获客功能设置',
ruleForm: {
auth: '1',
change: '1',
bigPic: '1',
cardStyle: '1',
sign: '1',
btnText: '',
tel: ''
}
}
},
methods: {
onSubmit () {
this.$refs['ruleForm'].validate(valid => {
if (valid) {
if (this.ruleForm.btnText && this.$reg.tel.test(this.ruleForm.tel)) {
this.$message.success('提交成功!')
} else {
this.$message.error('提交失败!')
}
}
})
}
}
}
</script>
<style lang="scss" scoped>
.lb-client-set{
width: 100%;
.page-main{
width: 100%;
.el-form{
.el-form-item{
margin-top: 10px;
.el-input{
width: 300px;
}
}
.item-tips{
margin-left: 120px;
color: #999999;
}
}
}
}
</style>

View File

@@ -0,0 +1,94 @@
<template>
<div class="lb-mobile-set">
<top-nav></top-nav>
<div class="set-form">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px">
<el-form-item label="创建名片开关" prop='cardSwitch'>
<el-radio-group v-model="ruleForm.cardSwitch">
<el-radio label="1">开启</el-radio>
<el-radio label="2">关闭</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="创建文案" prop="cardText">
<el-input v-model="ruleForm.cardText" placeholder="请输入名片文案"></el-input>
</el-form-item>
<div class="item-tips">名片列表创建名片文案</div>
<el-form-item label="免审口令" prop="word">
<el-input v-model="ruleForm.word" placeholder="请输入免审口令"></el-input>
</el-form-item>
<div class="item-tips">设置了此选项后用户在小程序端创建名片时输入此正确免审口令则无需管理员在后台设置员工将自动成为员工</div>
<el-form-item label="口令错误" prop="errWord">
<el-input v-model="ruleForm.errWord" placeholder="请输入口令错误时的文案"></el-input>
</el-form-item>
<div class="item-tips">用户在小程序端创建名片时免审口令填写错误提示文案</div>
<el-form-item label="未填写口令" prop="noWord">
<el-input v-model="ruleForm.noWord" placeholder="请输入未填写口令时的文案"></el-input>
</el-form-item>
<div class="item-tips">用户在小程序端创建名片时免审口令没有填写提示文案</div>
<el-form-item class="last-form-item">
<lb-button type="success" size='medium' @click="onSubmit">保存</lb-button>
<lb-button @click="onReset" size='medium' opType='reset'>重置</lb-button>
</el-form-item>
</el-form>
</div>
</div>
</template>
<script>
export default {
data () {
return {
key: '手机端创建设置',
ruleForm: {
cardSwitch: '1',
cardText: '',
word: '',
errWord: '',
noWord: ''
},
rules: {
cardSwitch: {required: true, message: '请选择开关', trigger: 'blur'},
cardText: {required: true, message: '请输入名片文案', trigger: 'blur'},
word: {required: true, message: '请输入免审口令', trigger: 'blur'},
errWord: {required: true, message: '请输入口令错误时的文案', trigger: 'blur'},
noWord: {required: true, message: '请输入未填写口令时的文案', trigger: 'blur'}
}
}
},
methods: {
onSubmit () {
console.log(133)
},
onReset () {
}
}
}
</script>
<style lang="scss" scoped>
.lb-mobile-set{
width: 100%;
.set-form{
width: 100%;
padding: 20px;
.el-form{
width: 100%;
.el-form-item{
margin-top: 10px;
.el-input{
width: 300px;
}
}
.last-form-item{
margin-top: 30px;
}
.item-tips{
margin-left: 120px;
color: #999999;
}
}
}
}
</style>

160
web/src/view/dynamic/comment.vue Executable file
View File

@@ -0,0 +1,160 @@
<template>
<div class="lb-dy-comment">
<top-nav></top-nav>
<div class="page-main">
<div class="form-search">
<el-form :inline="true" :model="formRules">
<el-form-item label="商品状态">
<el-select v-model="formRules.status" placeholder="请选择">
<el-option label="全部" value="0"></el-option>
<el-option label="已上架" value="1"></el-option>
<el-option label="已售完" value="2"></el-option>
<el-option label="为上架" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="分类">
<el-select v-model="formRules.type" placeholder="请选择">
<el-option label="全部" value="0"></el-option>
<el-option label="分类1" value="1"></el-option>
<el-option label="分类2" value="2"></el-option>
<el-option label="分类3" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="搜索">
<el-input v-model="formRules.goods" placeholder="请输入商品名称"></el-input>
</el-form-item>
</el-form>
</div>
<el-table
border
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
label="全选"
width="55">
</el-table-column>
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<lb-page
:batch='false'
:page='page'
:pageSize='pageSize'
:total='total'
:selected='multipleSelection.length'
@handleSizeChange='handleSizeChange'
@handleCurrentChange='handleCurrentChange'
>
<lb-button>批量下架</lb-button>
<lb-button>批量上架</lb-button>
<lb-button>批量删除</lb-button>
</lb-page>
</div>
</div>
</template>
<script>
export default {
data () {
return {
formRules: {
status: '',
type: '',
goods: ''
},
tableData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}],
page: 1,
pageSize: 10,
total: 0,
multipleSelection: []
}
},
methods: {
toggleSelection (rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row)
})
} else {
this.$refs.multipleTable.clearSelection()
}
},
handleSelectionChange (val) {
this.multipleSelection = val
},
handleSizeChange (val) {
this.pageSize = val
},
handleCurrentChange (val) {
this.page = val
}
}
}
</script>
<style lang="scss" scoped>
.lb-dy-comment{
width: 100%;
.form-search{
width: 100%;
height: 104px;
background: #F4F4F4;
margin-top: 10px;
display: flex;
align-items: center;
padding-left: 30px;
margin-bottom: 20px;
.el-form{
margin-top: 10px;
}
}
}
</style>

200
web/src/view/dynamic/manage.vue Executable file
View File

@@ -0,0 +1,200 @@
<template>
<div class="lb-dy-manage">
<top-nav></top-nav>
<div class="page-main">
<lb-button type='success' opType='add'>发企业动态</lb-button>
<lb-button type='success' opType='add'>添加链接动态</lb-button>
<lb-button type='success' opType='add'>添加视频动态</lb-button>
<div class="form-search">
<el-form :inline="true" :model="formRules">
<el-form-item label="动态状态">
<el-select v-model="formRules.status" placeholder="请选择">
<el-option label="全部" value="0"></el-option>
<el-option label="公司" value="1"></el-option>
<el-option label="个人" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="时间">
<el-date-picker
v-model="formRules.date"
type="datetimerange"
range-separator=""
start-placeholder="开始时间"
end-placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="搜索">
<el-input v-model="formRules.keywords" placeholder="请输入商品名称"></el-input>
</el-form-item>
</el-form>
</div>
<div class="message" v-for="(item,index) in msgList" :key='index'>
<div class="msg-top">
<img class="msg-l" :src="item.img">
<div class='msg-r'>
<div class="msg-r-head">
<span class="cname">{{item.cname}}</span>
<el-tag type="info">{{item.ctype}}</el-tag>
</div>
<div class="msg-r-content">
<div>{{item | handleContent}}</div>
<span class="all" @click="lookAll(index)">全部</span>
</div>
<div class="msg-r-img">
<img v-for="(o,i) in item.imgList" :key='i' :src="o" >
</div>
</div>
</div>
<div class="msg-bot">
<span>2019-04-29 14:53:23</span>
<div class="bot-l">
<div class="icon-btn">
<i class="iconfont icon-like"></i>
<span>1</span>
</div>
<div class="icon-btn">
<i class="iconfont icon-liuyanguanli"></i>
<span>1</span>
</div>
<div class="icon-btn">
<i class="iconfont icon-zhiding"></i>
<span>置顶</span>
</div>
<div class="icon-btn">
<i class="iconfont icon-bianji"></i>
<span>编辑</span>
</div>
<div class="icon-btn">
<i class="iconfont icon-del"></i>
<span>删除</span>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data () {
return {
formRules: {
status: '',
date: [],
keywords: ''
},
msgList: [
{
img: require('../../assets/logo.png'),
cname: '龙兵科技有限公司',
ctype: '公司',
content: '我们时常会在电影里看到很多的外星科幻电影,如《异形》、《变形金刚》、《阿凡达》等等外星生命的电影,虽然科学家们一直在探索宇宙,也在寻找其他外星生命,但目前还没有找到跟人类一样的碳基生命体存在,在这里就会不由自主地想到外星是否会存在其...',
open: false,
imgList: [
require('../../assets/logo.png'),
'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
require('../../assets/logo.png'),
'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
]
}
]
}
},
methods: {
/**
* @method 查看全部
*/
lookAll (index) {
if (!this.msgList[index].open) { this.msgList[index].open = true }
}
},
filters: {
handleContent (item) {
let {content, open} = item
return open ? content : content.substring(0, 80) + '...'
}
}
}
</script>
<style lang="scss" scoped>
.lb-dy-manage{
.el-button{
margin: 5px;
}
.form-search{
width: 100%;
height: 104px;
background: #F4F4F4;
margin-top: 10px;
display: flex;
align-items: center;
padding-left: 30px;
margin-bottom: 20px;
white-space: nowrap;
.el-form{
margin-top: 10px;
}
}
.message{
width: 100%;
border-bottom: 1px solid #F4F4F4;
.msg-top{
display: flex;
.msg-l{
width: 50px;
height: 50px;
border-radius: 5px;
margin-right: 20px;
border: 1px solid #ccc;
}
.msg-r{
width: 500px;
margin: 10px 0;
&-head{
.cname{
margin-right: 5px;
font-size: 16px;
}
}
&-content{
font-size: 14px;
div{
margin: 10px 0;
}
.all{
color: $themeColor;
cursor: pointer;
}
}
&-img{
margin-top: 10px;
img{
display: block;
height: 100px;
}
}
}
}
.msg-bot{
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 70px;
.bot-l{
display: flex;
align-items: center;
.icon-btn{
font-size: 14px;
margin-left: 20px;
cursor: pointer;
i{
font-size: 16px;
}
}
}
}
}
}
</style>

21
web/src/view/login/index.vue Executable file
View File

@@ -0,0 +1,21 @@
<template>
<!-- 登录 -->
<div>
{{key}}
</div>
</template>
<script>
export default {
name: 'Login',
data () {
return {
key: '登录页面'
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,70 @@
<template>
<div class="lb-goods-classify">
<top-nav />
<div class="page-main">
<lb-button type='success'>添加分类</lb-button>
<el-table
border
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
label="全选"
width="55">
</el-table-column>
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
export default {
data () {
return {
key: '商城'
}
}
}
</script>
<style lang="scss" scoped>
.lb-goods-classify{
width: 100%;
.page-main{
padding: 20px;
}
}
</style>

164
web/src/view/malls/goods/list.vue Executable file
View File

@@ -0,0 +1,164 @@
<template>
<div class="lb-goods-list">
<top-nav />
<div class="page-main">
<lb-button size='medium' type='success' opType='add'>添加商品</lb-button>
<div class="form-search">
<el-form :inline="true" :model="formRules">
<el-form-item label="部门">
<el-select v-model="formRules.status" placeholder="请选择">
<el-option label="全部" value="0"></el-option>
<el-option label="已上架" value="1"></el-option>
<el-option label="已售完" value="2"></el-option>
<el-option label="为上架" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="分类">
<el-select v-model="formRules.type" placeholder="请选择">
<el-option label="全部" value="0"></el-option>
<el-option label="分类1" value="1"></el-option>
<el-option label="分类2" value="2"></el-option>
<el-option label="分类3" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="搜索">
<el-input v-model="formRules.goods" placeholder="请输入商品名称"></el-input>
</el-form-item>
</el-form>
</div>
<el-table
border
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
label="全选"
width="55">
</el-table-column>
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<lb-page
:page='page'
:pageSize='pageSize'
:total='total'
:selected='multipleSelection.length'
@handleSizeChange='handleSizeChange'
@handleCurrentChange='handleCurrentChange'
>
<lb-button>批量下架</lb-button>
<lb-button>批量上架</lb-button>
<lb-button>批量删除</lb-button>
</lb-page>
</div>
</div>
</template>
<script>
export default {
data () {
return {
formRules: {
status: '',
type: '',
goods: ''
},
tableData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}],
page: 1,
pageSize: 10,
total: 0,
multipleSelection: []
}
},
methods: {
toggleSelection (rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row)
})
} else {
this.$refs.multipleTable.clearSelection()
}
},
handleSelectionChange (val) {
this.multipleSelection = val
},
handleSizeChange (val) {
this.pageSize = val
},
handleCurrentChange (val) {
this.page = val
}
}
}
</script>
<style lang="scss" scoped>
.lb-goods-list{
width: 100%;
.page-main{
width: 100%;
padding: 20px;
.form-search{
width: 100%;
height: 104px;
background: #F4F4F4;
margin-top: 30px;
display: flex;
align-items: center;
padding-left: 30px;
margin-bottom: 20px;
.el-form{
margin-top: 10px;
}
}
}
}
</style>

View File

@@ -0,0 +1,164 @@
<template>
<div class="lb-order-manage">
<top-nav />
<div class="page-main">
<div class="form-search">
<el-form :inline="true" :model="formRules">
<el-form-item label="商品状态">
<el-select v-model="formRules.status" placeholder="请选择">
<el-option label="全部" value="0"></el-option>
<el-option label="已上架" value="1"></el-option>
<el-option label="已售完" value="2"></el-option>
<el-option label="为上架" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="分类">
<el-select v-model="formRules.type" placeholder="请选择">
<el-option label="全部" value="0"></el-option>
<el-option label="分类1" value="1"></el-option>
<el-option label="分类2" value="2"></el-option>
<el-option label="分类3" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="搜索">
<el-input v-model="formRules.goods" placeholder="请输入商品名称"></el-input>
</el-form-item>
</el-form>
</div>
<el-table
border
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
label="全选"
width="55">
</el-table-column>
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<lb-page
:batch='false'
:page='page'
:pageSize='pageSize'
:total='total'
:selected='multipleSelection.length'
@handleSizeChange='handleSizeChange'
@handleCurrentChange='handleCurrentChange'
>
<lb-button>批量下架</lb-button>
<lb-button>批量上架</lb-button>
<lb-button>批量删除</lb-button>
</lb-page>
</div>
</div>
</template>
<script>
export default {
data () {
return {
formRules: {
status: '',
type: '',
goods: ''
},
tableData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}],
page: 1,
pageSize: 10,
total: 0,
multipleSelection: []
}
},
methods: {
toggleSelection (rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row)
})
} else {
this.$refs.multipleTable.clearSelection()
}
},
handleSelectionChange (val) {
this.multipleSelection = val
},
handleSizeChange (val) {
this.pageSize = val
},
handleCurrentChange (val) {
this.page = val
}
}
}
</script>
<style lang="scss" scoped>
.lb-order-manage{
.page-main{
width: 100%;
padding: 20px;
.form-search{
width: 100%;
height: 104px;
background: #F4F4F4;
margin-top: 10px;
display: flex;
align-items: center;
padding-left: 30px;
margin-bottom: 20px;
.el-form{
margin-top: 10px;
}
}
}
}
</style>

View File

@@ -0,0 +1,163 @@
<template>
<div class="lb-order-manage">
<top-nav />
<div class="page-main">
<div class="form-search">
<el-form :inline="true" :model="formRules">
<el-form-item label="状态">
<el-select v-model="formRules.status" placeholder="请选择">
<el-option label="全部" value="0"></el-option>
<el-option label="申请中" value="1"></el-option>
<el-option label="已完成" value="2"></el-option>
<el-option label="已拒绝" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="类型">
<el-select v-model="formRules.type" placeholder="请选择">
<el-option label="全部" value="0"></el-option>
<el-option label="退款" value="1"></el-option>
<el-option label="退货退款" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="搜索">
<el-input v-model="formRules.goods" placeholder="请输入售后单"></el-input>
</el-form-item>
</el-form>
</div>
<el-table
border
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
label="全选"
width="55">
</el-table-column>
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<lb-page
:batch='false'
:page='page'
:pageSize='pageSize'
:total='total'
:selected='multipleSelection.length'
@handleSizeChange='handleSizeChange'
@handleCurrentChange='handleCurrentChange'
>
<lb-button>批量下架</lb-button>
<lb-button>批量上架</lb-button>
<lb-button>批量删除</lb-button>
</lb-page>
</div>
</div>
</template>
<script>
export default {
data () {
return {
formRules: {
status: '',
type: '',
goods: ''
},
tableData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}],
page: 1,
pageSize: 10,
total: 0,
multipleSelection: []
}
},
methods: {
toggleSelection (rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row)
})
} else {
this.$refs.multipleTable.clearSelection()
}
},
handleSelectionChange (val) {
this.multipleSelection = val
},
handleSizeChange (val) {
this.pageSize = val
},
handleCurrentChange (val) {
this.page = val
}
}
}
</script>
<style lang="scss" scoped>
.lb-order-manage{
.page-main{
width: 100%;
padding: 20px;
.form-search{
width: 100%;
height: 104px;
background: #F4F4F4;
margin-top: 10px;
display: flex;
align-items: center;
padding-left: 30px;
margin-bottom: 20px;
.el-form{
margin-top: 10px;
}
}
}
}
</style>

46
web/src/view/malls/set/deal.vue Executable file
View File

@@ -0,0 +1,46 @@
<template>
<div class="lb-deal-set">
<top-nav @changNav='handleNav'/>
<div class="page-main">
<keep-alive>
<over-time v-if="navSwitch === 0"></over-time>
<pick-up v-else-if="navSwitch === 1"></pick-up>
</keep-alive>
</div>
</div>
</template>
<script>
import OverTime from './subpage/overTime'
import PickUp from './subpage/pickUp'
export default {
data () {
return {
key: '商城',
navSwitch: -1
}
},
components: {
OverTime,
PickUp
},
created () {
let routes = this.$route.meta.pagePermission
this.navSwitch = routes[0].index
},
methods: {
handleNav (index) {
this.navSwitch = index
}
}
}
</script>
<style lang="scss" scoped>
.lb-deal-set{
width: 100%;
.page-main{
padding: 20px;
}
}
</style>

View File

@@ -0,0 +1,73 @@
<template>
<div class="lb-payment">
<top-nav />
<div class="page-main">
<div class="form-search">
<el-form :model="ruleForm" ref="ruleForm" label-width="120px">
<el-form-item label="订单超时" prop="cardText">
<el-input v-model="ruleForm.btnText" placeholder="请输入按钮文案"></el-input>
</el-form-item>
<div class="item-tips">商城详情页咨询面议文字</div>
<el-form-item label="IOS虚拟支付" prop="word">
<el-radio-group v-model="ruleForm.ios">
<el-radio label="1">开启</el-radio>
<el-radio label="2">关闭</el-radio>
</el-radio-group>
</el-form-item>
<div class="item-tips">是否允许小程序IOS端显示支付相关的内容, 关闭后IOS端所有和支付相关的内容不会显示开启此设置涉及到虚拟支付容易被封禁请谨慎开启</div>
<el-form-item label="android虚拟支付" prop="cardText">
<el-radio-group v-model="ruleForm.android">
<el-radio label="1">开启</el-radio>
<el-radio label="2">关闭</el-radio>
</el-radio-group>
</el-form-item>
<div class="item-tips">是否允许小程序android端显示支付相关的内容, 关闭后android端所有和支付相关的内容不会显示</div>
<el-form-item>
<lb-button type='success'>保存</lb-button>
<lb-button>重置</lb-button>
</el-form-item>
</el-form>
</div>
</div>
</div>
</template>
<script>
export default {
data () {
return {
ruleForm: {
btnText: '',
ios: '1',
android: '1'
}
}
}
}
</script>
<style lang="scss" scoped>
.lb-payment{
width: 100%;
.form-search{
padding: 20px;
.el-form{
width: 100%;
.el-form-item{
margin-top: 10px;
.el-input{
width: 300px;
}
}
.last-form-item{
margin-top: 30px;
}
.item-tips{
margin-left: 120px;
color: #999999;
}
}
}
}
</style>

View File

@@ -0,0 +1,65 @@
<template>
<div class="lb-staff-goods">
<top-nav />
<div class="page-main">
<div class="form-search">
<el-form :model="ruleForm" ref="ruleForm" label-width="120px">
<el-form-item label="我的商城" prop="cardText">
<el-radio-group v-model="ruleForm.myMall">
<el-radio label="1">开启</el-radio>
<el-radio label="2">关闭</el-radio>
</el-radio-group>
</el-form-item>
<div class="item-tips">后台开启我的商城员工选择的商品将会展示到该员工的商城里面若没有选择任何商品将不会展示任何商品</div>
<el-form-item label="数量限制" prop="cardText">
<el-input v-model="ruleForm.limt" placeholder="请输入按钮文案"></el-input>
</el-form-item>
<div class="item-tips">当数量限制配置了之后, 员工选择我的商城里面的商品数量上限将由这里的设置决定, 0则不限制</div>
<el-form-item>
<lb-button type='success'>保存</lb-button>
<lb-button>重置</lb-button>
</el-form-item>
</el-form>
</div>
</div>
</div>
</template>
<script>
export default {
data () {
return {
ruleForm: {
myMall: '1',
limt: ''
}
}
}
}
</script>
<style lang="scss" scoped>
.lb-staff-goods{
width: 100%;
.form-search{
padding: 20px;
.el-form{
width: 100%;
.el-form-item{
margin-top: 10px;
.el-input{
width: 300px;
}
}
.last-form-item{
margin-top: 30px;
}
.item-tips{
margin-left: 120px;
color: #999999;
}
}
}
}
</style>

View File

@@ -0,0 +1,54 @@
<template>
<div class="lb-pick-up">
<el-form :model="ruleForm" ref="ruleForm" label-width="120px">
<el-form-item label="订单超时" prop="cardText">
<el-input v-model="ruleForm.orderOverTime" placeholder="请输入名片文案"></el-input>
</el-form-item>
<div class="item-tips">订单未支付超时时间, 超时将自动取消订单, 单位: </div>
<el-form-item label="拼团超时" prop="word">
<el-input v-model="ruleForm.assembleOverTime" placeholder="请输入免审口令"></el-input>
</el-form-item>
<div class="item-tips">拼团未成功超时时间, 超时将自动取消订单并退出拼团, 单位: </div>
<el-form-item>
<lb-button type='success'>保存</lb-button>
<lb-button>重置</lb-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
data () {
return {
ruleForm: {
orderOverTime: '',
assembleOverTime: ''
}
}
}
}
</script>
<style lang="scss" scoped>
.lb-pick-up{
width: 100%;
.el-form{
width: 100%;
.el-form-item{
margin-top: 10px;
.el-input{
width: 300px;
}
}
.last-form-item{
margin-top: 30px;
}
.item-tips{
margin-left: 120px;
color: #999999;
}
}
}
</style>

View File

@@ -0,0 +1,58 @@
<template>
<div class="lb-pick-up">
<el-form :model="ruleForm" ref="ruleForm" label-width="120px">
<el-form-item label="自动收货">
<el-input v-model="ruleForm.day" placeholder="请输入天数"></el-input>
</el-form-item>
<div class="item-tips">后台发货后, 用户没有确认收货到时间后自动收货, 最少为5天, 单位: </div>
<el-form-item label="核销密码">
<el-input v-model="ruleForm.pwd" placeholder="请输入核销密码"></el-input>
</el-form-item>
<div class="item-tips">此密码用于在小程序端核销用户订单, 在小程序员工端核销订单处点击扫描客户的订单二维码并且正确输入此密码就能直接完成此订单, 请谨慎操作并且知道此密码的人都能完成核销订单操作请注意保管密码以及及时更新密码</div>
<el-form-item label="自提商品">
<el-input v-model="ruleForm.goods" placeholder="请输入内容"></el-input>
</el-form-item>
<div class="item-tips">购物车自提商品文字提示内容</div>
<el-form-item>
<lb-button type='success'>保存</lb-button>
<lb-button>重置</lb-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
data () {
return {
ruleForm: {
day: '',
pwd: '',
goods: ''
}
}
}
}
</script>
<style lang="scss" scoped>
.lb-pick-up{
width: 100%;
.el-form{
width: 100%;
.el-form-item{
margin-top: 10px;
.el-input{
width: 300px;
}
}
.last-form-item{
margin-top: 30px;
}
.item-tips{
margin-left: 120px;
color: #999999;
}
}
}
</style>

37
web/src/view/survey/index.vue Executable file
View File

@@ -0,0 +1,37 @@
<template>
<!-- 概况 -->
<div>
{{key}}
<lb-switch v-model='val' @change="handleSwitchVal" opType='view'></lb-switch>
<!-- <lb-switch v-model='val1' @change="handleSwitchVal" opType='test'></lb-switch>
<lb-switch v-model='val2' @change="handleSwitchVal" opType='add'></lb-switch> -->
</div>
</template>
<script>
export default {
data () {
return {
val: true,
val1: false,
val2: true,
width: 80,
key: '概况页面'
}
},
methods: {
handleSwitchVal (val) {
this.val = val
}
},
watch: {
val (vals) {
console.log(vals)
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,19 @@
<template>
<div>
<top-nav></top-nav>
</div>
</template>
<script>
export default {
data () {
return {
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,19 @@
<template>
<div>
<top-nav></top-nav>
</div>
</template>
<script>
export default {
data () {
return {
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,19 @@
<template>
<div>
<top-nav></top-nav>
</div>
</template>
<script>
export default {
data () {
return {
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,19 @@
<template>
<div>
<top-nav></top-nav>
</div>
</template>
<script>
export default {
data () {
return {
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,19 @@
<template>
<div>
<top-nav></top-nav>
</div>
</template>
<script>
export default {
data () {
return {
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,19 @@
<template>
<div>
<top-nav></top-nav>
</div>
</template>
<script>
export default {
data () {
return {
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,19 @@
<template>
<div>
<top-nav></top-nav>
</div>
</template>
<script>
export default {
data () {
return {
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,19 @@
<template>
<div>
<top-nav></top-nav>
</div>
</template>
<script>
export default {
data () {
return {
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,19 @@
<template>
<div>
<top-nav></top-nav>
</div>
</template>
<script>
export default {
data () {
return {
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,19 @@
<template>
<div>
<top-nav></top-nav>
</div>
</template>
<script>
export default {
data () {
return {
}
}
}
</script>
<style lang="scss" scoped>
</style>

0
web/static/.gitkeep Executable file
View File