diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-toilet.svg b/src/icons/svg/icon-toilet.svg new file mode 100644 index 0000000..b3a4002 --- /dev/null +++ b/src/icons/svg/icon-toilet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-toilet.svg b/src/icons/svg/icon-toilet.svg new file mode 100644 index 0000000..b3a4002 --- /dev/null +++ b/src/icons/svg/icon-toilet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfer.svg b/src/icons/svg/icon-transfer.svg new file mode 100644 index 0000000..a1753f6 --- /dev/null +++ b/src/icons/svg/icon-transfer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-toilet.svg b/src/icons/svg/icon-toilet.svg new file mode 100644 index 0000000..b3a4002 --- /dev/null +++ b/src/icons/svg/icon-toilet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfer.svg b/src/icons/svg/icon-transfer.svg new file mode 100644 index 0000000..a1753f6 --- /dev/null +++ b/src/icons/svg/icon-transfer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfercar.svg b/src/icons/svg/icon-transfercar.svg new file mode 100644 index 0000000..cb510d7 --- /dev/null +++ b/src/icons/svg/icon-transfercar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-toilet.svg b/src/icons/svg/icon-toilet.svg new file mode 100644 index 0000000..b3a4002 --- /dev/null +++ b/src/icons/svg/icon-toilet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfer.svg b/src/icons/svg/icon-transfer.svg new file mode 100644 index 0000000..a1753f6 --- /dev/null +++ b/src/icons/svg/icon-transfer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfercar.svg b/src/icons/svg/icon-transfercar.svg new file mode 100644 index 0000000..cb510d7 --- /dev/null +++ b/src/icons/svg/icon-transfercar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-wastebin.svg b/src/icons/svg/icon-wastebin.svg new file mode 100644 index 0000000..bb66d25 --- /dev/null +++ b/src/icons/svg/icon-wastebin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 3dd688c..a044579 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "L":"readonly", + }, // add your custom rules here //it is base on https://github.com/vuejs/eslint-config-vue rules: { diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index cf5c1d4..a31a25c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,9 @@ } ] }, + externals: { + 'L': 'L' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/config/dev.env.js b/config/dev.env.js index b654c4c..29217c5 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -8,7 +8,7 @@ NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', // BASE_API: '"http://106.74.146.218:2031"' - BASE_API: '"http://111.198.10.15:12204"' + BASE_API: '"http://111.198.10.15:11402"' // BASE_API: '"http://139.198.16.38:20005"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' diff --git a/mock/index.js b/mock/index.js index 0e41bf6..1174989 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,6 +9,10 @@ import log from './system/log' import config from './system/config' import search from './remote-search' +import common from './sanitation/common' +import staff from './sanitation/staff' +import device from './sanitation/device' +import job from './sanitation/job' const mocks = [ ...user, @@ -19,7 +23,11 @@ ...role, ...log, ...config, - ...search + ...search, + ...common, + ...staff, + ...device, + ...job ] Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send diff --git a/mock/sanitation/common.js b/mock/sanitation/common.js new file mode 100644 index 0000000..f2fe654 --- /dev/null +++ b/mock/sanitation/common.js @@ -0,0 +1,112 @@ +const sexList = [ + { 'name': '男', 'value': '0' }, + { 'name': '女', 'value': '1' } +] +const staffTypeList = [ + { name: '正式员工', value: '0' }, + { name: '外聘', value: '1' }, + { name: '临时', value: '2' } +] +const postList = [ + { name: '公厕保洁员', value: '0' }, + { name: '司机', value: '1' }, + { name: '垃圾清运', value: '2' }, + { name: '领导', value: '3' } +] +const jobList = [ + { name: '清运', value: '0' }, + { name: '保洁', value: '1' }, + { name: '公厕', value: '2' }, + { name: '污水', value: '3' }, + { name: '垃圾收集', value: '4' }, + { name: '拾捡', value: '5' }, + { name: '倒桶', value: '6' }, + { name: '托运', value: '7' }, + { name: '其他', value: '8' } +] +const wastebinTypeList = [ + { name: '可回收', value: '0' }, + { name: '有害垃圾', value: '1' }, + { name: '厨余垃圾', value: '2' }, + { name: '其他垃圾', value: '3' } +] +const carTypeList = [ + { 'name': '小型车', 'value': '0' }, + { 'name': '中型车', 'value': '1' } +] +const bindList = [ + { 'name': '已绑定', 'value': '1' }, + { 'name': '未绑定', 'value': '0' } +] +export default [ + { + url: '/dict/code/sex', + type: 'get', + response: _ => { + return { + code: 200, + data: sexList + } + } + }, + { + url: '/dict/code/staffType', + type: 'get', + response: _ => { + return { + code: 200, + data: staffTypeList + } + } + }, + { + url: '/dict/code/postType', + type: 'get', + response: _ => { + return { + code: 200, + data: postList + } + } + }, + { + url: '/dict/code/jobType', + type: 'get', + response: _ => { + return { + code: 200, + data: jobList + } + } + }, + { + url: '/dict/code/wastebinType', + type: 'get', + response: _ => { + return { + code: 200, + data: wastebinTypeList + } + } + }, + { + url: '/dict/code/carType', + type: 'get', + response: _ => { + return { + code: 200, + data: carTypeList + } + } + }, + { + url: '/dict/code/bindType', + type: 'get', + response: _ => { + return { + code: 200, + data: bindList + } + } + } +] diff --git a/mock/sanitation/device.js b/mock/sanitation/device.js new file mode 100644 index 0000000..2ca69fd --- /dev/null +++ b/mock/sanitation/device.js @@ -0,0 +1,74 @@ +const wastebinList = [ + { code: '45524', name: '垃圾桶1号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾桶2号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾桶3号', position: '高级小区', lng: '116.4', lat: '39.9', type: '1', typeName: '可回收垃圾桶', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const toiletList = [ + { code: '45524', name: '公厕1号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '无' }, + { code: '45525', name: '公厕2号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' }, + { code: '45526', name: '公厕3号', position: '大马路', lng: '116.4', lat: '39.9', owner: '环卫局', responsiblePerson: '张三', responsiblePersonTel: '13005482554', area: '24', ts: '2020-01', notes: '' } +] +const transferstationList = [ + { code: '45524', name: '垃圾中转站1号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '无' }, + { code: '45525', name: '垃圾中转站2号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' }, + { code: '45526', name: '垃圾中转站3号', position: '马路边', lng: '116.4', lat: '39.9', owner: '环卫局', area: '25', capacity: '125', responsiblePerson: '张三', responsiblePersonTel: '13005482554', ts: '2020-01', notes: '' } +] +const carList = [ + { carNumber: '赣C1475', name: '车辆1号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '无' }, + { carNumber: '赣C1475', name: '车辆2号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' }, + { carNumber: '赣C1475', name: '车辆3号', type: '1', typeName: '中型车', engine: '1542', useCompany: 'A公司', brand: 'A8L', capacity: '5', usePerson: '李四', usePersonTel: '131455145832', responsiblePerson: '张三', responsiblePersonTel: '13005482554', buyDate: '2020-01', registerDate: '2020-10', notes: '' } +] +export default [ + { + url: '/wastebin/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: wastebinList, + total: 5 + } + } + } + }, + { + url: '/toilet/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: toiletList, + total: 5 + } + } + } + }, + { + url: '/transferstation/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: transferstationList, + total: 5 + } + } + } + }, + { + url: '/car/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: carList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/job.js b/mock/sanitation/job.js new file mode 100644 index 0000000..a29559c --- /dev/null +++ b/mock/sanitation/job.js @@ -0,0 +1,21 @@ + +const jobList = [ + { code: '45524', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '无' }, + { code: '45525', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' }, + { code: '45526', name: '张三', jobContent: '清理公厕', startTime: '2020-12-28 08:00:00', endTime: '2020-12-29 09:00:00', notes: '' } +] +export default [ + { + url: '/toilet/jobRecord', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: jobList, + total: 5 + } + } + } + } +] diff --git a/mock/sanitation/staff.js b/mock/sanitation/staff.js new file mode 100644 index 0000000..357b4c1 --- /dev/null +++ b/mock/sanitation/staff.js @@ -0,0 +1,42 @@ +const staffList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +const attendanceList = [ + { id: '12345', name: '张三', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12346', name: '李四', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12347', name: '王五', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '1', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12348', name: '赵六', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '', responseArea: '崇仁县', responseAreaName: '崇仁县' }, + { id: '12349', name: '李现', sex: '0', sexName: '男', idcard: '110107199301012321', tel: '13382739123', type: '0', typeName: '普通职工', post: '1', postName: '保洁员', hiredate: '2020-01', onJobTime: '08:00', offJobTime: '18:00', jobs: '0;1', responseArea: '崇仁县', responseAreaName: '崇仁县' } +] +export default [ + { + url: '/staff/listPage', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: staffList, + total: 5 + } + } + } + }, + { + url: '/stuff/attendanceList', + type: 'get', + response: _ => { + return { + code: 200, + data: { + rows: attendanceList, + total: 5 + } + } + } + } +] diff --git a/mock/system/user.js b/mock/system/user.js index 5b377e6..7fabc92 100644 --- a/mock/system/user.js +++ b/mock/system/user.js @@ -84,6 +84,19 @@ 'menus': [ { 'children': '', + 'code': 'sanitation', + 'icon': 'icon-setting', + 'id': '1189107859077373282', + 'ismenu': '0', + 'levels': 1, + 'name': '环卫子系统', + 'num': 0, + 'parentId': '0', + 'resourceType': '02', + 'url': '/sanitation' + }, + { + 'children': '', 'code': 'sys', 'icon': 'icon-setting', 'id': '1189107859077373954', diff --git a/package.json b/package.json index f4a6887..9d08f6e 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,19 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@geoman-io/leaflet-geoman-free": "^2.9.0", + "@jiaminghi/data-view": "^2.10.0", "animate.css": "^3.7.2", "axios": "0.18.0", "babel-polyfill": "^6.26.0", - "echarts": "^4.2.1", + "echarts": "^4.9.0", "element-ui": "2.13.0", "event-source-polyfill": "^1.0.5", + "file-saver": "^2.0.5", "js-cookie": "2.2.0", "jsencrypt": "^3.0.0-rc.1", + "leaflet": "^1.7.1", + "leaflet-draw": "^1.0.4", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", "nprogress": "0.2.0", @@ -31,7 +36,9 @@ "vue-amap": "^0.5.9", "vue-baidu-map": "^0.21.22", "vue-router": "3.0.1", - "vuex": "3.0.1" + "vue2-leaflet": "^2.6.0", + "vuex": "3.0.1", + "xlsx": "^0.16.9" }, "devDependencies": { "autoprefixer": "8.5.0", diff --git a/src/api/common.js b/src/api/common.js index d1bb14a..0d04929 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -26,7 +26,7 @@ }) } -// 根据部门找其默认人员 +// 查询字典 export function getDictByType(type) { return request({ url: 'dict/code/' + type, diff --git a/src/api/login.js b/src/api/login.js index 19187ca..ab56344 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -15,10 +15,11 @@ }) } // 获取用户权限(菜单、按钮) -export function getMenus() { +export function getMenus(params) { return request({ url: '/user/permission', - method: 'get' + method: 'get', + params }) } // 登出 diff --git a/src/api/sanitation/car.js b/src/api/sanitation/car.js new file mode 100644 index 0000000..8abcfec --- /dev/null +++ b/src/api/sanitation/car.js @@ -0,0 +1,87 @@ + +/** + * 车辆管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// import Vue from 'vue' +// 车辆查询 +export function getCarListPage(params) { + // const baseUrl = Vue.prototype.baseConfig.carUrl + return request({ + // baseURL: baseUrl, + url: '/car/busCarInfo/listPage', + method: 'get', + params + }) +} +// 车辆查询 +export function getCarList(pid) { + return request({ + url: '/car/busCarInfo/list', + method: 'get', + params: { + pid: pid + } + }) +} +// 车辆详情 +export function getCarDetail(id) { + return request({ + url: '/car/busCarInfo/detail/' + id, + method: 'get' + }) +} + +// 添加车辆 +export function addCar(params) { + return request({ + url: '/car/busCarInfo/add', + method: 'post', + params + }) +} +// 修改车辆机构 +export function updateCar(params) { + return request({ + url: '/car/busCarInfo/update', + method: 'post', + params + }) +} +// 删除车辆机构 +export function delCar(ids) { + return request({ + url: '/car/busCarInfo/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportCar(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/car/busCarInfo/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportCar(params, config) { + return request({ + url: '/car/busCarInfo/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/route.js b/src/api/sanitation/route.js new file mode 100644 index 0000000..ce0e7cd --- /dev/null +++ b/src/api/sanitation/route.js @@ -0,0 +1,90 @@ +/** + * 路线信息管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 路线信息查询 +export function getRouteInfoList(params) { + return request({ + url: '/car/busRouteInfo/listPage', + method: 'get', + params + }) +} +// 路线信息详情查询 +export function getRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/detail/' + id, + method: 'get', + params: { + } + }) +} +// 新增路线基础信息 +export function addRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/add', + method: 'post', + params + }) +} +// 修改路线信息 +export function updateRouteInfo(params) { + return request({ + url: '/car/busRouteInfo/update', + method: 'post', + params + }) +} +// 删除路线信息 +export function delRouteInfo(id) { + return request({ + url: '/car/busRouteInfo/delete', + method: 'get', + params: { + busRouteInfoId: id + } + }) +} +// 查询未关联车辆列表 +export function listUnbindCar(params) { + return request({ + url: '/car/busRouteInfo/listUnbindCar', + method: 'get', + params + }) +} +// 绑定车辆 +export function bindCar(params) { + return request({ + url: '/car/busRouteInfo/bindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 解绑车辆 +export function unbindCar(params) { + return request({ + url: '/car/busRouteInfo/unbindCar', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 保存路线 +export function addPath(data) { + return request({ + url: '/car/busRouteInfo/addPath', + method: 'post', + data, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + diff --git a/src/api/sanitation/staff.js b/src/api/sanitation/staff.js new file mode 100644 index 0000000..46fa8f0 --- /dev/null +++ b/src/api/sanitation/staff.js @@ -0,0 +1,89 @@ +/** + * 人员管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 人员查询 +export function getStaffListPage(params) { + return request({ + url: '/sanitation/staff/listPage', + method: 'get', + params + }) +} +// 人员查询 +export function getStaffList(pid) { + return request({ + url: '/sanitation/staff/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加人员 +export function addStaff(params) { + return request({ + url: '/sanitation/staff/add', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 修改人员机构 +export function updateStaff(params) { + return request({ + url: '/sanitation/staff/update', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 删除人员机构 +export function delStaff(ids) { + return request({ + url: '/sanitation/staff/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportStaff(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/staff/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportStaff(params, config) { + return request({ + url: '/sanitation/staff/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 人员出勤记录查询 +export function getAttendanceList(params) { + return request({ + url: '/sanitation/stuff/attendanceList', + method: 'get', + params + }) +} diff --git a/src/api/sanitation/stuff.js b/src/api/sanitation/stuff.js deleted file mode 100644 index 7a49f54..0000000 --- a/src/api/sanitation/stuff.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 人员管理接口 - */ -import request from '@/utils/request' -// 人员查询 -export function getStuffListPage(params) { - return request({ - url: 'area/listPage', - method: 'get', - params - }) -} -// 人员查询 -export function getStuffList(pid) { - return request({ - url: 'area/list', - method: 'get', - params: { - pid: pid - } - }) -} - -// 添加人员 -export function addStuff(params) { - return request({ - url: 'area/add', - method: 'post', - params - }) -} -// 修改人员机构 -export function updateStuff(params) { - return request({ - url: 'area/update', - method: 'post', - params - }) -} -// 删除人员机构 -export function delStuff(id) { - return request({ - url: 'area/delete', - method: 'post', - params: { - id: id - } - }) -} diff --git a/src/api/sanitation/toilet.js b/src/api/sanitation/toilet.js new file mode 100644 index 0000000..0828bb4 --- /dev/null +++ b/src/api/sanitation/toilet.js @@ -0,0 +1,85 @@ +/** + * 公厕管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 公厕查询 +export function getToiletListPage(params) { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 公厕查询 +export function getToiletList(pid) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加公厕 +export function addToilet(params) { + return request({ + url: '/sanitation/toilet/add', + method: 'post', + params + }) +} +// 修改公厕机构 +export function updateToilet(params) { + return request({ + url: '/sanitation/toilet/update', + method: 'post', + params + }) +} +// 删除公厕机构 +export function delToilet(ids) { + return request({ + url: '/sanitation/toilet/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 公厕查询 +export function getToiletCleanListPage(params) { + return request({ + url: '/sanitation/toilet/jobRecord', + method: 'get', + params + }) +} + +// 批量导入 +export function batchImportToilet(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/toilet/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportToilet(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/transferstation.js b/src/api/sanitation/transferstation.js new file mode 100644 index 0000000..cffe8be --- /dev/null +++ b/src/api/sanitation/transferstation.js @@ -0,0 +1,75 @@ +/** + * 垃圾中转站管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾中转站查询 +export function getTransferstationListPage(params) { + return request({ + url: '/sanitation/transferstation/listPage', + method: 'get', + params + }) +} +// 垃圾中转站查询 +export function getTransferstationList(pid) { + return request({ + url: '/sanitation/transferstation/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾中转站 +export function addTransferstation(params) { + return request({ + url: '/sanitation/transferstation/add', + method: 'post', + params + }) +} +// 修改垃圾中转站机构 +export function updateTransferstation(params) { + return request({ + url: '/sanitation/transferstation/update', + method: 'post', + params + }) +} +// 删除垃圾中转站机构 +export function delTransferstation(ids) { + return request({ + url: '/sanitation/transferstation/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} +// 批量导入 +export function batchImportTransferstation(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/transferstation/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportTransferstation(params, config) { + return request({ + url: '/sanitation/transferstation/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/sanitation/wastebin.js b/src/api/sanitation/wastebin.js new file mode 100644 index 0000000..f4bc6bc --- /dev/null +++ b/src/api/sanitation/wastebin.js @@ -0,0 +1,76 @@ +/** + * 垃圾桶管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 垃圾桶查询 +export function getWastebinListPage(params) { + return request({ + url: '/sanitation/wastebin/listPage', + method: 'get', + params + }) +} +// 垃圾桶查询 +export function getWastebinList(pid) { + return request({ + url: '/sanitation/wastebin/list', + method: 'get', + params: { + pid: pid + } + }) +} + +// 添加垃圾桶 +export function addWastebin(params) { + return request({ + url: '/sanitation/wastebin/add', + method: 'post', + params + }) +} +// 修改垃圾桶机构 +export function updateWastebin(params) { + return request({ + url: '/sanitation/area/update', + method: 'post', + params + }) +} +// 删除垃圾桶机构 +export function delWastebin(ids) { + return request({ + url: '/sanitation/wastebin/delete', + method: 'post', + params: { + ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +// 批量导入 +export function batchImportWastebin(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: '/sanitation/wastebin/import', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} +// 批量导出 +export function batchExportWastebin(params, config) { + return request({ + url: '/sanitation/wastebin/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/assets/icons/toilet.png b/src/assets/icons/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/icons/toilet.png Binary files differ diff --git a/src/assets/overview/background2.jpg b/src/assets/overview/background2.jpg new file mode 100644 index 0000000..bfdc2d0 --- /dev/null +++ b/src/assets/overview/background2.jpg Binary files differ diff --git a/src/assets/overview/car.png b/src/assets/overview/car.png new file mode 100644 index 0000000..14840b8 --- /dev/null +++ b/src/assets/overview/car.png Binary files differ diff --git a/src/assets/overview/module-horn.png b/src/assets/overview/module-horn.png new file mode 100644 index 0000000..8383e5f --- /dev/null +++ b/src/assets/overview/module-horn.png Binary files differ diff --git a/src/assets/overview/staff-yellow.png b/src/assets/overview/staff-yellow.png new file mode 100644 index 0000000..9ce21a4 --- /dev/null +++ b/src/assets/overview/staff-yellow.png Binary files differ diff --git a/src/assets/overview/toilet.png b/src/assets/overview/toilet.png new file mode 100644 index 0000000..060be6f --- /dev/null +++ b/src/assets/overview/toilet.png Binary files differ diff --git a/src/assets/overview/toilet3d.png b/src/assets/overview/toilet3d.png new file mode 100644 index 0000000..1a78e47 --- /dev/null +++ b/src/assets/overview/toilet3d.png Binary files differ diff --git a/src/assets/overview/top-line2.png b/src/assets/overview/top-line2.png new file mode 100644 index 0000000..61b9cfc --- /dev/null +++ b/src/assets/overview/top-line2.png Binary files differ diff --git a/src/assets/overview/top-titleBg.png b/src/assets/overview/top-titleBg.png new file mode 100644 index 0000000..369945b --- /dev/null +++ b/src/assets/overview/top-titleBg.png Binary files differ diff --git a/src/assets/overview/transferstation.png b/src/assets/overview/transferstation.png new file mode 100644 index 0000000..d54155f --- /dev/null +++ b/src/assets/overview/transferstation.png Binary files differ diff --git a/src/assets/overview/wastebin.png b/src/assets/overview/wastebin.png new file mode 100644 index 0000000..fd0275a --- /dev/null +++ b/src/assets/overview/wastebin.png Binary files differ diff --git a/src/components/BigData/Block/imageBlock.vue b/src/components/BigData/Block/imageBlock.vue new file mode 100644 index 0000000..bd206b0 --- /dev/null +++ b/src/components/BigData/Block/imageBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-toilet.svg b/src/icons/svg/icon-toilet.svg new file mode 100644 index 0000000..b3a4002 --- /dev/null +++ b/src/icons/svg/icon-toilet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfer.svg b/src/icons/svg/icon-transfer.svg new file mode 100644 index 0000000..a1753f6 --- /dev/null +++ b/src/icons/svg/icon-transfer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfercar.svg b/src/icons/svg/icon-transfercar.svg new file mode 100644 index 0000000..cb510d7 --- /dev/null +++ b/src/icons/svg/icon-transfercar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-wastebin.svg b/src/icons/svg/icon-wastebin.svg new file mode 100644 index 0000000..bb66d25 --- /dev/null +++ b/src/icons/svg/icon-wastebin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 15835ae..87f58c4 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -1,6 +1,7 @@ {{ title }} + 欢迎您,{{ name }} @@ -14,6 +15,9 @@ + 回首页 + + 修改密码 @@ -28,14 +32,13 @@ + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-toilet.svg b/src/icons/svg/icon-toilet.svg new file mode 100644 index 0000000..b3a4002 --- /dev/null +++ b/src/icons/svg/icon-toilet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfer.svg b/src/icons/svg/icon-transfer.svg new file mode 100644 index 0000000..a1753f6 --- /dev/null +++ b/src/icons/svg/icon-transfer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfercar.svg b/src/icons/svg/icon-transfercar.svg new file mode 100644 index 0000000..cb510d7 --- /dev/null +++ b/src/icons/svg/icon-transfercar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-wastebin.svg b/src/icons/svg/icon-wastebin.svg new file mode 100644 index 0000000..bb66d25 --- /dev/null +++ b/src/icons/svg/icon-wastebin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 15835ae..87f58c4 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -1,6 +1,7 @@ {{ title }} + 欢迎您,{{ name }} @@ -14,6 +15,9 @@ + 回首页 + + 修改密码 @@ -28,14 +32,13 @@ + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-toilet.svg b/src/icons/svg/icon-toilet.svg new file mode 100644 index 0000000..b3a4002 --- /dev/null +++ b/src/icons/svg/icon-toilet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfer.svg b/src/icons/svg/icon-transfer.svg new file mode 100644 index 0000000..a1753f6 --- /dev/null +++ b/src/icons/svg/icon-transfer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfercar.svg b/src/icons/svg/icon-transfercar.svg new file mode 100644 index 0000000..cb510d7 --- /dev/null +++ b/src/icons/svg/icon-transfercar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-wastebin.svg b/src/icons/svg/icon-wastebin.svg new file mode 100644 index 0000000..bb66d25 --- /dev/null +++ b/src/icons/svg/icon-wastebin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 15835ae..87f58c4 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -1,6 +1,7 @@ {{ title }} + 欢迎您,{{ name }} @@ -14,6 +15,9 @@ + 回首页 + + 修改密码 @@ -28,14 +32,13 @@ + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-toilet.svg b/src/icons/svg/icon-toilet.svg new file mode 100644 index 0000000..b3a4002 --- /dev/null +++ b/src/icons/svg/icon-toilet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfer.svg b/src/icons/svg/icon-transfer.svg new file mode 100644 index 0000000..a1753f6 --- /dev/null +++ b/src/icons/svg/icon-transfer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfercar.svg b/src/icons/svg/icon-transfercar.svg new file mode 100644 index 0000000..cb510d7 --- /dev/null +++ b/src/icons/svg/icon-transfercar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-wastebin.svg b/src/icons/svg/icon-wastebin.svg new file mode 100644 index 0000000..bb66d25 --- /dev/null +++ b/src/icons/svg/icon-wastebin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 15835ae..87f58c4 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -1,6 +1,7 @@ {{ title }} + 欢迎您,{{ name }} @@ -14,6 +15,9 @@ + 回首页 + + 修改密码 @@ -28,14 +32,13 @@ + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-toilet.svg b/src/icons/svg/icon-toilet.svg new file mode 100644 index 0000000..b3a4002 --- /dev/null +++ b/src/icons/svg/icon-toilet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfer.svg b/src/icons/svg/icon-transfer.svg new file mode 100644 index 0000000..a1753f6 --- /dev/null +++ b/src/icons/svg/icon-transfer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfercar.svg b/src/icons/svg/icon-transfercar.svg new file mode 100644 index 0000000..cb510d7 --- /dev/null +++ b/src/icons/svg/icon-transfercar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-wastebin.svg b/src/icons/svg/icon-wastebin.svg new file mode 100644 index 0000000..bb66d25 --- /dev/null +++ b/src/icons/svg/icon-wastebin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 15835ae..87f58c4 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -1,6 +1,7 @@ {{ title }} + 欢迎您,{{ name }} @@ -14,6 +15,9 @@ + 回首页 + + 修改密码 @@ -28,14 +32,13 @@ + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-toilet.svg b/src/icons/svg/icon-toilet.svg new file mode 100644 index 0000000..b3a4002 --- /dev/null +++ b/src/icons/svg/icon-toilet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfer.svg b/src/icons/svg/icon-transfer.svg new file mode 100644 index 0000000..a1753f6 --- /dev/null +++ b/src/icons/svg/icon-transfer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfercar.svg b/src/icons/svg/icon-transfercar.svg new file mode 100644 index 0000000..cb510d7 --- /dev/null +++ b/src/icons/svg/icon-transfercar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-wastebin.svg b/src/icons/svg/icon-wastebin.svg new file mode 100644 index 0000000..bb66d25 --- /dev/null +++ b/src/icons/svg/icon-wastebin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 15835ae..87f58c4 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -1,6 +1,7 @@ {{ title }} + 欢迎您,{{ name }} @@ -14,6 +15,9 @@ + 回首页 + + 修改密码 @@ -28,14 +32,13 @@ + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-toilet.svg b/src/icons/svg/icon-toilet.svg new file mode 100644 index 0000000..b3a4002 --- /dev/null +++ b/src/icons/svg/icon-toilet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfer.svg b/src/icons/svg/icon-transfer.svg new file mode 100644 index 0000000..a1753f6 --- /dev/null +++ b/src/icons/svg/icon-transfer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfercar.svg b/src/icons/svg/icon-transfercar.svg new file mode 100644 index 0000000..cb510d7 --- /dev/null +++ b/src/icons/svg/icon-transfercar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-wastebin.svg b/src/icons/svg/icon-wastebin.svg new file mode 100644 index 0000000..bb66d25 --- /dev/null +++ b/src/icons/svg/icon-wastebin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 15835ae..87f58c4 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -1,6 +1,7 @@ {{ title }} + 欢迎您,{{ name }} @@ -14,6 +15,9 @@ + 回首页 + + 修改密码 @@ -28,14 +32,13 @@ + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-toilet.svg b/src/icons/svg/icon-toilet.svg new file mode 100644 index 0000000..b3a4002 --- /dev/null +++ b/src/icons/svg/icon-toilet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfer.svg b/src/icons/svg/icon-transfer.svg new file mode 100644 index 0000000..a1753f6 --- /dev/null +++ b/src/icons/svg/icon-transfer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfercar.svg b/src/icons/svg/icon-transfercar.svg new file mode 100644 index 0000000..cb510d7 --- /dev/null +++ b/src/icons/svg/icon-transfercar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-wastebin.svg b/src/icons/svg/icon-wastebin.svg new file mode 100644 index 0000000..bb66d25 --- /dev/null +++ b/src/icons/svg/icon-wastebin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 15835ae..87f58c4 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -1,6 +1,7 @@ {{ title }} + 欢迎您,{{ name }} @@ -14,6 +15,9 @@ + 回首页 + + 修改密码 @@ -28,14 +32,13 @@ + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-toilet.svg b/src/icons/svg/icon-toilet.svg new file mode 100644 index 0000000..b3a4002 --- /dev/null +++ b/src/icons/svg/icon-toilet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfer.svg b/src/icons/svg/icon-transfer.svg new file mode 100644 index 0000000..a1753f6 --- /dev/null +++ b/src/icons/svg/icon-transfer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfercar.svg b/src/icons/svg/icon-transfercar.svg new file mode 100644 index 0000000..cb510d7 --- /dev/null +++ b/src/icons/svg/icon-transfercar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-wastebin.svg b/src/icons/svg/icon-wastebin.svg new file mode 100644 index 0000000..bb66d25 --- /dev/null +++ b/src/icons/svg/icon-wastebin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 15835ae..87f58c4 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -1,6 +1,7 @@ {{ title }} + 欢迎您,{{ name }} @@ -14,6 +15,9 @@ + 回首页 + + 修改密码 @@ -28,14 +32,13 @@ + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-toilet.svg b/src/icons/svg/icon-toilet.svg new file mode 100644 index 0000000..b3a4002 --- /dev/null +++ b/src/icons/svg/icon-toilet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfer.svg b/src/icons/svg/icon-transfer.svg new file mode 100644 index 0000000..a1753f6 --- /dev/null +++ b/src/icons/svg/icon-transfer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfercar.svg b/src/icons/svg/icon-transfercar.svg new file mode 100644 index 0000000..cb510d7 --- /dev/null +++ b/src/icons/svg/icon-transfercar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-wastebin.svg b/src/icons/svg/icon-wastebin.svg new file mode 100644 index 0000000..bb66d25 --- /dev/null +++ b/src/icons/svg/icon-wastebin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 15835ae..87f58c4 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -1,6 +1,7 @@ {{ title }} + 欢迎您,{{ name }} @@ -14,6 +15,9 @@ + 回首页 + + 修改密码 @@ -28,14 +32,13 @@ + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + - + @@ -81,6 +81,7 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-clean.svg b/src/icons/svg/icon-clean.svg new file mode 100644 index 0000000..856a694 --- /dev/null +++ b/src/icons/svg/icon-clean.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-overview.svg b/src/icons/svg/icon-overview.svg index a2f9449..8ea77d3 100644 --- a/src/icons/svg/icon-overview.svg +++ b/src/icons/svg/icon-overview.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/svg/icon-route.svg b/src/icons/svg/icon-route.svg new file mode 100644 index 0000000..d012a04 --- /dev/null +++ b/src/icons/svg/icon-route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-staff.svg b/src/icons/svg/icon-staff.svg new file mode 100644 index 0000000..af9d016 --- /dev/null +++ b/src/icons/svg/icon-staff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-toilet.svg b/src/icons/svg/icon-toilet.svg new file mode 100644 index 0000000..b3a4002 --- /dev/null +++ b/src/icons/svg/icon-toilet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfer.svg b/src/icons/svg/icon-transfer.svg new file mode 100644 index 0000000..a1753f6 --- /dev/null +++ b/src/icons/svg/icon-transfer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-transfercar.svg b/src/icons/svg/icon-transfercar.svg new file mode 100644 index 0000000..cb510d7 --- /dev/null +++ b/src/icons/svg/icon-transfercar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-wastebin.svg b/src/icons/svg/icon-wastebin.svg new file mode 100644 index 0000000..bb66d25 --- /dev/null +++ b/src/icons/svg/icon-wastebin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 15835ae..87f58c4 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -1,6 +1,7 @@ {{ title }} + 欢迎您,{{ name }} @@ -14,6 +15,9 @@ + 回首页 + + 修改密码 @@ -28,14 +32,13 @@ + + diff --git a/src/components/BigData/Block/simpleBlock.vue b/src/components/BigData/Block/simpleBlock.vue new file mode 100644 index 0000000..e74a37f --- /dev/null +++ b/src/components/BigData/Block/simpleBlock.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + {{ data.name }} + + + {{ data.value }} + + {{ data.unit }} + + + + + + + + + diff --git a/src/components/BigData/Card/index.vue b/src/components/BigData/Card/index.vue new file mode 100644 index 0000000..07ee165 --- /dev/null +++ b/src/components/BigData/Card/index.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ title }} + + + {{ context }} + + + + + + + + + diff --git a/src/components/BigData/Corner/Corner1.vue b/src/components/BigData/Corner/Corner1.vue new file mode 100644 index 0000000..f0102ba --- /dev/null +++ b/src/components/BigData/Corner/Corner1.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/src/components/BigData/Layout/chartLayout.vue b/src/components/BigData/Layout/chartLayout.vue new file mode 100644 index 0000000..43d0751 --- /dev/null +++ b/src/components/BigData/Layout/chartLayout.vue @@ -0,0 +1,51 @@ + + + + {{ title }} + + + + + + + + + + + + + + + diff --git a/src/components/BigData/Title/Title2.vue b/src/components/BigData/Title/Title2.vue new file mode 100644 index 0000000..83c9467 --- /dev/null +++ b/src/components/BigData/Title/Title2.vue @@ -0,0 +1,94 @@ + + + + + + + + + + diff --git a/src/components/BigData/pieChart/simplePieChart.vue b/src/components/BigData/pieChart/simplePieChart.vue new file mode 100644 index 0000000..bab47f0 --- /dev/null +++ b/src/components/BigData/pieChart/simplePieChart.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index 1acabef..d011475 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -1,7 +1,7 @@ - - + + -