正在显示
97 个修改的文件
包含
1304 行增加
和
808 行删除
| @@ -2,7 +2,8 @@ var chalk = require('chalk') | @@ -2,7 +2,8 @@ var chalk = require('chalk') | ||
| 2 | var semver = require('semver') | 2 | var semver = require('semver') |
| 3 | var packageConfig = require('../package.json') | 3 | var packageConfig = require('../package.json') |
| 4 | var shell = require('shelljs') | 4 | var shell = require('shelljs') |
| 5 | -function exec (cmd) { | 5 | + |
| 6 | +function exec(cmd) { | ||
| 6 | return require('child_process').execSync(cmd).toString().trim() | 7 | return require('child_process').execSync(cmd).toString().trim() |
| 7 | } | 8 | } |
| 8 | 9 |
| @@ -29,12 +29,13 @@ var devMiddleware = require('webpack-dev-middleware')(compiler, { | @@ -29,12 +29,13 @@ var devMiddleware = require('webpack-dev-middleware')(compiler, { | ||
| 29 | }) | 29 | }) |
| 30 | 30 | ||
| 31 | var hotMiddleware = require('webpack-hot-middleware')(compiler, { | 31 | var hotMiddleware = require('webpack-hot-middleware')(compiler, { |
| 32 | - log: () => {} | 32 | + log: () => { |
| 33 | + } | ||
| 33 | }) | 34 | }) |
| 34 | // force page reload when html-webpack-plugin template changes | 35 | // force page reload when html-webpack-plugin template changes |
| 35 | compiler.plugin('compilation', function (compilation) { | 36 | compiler.plugin('compilation', function (compilation) { |
| 36 | compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { | 37 | compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { |
| 37 | - hotMiddleware.publish({ action: 'reload' }) | 38 | + hotMiddleware.publish({action: 'reload'}) |
| 38 | cb() | 39 | cb() |
| 39 | }) | 40 | }) |
| 40 | }) | 41 | }) |
| @@ -43,7 +44,7 @@ compiler.plugin('compilation', function (compilation) { | @@ -43,7 +44,7 @@ compiler.plugin('compilation', function (compilation) { | ||
| 43 | Object.keys(proxyTable).forEach(function (context) { | 44 | Object.keys(proxyTable).forEach(function (context) { |
| 44 | var options = proxyTable[context] | 45 | var options = proxyTable[context] |
| 45 | if (typeof options === 'string') { | 46 | if (typeof options === 'string') { |
| 46 | - options = { target: options } | 47 | + options = {target: options} |
| 47 | } | 48 | } |
| 48 | app.use(proxyMiddleware(options.filter || context, options)) | 49 | app.use(proxyMiddleware(options.filter || context, options)) |
| 49 | }) | 50 | }) |
| @@ -21,7 +21,7 @@ exports.cssLoaders = function (options) { | @@ -21,7 +21,7 @@ exports.cssLoaders = function (options) { | ||
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | // generate loader string to be used with extract text plugin | 23 | // generate loader string to be used with extract text plugin |
| 24 | - function generateLoaders (loader, loaderOptions) { | 24 | + function generateLoaders(loader, loaderOptions) { |
| 25 | var loaders = [cssLoader] | 25 | var loaders = [cssLoader] |
| 26 | if (loader) { | 26 | if (loader) { |
| 27 | loaders.push({ | 27 | loaders.push({ |
| @@ -50,7 +50,7 @@ exports.cssLoaders = function (options) { | @@ -50,7 +50,7 @@ exports.cssLoaders = function (options) { | ||
| 50 | css: generateLoaders(), | 50 | css: generateLoaders(), |
| 51 | postcss: generateLoaders(), | 51 | postcss: generateLoaders(), |
| 52 | less: generateLoaders('less'), | 52 | less: generateLoaders('less'), |
| 53 | - sass: generateLoaders('sass', { indentedSyntax: true }), | 53 | + sass: generateLoaders('sass', {indentedSyntax: true}), |
| 54 | scss: generateLoaders('sass'), | 54 | scss: generateLoaders('sass'), |
| 55 | stylus: generateLoaders('stylus'), | 55 | stylus: generateLoaders('stylus'), |
| 56 | styl: generateLoaders('stylus') | 56 | styl: generateLoaders('stylus') |
| @@ -2,7 +2,7 @@ var path = require('path') | @@ -2,7 +2,7 @@ var path = require('path') | ||
| 2 | var utils = require('./utils') | 2 | var utils = require('./utils') |
| 3 | var config = require('../config') | 3 | var config = require('../config') |
| 4 | var vueLoaderConfig = require('./vue-loader.conf') | 4 | var vueLoaderConfig = require('./vue-loader.conf') |
| 5 | -var webpack=require('webpack') | 5 | +var webpack = require('webpack') |
| 6 | 6 | ||
| 7 | function resolve(dir) { | 7 | function resolve(dir) { |
| 8 | return path.join(__dirname, '..', dir) | 8 | return path.join(__dirname, '..', dir) |
| @@ -69,9 +69,9 @@ module.exports = { | @@ -69,9 +69,9 @@ module.exports = { | ||
| 69 | }, | 69 | }, |
| 70 | plugins: [ | 70 | plugins: [ |
| 71 | new webpack.ProvidePlugin({ | 71 | new webpack.ProvidePlugin({ |
| 72 | - $:"jquery", | ||
| 73 | - jQuery:"jquery", | ||
| 74 | - "windows.jQuery":"jquery" | 72 | + $: "jquery", |
| 73 | + jQuery: "jquery", | ||
| 74 | + "windows.jQuery": "jquery" | ||
| 75 | }) | 75 | }) |
| 76 | ] | 76 | ] |
| 77 | } | 77 | } |
| @@ -13,7 +13,7 @@ Object.keys(baseWebpackConfig.entry).forEach(function (name) { | @@ -13,7 +13,7 @@ Object.keys(baseWebpackConfig.entry).forEach(function (name) { | ||
| 13 | 13 | ||
| 14 | module.exports = merge(baseWebpackConfig, { | 14 | module.exports = merge(baseWebpackConfig, { |
| 15 | module: { | 15 | module: { |
| 16 | - rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap }) | 16 | + rules: utils.styleLoaders({sourceMap: config.dev.cssSourceMap}) |
| 17 | }, | 17 | }, |
| 18 | // cheap-module-eval-source-map is faster for development | 18 | // cheap-module-eval-source-map is faster for development |
| 19 | devtool: '#cheap-module-eval-source-map', | 19 | devtool: '#cheap-module-eval-source-map', |
| @@ -28,7 +28,7 @@ module.exports = merge(baseWebpackConfig, { | @@ -28,7 +28,7 @@ module.exports = merge(baseWebpackConfig, { | ||
| 28 | new HtmlWebpackPlugin({ | 28 | new HtmlWebpackPlugin({ |
| 29 | filename: 'index.html', | 29 | filename: 'index.html', |
| 30 | template: 'index.html', | 30 | template: 'index.html', |
| 31 | - favicon:'static/favicon.ico', | 31 | + favicon: 'static/favicon.ico', |
| 32 | inject: true | 32 | inject: true |
| 33 | }), | 33 | }), |
| 34 | new FriendlyErrorsPlugin() | 34 | new FriendlyErrorsPlugin() |
| @@ -28,7 +28,7 @@ module.exports = { | @@ -28,7 +28,7 @@ module.exports = { | ||
| 28 | assetsSubDirectory: 'static', | 28 | assetsSubDirectory: 'static', |
| 29 | assetsPublicPath: '/', | 29 | assetsPublicPath: '/', |
| 30 | proxyTable: { | 30 | proxyTable: { |
| 31 | - '/api':{ | 31 | + '/api': { |
| 32 | target: 'http://192.168.1.53:12343',//设置你调用的接口域名和端口号 别忘了加http | 32 | target: 'http://192.168.1.53:12343',//设置你调用的接口域名和端口号 别忘了加http |
| 33 | // target: 'http://192.168.43.78:12343',//设置你调用的接口域名和端口号 别忘了加http | 33 | // target: 'http://192.168.43.78:12343',//设置你调用的接口域名和端口号 别忘了加http |
| 34 | changeOrigin: true, | 34 | changeOrigin: true, |
| @@ -7,16 +7,15 @@ | @@ -7,16 +7,15 @@ | ||
| 7 | </template> | 7 | </template> |
| 8 | 8 | ||
| 9 | <script> | 9 | <script> |
| 10 | -export default { | 10 | + export default { |
| 11 | name: 'app', | 11 | name: 'app', |
| 12 | - components: { | 12 | + components: {} |
| 13 | } | 13 | } |
| 14 | -} | ||
| 15 | 14 | ||
| 16 | </script> | 15 | </script> |
| 17 | 16 | ||
| 18 | <style lang="scss"> | 17 | <style lang="scss"> |
| 19 | -body { | 18 | + body { |
| 20 | margin: 0px; | 19 | margin: 0px; |
| 21 | padding: 0px; | 20 | padding: 0px; |
| 22 | /*background: url(assets/bg1.jpg) center !important; | 21 | /*background: url(assets/bg1.jpg) center !important; |
| @@ -25,42 +24,43 @@ body { | @@ -25,42 +24,43 @@ body { | ||
| 25 | font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif; | 24 | font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif; |
| 26 | font-size: 14px; | 25 | font-size: 14px; |
| 27 | -webkit-font-smoothing: antialiased; | 26 | -webkit-font-smoothing: antialiased; |
| 28 | -} | 27 | + } |
| 29 | 28 | ||
| 30 | -#app { | 29 | + #app { |
| 31 | position: absolute; | 30 | position: absolute; |
| 32 | top: 0px; | 31 | top: 0px; |
| 33 | bottom: 0px; | 32 | bottom: 0px; |
| 34 | width: 100%; | 33 | width: 100%; |
| 35 | -} | 34 | + } |
| 36 | 35 | ||
| 37 | -.el-submenu [class^=fa] { | 36 | + .el-submenu [class^=fa] { |
| 38 | vertical-align: baseline; | 37 | vertical-align: baseline; |
| 39 | margin-right: 10px; | 38 | margin-right: 10px; |
| 40 | -} | 39 | + } |
| 41 | 40 | ||
| 42 | -.el-menu-item [class^=fa] { | 41 | + .el-menu-item [class^=fa] { |
| 43 | vertical-align: baseline; | 42 | vertical-align: baseline; |
| 44 | margin-right: 10px; | 43 | margin-right: 10px; |
| 45 | -} | 44 | + } |
| 46 | 45 | ||
| 47 | -.toolbar { | 46 | + .toolbar { |
| 48 | background: #f2f2f2; | 47 | background: #f2f2f2; |
| 49 | padding: 10px; | 48 | padding: 10px; |
| 50 | //border:1px solid #dfe6ec; | 49 | //border:1px solid #dfe6ec; |
| 51 | margin: 10px 0px; | 50 | margin: 10px 0px; |
| 51 | + | ||
| 52 | .el-form-item { | 52 | .el-form-item { |
| 53 | margin-bottom: 10px; | 53 | margin-bottom: 10px; |
| 54 | } | 54 | } |
| 55 | -} | 55 | + } |
| 56 | 56 | ||
| 57 | -.fade-enter-active, | ||
| 58 | -.fade-leave-active { | 57 | + .fade-enter-active, |
| 58 | + .fade-leave-active { | ||
| 59 | transition: all .2s ease; | 59 | transition: all .2s ease; |
| 60 | -} | 60 | + } |
| 61 | 61 | ||
| 62 | -.fade-enter, | ||
| 63 | -.fade-leave-active { | 62 | + .fade-enter, |
| 63 | + .fade-leave-active { | ||
| 64 | opacity: 0; | 64 | opacity: 0; |
| 65 | -} | 65 | + } |
| 66 | </style> | 66 | </style> |
| @@ -5,11 +5,16 @@ import qs from 'qs' | @@ -5,11 +5,16 @@ import qs from 'qs' | ||
| 5 | Vue.prototype.$http = axios; | 5 | Vue.prototype.$http = axios; |
| 6 | 6 | ||
| 7 | 7 | ||
| 8 | -export const getuserMenus = params => { return axios.get(`/perm/userMenus`, { params: params }); }; | 8 | +export const getuserMenus = params => { |
| 9 | + return axios.get(`/perm/userMenus`, {params: params}); | ||
| 10 | +}; | ||
| 9 | 11 | ||
| 10 | -export const getUserList = params => { return axios.get(`/hqpt-user-center/user/list`, { params: params }); }; | 12 | +export const getUserList = params => { |
| 13 | + return axios.get(`/hqpt-user-center/user/list`, {params: params}); | ||
| 14 | +}; | ||
| 11 | 15 | ||
| 12 | -export const getUserListPage = params => { return axios({ | 16 | +export const getUserListPage = params => { |
| 17 | + return axios({ | ||
| 13 | method: 'GET', | 18 | method: 'GET', |
| 14 | url: `/user/list`, | 19 | url: `/user/list`, |
| 15 | data: params, | 20 | data: params, |
| @@ -17,42 +22,53 @@ export const getUserListPage = params => { return axios({ | @@ -17,42 +22,53 @@ export const getUserListPage = params => { return axios({ | ||
| 17 | 'Content-Type': 'application/json;charset=UTF-8' | 22 | 'Content-Type': 'application/json;charset=UTF-8' |
| 18 | } | 23 | } |
| 19 | // withCredentials: true | 24 | // withCredentials: true |
| 20 | -}) }; | 25 | + }) |
| 26 | +}; | ||
| 21 | 27 | ||
| 22 | -export const removeUser = params => { return axios({ | 28 | +export const removeUser = params => { |
| 29 | + return axios({ | ||
| 23 | method: 'DELETE', | 30 | method: 'DELETE', |
| 24 | url: `/user/del`, | 31 | url: `/user/del`, |
| 25 | data: params, | 32 | data: params, |
| 26 | headers: { | 33 | headers: { |
| 27 | 'Content-Type': 'application/json;charset=UTF-8' | 34 | 'Content-Type': 'application/json;charset=UTF-8' |
| 28 | } | 35 | } |
| 29 | -})}; | 36 | + }) |
| 37 | +}; | ||
| 30 | 38 | ||
| 31 | -export const batchRemoveUser = params => { return axios.get(`/user/batchremove`, { params: params }); }; | 39 | +export const batchRemoveUser = params => { |
| 40 | + return axios.get(`/user/batchremove`, {params: params}); | ||
| 41 | +}; | ||
| 32 | 42 | ||
| 33 | -export const editUser = params => { return axios({ | 43 | +export const editUser = params => { |
| 44 | + return axios({ | ||
| 34 | method: 'PUT', | 45 | method: 'PUT', |
| 35 | url: `/user/edit`, | 46 | url: `/user/edit`, |
| 36 | data: params, | 47 | data: params, |
| 37 | headers: { | 48 | headers: { |
| 38 | 'Content-Type': 'application/json;charset=UTF-8' | 49 | 'Content-Type': 'application/json;charset=UTF-8' |
| 39 | } | 50 | } |
| 40 | -})}; | 51 | + }) |
| 52 | +}; | ||
| 41 | 53 | ||
| 42 | -export const addUser = params => { return axios({ | 54 | +export const addUser = params => { |
| 55 | + return axios({ | ||
| 43 | method: 'POST', | 56 | method: 'POST', |
| 44 | url: `/user/add`, | 57 | url: `/user/add`, |
| 45 | data: params, | 58 | data: params, |
| 46 | headers: { | 59 | headers: { |
| 47 | 'Content-Type': 'application/json;charset=UTF-8' | 60 | 'Content-Type': 'application/json;charset=UTF-8' |
| 48 | } | 61 | } |
| 49 | -})}; | 62 | + }) |
| 63 | +}; | ||
| 50 | 64 | ||
| 51 | -export const setUserRole = params => { return axios({ | 65 | +export const setUserRole = params => { |
| 66 | + return axios({ | ||
| 52 | method: 'PUT', | 67 | method: 'PUT', |
| 53 | url: `/user/roleset`, | 68 | url: `/user/roleset`, |
| 54 | data: params, | 69 | data: params, |
| 55 | headers: { | 70 | headers: { |
| 56 | 'Content-Type': 'application/json;charset=UTF-8' | 71 | 'Content-Type': 'application/json;charset=UTF-8' |
| 57 | } | 72 | } |
| 58 | -})}; | ||
| 73 | + }) | ||
| 74 | +}; |
| @@ -12,7 +12,7 @@ export function fetchArticle(id) { | @@ -12,7 +12,7 @@ export function fetchArticle(id) { | ||
| 12 | return request({ | 12 | return request({ |
| 13 | url: '/article/detail', | 13 | url: '/article/detail', |
| 14 | method: 'get', | 14 | method: 'get', |
| 15 | - params: { id } | 15 | + params: {id} |
| 16 | }) | 16 | }) |
| 17 | } | 17 | } |
| 18 | 18 | ||
| @@ -20,7 +20,7 @@ export function fetchPv(pv) { | @@ -20,7 +20,7 @@ export function fetchPv(pv) { | ||
| 20 | return request({ | 20 | return request({ |
| 21 | url: '/article/pv', | 21 | url: '/article/pv', |
| 22 | method: 'get', | 22 | method: 'get', |
| 23 | - params: { pv } | 23 | + params: {pv} |
| 24 | }) | 24 | }) |
| 25 | } | 25 | } |
| 26 | 26 |
| @@ -3,35 +3,45 @@ import axios from 'axios' | @@ -3,35 +3,45 @@ import axios from 'axios' | ||
| 3 | let base = '/hqpt-user-center/company'; | 3 | let base = '/hqpt-user-center/company'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | 6 | +export const getList = params => { |
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; | ||
| 7 | 9 | ||
| 8 | 10 | ||
| 9 | -export const remove = params => { return axios({ | 11 | +export const remove = params => { |
| 12 | + return axios({ | ||
| 10 | method: 'DELETE', | 13 | method: 'DELETE', |
| 11 | url: `${base}/del`, | 14 | url: `${base}/del`, |
| 12 | data: params, | 15 | data: params, |
| 13 | headers: { | 16 | headers: { |
| 14 | 'Content-Type': 'application/json;charset=UTF-8' | 17 | 'Content-Type': 'application/json;charset=UTF-8' |
| 15 | } | 18 | } |
| 16 | -})}; | 19 | + }) |
| 20 | +}; | ||
| 17 | 21 | ||
| 18 | //批量删除 | 22 | //批量删除 |
| 19 | -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | 23 | +export const batchRemove = params => { |
| 24 | + return axios.get(`${base}/batchremove`, {params: params}); | ||
| 25 | +}; | ||
| 20 | 26 | ||
| 21 | -export const edit = params => { return axios({ | 27 | +export const edit = params => { |
| 28 | + return axios({ | ||
| 22 | method: 'PUT', | 29 | method: 'PUT', |
| 23 | url: `${base}/edit`, | 30 | url: `${base}/edit`, |
| 24 | data: params, | 31 | data: params, |
| 25 | headers: { | 32 | headers: { |
| 26 | 'Content-Type': 'application/json;charset=UTF-8' | 33 | 'Content-Type': 'application/json;charset=UTF-8' |
| 27 | } | 34 | } |
| 28 | -})}; | 35 | + }) |
| 36 | +}; | ||
| 29 | 37 | ||
| 30 | -export const add = params => { return axios({ | 38 | +export const add = params => { |
| 39 | + return axios({ | ||
| 31 | method: 'POST', | 40 | method: 'POST', |
| 32 | url: `${base}/add`, | 41 | url: `${base}/add`, |
| 33 | data: params, | 42 | data: params, |
| 34 | headers: { | 43 | headers: { |
| 35 | 'Content-Type': 'application/json;charset=UTF-8' | 44 | 'Content-Type': 'application/json;charset=UTF-8' |
| 36 | } | 45 | } |
| 37 | -})}; | ||
| 46 | + }) | ||
| 47 | +}; |
| @@ -3,35 +3,45 @@ import axios from 'axios' | @@ -3,35 +3,45 @@ import axios from 'axios' | ||
| 3 | let base = '/cloud-user-center/department'; | 3 | let base = '/cloud-user-center/department'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | 6 | +export const getList = params => { |
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; | ||
| 7 | 9 | ||
| 8 | 10 | ||
| 9 | -export const remove = params => { return axios({ | 11 | +export const remove = params => { |
| 12 | + return axios({ | ||
| 10 | method: 'DELETE', | 13 | method: 'DELETE', |
| 11 | url: `${base}/del`, | 14 | url: `${base}/del`, |
| 12 | data: params, | 15 | data: params, |
| 13 | headers: { | 16 | headers: { |
| 14 | 'Content-Type': 'application/json;charset=UTF-8' | 17 | 'Content-Type': 'application/json;charset=UTF-8' |
| 15 | } | 18 | } |
| 16 | -})}; | 19 | + }) |
| 20 | +}; | ||
| 17 | 21 | ||
| 18 | //批量删除 | 22 | //批量删除 |
| 19 | -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | 23 | +export const batchRemove = params => { |
| 24 | + return axios.get(`${base}/batchremove`, {params: params}); | ||
| 25 | +}; | ||
| 20 | 26 | ||
| 21 | -export const edit = params => { return axios({ | 27 | +export const edit = params => { |
| 28 | + return axios({ | ||
| 22 | method: 'PUT', | 29 | method: 'PUT', |
| 23 | url: `${base}/edit`, | 30 | url: `${base}/edit`, |
| 24 | data: params, | 31 | data: params, |
| 25 | headers: { | 32 | headers: { |
| 26 | 'Content-Type': 'application/json;charset=UTF-8' | 33 | 'Content-Type': 'application/json;charset=UTF-8' |
| 27 | } | 34 | } |
| 28 | -})}; | 35 | + }) |
| 36 | +}; | ||
| 29 | 37 | ||
| 30 | -export const add = params => { return axios({ | 38 | +export const add = params => { |
| 39 | + return axios({ | ||
| 31 | method: 'POST', | 40 | method: 'POST', |
| 32 | url: `${base}/add`, | 41 | url: `${base}/add`, |
| 33 | data: params, | 42 | data: params, |
| 34 | headers: { | 43 | headers: { |
| 35 | 'Content-Type': 'application/json;charset=UTF-8' | 44 | 'Content-Type': 'application/json;charset=UTF-8' |
| 36 | } | 45 | } |
| 37 | -})}; | ||
| 46 | + }) | ||
| 47 | +}; |
| @@ -2,26 +2,45 @@ import axios from 'axios' | @@ -2,26 +2,45 @@ import axios from 'axios' | ||
| 2 | 2 | ||
| 3 | let base = 'empt-location/order'; | 3 | let base = 'empt-location/order'; |
| 4 | 4 | ||
| 5 | -export const getOrder = params => { return axios.get(`${base}/list`, { params: params }); }; | 5 | +export const getOrder = params => { |
| 6 | + return axios.get(`${base}/list`, {params: params}); | ||
| 7 | +}; | ||
| 6 | 8 | ||
| 7 | -export const addOrder=params=>{return http.post(`${base}/add`, params);}; | 9 | +export const addOrder = params => { |
| 10 | + return http.post(`${base}/add`, params); | ||
| 11 | +}; | ||
| 8 | 12 | ||
| 9 | // export const ediOrder=params=>{return http.put(`${base}/edi`, params);}; | 13 | // export const ediOrder=params=>{return http.put(`${base}/edi`, params);}; |
| 10 | 14 | ||
| 11 | -export const remove = params => { return axios({ | 15 | +export const remove = params => { |
| 16 | + return axios({ | ||
| 12 | method: 'DELETE', | 17 | method: 'DELETE', |
| 13 | url: `${base}/del`, | 18 | url: `${base}/del`, |
| 14 | data: params, | 19 | data: params, |
| 15 | headers: { | 20 | headers: { |
| 16 | 'Content-Type': 'application/json;charset=UTF-8' | 21 | 'Content-Type': 'application/json;charset=UTF-8' |
| 17 | } | 22 | } |
| 18 | -})}; | 23 | + }) |
| 24 | +}; | ||
| 19 | 25 | ||
| 20 | -export const ediOrder = params => { return axios({ | 26 | +export const ediOrder = params => { |
| 27 | + return axios({ | ||
| 21 | method: 'PUT', | 28 | method: 'PUT', |
| 22 | url: `${base}/edi`, | 29 | url: `${base}/edi`, |
| 23 | data: params, | 30 | data: params, |
| 24 | headers: { | 31 | headers: { |
| 25 | 'Content-Type': 'application/json;charset=UTF-8' | 32 | 'Content-Type': 'application/json;charset=UTF-8' |
| 26 | } | 33 | } |
| 27 | -})}; | ||
| 34 | + }) | ||
| 35 | +}; | ||
| 36 | + | ||
| 37 | +export const defeatedOrder = params =>{ | ||
| 38 | + return axios({ | ||
| 39 | + method: 'POST', | ||
| 40 | + url: `${base}/defeatedOrder`, | ||
| 41 | + data: params, | ||
| 42 | + headers: { | ||
| 43 | + 'Content-Type': 'application/json;charset=UTF-8' | ||
| 44 | + } | ||
| 45 | + }) | ||
| 46 | +} |
| @@ -2,4 +2,6 @@ import axios from 'axios' | @@ -2,4 +2,6 @@ import axios from 'axios' | ||
| 2 | 2 | ||
| 3 | let base = 'empt-location/eeInfo'; | 3 | let base = 'empt-location/eeInfo'; |
| 4 | 4 | ||
| 5 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | ||
| 5 | +export const getList = params => { | ||
| 6 | + return axios.get(`${base}/list`, {params: params}); | ||
| 7 | +}; |
| @@ -3,62 +3,78 @@ import axios from 'axios' | @@ -3,62 +3,78 @@ import axios from 'axios' | ||
| 3 | let base = 'empt-location/electricity_meter'; | 3 | let base = 'empt-location/electricity_meter'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | 6 | +export const getList = params => { |
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; | ||
| 7 | 9 | ||
| 8 | 10 | ||
| 9 | -export const remove = params => { return axios({ | 11 | +export const remove = params => { |
| 12 | + return axios({ | ||
| 10 | method: 'DELETE', | 13 | method: 'DELETE', |
| 11 | url: `${base}/del`, | 14 | url: `${base}/del`, |
| 12 | data: params, | 15 | data: params, |
| 13 | headers: { | 16 | headers: { |
| 14 | 'Content-Type': 'application/json;charset=UTF-8' | 17 | 'Content-Type': 'application/json;charset=UTF-8' |
| 15 | } | 18 | } |
| 16 | -})}; | 19 | + }) |
| 20 | +}; | ||
| 17 | 21 | ||
| 18 | //批量删除 | 22 | //批量删除 |
| 19 | -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | 23 | +export const batchRemove = params => { |
| 24 | + return axios.get(`${base}/batchremove`, {params: params}); | ||
| 25 | +}; | ||
| 20 | 26 | ||
| 21 | -export const edit = params => { return axios({ | 27 | +export const edit = params => { |
| 28 | + return axios({ | ||
| 22 | method: 'PUT', | 29 | method: 'PUT', |
| 23 | url: `${base}/edit`, | 30 | url: `${base}/edit`, |
| 24 | data: params, | 31 | data: params, |
| 25 | headers: { | 32 | headers: { |
| 26 | 'Content-Type': 'application/json;charset=UTF-8' | 33 | 'Content-Type': 'application/json;charset=UTF-8' |
| 27 | } | 34 | } |
| 28 | -})}; | 35 | + }) |
| 36 | +}; | ||
| 29 | 37 | ||
| 30 | -export const add = params => { return axios({ | 38 | +export const add = params => { |
| 39 | + return axios({ | ||
| 31 | method: 'POST', | 40 | method: 'POST', |
| 32 | url: `${base}/add`, | 41 | url: `${base}/add`, |
| 33 | params: params, | 42 | params: params, |
| 34 | headers: { | 43 | headers: { |
| 35 | 'Content-Type': 'application/json;charset=UTF-8' | 44 | 'Content-Type': 'application/json;charset=UTF-8' |
| 36 | } | 45 | } |
| 37 | -})}; | 46 | + }) |
| 47 | +}; | ||
| 38 | 48 | ||
| 39 | -export const electricityInfo = params => { return axios({ | 49 | +export const electricityInfo = params => { |
| 50 | + return axios({ | ||
| 40 | method: 'POST', | 51 | method: 'POST', |
| 41 | url: `${base}/getEnergyInfoForRealTime`, | 52 | url: `${base}/getEnergyInfoForRealTime`, |
| 42 | params: params, | 53 | params: params, |
| 43 | headers: { | 54 | headers: { |
| 44 | 'Content-Type': 'application/json;charset=UTF-8' | 55 | 'Content-Type': 'application/json;charset=UTF-8' |
| 45 | } | 56 | } |
| 46 | -})}; | 57 | + }) |
| 58 | +}; | ||
| 47 | 59 | ||
| 48 | -export const getEEModel = params => { return axios({ | 60 | +export const getEEModel = params => { |
| 61 | + return axios({ | ||
| 49 | method: 'POST', | 62 | method: 'POST', |
| 50 | url: `${base}/getEEModel`, | 63 | url: `${base}/getEEModel`, |
| 51 | params: params, | 64 | params: params, |
| 52 | headers: { | 65 | headers: { |
| 53 | 'Content-Type': 'application/json;charset=UTF-8' | 66 | 'Content-Type': 'application/json;charset=UTF-8' |
| 54 | } | 67 | } |
| 55 | -})}; | 68 | + }) |
| 69 | +}; | ||
| 56 | 70 | ||
| 57 | -export const update = params => { return axios({ | 71 | +export const update = params => { |
| 72 | + return axios({ | ||
| 58 | method: 'PUT', | 73 | method: 'PUT', |
| 59 | url: `${base}/update`, | 74 | url: `${base}/update`, |
| 60 | data: params, | 75 | data: params, |
| 61 | headers: { | 76 | headers: { |
| 62 | 'Content-Type': 'application/json;charset=UTF-8' | 77 | 'Content-Type': 'application/json;charset=UTF-8' |
| 63 | } | 78 | } |
| 64 | -})}; | ||
| 79 | + }) | ||
| 80 | +}; |
| @@ -3,44 +3,56 @@ import axios from 'axios' | @@ -3,44 +3,56 @@ import axios from 'axios' | ||
| 3 | let base = 'empt-location/location'; | 3 | let base = 'empt-location/location'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | 6 | +export const getList = params => { |
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; | ||
| 7 | 9 | ||
| 8 | 10 | ||
| 9 | -export const remove = params => { return axios({ | 11 | +export const remove = params => { |
| 12 | + return axios({ | ||
| 10 | method: 'DELETE', | 13 | method: 'DELETE', |
| 11 | url: `${base}/del`, | 14 | url: `${base}/del`, |
| 12 | data: params, | 15 | data: params, |
| 13 | headers: { | 16 | headers: { |
| 14 | 'Content-Type': 'application/json;charset=UTF-8' | 17 | 'Content-Type': 'application/json;charset=UTF-8' |
| 15 | } | 18 | } |
| 16 | -})}; | 19 | + }) |
| 20 | +}; | ||
| 17 | 21 | ||
| 18 | //批量删除 | 22 | //批量删除 |
| 19 | -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | 23 | +export const batchRemove = params => { |
| 24 | + return axios.get(`${base}/batchremove`, {params: params}); | ||
| 25 | +}; | ||
| 20 | 26 | ||
| 21 | -export const edit = params => { return axios({ | 27 | +export const edit = params => { |
| 28 | + return axios({ | ||
| 22 | method: 'PUT', | 29 | method: 'PUT', |
| 23 | url: `${base}/edit`, | 30 | url: `${base}/edit`, |
| 24 | data: params, | 31 | data: params, |
| 25 | headers: { | 32 | headers: { |
| 26 | 'Content-Type': 'application/json;charset=UTF-8' | 33 | 'Content-Type': 'application/json;charset=UTF-8' |
| 27 | } | 34 | } |
| 28 | -})}; | 35 | + }) |
| 36 | +}; | ||
| 29 | 37 | ||
| 30 | -export const add = params => { return axios({ | 38 | +export const add = params => { |
| 39 | + return axios({ | ||
| 31 | method: 'POST', | 40 | method: 'POST', |
| 32 | url: `${base}/add`, | 41 | url: `${base}/add`, |
| 33 | params: params, | 42 | params: params, |
| 34 | headers: { | 43 | headers: { |
| 35 | 'Content-Type': 'application/json;charset=UTF-8' | 44 | 'Content-Type': 'application/json;charset=UTF-8' |
| 36 | } | 45 | } |
| 37 | -})}; | 46 | + }) |
| 47 | +}; | ||
| 38 | 48 | ||
| 39 | -export const update = params => { return axios({ | 49 | +export const update = params => { |
| 50 | + return axios({ | ||
| 40 | method: 'PUT', | 51 | method: 'PUT', |
| 41 | url: `${base}/update`, | 52 | url: `${base}/update`, |
| 42 | data: params, | 53 | data: params, |
| 43 | headers: { | 54 | headers: { |
| 44 | 'Content-Type': 'application/json;charset=UTF-8' | 55 | 'Content-Type': 'application/json;charset=UTF-8' |
| 45 | } | 56 | } |
| 46 | -})}; | ||
| 57 | + }) | ||
| 58 | +}; |
| @@ -3,53 +3,67 @@ import axios from 'axios' | @@ -3,53 +3,67 @@ import axios from 'axios' | ||
| 3 | let base = 'empt-location/userPayOrder'; | 3 | let base = 'empt-location/userPayOrder'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | 6 | +export const getList = params => { |
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; | ||
| 7 | 9 | ||
| 8 | 10 | ||
| 9 | -export const remove = params => { return axios({ | 11 | +export const remove = params => { |
| 12 | + return axios({ | ||
| 10 | method: 'DELETE', | 13 | method: 'DELETE', |
| 11 | url: `${base}/del`, | 14 | url: `${base}/del`, |
| 12 | data: params, | 15 | data: params, |
| 13 | headers: { | 16 | headers: { |
| 14 | 'Content-Type': 'application/json;charset=UTF-8' | 17 | 'Content-Type': 'application/json;charset=UTF-8' |
| 15 | } | 18 | } |
| 16 | -})}; | 19 | + }) |
| 20 | +}; | ||
| 17 | 21 | ||
| 18 | //批量删除 | 22 | //批量删除 |
| 19 | -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | 23 | +export const batchRemove = params => { |
| 24 | + return axios.get(`${base}/batchremove`, {params: params}); | ||
| 25 | +}; | ||
| 20 | 26 | ||
| 21 | -export const edit = params => { return axios({ | 27 | +export const edit = params => { |
| 28 | + return axios({ | ||
| 22 | method: 'PUT', | 29 | method: 'PUT', |
| 23 | url: `${base}/edit`, | 30 | url: `${base}/edit`, |
| 24 | data: params, | 31 | data: params, |
| 25 | headers: { | 32 | headers: { |
| 26 | 'Content-Type': 'application/json;charset=UTF-8' | 33 | 'Content-Type': 'application/json;charset=UTF-8' |
| 27 | } | 34 | } |
| 28 | -})}; | 35 | + }) |
| 36 | +}; | ||
| 29 | 37 | ||
| 30 | -export const add = params => { return axios({ | 38 | +export const add = params => { |
| 39 | + return axios({ | ||
| 31 | method: 'POST', | 40 | method: 'POST', |
| 32 | url: `${base}/add`, | 41 | url: `${base}/add`, |
| 33 | params: params, | 42 | params: params, |
| 34 | headers: { | 43 | headers: { |
| 35 | 'Content-Type': 'application/json;charset=UTF-8' | 44 | 'Content-Type': 'application/json;charset=UTF-8' |
| 36 | } | 45 | } |
| 37 | -})}; | 46 | + }) |
| 47 | +}; | ||
| 38 | 48 | ||
| 39 | -export const qrCode = params => { return axios({ | 49 | +export const qrCode = params => { |
| 50 | + return axios({ | ||
| 40 | method: 'POST', | 51 | method: 'POST', |
| 41 | url: `${base}/qrCode`, | 52 | url: `${base}/qrCode`, |
| 42 | params: params, | 53 | params: params, |
| 43 | headers: { | 54 | headers: { |
| 44 | 'Content-Type': 'application/json;charset=UTF-8' | 55 | 'Content-Type': 'application/json;charset=UTF-8' |
| 45 | } | 56 | } |
| 46 | -})}; | 57 | + }) |
| 58 | +}; | ||
| 47 | 59 | ||
| 48 | -export const update = params => { return axios({ | 60 | +export const update = params => { |
| 61 | + return axios({ | ||
| 49 | method: 'PUT', | 62 | method: 'PUT', |
| 50 | url: `${base}/update`, | 63 | url: `${base}/update`, |
| 51 | data: params, | 64 | data: params, |
| 52 | headers: { | 65 | headers: { |
| 53 | 'Content-Type': 'application/json;charset=UTF-8' | 66 | 'Content-Type': 'application/json;charset=UTF-8' |
| 54 | } | 67 | } |
| 55 | -})}; | ||
| 68 | + }) | ||
| 69 | +}; |
| @@ -3,55 +3,71 @@ import axios from 'axios' | @@ -3,55 +3,71 @@ import axios from 'axios' | ||
| 3 | let base = 'empt-location/water_meter'; | 3 | let base = 'empt-location/water_meter'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | -export const getList = params => { return axios.get(`${base}/selectAll`, { params: params }); }; | 6 | +export const getList = params => { |
| 7 | + return axios.get(`${base}/selectAll`, {params: params}); | ||
| 8 | +}; | ||
| 7 | 9 | ||
| 8 | -export const waterMeterAll = params => { return axios.get(`${base}/waterMeterAll`, { params: params }); }; | 10 | +export const waterMeterAll = params => { |
| 11 | + return axios.get(`${base}/waterMeterAll`, {params: params}); | ||
| 12 | +}; | ||
| 9 | 13 | ||
| 10 | 14 | ||
| 11 | -export const remove = params => { return axios({ | 15 | +export const remove = params => { |
| 16 | + return axios({ | ||
| 12 | method: 'DELETE', | 17 | method: 'DELETE', |
| 13 | url: `${base}/del`, | 18 | url: `${base}/del`, |
| 14 | data: params, | 19 | data: params, |
| 15 | headers: { | 20 | headers: { |
| 16 | 'Content-Type': 'application/json;charset=UTF-8' | 21 | 'Content-Type': 'application/json;charset=UTF-8' |
| 17 | } | 22 | } |
| 18 | -})}; | 23 | + }) |
| 24 | +}; | ||
| 19 | 25 | ||
| 20 | //批量删除 | 26 | //批量删除 |
| 21 | -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | 27 | +export const batchRemove = params => { |
| 28 | + return axios.get(`${base}/batchremove`, {params: params}); | ||
| 29 | +}; | ||
| 22 | 30 | ||
| 23 | -export const edit = params => { return axios({ | 31 | +export const edit = params => { |
| 32 | + return axios({ | ||
| 24 | method: 'PUT', | 33 | method: 'PUT', |
| 25 | url: `${base}/edit`, | 34 | url: `${base}/edit`, |
| 26 | data: params, | 35 | data: params, |
| 27 | headers: { | 36 | headers: { |
| 28 | 'Content-Type': 'application/json;charset=UTF-8' | 37 | 'Content-Type': 'application/json;charset=UTF-8' |
| 29 | } | 38 | } |
| 30 | -})}; | 39 | + }) |
| 40 | +}; | ||
| 31 | 41 | ||
| 32 | -export const add = params => { return axios({ | 42 | +export const add = params => { |
| 43 | + return axios({ | ||
| 33 | method: 'POST', | 44 | method: 'POST', |
| 34 | url: `${base}/add`, | 45 | url: `${base}/add`, |
| 35 | params: params, | 46 | params: params, |
| 36 | headers: { | 47 | headers: { |
| 37 | 'Content-Type': 'application/json;charset=UTF-8' | 48 | 'Content-Type': 'application/json;charset=UTF-8' |
| 38 | } | 49 | } |
| 39 | -})}; | 50 | + }) |
| 51 | +}; | ||
| 40 | 52 | ||
| 41 | -export const findRealTime = params => { return axios({ | 53 | +export const findRealTime = params => { |
| 54 | + return axios({ | ||
| 42 | method: 'POST', | 55 | method: 'POST', |
| 43 | url: `${base}/findRealTime`, | 56 | url: `${base}/findRealTime`, |
| 44 | params: params, | 57 | params: params, |
| 45 | headers: { | 58 | headers: { |
| 46 | 'Content-Type': 'application/json;charset=UTF-8' | 59 | 'Content-Type': 'application/json;charset=UTF-8' |
| 47 | } | 60 | } |
| 48 | -})}; | 61 | + }) |
| 62 | +}; | ||
| 49 | 63 | ||
| 50 | -export const update = params => { return axios({ | 64 | +export const update = params => { |
| 65 | + return axios({ | ||
| 51 | method: 'PUT', | 66 | method: 'PUT', |
| 52 | url: `${base}/update`, | 67 | url: `${base}/update`, |
| 53 | data: params, | 68 | data: params, |
| 54 | headers: { | 69 | headers: { |
| 55 | 'Content-Type': 'application/json;charset=UTF-8' | 70 | 'Content-Type': 'application/json;charset=UTF-8' |
| 56 | } | 71 | } |
| 57 | -})}; | ||
| 72 | + }) | ||
| 73 | +}; |
| @@ -3,35 +3,45 @@ import axios from 'axios' | @@ -3,35 +3,45 @@ import axios from 'axios' | ||
| 3 | let base = '/hqpt-user-center/group'; | 3 | let base = '/hqpt-user-center/group'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | 6 | +export const getList = params => { |
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; | ||
| 7 | 9 | ||
| 8 | 10 | ||
| 9 | -export const remove = params => { return axios({ | 11 | +export const remove = params => { |
| 12 | + return axios({ | ||
| 10 | method: 'DELETE', | 13 | method: 'DELETE', |
| 11 | url: `${base}/del`, | 14 | url: `${base}/del`, |
| 12 | data: params, | 15 | data: params, |
| 13 | headers: { | 16 | headers: { |
| 14 | 'Content-Type': 'application/json;charset=UTF-8' | 17 | 'Content-Type': 'application/json;charset=UTF-8' |
| 15 | } | 18 | } |
| 16 | -})}; | 19 | + }) |
| 20 | +}; | ||
| 17 | 21 | ||
| 18 | //批量删除 | 22 | //批量删除 |
| 19 | -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | 23 | +export const batchRemove = params => { |
| 24 | + return axios.get(`${base}/batchremove`, {params: params}); | ||
| 25 | +}; | ||
| 20 | 26 | ||
| 21 | -export const edit = params => { return axios({ | 27 | +export const edit = params => { |
| 28 | + return axios({ | ||
| 22 | method: 'PUT', | 29 | method: 'PUT', |
| 23 | url: `${base}/edit`, | 30 | url: `${base}/edit`, |
| 24 | data: params, | 31 | data: params, |
| 25 | headers: { | 32 | headers: { |
| 26 | 'Content-Type': 'application/json;charset=UTF-8' | 33 | 'Content-Type': 'application/json;charset=UTF-8' |
| 27 | } | 34 | } |
| 28 | -})}; | 35 | + }) |
| 36 | +}; | ||
| 29 | 37 | ||
| 30 | -export const add = params => { return axios({ | 38 | +export const add = params => { |
| 39 | + return axios({ | ||
| 31 | method: 'POST', | 40 | method: 'POST', |
| 32 | url: `${base}/add`, | 41 | url: `${base}/add`, |
| 33 | data: params, | 42 | data: params, |
| 34 | headers: { | 43 | headers: { |
| 35 | 'Content-Type': 'application/json;charset=UTF-8' | 44 | 'Content-Type': 'application/json;charset=UTF-8' |
| 36 | } | 45 | } |
| 37 | -})}; | ||
| 46 | + }) | ||
| 47 | +}; |
| @@ -23,7 +23,7 @@ export default { | @@ -23,7 +23,7 @@ export default { | ||
| 23 | } | 23 | } |
| 24 | }); | 24 | }); |
| 25 | }, | 25 | }, |
| 26 | - put(url, params){ | 26 | + put(url, params) { |
| 27 | return axios({ | 27 | return axios({ |
| 28 | method: 'PUT', | 28 | method: 'PUT', |
| 29 | url: url, | 29 | url: url, |
| @@ -33,7 +33,7 @@ export default { | @@ -33,7 +33,7 @@ export default { | ||
| 33 | } | 33 | } |
| 34 | }) | 34 | }) |
| 35 | }, | 35 | }, |
| 36 | - del: (url,params) => { | 36 | + del: (url, params) => { |
| 37 | return axios({ | 37 | return axios({ |
| 38 | method: 'DELETE', | 38 | method: 'DELETE', |
| 39 | url: url, | 39 | url: url, |
| @@ -43,7 +43,7 @@ export default { | @@ -43,7 +43,7 @@ export default { | ||
| 43 | } | 43 | } |
| 44 | }) | 44 | }) |
| 45 | }, | 45 | }, |
| 46 | - login: data =>{ | 46 | + login: data => { |
| 47 | return axios({ | 47 | return axios({ |
| 48 | method: 'POST', // 请求协议 | 48 | method: 'POST', // 请求协议 |
| 49 | url: 'cloud-user-center/login', // 请求的地址 | 49 | url: 'cloud-user-center/login', // 请求的地址 |
| @@ -3,44 +3,56 @@ import axios from 'axios' | @@ -3,44 +3,56 @@ import axios from 'axios' | ||
| 3 | let base = 'hqpt-process/job'; | 3 | let base = 'hqpt-process/job'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | 6 | +export const getList = params => { |
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; | ||
| 7 | 9 | ||
| 8 | 10 | ||
| 9 | -export const remove = params => { return axios({ | 11 | +export const remove = params => { |
| 12 | + return axios({ | ||
| 10 | method: 'DELETE', | 13 | method: 'DELETE', |
| 11 | url: `${base}/del`, | 14 | url: `${base}/del`, |
| 12 | data: params, | 15 | data: params, |
| 13 | headers: { | 16 | headers: { |
| 14 | 'Content-Type': 'application/json;charset=UTF-8' | 17 | 'Content-Type': 'application/json;charset=UTF-8' |
| 15 | } | 18 | } |
| 16 | -})}; | 19 | + }) |
| 20 | +}; | ||
| 17 | 21 | ||
| 18 | //批量删除 | 22 | //批量删除 |
| 19 | -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | 23 | +export const batchRemove = params => { |
| 24 | + return axios.get(`${base}/batchremove`, {params: params}); | ||
| 25 | +}; | ||
| 20 | 26 | ||
| 21 | -export const edit = params => { return axios({ | 27 | +export const edit = params => { |
| 28 | + return axios({ | ||
| 22 | method: 'PUT', | 29 | method: 'PUT', |
| 23 | url: `${base}/edit`, | 30 | url: `${base}/edit`, |
| 24 | data: params, | 31 | data: params, |
| 25 | headers: { | 32 | headers: { |
| 26 | 'Content-Type': 'application/json;charset=UTF-8' | 33 | 'Content-Type': 'application/json;charset=UTF-8' |
| 27 | } | 34 | } |
| 28 | -})}; | 35 | + }) |
| 36 | +}; | ||
| 29 | 37 | ||
| 30 | -export const add = params => { return axios({ | 38 | +export const add = params => { |
| 39 | + return axios({ | ||
| 31 | method: 'POST', | 40 | method: 'POST', |
| 32 | url: `${base}/add`, | 41 | url: `${base}/add`, |
| 33 | params: params, | 42 | params: params, |
| 34 | headers: { | 43 | headers: { |
| 35 | 'Content-Type': 'application/json;charset=UTF-8' | 44 | 'Content-Type': 'application/json;charset=UTF-8' |
| 36 | } | 45 | } |
| 37 | -})}; | 46 | + }) |
| 47 | +}; | ||
| 38 | 48 | ||
| 39 | -export const startJob = params => { return axios({ | 49 | +export const startJob = params => { |
| 50 | + return axios({ | ||
| 40 | method: 'PUT', | 51 | method: 'PUT', |
| 41 | url: `${base}/start`, | 52 | url: `${base}/start`, |
| 42 | data: params, | 53 | data: params, |
| 43 | headers: { | 54 | headers: { |
| 44 | 'Content-Type': 'application/json;charset=UTF-8' | 55 | 'Content-Type': 'application/json;charset=UTF-8' |
| 45 | } | 56 | } |
| 46 | -})}; | ||
| 57 | + }) | ||
| 58 | +}; |
| @@ -3,4 +3,6 @@ import axios from 'axios' | @@ -3,4 +3,6 @@ import axios from 'axios' | ||
| 3 | let base = '/cloud-user-center/system/log'; | 3 | let base = '/cloud-user-center/system/log'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | ||
| 6 | +export const getList = params => { | ||
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; |
| @@ -3,35 +3,45 @@ import axios from 'axios' | @@ -3,35 +3,45 @@ import axios from 'axios' | ||
| 3 | let base = '/cloud-user-center/perm'; | 3 | let base = '/cloud-user-center/perm'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | 6 | +export const getList = params => { |
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; | ||
| 7 | 9 | ||
| 8 | 10 | ||
| 9 | -export const remove = params => { return axios({ | 11 | +export const remove = params => { |
| 12 | + return axios({ | ||
| 10 | method: 'DELETE', | 13 | method: 'DELETE', |
| 11 | url: `${base}/del`, | 14 | url: `${base}/del`, |
| 12 | data: params, | 15 | data: params, |
| 13 | headers: { | 16 | headers: { |
| 14 | 'Content-Type': 'application/json;charset=UTF-8' | 17 | 'Content-Type': 'application/json;charset=UTF-8' |
| 15 | } | 18 | } |
| 16 | -})}; | 19 | + }) |
| 20 | +}; | ||
| 17 | 21 | ||
| 18 | //批量删除 | 22 | //批量删除 |
| 19 | -export const batchRemove = params => { return axios.get(`${base}/user/batchremove`, { params: params }); }; | 23 | +export const batchRemove = params => { |
| 24 | + return axios.get(`${base}/user/batchremove`, {params: params}); | ||
| 25 | +}; | ||
| 20 | 26 | ||
| 21 | -export const edit = params => { return axios({ | 27 | +export const edit = params => { |
| 28 | + return axios({ | ||
| 22 | method: 'PUT', | 29 | method: 'PUT', |
| 23 | url: `${base}/edit`, | 30 | url: `${base}/edit`, |
| 24 | data: params, | 31 | data: params, |
| 25 | headers: { | 32 | headers: { |
| 26 | 'Content-Type': 'application/json;charset=UTF-8' | 33 | 'Content-Type': 'application/json;charset=UTF-8' |
| 27 | } | 34 | } |
| 28 | -})}; | 35 | + }) |
| 36 | +}; | ||
| 29 | 37 | ||
| 30 | -export const add = params => { return axios({ | 38 | +export const add = params => { |
| 39 | + return axios({ | ||
| 31 | method: 'POST', | 40 | method: 'POST', |
| 32 | url: `${base}/add`, | 41 | url: `${base}/add`, |
| 33 | data: params, | 42 | data: params, |
| 34 | headers: { | 43 | headers: { |
| 35 | 'Content-Type': 'application/json;charset=UTF-8' | 44 | 'Content-Type': 'application/json;charset=UTF-8' |
| 36 | } | 45 | } |
| 37 | -})}; | ||
| 46 | + }) | ||
| 47 | +}; |
| @@ -3,47 +3,59 @@ import axios from 'axios' | @@ -3,47 +3,59 @@ import axios from 'axios' | ||
| 3 | let base = 'hqpt-process/process'; | 3 | let base = 'hqpt-process/process'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | 6 | +export const getList = params => { |
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; | ||
| 7 | 9 | ||
| 8 | 10 | ||
| 9 | -export const remove = params => { return axios({ | 11 | +export const remove = params => { |
| 12 | + return axios({ | ||
| 10 | method: 'DELETE', | 13 | method: 'DELETE', |
| 11 | url: `${base}/del`, | 14 | url: `${base}/del`, |
| 12 | data: params, | 15 | data: params, |
| 13 | headers: { | 16 | headers: { |
| 14 | 'Content-Type': 'application/json;charset=UTF-8' | 17 | 'Content-Type': 'application/json;charset=UTF-8' |
| 15 | } | 18 | } |
| 16 | -})}; | 19 | + }) |
| 20 | +}; | ||
| 17 | 21 | ||
| 18 | //批量删除 | 22 | //批量删除 |
| 19 | -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | 23 | +export const batchRemove = params => { |
| 24 | + return axios.get(`${base}/batchremove`, {params: params}); | ||
| 25 | +}; | ||
| 20 | 26 | ||
| 21 | -export const edit = params => { return axios({ | 27 | +export const edit = params => { |
| 28 | + return axios({ | ||
| 22 | method: 'PUT', | 29 | method: 'PUT', |
| 23 | url: `${base}/edit`, | 30 | url: `${base}/edit`, |
| 24 | data: params, | 31 | data: params, |
| 25 | headers: { | 32 | headers: { |
| 26 | 'Content-Type': 'application/json;charset=UTF-8' | 33 | 'Content-Type': 'application/json;charset=UTF-8' |
| 27 | } | 34 | } |
| 28 | -})}; | 35 | + }) |
| 36 | +}; | ||
| 29 | 37 | ||
| 30 | -export const add = params => { return axios({ | 38 | +export const add = params => { |
| 39 | + return axios({ | ||
| 31 | method: 'POST', | 40 | method: 'POST', |
| 32 | url: `${base}/add`, | 41 | url: `${base}/add`, |
| 33 | params: params, | 42 | params: params, |
| 34 | headers: { | 43 | headers: { |
| 35 | 'Content-Type': 'application/json;charset=UTF-8' | 44 | 'Content-Type': 'application/json;charset=UTF-8' |
| 36 | } | 45 | } |
| 37 | -})}; | 46 | + }) |
| 47 | +}; | ||
| 38 | 48 | ||
| 39 | -export const updateRolePerm = params => { return axios({ | 49 | +export const updateRolePerm = params => { |
| 50 | + return axios({ | ||
| 40 | method: 'PUT', | 51 | method: 'PUT', |
| 41 | url: `${base}/permSet`, | 52 | url: `${base}/permSet`, |
| 42 | data: params, | 53 | data: params, |
| 43 | headers: { | 54 | headers: { |
| 44 | 'Content-Type': 'application/json;charset=UTF-8' | 55 | 'Content-Type': 'application/json;charset=UTF-8' |
| 45 | } | 56 | } |
| 46 | -})}; | 57 | + }) |
| 58 | +}; | ||
| 47 | 59 | ||
| 48 | export const vacationTypeOptions = [ | 60 | export const vacationTypeOptions = [ |
| 49 | { | 61 | { |
| @@ -3,44 +3,56 @@ import axios from 'axios' | @@ -3,44 +3,56 @@ import axios from 'axios' | ||
| 3 | let base = '/cloud-user-center/role'; | 3 | let base = '/cloud-user-center/role'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | 6 | +export const getList = params => { |
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; | ||
| 7 | 9 | ||
| 8 | 10 | ||
| 9 | -export const remove = params => { return axios({ | 11 | +export const remove = params => { |
| 12 | + return axios({ | ||
| 10 | method: 'DELETE', | 13 | method: 'DELETE', |
| 11 | url: `${base}/del`, | 14 | url: `${base}/del`, |
| 12 | data: params, | 15 | data: params, |
| 13 | headers: { | 16 | headers: { |
| 14 | 'Content-Type': 'application/json;charset=UTF-8' | 17 | 'Content-Type': 'application/json;charset=UTF-8' |
| 15 | } | 18 | } |
| 16 | -})}; | 19 | + }) |
| 20 | +}; | ||
| 17 | 21 | ||
| 18 | //批量删除 | 22 | //批量删除 |
| 19 | -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | 23 | +export const batchRemove = params => { |
| 24 | + return axios.get(`${base}/batchremove`, {params: params}); | ||
| 25 | +}; | ||
| 20 | 26 | ||
| 21 | -export const edit = params => { return axios({ | 27 | +export const edit = params => { |
| 28 | + return axios({ | ||
| 22 | method: 'PUT', | 29 | method: 'PUT', |
| 23 | url: `${base}/edit`, | 30 | url: `${base}/edit`, |
| 24 | data: params, | 31 | data: params, |
| 25 | headers: { | 32 | headers: { |
| 26 | 'Content-Type': 'application/json;charset=UTF-8' | 33 | 'Content-Type': 'application/json;charset=UTF-8' |
| 27 | } | 34 | } |
| 28 | -})}; | 35 | + }) |
| 36 | +}; | ||
| 29 | 37 | ||
| 30 | -export const add = params => { return axios({ | 38 | +export const add = params => { |
| 39 | + return axios({ | ||
| 31 | method: 'POST', | 40 | method: 'POST', |
| 32 | url: `${base}/add`, | 41 | url: `${base}/add`, |
| 33 | data: params, | 42 | data: params, |
| 34 | headers: { | 43 | headers: { |
| 35 | 'Content-Type': 'application/json;charset=UTF-8' | 44 | 'Content-Type': 'application/json;charset=UTF-8' |
| 36 | } | 45 | } |
| 37 | -})}; | 46 | + }) |
| 47 | +}; | ||
| 38 | 48 | ||
| 39 | -export const updateRolePerm = params => { return axios({ | 49 | +export const updateRolePerm = params => { |
| 50 | + return axios({ | ||
| 40 | method: 'PUT', | 51 | method: 'PUT', |
| 41 | url: `${base}/permSet`, | 52 | url: `${base}/permSet`, |
| 42 | data: params, | 53 | data: params, |
| 43 | headers: { | 54 | headers: { |
| 44 | 'Content-Type': 'application/json;charset=UTF-8' | 55 | 'Content-Type': 'application/json;charset=UTF-8' |
| 45 | } | 56 | } |
| 46 | -})}; | ||
| 57 | + }) | ||
| 58 | +}; |
| @@ -3,9 +3,9 @@ let setIntervalWesocketPush = null | @@ -3,9 +3,9 @@ let setIntervalWesocketPush = null | ||
| 3 | 3 | ||
| 4 | /**建立连接 */ | 4 | /**建立连接 */ |
| 5 | export function createSocket() { | 5 | export function createSocket() { |
| 6 | - var socketUrl="http://localhost:10003/imserver"; | ||
| 7 | - // var socketUrl="http://218.28.199.138:10003/imserver"; | ||
| 8 | - socketUrl=socketUrl.replace("https","ws").replace("http","ws"); | 6 | + // var socketUrl="http://localhost:10003/imserver"; |
| 7 | + var socketUrl = "http://218.28.199.138:10003/imserver"; | ||
| 8 | + socketUrl = socketUrl.replace("https", "ws").replace("http", "ws"); | ||
| 9 | 9 | ||
| 10 | console.log(socketUrl); | 10 | console.log(socketUrl); |
| 11 | if (!Socket) { | 11 | if (!Socket) { |
| @@ -19,16 +19,19 @@ export function createSocket() { | @@ -19,16 +19,19 @@ export function createSocket() { | ||
| 19 | console.log('websocket已连接') | 19 | console.log('websocket已连接') |
| 20 | } | 20 | } |
| 21 | } | 21 | } |
| 22 | + | ||
| 22 | /**打开WS之后发送心跳 */ | 23 | /**打开WS之后发送心跳 */ |
| 23 | export function onopenWS() { | 24 | export function onopenWS() { |
| 24 | sendPing() //发送心跳 | 25 | sendPing() //发送心跳 |
| 25 | } | 26 | } |
| 27 | + | ||
| 26 | /**连接失败重连 */ | 28 | /**连接失败重连 */ |
| 27 | export function onerrorWS() { | 29 | export function onerrorWS() { |
| 28 | clearInterval(setIntervalWesocketPush) | 30 | clearInterval(setIntervalWesocketPush) |
| 29 | Socket.close() | 31 | Socket.close() |
| 30 | createSocket() //重连 | 32 | createSocket() //重连 |
| 31 | } | 33 | } |
| 34 | + | ||
| 32 | /**WS数据接收统一处理 */ | 35 | /**WS数据接收统一处理 */ |
| 33 | export function onmessageWS(e) { | 36 | export function onmessageWS(e) { |
| 34 | console.log(e.data); | 37 | console.log(e.data); |
| @@ -38,6 +41,7 @@ export function onmessageWS(e) { | @@ -38,6 +41,7 @@ export function onmessageWS(e) { | ||
| 38 | } | 41 | } |
| 39 | })) | 42 | })) |
| 40 | } | 43 | } |
| 44 | + | ||
| 41 | /**发送数据 | 45 | /**发送数据 |
| 42 | * @param eventType | 46 | * @param eventType |
| 43 | */ | 47 | */ |
| @@ -58,11 +62,13 @@ export function sendWSPush(eventTypeArr) { | @@ -58,11 +62,13 @@ export function sendWSPush(eventTypeArr) { | ||
| 58 | }, 3000) | 62 | }, 3000) |
| 59 | } | 63 | } |
| 60 | } | 64 | } |
| 65 | + | ||
| 61 | /**关闭WS */ | 66 | /**关闭WS */ |
| 62 | export function oncloseWS() { | 67 | export function oncloseWS() { |
| 63 | clearInterval(setIntervalWesocketPush) | 68 | clearInterval(setIntervalWesocketPush) |
| 64 | console.log('websocket已断开') | 69 | console.log('websocket已断开') |
| 65 | } | 70 | } |
| 71 | + | ||
| 66 | /**发送心跳 */ | 72 | /**发送心跳 */ |
| 67 | export function sendPing() { | 73 | export function sendPing() { |
| 68 | Socket.send('ping') | 74 | Socket.send('ping') |
| @@ -3,36 +3,45 @@ import axios from 'axios' | @@ -3,36 +3,45 @@ import axios from 'axios' | ||
| 3 | let base = '/hqpt-user-center/come_car'; | 3 | let base = '/hqpt-user-center/come_car'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | +export const getList = params => { | ||
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; | ||
| 6 | 9 | ||
| 7 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | ||
| 8 | 10 | ||
| 9 | - | ||
| 10 | -export const remove = params => { return axios({ | 11 | +export const remove = params => { |
| 12 | + return axios({ | ||
| 11 | method: 'DELETE', | 13 | method: 'DELETE', |
| 12 | url: `${base}/del`, | 14 | url: `${base}/del`, |
| 13 | data: params, | 15 | data: params, |
| 14 | headers: { | 16 | headers: { |
| 15 | 'Content-Type': 'application/json;charset=UTF-8' | 17 | 'Content-Type': 'application/json;charset=UTF-8' |
| 16 | } | 18 | } |
| 17 | -})}; | 19 | + }) |
| 20 | +}; | ||
| 18 | 21 | ||
| 19 | //批量删除 | 22 | //批量删除 |
| 20 | -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | 23 | +export const batchRemove = params => { |
| 24 | + return axios.get(`${base}/batchremove`, {params: params}); | ||
| 25 | +}; | ||
| 21 | 26 | ||
| 22 | -export const edit = params => { return axios({ | 27 | +export const edit = params => { |
| 28 | + return axios({ | ||
| 23 | method: 'PUT', | 29 | method: 'PUT', |
| 24 | url: `${base}/edit`, | 30 | url: `${base}/edit`, |
| 25 | data: params, | 31 | data: params, |
| 26 | headers: { | 32 | headers: { |
| 27 | 'Content-Type': 'application/json;charset=UTF-8' | 33 | 'Content-Type': 'application/json;charset=UTF-8' |
| 28 | } | 34 | } |
| 29 | -})}; | 35 | + }) |
| 36 | +}; | ||
| 30 | 37 | ||
| 31 | -export const add = params => { return axios({ | 38 | +export const add = params => { |
| 39 | + return axios({ | ||
| 32 | method: 'POST', | 40 | method: 'POST', |
| 33 | url: `${base}/add`, | 41 | url: `${base}/add`, |
| 34 | data: params, | 42 | data: params, |
| 35 | headers: { | 43 | headers: { |
| 36 | 'Content-Type': 'application/json;charset=UTF-8' | 44 | 'Content-Type': 'application/json;charset=UTF-8' |
| 37 | } | 45 | } |
| 38 | -})}; | ||
| 46 | + }) | ||
| 47 | +}; |
| @@ -3,36 +3,45 @@ import axios from 'axios' | @@ -3,36 +3,45 @@ import axios from 'axios' | ||
| 3 | let base = '/hqpt-user-center/key'; | 3 | let base = '/hqpt-user-center/key'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | +export const getList = params => { | ||
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; | ||
| 6 | 9 | ||
| 7 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | ||
| 8 | 10 | ||
| 9 | - | ||
| 10 | -export const remove = params => { return axios({ | 11 | +export const remove = params => { |
| 12 | + return axios({ | ||
| 11 | method: 'DELETE', | 13 | method: 'DELETE', |
| 12 | url: `${base}/del`, | 14 | url: `${base}/del`, |
| 13 | data: params, | 15 | data: params, |
| 14 | headers: { | 16 | headers: { |
| 15 | 'Content-Type': 'application/json;charset=UTF-8' | 17 | 'Content-Type': 'application/json;charset=UTF-8' |
| 16 | } | 18 | } |
| 17 | -})}; | 19 | + }) |
| 20 | +}; | ||
| 18 | 21 | ||
| 19 | //批量删除 | 22 | //批量删除 |
| 20 | -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | 23 | +export const batchRemove = params => { |
| 24 | + return axios.get(`${base}/batchremove`, {params: params}); | ||
| 25 | +}; | ||
| 21 | 26 | ||
| 22 | -export const edit = params => { return axios({ | 27 | +export const edit = params => { |
| 28 | + return axios({ | ||
| 23 | method: 'PUT', | 29 | method: 'PUT', |
| 24 | url: `${base}/edit`, | 30 | url: `${base}/edit`, |
| 25 | data: params, | 31 | data: params, |
| 26 | headers: { | 32 | headers: { |
| 27 | 'Content-Type': 'application/json;charset=UTF-8' | 33 | 'Content-Type': 'application/json;charset=UTF-8' |
| 28 | } | 34 | } |
| 29 | -})}; | 35 | + }) |
| 36 | +}; | ||
| 30 | 37 | ||
| 31 | -export const add = params => { return axios({ | 38 | +export const add = params => { |
| 39 | + return axios({ | ||
| 32 | method: 'POST', | 40 | method: 'POST', |
| 33 | url: `${base}/add`, | 41 | url: `${base}/add`, |
| 34 | data: params, | 42 | data: params, |
| 35 | headers: { | 43 | headers: { |
| 36 | 'Content-Type': 'application/json;charset=UTF-8' | 44 | 'Content-Type': 'application/json;charset=UTF-8' |
| 37 | } | 45 | } |
| 38 | -})}; | ||
| 46 | + }) | ||
| 47 | +}; |
| @@ -3,36 +3,45 @@ import axios from 'axios' | @@ -3,36 +3,45 @@ import axios from 'axios' | ||
| 3 | let base = '/hqpt-user-center/maintain'; | 3 | let base = '/hqpt-user-center/maintain'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | +export const getList = params => { | ||
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; | ||
| 6 | 9 | ||
| 7 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | ||
| 8 | 10 | ||
| 9 | - | ||
| 10 | -export const remove = params => { return axios({ | 11 | +export const remove = params => { |
| 12 | + return axios({ | ||
| 11 | method: 'DELETE', | 13 | method: 'DELETE', |
| 12 | url: `${base}/del`, | 14 | url: `${base}/del`, |
| 13 | data: params, | 15 | data: params, |
| 14 | headers: { | 16 | headers: { |
| 15 | 'Content-Type': 'application/json;charset=UTF-8' | 17 | 'Content-Type': 'application/json;charset=UTF-8' |
| 16 | } | 18 | } |
| 17 | -})}; | 19 | + }) |
| 20 | +}; | ||
| 18 | 21 | ||
| 19 | //批量删除 | 22 | //批量删除 |
| 20 | -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | 23 | +export const batchRemove = params => { |
| 24 | + return axios.get(`${base}/batchremove`, {params: params}); | ||
| 25 | +}; | ||
| 21 | 26 | ||
| 22 | -export const edit = params => { return axios({ | 27 | +export const edit = params => { |
| 28 | + return axios({ | ||
| 23 | method: 'PUT', | 29 | method: 'PUT', |
| 24 | url: `${base}/edit`, | 30 | url: `${base}/edit`, |
| 25 | data: params, | 31 | data: params, |
| 26 | headers: { | 32 | headers: { |
| 27 | 'Content-Type': 'application/json;charset=UTF-8' | 33 | 'Content-Type': 'application/json;charset=UTF-8' |
| 28 | } | 34 | } |
| 29 | -})}; | 35 | + }) |
| 36 | +}; | ||
| 30 | 37 | ||
| 31 | -export const add = params => { return axios({ | 38 | +export const add = params => { |
| 39 | + return axios({ | ||
| 32 | method: 'POST', | 40 | method: 'POST', |
| 33 | url: `${base}/add`, | 41 | url: `${base}/add`, |
| 34 | data: params, | 42 | data: params, |
| 35 | headers: { | 43 | headers: { |
| 36 | 'Content-Type': 'application/json;charset=UTF-8' | 44 | 'Content-Type': 'application/json;charset=UTF-8' |
| 37 | } | 45 | } |
| 38 | -})}; | ||
| 46 | + }) | ||
| 47 | +}; |
| @@ -3,36 +3,45 @@ import axios from 'axios' | @@ -3,36 +3,45 @@ import axios from 'axios' | ||
| 3 | let base = '/hqpt-user-center/on_duty'; | 3 | let base = '/hqpt-user-center/on_duty'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | +export const getList = params => { | ||
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; | ||
| 6 | 9 | ||
| 7 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | ||
| 8 | 10 | ||
| 9 | - | ||
| 10 | -export const remove = params => { return axios({ | 11 | +export const remove = params => { |
| 12 | + return axios({ | ||
| 11 | method: 'DELETE', | 13 | method: 'DELETE', |
| 12 | url: `${base}/del`, | 14 | url: `${base}/del`, |
| 13 | data: params, | 15 | data: params, |
| 14 | headers: { | 16 | headers: { |
| 15 | 'Content-Type': 'application/json;charset=UTF-8' | 17 | 'Content-Type': 'application/json;charset=UTF-8' |
| 16 | } | 18 | } |
| 17 | -})}; | 19 | + }) |
| 20 | +}; | ||
| 18 | 21 | ||
| 19 | //批量删除 | 22 | //批量删除 |
| 20 | -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | 23 | +export const batchRemove = params => { |
| 24 | + return axios.get(`${base}/batchremove`, {params: params}); | ||
| 25 | +}; | ||
| 21 | 26 | ||
| 22 | -export const edit = params => { return axios({ | 27 | +export const edit = params => { |
| 28 | + return axios({ | ||
| 23 | method: 'PUT', | 29 | method: 'PUT', |
| 24 | url: `${base}/edit`, | 30 | url: `${base}/edit`, |
| 25 | data: params, | 31 | data: params, |
| 26 | headers: { | 32 | headers: { |
| 27 | 'Content-Type': 'application/json;charset=UTF-8' | 33 | 'Content-Type': 'application/json;charset=UTF-8' |
| 28 | } | 34 | } |
| 29 | -})}; | 35 | + }) |
| 36 | +}; | ||
| 30 | 37 | ||
| 31 | -export const add = params => { return axios({ | 38 | +export const add = params => { |
| 39 | + return axios({ | ||
| 32 | method: 'POST', | 40 | method: 'POST', |
| 33 | url: `${base}/add`, | 41 | url: `${base}/add`, |
| 34 | data: params, | 42 | data: params, |
| 35 | headers: { | 43 | headers: { |
| 36 | 'Content-Type': 'application/json;charset=UTF-8' | 44 | 'Content-Type': 'application/json;charset=UTF-8' |
| 37 | } | 45 | } |
| 38 | -})}; | ||
| 46 | + }) | ||
| 47 | +}; |
| @@ -3,36 +3,45 @@ import axios from 'axios' | @@ -3,36 +3,45 @@ import axios from 'axios' | ||
| 3 | let base = '/hqpt-user-center/inspection'; | 3 | let base = '/hqpt-user-center/inspection'; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | +export const getList = params => { | ||
| 7 | + return axios.get(`${base}/list`, {params: params}); | ||
| 8 | +}; | ||
| 6 | 9 | ||
| 7 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | ||
| 8 | 10 | ||
| 9 | - | ||
| 10 | -export const remove = params => { return axios({ | 11 | +export const remove = params => { |
| 12 | + return axios({ | ||
| 11 | method: 'DELETE', | 13 | method: 'DELETE', |
| 12 | url: `${base}/del`, | 14 | url: `${base}/del`, |
| 13 | data: params, | 15 | data: params, |
| 14 | headers: { | 16 | headers: { |
| 15 | 'Content-Type': 'application/json;charset=UTF-8' | 17 | 'Content-Type': 'application/json;charset=UTF-8' |
| 16 | } | 18 | } |
| 17 | -})}; | 19 | + }) |
| 20 | +}; | ||
| 18 | 21 | ||
| 19 | //批量删除 | 22 | //批量删除 |
| 20 | -export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); }; | 23 | +export const batchRemove = params => { |
| 24 | + return axios.get(`${base}/batchremove`, {params: params}); | ||
| 25 | +}; | ||
| 21 | 26 | ||
| 22 | -export const edit = params => { return axios({ | 27 | +export const edit = params => { |
| 28 | + return axios({ | ||
| 23 | method: 'PUT', | 29 | method: 'PUT', |
| 24 | url: `${base}/edit`, | 30 | url: `${base}/edit`, |
| 25 | data: params, | 31 | data: params, |
| 26 | headers: { | 32 | headers: { |
| 27 | 'Content-Type': 'application/json;charset=UTF-8' | 33 | 'Content-Type': 'application/json;charset=UTF-8' |
| 28 | } | 34 | } |
| 29 | -})}; | 35 | + }) |
| 36 | +}; | ||
| 30 | 37 | ||
| 31 | -export const add = params => { return axios({ | 38 | +export const add = params => { |
| 39 | + return axios({ | ||
| 32 | method: 'POST', | 40 | method: 'POST', |
| 33 | url: `${base}/add`, | 41 | url: `${base}/add`, |
| 34 | data: params, | 42 | data: params, |
| 35 | headers: { | 43 | headers: { |
| 36 | 'Content-Type': 'application/json;charset=UTF-8' | 44 | 'Content-Type': 'application/json;charset=UTF-8' |
| 37 | } | 45 | } |
| 38 | -})}; | ||
| 46 | + }) | ||
| 47 | +}; |
| 1 | export const checkNull = params => { | 1 | export const checkNull = params => { |
| 2 | - if (params!=null && !params && typeof(params)!="undefined"){ | 2 | + if (params != null && !params && typeof (params) != "undefined") { |
| 3 | return true; | 3 | return true; |
| 4 | - }else { | 4 | + } else { |
| 5 | return false; | 5 | return false; |
| 6 | } | 6 | } |
| 7 | }; | 7 | }; |
| 1 | import http from './http.js' | 1 | import http from './http.js' |
| 2 | + | ||
| 2 | let baseUrl = '/cloud-user-center/user' | 3 | let baseUrl = '/cloud-user-center/user' |
| 3 | -export const getUserList = params => { return http.get(`${baseUrl}/list`, params); }; | 4 | +export const getUserList = params => { |
| 5 | + return http.get(`${baseUrl}/list`, params); | ||
| 6 | +}; | ||
| 4 | 7 | ||
| 5 | -export const getUserListPage = params => { return http.get(`/user/list`,params) }; | 8 | +export const getUserListPage = params => { |
| 9 | + return http.get(`/user/list`, params) | ||
| 10 | +}; | ||
| 6 | 11 | ||
| 7 | -export const removeUser = params => { return http.del(`${baseUrl}/del`,params)}; | 12 | +export const removeUser = params => { |
| 13 | + return http.del(`${baseUrl}/del`, params) | ||
| 14 | +}; | ||
| 8 | 15 | ||
| 9 | -export const batchRemoveUser = params => { return http.del(`${baseUrl}/batchremove`, { params: params }); }; | 16 | +export const batchRemoveUser = params => { |
| 17 | + return http.del(`${baseUrl}/batchremove`, {params: params}); | ||
| 18 | +}; | ||
| 10 | 19 | ||
| 11 | -export const editPass = params => { return http.put(`${baseUrl}/password`,params)}; | 20 | +export const editPass = params => { |
| 21 | + return http.put(`${baseUrl}/password`, params) | ||
| 22 | +}; | ||
| 12 | 23 | ||
| 13 | -export const editUser = params => { return http.put(`${baseUrl}/edit`,params)}; | 24 | +export const editUser = params => { |
| 25 | + return http.put(`${baseUrl}/edit`, params) | ||
| 26 | +}; | ||
| 14 | 27 | ||
| 15 | -export const addUser = params => { return http.post(`${baseUrl}/add`,params)}; | 28 | +export const addUser = params => { |
| 29 | + return http.post(`${baseUrl}/add`, params) | ||
| 30 | +}; | ||
| 16 | 31 | ||
| 17 | -export const setUserRole = params => { return http.put(`${baseUrl}/roleset`,params)}; | 32 | +export const setUserRole = params => { |
| 33 | + return http.put(`${baseUrl}/roleset`, params) | ||
| 34 | +}; | ||
| 18 | 35 | ||
| 19 | -export const resetToken = params => { return http.put(`${baseUrl}/resetToken`,params)}; | ||
| 36 | +export const resetToken = params => { | ||
| 37 | + return http.put(`${baseUrl}/resetToken`, params) | ||
| 38 | +}; |
| @@ -4,7 +4,7 @@ var DEFAULT_PATTERN = 'yyyy-MM-dd'; | @@ -4,7 +4,7 @@ var DEFAULT_PATTERN = 'yyyy-MM-dd'; | ||
| 4 | * 根据数组 元素的“值” 来删除或者获取数据 | 4 | * 根据数组 元素的“值” 来删除或者获取数据 |
| 5 | * 使用方法arrList.splice(arrList.contains('c'),1) | 5 | * 使用方法arrList.splice(arrList.contains('c'),1) |
| 6 | */ | 6 | */ |
| 7 | -Array.prototype.contains = function(obj) { | 7 | +Array.prototype.contains = function (obj) { |
| 8 | var i = this.length; | 8 | var i = this.length; |
| 9 | while (i--) { | 9 | while (i--) { |
| 10 | if (this[i] === obj) { | 10 | if (this[i] === obj) { |
| @@ -16,7 +16,9 @@ Array.prototype.contains = function(obj) { | @@ -16,7 +16,9 @@ Array.prototype.contains = function(obj) { | ||
| 16 | 16 | ||
| 17 | function padding(s, len) { | 17 | function padding(s, len) { |
| 18 | len = len - (s + '').length; | 18 | len = len - (s + '').length; |
| 19 | - for (var i = 0; i < len; i++) { s = '0' + s; } | 19 | + for (var i = 0; i < len; i++) { |
| 20 | + s = '0' + s; | ||
| 21 | + } | ||
| 20 | return s; | 22 | return s; |
| 21 | } | 23 | } |
| 22 | 24 | ||
| @@ -38,13 +40,20 @@ export default { | @@ -38,13 +40,20 @@ export default { | ||
| 38 | pattern = pattern || DEFAULT_PATTERN; | 40 | pattern = pattern || DEFAULT_PATTERN; |
| 39 | return pattern.replace(SIGN_REGEXP, function ($0) { | 41 | return pattern.replace(SIGN_REGEXP, function ($0) { |
| 40 | switch ($0.charAt(0)) { | 42 | switch ($0.charAt(0)) { |
| 41 | - case 'y': return padding(date.getFullYear(), $0.length); | ||
| 42 | - case 'M': return padding(date.getMonth() + 1, $0.length); | ||
| 43 | - case 'd': return padding(date.getDate(), $0.length); | ||
| 44 | - case 'w': return date.getDay() + 1; | ||
| 45 | - case 'h': return padding(date.getHours(), $0.length); | ||
| 46 | - case 'm': return padding(date.getMinutes(), $0.length); | ||
| 47 | - case 's': return padding(date.getSeconds(), $0.length); | 43 | + case 'y': |
| 44 | + return padding(date.getFullYear(), $0.length); | ||
| 45 | + case 'M': | ||
| 46 | + return padding(date.getMonth() + 1, $0.length); | ||
| 47 | + case 'd': | ||
| 48 | + return padding(date.getDate(), $0.length); | ||
| 49 | + case 'w': | ||
| 50 | + return date.getDay() + 1; | ||
| 51 | + case 'h': | ||
| 52 | + return padding(date.getHours(), $0.length); | ||
| 53 | + case 'm': | ||
| 54 | + return padding(date.getMinutes(), $0.length); | ||
| 55 | + case 's': | ||
| 56 | + return padding(date.getSeconds(), $0.length); | ||
| 48 | } | 57 | } |
| 49 | }); | 58 | }); |
| 50 | }, | 59 | }, |
| @@ -57,12 +66,24 @@ export default { | @@ -57,12 +66,24 @@ export default { | ||
| 57 | var _int = parseInt(matchs2[i]); | 66 | var _int = parseInt(matchs2[i]); |
| 58 | var sign = matchs1[i]; | 67 | var sign = matchs1[i]; |
| 59 | switch (sign.charAt(0)) { | 68 | switch (sign.charAt(0)) { |
| 60 | - case 'y': _date.setFullYear(_int); break; | ||
| 61 | - case 'M': _date.setMonth(_int - 1); break; | ||
| 62 | - case 'd': _date.setDate(_int); break; | ||
| 63 | - case 'h': _date.setHours(_int); break; | ||
| 64 | - case 'm': _date.setMinutes(_int); break; | ||
| 65 | - case 's': _date.setSeconds(_int); break; | 69 | + case 'y': |
| 70 | + _date.setFullYear(_int); | ||
| 71 | + break; | ||
| 72 | + case 'M': | ||
| 73 | + _date.setMonth(_int - 1); | ||
| 74 | + break; | ||
| 75 | + case 'd': | ||
| 76 | + _date.setDate(_int); | ||
| 77 | + break; | ||
| 78 | + case 'h': | ||
| 79 | + _date.setHours(_int); | ||
| 80 | + break; | ||
| 81 | + case 'm': | ||
| 82 | + _date.setMinutes(_int); | ||
| 83 | + break; | ||
| 84 | + case 's': | ||
| 85 | + _date.setSeconds(_int); | ||
| 86 | + break; | ||
| 66 | } | 87 | } |
| 67 | } | 88 | } |
| 68 | return _date; | 89 | return _date; |
| @@ -72,9 +93,9 @@ export default { | @@ -72,9 +93,9 @@ export default { | ||
| 72 | 93 | ||
| 73 | }, | 94 | }, |
| 74 | checkNull: params => { | 95 | checkNull: params => { |
| 75 | - if (params!==null && typeof(params)!="undefined"){ | 96 | + if (params !== null && typeof (params) != "undefined") { |
| 76 | return true; | 97 | return true; |
| 77 | - }else { | 98 | + } else { |
| 78 | return false; | 99 | return false; |
| 79 | } | 100 | } |
| 80 | } | 101 | } |
| @@ -14,9 +14,9 @@ | @@ -14,9 +14,9 @@ | ||
| 14 | </template> | 14 | </template> |
| 15 | 15 | ||
| 16 | <script> | 16 | <script> |
| 17 | -import { scrollTo } from '@/utils/scrollTo' | 17 | + import {scrollTo} from '@/utils/scrollTo' |
| 18 | 18 | ||
| 19 | -export default { | 19 | + export default { |
| 20 | name: 'Pagination', | 20 | name: 'Pagination', |
| 21 | props: { | 21 | props: { |
| 22 | total: { | 22 | total: { |
| @@ -74,27 +74,28 @@ export default { | @@ -74,27 +74,28 @@ export default { | ||
| 74 | }, | 74 | }, |
| 75 | methods: { | 75 | methods: { |
| 76 | handleSizeChange(val) { | 76 | handleSizeChange(val) { |
| 77 | - this.$emit('pagination', { page: this.currentPage, limit: val }) | 77 | + this.$emit('pagination', {page: this.currentPage, limit: val}) |
| 78 | if (this.autoScroll) { | 78 | if (this.autoScroll) { |
| 79 | scrollTo(0, 800) | 79 | scrollTo(0, 800) |
| 80 | } | 80 | } |
| 81 | }, | 81 | }, |
| 82 | handleCurrentChange(val) { | 82 | handleCurrentChange(val) { |
| 83 | - this.$emit('pagination', { page: val, limit: this.pageSize }) | 83 | + this.$emit('pagination', {page: val, limit: this.pageSize}) |
| 84 | if (this.autoScroll) { | 84 | if (this.autoScroll) { |
| 85 | scrollTo(0, 800) | 85 | scrollTo(0, 800) |
| 86 | } | 86 | } |
| 87 | } | 87 | } |
| 88 | } | 88 | } |
| 89 | -} | 89 | + } |
| 90 | </script> | 90 | </script> |
| 91 | 91 | ||
| 92 | <style scoped> | 92 | <style scoped> |
| 93 | -.pagination-container { | 93 | + .pagination-container { |
| 94 | background: #fff; | 94 | background: #fff; |
| 95 | padding: 32px 16px; | 95 | padding: 32px 16px; |
| 96 | -} | ||
| 97 | -.pagination-container.hidden { | 96 | + } |
| 97 | + | ||
| 98 | + .pagination-container.hidden { | ||
| 98 | display: none; | 99 | display: none; |
| 99 | -} | 100 | + } |
| 100 | </style> | 101 | </style> |
| 1 | /** | 1 | /** |
| 2 | -* @Author: jianglei | ||
| 3 | -* @Date: 2017-10-12 12:06:49 | ||
| 4 | -*/ | 2 | + * @Author: jianglei |
| 3 | + * @Date: 2017-10-12 12:06:49 | ||
| 4 | + */ | ||
| 5 | 'use strict' | 5 | 'use strict' |
| 6 | import Vue from 'vue' | 6 | import Vue from 'vue' |
| 7 | + | ||
| 7 | export default function treeToArray(data, expandAll, parent = null, level = null) { | 8 | export default function treeToArray(data, expandAll, parent = null, level = null) { |
| 8 | let tmp = [] | 9 | let tmp = [] |
| 9 | - Array.from(data).forEach(function(record) { | 10 | + Array.from(data).forEach(function (record) { |
| 10 | if (record._expanded === undefined) { | 11 | if (record._expanded === undefined) { |
| 11 | Vue.set(record, '_expanded', expandAll) | 12 | Vue.set(record, '_expanded', expandAll) |
| 12 | } | 13 | } |
| @@ -11,7 +11,8 @@ | @@ -11,7 +11,8 @@ | ||
| 11 | <!--{{ scope.$index }}--> | 11 | <!--{{ scope.$index }}--> |
| 12 | </template> | 12 | </template> |
| 13 | </el-table-column> | 13 | </el-table-column> |
| 14 | - <el-table-column v-for="(column, index) in columns" v-else :key="column.value" :label="column.text" :width="column.width"> | 14 | + <el-table-column v-for="(column, index) in columns" v-else :key="column.value" :label="column.text" |
| 15 | + :width="column.width"> | ||
| 15 | <template slot-scope="scope"> | 16 | <template slot-scope="scope"> |
| 16 | <!-- Todo --> | 17 | <!-- Todo --> |
| 17 | <!-- eslint-disable-next-line vue/no-confusing-v-for-v-if --> | 18 | <!-- eslint-disable-next-line vue/no-confusing-v-for-v-if --> |
| @@ -28,12 +29,13 @@ | @@ -28,12 +29,13 @@ | ||
| 28 | </template> | 29 | </template> |
| 29 | 30 | ||
| 30 | <script> | 31 | <script> |
| 31 | -/** | 32 | + /** |
| 32 | Auth: Lei.j1ang | 33 | Auth: Lei.j1ang |
| 33 | Created: 2018/1/19-13:59 | 34 | Created: 2018/1/19-13:59 |
| 34 | -*/ | ||
| 35 | -import treeToArray from './eval.js' | ||
| 36 | -export default { | 35 | + */ |
| 36 | + import treeToArray from './eval.js' | ||
| 37 | + | ||
| 38 | + export default { | ||
| 37 | name: 'TreeTable', | 39 | name: 'TreeTable', |
| 38 | props: { | 40 | props: { |
| 39 | /* eslint-disable */ | 41 | /* eslint-disable */ |
| @@ -54,7 +56,7 @@ export default { | @@ -54,7 +56,7 @@ export default { | ||
| 54 | }, | 56 | }, |
| 55 | computed: { | 57 | computed: { |
| 56 | // 格式化数据源 | 58 | // 格式化数据源 |
| 57 | - formatData: function() { | 59 | + formatData: function () { |
| 58 | let tmp | 60 | let tmp |
| 59 | if (!Array.isArray(this.data)) { | 61 | if (!Array.isArray(this.data)) { |
| 60 | tmp = [this.data] | 62 | tmp = [this.data] |
| @@ -67,7 +69,7 @@ export default { | @@ -67,7 +69,7 @@ export default { | ||
| 67 | } | 69 | } |
| 68 | }, | 70 | }, |
| 69 | methods: { | 71 | methods: { |
| 70 | - showRow: function(row) { | 72 | + showRow: function (row) { |
| 71 | this.data | 73 | this.data |
| 72 | const show = (row.parent ? (row.parent._expanded && row.parent._show) : true) | 74 | const show = (row.parent ? (row.parent._expanded && row.parent._show) : true) |
| 73 | // const show = (row.row.parent ? (row.row.parent._expanded && row.row.parent._show) : true) | 75 | // const show = (row.row.parent ? (row.row.parent._expanded && row.row.parent._show) : true) |
| @@ -76,7 +78,7 @@ export default { | @@ -76,7 +78,7 @@ export default { | ||
| 76 | return show ? 'animation:treeTableShow 1s;-webkit-animation:treeTableShow 1s;' : 'display:none;' | 78 | return show ? 'animation:treeTableShow 1s;-webkit-animation:treeTableShow 1s;' : 'display:none;' |
| 77 | }, | 79 | }, |
| 78 | // 切换下级是否展开 | 80 | // 切换下级是否展开 |
| 79 | - toggleExpanded: function(trIndex) { | 81 | + toggleExpanded: function (trIndex) { |
| 80 | const record = this.formatData[trIndex] | 82 | const record = this.formatData[trIndex] |
| 81 | record._expanded = !record._expanded | 83 | record._expanded = !record._expanded |
| 82 | }, | 84 | }, |
| @@ -85,16 +87,25 @@ export default { | @@ -85,16 +87,25 @@ export default { | ||
| 85 | return (index === 0 && record.children && record.children.length > 0) | 87 | return (index === 0 && record.children && record.children.length > 0) |
| 86 | } | 88 | } |
| 87 | } | 89 | } |
| 88 | -} | 90 | + } |
| 89 | </script> | 91 | </script> |
| 90 | <style rel="stylesheet/css"> | 92 | <style rel="stylesheet/css"> |
| 91 | @keyframes treeTableShow { | 93 | @keyframes treeTableShow { |
| 92 | - from {opacity: 0;} | ||
| 93 | - to {opacity: 1;} | 94 | + from { |
| 95 | + opacity: 0; | ||
| 96 | + } | ||
| 97 | + to { | ||
| 98 | + opacity: 1; | ||
| 94 | } | 99 | } |
| 100 | + } | ||
| 101 | + | ||
| 95 | @-webkit-keyframes treeTableShow { | 102 | @-webkit-keyframes treeTableShow { |
| 96 | - from {opacity: 0;} | ||
| 97 | - to {opacity: 1;} | 103 | + from { |
| 104 | + opacity: 0; | ||
| 105 | + } | ||
| 106 | + to { | ||
| 107 | + opacity: 1; | ||
| 108 | + } | ||
| 98 | } | 109 | } |
| 99 | </style> | 110 | </style> |
| 100 | 111 | ||
| @@ -110,19 +121,22 @@ export default { | @@ -110,19 +121,22 @@ export default { | ||
| 110 | line-height: 1; | 121 | line-height: 1; |
| 111 | width: $space-width; | 122 | width: $space-width; |
| 112 | height: 14px; | 123 | height: 14px; |
| 124 | + | ||
| 113 | &::before { | 125 | &::before { |
| 114 | content: "" | 126 | content: "" |
| 115 | } | 127 | } |
| 116 | } | 128 | } |
| 117 | - .processContainer{ | 129 | + |
| 130 | + .processContainer { | ||
| 118 | width: 100%; | 131 | width: 100%; |
| 119 | height: 100%; | 132 | height: 100%; |
| 120 | } | 133 | } |
| 134 | + | ||
| 121 | table td { | 135 | table td { |
| 122 | line-height: 26px; | 136 | line-height: 26px; |
| 123 | } | 137 | } |
| 124 | 138 | ||
| 125 | - .tree-ctrl{ | 139 | + .tree-ctrl { |
| 126 | position: relative; | 140 | position: relative; |
| 127 | cursor: pointer; | 141 | cursor: pointer; |
| 128 | color: $color-blue; | 142 | color: $color-blue; |
| @@ -12,8 +12,12 @@ export default { | @@ -12,8 +12,12 @@ export default { | ||
| 12 | el._v_clipboard_error = binding.value | 12 | el._v_clipboard_error = binding.value |
| 13 | } else { | 13 | } else { |
| 14 | const clipboard = new Clipboard(el, { | 14 | const clipboard = new Clipboard(el, { |
| 15 | - text() { return binding.value }, | ||
| 16 | - action() { return binding.arg === 'cut' ? 'cut' : 'copy' } | 15 | + text() { |
| 16 | + return binding.value | ||
| 17 | + }, | ||
| 18 | + action() { | ||
| 19 | + return binding.arg === 'cut' ? 'cut' : 'copy' | ||
| 20 | + } | ||
| 17 | }) | 21 | }) |
| 18 | clipboard.on('success', e => { | 22 | clipboard.on('success', e => { |
| 19 | const callback = el._v_clipboard_success | 23 | const callback = el._v_clipboard_success |
| @@ -32,8 +36,12 @@ export default { | @@ -32,8 +36,12 @@ export default { | ||
| 32 | } else if (binding.arg === 'error') { | 36 | } else if (binding.arg === 'error') { |
| 33 | el._v_clipboard_error = binding.value | 37 | el._v_clipboard_error = binding.value |
| 34 | } else { | 38 | } else { |
| 35 | - el._v_clipboard.text = function() { return binding.value } | ||
| 36 | - el._v_clipboard.action = function() { return binding.arg === 'cut' ? 'cut' : 'copy' } | 39 | + el._v_clipboard.text = function () { |
| 40 | + return binding.value | ||
| 41 | + } | ||
| 42 | + el._v_clipboard.action = function () { | ||
| 43 | + return binding.arg === 'cut' ? 'cut' : 'copy' | ||
| 44 | + } | ||
| 37 | } | 45 | } |
| 38 | }, | 46 | }, |
| 39 | unbind(el, binding) { | 47 | unbind(el, binding) { |
| 1 | -export default{ | 1 | +export default { |
| 2 | bind(el, binding, vnode) { | 2 | bind(el, binding, vnode) { |
| 3 | const dialogHeaderEl = el.querySelector('.el-dialog__header') | 3 | const dialogHeaderEl = el.querySelector('.el-dialog__header') |
| 4 | const dragDom = el.querySelector('.el-dialog') | 4 | const dragDom = el.querySelector('.el-dialog') |
| @@ -6,7 +6,7 @@ export default{ | @@ -6,7 +6,7 @@ export default{ | ||
| 6 | dragDom.style.cssText += ';top:0px;' | 6 | dragDom.style.cssText += ';top:0px;' |
| 7 | 7 | ||
| 8 | // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null); | 8 | // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null); |
| 9 | - const getStyle = (function() { | 9 | + const getStyle = (function () { |
| 10 | if (window.document.currentStyle) { | 10 | if (window.document.currentStyle) { |
| 11 | return (dom, attr) => dom.currentStyle[attr] | 11 | return (dom, attr) => dom.currentStyle[attr] |
| 12 | } else { | 12 | } else { |
| @@ -43,7 +43,7 @@ export default{ | @@ -43,7 +43,7 @@ export default{ | ||
| 43 | styT = +styT.replace(/\px/g, '') | 43 | styT = +styT.replace(/\px/g, '') |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | - document.onmousemove = function(e) { | 46 | + document.onmousemove = function (e) { |
| 47 | // 通过事件委托,计算移动的距离 | 47 | // 通过事件委托,计算移动的距离 |
| 48 | let left = e.clientX - disX | 48 | let left = e.clientX - disX |
| 49 | let top = e.clientY - disY | 49 | let top = e.clientY - disY |
| @@ -68,7 +68,7 @@ export default{ | @@ -68,7 +68,7 @@ export default{ | ||
| 68 | vnode.child.$emit('dragDialog') | 68 | vnode.child.$emit('dragDialog') |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | - document.onmouseup = function(e) { | 71 | + document.onmouseup = function (e) { |
| 72 | document.onmousemove = null | 72 | document.onmousemove = null |
| 73 | document.onmouseup = null | 73 | document.onmouseup = null |
| 74 | } | 74 | } |
| 1 | - | ||
| 2 | import store from '@/store' | 1 | import store from '@/store' |
| 3 | 2 | ||
| 4 | -export default{ | 3 | +export default { |
| 5 | inserted(el, binding, vnode) { | 4 | inserted(el, binding, vnode) { |
| 6 | - const { value } = binding | 5 | + const {value} = binding |
| 7 | const roles = store.getters && store.getters.roles | 6 | const roles = store.getters && store.getters.roles |
| 8 | 7 | ||
| 9 | if (value && value instanceof Array && value.length > 0) { | 8 | if (value && value instanceof Array && value.length > 0) { |
| 1 | import './waves.css' | 1 | import './waves.css' |
| 2 | 2 | ||
| 3 | -export default{ | 3 | +export default { |
| 4 | bind(el, binding) { | 4 | bind(el, binding) { |
| 5 | el.addEventListener('click', e => { | 5 | el.addEventListener('click', e => { |
| 6 | const customOpts = Object.assign({}, binding.value) | 6 | const customOpts = Object.assign({}, binding.value) |
| 1 | - | ||
| 2 | import Vue from 'vue' | 1 | import Vue from 'vue' |
| 3 | import App from './App' | 2 | import App from './App' |
| 4 | import 'element-ui/lib/theme-chalk/index.css' | 3 | import 'element-ui/lib/theme-chalk/index.css' |
| @@ -15,13 +14,14 @@ import ElementUI from 'element-ui' | @@ -15,13 +14,14 @@ import ElementUI from 'element-ui' | ||
| 15 | import $ from 'jquery' | 14 | import $ from 'jquery' |
| 16 | 15 | ||
| 17 | //定义一个全局过滤器实现日期格式化 | 16 | //定义一个全局过滤器实现日期格式化 |
| 18 | -Vue.filter('datefmt',function(input,fmtstring){ | 17 | +Vue.filter('datefmt', function (input, fmtstring) { |
| 19 | 18 | ||
| 20 | return moment(input).format(fmtstring) | 19 | return moment(input).format(fmtstring) |
| 21 | 20 | ||
| 22 | }); | 21 | }); |
| 23 | 22 | ||
| 24 | import * as socketApi from './api/socket' | 23 | import * as socketApi from './api/socket' |
| 24 | + | ||
| 25 | Vue.prototype.socketApi = socketApi | 25 | Vue.prototype.socketApi = socketApi |
| 26 | 26 | ||
| 27 | Vue.config.productionTip = false | 27 | Vue.config.productionTip = false |
| @@ -35,9 +35,9 @@ Vue.prototype.$axios = axios; | @@ -35,9 +35,9 @@ Vue.prototype.$axios = axios; | ||
| 35 | console.log("mainjs:"); | 35 | console.log("mainjs:"); |
| 36 | console.log(rout.routes); | 36 | console.log(rout.routes); |
| 37 | const router = new VueRouter({ | 37 | const router = new VueRouter({ |
| 38 | - routes:rout.routes | 38 | + routes: rout.routes |
| 39 | }); | 39 | }); |
| 40 | -Vue.prototype.$rout =router; | 40 | +Vue.prototype.$rout = router; |
| 41 | 41 | ||
| 42 | //本地存储系统初始化的router路由,用来处理用户退出后,把路由数据初始化 | 42 | //本地存储系统初始化的router路由,用来处理用户退出后,把路由数据初始化 |
| 43 | sessionStorage.setItem('sysMenu', JSON.stringify(rout.routes)); | 43 | sessionStorage.setItem('sysMenu', JSON.stringify(rout.routes)); |
| @@ -50,11 +50,11 @@ router.beforeEach((to, from, next) => { | @@ -50,11 +50,11 @@ router.beforeEach((to, from, next) => { | ||
| 50 | sessionStorage.removeItem('token'); | 50 | sessionStorage.removeItem('token'); |
| 51 | } | 51 | } |
| 52 | let user = JSON.parse(sessionStorage.getItem('user')); | 52 | let user = JSON.parse(sessionStorage.getItem('user')); |
| 53 | - if(sessionStorage.getItem('token')){ | 53 | + if (sessionStorage.getItem('token')) { |
| 54 | axios.defaults.headers.common['Authorization'] = sessionStorage.getItem('token'); | 54 | axios.defaults.headers.common['Authorization'] = sessionStorage.getItem('token'); |
| 55 | } | 55 | } |
| 56 | if (!user && to.path != '/login' && !sessionStorage.getItem('menu') && !sessionStorage.getItem('token')) { | 56 | if (!user && to.path != '/login' && !sessionStorage.getItem('menu') && !sessionStorage.getItem('token')) { |
| 57 | - next({ path: '/login' }) | 57 | + next({path: '/login'}) |
| 58 | } else { | 58 | } else { |
| 59 | next() | 59 | next() |
| 60 | } | 60 | } |
| @@ -65,7 +65,7 @@ axios.defaults.baseURL = '/api'; | @@ -65,7 +65,7 @@ axios.defaults.baseURL = '/api'; | ||
| 65 | axios.interceptors.response.use( | 65 | axios.interceptors.response.use( |
| 66 | res => { | 66 | res => { |
| 67 | //对响应数据做些事 | 67 | //对响应数据做些事 |
| 68 | - if (res.data && res.status!==200) { | 68 | + if (res.data && res.status !== 200) { |
| 69 | message({ | 69 | message({ |
| 70 | // 饿了么的消息弹窗组件,类似toast | 70 | // 饿了么的消息弹窗组件,类似toast |
| 71 | showClose: true, | 71 | showClose: true, |
| 1 | import Mock from 'mockjs'; | 1 | import Mock from 'mockjs'; |
| 2 | + | ||
| 2 | const LoginUsers = [ | 3 | const LoginUsers = [ |
| 3 | { | 4 | { |
| 4 | id: 1, | 5 | id: 1, |
| @@ -22,4 +23,4 @@ for (let i = 0; i < 86; i++) { | @@ -22,4 +23,4 @@ for (let i = 0; i < 86; i++) { | ||
| 22 | })); | 23 | })); |
| 23 | } | 24 | } |
| 24 | 25 | ||
| 25 | -export { LoginUsers, Users }; | 26 | +export {LoginUsers, Users}; |
| 1 | import axios from 'axios'; | 1 | import axios from 'axios'; |
| 2 | import MockAdapter from 'axios-mock-adapter'; | 2 | import MockAdapter from 'axios-mock-adapter'; |
| 3 | -import { LoginUsers, Users } from './data/user'; | 3 | +import {LoginUsers, Users} from './data/user'; |
| 4 | + | ||
| 4 | let _Users = Users; | 5 | let _Users = Users; |
| 5 | 6 | ||
| 6 | export default { | 7 | export default { |
| @@ -35,9 +36,9 @@ export default { | @@ -35,9 +36,9 @@ export default { | ||
| 35 | }); | 36 | }); |
| 36 | 37 | ||
| 37 | if (hasUser) { | 38 | if (hasUser) { |
| 38 | - resolve([200, { code: 200, msg: '请求成功', user }]); | 39 | + resolve([200, {code: 200, msg: '请求成功', user}]); |
| 39 | } else { | 40 | } else { |
| 40 | - resolve([200, { code: 500, msg: '账号或密码错误' }]); | 41 | + resolve([200, {code: 500, msg: '账号或密码错误'}]); |
| 41 | } | 42 | } |
| 42 | }, 1000); | 43 | }, 1000); |
| 43 | }); | 44 | }); |
| @@ -80,7 +81,7 @@ export default { | @@ -80,7 +81,7 @@ export default { | ||
| 80 | 81 | ||
| 81 | //删除用户 | 82 | //删除用户 |
| 82 | mock.onGet('/user/remove').reply(config => { | 83 | mock.onGet('/user/remove').reply(config => { |
| 83 | - let { id } = config.params; | 84 | + let {id} = config.params; |
| 84 | _Users = _Users.filter(u => u.id !== id); | 85 | _Users = _Users.filter(u => u.id !== id); |
| 85 | return new Promise((resolve, reject) => { | 86 | return new Promise((resolve, reject) => { |
| 86 | setTimeout(() => { | 87 | setTimeout(() => { |
| @@ -94,7 +95,7 @@ export default { | @@ -94,7 +95,7 @@ export default { | ||
| 94 | 95 | ||
| 95 | //批量删除用户 | 96 | //批量删除用户 |
| 96 | mock.onGet('/user/batchremove').reply(config => { | 97 | mock.onGet('/user/batchremove').reply(config => { |
| 97 | - let { ids } = config.params; | 98 | + let {ids} = config.params; |
| 98 | ids = ids.split(','); | 99 | ids = ids.split(','); |
| 99 | _Users = _Users.filter(u => !ids.includes(u.id)); | 100 | _Users = _Users.filter(u => !ids.includes(u.id)); |
| 100 | return new Promise((resolve, reject) => { | 101 | return new Promise((resolve, reject) => { |
| @@ -109,7 +110,7 @@ export default { | @@ -109,7 +110,7 @@ export default { | ||
| 109 | 110 | ||
| 110 | //编辑用户 | 111 | //编辑用户 |
| 111 | mock.onGet('/user/edit').reply(config => { | 112 | mock.onGet('/user/edit').reply(config => { |
| 112 | - let { id, name, addr, age, birth, sex } = config.params; | 113 | + let {id, name, addr, age, birth, sex} = config.params; |
| 113 | _Users.some(u => { | 114 | _Users.some(u => { |
| 114 | if (u.id === id) { | 115 | if (u.id === id) { |
| 115 | u.name = name; | 116 | u.name = name; |
| @@ -132,7 +133,7 @@ export default { | @@ -132,7 +133,7 @@ export default { | ||
| 132 | 133 | ||
| 133 | //新增用户 | 134 | //新增用户 |
| 134 | mock.onGet('/user/add').reply(config => { | 135 | mock.onGet('/user/add').reply(config => { |
| 135 | - let { name, addr, age, birth, sex } = config.params; | 136 | + let {name, addr, age, birth, sex} = config.params; |
| 136 | _Users.push({ | 137 | _Users.push({ |
| 137 | name: name, | 138 | name: name, |
| 138 | addr: addr, | 139 | addr: addr, |
| @@ -43,7 +43,7 @@ let routes = [ | @@ -43,7 +43,7 @@ let routes = [ | ||
| 43 | leaf: true, | 43 | leaf: true, |
| 44 | iconCls: 'el-icon-menu', | 44 | iconCls: 'el-icon-menu', |
| 45 | children: [ | 45 | children: [ |
| 46 | - { path: '/main', component: Main, name: '首页'}, | 46 | + {path: '/main', component: Main, name: '首页'}, |
| 47 | ] | 47 | ] |
| 48 | }, | 48 | }, |
| 49 | // { path: '/test', component: Main }, | 49 | // { path: '/test', component: Main }, |
| @@ -53,13 +53,13 @@ let routes = [ | @@ -53,13 +53,13 @@ let routes = [ | ||
| 53 | name: '系统设置', | 53 | name: '系统设置', |
| 54 | iconCls: 'el-icon-setting',//图标样式class | 54 | iconCls: 'el-icon-setting',//图标样式class |
| 55 | children: [ | 55 | children: [ |
| 56 | - { path: '/user', component: User, name: '用户管理' }, | ||
| 57 | - { path: '/role', component: Role, name: '组织机构' }, | ||
| 58 | - { path: '/perm', component: Perm, name: '权限管理' }, | ||
| 59 | - { path: '/log', component: LOG, name: '系统日志' }, | ||
| 60 | - { path: '/department', component: Department, name: '部门管理' }, | ||
| 61 | - { path: '/company', component: Company, name: '公司管理'}, | ||
| 62 | - { path: '/group', component: Group, name: '集团管理'} | 56 | + {path: '/user', component: User, name: '用户管理'}, |
| 57 | + {path: '/role', component: Role, name: '组织机构'}, | ||
| 58 | + {path: '/perm', component: Perm, name: '权限管理'}, | ||
| 59 | + {path: '/log', component: LOG, name: '系统日志'}, | ||
| 60 | + {path: '/department', component: Department, name: '部门管理'}, | ||
| 61 | + {path: '/company', component: Company, name: '公司管理'}, | ||
| 62 | + {path: '/group', component: Group, name: '集团管理'} | ||
| 63 | ] | 63 | ] |
| 64 | }, | 64 | }, |
| 65 | { | 65 | { |
| @@ -68,8 +68,8 @@ let routes = [ | @@ -68,8 +68,8 @@ let routes = [ | ||
| 68 | name: '客服系统', | 68 | name: '客服系统', |
| 69 | iconCls: 'fa fa-id-card-o', | 69 | iconCls: 'fa fa-id-card-o', |
| 70 | children: [ | 70 | children: [ |
| 71 | - { path: '/process', component: Process, name: '工单管理' }, | ||
| 72 | - { path: '/job', component: Job, name: '任务管理' } | 71 | + {path: '/process', component: Process, name: '工单管理'}, |
| 72 | + {path: '/job', component: Job, name: '任务管理'} | ||
| 73 | ] | 73 | ] |
| 74 | }, | 74 | }, |
| 75 | { | 75 | { |
| @@ -78,11 +78,11 @@ let routes = [ | @@ -78,11 +78,11 @@ let routes = [ | ||
| 78 | name: '能源管理', | 78 | name: '能源管理', |
| 79 | iconCls: 'fa fa-id-card-o', | 79 | iconCls: 'fa fa-id-card-o', |
| 80 | children: [ | 80 | children: [ |
| 81 | - { path: '/location', component: Location, name: '公寓管理' }, | ||
| 82 | - { path: '/PayOrder', component: PayOrder, name: '缴水电费订单' }, | ||
| 83 | - { path: '/userPayOrder', component: userPayOrder, name: '用户水电缴费' }, | ||
| 84 | - { path: '/QueryOrder', component: QueryOrder, name: '订单查询' }, | ||
| 85 | - { path: '/eeInfo', component: eeInfo, name: '电表充值信息' }, | 81 | + {path: '/location', component: Location, name: '公寓管理'}, |
| 82 | + {path: '/PayOrder', component: PayOrder, name: '缴水电费订单'}, | ||
| 83 | + {path: '/userPayOrder', component: userPayOrder, name: '用户水电缴费'}, | ||
| 84 | + {path: '/QueryOrder', component: QueryOrder, name: '订单查询'}, | ||
| 85 | + {path: '/eeInfo', component: eeInfo, name: '电表充值信息'}, | ||
| 86 | ] | 86 | ] |
| 87 | }, | 87 | }, |
| 88 | { | 88 | { |
| @@ -91,9 +91,9 @@ let routes = [ | @@ -91,9 +91,9 @@ let routes = [ | ||
| 91 | name: '生活保障部门', | 91 | name: '生活保障部门', |
| 92 | iconCls: 'fa fa-id-card-o', | 92 | iconCls: 'fa fa-id-card-o', |
| 93 | children: [ | 93 | children: [ |
| 94 | - { path: '/security_inspection', component: SecrityInspection, name: '职工公寓安全巡视管理' }, | ||
| 95 | - { path: '/key', component: Key, name: '职工公寓备用钥匙使用登记管理' }, | ||
| 96 | - { path: '/maintain', component: Maintain, name: '职工公寓设施设备维修记录管理' }, | 94 | + {path: '/security_inspection', component: SecrityInspection, name: '职工公寓安全巡视管理'}, |
| 95 | + {path: '/key', component: Key, name: '职工公寓备用钥匙使用登记管理'}, | ||
| 96 | + {path: '/maintain', component: Maintain, name: '职工公寓设施设备维修记录管理'}, | ||
| 97 | ] | 97 | ] |
| 98 | }, | 98 | }, |
| 99 | { | 99 | { |
| @@ -103,7 +103,7 @@ let routes = [ | @@ -103,7 +103,7 @@ let routes = [ | ||
| 103 | iconCls: 'fa fa-address-card', | 103 | iconCls: 'fa fa-address-card', |
| 104 | leaf: true,//只有一个节点 | 104 | leaf: true,//只有一个节点 |
| 105 | children: [ | 105 | children: [ |
| 106 | - { path: '/page6', component: Page6, name: '导航三' } | 106 | + {path: '/page6', component: Page6, name: '导航三'} |
| 107 | ] | 107 | ] |
| 108 | }, | 108 | }, |
| 109 | { | 109 | { |
| @@ -112,13 +112,13 @@ let routes = [ | @@ -112,13 +112,13 @@ let routes = [ | ||
| 112 | name: 'Charts', | 112 | name: 'Charts', |
| 113 | iconCls: 'fa fa-bar-chart', | 113 | iconCls: 'fa fa-bar-chart', |
| 114 | children: [ | 114 | children: [ |
| 115 | - { path: '/echarts', component: echarts, name: 'echarts' } | 115 | + {path: '/echarts', component: echarts, name: 'echarts'} |
| 116 | ] | 116 | ] |
| 117 | }, | 117 | }, |
| 118 | { | 118 | { |
| 119 | path: '*', | 119 | path: '*', |
| 120 | hidden: true, | 120 | hidden: true, |
| 121 | - redirect: { path: '/404' } | 121 | + redirect: {path: '/404'} |
| 122 | } | 122 | } |
| 123 | ]; | 123 | ]; |
| 124 | let initRouters = routes.concat(); | 124 | let initRouters = routes.concat(); |
| @@ -129,7 +129,7 @@ let setUserMenus = function (list) { | @@ -129,7 +129,7 @@ let setUserMenus = function (list) { | ||
| 129 | * 处理登陆后的账号对应的菜单 | 129 | * 处理登陆后的账号对应的菜单 |
| 130 | * @param menuList | 130 | * @param menuList |
| 131 | */ | 131 | */ |
| 132 | -let handleMenuList = function (router,menu) { | 132 | +let handleMenuList = function (router, menu) { |
| 133 | var _self = this; | 133 | var _self = this; |
| 134 | var routerName = ""; | 134 | var routerName = ""; |
| 135 | router.forEach(function (v_router) { | 135 | router.forEach(function (v_router) { |
| @@ -142,16 +142,16 @@ let handleMenuList = function (router,menu) { | @@ -142,16 +142,16 @@ let handleMenuList = function (router,menu) { | ||
| 142 | 142 | ||
| 143 | //匹配到继续判断是否子元素,有子元素继续递归 | 143 | //匹配到继续判断是否子元素,有子元素继续递归 |
| 144 | if (result) { | 144 | if (result) { |
| 145 | - if(v_router.children) { | ||
| 146 | - _self.handleMenuList(v_router.children,result.children); | 145 | + if (v_router.children) { |
| 146 | + _self.handleMenuList(v_router.children, result.children); | ||
| 147 | } | 147 | } |
| 148 | //没有则可以移除 | 148 | //没有则可以移除 |
| 149 | - }else { | ||
| 150 | - router.splice(router.findIndex(itm => itm.name === routerName ),1); | 149 | + } else { |
| 150 | + router.splice(router.findIndex(itm => itm.name === routerName), 1); | ||
| 151 | } | 151 | } |
| 152 | }) | 152 | }) |
| 153 | }); | 153 | }); |
| 154 | } | 154 | } |
| 155 | export default { | 155 | export default { |
| 156 | - routes,setUserMenus,handleMenuList,initRouters | 156 | + routes, setUserMenus, handleMenuList, initRouters |
| 157 | }; | 157 | }; |
| @@ -38,19 +38,19 @@ const app = { | @@ -38,19 +38,19 @@ const app = { | ||
| 38 | } | 38 | } |
| 39 | }, | 39 | }, |
| 40 | actions: { | 40 | actions: { |
| 41 | - toggleSideBar({ commit }) { | 41 | + toggleSideBar({commit}) { |
| 42 | commit('TOGGLE_SIDEBAR') | 42 | commit('TOGGLE_SIDEBAR') |
| 43 | }, | 43 | }, |
| 44 | - closeSideBar({ commit }, { withoutAnimation }) { | 44 | + closeSideBar({commit}, {withoutAnimation}) { |
| 45 | commit('CLOSE_SIDEBAR', withoutAnimation) | 45 | commit('CLOSE_SIDEBAR', withoutAnimation) |
| 46 | }, | 46 | }, |
| 47 | - toggleDevice({ commit }, device) { | 47 | + toggleDevice({commit}, device) { |
| 48 | commit('TOGGLE_DEVICE', device) | 48 | commit('TOGGLE_DEVICE', device) |
| 49 | }, | 49 | }, |
| 50 | - setLanguage({ commit }, language) { | 50 | + setLanguage({commit}, language) { |
| 51 | commit('SET_LANGUAGE', language) | 51 | commit('SET_LANGUAGE', language) |
| 52 | }, | 52 | }, |
| 53 | - setSize({ commit }, size) { | 53 | + setSize({commit}, size) { |
| 54 | commit('SET_SIZE', size) | 54 | commit('SET_SIZE', size) |
| 55 | } | 55 | } |
| 56 | } | 56 | } |
| 1 | -import { asyncRouterMap, constantRouterMap } from '@/router' | 1 | +import {asyncRouterMap, constantRouterMap} from '@/router' |
| 2 | 2 | ||
| 3 | /** | 3 | /** |
| 4 | * 通过meta.role判断是否与当前用户权限匹配 | 4 | * 通过meta.role判断是否与当前用户权限匹配 |
| @@ -22,7 +22,7 @@ function filterAsyncRouter(routes, roles) { | @@ -22,7 +22,7 @@ function filterAsyncRouter(routes, roles) { | ||
| 22 | const res = [] | 22 | const res = [] |
| 23 | 23 | ||
| 24 | routes.forEach(route => { | 24 | routes.forEach(route => { |
| 25 | - const tmp = { ...route } | 25 | + const tmp = {...route} |
| 26 | if (hasPermission(roles, tmp)) { | 26 | if (hasPermission(roles, tmp)) { |
| 27 | if (tmp.children) { | 27 | if (tmp.children) { |
| 28 | tmp.children = filterAsyncRouter(tmp.children, roles) | 28 | tmp.children = filterAsyncRouter(tmp.children, roles) |
| @@ -46,9 +46,9 @@ const permission = { | @@ -46,9 +46,9 @@ const permission = { | ||
| 46 | } | 46 | } |
| 47 | }, | 47 | }, |
| 48 | actions: { | 48 | actions: { |
| 49 | - GenerateRoutes({ commit }, data) { | 49 | + GenerateRoutes({commit}, data) { |
| 50 | return new Promise(resolve => { | 50 | return new Promise(resolve => { |
| 51 | - const { roles } = data | 51 | + const {roles} = data |
| 52 | let accessedRouters | 52 | let accessedRouters |
| 53 | if (roles.includes('admin')) { | 53 | if (roles.includes('admin')) { |
| 54 | accessedRouters = asyncRouterMap | 54 | accessedRouters = asyncRouterMap |
| @@ -72,18 +72,18 @@ const tagsView = { | @@ -72,18 +72,18 @@ const tagsView = { | ||
| 72 | 72 | ||
| 73 | }, | 73 | }, |
| 74 | actions: { | 74 | actions: { |
| 75 | - addView({ dispatch }, view) { | 75 | + addView({dispatch}, view) { |
| 76 | dispatch('addVisitedView', view) | 76 | dispatch('addVisitedView', view) |
| 77 | dispatch('addCachedView', view) | 77 | dispatch('addCachedView', view) |
| 78 | }, | 78 | }, |
| 79 | - addVisitedView({ commit }, view) { | 79 | + addVisitedView({commit}, view) { |
| 80 | commit('ADD_VISITED_VIEW', view) | 80 | commit('ADD_VISITED_VIEW', view) |
| 81 | }, | 81 | }, |
| 82 | - addCachedView({ commit }, view) { | 82 | + addCachedView({commit}, view) { |
| 83 | commit('ADD_CACHED_VIEW', view) | 83 | commit('ADD_CACHED_VIEW', view) |
| 84 | }, | 84 | }, |
| 85 | 85 | ||
| 86 | - delView({ dispatch, state }, view) { | 86 | + delView({dispatch, state}, view) { |
| 87 | return new Promise(resolve => { | 87 | return new Promise(resolve => { |
| 88 | dispatch('delVisitedView', view) | 88 | dispatch('delVisitedView', view) |
| 89 | dispatch('delCachedView', view) | 89 | dispatch('delCachedView', view) |
| @@ -93,20 +93,20 @@ const tagsView = { | @@ -93,20 +93,20 @@ const tagsView = { | ||
| 93 | }) | 93 | }) |
| 94 | }) | 94 | }) |
| 95 | }, | 95 | }, |
| 96 | - delVisitedView({ commit, state }, view) { | 96 | + delVisitedView({commit, state}, view) { |
| 97 | return new Promise(resolve => { | 97 | return new Promise(resolve => { |
| 98 | commit('DEL_VISITED_VIEW', view) | 98 | commit('DEL_VISITED_VIEW', view) |
| 99 | resolve([...state.visitedViews]) | 99 | resolve([...state.visitedViews]) |
| 100 | }) | 100 | }) |
| 101 | }, | 101 | }, |
| 102 | - delCachedView({ commit, state }, view) { | 102 | + delCachedView({commit, state}, view) { |
| 103 | return new Promise(resolve => { | 103 | return new Promise(resolve => { |
| 104 | commit('DEL_CACHED_VIEW', view) | 104 | commit('DEL_CACHED_VIEW', view) |
| 105 | resolve([...state.cachedViews]) | 105 | resolve([...state.cachedViews]) |
| 106 | }) | 106 | }) |
| 107 | }, | 107 | }, |
| 108 | 108 | ||
| 109 | - delOthersViews({ dispatch, state }, view) { | 109 | + delOthersViews({dispatch, state}, view) { |
| 110 | return new Promise(resolve => { | 110 | return new Promise(resolve => { |
| 111 | dispatch('delOthersVisitedViews', view) | 111 | dispatch('delOthersVisitedViews', view) |
| 112 | dispatch('delOthersCachedViews', view) | 112 | dispatch('delOthersCachedViews', view) |
| @@ -116,20 +116,20 @@ const tagsView = { | @@ -116,20 +116,20 @@ const tagsView = { | ||
| 116 | }) | 116 | }) |
| 117 | }) | 117 | }) |
| 118 | }, | 118 | }, |
| 119 | - delOthersVisitedViews({ commit, state }, view) { | 119 | + delOthersVisitedViews({commit, state}, view) { |
| 120 | return new Promise(resolve => { | 120 | return new Promise(resolve => { |
| 121 | commit('DEL_OTHERS_VISITED_VIEWS', view) | 121 | commit('DEL_OTHERS_VISITED_VIEWS', view) |
| 122 | resolve([...state.visitedViews]) | 122 | resolve([...state.visitedViews]) |
| 123 | }) | 123 | }) |
| 124 | }, | 124 | }, |
| 125 | - delOthersCachedViews({ commit, state }, view) { | 125 | + delOthersCachedViews({commit, state}, view) { |
| 126 | return new Promise(resolve => { | 126 | return new Promise(resolve => { |
| 127 | commit('DEL_OTHERS_CACHED_VIEWS', view) | 127 | commit('DEL_OTHERS_CACHED_VIEWS', view) |
| 128 | resolve([...state.cachedViews]) | 128 | resolve([...state.cachedViews]) |
| 129 | }) | 129 | }) |
| 130 | }, | 130 | }, |
| 131 | 131 | ||
| 132 | - delAllViews({ dispatch, state }, view) { | 132 | + delAllViews({dispatch, state}, view) { |
| 133 | return new Promise(resolve => { | 133 | return new Promise(resolve => { |
| 134 | dispatch('delAllVisitedViews', view) | 134 | dispatch('delAllVisitedViews', view) |
| 135 | dispatch('delAllCachedViews', view) | 135 | dispatch('delAllCachedViews', view) |
| @@ -139,20 +139,20 @@ const tagsView = { | @@ -139,20 +139,20 @@ const tagsView = { | ||
| 139 | }) | 139 | }) |
| 140 | }) | 140 | }) |
| 141 | }, | 141 | }, |
| 142 | - delAllVisitedViews({ commit, state }) { | 142 | + delAllVisitedViews({commit, state}) { |
| 143 | return new Promise(resolve => { | 143 | return new Promise(resolve => { |
| 144 | commit('DEL_ALL_VISITED_VIEWS') | 144 | commit('DEL_ALL_VISITED_VIEWS') |
| 145 | resolve([...state.visitedViews]) | 145 | resolve([...state.visitedViews]) |
| 146 | }) | 146 | }) |
| 147 | }, | 147 | }, |
| 148 | - delAllCachedViews({ commit, state }) { | 148 | + delAllCachedViews({commit, state}) { |
| 149 | return new Promise(resolve => { | 149 | return new Promise(resolve => { |
| 150 | commit('DEL_ALL_CACHED_VIEWS') | 150 | commit('DEL_ALL_CACHED_VIEWS') |
| 151 | resolve([...state.cachedViews]) | 151 | resolve([...state.cachedViews]) |
| 152 | }) | 152 | }) |
| 153 | }, | 153 | }, |
| 154 | 154 | ||
| 155 | - updateVisitedView({ commit }, view) { | 155 | + updateVisitedView({commit}, view) { |
| 156 | commit('UPDATE_VISITED_VIEW', view) | 156 | commit('UPDATE_VISITED_VIEW', view) |
| 157 | } | 157 | } |
| 158 | } | 158 | } |
| 1 | -import { loginByUsername, logout, getUserInfo } from '@/api/login' | ||
| 2 | -import { getToken, setToken, removeToken } from '@/utils/auth' | 1 | +import {loginByUsername, logout, getUserInfo} from '@/api/login' |
| 2 | +import {getToken, setToken, removeToken} from '@/utils/auth' | ||
| 3 | 3 | ||
| 4 | const user = { | 4 | const user = { |
| 5 | state: { | 5 | state: { |
| @@ -45,7 +45,7 @@ const user = { | @@ -45,7 +45,7 @@ const user = { | ||
| 45 | 45 | ||
| 46 | actions: { | 46 | actions: { |
| 47 | // 用户名登录 | 47 | // 用户名登录 |
| 48 | - LoginByUsername({ commit }, userInfo) { | 48 | + LoginByUsername({commit}, userInfo) { |
| 49 | const username = userInfo.username.trim() | 49 | const username = userInfo.username.trim() |
| 50 | return new Promise((resolve, reject) => { | 50 | return new Promise((resolve, reject) => { |
| 51 | loginByUsername(username, userInfo.password).then(response => { | 51 | loginByUsername(username, userInfo.password).then(response => { |
| @@ -60,7 +60,7 @@ const user = { | @@ -60,7 +60,7 @@ const user = { | ||
| 60 | }, | 60 | }, |
| 61 | 61 | ||
| 62 | // 获取用户信息 | 62 | // 获取用户信息 |
| 63 | - GetUserInfo({ commit, state }) { | 63 | + GetUserInfo({commit, state}) { |
| 64 | return new Promise((resolve, reject) => { | 64 | return new Promise((resolve, reject) => { |
| 65 | getUserInfo(state.token).then(response => { | 65 | getUserInfo(state.token).then(response => { |
| 66 | // 由于mockjs 不支持自定义状态码只能这样hack | 66 | // 由于mockjs 不支持自定义状态码只能这样hack |
| @@ -100,7 +100,7 @@ const user = { | @@ -100,7 +100,7 @@ const user = { | ||
| 100 | // }, | 100 | // }, |
| 101 | 101 | ||
| 102 | // 登出 | 102 | // 登出 |
| 103 | - LogOut({ commit, state }) { | 103 | + LogOut({commit, state}) { |
| 104 | return new Promise((resolve, reject) => { | 104 | return new Promise((resolve, reject) => { |
| 105 | logout(state.token).then(() => { | 105 | logout(state.token).then(() => { |
| 106 | commit('SET_TOKEN', '') | 106 | commit('SET_TOKEN', '') |
| @@ -114,7 +114,7 @@ const user = { | @@ -114,7 +114,7 @@ const user = { | ||
| 114 | }, | 114 | }, |
| 115 | 115 | ||
| 116 | // 前端 登出 | 116 | // 前端 登出 |
| 117 | - FedLogOut({ commit }) { | 117 | + FedLogOut({commit}) { |
| 118 | return new Promise(resolve => { | 118 | return new Promise(resolve => { |
| 119 | commit('SET_TOKEN', '') | 119 | commit('SET_TOKEN', '') |
| 120 | removeToken() | 120 | removeToken() |
| @@ -123,7 +123,7 @@ const user = { | @@ -123,7 +123,7 @@ const user = { | ||
| 123 | }, | 123 | }, |
| 124 | 124 | ||
| 125 | // 动态修改权限 | 125 | // 动态修改权限 |
| 126 | - ChangeRoles({ commit, dispatch }, role) { | 126 | + ChangeRoles({commit, dispatch}, role) { |
| 127 | return new Promise(resolve => { | 127 | return new Promise(resolve => { |
| 128 | commit('SET_TOKEN', role) | 128 | commit('SET_TOKEN', role) |
| 129 | setToken(role) | 129 | setToken(role) |
| 1 | /** | 1 | /** |
| 2 | -* @Author: jianglei | ||
| 3 | -* @Date: 2017-10-12 12:06:49 | ||
| 4 | -*/ | 2 | + * @Author: jianglei |
| 3 | + * @Date: 2017-10-12 12:06:49 | ||
| 4 | + */ | ||
| 5 | 'use strict' | 5 | 'use strict' |
| 6 | import Vue from 'vue' | 6 | import Vue from 'vue' |
| 7 | + | ||
| 7 | export default function treeToArray(data, expandAll, parent, level, item) { | 8 | export default function treeToArray(data, expandAll, parent, level, item) { |
| 8 | const marLTemp = [] | 9 | const marLTemp = [] |
| 9 | let tmp = [] | 10 | let tmp = [] |
| 10 | - Array.from(data).forEach(function(record) { | 11 | + Array.from(data).forEach(function (record) { |
| 11 | if (record._expanded === undefined) { | 12 | if (record._expanded === undefined) { |
| 12 | Vue.set(record, '_expanded', expandAll) | 13 | Vue.set(record, '_expanded', expandAll) |
| 13 | } | 14 | } |
| 1 | const dangerGoods = [ | 1 | const dangerGoods = [ |
| 2 | - { value: 'RFX', label: '禁燃物' }, | 2 | + {value: 'RFX', label: '禁燃物'}, |
| 3 | 3 | ||
| 4 | - { value: 'EXP', label: '快件' }, | 4 | + {value: 'EXP', label: '快件'}, |
| 5 | 5 | ||
| 6 | - { value: 'FRO', label: '冷藏货物' }, | 6 | + {value: 'FRO', label: '冷藏货物'}, |
| 7 | 7 | ||
| 8 | - { value: 'ELI', label: '锂电池' }, | 8 | + {value: 'ELI', label: '锂电池'}, |
| 9 | 9 | ||
| 10 | - { value: 'ELM', label: '锂金属电池' }, | 10 | + {value: 'ELM', label: '锂金属电池'}, |
| 11 | 11 | ||
| 12 | - { value: 'WET', label: '没有密水包装的湿' }, | 12 | + {value: 'WET', label: '没有密水包装的湿'}, |
| 13 | 13 | ||
| 14 | - { value: 'LHO', label: '人体器官血液' }, | 14 | + {value: 'LHO', label: '人体器官血液'}, |
| 15 | 15 | ||
| 16 | - { value: 'PEM', label: '肉类' }, | 16 | + {value: 'PEM', label: '肉类'}, |
| 17 | 17 | ||
| 18 | - { value: 'HUM', label: '尸体' }, | 18 | + {value: 'HUM', label: '尸体'}, |
| 19 | 19 | ||
| 20 | - { value: 'SPF', label: '实验动物' }, | 20 | + {value: 'SPF', label: '实验动物'}, |
| 21 | 21 | ||
| 22 | - { value: 'EAT', label: '食品' }, | 22 | + {value: 'EAT', label: '食品'}, |
| 23 | 23 | ||
| 24 | - { value: 'PEA', label: '兽皮等皮制品' }, | 24 | + {value: 'PEA', label: '兽皮等皮制品'}, |
| 25 | 25 | ||
| 26 | - { value: 'PEP', label: '水果蔬菜' }, | 26 | + {value: 'PEP', label: '水果蔬菜'}, |
| 27 | 27 | ||
| 28 | - { value: 'DIP', label: '外交邮袋' }, | 28 | + {value: 'DIP', label: '外交邮袋'}, |
| 29 | 29 | ||
| 30 | - { value: 'DGR', label: '危险品' }, | 30 | + {value: 'DGR', label: '危险品'}, |
| 31 | 31 | ||
| 32 | - { value: 'PEF', label: '鲜花' }, | 32 | + {value: 'PEF', label: '鲜花'}, |
| 33 | 33 | ||
| 34 | - { value: 'PER', label: '鲜活易腐物品' }, | 34 | + {value: 'PER', label: '鲜活易腐物品'}, |
| 35 | 35 | ||
| 36 | - { value: 'XPS', label: '小件货物' }, | 36 | + {value: 'XPS', label: '小件货物'}, |
| 37 | 37 | ||
| 38 | - { value: 'PIL', label: '药品' }, | 38 | + {value: 'PIL', label: '药品'}, |
| 39 | 39 | ||
| 40 | - { value: 'FRI', label: '用于动植物检疫的' }, | 40 | + {value: 'FRI', label: '用于动植物检疫的'}, |
| 41 | 41 | ||
| 42 | - { value: 'MAL', label: '邮件' }, | 42 | + {value: 'MAL', label: '邮件'}, |
| 43 | 43 | ||
| 44 | - { value: 'ECM', label: '邮件' } | 44 | + {value: 'ECM', label: '邮件'} |
| 45 | 45 | ||
| 46 | ] | 46 | ] |
| 47 | export default dangerGoods | 47 | export default dangerGoods |
| 1 | const goodsPackage = [ | 1 | const goodsPackage = [ |
| 2 | - { value: '1', label: '纸箱' }, | 2 | + {value: '1', label: '纸箱'}, |
| 3 | 3 | ||
| 4 | - { value: '2', label: '木箱' }, | 4 | + {value: '2', label: '木箱'}, |
| 5 | 5 | ||
| 6 | - { value: '3', label: '桶装' }, | 6 | + {value: '3', label: '桶装'}, |
| 7 | 7 | ||
| 8 | - { value: '4', label: '纸托' }, | 8 | + {value: '4', label: '纸托'}, |
| 9 | 9 | ||
| 10 | - { value: '5', label: '木托' }, | 10 | + {value: '5', label: '木托'}, |
| 11 | 11 | ||
| 12 | - { value: '6', label: '塑料箱' }, | 12 | + {value: '6', label: '塑料箱'}, |
| 13 | 13 | ||
| 14 | - { value: '7', label: '金属托' }, | 14 | + {value: '7', label: '金属托'}, |
| 15 | 15 | ||
| 16 | - { value: '8', label: '散装' }, | 16 | + {value: '8', label: '散装'}, |
| 17 | 17 | ||
| 18 | - { value: '9', label: '包' }, | 18 | + {value: '9', label: '包'}, |
| 19 | 19 | ||
| 20 | - { value: '10', label: '其他' } | 20 | + {value: '10', label: '其他'} |
| 21 | ] | 21 | ] |
| 22 | export default goodsPackage | 22 | export default goodsPackage |
| @@ -31,7 +31,9 @@ export function parseTime(time, cFormat) { | @@ -31,7 +31,9 @@ export function parseTime(time, cFormat) { | ||
| 31 | const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { | 31 | const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { |
| 32 | let value = formatObj[key] | 32 | let value = formatObj[key] |
| 33 | // Note: getDay() returns 0 on Sunday | 33 | // Note: getDay() returns 0 on Sunday |
| 34 | - if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] } | 34 | + if (key === 'a') { |
| 35 | + return ['日', '一', '二', '三', '四', '五', '六'][value] | ||
| 36 | + } | ||
| 35 | if (result.length > 0 && value < 10) { | 37 | if (result.length > 0 && value < 10) { |
| 36 | value = '0' + value | 38 | value = '0' + value |
| 37 | } | 39 | } |
| @@ -235,7 +237,7 @@ export function getTime(type) { | @@ -235,7 +237,7 @@ export function getTime(type) { | ||
| 235 | export function debounce(func, wait, immediate) { | 237 | export function debounce(func, wait, immediate) { |
| 236 | let timeout, args, context, timestamp, result | 238 | let timeout, args, context, timestamp, result |
| 237 | 239 | ||
| 238 | - const later = function() { | 240 | + const later = function () { |
| 239 | // 据上一次触发时间间隔 | 241 | // 据上一次触发时间间隔 |
| 240 | const last = +new Date() - timestamp | 242 | const last = +new Date() - timestamp |
| 241 | 243 | ||
| @@ -252,7 +254,7 @@ export function debounce(func, wait, immediate) { | @@ -252,7 +254,7 @@ export function debounce(func, wait, immediate) { | ||
| 252 | } | 254 | } |
| 253 | } | 255 | } |
| 254 | 256 | ||
| 255 | - return function(...args) { | 257 | + return function (...args) { |
| 256 | context = this | 258 | context = this |
| 257 | timestamp = +new Date() | 259 | timestamp = +new Date() |
| 258 | const callNow = immediate && !timeout | 260 | const callNow = immediate && !timeout |
| 1 | -Math.easeInOutQuad = function(t, b, c, d) { | 1 | +Math.easeInOutQuad = function (t, b, c, d) { |
| 2 | t /= d / 2 | 2 | t /= d / 2 |
| 3 | if (t < 1) { | 3 | if (t < 1) { |
| 4 | return c / 2 * t * t + b | 4 | return c / 2 * t * t + b |
| @@ -8,8 +8,10 @@ Math.easeInOutQuad = function(t, b, c, d) { | @@ -8,8 +8,10 @@ Math.easeInOutQuad = function(t, b, c, d) { | ||
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | // requestAnimationFrame for Smart Animating http://goo.gl/sx5sts | 10 | // requestAnimationFrame for Smart Animating http://goo.gl/sx5sts |
| 11 | -var requestAnimFrame = (function() { | ||
| 12 | - return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) } | 11 | +var requestAnimFrame = (function () { |
| 12 | + return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) { | ||
| 13 | + window.setTimeout(callback, 1000 / 60) | ||
| 14 | + } | ||
| 13 | })() | 15 | })() |
| 14 | 16 | ||
| 15 | // because it's so fucking difficult to detect the scrolling element, just move them all | 17 | // because it's so fucking difficult to detect the scrolling element, just move them all |
| @@ -29,7 +31,7 @@ export function scrollTo(to, duration, callback) { | @@ -29,7 +31,7 @@ export function scrollTo(to, duration, callback) { | ||
| 29 | const increment = 20 | 31 | const increment = 20 |
| 30 | let currentTime = 0 | 32 | let currentTime = 0 |
| 31 | duration = (typeof (duration) === 'undefined') ? 500 : duration | 33 | duration = (typeof (duration) === 'undefined') ? 500 : duration |
| 32 | - var animateScroll = function() { | 34 | + var animateScroll = function () { |
| 33 | // increment the time | 35 | // increment the time |
| 34 | currentTime += increment | 36 | currentTime += increment |
| 35 | // find the value with the quadratic in-out easing function | 37 | // find the value with the quadratic in-out easing function |
| @@ -38,7 +38,8 @@ function generateArray(table) { | @@ -38,7 +38,8 @@ function generateArray(table) { | ||
| 38 | c: outRow.length + colspan - 1 | 38 | c: outRow.length + colspan - 1 |
| 39 | } | 39 | } |
| 40 | }); | 40 | }); |
| 41 | - }; | 41 | + } |
| 42 | + ; | ||
| 42 | 43 | ||
| 43 | //Handle Value | 44 | //Handle Value |
| 44 | outRow.push(cellValue !== "" ? cellValue : null); | 45 | outRow.push(cellValue !== "" ? cellValue : null); |
| @@ -149,8 +150,8 @@ export function export_json_to_excel({ | @@ -149,8 +150,8 @@ export function export_json_to_excel({ | ||
| 149 | data, | 150 | data, |
| 150 | filename, | 151 | filename, |
| 151 | autoWidth = true, | 152 | autoWidth = true, |
| 152 | - bookType= 'xlsx' | ||
| 153 | -} = {}) { | 153 | + bookType = 'xlsx' |
| 154 | + } = {}) { | ||
| 154 | /* original data */ | 155 | /* original data */ |
| 155 | filename = filename || 'excel-list' | 156 | filename = filename || 'excel-list' |
| 156 | data = [...data] | 157 | data = [...data] |
| @@ -11,7 +11,8 @@ | @@ -11,7 +11,8 @@ | ||
| 11 | </el-col> | 11 | </el-col> |
| 12 | <el-col :span="4" class="userinfo"> | 12 | <el-col :span="4" class="userinfo"> |
| 13 | <el-dropdown trigger="hover"> | 13 | <el-dropdown trigger="hover"> |
| 14 | - <span class="el-dropdown-link userinfo-inner"><img :src="this.sysUserAvatar" /> {{sysUserName}}</span> | 14 | + <span class="el-dropdown-link userinfo-inner"><img |
| 15 | + :src="this.sysUserAvatar"/> {{sysUserName}}</span> | ||
| 15 | <el-dropdown-menu slot="dropdown"> | 16 | <el-dropdown-menu slot="dropdown"> |
| 16 | <el-dropdown-item>我的消息</el-dropdown-item> | 17 | <el-dropdown-item>我的消息</el-dropdown-item> |
| 17 | <el-dropdown-item @click.native="editPass">修改密码</el-dropdown-item> | 18 | <el-dropdown-item @click.native="editPass">修改密码</el-dropdown-item> |
| @@ -28,7 +29,8 @@ | @@ -28,7 +29,8 @@ | ||
| 28 | <span>{{sysUserName}}</span> | 29 | <span>{{sysUserName}}</span> |
| 29 | </el-form-item> | 30 | </el-form-item> |
| 30 | <el-form-item label="新密码" prop="newpwd"> | 31 | <el-form-item label="新密码" prop="newpwd"> |
| 31 | - <el-input type="password" v-model="resetForm.newpwd" autocomplete="off" placeholder="8-20位字符在数字、小写、大写字母以及特殊字符中四选三"></el-input> | 32 | + <el-input type="password" v-model="resetForm.newpwd" autocomplete="off" |
| 33 | + placeholder="8-20位字符在数字、小写、大写字母以及特殊字符中四选三"></el-input> | ||
| 32 | </el-form-item> | 34 | </el-form-item> |
| 33 | <el-form-item label="确认密码" prop="renewpwd"> | 35 | <el-form-item label="确认密码" prop="renewpwd"> |
| 34 | <el-input type="password" v-model="resetForm.renewpwd" auto-complete="off"></el-input> | 36 | <el-input type="password" v-model="resetForm.renewpwd" auto-complete="off"></el-input> |
| @@ -43,27 +45,42 @@ | @@ -43,27 +45,42 @@ | ||
| 43 | <el-col :span="24" class="main"> | 45 | <el-col :span="24" class="main"> |
| 44 | <aside :class="collapsed?'menu-collapsed':'menu-expanded'"> | 46 | <aside :class="collapsed?'menu-collapsed':'menu-expanded'"> |
| 45 | <!--导航菜单--> | 47 | <!--导航菜单--> |
| 46 | - <el-menu :default-active="$route.path" class="el-menu-vertical-demo" @open="handleopen" @close="handleclose" @select="handleselect" unique-opened router v-show="!collapsed" style="min-width: 230px"> | 48 | + <el-menu :default-active="$route.path" class="el-menu-vertical-demo" @open="handleopen" |
| 49 | + @close="handleclose" @select="handleselect" unique-opened router v-show="!collapsed" | ||
| 50 | + style="min-width: 230px"> | ||
| 47 | <template v-for="(item,index) in $router.options.routes" v-if="!item.hidden"> | 51 | <template v-for="(item,index) in $router.options.routes" v-if="!item.hidden"> |
| 48 | <el-submenu :index="index+''" v-if="!item.leaf"> | 52 | <el-submenu :index="index+''" v-if="!item.leaf"> |
| 49 | <template slot="title"><i :class="item.iconCls"></i>{{item.name}}</template> | 53 | <template slot="title"><i :class="item.iconCls"></i>{{item.name}}</template> |
| 50 | - <el-menu-item v-for="child in item.children" :index="child.path" :key="child.path" v-if="!child.hidden">{{child.name}}</el-menu-item> | 54 | + <el-menu-item v-for="child in item.children" :index="child.path" :key="child.path" |
| 55 | + v-if="!child.hidden">{{child.name}} | ||
| 56 | + </el-menu-item> | ||
| 51 | </el-submenu> | 57 | </el-submenu> |
| 52 | - <el-menu-item v-if="item.leaf&&item.children.length>0" :index="item.children[0].path"><i :class="item.iconCls"></i>{{item.children[0].name}}</el-menu-item> | 58 | + <el-menu-item v-if="item.leaf&&item.children.length>0" :index="item.children[0].path"><i |
| 59 | + :class="item.iconCls"></i>{{item.children[0].name}} | ||
| 60 | + </el-menu-item> | ||
| 53 | </template> | 61 | </template> |
| 54 | </el-menu> | 62 | </el-menu> |
| 55 | <!--导航菜单-折叠后--> | 63 | <!--导航菜单-折叠后--> |
| 56 | <ul class="el-menu el-menu-vertical-demo collapsed" v-show="collapsed" ref="menuCollapsed"> | 64 | <ul class="el-menu el-menu-vertical-demo collapsed" v-show="collapsed" ref="menuCollapsed"> |
| 57 | <li v-for="(item,index) in $router.options.routes" v-if="!item.hidden" class="el-submenu item"> | 65 | <li v-for="(item,index) in $router.options.routes" v-if="!item.hidden" class="el-submenu item"> |
| 58 | <template v-if="!item.leaf"> | 66 | <template v-if="!item.leaf"> |
| 59 | - <div class="el-submenu__title" style="padding-left: 20px;" @mouseover="showMenu(index,true)" @mouseout="showMenu(index,false)"><i :class="item.iconCls"></i></div> | ||
| 60 | - <ul class="el-menu submenu" :class="'submenu-hook-'+index" @mouseover="showMenu(index,true)" @mouseout="showMenu(index,false)"> | ||
| 61 | - <li v-for="child in item.children" v-if="!child.hidden" :key="child.path" class="el-menu-item" style="padding-left: 40px;" :class="$route.path==child.path?'is-active':''" @click="$router.push(child.path)">{{child.name}}</li> | 67 | + <div class="el-submenu__title" style="padding-left: 20px;" @mouseover="showMenu(index,true)" |
| 68 | + @mouseout="showMenu(index,false)"><i :class="item.iconCls"></i></div> | ||
| 69 | + <ul class="el-menu submenu" :class="'submenu-hook-'+index" @mouseover="showMenu(index,true)" | ||
| 70 | + @mouseout="showMenu(index,false)"> | ||
| 71 | + <li v-for="child in item.children" v-if="!child.hidden" :key="child.path" | ||
| 72 | + class="el-menu-item" style="padding-left: 40px;" | ||
| 73 | + :class="$route.path==child.path?'is-active':''" @click="$router.push(child.path)"> | ||
| 74 | + {{child.name}} | ||
| 75 | + </li> | ||
| 62 | </ul> | 76 | </ul> |
| 63 | </template> | 77 | </template> |
| 64 | <template v-else> | 78 | <template v-else> |
| 65 | <li class="el-submenu"> | 79 | <li class="el-submenu"> |
| 66 | - <div class="el-submenu__title el-menu-item" style="padding-left: 20px;height: 56px;line-height: 56px;padding: 0 20px;" :class="$route.path==item.children[0].path?'is-active':''" @click="$router.push(item.children[0].path)"><i :class="item.iconCls"></i></div> | 80 | + <div class="el-submenu__title el-menu-item" |
| 81 | + style="padding-left: 20px;height: 56px;line-height: 56px;padding: 0 20px;" | ||
| 82 | + :class="$route.path==item.children[0].path?'is-active':''" | ||
| 83 | + @click="$router.push(item.children[0].path)"><i :class="item.iconCls"></i></div> | ||
| 67 | </li> | 84 | </li> |
| 68 | </template> | 85 | </template> |
| 69 | </li> | 86 | </li> |
| @@ -92,8 +109,9 @@ | @@ -92,8 +109,9 @@ | ||
| 92 | 109 | ||
| 93 | <script> | 110 | <script> |
| 94 | import rt from '../routes' | 111 | import rt from '../routes' |
| 95 | - import { editPass,resetToken} from '../api/user'; | 112 | + import {editPass, resetToken} from '../api/user'; |
| 96 | import ElFormItem from "element-ui/packages/form/src/form-item"; | 113 | import ElFormItem from "element-ui/packages/form/src/form-item"; |
| 114 | + | ||
| 97 | export default { | 115 | export default { |
| 98 | 116 | ||
| 99 | provide() { | 117 | provide() { |
| @@ -106,30 +124,48 @@ | @@ -106,30 +124,48 @@ | ||
| 106 | var validatePass = (rule, value, callback) => { | 124 | var validatePass = (rule, value, callback) => { |
| 107 | if (!value) { | 125 | if (!value) { |
| 108 | callback(new Error('请输入新密码')); | 126 | callback(new Error('请输入新密码')); |
| 109 | - }else { | ||
| 110 | - var ls=0; | ||
| 111 | - if(value.match(/([a-z])+/)){ | 127 | + } else { |
| 128 | + var ls = 0; | ||
| 129 | + if (value.match(/([a-z])+/)) { | ||
| 112 | ls++; | 130 | ls++; |
| 113 | - } if(value.match(/([0-9])+/)){ | 131 | + } |
| 132 | + if (value.match(/([0-9])+/)) { | ||
| 114 | ls++; | 133 | ls++; |
| 115 | - } if(value.match(/([A-Z])+/)){ | 134 | + } |
| 135 | + if (value.match(/([A-Z])+/)) { | ||
| 116 | ls++; | 136 | ls++; |
| 117 | - } if((/([\W])+/) && !value.match(/(![\u4E00-\u9FA5])+/)){ | 137 | + } |
| 138 | + if ((/([\W])+/) && !value.match(/(![\u4E00-\u9FA5])+/)) { | ||
| 118 | ls++; | 139 | ls++; |
| 119 | - } if (value.toString().length < 8 || value.toString().length > 20) { | 140 | + } |
| 141 | + if (value.toString().length < 8 || value.toString().length > 20) { | ||
| 120 | callback(new Error('密码长度为8 - 20个字符')); | 142 | callback(new Error('密码长度为8 - 20个字符')); |
| 121 | - ls=0; | ||
| 122 | - } if(value.match(/([\u4E00-\u9FA5])+/)){ | 143 | + ls = 0; |
| 144 | + } | ||
| 145 | + if (value.match(/([\u4E00-\u9FA5])+/)) { | ||
| 123 | callback(new Error('不能包含中文字符')); | 146 | callback(new Error('不能包含中文字符')); |
| 124 | - ls=0; | 147 | + ls = 0; |
| 125 | } | 148 | } |
| 126 | switch (ls) { | 149 | switch (ls) { |
| 127 | - case 0: this.passwordPercent = 0;callback(new Error('数字、小写字母、大写字母以及特殊字符中四选三'));break; | ||
| 128 | - case 1: this.passwordPercent = 33;callback(new Error('数字、小写字母、大写字母以及特殊字符中四选三'));break; | ||
| 129 | - case 2: this.passwordPercent = 66;callback(new Error('数字、小写字母 、大写字母以及特殊字符中四选三'));break; | 150 | + case 0: |
| 151 | + this.passwordPercent = 0; | ||
| 152 | + callback(new Error('数字、小写字母、大写字母以及特殊字符中四选三')); | ||
| 153 | + break; | ||
| 154 | + case 1: | ||
| 155 | + this.passwordPercent = 33; | ||
| 156 | + callback(new Error('数字、小写字母、大写字母以及特殊字符中四选三')); | ||
| 157 | + break; | ||
| 158 | + case 2: | ||
| 159 | + this.passwordPercent = 66; | ||
| 160 | + callback(new Error('数字、小写字母 、大写字母以及特殊字符中四选三')); | ||
| 161 | + break; | ||
| 130 | case 3: | 162 | case 3: |
| 131 | - case 4: this.passwordPercent = 100;break; | ||
| 132 | - default: this.passwordPercent = 0;break; | 163 | + case 4: |
| 164 | + this.passwordPercent = 100; | ||
| 165 | + break; | ||
| 166 | + default: | ||
| 167 | + this.passwordPercent = 0; | ||
| 168 | + break; | ||
| 133 | } | 169 | } |
| 134 | callback(); | 170 | callback(); |
| 135 | } | 171 | } |
| @@ -146,10 +182,10 @@ | @@ -146,10 +182,10 @@ | ||
| 146 | } | 182 | } |
| 147 | }; | 183 | }; |
| 148 | return { | 184 | return { |
| 149 | - sysName:'易通快速通关申报管理系统', | ||
| 150 | - collapsed:false, | 185 | + sysName: '易通快速通关申报管理系统', |
| 186 | + collapsed: false, | ||
| 151 | sysUserName: '', | 187 | sysUserName: '', |
| 152 | - sysUserId:'', | 188 | + sysUserId: '', |
| 153 | sysUserAvatar: '', | 189 | sysUserAvatar: '', |
| 154 | isRouterAlive: true, | 190 | isRouterAlive: true, |
| 155 | form: { | 191 | form: { |
| @@ -162,17 +198,17 @@ | @@ -162,17 +198,17 @@ | ||
| 162 | resource: '', | 198 | resource: '', |
| 163 | desc: '' | 199 | desc: '' |
| 164 | }, | 200 | }, |
| 165 | - dialogFormVisible:false, | 201 | + dialogFormVisible: false, |
| 166 | resetForm: { | 202 | resetForm: { |
| 167 | newpwd: '', | 203 | newpwd: '', |
| 168 | renewpwd: '', | 204 | renewpwd: '', |
| 169 | }, | 205 | }, |
| 170 | resetFormRules: { | 206 | resetFormRules: { |
| 171 | newpwd: [ | 207 | newpwd: [ |
| 172 | - { required: true, validator: validatePass, trigger: 'blur' } | 208 | + {required: true, validator: validatePass, trigger: 'blur'} |
| 173 | ], | 209 | ], |
| 174 | renewpwd: [ | 210 | renewpwd: [ |
| 175 | - { required: true, validator: validatePass2, trigger: 'blur' } | 211 | + {required: true, validator: validatePass2, trigger: 'blur'} |
| 176 | ] | 212 | ] |
| 177 | }, | 213 | }, |
| 178 | editForm: { | 214 | editForm: { |
| @@ -186,25 +222,25 @@ | @@ -186,25 +222,25 @@ | ||
| 186 | this.$nextTick(function () { | 222 | this.$nextTick(function () { |
| 187 | this.$router.push({ | 223 | this.$router.push({ |
| 188 | path: this.$router.path, | 224 | path: this.$router.path, |
| 189 | - query:{ | 225 | + query: { |
| 190 | t: new Date().getTime() | 226 | t: new Date().getTime() |
| 191 | } | 227 | } |
| 192 | }) | 228 | }) |
| 193 | }) | 229 | }) |
| 194 | }, | 230 | }, |
| 195 | - editPass:function(){ | ||
| 196 | - this.dialogFormVisible=true; | 231 | + editPass: function () { |
| 232 | + this.dialogFormVisible = true; | ||
| 197 | }, | 233 | }, |
| 198 | - updateCache:function(){ | ||
| 199 | - resetToken().then( res =>{ | 234 | + updateCache: function () { |
| 235 | + resetToken().then(res => { | ||
| 200 | let response = res.data; | 236 | let response = res.data; |
| 201 | - if (response.code === '200'){ | 237 | + if (response.code === '200') { |
| 202 | this.$notify({ | 238 | this.$notify({ |
| 203 | title: '成功', | 239 | title: '成功', |
| 204 | message: '缓存更新成功', | 240 | message: '缓存更新成功', |
| 205 | type: 'success' | 241 | type: 'success' |
| 206 | }); | 242 | }); |
| 207 | - }else{ | 243 | + } else { |
| 208 | this.$notify.error({ | 244 | this.$notify.error({ |
| 209 | title: '失败', | 245 | title: '失败', |
| 210 | message: '缓存更新失败' | 246 | message: '缓存更新失败' |
| @@ -212,21 +248,21 @@ | @@ -212,21 +248,21 @@ | ||
| 212 | } | 248 | } |
| 213 | }) | 249 | }) |
| 214 | }, | 250 | }, |
| 215 | - submitEdit(formName){ | 251 | + submitEdit(formName) { |
| 216 | this.$refs[formName].validate((valid) => { | 252 | this.$refs[formName].validate((valid) => { |
| 217 | if (valid) { | 253 | if (valid) { |
| 218 | - this.editForm.userId=this.sysUserId; | ||
| 219 | - this.editForm.password=this.resetForm.renewpwd; | ||
| 220 | - editPass(this.editForm).then(res=>{ | ||
| 221 | - let response=res.data; | ||
| 222 | - if(response.code=='200'){ | 254 | + this.editForm.userId = this.sysUserId; |
| 255 | + this.editForm.password = this.resetForm.renewpwd; | ||
| 256 | + editPass(this.editForm).then(res => { | ||
| 257 | + let response = res.data; | ||
| 258 | + if (response.code == '200') { | ||
| 223 | this.$notify({ | 259 | this.$notify({ |
| 224 | title: '密码修改成功', | 260 | title: '密码修改成功', |
| 225 | message: '密码修改成功,退出请重新登录', | 261 | message: '密码修改成功,退出请重新登录', |
| 226 | type: 'success' | 262 | type: 'success' |
| 227 | }); | 263 | }); |
| 228 | - this.dialogFormVisible=false; | ||
| 229 | - }else{ | 264 | + this.dialogFormVisible = false; |
| 265 | + } else { | ||
| 230 | this.$notify.error({ | 266 | this.$notify.error({ |
| 231 | title: '密码修改失败', | 267 | title: '密码修改失败', |
| 232 | message: '密码修改失败!!!' | 268 | message: '密码修改失败!!!' |
| @@ -272,11 +308,11 @@ | @@ -272,11 +308,11 @@ | ||
| 272 | 308 | ||
| 273 | }, | 309 | }, |
| 274 | //折叠导航栏 | 310 | //折叠导航栏 |
| 275 | - collapse:function(){ | ||
| 276 | - this.collapsed=!this.collapsed; | 311 | + collapse: function () { |
| 312 | + this.collapsed = !this.collapsed; | ||
| 277 | }, | 313 | }, |
| 278 | - showMenu(i,status){ | ||
| 279 | - this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-'+i)[0].style.display=status?'block':'none'; | 314 | + showMenu(i, status) { |
| 315 | + this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-' + i)[0].style.display = status ? 'block' : 'none'; | ||
| 280 | } | 316 | } |
| 281 | }, | 317 | }, |
| 282 | mounted() { | 318 | mounted() { |
| @@ -285,7 +321,7 @@ | @@ -285,7 +321,7 @@ | ||
| 285 | if (user) { | 321 | if (user) { |
| 286 | user = JSON.parse(user); | 322 | user = JSON.parse(user); |
| 287 | this.sysUserName = user.username || ''; | 323 | this.sysUserName = user.username || ''; |
| 288 | - this.sysUserId=user.userId||''; | 324 | + this.sysUserId = user.userId || ''; |
| 289 | this.sysUserAvatar = user.userface || '/static/images/faceDefault.jpg'; | 325 | this.sysUserAvatar = user.userface || '/static/images/faceDefault.jpg'; |
| 290 | } | 326 | } |
| 291 | //操作路由,判断本地存储的用户栏目列表是否存在,如果存在则加载路由 | 327 | //操作路由,判断本地存储的用户栏目列表是否存在,如果存在则加载路由 |
| @@ -303,23 +339,28 @@ | @@ -303,23 +339,28 @@ | ||
| 303 | 339 | ||
| 304 | <style scoped lang="scss"> | 340 | <style scoped lang="scss"> |
| 305 | @import '~scss_vars'; | 341 | @import '~scss_vars'; |
| 342 | + | ||
| 306 | .container { | 343 | .container { |
| 307 | position: absolute; | 344 | position: absolute; |
| 308 | top: 0px; | 345 | top: 0px; |
| 309 | bottom: 0px; | 346 | bottom: 0px; |
| 310 | width: 100%; | 347 | width: 100%; |
| 348 | + | ||
| 311 | .header { | 349 | .header { |
| 312 | height: 60px; | 350 | height: 60px; |
| 313 | line-height: 60px; | 351 | line-height: 60px; |
| 314 | background: $color-primary url("/static/images/air-banner.png"); | 352 | background: $color-primary url("/static/images/air-banner.png"); |
| 315 | - color:#fff; | 353 | + color: #fff; |
| 354 | + | ||
| 316 | .userinfo { | 355 | .userinfo { |
| 317 | text-align: right; | 356 | text-align: right; |
| 318 | padding-right: 35px; | 357 | padding-right: 35px; |
| 319 | float: right; | 358 | float: right; |
| 359 | + | ||
| 320 | .userinfo-inner { | 360 | .userinfo-inner { |
| 321 | cursor: pointer; | 361 | cursor: pointer; |
| 322 | - color:#fff; | 362 | + color: #fff; |
| 363 | + | ||
| 323 | img { | 364 | img { |
| 324 | width: 40px; | 365 | width: 40px; |
| 325 | height: 40px; | 366 | height: 40px; |
| @@ -329,38 +370,45 @@ | @@ -329,38 +370,45 @@ | ||
| 329 | } | 370 | } |
| 330 | } | 371 | } |
| 331 | } | 372 | } |
| 373 | + | ||
| 332 | .logo { | 374 | .logo { |
| 333 | //width:230px; | 375 | //width:230px; |
| 334 | - height:60px; | 376 | + height: 60px; |
| 335 | font-size: 22px; | 377 | font-size: 22px; |
| 336 | - padding-left:20px; | ||
| 337 | - padding-right:20px; | ||
| 338 | - border-color: rgba(238,241,146,0.3); | 378 | + padding-left: 20px; |
| 379 | + padding-right: 20px; | ||
| 380 | + border-color: rgba(238, 241, 146, 0.3); | ||
| 339 | border-right-width: 1px; | 381 | border-right-width: 1px; |
| 340 | border-right-style: solid; | 382 | border-right-style: solid; |
| 383 | + | ||
| 341 | img { | 384 | img { |
| 342 | width: 40px; | 385 | width: 40px; |
| 343 | float: left; | 386 | float: left; |
| 344 | margin: 10px 10px 10px 18px; | 387 | margin: 10px 10px 10px 18px; |
| 345 | } | 388 | } |
| 389 | + | ||
| 346 | .txt { | 390 | .txt { |
| 347 | - color:#fff; | 391 | + color: #fff; |
| 348 | } | 392 | } |
| 349 | } | 393 | } |
| 350 | - .logo-width{ | ||
| 351 | - width:230px; | 394 | + |
| 395 | + .logo-width { | ||
| 396 | + width: 230px; | ||
| 352 | } | 397 | } |
| 353 | - .logo-collapse-width{ | ||
| 354 | - width:60px | 398 | + |
| 399 | + .logo-collapse-width { | ||
| 400 | + width: 60px | ||
| 355 | } | 401 | } |
| 356 | - .tools{ | 402 | + |
| 403 | + .tools { | ||
| 357 | padding: 0px 23px; | 404 | padding: 0px 23px; |
| 358 | - width:14px; | 405 | + width: 14px; |
| 359 | height: 60px; | 406 | height: 60px; |
| 360 | line-height: 60px; | 407 | line-height: 60px; |
| 361 | cursor: pointer; | 408 | cursor: pointer; |
| 362 | } | 409 | } |
| 363 | } | 410 | } |
| 411 | + | ||
| 364 | .main { | 412 | .main { |
| 365 | display: flex; | 413 | display: flex; |
| 366 | // background: #324057; | 414 | // background: #324057; |
| @@ -368,44 +416,51 @@ | @@ -368,44 +416,51 @@ | ||
| 368 | top: 60px; | 416 | top: 60px; |
| 369 | bottom: 0px; | 417 | bottom: 0px; |
| 370 | overflow: hidden; | 418 | overflow: hidden; |
| 419 | + | ||
| 371 | aside { | 420 | aside { |
| 372 | - flex:0 0 230px; | 421 | + flex: 0 0 230px; |
| 373 | width: 230px; | 422 | width: 230px; |
| 374 | overflow-y: scroll; | 423 | overflow-y: scroll; |
| 375 | background: #606060; | 424 | background: #606060; |
| 376 | // position: absolute; | 425 | // position: absolute; |
| 377 | // top: 0px; | 426 | // top: 0px; |
| 378 | // bottom: 0px; | 427 | // bottom: 0px; |
| 379 | - .collapsed{ | ||
| 380 | - width:60px; | ||
| 381 | - .item{ | 428 | + .collapsed { |
| 429 | + width: 60px; | ||
| 430 | + | ||
| 431 | + .item { | ||
| 382 | position: relative; | 432 | position: relative; |
| 383 | } | 433 | } |
| 384 | - .submenu{ | ||
| 385 | - position:absolute; | ||
| 386 | - top:0px; | ||
| 387 | - left:60px; | ||
| 388 | - z-index:99999; | ||
| 389 | - height:auto; | ||
| 390 | - display:none; | 434 | + |
| 435 | + .submenu { | ||
| 436 | + position: absolute; | ||
| 437 | + top: 0px; | ||
| 438 | + left: 60px; | ||
| 439 | + z-index: 99999; | ||
| 440 | + height: auto; | ||
| 441 | + display: none; | ||
| 391 | } | 442 | } |
| 392 | 443 | ||
| 393 | } | 444 | } |
| 394 | } | 445 | } |
| 395 | - .menu-collapsed{ | ||
| 396 | - flex:0 0 60px; | 446 | + |
| 447 | + .menu-collapsed { | ||
| 448 | + flex: 0 0 60px; | ||
| 397 | width: 60px; | 449 | width: 60px; |
| 398 | } | 450 | } |
| 399 | - .menu-expanded{ | ||
| 400 | - flex:0 0 230px; | 451 | + |
| 452 | + .menu-expanded { | ||
| 453 | + flex: 0 0 230px; | ||
| 401 | width: 230px; | 454 | width: 230px; |
| 402 | } | 455 | } |
| 403 | - .menu-expanded ul{ | 456 | + |
| 457 | + .menu-expanded ul { | ||
| 404 | width: 230px; | 458 | width: 230px; |
| 405 | } | 459 | } |
| 460 | + | ||
| 406 | .content-container { | 461 | .content-container { |
| 407 | // background: #f1f2f7; | 462 | // background: #f1f2f7; |
| 408 | - flex:1; | 463 | + flex: 1; |
| 409 | // position: absolute; | 464 | // position: absolute; |
| 410 | // right: 0px; | 465 | // right: 0px; |
| 411 | // top: 0px; | 466 | // top: 0px; |
| @@ -413,6 +468,7 @@ | @@ -413,6 +468,7 @@ | ||
| 413 | // left: 230px; | 468 | // left: 230px; |
| 414 | overflow-y: scroll; | 469 | overflow-y: scroll; |
| 415 | padding: 10px; | 470 | padding: 10px; |
| 471 | + | ||
| 416 | .breadcrumb-container { | 472 | .breadcrumb-container { |
| 417 | //margin-bottom: 15px; | 473 | //margin-bottom: 15px; |
| 418 | .title { | 474 | .title { |
| @@ -421,14 +477,17 @@ | @@ -421,14 +477,17 @@ | ||
| 421 | color: #475669; | 477 | color: #475669; |
| 422 | margin-left: 10px; | 478 | margin-left: 10px; |
| 423 | } | 479 | } |
| 480 | + | ||
| 424 | .breadcrumb-inner { | 481 | .breadcrumb-inner { |
| 425 | float: right; | 482 | float: right; |
| 426 | - margin-right:10px; | 483 | + margin-right: 10px; |
| 427 | } | 484 | } |
| 428 | - .el-breadcrumb{ | ||
| 429 | - line-height:36px; | 485 | + |
| 486 | + .el-breadcrumb { | ||
| 487 | + line-height: 36px; | ||
| 430 | } | 488 | } |
| 431 | } | 489 | } |
| 490 | + | ||
| 432 | .content-wrapper { | 491 | .content-wrapper { |
| 433 | background-color: #fff; | 492 | background-color: #fff; |
| 434 | box-sizing: border-box; | 493 | box-sizing: border-box; |
| @@ -438,34 +497,42 @@ | @@ -438,34 +497,42 @@ | ||
| 438 | } | 497 | } |
| 439 | </style> | 498 | </style> |
| 440 | <style lang="scss"> | 499 | <style lang="scss"> |
| 441 | - .darkmenu{ | 500 | + .darkmenu { |
| 442 | .main { | 501 | .main { |
| 443 | aside { | 502 | aside { |
| 444 | - .el-menu{ | 503 | + .el-menu { |
| 445 | height: 100%; | 504 | height: 100%; |
| 446 | background: #606060; | 505 | background: #606060; |
| 506 | + | ||
| 447 | .el-menu-item { | 507 | .el-menu-item { |
| 448 | - i{ | 508 | + i { |
| 449 | color: white; | 509 | color: white; |
| 450 | } | 510 | } |
| 511 | + | ||
| 451 | color: white; | 512 | color: white; |
| 452 | } | 513 | } |
| 453 | - .el-menu-item.is-active{ | ||
| 454 | - color:#e6a23c; | 514 | + |
| 515 | + .el-menu-item.is-active { | ||
| 516 | + color: #e6a23c; | ||
| 455 | } | 517 | } |
| 456 | - .el-menu-item:hover,.el-menu-item:focus{ | 518 | + |
| 519 | + .el-menu-item:hover, .el-menu-item:focus { | ||
| 457 | background-color: #1a4496; | 520 | background-color: #1a4496; |
| 458 | } | 521 | } |
| 522 | + | ||
| 459 | .el-submenu { | 523 | .el-submenu { |
| 460 | - ul.el-menu.el-menu--inline{ | 524 | + ul.el-menu.el-menu--inline { |
| 461 | background: #303030; | 525 | background: #303030; |
| 462 | } | 526 | } |
| 527 | + | ||
| 463 | .el-submenu__title { | 528 | .el-submenu__title { |
| 464 | color: white; | 529 | color: white; |
| 465 | - i{ | 530 | + |
| 531 | + i { | ||
| 466 | color: white; | 532 | color: white; |
| 467 | } | 533 | } |
| 468 | } | 534 | } |
| 535 | + | ||
| 469 | .el-submenu__title:hover { | 536 | .el-submenu__title:hover { |
| 470 | background-color: #1a4496; | 537 | background-color: #1a4496; |
| 471 | } | 538 | } |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <el-form :model="ruleForm2" :rules="rules2" ref="ruleForm2" label-position="left" label-width="0px" class="demo-ruleForm login-container" id="loginForm"> | 3 | + <el-form :model="ruleForm2" :rules="rules2" ref="ruleForm2" label-position="left" label-width="0px" |
| 4 | + class="demo-ruleForm login-container" id="loginForm"> | ||
| 4 | <h3 class="title">系统登录</h3> | 5 | <h3 class="title">系统登录</h3> |
| 5 | <el-form-item prop="account"> | 6 | <el-form-item prop="account"> |
| 6 | <el-input type="text" v-model="ruleForm2.account" autofocus placeholder="账号"></el-input> | 7 | <el-input type="text" v-model="ruleForm2.account" autofocus placeholder="账号"></el-input> |
| 7 | </el-form-item> | 8 | </el-form-item> |
| 8 | <el-form-item prop="checkPass"> | 9 | <el-form-item prop="checkPass"> |
| 9 | - <el-input type="password" v-model="ruleForm2.checkPass" placeholder="密码" @keyup.enter.native="handleSubmit2"></el-input> | 10 | + <el-input type="password" v-model="ruleForm2.checkPass" placeholder="密码" |
| 11 | + @keyup.enter.native="handleSubmit2"></el-input> | ||
| 10 | </el-form-item> | 12 | </el-form-item> |
| 11 | <el-checkbox v-model="checked" checked class="remeberme">记住密码</el-checkbox> | 13 | <el-checkbox v-model="checked" checked class="remeberme">记住密码</el-checkbox> |
| 12 | <el-form-item style="width:100%;"> | 14 | <el-form-item style="width:100%;"> |
| 13 | - <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit2" :loading="logining" :plain="true">登录</el-button> | 15 | + <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit2" :loading="logining" |
| 16 | + :plain="true">登录 | ||
| 17 | + </el-button> | ||
| 14 | <!--<el-button @click.native.prevent="handleReset2">重置</el-button>--> | 18 | <!--<el-button @click.native.prevent="handleReset2">重置</el-button>--> |
| 15 | </el-form-item> | 19 | </el-form-item> |
| 16 | </el-form> | 20 | </el-form> |
| @@ -24,7 +28,9 @@ | @@ -24,7 +28,9 @@ | ||
| 24 | <!--浏览器不支持 video 标签,建议升级浏览器。--> | 28 | <!--浏览器不支持 video 标签,建议升级浏览器。--> |
| 25 | </video> | 29 | </video> |
| 26 | <div class="poster hidden" v-if="!vedioCanPlay"> | 30 | <div class="poster hidden" v-if="!vedioCanPlay"> |
| 27 | - <img :style="fixStyle" src="https://s2.best-wallpaper.net/wallpaper/2560x1600/1511/Airplane-passenger-airliner-flight-sea-lights-airport-evening_2560x1600.jpg" alt=""> | 31 | + <img :style="fixStyle" |
| 32 | + src="https://s2.best-wallpaper.net/wallpaper/2560x1600/1511/Airplane-passenger-airliner-flight-sea-lights-airport-evening_2560x1600.jpg" | ||
| 33 | + alt=""> | ||
| 28 | </div> | 34 | </div> |
| 29 | </div> | 35 | </div> |
| 30 | </div> | 36 | </div> |
| @@ -47,11 +53,11 @@ | @@ -47,11 +53,11 @@ | ||
| 47 | }, | 53 | }, |
| 48 | rules2: { | 54 | rules2: { |
| 49 | account: [ | 55 | account: [ |
| 50 | - { required: true, message: '请输入账号', trigger: 'blur' }, | 56 | + {required: true, message: '请输入账号', trigger: 'blur'}, |
| 51 | //{ validator: validaePass } | 57 | //{ validator: validaePass } |
| 52 | ], | 58 | ], |
| 53 | checkPass: [ | 59 | checkPass: [ |
| 54 | - { required: true, message: '请输入密码', trigger: 'blur' }, | 60 | + {required: true, message: '请输入密码', trigger: 'blur'}, |
| 55 | //{ validator: validaePass2 } | 61 | //{ validator: validaePass2 } |
| 56 | ] | 62 | ] |
| 57 | }, | 63 | }, |
| @@ -66,12 +72,12 @@ | @@ -66,12 +72,12 @@ | ||
| 66 | handleReset2() { | 72 | handleReset2() { |
| 67 | this.$refs.ruleForm2.resetFields(); | 73 | this.$refs.ruleForm2.resetFields(); |
| 68 | }, | 74 | }, |
| 69 | - handleMenuList : function (router,menu) { | 75 | + handleMenuList: function (router, menu) { |
| 70 | var _this = this; | 76 | var _this = this; |
| 71 | var routerName = ""; | 77 | var routerName = ""; |
| 72 | var routerTemp = router.concat(); | 78 | var routerTemp = router.concat(); |
| 73 | 79 | ||
| 74 | - routerTemp.forEach(function (v_router,v_index,v_arr) { | 80 | + routerTemp.forEach(function (v_router, v_index, v_arr) { |
| 75 | routerName = v_router.name; | 81 | routerName = v_router.name; |
| 76 | 82 | ||
| 77 | //查找返回的目录列表是否包含路由名称,有就返回匹配到的元素,没有就移除 | 83 | //查找返回的目录列表是否包含路由名称,有就返回匹配到的元素,没有就移除 |
| @@ -81,13 +87,13 @@ | @@ -81,13 +87,13 @@ | ||
| 81 | 87 | ||
| 82 | //匹配到继续判断是否子元素,有子元素继续递归 | 88 | //匹配到继续判断是否子元素,有子元素继续递归 |
| 83 | if (result) { | 89 | if (result) { |
| 84 | - if (v_router.children && v_router.children.length>0) { | 90 | + if (v_router.children && v_router.children.length > 0) { |
| 85 | _this.handleMenuList(v_router.children, result.children); | 91 | _this.handleMenuList(v_router.children, result.children); |
| 86 | } | 92 | } |
| 87 | - }else { | 93 | + } else { |
| 88 | //没有则可以移除 | 94 | //没有则可以移除 |
| 89 | - let deletRouter = router.findIndex(itm => itm.name === routerName ); | ||
| 90 | - router.splice(deletRouter,1); | 95 | + let deletRouter = router.findIndex(itm => itm.name === routerName); |
| 96 | + router.splice(deletRouter, 1); | ||
| 91 | } | 97 | } |
| 92 | }); | 98 | }); |
| 93 | console.log("longined router:"); | 99 | console.log("longined router:"); |
| @@ -119,9 +125,9 @@ | @@ -119,9 +125,9 @@ | ||
| 119 | }); | 125 | }); |
| 120 | } else if (token) { | 126 | } else if (token) { |
| 121 | sessionStorage.setItem('user', JSON.stringify(authentication)); | 127 | sessionStorage.setItem('user', JSON.stringify(authentication)); |
| 122 | - sessionStorage.setItem('token','Bearer '+ token); | 128 | + sessionStorage.setItem('token', 'Bearer ' + token); |
| 123 | //设置token,设置axios 基本配置,但是刷新后 这个登录保存的就没了 | 129 | //设置token,设置axios 基本配置,但是刷新后 这个登录保存的就没了 |
| 124 | - axios.defaults.headers.common['Authorization'] = 'Bearer '+token; | 130 | + axios.defaults.headers.common['Authorization'] = 'Bearer ' + token; |
| 125 | //处理用户menu | 131 | //处理用户menu |
| 126 | _this.userMenus = loginUserMenus.list; | 132 | _this.userMenus = loginUserMenus.list; |
| 127 | console.log("userMenus:"); | 133 | console.log("userMenus:"); |
| @@ -132,7 +138,7 @@ | @@ -132,7 +138,7 @@ | ||
| 132 | console.log("sysMenus:"); | 138 | console.log("sysMenus:"); |
| 133 | console.log(sysMenus); | 139 | console.log(sysMenus); |
| 134 | 140 | ||
| 135 | - _this.handleMenuList(_this.$router.options.routes,_this.userMenus); | 141 | + _this.handleMenuList(_this.$router.options.routes, _this.userMenus); |
| 136 | 142 | ||
| 137 | console.log("user:"); | 143 | console.log("user:"); |
| 138 | console.log(_this.$router.options.routes); | 144 | console.log(_this.$router.options.routes); |
| @@ -151,7 +157,7 @@ | @@ -151,7 +157,7 @@ | ||
| 151 | }); | 157 | }); |
| 152 | } | 158 | } |
| 153 | }, | 159 | }, |
| 154 | - mounted:function () { | 160 | + mounted: function () { |
| 155 | window.onresize = () => { | 161 | window.onresize = () => { |
| 156 | const windowWidth = document.body.clientWidth | 162 | const windowWidth = document.body.clientWidth |
| 157 | const windowHeight = document.body.clientHeight | 163 | const windowHeight = document.body.clientHeight |
| @@ -185,17 +191,18 @@ | @@ -185,17 +191,18 @@ | ||
| 185 | </script> | 191 | </script> |
| 186 | 192 | ||
| 187 | <style lang="scss" scoped> | 193 | <style lang="scss" scoped> |
| 188 | - #loginForm{ | ||
| 189 | - filter:alpha(Opacity=90); | ||
| 190 | - -moz-opacity:0.9; | 194 | + #loginForm { |
| 195 | + filter: alpha(Opacity=90); | ||
| 196 | + -moz-opacity: 0.9; | ||
| 191 | opacity: 0.9; | 197 | opacity: 0.9; |
| 192 | } | 198 | } |
| 199 | + | ||
| 193 | .homepage-hero-module, | 200 | .homepage-hero-module, |
| 194 | .video-container { | 201 | .video-container { |
| 195 | height: 100vh; | 202 | height: 100vh; |
| 196 | /*overflow: hidden;*/ | 203 | /*overflow: hidden;*/ |
| 197 | position: absolute; | 204 | position: absolute; |
| 198 | - top:0px; | 205 | + top: 0px; |
| 199 | left: 0; | 206 | left: 0; |
| 200 | z-index: -1; | 207 | z-index: -1; |
| 201 | } | 208 | } |
| @@ -211,6 +218,7 @@ | @@ -211,6 +218,7 @@ | ||
| 211 | position: absolute; | 218 | position: absolute; |
| 212 | background: rgba(0, 0, 0, 0.4); | 219 | background: rgba(0, 0, 0, 0.4); |
| 213 | } | 220 | } |
| 221 | + | ||
| 214 | .login-container { | 222 | .login-container { |
| 215 | /*box-shadow: 0 0px 8px 0 rgba(0, 0, 0, 0.06), 0 1px 0px 0 rgba(0, 0, 0, 0.02);*/ | 223 | /*box-shadow: 0 0px 8px 0 rgba(0, 0, 0, 0.06), 0 1px 0px 0 rgba(0, 0, 0, 0.02);*/ |
| 216 | -webkit-border-radius: 5px; | 224 | -webkit-border-radius: 5px; |
| @@ -223,11 +231,13 @@ | @@ -223,11 +231,13 @@ | ||
| 223 | background: #fff; | 231 | background: #fff; |
| 224 | border: 1px solid #eaeaea; | 232 | border: 1px solid #eaeaea; |
| 225 | box-shadow: 0 0 25px #cac6c6; | 233 | box-shadow: 0 0 25px #cac6c6; |
| 234 | + | ||
| 226 | .title { | 235 | .title { |
| 227 | margin: 0px auto 40px auto; | 236 | margin: 0px auto 40px auto; |
| 228 | text-align: center; | 237 | text-align: center; |
| 229 | color: #505458; | 238 | color: #505458; |
| 230 | } | 239 | } |
| 240 | + | ||
| 231 | .remember { | 241 | .remember { |
| 232 | margin: 0px 0px 35px 0px; | 242 | margin: 0px 0px 35px 0px; |
| 233 | } | 243 | } |
| @@ -4,12 +4,21 @@ | @@ -4,12 +4,21 @@ | ||
| 4 | <el-input v-model="listQuery.title" style="width: 200px;" class="filter-item" placeholder="运单号"/> | 4 | <el-input v-model="listQuery.title" style="width: 200px;" class="filter-item" placeholder="运单号"/> |
| 5 | <el-input v-model="listQuery.title" style="width: 200px;" class="filter-item" placeholder="航班号"/> | 5 | <el-input v-model="listQuery.title" style="width: 200px;" class="filter-item" placeholder="航班号"/> |
| 6 | <el-input v-model="listQuery.title" style="width: 200px;" class="filter-item" placeholder="航班日期"/> | 6 | <el-input v-model="listQuery.title" style="width: 200px;" class="filter-item" placeholder="航班日期"/> |
| 7 | - <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">{{ $t('table.search') }}</el-button> | ||
| 8 | - <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit" @click="handleCreate">{{ $t('table.add') }}</el-button> | ||
| 9 | - <el-button v-waves :loading="downloadLoading" class="filter-item" type="primary" icon="el-icon-download" @click="handleDownload">{{ $t('table.export') }}</el-button> | ||
| 10 | - <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-message" @click="handleCreate">批量发送</el-button> | 7 | + <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">{{ |
| 8 | + $t('table.search') }} | ||
| 9 | + </el-button> | ||
| 10 | + <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit" | ||
| 11 | + @click="handleCreate">{{ $t('table.add') }} | ||
| 12 | + </el-button> | ||
| 13 | + <el-button v-waves :loading="downloadLoading" class="filter-item" type="primary" icon="el-icon-download" | ||
| 14 | + @click="handleDownload">{{ $t('table.export') }} | ||
| 15 | + </el-button> | ||
| 16 | + <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-message" | ||
| 17 | + @click="handleCreate">批量发送 | ||
| 18 | + </el-button> | ||
| 11 | </div> | 19 | </div> |
| 12 | - <tree-table :data="data" :eval-func="func" :eval-args="args" :expand-all="expandAll" stripe style="font-size: 13px" border @selection-change="handleSelectionChange"> | 20 | + <tree-table :data="data" :eval-func="func" :eval-args="args" :expand-all="expandAll" stripe |
| 21 | + style="font-size: 13px" border @selection-change="handleSelectionChange"> | ||
| 13 | <el-table-column prop="waybillNo" label="主单号" width="110px" align="center" sortable> | 22 | <el-table-column prop="waybillNo" label="主单号" width="110px" align="center" sortable> |
| 14 | <template slot-scope="scope"> | 23 | <template slot-scope="scope"> |
| 15 | <span>{{ scope.row.waybillNo }}</span> | 24 | <span>{{ scope.row.waybillNo }}</span> |
| @@ -59,28 +68,37 @@ | @@ -59,28 +68,37 @@ | ||
| 59 | <template slot-scope="scope"> | 68 | <template slot-scope="scope"> |
| 60 | <span>{{ scope.row.customText }}</span> | 69 | <span>{{ scope.row.customText }}</span> |
| 61 | <div> | 70 | <div> |
| 62 | - <el-progress :percentage="scope.row.customComplate" :status="scope.row.status | statusFilter" /> | 71 | + <el-progress :percentage="scope.row.customComplate" :status="scope.row.status | statusFilter"/> |
| 63 | </div> | 72 | </div> |
| 64 | </template> | 73 | </template> |
| 65 | </el-table-column> | 74 | </el-table-column> |
| 66 | <el-table-column :label="$t('table.actions')" align="center" class-name="small-padding fixed-width"> | 75 | <el-table-column :label="$t('table.actions')" align="center" class-name="small-padding fixed-width"> |
| 67 | <template slot-scope="scope"> | 76 | <template slot-scope="scope"> |
| 68 | <el-button type="primary" size="small" @click="handleUpdate(scope.row)">快速编辑</el-button> | 77 | <el-button type="primary" size="small" @click="handleUpdate(scope.row)">快速编辑</el-button> |
| 69 | - <el-button type="primary" size="mini" @click="handleUpdate(scope.row)">{{ $t('table.edit') }}</el-button> | ||
| 70 | - <el-button v-if="scope.row.status!='41301'" size="mini" type="success" @click="handleModifyStatus(scope.row,'41301')">{{ $t('table.publish') }}</el-button> | ||
| 71 | - <el-button v-if="scope.row.status!='10002'" size="small" @click="handleModifyStatus(scope.row,'10002')">客服反馈</el-button> | ||
| 72 | - <el-button v-if="scope.row.status=='10002'" size="mini" type="danger" @click="handleModifyStatus(scope.row,'deleted')">{{ $t('table.delete') }}</el-button> | 78 | + <el-button type="primary" size="mini" @click="handleUpdate(scope.row)">{{ $t('table.edit') }} |
| 79 | + </el-button> | ||
| 80 | + <el-button v-if="scope.row.status!='41301'" size="mini" type="success" | ||
| 81 | + @click="handleModifyStatus(scope.row,'41301')">{{ $t('table.publish') }} | ||
| 82 | + </el-button> | ||
| 83 | + <el-button v-if="scope.row.status!='10002'" size="small" | ||
| 84 | + @click="handleModifyStatus(scope.row,'10002')">客服反馈 | ||
| 85 | + </el-button> | ||
| 86 | + <el-button v-if="scope.row.status=='10002'" size="mini" type="danger" | ||
| 87 | + @click="handleModifyStatus(scope.row,'deleted')">{{ $t('table.delete') }} | ||
| 88 | + </el-button> | ||
| 73 | <el-switch | 89 | <el-switch |
| 74 | v-model="resend" | 90 | v-model="resend" |
| 75 | active-color="#13ce66" | 91 | active-color="#13ce66" |
| 76 | - inactive-color="#ff4949" /> | 92 | + inactive-color="#ff4949"/> |
| 77 | </template> | 93 | </template> |
| 78 | </el-table-column> | 94 | </el-table-column> |
| 79 | </tree-table> | 95 | </tree-table> |
| 80 | - <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> | 96 | + <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" |
| 97 | + @pagination="getList"/> | ||
| 81 | 98 | ||
| 82 | <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" fullscreen="true"> | 99 | <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" fullscreen="true"> |
| 83 | - <el-form ref="" :inline="true" label-position="left" :rules="rules" :model="temp" label-width="100px" style="font-size: 13px"> | 100 | + <el-form ref="" :inline="true" label-position="left" :rules="rules" :model="temp" label-width="100px" |
| 101 | + style="font-size: 13px"> | ||
| 84 | <div> | 102 | <div> |
| 85 | <el-tag type="info" effect="plain"> | 103 | <el-tag type="info" effect="plain"> |
| 86 | 航班信息 | 104 | 航班信息 |
| @@ -93,7 +111,8 @@ | @@ -93,7 +111,8 @@ | ||
| 93 | <el-input v-model="temp.flight"/> | 111 | <el-input v-model="temp.flight"/> |
| 94 | </el-form-item> | 112 | </el-form-item> |
| 95 | <el-form-item label="航班日期" prop="flightDate"> | 113 | <el-form-item label="航班日期" prop="flightDate"> |
| 96 | - <el-date-picker :picker-options="pickerOptions" v-model="temp.flightDate" align="right" type="date" placeholder="请输入航班日期" /> | 114 | + <el-date-picker :picker-options="pickerOptions" v-model="temp.flightDate" align="right" |
| 115 | + type="date" placeholder="请输入航班日期"/> | ||
| 97 | </el-form-item> | 116 | </el-form-item> |
| 98 | </div> | 117 | </div> |
| 99 | </el-col> | 118 | </el-col> |
| @@ -171,7 +190,7 @@ | @@ -171,7 +190,7 @@ | ||
| 171 | v-model="temp.country" | 190 | v-model="temp.country" |
| 172 | filterable | 191 | filterable |
| 173 | remote | 192 | remote |
| 174 | - placeholder="请选择" > | 193 | + placeholder="请选择"> |
| 175 | <el-option | 194 | <el-option |
| 176 | v-for="item in countryOption" | 195 | v-for="item in countryOption" |
| 177 | :key="item.value" | 196 | :key="item.value" |
| @@ -186,12 +205,12 @@ | @@ -186,12 +205,12 @@ | ||
| 186 | <el-select | 205 | <el-select |
| 187 | v-model="temp.shpCompnyType" | 206 | v-model="temp.shpCompnyType" |
| 188 | filterable | 207 | filterable |
| 189 | - placeholder="请选择企业代码类型" > | 208 | + placeholder="请选择企业代码类型"> |
| 190 | <el-option | 209 | <el-option |
| 191 | v-for="item in shpCompnyTypeOption" | 210 | v-for="item in shpCompnyTypeOption" |
| 192 | :key="item.value" | 211 | :key="item.value" |
| 193 | :label="item.label" | 212 | :label="item.label" |
| 194 | - :value="item.value" /> | 213 | + :value="item.value"/> |
| 195 | </el-select> | 214 | </el-select> |
| 196 | </el-form-item> | 215 | </el-form-item> |
| 197 | <el-form-item prop="shpCity"> | 216 | <el-form-item prop="shpCity"> |
| @@ -235,7 +254,7 @@ | @@ -235,7 +254,7 @@ | ||
| 235 | v-model="temp.country" | 254 | v-model="temp.country" |
| 236 | filterable | 255 | filterable |
| 237 | remote | 256 | remote |
| 238 | - placeholder="请选择" > | 257 | + placeholder="请选择"> |
| 239 | <el-option | 258 | <el-option |
| 240 | v-for="item in countryOption" | 259 | v-for="item in countryOption" |
| 241 | :key="item.value" | 260 | :key="item.value" |
| @@ -250,12 +269,12 @@ | @@ -250,12 +269,12 @@ | ||
| 250 | <el-select | 269 | <el-select |
| 251 | v-model="temp.shpCompnyType" | 270 | v-model="temp.shpCompnyType" |
| 252 | filterable | 271 | filterable |
| 253 | - placeholder="请选择企业代码类型" > | 272 | + placeholder="请选择企业代码类型"> |
| 254 | <el-option | 273 | <el-option |
| 255 | v-for="item in shpCompnyTypeOption" | 274 | v-for="item in shpCompnyTypeOption" |
| 256 | :key="item.value" | 275 | :key="item.value" |
| 257 | :label="item.label" | 276 | :label="item.label" |
| 258 | - :value="item.value" /> | 277 | + :value="item.value"/> |
| 259 | </el-select> | 278 | </el-select> |
| 260 | </el-form-item> | 279 | </el-form-item> |
| 261 | <el-form-item prop="shpCity"> | 280 | <el-form-item prop="shpCity"> |
| @@ -274,12 +293,12 @@ | @@ -274,12 +293,12 @@ | ||
| 274 | <el-form-item label="危险品信息" prop="shpCompnyType"> | 293 | <el-form-item label="危险品信息" prop="shpCompnyType"> |
| 275 | <el-select | 294 | <el-select |
| 276 | v-model="temp.dangerGoods" | 295 | v-model="temp.dangerGoods" |
| 277 | - placeholder="请选择危险品类型" > | 296 | + placeholder="请选择危险品类型"> |
| 278 | <el-option | 297 | <el-option |
| 279 | v-for="item in dangerGoods" | 298 | v-for="item in dangerGoods" |
| 280 | :key="item.value" | 299 | :key="item.value" |
| 281 | :label="item.label" | 300 | :label="item.label" |
| 282 | - :value="item.value" > | 301 | + :value="item.value"> |
| 283 | <span style="float: left">{{ item.label }}</span> | 302 | <span style="float: left">{{ item.label }}</span> |
| 284 | <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span> | 303 | <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span> |
| 285 | </el-option> | 304 | </el-option> |
| @@ -300,12 +319,12 @@ | @@ -300,12 +319,12 @@ | ||
| 300 | <el-form-item label="包装" prop="shpCompnyType"> | 319 | <el-form-item label="包装" prop="shpCompnyType"> |
| 301 | <el-select | 320 | <el-select |
| 302 | v-model="temp.goodsPackage" | 321 | v-model="temp.goodsPackage" |
| 303 | - placeholder="请选择包装类型" > | 322 | + placeholder="请选择包装类型"> |
| 304 | <el-option | 323 | <el-option |
| 305 | v-for="item in goodsPackage" | 324 | v-for="item in goodsPackage" |
| 306 | :key="item.value" | 325 | :key="item.value" |
| 307 | :label="item.label" | 326 | :label="item.label" |
| 308 | - :value="item.value" /> | 327 | + :value="item.value"/> |
| 309 | </el-select> | 328 | </el-select> |
| 310 | </el-form-item> | 329 | </el-form-item> |
| 311 | <el-form-item label="尺寸" prop="shpCity"> | 330 | <el-form-item label="尺寸" prop="shpCity"> |
| @@ -338,7 +357,9 @@ | @@ -338,7 +357,9 @@ | ||
| 338 | 357 | ||
| 339 | <div slot="footer" class="dialog-footer"> | 358 | <div slot="footer" class="dialog-footer"> |
| 340 | <el-button @click="dialogFormVisible = false">{{ $t('table.cancel') }}</el-button> | 359 | <el-button @click="dialogFormVisible = false">{{ $t('table.cancel') }}</el-button> |
| 341 | - <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">{{ $t('table.confirm') }}</el-button> | 360 | + <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">{{ |
| 361 | + $t('table.confirm') }} | ||
| 362 | + </el-button> | ||
| 342 | </div> | 363 | </div> |
| 343 | </el-dialog> | 364 | </el-dialog> |
| 344 | 365 | ||
| @@ -346,43 +367,44 @@ | @@ -346,43 +367,44 @@ | ||
| 346 | </template> | 367 | </template> |
| 347 | 368 | ||
| 348 | <script> | 369 | <script> |
| 349 | -/** | 370 | + /** |
| 350 | Auth: Lei.j1ang | 371 | Auth: Lei.j1ang |
| 351 | Created: 2018/1/19-14:54 | 372 | Created: 2018/1/19-14:54 |
| 352 | -*/ | ||
| 353 | -import { fetchList } from '@/api/article' | ||
| 354 | -import treeTable from '@/components/TreeTable' | ||
| 355 | -import treeToArray from './customEval' | ||
| 356 | -import Pagination from '@/components/Pagination' | ||
| 357 | -import waves from '@/directive/waves' // Waves directive | ||
| 358 | -import country from '@/utils/country.js' | ||
| 359 | -import companyType from '@/utils/companyType.js' | ||
| 360 | -import dangerGoods from '@/utils/dangerGoods.js' | ||
| 361 | -import goodsPackage from '@/utils/goodsPackage.js' | ||
| 362 | -import excel from '@/vendor/Export2Excel' | ||
| 363 | -import { parseTime } from '@/utils' | ||
| 364 | -const calendarTypeOptions = [ | ||
| 365 | - { key: 'CN', display_name: 'China' }, | ||
| 366 | - { key: 'US', display_name: 'USA' }, | ||
| 367 | - { key: 'JP', display_name: 'Japan' }, | ||
| 368 | - { key: 'EU', display_name: 'Eurozone' } | ||
| 369 | -] | 373 | + */ |
| 374 | + import {fetchList} from '@/api/article' | ||
| 375 | + import treeTable from '@/components/TreeTable' | ||
| 376 | + import treeToArray from './customEval' | ||
| 377 | + import Pagination from '@/components/Pagination' | ||
| 378 | + import waves from '@/directive/waves' // Waves directive | ||
| 379 | + import country from '@/utils/country.js' | ||
| 380 | + import companyType from '@/utils/companyType.js' | ||
| 381 | + import dangerGoods from '@/utils/dangerGoods.js' | ||
| 382 | + import goodsPackage from '@/utils/goodsPackage.js' | ||
| 383 | + import excel from '@/vendor/Export2Excel' | ||
| 384 | + import {parseTime} from '@/utils' | ||
| 385 | + | ||
| 386 | + const calendarTypeOptions = [ | ||
| 387 | + {key: 'CN', display_name: 'China'}, | ||
| 388 | + {key: 'US', display_name: 'USA'}, | ||
| 389 | + {key: 'JP', display_name: 'Japan'}, | ||
| 390 | + {key: 'EU', display_name: 'Eurozone'} | ||
| 391 | + ] | ||
| 370 | 392 | ||
| 371 | -// arr to obj ,such as { CN : "China", US : "USA" } | ||
| 372 | -const calendarTypeKeyValue = calendarTypeOptions.reduce((acc, cur) => { | 393 | + // arr to obj ,such as { CN : "China", US : "USA" } |
| 394 | + const calendarTypeKeyValue = calendarTypeOptions.reduce((acc, cur) => { | ||
| 373 | acc[cur.key] = cur.display_name | 395 | acc[cur.key] = cur.display_name |
| 374 | return acc | 396 | return acc |
| 375 | -}, {}) | 397 | + }, {}) |
| 376 | 398 | ||
| 377 | -treeTable.expandAll = { | 399 | + treeTable.expandAll = { |
| 378 | type: Boolean, | 400 | type: Boolean, |
| 379 | default: false | 401 | default: false |
| 380 | -} | 402 | + } |
| 381 | 403 | ||
| 382 | -export default { | 404 | + export default { |
| 383 | name: 'CustomTreeTableDemo', | 405 | name: 'CustomTreeTableDemo', |
| 384 | - components: { treeTable, Pagination }, | ||
| 385 | - directives: { waves }, | 406 | + components: {treeTable, Pagination}, |
| 407 | + directives: {waves}, | ||
| 386 | filters: { | 408 | filters: { |
| 387 | statusFilter(status) { | 409 | statusFilter(status) { |
| 388 | const statusMap = { | 410 | const statusMap = { |
| @@ -570,14 +592,14 @@ export default { | @@ -570,14 +592,14 @@ export default { | ||
| 570 | }, | 592 | }, |
| 571 | args: [null, null, 'timeLine'], | 593 | args: [null, null, 'timeLine'], |
| 572 | rules: { | 594 | rules: { |
| 573 | - maniWeight: [{ type: 'number', required: true, message: '重量必须为数字', trigger: 'blur' }], | ||
| 574 | - maniPiece: [{ type: 'number', required: true, message: '件数必须为数字', trigger: 'blur' }], | ||
| 575 | - desStation: [{ required: true, message: '运单目的地必须输入', trigger: 'blur' }], | ||
| 576 | - oriStation: [{ required: true, message: '运单起始站必须数据', trigger: 'change' }], | ||
| 577 | - flightDate: [{ type: 'date', required: true, message: '航班日期必须输入', trigger: 'change' }], | ||
| 578 | - flight: [{ required: true, message: '航班号必须输入', trigger: 'blur' }], | ||
| 579 | - custom: [{ required: true, message: '关区代码必须选择', trigger: 'change' }], | ||
| 580 | - waybillNo: [{ required: true, message: '运单号必须输入', trigger: 'blur' }] | 595 | + maniWeight: [{type: 'number', required: true, message: '重量必须为数字', trigger: 'blur'}], |
| 596 | + maniPiece: [{type: 'number', required: true, message: '件数必须为数字', trigger: 'blur'}], | ||
| 597 | + desStation: [{required: true, message: '运单目的地必须输入', trigger: 'blur'}], | ||
| 598 | + oriStation: [{required: true, message: '运单起始站必须数据', trigger: 'change'}], | ||
| 599 | + flightDate: [{type: 'date', required: true, message: '航班日期必须输入', trigger: 'change'}], | ||
| 600 | + flight: [{required: true, message: '航班号必须输入', trigger: 'blur'}], | ||
| 601 | + custom: [{required: true, message: '关区代码必须选择', trigger: 'change'}], | ||
| 602 | + waybillNo: [{required: true, message: '运单号必须输入', trigger: 'blur'}] | ||
| 581 | } | 603 | } |
| 582 | } | 604 | } |
| 583 | }, | 605 | }, |
| @@ -586,7 +608,7 @@ export default { | @@ -586,7 +608,7 @@ export default { | ||
| 586 | this.$message.info(row.event) | 608 | this.$message.info(row.event) |
| 587 | }, | 609 | }, |
| 588 | sortChange(data) { | 610 | sortChange(data) { |
| 589 | - const { prop, order } = data | 611 | + const {prop, order} = data |
| 590 | if (prop === 'id') { | 612 | if (prop === 'id') { |
| 591 | this.sortByID(order) | 613 | this.sortByID(order) |
| 592 | } | 614 | } |
| @@ -687,39 +709,49 @@ export default { | @@ -687,39 +709,49 @@ export default { | ||
| 687 | } | 709 | } |
| 688 | } | 710 | } |
| 689 | } | 711 | } |
| 690 | -} | 712 | + } |
| 691 | </script> | 713 | </script> |
| 692 | <style> | 714 | <style> |
| 693 | .el-row { | 715 | .el-row { |
| 694 | margin-bottom: 20px; | 716 | margin-bottom: 20px; |
| 695 | - &:last-child { | 717 | + |
| 718 | + & | ||
| 719 | + :last-child { | ||
| 696 | margin-bottom: 0; | 720 | margin-bottom: 0; |
| 697 | } | 721 | } |
| 722 | + | ||
| 698 | } | 723 | } |
| 699 | .el-col { | 724 | .el-col { |
| 700 | border-radius: 4px; | 725 | border-radius: 4px; |
| 701 | } | 726 | } |
| 727 | + | ||
| 702 | .bg-purple-dark { | 728 | .bg-purple-dark { |
| 703 | background: #99a9bf; | 729 | background: #99a9bf; |
| 704 | } | 730 | } |
| 731 | + | ||
| 705 | .bg-purple { | 732 | .bg-purple { |
| 706 | background: #d3dce6; | 733 | background: #d3dce6; |
| 707 | } | 734 | } |
| 735 | + | ||
| 708 | .bg-purple-light { | 736 | .bg-purple-light { |
| 709 | background: #e5e9f2; | 737 | background: #e5e9f2; |
| 710 | } | 738 | } |
| 739 | + | ||
| 711 | .grid-content { | 740 | .grid-content { |
| 712 | border-radius: 4px; | 741 | border-radius: 4px; |
| 713 | min-height: 36px; | 742 | min-height: 36px; |
| 714 | } | 743 | } |
| 744 | + | ||
| 715 | .row-bg { | 745 | .row-bg { |
| 716 | padding: 10px 0; | 746 | padding: 10px 0; |
| 717 | background-color: #f9fafc; | 747 | background-color: #f9fafc; |
| 718 | } | 748 | } |
| 719 | - .el-progress.is-warning .el-progress-bar__inner{ | ||
| 720 | - background-color:#E6A23C | 749 | + |
| 750 | + .el-progress.is-warning .el-progress-bar__inner { | ||
| 751 | + background-color: #E6A23C | ||
| 721 | } | 752 | } |
| 722 | - .remark textarea{ | 753 | + |
| 754 | + .remark textarea { | ||
| 723 | width: 600px; | 755 | width: 600px; |
| 724 | } | 756 | } |
| 725 | </style> | 757 | </style> |
| 1 | /** | 1 | /** |
| 2 | -* @Author: jianglei | ||
| 3 | -* @Date: 2017-10-12 12:06:49 | ||
| 4 | -*/ | 2 | + * @Author: jianglei |
| 3 | + * @Date: 2017-10-12 12:06:49 | ||
| 4 | + */ | ||
| 5 | 'use strict' | 5 | 'use strict' |
| 6 | import Vue from 'vue' | 6 | import Vue from 'vue' |
| 7 | + | ||
| 7 | export default function treeToArray(data, expandAll, parent, level, item) { | 8 | export default function treeToArray(data, expandAll, parent, level, item) { |
| 8 | const marLTemp = [] | 9 | const marLTemp = [] |
| 9 | let tmp = [] | 10 | let tmp = [] |
| 10 | - Array.from(data).forEach(function(record) { | 11 | + Array.from(data).forEach(function (record) { |
| 11 | if (record._expanded === undefined) { | 12 | if (record._expanded === undefined) { |
| 12 | Vue.set(record, '_expanded', expandAll) | 13 | Vue.set(record, '_expanded', expandAll) |
| 13 | } | 14 | } |
| @@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
| 37 | drawColumnChart() { | 37 | drawColumnChart() { |
| 38 | this.chartColumn = echarts.init(document.getElementById('chartColumn')); | 38 | this.chartColumn = echarts.init(document.getElementById('chartColumn')); |
| 39 | this.chartColumn.setOption({ | 39 | this.chartColumn.setOption({ |
| 40 | - title: { text: 'Column Chart' }, | 40 | + title: {text: 'Column Chart'}, |
| 41 | tooltip: {}, | 41 | tooltip: {}, |
| 42 | xAxis: { | 42 | xAxis: { |
| 43 | data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"] | 43 | data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"] |
| @@ -166,11 +166,11 @@ | @@ -166,11 +166,11 @@ | ||
| 166 | radius: '55%', | 166 | radius: '55%', |
| 167 | center: ['50%', '60%'], | 167 | center: ['50%', '60%'], |
| 168 | data: [ | 168 | data: [ |
| 169 | - { value: 335, name: '直接访问' }, | ||
| 170 | - { value: 310, name: '邮件营销' }, | ||
| 171 | - { value: 234, name: '联盟广告' }, | ||
| 172 | - { value: 135, name: '视频广告' }, | ||
| 173 | - { value: 1548, name: '搜索引擎' } | 169 | + {value: 335, name: '直接访问'}, |
| 170 | + {value: 310, name: '邮件营销'}, | ||
| 171 | + {value: 234, name: '联盟广告'}, | ||
| 172 | + {value: 135, name: '视频广告'}, | ||
| 173 | + {value: 1548, name: '搜索引擎'} | ||
| 174 | ], | 174 | ], |
| 175 | itemStyle: { | 175 | itemStyle: { |
| 176 | emphasis: { | 176 | emphasis: { |
| @@ -205,6 +205,7 @@ | @@ -205,6 +205,7 @@ | ||
| 205 | width: 100%; | 205 | width: 100%; |
| 206 | float: left; | 206 | float: left; |
| 207 | } | 207 | } |
| 208 | + | ||
| 208 | /*.chart div { | 209 | /*.chart div { |
| 209 | height: 400px; | 210 | height: 400px; |
| 210 | float: left; | 211 | float: left; |
| @@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
| 20 | style="width: 100%;margin-bottom: 20px;" | 20 | style="width: 100%;margin-bottom: 20px;" |
| 21 | row-key="id" | 21 | row-key="id" |
| 22 | border | 22 | border |
| 23 | - v-loading = "listLoading" | 23 | + v-loading="listLoading" |
| 24 | lazy | 24 | lazy |
| 25 | :load="load" | 25 | :load="load" |
| 26 | :row-class-name="tableRowClassName" | 26 | :row-class-name="tableRowClassName" |
| @@ -41,7 +41,9 @@ | @@ -41,7 +41,9 @@ | ||
| 41 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | 41 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| 42 | <template slot-scope="scope"> | 42 | <template slot-scope="scope"> |
| 43 | <!--<el-button type="primary" size="small" @click="handleUpdate(scope.row)">快速编辑</el-button>--> | 43 | <!--<el-button type="primary" size="small" @click="handleUpdate(scope.row)">快速编辑</el-button>--> |
| 44 | - <el-button v-if="scope.row.type=='3'" disabled type="primary" size="small" @click="handleAdd(scope.row)">新增</el-button> | 44 | + <el-button v-if="scope.row.type=='3'" disabled type="primary" size="small" |
| 45 | + @click="handleAdd(scope.row)">新增 | ||
| 46 | + </el-button> | ||
| 45 | <el-button v-else type="primary" size="small" @click="handleAdd(scope.row)">新增</el-button> | 47 | <el-button v-else type="primary" size="small" @click="handleAdd(scope.row)">新增</el-button> |
| 46 | <el-button size="mini" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button> | 48 | <el-button size="mini" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button> |
| 47 | <el-button size="mini" type="danger" @click="handleDel(scope.row)">删除</el-button> | 49 | <el-button size="mini" type="danger" @click="handleDel(scope.row)">删除</el-button> |
| @@ -49,11 +51,18 @@ | @@ -49,11 +51,18 @@ | ||
| 49 | <!--<el-button v-if="scope.row.type=='3'" type="primary" size="small" @click="pay(scope.row)">缴费</el-button>--> | 51 | <!--<el-button v-if="scope.row.type=='3'" type="primary" size="small" @click="pay(scope.row)">缴费</el-button>--> |
| 50 | <!--<el-button v-else disabled="" type="primary" size="small" @click="pay(scope.row)">缴费</el-button>--> | 52 | <!--<el-button v-else disabled="" type="primary" size="small" @click="pay(scope.row)">缴费</el-button>--> |
| 51 | 53 | ||
| 52 | - <el-button v-if="scope.row.type=='3'" type="primary" size="small" @click="waterMeter(scope.row)">水表实时信息</el-button> | ||
| 53 | - <el-button v-else disabled="" type="primary" size="small" @click="waterMeter(scope.row)">水表实时信息</el-button> | 54 | + <el-button v-if="scope.row.type=='3'" type="primary" size="small" @click="waterMeter(scope.row)"> |
| 55 | + 水表实时信息 | ||
| 56 | + </el-button> | ||
| 57 | + <el-button v-else disabled="" type="primary" size="small" @click="waterMeter(scope.row)">水表实时信息 | ||
| 58 | + </el-button> | ||
| 54 | 59 | ||
| 55 | - <el-button v-if="scope.row.type=='3'" type="primary" size="small" @click="electicityInfo(scope.row)">电表实时信息</el-button> | ||
| 56 | - <el-button v-else disabled="" type="primary" size="small" @click="electicityInfo(scope.row)">电表实时信息</el-button> | 60 | + <el-button v-if="scope.row.type=='3'" type="primary" size="small" |
| 61 | + @click="electicityInfo(scope.row)">电表实时信息 | ||
| 62 | + </el-button> | ||
| 63 | + <el-button v-else disabled="" type="primary" size="small" @click="electicityInfo(scope.row)"> | ||
| 64 | + 电表实时信息 | ||
| 65 | + </el-button> | ||
| 57 | 66 | ||
| 58 | <!--<el-button v-if="scope.row.type=='3'" type="primary" size="small" @click="electrixityMeterConfiguration(scope.row)">电表参数配置</el-button>--> | 67 | <!--<el-button v-if="scope.row.type=='3'" type="primary" size="small" @click="electrixityMeterConfiguration(scope.row)">电表参数配置</el-button>--> |
| 59 | <!--<el-button v-else type="primary" disabled="" size="small" @click="electrixityMeterConfiguration(scope.row)">电表参数配置</el-button>--> | 68 | <!--<el-button v-else type="primary" disabled="" size="small" @click="electrixityMeterConfiguration(scope.row)">电表参数配置</el-button>--> |
| @@ -67,7 +76,8 @@ | @@ -67,7 +76,8 @@ | ||
| 67 | <!--工具条--> | 76 | <!--工具条--> |
| 68 | <el-col :span="24" class="toolbar"> | 77 | <el-col :span="24" class="toolbar"> |
| 69 | <!--<el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button>--> | 78 | <!--<el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button>--> |
| 70 | - <el-pagination layout="prev, pager, next" @current-change="handleCurrentChange" :page-size="5" :total="total" style="float:right;"> | 79 | + <el-pagination layout="prev, pager, next" @current-change="handleCurrentChange" :page-size="5" |
| 80 | + :total="total" style="float:right;"> | ||
| 71 | </el-pagination> | 81 | </el-pagination> |
| 72 | </el-col> | 82 | </el-col> |
| 73 | 83 | ||
| @@ -95,7 +105,9 @@ | @@ -95,7 +105,9 @@ | ||
| 95 | inactive-text="否" | 105 | inactive-text="否" |
| 96 | inactive-value="0"> | 106 | inactive-value="0"> |
| 97 | </el-switch> | 107 | </el-switch> |
| 98 | - <span>告警阀值</span> <el-input v-model="electrixityAddForm.warningthreshold" style="width: 100px;" auto-complete="off"></el-input> <span>元</span> | 108 | + <span>告警阀值</span> <el-input |
| 109 | + v-model="electrixityAddForm.warningthreshold" style="width: 100px;" | ||
| 110 | + auto-complete="off"></el-input> <span>元</span> | ||
| 99 | </el-form-item> | 111 | </el-form-item> |
| 100 | <el-form-item label="透支使能" prop="overdraft"> | 112 | <el-form-item label="透支使能" prop="overdraft"> |
| 101 | <el-switch | 113 | <el-switch |
| @@ -107,7 +119,9 @@ | @@ -107,7 +119,9 @@ | ||
| 107 | inactive-text="否" | 119 | inactive-text="否" |
| 108 | inactive-value="0"> | 120 | inactive-value="0"> |
| 109 | </el-switch> | 121 | </el-switch> |
| 110 | - <span>可透支额度</span> <el-input v-model="electrixityAddForm.overdraftthreshold" style="width: 100px;" auto-complete="off"></el-input> <span>元</span> | 122 | + <span>可透支额度</span> <el-input |
| 123 | + v-model="electrixityAddForm.overdraftthreshold" style="width: 100px;" | ||
| 124 | + auto-complete="off"></el-input> <span>元</span> | ||
| 111 | </el-form-item> | 125 | </el-form-item> |
| 112 | <el-form-item label="过负荷跳闸使能" prop="overdraft"> | 126 | <el-form-item label="过负荷跳闸使能" prop="overdraft"> |
| 113 | <el-switch | 127 | <el-switch |
| @@ -119,10 +133,12 @@ | @@ -119,10 +133,12 @@ | ||
| 119 | inactive-text="否" | 133 | inactive-text="否" |
| 120 | inactive-value="0"> | 134 | inactive-value="0"> |
| 121 | </el-switch> | 135 | </el-switch> |
| 122 | - <span>功率</span> <el-input v-model="electrixityAddForm.power" style="width: 100px;" auto-complete="off"></el-input> <span>KW</span> | 136 | + <span>功率</span> <el-input |
| 137 | + v-model="electrixityAddForm.power" style="width: 100px;" auto-complete="off"></el-input> <span>KW</span> | ||
| 123 | <br/> | 138 | <br/> |
| 124 | <br/> | 139 | <br/> |
| 125 | - <span>功率因数</span> <el-input v-model="electrixityAddForm.powerfactor" style="width: 100px;" auto-complete="off"></el-input> | 140 | + <span>功率因数</span> <el-input |
| 141 | + v-model="electrixityAddForm.powerfactor" style="width: 100px;" auto-complete="off"></el-input> | ||
| 126 | </el-form-item> | 142 | </el-form-item> |
| 127 | <el-form-item label="免费电度使能" prop="overdraft"> | 143 | <el-form-item label="免费电度使能" prop="overdraft"> |
| 128 | <el-switch | 144 | <el-switch |
| @@ -134,7 +150,9 @@ | @@ -134,7 +150,9 @@ | ||
| 134 | inactive-text="否" | 150 | inactive-text="否" |
| 135 | inactive-value="0"> | 151 | inactive-value="0"> |
| 136 | </el-switch> | 152 | </el-switch> |
| 137 | - <span>免费电度</span> <el-input v-model="electrixityAddForm.freeelectricitylimit" style="width: 100px;" auto-complete="off"></el-input> <span>度</span> | 153 | + <span>免费电度</span> <el-input |
| 154 | + v-model="electrixityAddForm.freeelectricitylimit" style="width: 100px;" | ||
| 155 | + auto-complete="off"></el-input> <span>度</span> | ||
| 138 | </el-form-item> | 156 | </el-form-item> |
| 139 | </el-form> | 157 | </el-form> |
| 140 | <div slot="footer" class="dialog-footer"> | 158 | <div slot="footer" class="dialog-footer"> |
| @@ -144,15 +162,12 @@ | @@ -144,15 +162,12 @@ | ||
| 144 | </el-dialog> | 162 | </el-dialog> |
| 145 | 163 | ||
| 146 | 164 | ||
| 147 | - | ||
| 148 | - | ||
| 149 | - | ||
| 150 | - | ||
| 151 | <!--电表参数配置修改--> | 165 | <!--电表参数配置修改--> |
| 152 | <el-dialog title="电表参数配置新增" :visible.sync="electrixityeditFormVisible" :close-on-click-modal="false"> | 166 | <el-dialog title="电表参数配置新增" :visible.sync="electrixityeditFormVisible" :close-on-click-modal="false"> |
| 153 | <el-form :model="electrixityeditForm" label-width="110px" :rules="editFormRules" ref="electrixityeditForm"> | 167 | <el-form :model="electrixityeditForm" label-width="110px" :rules="editFormRules" ref="electrixityeditForm"> |
| 154 | <el-form-item label="电表编号" prop="companyName"> | 168 | <el-form-item label="电表编号" prop="companyName"> |
| 155 | - <el-input v-model="electrixityeditForm.eeId" auto-complete="off" style="width: 40%" disabled></el-input> | 169 | + <el-input v-model="electrixityeditForm.eeId" auto-complete="off" style="width: 40%" |
| 170 | + disabled></el-input> | ||
| 156 | </el-form-item> | 171 | </el-form-item> |
| 157 | <el-form-item label="水电预付费" prop="prepaid"> | 172 | <el-form-item label="水电预付费" prop="prepaid"> |
| 158 | <el-switch | 173 | <el-switch |
| @@ -176,7 +191,9 @@ | @@ -176,7 +191,9 @@ | ||
| 176 | inactive-text="否" | 191 | inactive-text="否" |
| 177 | :inactive-value="false"> | 192 | :inactive-value="false"> |
| 178 | </el-switch> | 193 | </el-switch> |
| 179 | - <span>告警阀值</span> <el-input v-model="electrixityeditForm.warningthreshold" style="width: 100px;" auto-complete="off"></el-input> <span>元</span> | 194 | + <span>告警阀值</span> <el-input |
| 195 | + v-model="electrixityeditForm.warningthreshold" style="width: 100px;" | ||
| 196 | + auto-complete="off"></el-input> <span>元</span> | ||
| 180 | </el-form-item> | 197 | </el-form-item> |
| 181 | <el-form-item label="透支使能" prop="overdraft"> | 198 | <el-form-item label="透支使能" prop="overdraft"> |
| 182 | <el-switch | 199 | <el-switch |
| @@ -188,7 +205,9 @@ | @@ -188,7 +205,9 @@ | ||
| 188 | inactive-text="否" | 205 | inactive-text="否" |
| 189 | :inactive-value="false"> | 206 | :inactive-value="false"> |
| 190 | </el-switch> | 207 | </el-switch> |
| 191 | - <span>可透支额度</span> <el-input v-model="electrixityeditForm.overdraftthreshold" style="width: 100px;" auto-complete="off"></el-input> <span>元</span> | 208 | + <span>可透支额度</span> <el-input |
| 209 | + v-model="electrixityeditForm.overdraftthreshold" style="width: 100px;" | ||
| 210 | + auto-complete="off"></el-input> <span>元</span> | ||
| 192 | </el-form-item> | 211 | </el-form-item> |
| 193 | <el-form-item label="过负荷跳闸使能" prop="overdraft"> | 212 | <el-form-item label="过负荷跳闸使能" prop="overdraft"> |
| 194 | <el-switch | 213 | <el-switch |
| @@ -200,10 +219,12 @@ | @@ -200,10 +219,12 @@ | ||
| 200 | inactive-text="否" | 219 | inactive-text="否" |
| 201 | :inactive-value="false"> | 220 | :inactive-value="false"> |
| 202 | </el-switch> | 221 | </el-switch> |
| 203 | - <span>功率</span> <el-input v-model="electrixityeditForm.power" style="width: 100px;" auto-complete="off"></el-input> <span>KW</span> | 222 | + <span>功率</span> <el-input |
| 223 | + v-model="electrixityeditForm.power" style="width: 100px;" auto-complete="off"></el-input> <span>KW</span> | ||
| 204 | <br/> | 224 | <br/> |
| 205 | <br/> | 225 | <br/> |
| 206 | - <span>功率因数</span> <el-input v-model="electrixityeditForm.powerfactor" style="width: 100px;" auto-complete="off"></el-input> | 226 | + <span>功率因数</span> <el-input |
| 227 | + v-model="electrixityeditForm.powerfactor" style="width: 100px;" auto-complete="off"></el-input> | ||
| 207 | </el-form-item> | 228 | </el-form-item> |
| 208 | <el-form-item label="免费电度使能" prop="overdraft"> | 229 | <el-form-item label="免费电度使能" prop="overdraft"> |
| 209 | <el-switch | 230 | <el-switch |
| @@ -215,7 +236,9 @@ | @@ -215,7 +236,9 @@ | ||
| 215 | inactive-text="否" | 236 | inactive-text="否" |
| 216 | :inactive-value="false"> | 237 | :inactive-value="false"> |
| 217 | </el-switch> | 238 | </el-switch> |
| 218 | - <span>免费电度</span> <el-input v-model="electrixityeditForm.freeelectricitylimit" style="width: 100px;" auto-complete="off"></el-input> <span>度</span> | 239 | + <span>免费电度</span> <el-input |
| 240 | + v-model="electrixityeditForm.freeelectricitylimit" style="width: 100px;" | ||
| 241 | + auto-complete="off"></el-input> <span>度</span> | ||
| 219 | </el-form-item> | 242 | </el-form-item> |
| 220 | </el-form> | 243 | </el-form> |
| 221 | <div slot="footer" class="dialog-footer"> | 244 | <div slot="footer" class="dialog-footer"> |
| @@ -228,22 +251,22 @@ | @@ -228,22 +251,22 @@ | ||
| 228 | <el-dialog title="水表实施信息" :visible.sync="waterMeterVisible" :close-on-click-modal="false"> | 251 | <el-dialog title="水表实施信息" :visible.sync="waterMeterVisible" :close-on-click-modal="false"> |
| 229 | <el-form :model="waterMaterForm" label-width="100px" ref="waterMaterForm"> | 252 | <el-form :model="waterMaterForm" label-width="100px" ref="waterMaterForm"> |
| 230 | <el-form-item label="水表编号" prop="wmId"> | 253 | <el-form-item label="水表编号" prop="wmId"> |
| 231 | - <el-input v-model="waterMaterForm.wmId" auto-complete="off" ></el-input> | 254 | + <el-input v-model="waterMaterForm.wmId" auto-complete="off"></el-input> |
| 232 | </el-form-item> | 255 | </el-form-item> |
| 233 | <el-form-item label="累计充值量" prop="wmSacc"> | 256 | <el-form-item label="累计充值量" prop="wmSacc"> |
| 234 | - <el-input v-model="waterMaterForm.wmSacc" auto-complete="off" ></el-input> | 257 | + <el-input v-model="waterMaterForm.wmSacc" auto-complete="off"></el-input> |
| 235 | </el-form-item> | 258 | </el-form-item> |
| 236 | <el-form-item label="累计流量" prop="wmLacc"> | 259 | <el-form-item label="累计流量" prop="wmLacc"> |
| 237 | <el-input v-model="waterMaterForm.wmLacc" auto-complete="off"></el-input> | 260 | <el-input v-model="waterMaterForm.wmLacc" auto-complete="off"></el-input> |
| 238 | </el-form-item> | 261 | </el-form-item> |
| 239 | <el-form-item label="上传时间" prop="wmRdtime"> | 262 | <el-form-item label="上传时间" prop="wmRdtime"> |
| 240 | - <el-input v-model="waterMaterForm.wmRdtime" auto-complete="off" ></el-input> | 263 | + <el-input v-model="waterMaterForm.wmRdtime" auto-complete="off"></el-input> |
| 241 | </el-form-item> | 264 | </el-form-item> |
| 242 | <el-form-item label="阀门状态" prop="wmFmstate"> | 265 | <el-form-item label="阀门状态" prop="wmFmstate"> |
| 243 | <el-input v-model="waterMaterForm.wmFmstate" auto-complete="off"></el-input> | 266 | <el-input v-model="waterMaterForm.wmFmstate" auto-complete="off"></el-input> |
| 244 | </el-form-item> | 267 | </el-form-item> |
| 245 | <el-form-item label="故障状态" prop="wmErrmessage"> | 268 | <el-form-item label="故障状态" prop="wmErrmessage"> |
| 246 | - <el-input v-model="waterMaterForm.wmErrmessage" auto-complete="off" ></el-input> | 269 | + <el-input v-model="waterMaterForm.wmErrmessage" auto-complete="off"></el-input> |
| 247 | </el-form-item> | 270 | </el-form-item> |
| 248 | <el-form-item label="电压" prop="wmVoltage"> | 271 | <el-form-item label="电压" prop="wmVoltage"> |
| 249 | <el-input v-model="waterMaterForm.wmVoltage" auto-complete="off"></el-input> | 272 | <el-input v-model="waterMaterForm.wmVoltage" auto-complete="off"></el-input> |
| @@ -259,24 +282,24 @@ | @@ -259,24 +282,24 @@ | ||
| 259 | 282 | ||
| 260 | <!--电表实时信息--> | 283 | <!--电表实时信息--> |
| 261 | <el-dialog title="电表实施信息" :visible.sync="electrixityeditFormVisible" :close-on-click-modal="false"> | 284 | <el-dialog title="电表实施信息" :visible.sync="electrixityeditFormVisible" :close-on-click-modal="false"> |
| 262 | - <el-form v-loading = "electrixityLoading" :model="electricityForm" label-width="100px" ref="waterMaterForm"> | 285 | + <el-form v-loading="electrixityLoading" :model="electricityForm" label-width="100px" ref="waterMaterForm"> |
| 263 | <el-form-item label="电表编号" prop="deviceId"> | 286 | <el-form-item label="电表编号" prop="deviceId"> |
| 264 | - <el-input v-model="electricityForm.deviceId" auto-complete="off" ></el-input> | 287 | + <el-input v-model="electricityForm.deviceId" auto-complete="off"></el-input> |
| 265 | </el-form-item> | 288 | </el-form-item> |
| 266 | <el-form-item label="总" prop="totalEnergy"> | 289 | <el-form-item label="总" prop="totalEnergy"> |
| 267 | - <el-input v-model="electricityForm.totalEnergy" auto-complete="off" ></el-input> | 290 | + <el-input v-model="electricityForm.totalEnergy" auto-complete="off"></el-input> |
| 268 | </el-form-item> | 291 | </el-form-item> |
| 269 | <el-form-item label="尖" prop="tipEnergy"> | 292 | <el-form-item label="尖" prop="tipEnergy"> |
| 270 | <el-input v-model="electricityForm.tipEnergy" auto-complete="off"></el-input> | 293 | <el-input v-model="electricityForm.tipEnergy" auto-complete="off"></el-input> |
| 271 | </el-form-item> | 294 | </el-form-item> |
| 272 | <el-form-item label="峰" prop="peakEnergy"> | 295 | <el-form-item label="峰" prop="peakEnergy"> |
| 273 | - <el-input v-model="electricityForm.peakEnergy" auto-complete="off" ></el-input> | 296 | + <el-input v-model="electricityForm.peakEnergy" auto-complete="off"></el-input> |
| 274 | </el-form-item> | 297 | </el-form-item> |
| 275 | <el-form-item label="谷" prop="valleyEnergy"> | 298 | <el-form-item label="谷" prop="valleyEnergy"> |
| 276 | <el-input v-model="electricityForm.valleyEnergy" auto-complete="off"></el-input> | 299 | <el-input v-model="electricityForm.valleyEnergy" auto-complete="off"></el-input> |
| 277 | </el-form-item> | 300 | </el-form-item> |
| 278 | <el-form-item label="平" prop="flatEnergy"> | 301 | <el-form-item label="平" prop="flatEnergy"> |
| 279 | - <el-input v-model="electricityForm.flatEnergy" auto-complete="off" ></el-input> | 302 | + <el-input v-model="electricityForm.flatEnergy" auto-complete="off"></el-input> |
| 280 | </el-form-item> | 303 | </el-form-item> |
| 281 | <el-form-item label="余额" prop="balance"> | 304 | <el-form-item label="余额" prop="balance"> |
| 282 | <el-input v-model="electricityForm.balance" auto-complete="off"></el-input> | 305 | <el-input v-model="electricityForm.balance" auto-complete="off"></el-input> |
| @@ -333,7 +356,6 @@ | @@ -333,7 +356,6 @@ | ||
| 333 | </el-form-item> | 356 | </el-form-item> |
| 334 | 357 | ||
| 335 | 358 | ||
| 336 | - | ||
| 337 | </el-form> | 359 | </el-form> |
| 338 | <div slot="footer" class="dialog-footer"> | 360 | <div slot="footer" class="dialog-footer"> |
| 339 | <el-button @click.native="editFormLocationVisible = false">取消</el-button> | 361 | <el-button @click.native="editFormLocationVisible = false">取消</el-button> |
| @@ -357,9 +379,9 @@ | @@ -357,9 +379,9 @@ | ||
| 357 | } | 379 | } |
| 358 | </style> | 380 | </style> |
| 359 | <script> | 381 | <script> |
| 360 | - import { getList,add, remove, edit as editLocation} from '@/api/empt/location_api'; | 382 | + import {getList, add, remove, edit as editLocation} from '@/api/empt/location_api'; |
| 361 | import {add as electicity, getEEModel, edit, electricityInfo} from '@/api/empt/electricityParams'; | 383 | import {add as electicity, getEEModel, edit, electricityInfo} from '@/api/empt/electricityParams'; |
| 362 | - import {findRealTime, waterMeterAll } from '@/api/empt/waterMeter'; | 384 | + import {findRealTime, waterMeterAll} from '@/api/empt/waterMeter'; |
| 363 | import moment from 'moment' | 385 | import moment from 'moment' |
| 364 | import parseTime from '@/utils' | 386 | import parseTime from '@/utils' |
| 365 | import loginUserInfo from '@/api/base' | 387 | import loginUserInfo from '@/api/base' |
| @@ -373,8 +395,8 @@ | @@ -373,8 +395,8 @@ | ||
| 373 | processName: '', | 395 | processName: '', |
| 374 | parseTime: parseTime | 396 | parseTime: parseTime |
| 375 | }, | 397 | }, |
| 376 | - wmId:'', | ||
| 377 | - locationList:[], | 398 | + wmId: '', |
| 399 | + locationList: [], | ||
| 378 | total: 0, | 400 | total: 0, |
| 379 | pageNum: 1, | 401 | pageNum: 1, |
| 380 | pageSize: 30, | 402 | pageSize: 30, |
| @@ -382,7 +404,7 @@ | @@ -382,7 +404,7 @@ | ||
| 382 | electrixityLoading: false, | 404 | electrixityLoading: false, |
| 383 | waterNumber: undefined, | 405 | waterNumber: undefined, |
| 384 | electricityNumber: undefined, | 406 | electricityNumber: undefined, |
| 385 | - waterMeterList:[], | 407 | + waterMeterList: [], |
| 386 | restaurants: [], | 408 | restaurants: [], |
| 387 | state4: '', | 409 | state4: '', |
| 388 | timeout: null, | 410 | timeout: null, |
| @@ -391,20 +413,20 @@ | @@ -391,20 +413,20 @@ | ||
| 391 | editFormVisible: false, | 413 | editFormVisible: false, |
| 392 | electrixityeditFormVisible: false, | 414 | electrixityeditFormVisible: false, |
| 393 | // 水表实施信息 | 415 | // 水表实施信息 |
| 394 | - waterMeterVisible:false, | 416 | + waterMeterVisible: false, |
| 395 | 417 | ||
| 396 | 418 | ||
| 397 | addFormLocationVisible: false, | 419 | addFormLocationVisible: false, |
| 398 | 420 | ||
| 399 | editFormLocationVisible: false, | 421 | editFormLocationVisible: false, |
| 400 | 422 | ||
| 401 | - addLocationFormRules:{ | 423 | + addLocationFormRules: { |
| 402 | adrName: [ | 424 | adrName: [ |
| 403 | {required: true, message: '请输入公寓名称', trigger: 'blur'} | 425 | {required: true, message: '请输入公寓名称', trigger: 'blur'} |
| 404 | ] | 426 | ] |
| 405 | }, | 427 | }, |
| 406 | 428 | ||
| 407 | - editLocationFormRules:{ | 429 | + editLocationFormRules: { |
| 408 | adrName: [ | 430 | adrName: [ |
| 409 | {required: false, message: '请输入公寓名称', trigger: 'blur'} | 431 | {required: false, message: '请输入公寓名称', trigger: 'blur'} |
| 410 | ] | 432 | ] |
| @@ -413,7 +435,7 @@ | @@ -413,7 +435,7 @@ | ||
| 413 | editLoading: false, | 435 | editLoading: false, |
| 414 | editFormRules: { | 436 | editFormRules: { |
| 415 | roleName: [ | 437 | roleName: [ |
| 416 | - { required: true, message: '请输入岗位/角色名称', trigger: 'blur' } | 438 | + {required: true, message: '请输入岗位/角色名称', trigger: 'blur'} |
| 417 | ] | 439 | ] |
| 418 | }, | 440 | }, |
| 419 | //编辑界面数据 | 441 | //编辑界面数据 |
| @@ -422,15 +444,15 @@ | @@ -422,15 +444,15 @@ | ||
| 422 | description: '', | 444 | description: '', |
| 423 | roleName: '', | 445 | roleName: '', |
| 424 | roleSign: 1, | 446 | roleSign: 1, |
| 425 | - departmentId:'' | 447 | + departmentId: '' |
| 426 | }, | 448 | }, |
| 427 | // 编辑电表参数配置 | 449 | // 编辑电表参数配置 |
| 428 | - electrixityeditForm:{ | ||
| 429 | - id:'', | 450 | + electrixityeditForm: { |
| 451 | + id: '', | ||
| 430 | prepaid: '', | 452 | prepaid: '', |
| 431 | warningtrip: '', | 453 | warningtrip: '', |
| 432 | warningthreshold: '', | 454 | warningthreshold: '', |
| 433 | - overdraft:'', | 455 | + overdraft: '', |
| 434 | overdraftthreshold: '', | 456 | overdraftthreshold: '', |
| 435 | waterload: '', | 457 | waterload: '', |
| 436 | power: '', | 458 | power: '', |
| @@ -445,10 +467,10 @@ | @@ -445,10 +467,10 @@ | ||
| 445 | addLoading: false, | 467 | addLoading: false, |
| 446 | addFormRules: { | 468 | addFormRules: { |
| 447 | roleName: [ | 469 | roleName: [ |
| 448 | - { required: true, message: '请输入岗位/角色名称', trigger: 'blur' } | 470 | + {required: true, message: '请输入岗位/角色名称', trigger: 'blur'} |
| 449 | ], | 471 | ], |
| 450 | description: [ | 472 | description: [ |
| 451 | - { required: true, message: '请输入岗位/角色描述', trigger: 'blur' } | 473 | + {required: true, message: '请输入岗位/角色描述', trigger: 'blur'} |
| 452 | ] | 474 | ] |
| 453 | }, | 475 | }, |
| 454 | //电表参数配置、界面数据 | 476 | //电表参数配置、界面数据 |
| @@ -456,7 +478,7 @@ | @@ -456,7 +478,7 @@ | ||
| 456 | prepaid: '', | 478 | prepaid: '', |
| 457 | warningtrip: '', | 479 | warningtrip: '', |
| 458 | warningthreshold: '', | 480 | warningthreshold: '', |
| 459 | - overdraft:'', | 481 | + overdraft: '', |
| 460 | overdraftthreshold: '', | 482 | overdraftthreshold: '', |
| 461 | waterload: '', | 483 | waterload: '', |
| 462 | power: '', | 484 | power: '', |
| @@ -466,25 +488,25 @@ | @@ -466,25 +488,25 @@ | ||
| 466 | }, | 488 | }, |
| 467 | 489 | ||
| 468 | // 水表实施信息 | 490 | // 水表实施信息 |
| 469 | - waterMaterForm:{ | ||
| 470 | - wmId:'', | ||
| 471 | - wmSacc:'', | ||
| 472 | - wmLacc:'', | ||
| 473 | - wmRdtime:'', | ||
| 474 | - wmFmstate:'', | ||
| 475 | - wmErrmessage:'', | ||
| 476 | - wmVoltage:'', | ||
| 477 | - wmSignalpower:'' | 491 | + waterMaterForm: { |
| 492 | + wmId: '', | ||
| 493 | + wmSacc: '', | ||
| 494 | + wmLacc: '', | ||
| 495 | + wmRdtime: '', | ||
| 496 | + wmFmstate: '', | ||
| 497 | + wmErrmessage: '', | ||
| 498 | + wmVoltage: '', | ||
| 499 | + wmSignalpower: '' | ||
| 478 | }, | 500 | }, |
| 479 | // 电表实施信息 | 501 | // 电表实施信息 |
| 480 | - electricityForm:{ | ||
| 481 | - deviceId:'', | ||
| 482 | - totalEnergy:'', | ||
| 483 | - tipEnergy:'', | ||
| 484 | - peakEnergy:'', | ||
| 485 | - valleyEnergy:'', | ||
| 486 | - flatEnergy:'', | ||
| 487 | - balance:'' | 502 | + electricityForm: { |
| 503 | + deviceId: '', | ||
| 504 | + totalEnergy: '', | ||
| 505 | + tipEnergy: '', | ||
| 506 | + peakEnergy: '', | ||
| 507 | + valleyEnergy: '', | ||
| 508 | + flatEnergy: '', | ||
| 509 | + balance: '' | ||
| 488 | }, | 510 | }, |
| 489 | 511 | ||
| 490 | permForm: { | 512 | permForm: { |
| @@ -495,22 +517,22 @@ | @@ -495,22 +517,22 @@ | ||
| 495 | permissions: [] | 517 | permissions: [] |
| 496 | }, | 518 | }, |
| 497 | // 公寓新增 | 519 | // 公寓新增 |
| 498 | - addLocationForm:{ | 520 | + addLocationForm: { |
| 499 | adrName: '', | 521 | adrName: '', |
| 500 | parent: '', | 522 | parent: '', |
| 501 | - type:'' | 523 | + type: '' |
| 502 | }, | 524 | }, |
| 503 | // 公寓编辑 | 525 | // 公寓编辑 |
| 504 | - editLocationForm:{ | 526 | + editLocationForm: { |
| 505 | adrname: '', | 527 | adrname: '', |
| 506 | parent: '', | 528 | parent: '', |
| 507 | - type:'', | ||
| 508 | - wmid:'', | ||
| 509 | - eeid:'' | 529 | + type: '', |
| 530 | + wmid: '', | ||
| 531 | + eeid: '' | ||
| 510 | }, | 532 | }, |
| 511 | centerDialogVisible: false, | 533 | centerDialogVisible: false, |
| 512 | - dialogData:{ | ||
| 513 | - process:{ | 534 | + dialogData: { |
| 535 | + process: { | ||
| 514 | processname: '' | 536 | processname: '' |
| 515 | } | 537 | } |
| 516 | }, | 538 | }, |
| @@ -539,7 +561,7 @@ | @@ -539,7 +561,7 @@ | ||
| 539 | } | 561 | } |
| 540 | }] | 562 | }] |
| 541 | }, | 563 | }, |
| 542 | - options:[{ | 564 | + options: [{ |
| 543 | value: '1', | 565 | value: '1', |
| 544 | label: '测试公司', | 566 | label: '测试公司', |
| 545 | children: [{ | 567 | children: [{ |
| @@ -576,25 +598,25 @@ | @@ -576,25 +598,25 @@ | ||
| 576 | } | 598 | } |
| 577 | }, | 599 | }, |
| 578 | methods: { | 600 | methods: { |
| 579 | - one: function(prepaid){ | ||
| 580 | - return prepaid?true:one='是'?false:one='否' | 601 | + one: function (prepaid) { |
| 602 | + return prepaid ? true : one = '是' ? false : one = '否' | ||
| 581 | }, | 603 | }, |
| 582 | 604 | ||
| 583 | //类型显示转换 | 605 | //类型显示转换 |
| 584 | formatType: function (row, column) { | 606 | formatType: function (row, column) { |
| 585 | let msg = '未知'; | 607 | let msg = '未知'; |
| 586 | - switch (row.type){ | 608 | + switch (row.type) { |
| 587 | case 0: | 609 | case 0: |
| 588 | - msg='公寓'; | 610 | + msg = '公寓'; |
| 589 | break; | 611 | break; |
| 590 | case 1: | 612 | case 1: |
| 591 | - msg='楼'; | 613 | + msg = '楼'; |
| 592 | break; | 614 | break; |
| 593 | case 2: | 615 | case 2: |
| 594 | - msg='层'; | 616 | + msg = '层'; |
| 595 | break; | 617 | break; |
| 596 | case 3: | 618 | case 3: |
| 597 | - msg='门牌'; | 619 | + msg = '门牌'; |
| 598 | break; | 620 | break; |
| 599 | } | 621 | } |
| 600 | return msg; | 622 | return msg; |
| @@ -614,7 +636,7 @@ | @@ -614,7 +636,7 @@ | ||
| 614 | processName: this.filters.processName, | 636 | processName: this.filters.processName, |
| 615 | parent: 0 | 637 | parent: 0 |
| 616 | }; | 638 | }; |
| 617 | - this.listLoading= true; | 639 | + this.listLoading = true; |
| 618 | getList(para).then((res) => { | 640 | getList(para).then((res) => { |
| 619 | let resData = res.data.data; | 641 | let resData = res.data.data; |
| 620 | this.total = resData.total; | 642 | this.total = resData.total; |
| @@ -623,11 +645,11 @@ | @@ -623,11 +645,11 @@ | ||
| 623 | //NProgress.done(); | 645 | //NProgress.done(); |
| 624 | }).catch((error) => { | 646 | }).catch((error) => { |
| 625 | this.listLoading = false; | 647 | this.listLoading = false; |
| 626 | - if(null!= error.response && error.response!==undefined){ | ||
| 627 | - let status= error.response.status; | 648 | + if (null != error.response && error.response !== undefined) { |
| 649 | + let status = error.response.status; | ||
| 628 | let msg = error.response.statusText; | 650 | let msg = error.response.statusText; |
| 629 | - alert(status+msg); | ||
| 630 | - }else { | 651 | + alert(status + msg); |
| 652 | + } else { | ||
| 631 | alert(error); | 653 | alert(error); |
| 632 | } | 654 | } |
| 633 | 655 | ||
| @@ -659,7 +681,7 @@ | @@ -659,7 +681,7 @@ | ||
| 659 | }).then(() => { | 681 | }).then(() => { |
| 660 | this.listLoading = true; | 682 | this.listLoading = true; |
| 661 | //NProgress.start(); | 683 | //NProgress.start(); |
| 662 | - let para = { id: row.id }; | 684 | + let para = {id: row.id}; |
| 663 | remove(para).then((res) => { | 685 | remove(para).then((res) => { |
| 664 | this.listLoading = false; | 686 | this.listLoading = false; |
| 665 | if (res.data.code == 200) { | 687 | if (res.data.code == 200) { |
| @@ -668,10 +690,10 @@ | @@ -668,10 +690,10 @@ | ||
| 668 | type: 'success' | 690 | type: 'success' |
| 669 | }); | 691 | }); |
| 670 | this.getList(); | 692 | this.getList(); |
| 671 | - }else { | 693 | + } else { |
| 672 | this.$message({ | 694 | this.$message({ |
| 673 | - message:'请删除该下面的楼,层,房间', | ||
| 674 | - type:"error" | 695 | + message: '请删除该下面的楼,层,房间', |
| 696 | + type: "error" | ||
| 675 | }) | 697 | }) |
| 676 | } | 698 | } |
| 677 | }).catch((error) => { | 699 | }).catch((error) => { |
| @@ -687,7 +709,7 @@ | @@ -687,7 +709,7 @@ | ||
| 687 | */ | 709 | */ |
| 688 | electrixityMeterEdit: function (row) { | 710 | electrixityMeterEdit: function (row) { |
| 689 | var ids = row.eeid; | 711 | var ids = row.eeid; |
| 690 | - let para = { eeId: ids }; | 712 | + let para = {eeId: ids}; |
| 691 | // 查询电表参数配置表数据 | 713 | // 查询电表参数配置表数据 |
| 692 | this.electrixityeditFormVisible = true; | 714 | this.electrixityeditFormVisible = true; |
| 693 | getEEModel(para).then((res) => { | 715 | getEEModel(para).then((res) => { |
| @@ -698,17 +720,17 @@ | @@ -698,17 +720,17 @@ | ||
| 698 | 720 | ||
| 699 | // location 新增 | 721 | // location 新增 |
| 700 | handleAdd: function (row) { | 722 | handleAdd: function (row) { |
| 701 | - if (row == undefined){ | 723 | + if (row == undefined) { |
| 702 | this.addFormLocationVisible = true; | 724 | this.addFormLocationVisible = true; |
| 703 | this.addLocationForm.parent = 0; | 725 | this.addLocationForm.parent = 0; |
| 704 | this.addLocationForm.type = 0; | 726 | this.addLocationForm.type = 0; |
| 705 | - }else { | 727 | + } else { |
| 706 | this.addFormLocationVisible = true; | 728 | this.addFormLocationVisible = true; |
| 707 | this.addLocationForm.parent = row.id; | 729 | this.addLocationForm.parent = row.id; |
| 708 | - if (row.type == 3){ | 730 | + if (row.type == 3) { |
| 709 | this.addLocationForm.type = row.type; | 731 | this.addLocationForm.type = row.type; |
| 710 | - }else { | ||
| 711 | - this.addLocationForm.type = row.type+1; | 732 | + } else { |
| 733 | + this.addLocationForm.type = row.type + 1; | ||
| 712 | } | 734 | } |
| 713 | } | 735 | } |
| 714 | 736 | ||
| @@ -731,12 +753,12 @@ | @@ -731,12 +753,12 @@ | ||
| 731 | this.$refs['addLocationForm'].resetFields(); | 753 | this.$refs['addLocationForm'].resetFields(); |
| 732 | this.addFormLocationVisible = false; | 754 | this.addFormLocationVisible = false; |
| 733 | this.getList(); | 755 | this.getList(); |
| 734 | - }else if (res.data.code == 201){ | 756 | + } else if (res.data.code == 201) { |
| 735 | this.$message({ | 757 | this.$message({ |
| 736 | - message:'该名称已存在', | ||
| 737 | - type:"error" | 758 | + message: '该名称已存在', |
| 759 | + type: "error" | ||
| 738 | }) | 760 | }) |
| 739 | - }else { | 761 | + } else { |
| 740 | this.$message({ | 762 | this.$message({ |
| 741 | message: '网络异常', | 763 | message: '网络异常', |
| 742 | type: 'error' | 764 | type: 'error' |
| @@ -758,9 +780,9 @@ | @@ -758,9 +780,9 @@ | ||
| 758 | this.waterNumber = undefined; | 780 | this.waterNumber = undefined; |
| 759 | this.editFormLocationVisible = true; | 781 | this.editFormLocationVisible = true; |
| 760 | this.editLocationForm = row; | 782 | this.editLocationForm = row; |
| 761 | - if (row.type == 3){ | ||
| 762 | - this.waterNumber ='waterNum'; | ||
| 763 | - this.electricityNumber ='eeNum'; | 783 | + if (row.type == 3) { |
| 784 | + this.waterNumber = 'waterNum'; | ||
| 785 | + this.electricityNumber = 'eeNum'; | ||
| 764 | } | 786 | } |
| 765 | }, | 787 | }, |
| 766 | 788 | ||
| @@ -773,7 +795,7 @@ | @@ -773,7 +795,7 @@ | ||
| 773 | this.addLoading = true; | 795 | this.addLoading = true; |
| 774 | let para = Object.assign({}, this.editLocationForm); | 796 | let para = Object.assign({}, this.editLocationForm); |
| 775 | editLocation(para).then((res) => { | 797 | editLocation(para).then((res) => { |
| 776 | - if(res.data.code == 200){ | 798 | + if (res.data.code == 200) { |
| 777 | //NProgress.done(); | 799 | //NProgress.done(); |
| 778 | this.$message({ | 800 | this.$message({ |
| 779 | message: '提交成功', | 801 | message: '提交成功', |
| @@ -784,7 +806,7 @@ | @@ -784,7 +806,7 @@ | ||
| 784 | this.addLoading = false; | 806 | this.addLoading = false; |
| 785 | this.getList(); | 807 | this.getList(); |
| 786 | 808 | ||
| 787 | - }else { | 809 | + } else { |
| 788 | this.$message({ | 810 | this.$message({ |
| 789 | message: '编辑失败', | 811 | message: '编辑失败', |
| 790 | type: 'error' | 812 | type: 'error' |
| @@ -822,14 +844,14 @@ | @@ -822,14 +844,14 @@ | ||
| 822 | prepaid: '', | 844 | prepaid: '', |
| 823 | warningtrip: '', | 845 | warningtrip: '', |
| 824 | warningthreshold: '', | 846 | warningthreshold: '', |
| 825 | - overdraft:'', | 847 | + overdraft: '', |
| 826 | overdraftthreshold: '', | 848 | overdraftthreshold: '', |
| 827 | waterload: '', | 849 | waterload: '', |
| 828 | water: '', | 850 | water: '', |
| 829 | free: '', | 851 | free: '', |
| 830 | freeWater: '', | 852 | freeWater: '', |
| 831 | eeId: row.eeid, | 853 | eeId: row.eeid, |
| 832 | - reamke2:row.adrname | 854 | + reamke2: row.adrname |
| 833 | } | 855 | } |
| 834 | }, | 856 | }, |
| 835 | 857 | ||
| @@ -837,9 +859,9 @@ | @@ -837,9 +859,9 @@ | ||
| 837 | // 水表实施信息 | 859 | // 水表实施信息 |
| 838 | waterMeter: function (row) { | 860 | waterMeter: function (row) { |
| 839 | // let loadingInstance1 = Loading.service({ fullscreen: true }); | 861 | // let loadingInstance1 = Loading.service({ fullscreen: true }); |
| 840 | - this.waterMeterVisible=true; | 862 | + this.waterMeterVisible = true; |
| 841 | var wmId = row.wmid; | 863 | var wmId = row.wmid; |
| 842 | - let para = { wmId: wmId }; | 864 | + let para = {wmId: wmId}; |
| 843 | findRealTime(para).then((res) => { | 865 | findRealTime(para).then((res) => { |
| 844 | this.waterMaterForm = res.data; | 866 | this.waterMaterForm = res.data; |
| 845 | 867 | ||
| @@ -849,11 +871,11 @@ | @@ -849,11 +871,11 @@ | ||
| 849 | }, | 871 | }, |
| 850 | 872 | ||
| 851 | // 电表实施信息查询 | 873 | // 电表实施信息查询 |
| 852 | - electicityInfo: function(row){ | ||
| 853 | - this.electrixityeditFormVisible=true; | ||
| 854 | - this.electrixityLoading=true; | 874 | + electicityInfo: function (row) { |
| 875 | + this.electrixityeditFormVisible = true; | ||
| 876 | + this.electrixityLoading = true; | ||
| 855 | var eeId = row.eeid; | 877 | var eeId = row.eeid; |
| 856 | - let para = { eeId: eeId}; | 878 | + let para = {eeId: eeId}; |
| 857 | electricityInfo(para).then((res) => { | 879 | electricityInfo(para).then((res) => { |
| 858 | this.electricityForm = res.data; | 880 | this.electricityForm = res.data; |
| 859 | this.electrixityLoading = false; | 881 | this.electrixityLoading = false; |
| @@ -870,17 +892,17 @@ | @@ -870,17 +892,17 @@ | ||
| 870 | let para = Object.assign({}, this.electrixityAddForm); | 892 | let para = Object.assign({}, this.electrixityAddForm); |
| 871 | electicity(para).then((res) => { | 893 | electicity(para).then((res) => { |
| 872 | this.addLoading = false; | 894 | this.addLoading = false; |
| 873 | - if (res.status ===200) { | 895 | + if (res.status === 200) { |
| 874 | this.$message({ | 896 | this.$message({ |
| 875 | message: '提交成功', | 897 | message: '提交成功', |
| 876 | type: 'success' | 898 | type: 'success' |
| 877 | }); | 899 | }); |
| 878 | this.$refs['electrixityAddForm'].resetFields(); | 900 | this.$refs['electrixityAddForm'].resetFields(); |
| 879 | this.electrixityAddFormVisible = false; | 901 | this.electrixityAddFormVisible = false; |
| 880 | - }else if (res.status===201){ | 902 | + } else if (res.status === 201) { |
| 881 | this.$message({ | 903 | this.$message({ |
| 882 | - message:'不能重复提交', | ||
| 883 | - type:"error" | 904 | + message: '不能重复提交', |
| 905 | + type: "error" | ||
| 884 | }) | 906 | }) |
| 885 | } | 907 | } |
| 886 | }).catch(error => alert(error)); | 908 | }).catch(error => alert(error)); |
| @@ -896,7 +918,7 @@ | @@ -896,7 +918,7 @@ | ||
| 896 | this.$confirm('确认提交吗?', '提示', {}).then(() => { | 918 | this.$confirm('确认提交吗?', '提示', {}).then(() => { |
| 897 | this.editLoading = true; | 919 | this.editLoading = true; |
| 898 | //NProgress.start(); | 920 | //NProgress.start(); |
| 899 | - let para= Object.assign({}, this.electrixityeditForm); | 921 | + let para = Object.assign({}, this.electrixityeditForm); |
| 900 | para.prepaid = this.formatperpaid(para.prepaid); | 922 | para.prepaid = this.formatperpaid(para.prepaid); |
| 901 | para.warningtrip = this.formatperpaid(para.warningtrip); | 923 | para.warningtrip = this.formatperpaid(para.warningtrip); |
| 902 | para.overdraft = this.formatperpaid(para.overdraft); | 924 | para.overdraft = this.formatperpaid(para.overdraft); |
| @@ -927,7 +949,7 @@ | @@ -927,7 +949,7 @@ | ||
| 927 | }).then(() => { | 949 | }).then(() => { |
| 928 | this.listLoading = true; | 950 | this.listLoading = true; |
| 929 | //NProgress.start(); | 951 | //NProgress.start(); |
| 930 | - let para = { ids: ids }; | 952 | + let para = {ids: ids}; |
| 931 | batchRemove(para).then((res) => { | 953 | batchRemove(para).then((res) => { |
| 932 | this.listLoading = false; | 954 | this.listLoading = false; |
| 933 | //NProgress.done(); | 955 | //NProgress.done(); |
| @@ -946,7 +968,7 @@ | @@ -946,7 +968,7 @@ | ||
| 946 | return 'building'; | 968 | return 'building'; |
| 947 | } else if (type === 2) { | 969 | } else if (type === 2) { |
| 948 | return 'floor'; | 970 | return 'floor'; |
| 949 | - } else if (type === 3){ | 971 | + } else if (type === 3) { |
| 950 | return 'house'; | 972 | return 'house'; |
| 951 | } | 973 | } |
| 952 | return ''; | 974 | return ''; |
| @@ -956,8 +978,8 @@ | @@ -956,8 +978,8 @@ | ||
| 956 | }, | 978 | }, |
| 957 | 979 | ||
| 958 | //缴水电费订单跳转 | 980 | //缴水电费订单跳转 |
| 959 | - pay(row){ | ||
| 960 | - this.$router.push({name:'缴水电费订单',params:{row,Edistatus:'create'}}); | 981 | + pay(row) { |
| 982 | + this.$router.push({name: '缴水电费订单', params: {row, Edistatus: 'create'}}); | ||
| 961 | }, | 983 | }, |
| 962 | 984 | ||
| 963 | }, | 985 | }, |
| 1 | <template> | 1 | <template> |
| 2 | <el-container> | 2 | <el-container> |
| 3 | - <el-main > | 3 | + <el-main> |
| 4 | <el-row type="flex" class="row-bg" justify="center"> | 4 | <el-row type="flex" class="row-bg" justify="center"> |
| 5 | <el-col :span="20"> | 5 | <el-col :span="20"> |
| 6 | - <el-form :model="OrderForm" :rules="rules" ref="OrderForm" label-width="180px" :label-position="labelPosition"> | 6 | + <el-form :model="OrderForm" :rules="rules" ref="OrderForm" label-width="180px" |
| 7 | + :label-position="labelPosition"> | ||
| 7 | <el-col :span="24"> | 8 | <el-col :span="24"> |
| 8 | <el-form-item label="充值类型" prop="payType"> | 9 | <el-form-item label="充值类型" prop="payType"> |
| 9 | <el-col :span="24"> | 10 | <el-col :span="24"> |
| 10 | - <el-select v-if="Edistatus=='create'" v-model="OrderForm.payType" @change="selectTrigger(OrderForm.payType)" placeholder="请选择充值类型" style="width:100%"> | 11 | + <el-select v-if="Edistatus=='create'" v-model="OrderForm.payType" |
| 12 | + @change="selectTrigger(OrderForm.payType)" placeholder="请选择充值类型" | ||
| 13 | + style="width:100%"> | ||
| 11 | <el-option v-for="item in payTypes" :key="item.value" :label="item.label" | 14 | <el-option v-for="item in payTypes" :key="item.value" :label="item.label" |
| 12 | - :value="item.value" ></el-option> | 15 | + :value="item.value"></el-option> |
| 13 | </el-select> | 16 | </el-select> |
| 14 | <el-select v-else v-model="OrderForm.payType" style="width:100%"> | 17 | <el-select v-else v-model="OrderForm.payType" style="width:100%"> |
| 15 | - <el-option disabled="" v-for="item in payTypes" :key="item.value" :label="item.label" | ||
| 16 | - :value="item.value" ></el-option> | 18 | + <el-option disabled="" v-for="item in payTypes" :key="item.value" |
| 19 | + :label="item.label" | ||
| 20 | + :value="item.value"></el-option> | ||
| 17 | </el-select> | 21 | </el-select> |
| 18 | </el-col> | 22 | </el-col> |
| 19 | </el-form-item> | 23 | </el-form-item> |
| @@ -35,27 +39,36 @@ | @@ -35,27 +39,36 @@ | ||
| 35 | </el-col> | 39 | </el-col> |
| 36 | <el-col :span="24"> | 40 | <el-col :span="24"> |
| 37 | <el-form-item label="充值日期"> | 41 | <el-form-item label="充值日期"> |
| 38 | - <el-date-picker type="date" placeholder="" v-model="OrderForm.payTime" disabled="" style="width: 100%;" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> | 42 | + <el-date-picker type="date" placeholder="" v-model="OrderForm.payTime" disabled="" |
| 43 | + style="width: 100%;" | ||
| 44 | + value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> | ||
| 39 | </el-form-item> | 45 | </el-form-item> |
| 40 | </el-col> | 46 | </el-col> |
| 41 | <el-col :span="24"> | 47 | <el-col :span="24"> |
| 42 | <el-form-item v-if="Edistatus=='create'" label="充值金额" prop="payFees"> | 48 | <el-form-item v-if="Edistatus=='create'" label="充值金额" prop="payFees"> |
| 43 | - <el-input type="number" oninput ="value=value.replace(/[^0-9.]/g,'')" v-model.number="OrderForm.payFees"></el-input> | 49 | + <el-input type="number" oninput="value=value.replace(/[^0-9.]/g,'')" |
| 50 | + v-model.number="OrderForm.payFees"></el-input> | ||
| 44 | </el-form-item> | 51 | </el-form-item> |
| 45 | <el-form-item v-else label="充值金额" prop="payFees"> | 52 | <el-form-item v-else label="充值金额" prop="payFees"> |
| 46 | - <el-input disabled="" type="number" oninput ="value=value.replace(/[^0-9]/g,'')" v-model.number="OrderForm.payFees"></el-input> | 53 | + <el-input disabled="" type="number" oninput="value=value.replace(/[^0-9]/g,'')" |
| 54 | + v-model.number="OrderForm.payFees"></el-input> | ||
| 47 | </el-form-item> | 55 | </el-form-item> |
| 48 | </el-col> | 56 | </el-col> |
| 49 | <el-col :span="24"> | 57 | <el-col :span="24"> |
| 50 | <el-form-item label="支付方式"> | 58 | <el-form-item label="支付方式"> |
| 51 | <el-radio-group v-model="OrderForm.payFessType"> | 59 | <el-radio-group v-model="OrderForm.payFessType"> |
| 52 | - <el-radio v-for="item in payFessTypes" :key="item.value" :label="item.value" border>{{item.label}}</el-radio> | 60 | + <el-radio v-for="item in payFessTypes" :key="item.value" :label="item.value" border> |
| 61 | + {{item.label}} | ||
| 62 | + </el-radio> | ||
| 53 | </el-radio-group> | 63 | </el-radio-group> |
| 54 | </el-form-item> | 64 | </el-form-item> |
| 55 | </el-col> | 65 | </el-col> |
| 56 | <el-col :span="24"> | 66 | <el-col :span="24"> |
| 57 | - <el-form-item > | ||
| 58 | - <el-button type="primary" style="width:100%" @click="Edistatus==='create'?createData('OrderForm'):updateData('OrderForm')">确认支付</el-button> | 67 | + <el-form-item> |
| 68 | + <el-button type="primary" style="width:100%" | ||
| 69 | + @click="Edistatus==='create'?createData('OrderForm'):updateData('OrderForm')"> | ||
| 70 | + 确认支付 | ||
| 71 | + </el-button> | ||
| 59 | </el-form-item> | 72 | </el-form-item> |
| 60 | </el-col> | 73 | </el-col> |
| 61 | </el-form> | 74 | </el-form> |
| @@ -69,29 +82,30 @@ | @@ -69,29 +82,30 @@ | ||
| 69 | </style> | 82 | </style> |
| 70 | <script> | 83 | <script> |
| 71 | import loginUserInfo from '@/api/base' | 84 | import loginUserInfo from '@/api/base' |
| 85 | + | ||
| 72 | export default { | 86 | export default { |
| 73 | data() { | 87 | data() { |
| 74 | - return{ | ||
| 75 | - OrderForm:{ | ||
| 76 | - payUserId:'', | ||
| 77 | - payUserName:'', | ||
| 78 | - payTime:new Date(), | ||
| 79 | - payLocationId:'', | ||
| 80 | - payLocationName:'3#01-101', | ||
| 81 | - payTypeAddress:'', | ||
| 82 | - payFees:'', | ||
| 83 | - payType:'', | ||
| 84 | - payFessType:'1', | ||
| 85 | - orderNumber:'', | ||
| 86 | - payStatus:'', | 88 | + return { |
| 89 | + OrderForm: { | ||
| 90 | + payUserId: '', | ||
| 91 | + payUserName: '', | ||
| 92 | + payTime: new Date(), | ||
| 93 | + payLocationId: '', | ||
| 94 | + payLocationName: '3#01-101', | ||
| 95 | + payTypeAddress: '', | ||
| 96 | + payFees: '', | ||
| 97 | + payType: '', | ||
| 98 | + payFessType: '1', | ||
| 99 | + orderNumber: '', | ||
| 100 | + payStatus: '', | ||
| 87 | }, | 101 | }, |
| 88 | - rules:{ | 102 | + rules: { |
| 89 | payType: [ | 103 | payType: [ |
| 90 | - { required: true, message: '请选择充值类型', trigger: 'change' } | 104 | + {required: true, message: '请选择充值类型', trigger: 'change'} |
| 91 | ], | 105 | ], |
| 92 | - payFees:[ | ||
| 93 | - { required: true, message: '充值金额不能为空'}, | ||
| 94 | - { type: 'number', message: '金额必须为数字值'} | 106 | + payFees: [ |
| 107 | + {required: true, message: '充值金额不能为空'}, | ||
| 108 | + {type: 'number', message: '金额必须为数字值'} | ||
| 95 | ] | 109 | ] |
| 96 | }, | 110 | }, |
| 97 | payTypes: [ | 111 | payTypes: [ |
| @@ -102,7 +116,7 @@ | @@ -102,7 +116,7 @@ | ||
| 102 | value: '1', | 116 | value: '1', |
| 103 | label: '电费' | 117 | label: '电费' |
| 104 | }], | 118 | }], |
| 105 | - payFessTypes:[ | 119 | + payFessTypes: [ |
| 106 | { | 120 | { |
| 107 | value: '0', | 121 | value: '0', |
| 108 | label: '微 信' | 122 | label: '微 信' |
| @@ -110,52 +124,52 @@ | @@ -110,52 +124,52 @@ | ||
| 110 | value: '1', | 124 | value: '1', |
| 111 | label: '支付宝' | 125 | label: '支付宝' |
| 112 | }], | 126 | }], |
| 113 | - labelPosition:'left', | ||
| 114 | - Edistatus:'', | ||
| 115 | - shuibiao:'', | ||
| 116 | - dianbiao:'' | 127 | + labelPosition: 'left', |
| 128 | + Edistatus: '', | ||
| 129 | + shuibiao: '', | ||
| 130 | + dianbiao: '' | ||
| 117 | } | 131 | } |
| 118 | }, | 132 | }, |
| 119 | - methods:{ | 133 | + methods: { |
| 120 | 134 | ||
| 121 | - getdefaultData(){ | 135 | + getdefaultData() { |
| 122 | 136 | ||
| 123 | - if(this.$route.params.Edistatus=='create'){ | ||
| 124 | - this.OrderForm.payUserId=loginUserInfo.userId; | ||
| 125 | - this.OrderForm.payUserName=loginUserInfo.username; | ||
| 126 | - this.OrderForm.payLocationId=this.$route.params.row.id; | ||
| 127 | - this.OrderForm.payLocationName=this.$route.params.row.adrname; | ||
| 128 | - this.Edistatus=this.$route.params.Edistatus; | ||
| 129 | - this.shuibiao='1111111'; | ||
| 130 | - this.dianbiao='222222'; | 137 | + if (this.$route.params.Edistatus == 'create') { |
| 138 | + this.OrderForm.payUserId = loginUserInfo.userId; | ||
| 139 | + this.OrderForm.payUserName = loginUserInfo.username; | ||
| 140 | + this.OrderForm.payLocationId = this.$route.params.row.id; | ||
| 141 | + this.OrderForm.payLocationName = this.$route.params.row.adrname; | ||
| 142 | + this.Edistatus = this.$route.params.Edistatus; | ||
| 143 | + this.shuibiao = '1111111'; | ||
| 144 | + this.dianbiao = '222222'; | ||
| 131 | 145 | ||
| 132 | - }else{ | ||
| 133 | - this.Edistatus='update'; | ||
| 134 | - this.OrderForm.payType='0' | ||
| 135 | - this.OrderForm.payTypeAddress='333333'; | 146 | + } else { |
| 147 | + this.Edistatus = 'update'; | ||
| 148 | + this.OrderForm.payType = '0' | ||
| 149 | + this.OrderForm.payTypeAddress = '333333'; | ||
| 136 | } | 150 | } |
| 137 | }, | 151 | }, |
| 138 | - selectTrigger(val){ | ||
| 139 | - if(val=='0'){ | ||
| 140 | - this.OrderForm.payTypeAddress=this.shuibiao | ||
| 141 | - }else{ | ||
| 142 | - this.OrderForm.payTypeAddress=this.dianbiao; | 152 | + selectTrigger(val) { |
| 153 | + if (val == '0') { | ||
| 154 | + this.OrderForm.payTypeAddress = this.shuibiao | ||
| 155 | + } else { | ||
| 156 | + this.OrderForm.payTypeAddress = this.dianbiao; | ||
| 143 | } | 157 | } |
| 144 | }, | 158 | }, |
| 145 | - createData(formName){ | 159 | + createData(formName) { |
| 146 | this.$refs[formName].validate((valid) => { | 160 | this.$refs[formName].validate((valid) => { |
| 147 | if (valid) { | 161 | if (valid) { |
| 148 | - alert("新增充值"+this.OrderForm.payType+"支付方式为:"+this.OrderForm.payFessType+"充值金额:"+this.OrderForm.payFees); | 162 | + alert("新增充值" + this.OrderForm.payType + "支付方式为:" + this.OrderForm.payFessType + "充值金额:" + this.OrderForm.payFees); |
| 149 | } else { | 163 | } else { |
| 150 | console.log('error submit!!'); | 164 | console.log('error submit!!'); |
| 151 | return false; | 165 | return false; |
| 152 | } | 166 | } |
| 153 | }); | 167 | }); |
| 154 | }, | 168 | }, |
| 155 | - updateData(formName){ | 169 | + updateData(formName) { |
| 156 | this.$refs[formName].validate((valid) => { | 170 | this.$refs[formName].validate((valid) => { |
| 157 | if (valid) { | 171 | if (valid) { |
| 158 | - alert("完成充值"+this.OrderForm.payType+"支付方式为:"+this.OrderForm.payFessType+"充值金额:"+this.OrderForm.payFees); | 172 | + alert("完成充值" + this.OrderForm.payType + "支付方式为:" + this.OrderForm.payFessType + "充值金额:" + this.OrderForm.payFees); |
| 159 | } else { | 173 | } else { |
| 160 | console.log('error submit!!'); | 174 | console.log('error submit!!'); |
| 161 | return false; | 175 | return false; |
| @@ -163,7 +177,7 @@ | @@ -163,7 +177,7 @@ | ||
| 163 | }); | 177 | }); |
| 164 | } | 178 | } |
| 165 | }, | 179 | }, |
| 166 | - mounted(){ | 180 | + mounted() { |
| 167 | this.getdefaultData(); | 181 | this.getdefaultData(); |
| 168 | } | 182 | } |
| 169 | } | 183 | } |
| @@ -71,34 +71,48 @@ | @@ -71,34 +71,48 @@ | ||
| 71 | <el-table-column | 71 | <el-table-column |
| 72 | fixed="right" | 72 | fixed="right" |
| 73 | label="操作"> | 73 | label="操作"> |
| 74 | - <template slot-scope="scope" align="center" class-name="small-padding fixed-width" > | 74 | + <template slot-scope="scope" align="center" class-name="small-padding fixed-width"> |
| 75 | <!--<el-button @click="Pay(scope.row)" type="primary" size="mini">去完成</el-button>--> | 75 | <!--<el-button @click="Pay(scope.row)" type="primary" size="mini">去完成</el-button>--> |
| 76 | - <el-button type="primary" @click="payDelete(scope.$index,scope.row)" size="small">移除订单</el-button> | 76 | + <el-button type="primary" v-if="username == 'admin'" @click="payDelete(scope.$index,scope.row)" |
| 77 | + size="small">移除订单 | ||
| 78 | + </el-button> | ||
| 79 | + <el-button type="primary" v-else="" disabled @click="payDelete(scope.$index,scope.row)" | ||
| 80 | + size="small">移除订单 | ||
| 81 | + </el-button> | ||
| 82 | + <el-button type="primary" v-if="username == 'admin'" @click="defeatedOrders(scope.$index,scope.row)" | ||
| 83 | + size="small">处理订单充值 | ||
| 84 | + </el-button> | ||
| 85 | + <el-button type="primary" v-else="" style="display: none" @click="defeatedOrders(scope.$index,scope.row)" | ||
| 86 | + size="small">处理订单充值 | ||
| 87 | + </el-button> | ||
| 88 | + | ||
| 77 | </template> | 89 | </template> |
| 78 | </el-table-column> | 90 | </el-table-column> |
| 79 | </el-table> | 91 | </el-table> |
| 80 | 92 | ||
| 81 | <!--工具条--> | 93 | <!--工具条--> |
| 82 | <el-col :span="24" class="toolbar"> | 94 | <el-col :span="24" class="toolbar"> |
| 83 | - <!--<el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button>--> | ||
| 84 | - <el-pagination layout="total, prev, pager, next" @current-change="handleCurrentChange" :page-size="5" :total="total" style="float:right;"> | 95 | + <el-pagination layout="total, prev, pager, next" @current-change="handleCurrentChange" |
| 96 | + :page-size="this.pageSize" :total="total" style="float:right;"> | ||
| 85 | </el-pagination> | 97 | </el-pagination> |
| 86 | </el-col> | 98 | </el-col> |
| 87 | 99 | ||
| 88 | </section> | 100 | </section> |
| 89 | </template> | 101 | </template> |
| 90 | <script> | 102 | <script> |
| 91 | - import { getOrder,addOrder,ediOrder,remove} from '../../api/empt/PayOrder'; | 103 | + import {getOrder, addOrder, ediOrder, remove, defeatedOrder} from '../../api/empt/PayOrder'; |
| 92 | import ElButton from "../../../node_modules/element-ui/packages/button/src/button.vue"; | 104 | import ElButton from "../../../node_modules/element-ui/packages/button/src/button.vue"; |
| 93 | import moment from 'moment' | 105 | import moment from 'moment' |
| 106 | + | ||
| 94 | export default { | 107 | export default { |
| 95 | components: {ElButton}, | 108 | components: {ElButton}, |
| 96 | data() { | 109 | data() { |
| 97 | return { | 110 | return { |
| 98 | filters: { | 111 | filters: { |
| 99 | orderNumber: '', | 112 | orderNumber: '', |
| 100 | - payTime:'' | 113 | + payTime: '' |
| 101 | }, | 114 | }, |
| 115 | + username: JSON.parse(sessionStorage.getItem('user')).username, | ||
| 102 | total: 0, | 116 | total: 0, |
| 103 | pageNum: 1, | 117 | pageNum: 1, |
| 104 | pageSize: 30, | 118 | pageSize: 30, |
| @@ -128,10 +142,11 @@ | @@ -128,10 +142,11 @@ | ||
| 128 | start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); | 142 | start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); |
| 129 | picker.$emit('pick', [start, end]); | 143 | picker.$emit('pick', [start, end]); |
| 130 | } | 144 | } |
| 131 | - }]}, | 145 | + }] |
| 146 | + }, | ||
| 132 | formInline: { | 147 | formInline: { |
| 133 | user: '', | 148 | user: '', |
| 134 | - date1:'', | 149 | + date1: '', |
| 135 | 150 | ||
| 136 | }, | 151 | }, |
| 137 | tableData: [], | 152 | tableData: [], |
| @@ -146,13 +161,13 @@ | @@ -146,13 +161,13 @@ | ||
| 146 | this.pageNum = val; | 161 | this.pageNum = val; |
| 147 | this.QueryOrder(); | 162 | this.QueryOrder(); |
| 148 | }, | 163 | }, |
| 149 | - QueryOrder(){ | 164 | + QueryOrder() { |
| 150 | // 清空后为null 问题 | 165 | // 清空后为null 问题 |
| 151 | var payTimes = ''; | 166 | var payTimes = ''; |
| 152 | - if (this.filters.payTime!==null){ | ||
| 153 | - payTimes = this.filters.payTime[0]+','+this.filters.payTime[1] | 167 | + if (this.filters.payTime !== null) { |
| 168 | + payTimes = this.filters.payTime[0] + ',' + this.filters.payTime[1] | ||
| 154 | } | 169 | } |
| 155 | - if (this.$route.params.orderNumber != undefined){ | 170 | + if (this.$route.params.orderNumber != undefined) { |
| 156 | this.filters.orderNumber = this.$route.params.orderNumber; | 171 | this.filters.orderNumber = this.$route.params.orderNumber; |
| 157 | } | 172 | } |
| 158 | 173 | ||
| @@ -161,21 +176,22 @@ | @@ -161,21 +176,22 @@ | ||
| 161 | pageSize: this.pageSize, | 176 | pageSize: this.pageSize, |
| 162 | orderNumber: this.filters.orderNumber, | 177 | orderNumber: this.filters.orderNumber, |
| 163 | payTime: payTimes, | 178 | payTime: payTimes, |
| 179 | + username: this.username | ||
| 164 | 180 | ||
| 165 | }; | 181 | }; |
| 166 | this.listLoading = true; | 182 | this.listLoading = true; |
| 167 | - getOrder(params).then(res=>{ | 183 | + getOrder(params).then(res => { |
| 168 | let resData = res.data; | 184 | let resData = res.data; |
| 169 | this.total = resData.total; | 185 | this.total = resData.total; |
| 170 | this.tableData = resData.list; | 186 | this.tableData = resData.list; |
| 171 | this.listLoading = false; | 187 | this.listLoading = false; |
| 172 | }).catch((error) => { | 188 | }).catch((error) => { |
| 173 | - if(null!= error.response && error.response!==undefined){ | ||
| 174 | - let status= error.response.status; | 189 | + if (null != error.response && error.response !== undefined) { |
| 190 | + let status = error.response.status; | ||
| 175 | let msg = error.response.statusText; | 191 | let msg = error.response.statusText; |
| 176 | this.listLoading = false; | 192 | this.listLoading = false; |
| 177 | - alert(status+msg); | ||
| 178 | - }else { | 193 | + alert(status + msg); |
| 194 | + } else { | ||
| 179 | this.listLoading = false; | 195 | this.listLoading = false; |
| 180 | alert(error); | 196 | alert(error); |
| 181 | } | 197 | } |
| @@ -188,7 +204,7 @@ | @@ -188,7 +204,7 @@ | ||
| 188 | type: 'warning' | 204 | type: 'warning' |
| 189 | }).then(() => { | 205 | }).then(() => { |
| 190 | this.listLoading = true; | 206 | this.listLoading = true; |
| 191 | - let para = { id: row.id }; | 207 | + let para = {id: row.id}; |
| 192 | remove(para).then((res) => { | 208 | remove(para).then((res) => { |
| 193 | this.listLoading = false; | 209 | this.listLoading = false; |
| 194 | //NProgress.done(); | 210 | //NProgress.done(); |
| @@ -204,11 +220,42 @@ | @@ -204,11 +220,42 @@ | ||
| 204 | }).catch(); | 220 | }).catch(); |
| 205 | }, | 221 | }, |
| 206 | 222 | ||
| 207 | - dateForma:function(row,column){ | 223 | + // 处理订单充值 |
| 224 | + defeatedOrders: function(index, row){ | ||
| 225 | + this.$confirm('确定充值?', '提示', { | ||
| 226 | + type: 'warning' | ||
| 227 | + }).then(() => { | ||
| 228 | + this.listLoading = true; | ||
| 229 | + defeatedOrder(row).then((res) => { | ||
| 230 | + this.listLoading = false; | ||
| 231 | + if (res.data.code == 200){ | ||
| 232 | + this.$message({ | ||
| 233 | + message: '充值成功', | ||
| 234 | + type: 'success' | ||
| 235 | + }); | ||
| 236 | + }else { | ||
| 237 | + this.$message({ | ||
| 238 | + message: '充值失败', | ||
| 239 | + type: 'error' | ||
| 240 | + }); | ||
| 241 | + } | ||
| 242 | + | ||
| 243 | + this.QueryOrder(); | ||
| 244 | + }).catch((error) => { | ||
| 245 | + this.listLoading = false; | ||
| 246 | + alert(error); | ||
| 247 | + }); | ||
| 248 | + }).catch(); | ||
| 249 | + }, | ||
| 250 | + | ||
| 251 | + dateForma: function (row, column) { | ||
| 208 | 252 | ||
| 209 | var date = row[column.property]; | 253 | var date = row[column.property]; |
| 210 | 254 | ||
| 211 | - if(date == undefined){return ''}; | 255 | + if (date == undefined) { |
| 256 | + return '' | ||
| 257 | + } | ||
| 258 | + ; | ||
| 212 | 259 | ||
| 213 | return moment(date).format("YYYY-MM-DD HH:mm:ss") | 260 | return moment(date).format("YYYY-MM-DD HH:mm:ss") |
| 214 | 261 |
-
请 注册 或 登录 后发表评论