diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, plugins: [new VueLoaderPlugin()], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // 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 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/deviceConfig/liquidConfig/editGasConfig.vue b/src/views/deviceConfig/liquidConfig/editGasConfig.vue deleted file mode 100644 index bc61d77..0000000 --- a/src/views/deviceConfig/liquidConfig/editGasConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/deviceConfig/liquidConfig/editGasConfig.vue b/src/views/deviceConfig/liquidConfig/editGasConfig.vue deleted file mode 100644 index bc61d77..0000000 --- a/src/views/deviceConfig/liquidConfig/editGasConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue deleted file mode 100644 index 0eff7a8..0000000 --- a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue +++ /dev/null @@ -1,262 +0,0 @@ - - - - - diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/deviceConfig/liquidConfig/editGasConfig.vue b/src/views/deviceConfig/liquidConfig/editGasConfig.vue deleted file mode 100644 index bc61d77..0000000 --- a/src/views/deviceConfig/liquidConfig/editGasConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue deleted file mode 100644 index 0eff7a8..0000000 --- a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue +++ /dev/null @@ -1,262 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue deleted file mode 100644 index cd2bcba..0000000 --- a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/deviceConfig/liquidConfig/editGasConfig.vue b/src/views/deviceConfig/liquidConfig/editGasConfig.vue deleted file mode 100644 index bc61d77..0000000 --- a/src/views/deviceConfig/liquidConfig/editGasConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue deleted file mode 100644 index 0eff7a8..0000000 --- a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue +++ /dev/null @@ -1,262 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue deleted file mode 100644 index cd2bcba..0000000 --- a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editTempConfig.vue b/src/views/deviceConfig/liquidConfig/editTempConfig.vue deleted file mode 100644 index 76107d9..0000000 --- a/src/views/deviceConfig/liquidConfig/editTempConfig.vue +++ /dev/null @@ -1,284 +0,0 @@ - - - - - diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/deviceConfig/liquidConfig/editGasConfig.vue b/src/views/deviceConfig/liquidConfig/editGasConfig.vue deleted file mode 100644 index bc61d77..0000000 --- a/src/views/deviceConfig/liquidConfig/editGasConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue deleted file mode 100644 index 0eff7a8..0000000 --- a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue +++ /dev/null @@ -1,262 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue deleted file mode 100644 index cd2bcba..0000000 --- a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editTempConfig.vue b/src/views/deviceConfig/liquidConfig/editTempConfig.vue deleted file mode 100644 index 76107d9..0000000 --- a/src/views/deviceConfig/liquidConfig/editTempConfig.vue +++ /dev/null @@ -1,284 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listDigConfig.vue b/src/views/deviceConfig/liquidConfig/listDigConfig.vue deleted file mode 100644 index eed641b..0000000 --- a/src/views/deviceConfig/liquidConfig/listDigConfig.vue +++ /dev/null @@ -1,347 +0,0 @@ - - - - - diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/deviceConfig/liquidConfig/editGasConfig.vue b/src/views/deviceConfig/liquidConfig/editGasConfig.vue deleted file mode 100644 index bc61d77..0000000 --- a/src/views/deviceConfig/liquidConfig/editGasConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue deleted file mode 100644 index 0eff7a8..0000000 --- a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue +++ /dev/null @@ -1,262 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue deleted file mode 100644 index cd2bcba..0000000 --- a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editTempConfig.vue b/src/views/deviceConfig/liquidConfig/editTempConfig.vue deleted file mode 100644 index 76107d9..0000000 --- a/src/views/deviceConfig/liquidConfig/editTempConfig.vue +++ /dev/null @@ -1,284 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listDigConfig.vue b/src/views/deviceConfig/liquidConfig/listDigConfig.vue deleted file mode 100644 index eed641b..0000000 --- a/src/views/deviceConfig/liquidConfig/listDigConfig.vue +++ /dev/null @@ -1,347 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue deleted file mode 100644 index 4020982..0000000 --- a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue +++ /dev/null @@ -1,326 +0,0 @@ - - - - - diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/deviceConfig/liquidConfig/editGasConfig.vue b/src/views/deviceConfig/liquidConfig/editGasConfig.vue deleted file mode 100644 index bc61d77..0000000 --- a/src/views/deviceConfig/liquidConfig/editGasConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue deleted file mode 100644 index 0eff7a8..0000000 --- a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue +++ /dev/null @@ -1,262 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue deleted file mode 100644 index cd2bcba..0000000 --- a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editTempConfig.vue b/src/views/deviceConfig/liquidConfig/editTempConfig.vue deleted file mode 100644 index 76107d9..0000000 --- a/src/views/deviceConfig/liquidConfig/editTempConfig.vue +++ /dev/null @@ -1,284 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listDigConfig.vue b/src/views/deviceConfig/liquidConfig/listDigConfig.vue deleted file mode 100644 index eed641b..0000000 --- a/src/views/deviceConfig/liquidConfig/listDigConfig.vue +++ /dev/null @@ -1,347 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue deleted file mode 100644 index 4020982..0000000 --- a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue +++ /dev/null @@ -1,326 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue deleted file mode 100644 index bf744db..0000000 --- a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue +++ /dev/null @@ -1,346 +0,0 @@ - - - - - diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/deviceConfig/liquidConfig/editGasConfig.vue b/src/views/deviceConfig/liquidConfig/editGasConfig.vue deleted file mode 100644 index bc61d77..0000000 --- a/src/views/deviceConfig/liquidConfig/editGasConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue deleted file mode 100644 index 0eff7a8..0000000 --- a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue +++ /dev/null @@ -1,262 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue deleted file mode 100644 index cd2bcba..0000000 --- a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editTempConfig.vue b/src/views/deviceConfig/liquidConfig/editTempConfig.vue deleted file mode 100644 index 76107d9..0000000 --- a/src/views/deviceConfig/liquidConfig/editTempConfig.vue +++ /dev/null @@ -1,284 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listDigConfig.vue b/src/views/deviceConfig/liquidConfig/listDigConfig.vue deleted file mode 100644 index eed641b..0000000 --- a/src/views/deviceConfig/liquidConfig/listDigConfig.vue +++ /dev/null @@ -1,347 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue deleted file mode 100644 index 4020982..0000000 --- a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue +++ /dev/null @@ -1,326 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue deleted file mode 100644 index bf744db..0000000 --- a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue +++ /dev/null @@ -1,346 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listTempConfig.vue b/src/views/deviceConfig/liquidConfig/listTempConfig.vue deleted file mode 100644 index 27b4611..0000000 --- a/src/views/deviceConfig/liquidConfig/listTempConfig.vue +++ /dev/null @@ -1,337 +0,0 @@ - - - - - diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/deviceConfig/liquidConfig/editGasConfig.vue b/src/views/deviceConfig/liquidConfig/editGasConfig.vue deleted file mode 100644 index bc61d77..0000000 --- a/src/views/deviceConfig/liquidConfig/editGasConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue deleted file mode 100644 index 0eff7a8..0000000 --- a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue +++ /dev/null @@ -1,262 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue deleted file mode 100644 index cd2bcba..0000000 --- a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editTempConfig.vue b/src/views/deviceConfig/liquidConfig/editTempConfig.vue deleted file mode 100644 index 76107d9..0000000 --- a/src/views/deviceConfig/liquidConfig/editTempConfig.vue +++ /dev/null @@ -1,284 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listDigConfig.vue b/src/views/deviceConfig/liquidConfig/listDigConfig.vue deleted file mode 100644 index eed641b..0000000 --- a/src/views/deviceConfig/liquidConfig/listDigConfig.vue +++ /dev/null @@ -1,347 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue deleted file mode 100644 index 4020982..0000000 --- a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue +++ /dev/null @@ -1,326 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue deleted file mode 100644 index bf744db..0000000 --- a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue +++ /dev/null @@ -1,346 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listTempConfig.vue b/src/views/deviceConfig/liquidConfig/listTempConfig.vue deleted file mode 100644 index 27b4611..0000000 --- a/src/views/deviceConfig/liquidConfig/listTempConfig.vue +++ /dev/null @@ -1,337 +0,0 @@ - - - - - diff --git a/src/views/deviceManage/listDevice.vue b/src/views/deviceManage/listDevice.vue index d13530d..be9095c 100644 --- a/src/views/deviceManage/listDevice.vue +++ b/src/views/deviceManage/listDevice.vue @@ -341,12 +341,13 @@ const devcode = row.devcode const deviceType = row.deviceType const params = { devcode: devcode, deviceType: deviceType } - const routeData = this.$router.resolve({ - name: 'DataManage', - query: params, - params: params - }) - window.open(routeData.href, '_blank') + // const routeData = this.$router.resolve({ + // name: 'DataManage', + // query: params, + // params: params + // }) + this.$router.push({ name: 'DataManage', query: params }) + // window.open(routeData.href, '_blank') }, showWellDetail(row) { this.wellShow = true diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/deviceConfig/liquidConfig/editGasConfig.vue b/src/views/deviceConfig/liquidConfig/editGasConfig.vue deleted file mode 100644 index bc61d77..0000000 --- a/src/views/deviceConfig/liquidConfig/editGasConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue deleted file mode 100644 index 0eff7a8..0000000 --- a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue +++ /dev/null @@ -1,262 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue deleted file mode 100644 index cd2bcba..0000000 --- a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editTempConfig.vue b/src/views/deviceConfig/liquidConfig/editTempConfig.vue deleted file mode 100644 index 76107d9..0000000 --- a/src/views/deviceConfig/liquidConfig/editTempConfig.vue +++ /dev/null @@ -1,284 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listDigConfig.vue b/src/views/deviceConfig/liquidConfig/listDigConfig.vue deleted file mode 100644 index eed641b..0000000 --- a/src/views/deviceConfig/liquidConfig/listDigConfig.vue +++ /dev/null @@ -1,347 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue deleted file mode 100644 index 4020982..0000000 --- a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue +++ /dev/null @@ -1,326 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue deleted file mode 100644 index bf744db..0000000 --- a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue +++ /dev/null @@ -1,346 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listTempConfig.vue b/src/views/deviceConfig/liquidConfig/listTempConfig.vue deleted file mode 100644 index 27b4611..0000000 --- a/src/views/deviceConfig/liquidConfig/listTempConfig.vue +++ /dev/null @@ -1,337 +0,0 @@ - - - - - diff --git a/src/views/deviceManage/listDevice.vue b/src/views/deviceManage/listDevice.vue index d13530d..be9095c 100644 --- a/src/views/deviceManage/listDevice.vue +++ b/src/views/deviceManage/listDevice.vue @@ -341,12 +341,13 @@ const devcode = row.devcode const deviceType = row.deviceType const params = { devcode: devcode, deviceType: deviceType } - const routeData = this.$router.resolve({ - name: 'DataManage', - query: params, - params: params - }) - window.open(routeData.href, '_blank') + // const routeData = this.$router.resolve({ + // name: 'DataManage', + // query: params, + // params: params + // }) + this.$router.push({ name: 'DataManage', query: params }) + // window.open(routeData.href, '_blank') }, showWellDetail(row) { this.wellShow = true diff --git a/src/views/jobManage/detailJob.vue b/src/views/jobManage/detailJob.vue index 0020bf4..6f9d5b3 100644 --- a/src/views/jobManage/detailJob.vue +++ b/src/views/jobManage/detailJob.vue @@ -219,7 +219,7 @@ this.handleImageList = [] } // 处理工单动态 - // 若有人接单,状态改为已接单 + // 若有getJobTime有值,表示有人接单,状态改为已接单 if (job.getJobTime) { const activity = { content: job.getJobPerson + '已接单', @@ -243,30 +243,41 @@ this.activities.push(activity) this.activeStep = 2 } else if (job.alarmType === '1') { // 若无人确认且为数据异常插入空的待确认 - const activity = { - content: '待确认', - timestamp: '' + if (job.jobStatus !== '4') { // 状态不为已取消的话,显示待确认 + const activity = { + content: '待确认', + timestamp: '' + } + this.activities.push(activity) } - this.activities.push(activity) } if (job.handleJobTime) { - // 若有处理时间,状态置为已完成 + // 若有处理时间,状态置为已完成或已取消 // 若没有处理人则处理人为系统 let handleJobPerson = job.handleJobPerson if (!handleJobPerson) { handleJobPerson = '系统' } - const activity1 = { - content: handleJobPerson + '处理中', - timestamp: job.handleJobTime + if (job.jobStatus === '3') { // 正常完成 + const activity1 = { + content: handleJobPerson + '处理中', + timestamp: job.handleJobTime + } + const activity2 = { + content: handleJobPerson + '已完成', + timestamp: job.handleJobTime + } + this.activities.push(activity1) + this.activities.push(activity2) + this.activeStep = 3 + } else if (job.jobStatus === '4') { // 已取消 + const activity1 = { + content: handleJobPerson + '已取消', + timestamp: job.handleJobTime + } + this.activities.push(activity1) + this.activeStep = 2 } - const activity2 = { - content: handleJobPerson + '已完成', - timestamp: job.handleJobTime - } - this.activities.push(activity1) - this.activities.push(activity2) - this.activeStep = 3 } else if (this.jobForm.jobStatusName === '完成') { // 特殊情况处理:已确认之后结束的工单,将完成人和时间用确认人代替 const activity = { diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/deviceConfig/liquidConfig/editGasConfig.vue b/src/views/deviceConfig/liquidConfig/editGasConfig.vue deleted file mode 100644 index bc61d77..0000000 --- a/src/views/deviceConfig/liquidConfig/editGasConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue deleted file mode 100644 index 0eff7a8..0000000 --- a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue +++ /dev/null @@ -1,262 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue deleted file mode 100644 index cd2bcba..0000000 --- a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editTempConfig.vue b/src/views/deviceConfig/liquidConfig/editTempConfig.vue deleted file mode 100644 index 76107d9..0000000 --- a/src/views/deviceConfig/liquidConfig/editTempConfig.vue +++ /dev/null @@ -1,284 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listDigConfig.vue b/src/views/deviceConfig/liquidConfig/listDigConfig.vue deleted file mode 100644 index eed641b..0000000 --- a/src/views/deviceConfig/liquidConfig/listDigConfig.vue +++ /dev/null @@ -1,347 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue deleted file mode 100644 index 4020982..0000000 --- a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue +++ /dev/null @@ -1,326 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue deleted file mode 100644 index bf744db..0000000 --- a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue +++ /dev/null @@ -1,346 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listTempConfig.vue b/src/views/deviceConfig/liquidConfig/listTempConfig.vue deleted file mode 100644 index 27b4611..0000000 --- a/src/views/deviceConfig/liquidConfig/listTempConfig.vue +++ /dev/null @@ -1,337 +0,0 @@ - - - - - diff --git a/src/views/deviceManage/listDevice.vue b/src/views/deviceManage/listDevice.vue index d13530d..be9095c 100644 --- a/src/views/deviceManage/listDevice.vue +++ b/src/views/deviceManage/listDevice.vue @@ -341,12 +341,13 @@ const devcode = row.devcode const deviceType = row.deviceType const params = { devcode: devcode, deviceType: deviceType } - const routeData = this.$router.resolve({ - name: 'DataManage', - query: params, - params: params - }) - window.open(routeData.href, '_blank') + // const routeData = this.$router.resolve({ + // name: 'DataManage', + // query: params, + // params: params + // }) + this.$router.push({ name: 'DataManage', query: params }) + // window.open(routeData.href, '_blank') }, showWellDetail(row) { this.wellShow = true diff --git a/src/views/jobManage/detailJob.vue b/src/views/jobManage/detailJob.vue index 0020bf4..6f9d5b3 100644 --- a/src/views/jobManage/detailJob.vue +++ b/src/views/jobManage/detailJob.vue @@ -219,7 +219,7 @@ this.handleImageList = [] } // 处理工单动态 - // 若有人接单,状态改为已接单 + // 若有getJobTime有值,表示有人接单,状态改为已接单 if (job.getJobTime) { const activity = { content: job.getJobPerson + '已接单', @@ -243,30 +243,41 @@ this.activities.push(activity) this.activeStep = 2 } else if (job.alarmType === '1') { // 若无人确认且为数据异常插入空的待确认 - const activity = { - content: '待确认', - timestamp: '' + if (job.jobStatus !== '4') { // 状态不为已取消的话,显示待确认 + const activity = { + content: '待确认', + timestamp: '' + } + this.activities.push(activity) } - this.activities.push(activity) } if (job.handleJobTime) { - // 若有处理时间,状态置为已完成 + // 若有处理时间,状态置为已完成或已取消 // 若没有处理人则处理人为系统 let handleJobPerson = job.handleJobPerson if (!handleJobPerson) { handleJobPerson = '系统' } - const activity1 = { - content: handleJobPerson + '处理中', - timestamp: job.handleJobTime + if (job.jobStatus === '3') { // 正常完成 + const activity1 = { + content: handleJobPerson + '处理中', + timestamp: job.handleJobTime + } + const activity2 = { + content: handleJobPerson + '已完成', + timestamp: job.handleJobTime + } + this.activities.push(activity1) + this.activities.push(activity2) + this.activeStep = 3 + } else if (job.jobStatus === '4') { // 已取消 + const activity1 = { + content: handleJobPerson + '已取消', + timestamp: job.handleJobTime + } + this.activities.push(activity1) + this.activeStep = 2 } - const activity2 = { - content: handleJobPerson + '已完成', - timestamp: job.handleJobTime - } - this.activities.push(activity1) - this.activities.push(activity2) - this.activeStep = 3 } else if (this.jobForm.jobStatusName === '完成') { // 特殊情况处理:已确认之后结束的工单,将完成人和时间用确认人代替 const activity = { diff --git a/src/views/jobManage/listJobs.vue b/src/views/jobManage/listJobs.vue index a7106ad..a105203 100644 --- a/src/views/jobManage/listJobs.vue +++ b/src/views/jobManage/listJobs.vue @@ -4,37 +4,58 @@
- - - - - - - - - - - - - - - - - 搜索 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + + + 高级检索 + +
@@ -82,10 +103,10 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/deviceConfig/liquidConfig/editGasConfig.vue b/src/views/deviceConfig/liquidConfig/editGasConfig.vue deleted file mode 100644 index bc61d77..0000000 --- a/src/views/deviceConfig/liquidConfig/editGasConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue deleted file mode 100644 index 0eff7a8..0000000 --- a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue +++ /dev/null @@ -1,262 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue deleted file mode 100644 index cd2bcba..0000000 --- a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editTempConfig.vue b/src/views/deviceConfig/liquidConfig/editTempConfig.vue deleted file mode 100644 index 76107d9..0000000 --- a/src/views/deviceConfig/liquidConfig/editTempConfig.vue +++ /dev/null @@ -1,284 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listDigConfig.vue b/src/views/deviceConfig/liquidConfig/listDigConfig.vue deleted file mode 100644 index eed641b..0000000 --- a/src/views/deviceConfig/liquidConfig/listDigConfig.vue +++ /dev/null @@ -1,347 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue deleted file mode 100644 index 4020982..0000000 --- a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue +++ /dev/null @@ -1,326 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue deleted file mode 100644 index bf744db..0000000 --- a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue +++ /dev/null @@ -1,346 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listTempConfig.vue b/src/views/deviceConfig/liquidConfig/listTempConfig.vue deleted file mode 100644 index 27b4611..0000000 --- a/src/views/deviceConfig/liquidConfig/listTempConfig.vue +++ /dev/null @@ -1,337 +0,0 @@ - - - - - diff --git a/src/views/deviceManage/listDevice.vue b/src/views/deviceManage/listDevice.vue index d13530d..be9095c 100644 --- a/src/views/deviceManage/listDevice.vue +++ b/src/views/deviceManage/listDevice.vue @@ -341,12 +341,13 @@ const devcode = row.devcode const deviceType = row.deviceType const params = { devcode: devcode, deviceType: deviceType } - const routeData = this.$router.resolve({ - name: 'DataManage', - query: params, - params: params - }) - window.open(routeData.href, '_blank') + // const routeData = this.$router.resolve({ + // name: 'DataManage', + // query: params, + // params: params + // }) + this.$router.push({ name: 'DataManage', query: params }) + // window.open(routeData.href, '_blank') }, showWellDetail(row) { this.wellShow = true diff --git a/src/views/jobManage/detailJob.vue b/src/views/jobManage/detailJob.vue index 0020bf4..6f9d5b3 100644 --- a/src/views/jobManage/detailJob.vue +++ b/src/views/jobManage/detailJob.vue @@ -219,7 +219,7 @@ this.handleImageList = [] } // 处理工单动态 - // 若有人接单,状态改为已接单 + // 若有getJobTime有值,表示有人接单,状态改为已接单 if (job.getJobTime) { const activity = { content: job.getJobPerson + '已接单', @@ -243,30 +243,41 @@ this.activities.push(activity) this.activeStep = 2 } else if (job.alarmType === '1') { // 若无人确认且为数据异常插入空的待确认 - const activity = { - content: '待确认', - timestamp: '' + if (job.jobStatus !== '4') { // 状态不为已取消的话,显示待确认 + const activity = { + content: '待确认', + timestamp: '' + } + this.activities.push(activity) } - this.activities.push(activity) } if (job.handleJobTime) { - // 若有处理时间,状态置为已完成 + // 若有处理时间,状态置为已完成或已取消 // 若没有处理人则处理人为系统 let handleJobPerson = job.handleJobPerson if (!handleJobPerson) { handleJobPerson = '系统' } - const activity1 = { - content: handleJobPerson + '处理中', - timestamp: job.handleJobTime + if (job.jobStatus === '3') { // 正常完成 + const activity1 = { + content: handleJobPerson + '处理中', + timestamp: job.handleJobTime + } + const activity2 = { + content: handleJobPerson + '已完成', + timestamp: job.handleJobTime + } + this.activities.push(activity1) + this.activities.push(activity2) + this.activeStep = 3 + } else if (job.jobStatus === '4') { // 已取消 + const activity1 = { + content: handleJobPerson + '已取消', + timestamp: job.handleJobTime + } + this.activities.push(activity1) + this.activeStep = 2 } - const activity2 = { - content: handleJobPerson + '已完成', - timestamp: job.handleJobTime - } - this.activities.push(activity1) - this.activities.push(activity2) - this.activeStep = 3 } else if (this.jobForm.jobStatusName === '完成') { // 特殊情况处理:已确认之后结束的工单,将完成人和时间用确认人代替 const activity = { diff --git a/src/views/jobManage/listJobs.vue b/src/views/jobManage/listJobs.vue index a7106ad..a105203 100644 --- a/src/views/jobManage/listJobs.vue +++ b/src/views/jobManage/listJobs.vue @@ -4,37 +4,58 @@
- - - - - - - - - - - - - - - - - 搜索 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + + + 高级检索 + +
@@ -82,10 +103,10 @@ + + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/deviceConfig/liquidConfig/editGasConfig.vue b/src/views/deviceConfig/liquidConfig/editGasConfig.vue deleted file mode 100644 index bc61d77..0000000 --- a/src/views/deviceConfig/liquidConfig/editGasConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue deleted file mode 100644 index 0eff7a8..0000000 --- a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue +++ /dev/null @@ -1,262 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue deleted file mode 100644 index cd2bcba..0000000 --- a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editTempConfig.vue b/src/views/deviceConfig/liquidConfig/editTempConfig.vue deleted file mode 100644 index 76107d9..0000000 --- a/src/views/deviceConfig/liquidConfig/editTempConfig.vue +++ /dev/null @@ -1,284 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listDigConfig.vue b/src/views/deviceConfig/liquidConfig/listDigConfig.vue deleted file mode 100644 index eed641b..0000000 --- a/src/views/deviceConfig/liquidConfig/listDigConfig.vue +++ /dev/null @@ -1,347 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue deleted file mode 100644 index 4020982..0000000 --- a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue +++ /dev/null @@ -1,326 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue deleted file mode 100644 index bf744db..0000000 --- a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue +++ /dev/null @@ -1,346 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listTempConfig.vue b/src/views/deviceConfig/liquidConfig/listTempConfig.vue deleted file mode 100644 index 27b4611..0000000 --- a/src/views/deviceConfig/liquidConfig/listTempConfig.vue +++ /dev/null @@ -1,337 +0,0 @@ - - - - - diff --git a/src/views/deviceManage/listDevice.vue b/src/views/deviceManage/listDevice.vue index d13530d..be9095c 100644 --- a/src/views/deviceManage/listDevice.vue +++ b/src/views/deviceManage/listDevice.vue @@ -341,12 +341,13 @@ const devcode = row.devcode const deviceType = row.deviceType const params = { devcode: devcode, deviceType: deviceType } - const routeData = this.$router.resolve({ - name: 'DataManage', - query: params, - params: params - }) - window.open(routeData.href, '_blank') + // const routeData = this.$router.resolve({ + // name: 'DataManage', + // query: params, + // params: params + // }) + this.$router.push({ name: 'DataManage', query: params }) + // window.open(routeData.href, '_blank') }, showWellDetail(row) { this.wellShow = true diff --git a/src/views/jobManage/detailJob.vue b/src/views/jobManage/detailJob.vue index 0020bf4..6f9d5b3 100644 --- a/src/views/jobManage/detailJob.vue +++ b/src/views/jobManage/detailJob.vue @@ -219,7 +219,7 @@ this.handleImageList = [] } // 处理工单动态 - // 若有人接单,状态改为已接单 + // 若有getJobTime有值,表示有人接单,状态改为已接单 if (job.getJobTime) { const activity = { content: job.getJobPerson + '已接单', @@ -243,30 +243,41 @@ this.activities.push(activity) this.activeStep = 2 } else if (job.alarmType === '1') { // 若无人确认且为数据异常插入空的待确认 - const activity = { - content: '待确认', - timestamp: '' + if (job.jobStatus !== '4') { // 状态不为已取消的话,显示待确认 + const activity = { + content: '待确认', + timestamp: '' + } + this.activities.push(activity) } - this.activities.push(activity) } if (job.handleJobTime) { - // 若有处理时间,状态置为已完成 + // 若有处理时间,状态置为已完成或已取消 // 若没有处理人则处理人为系统 let handleJobPerson = job.handleJobPerson if (!handleJobPerson) { handleJobPerson = '系统' } - const activity1 = { - content: handleJobPerson + '处理中', - timestamp: job.handleJobTime + if (job.jobStatus === '3') { // 正常完成 + const activity1 = { + content: handleJobPerson + '处理中', + timestamp: job.handleJobTime + } + const activity2 = { + content: handleJobPerson + '已完成', + timestamp: job.handleJobTime + } + this.activities.push(activity1) + this.activities.push(activity2) + this.activeStep = 3 + } else if (job.jobStatus === '4') { // 已取消 + const activity1 = { + content: handleJobPerson + '已取消', + timestamp: job.handleJobTime + } + this.activities.push(activity1) + this.activeStep = 2 } - const activity2 = { - content: handleJobPerson + '已完成', - timestamp: job.handleJobTime - } - this.activities.push(activity1) - this.activities.push(activity2) - this.activeStep = 3 } else if (this.jobForm.jobStatusName === '完成') { // 特殊情况处理:已确认之后结束的工单,将完成人和时间用确认人代替 const activity = { diff --git a/src/views/jobManage/listJobs.vue b/src/views/jobManage/listJobs.vue index a7106ad..a105203 100644 --- a/src/views/jobManage/listJobs.vue +++ b/src/views/jobManage/listJobs.vue @@ -4,37 +4,58 @@
- - - - - - - - - - - - - - - - - 搜索 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + + + 高级检索 + +
@@ -82,10 +103,10 @@ + + diff --git a/src/views/jobManage/listJobsOverTimeHandle.vue b/src/views/jobManage/listJobsOverTimeHandle.vue new file mode 100644 index 0000000..337c3e6 --- /dev/null +++ b/src/views/jobManage/listJobsOverTimeHandle.vue @@ -0,0 +1,396 @@ + + + + + diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/deviceConfig/liquidConfig/editGasConfig.vue b/src/views/deviceConfig/liquidConfig/editGasConfig.vue deleted file mode 100644 index bc61d77..0000000 --- a/src/views/deviceConfig/liquidConfig/editGasConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue deleted file mode 100644 index 0eff7a8..0000000 --- a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue +++ /dev/null @@ -1,262 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue deleted file mode 100644 index cd2bcba..0000000 --- a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editTempConfig.vue b/src/views/deviceConfig/liquidConfig/editTempConfig.vue deleted file mode 100644 index 76107d9..0000000 --- a/src/views/deviceConfig/liquidConfig/editTempConfig.vue +++ /dev/null @@ -1,284 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listDigConfig.vue b/src/views/deviceConfig/liquidConfig/listDigConfig.vue deleted file mode 100644 index eed641b..0000000 --- a/src/views/deviceConfig/liquidConfig/listDigConfig.vue +++ /dev/null @@ -1,347 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue deleted file mode 100644 index 4020982..0000000 --- a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue +++ /dev/null @@ -1,326 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue deleted file mode 100644 index bf744db..0000000 --- a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue +++ /dev/null @@ -1,346 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listTempConfig.vue b/src/views/deviceConfig/liquidConfig/listTempConfig.vue deleted file mode 100644 index 27b4611..0000000 --- a/src/views/deviceConfig/liquidConfig/listTempConfig.vue +++ /dev/null @@ -1,337 +0,0 @@ - - - - - diff --git a/src/views/deviceManage/listDevice.vue b/src/views/deviceManage/listDevice.vue index d13530d..be9095c 100644 --- a/src/views/deviceManage/listDevice.vue +++ b/src/views/deviceManage/listDevice.vue @@ -341,12 +341,13 @@ const devcode = row.devcode const deviceType = row.deviceType const params = { devcode: devcode, deviceType: deviceType } - const routeData = this.$router.resolve({ - name: 'DataManage', - query: params, - params: params - }) - window.open(routeData.href, '_blank') + // const routeData = this.$router.resolve({ + // name: 'DataManage', + // query: params, + // params: params + // }) + this.$router.push({ name: 'DataManage', query: params }) + // window.open(routeData.href, '_blank') }, showWellDetail(row) { this.wellShow = true diff --git a/src/views/jobManage/detailJob.vue b/src/views/jobManage/detailJob.vue index 0020bf4..6f9d5b3 100644 --- a/src/views/jobManage/detailJob.vue +++ b/src/views/jobManage/detailJob.vue @@ -219,7 +219,7 @@ this.handleImageList = [] } // 处理工单动态 - // 若有人接单,状态改为已接单 + // 若有getJobTime有值,表示有人接单,状态改为已接单 if (job.getJobTime) { const activity = { content: job.getJobPerson + '已接单', @@ -243,30 +243,41 @@ this.activities.push(activity) this.activeStep = 2 } else if (job.alarmType === '1') { // 若无人确认且为数据异常插入空的待确认 - const activity = { - content: '待确认', - timestamp: '' + if (job.jobStatus !== '4') { // 状态不为已取消的话,显示待确认 + const activity = { + content: '待确认', + timestamp: '' + } + this.activities.push(activity) } - this.activities.push(activity) } if (job.handleJobTime) { - // 若有处理时间,状态置为已完成 + // 若有处理时间,状态置为已完成或已取消 // 若没有处理人则处理人为系统 let handleJobPerson = job.handleJobPerson if (!handleJobPerson) { handleJobPerson = '系统' } - const activity1 = { - content: handleJobPerson + '处理中', - timestamp: job.handleJobTime + if (job.jobStatus === '3') { // 正常完成 + const activity1 = { + content: handleJobPerson + '处理中', + timestamp: job.handleJobTime + } + const activity2 = { + content: handleJobPerson + '已完成', + timestamp: job.handleJobTime + } + this.activities.push(activity1) + this.activities.push(activity2) + this.activeStep = 3 + } else if (job.jobStatus === '4') { // 已取消 + const activity1 = { + content: handleJobPerson + '已取消', + timestamp: job.handleJobTime + } + this.activities.push(activity1) + this.activeStep = 2 } - const activity2 = { - content: handleJobPerson + '已完成', - timestamp: job.handleJobTime - } - this.activities.push(activity1) - this.activities.push(activity2) - this.activeStep = 3 } else if (this.jobForm.jobStatusName === '完成') { // 特殊情况处理:已确认之后结束的工单,将完成人和时间用确认人代替 const activity = { diff --git a/src/views/jobManage/listJobs.vue b/src/views/jobManage/listJobs.vue index a7106ad..a105203 100644 --- a/src/views/jobManage/listJobs.vue +++ b/src/views/jobManage/listJobs.vue @@ -4,37 +4,58 @@
- - - - - - - - - - - - - - - - - 搜索 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + + + 高级检索 + +
@@ -82,10 +103,10 @@ + + diff --git a/src/views/jobManage/listJobsOverTimeHandle.vue b/src/views/jobManage/listJobsOverTimeHandle.vue new file mode 100644 index 0000000..337c3e6 --- /dev/null +++ b/src/views/jobManage/listJobsOverTimeHandle.vue @@ -0,0 +1,396 @@ + + + + + diff --git a/src/views/overview/overview.vue b/src/views/overview/overview.vue index b44ac7e..3676288 100644 --- a/src/views/overview/overview.vue +++ b/src/views/overview/overview.vue @@ -20,6 +20,7 @@ 搜索 + 清除查询 显示全部闸井 @@ -59,20 +60,20 @@
- + - -
- -
-
+ + + + + + + + + + + +
@@ -97,8 +97,7 @@
{{ wellInfo.wellCode }}
-
闸井类型:{{ wellInfo.wellTypeName }}
-
井深:{{ wellInfo.deep }}(m)
+
井类型:{{ wellInfo.wellTypeName }}
权属单位:{{ wellInfo.deptName }}
详细地址:{{ wellInfo.position }}
@@ -114,7 +113,7 @@
设备编号:{{ alarm.devcode }}
-
井深:{{ alarmInfo.deep }}(m)
+
井类型:{{ wellInfo.wellTypeName }}
权属单位:{{ alarmInfo.deptName }}
详细地址:{{ alarmInfo.position }}
@@ -130,7 +129,9 @@ import { getWellType } from '@/api/well' import { getWellList, getWellInfo, getAlarmsNow, getWellAlarms } from '@/api/overview' import DeptSelect from '../../components/DeptSelect/index' - +// import { AMapManager } from 'vue-amap' +import VueAMap from 'vue-amap' +const aMapManager = new VueAMap.AMapManager() export default { name: 'Overview', components: { DeptSelect, SelectTree }, @@ -167,12 +168,12 @@ width: 180, align: 'center' } - ], // 显示列 + ], // 告警列表显示列 tableShow: true, // 是否显示告警列表 tableIcon: 'el-icon-arrow-up', count: 30, - showWellType: this.showWellType(), // 是否显示闸井类型下拉 - wellTypeList: [], // 闸井类型列表 + showWellType: this.showWellType(), // 是否显示井类型下拉 + wellTypeList: [], // 井类型列表 deptProps: { parent: 'pid', value: 'id', @@ -181,21 +182,13 @@ }, // 权属单位树形下拉菜单 deptTreeList: null, // 组织树列表数据 showDeptTree: 0, // 是否显示权属单位下拉,0不显示,1显示树,2显示平面 - icons: { - '1': 'well-rain', - '2': 'well-sewage', - '3': 'well-gas', - '4': 'well-heat', - '5': 'well-power', - '6': 'well-heat', - '7': 'well-sewage' - }, // 井类型图标字典 - otherIcon: 'well-common', + commonIcon: 'well-common-green', // 通用图标 绿 + commonIconAlarm: 'well-common-red', // 通用图标 红 center: [this.$store.getters.lng, this.$store.getters.lat], // 地图中心 zoom: 12, // 地图缩放比例 markers: [], // 井列表标注marker alarmList: [], // 报警列表 - alarmWells: [], // 报警闸井列表 + alarmWells: [], // 报警井列表 offset: [-10, -10], // 偏移量 alarmOffset: [-15, -30], // 偏移量 wellInfo: { @@ -222,50 +215,45 @@ deptShowTop: false, // 是否显示顶级 clock: null, // 计时器 hasAlarm: false, // 是否有报警, - showAll: false, // 是否显示全部闸井(包含报警和不报警,为false时只显示报警) - firstAmount: false, // 是否第一次加载井数据 - loading: true, - plugins: [{ - pName: 'Geolocation', - events: { - init(o) { - // o 是高德地图定位插件实例 - o.getCurrentPosition((status, result) => { - if (result && result.position) { - console.log('geolocation') - console.log(result) - self.center = [result.position.lng, result.position.lat] - self.$nextTick() - } - }) - } - } - }] + showAll: false, // 是否显示全部井(包含报警和不报警,为false时只显示报警) + firstAmount: true, // 是否第一次加载井数据 + loading: true, // 加载图标是否显示 + aMapManager, + massMarks: null, // 海量点 + showClearBtn: false // 是否显示清除查询按钮 } }, watch: { showAll(val) { if (val) { // 显示全部 this.listQuery.isAlarm = '0' - if (this.firstAmount === false) { // 如果是第一次,从后台加载全部数据 + // 先清空查询条件 + this.listQuery.deptid = '' + this.listQuery.keywords = '' + this.listQuery.wellType = '' + // 如果是第一次勾选这个选项,从后台加载全部数据,否则只需要过滤对象,更新显示 + if (this.firstAmount === true) { this.getWellList() } else { - this.search() + this.filterIcon() } } else { // 仅显示报警 this.listQuery.isAlarm = '1' - this.search() + this.filterIcon() } } }, - created() { - this.fetchWellType() - this.getWellList() - this.refreshAlarm() - this.countDown() + mounted() { + var that = this + that.fetchWellType() + setTimeout(function() { + that.getWellList() + that.refreshAlarm() + that.countDown() + }, 1000) }, methods: { - // 倒计时 + // 倒计时函数,暂时不用了 countDown() { this.clock = window.setInterval(() => { this.count-- @@ -275,10 +263,11 @@ } }, 1000) }, - // 获取闸井类型 + // 获取井类型,显示井类型下拉 fetchWellType() { getWellType().then(response => { this.wellTypeList = [] + // 如果该用户支持的井类型只有一个,则不显示该筛选框 const wellTypes = this.$store.getters.wellTypes for (const wellType of response.data) { if (wellTypes.indexOf(wellType.value) !== -1) { @@ -290,14 +279,35 @@ } }) }, - // 数据筛选 - search() { - this.currentWindow.visible = false + // 数据查询 + search(showMessage = true) { + const keywords = this.listQuery.keywords + const deptid = this.listQuery.deptid + const wellType = this.listQuery.wellType + if (keywords === '' && deptid === '' && wellType === '') { + this.$message.warning('查询条件不能为空') + } else { + this.showClearBtn = true + this.filterIcon(showMessage) + } + }, + // 清除查询 + clearSearch() { + this.listQuery.wellType = '' + this.listQuery.deptid = '' + this.listQuery.keywords = '' + this.filterIcon() + this.showClearBtn = false + }, + // 过滤Marker + filterIcon(showMessage = false) { + this.currentWindow.visible = false // 弹窗隐藏 const hideWellIds = []// 要隐藏的井编号 const keywords = this.listQuery.keywords const deptid = this.listQuery.deptid const wellType = this.listQuery.wellType const isAlarm = this.listQuery.isAlarm + console.log('markers length:', this.markers.length) let center = [] // 查询全部井,是否匹配 for (const marker of this.markers) { @@ -315,8 +325,18 @@ show = false } // 如果只显示报警,井的状态不是报警 - if (isAlarm === '1' && marker.wellStatus !== 'alarm') { - show = false + if (isAlarm === '1') { + const index = this.alarmWells.filter(item => { + if (item.wellCode === marker.wellCode) { + console.log('匹配') + } + return item.wellCode === marker.wellCode + }) + if (index.length === 0) { // 如果不在alarmWells中,即index=-1,表示没有匹配成功,show=false + show = false + } else { + console.log('no hide:', marker.wellCode) + } } if (show === false) { hideWellIds.push(marker.wellId) @@ -325,10 +345,11 @@ } marker.visible = show } - // 如果没有找到符合要求的井 + // 如果没有找到符合要求的井,将全部查询结果隐藏 if (hideWellIds.length === this.markers.length) { - this.$message.warning('查无结果') - // 将全部查询结果隐藏 + if (showMessage) { + this.$message.warning('查无结果') + } for (const alarmWell of this.alarmWells) { alarmWell.visible = false } @@ -345,8 +366,48 @@ if (center.length > 0) { this.center = center } + this.resetMassMarker() }, - // 获取闸井列表 + // 加载海量点 + mountMassMarker() { + const map = aMapManager.getMap() + + // 创建样式对象 + const style = { + url: './static/images/well/pin.svg', + anchor: new AMap.Pixel(8, 15), + size: new AMap.Size(15, 15) + } + // 海量点初始化 + this.massMarks = new AMap.MassMarks(this.markers, { + zIndex: 5, // 海量点图层叠加的顺序 + zooms: [3, 20], // 在指定地图缩放级别范围内展示海量点图层 + style: style // 设置样式对象 + }) + // 将海量点添加至地图实例 + this.massMarks.setMap(map) + // 海量点点击事件 + const that = this + this.massMarks.on('click', function(e) { + that.openInfoWindow(e.data.id) + }) + }, + // 过滤海量点 + resetMassMarker() { + const map = aMapManager.getMap() + let markers = this.markers.filter(item => { + return item.visible === true + }) + if (markers === null) { + markers = [] + this.massMarks.clear() + } else { + this.massMarks.setData(markers) + } + // 将海量点添加至地图实例 + this.massMarks.setMap(map) + }, + // 获取井列表 getWellList() { this.loading = true const listQuery = { @@ -360,20 +421,25 @@ if (response.code === 200) { const wells = response.data if (wells.length > 0) { - // 正在报警的井 + // 查询正在报警的井 if (listQuery.isAlarm === '1') { + this.markers = [] + // centerxs和centerys用于获取所有坐标,目的是排序找到中位数 const centerxs = [] const centerys = [] for (const well of wells) { this.markers.push({ wellId: well.id, + id: well.id, + name: well.wellCode, wellCode: well.wellCode, position: [parseFloat(well.lngGaode), parseFloat(well.latGaode)], + lnglat: [parseFloat(well.lngGaode), parseFloat(well.latGaode)], positionInfo: well.position, wellType: well.wellType, deptid: well.deptid, bfzt: well.bfzt, - icon: this.icons[well.wellType] ? this.icons[well.wellType] : this.otherIcon, + icon: this.commonIcon, visible: true, wellStatus: 'alarm' }) @@ -384,7 +450,7 @@ centerys.sort() const index = Math.floor(centerxs.length / 2) this.center = [centerxs[index], centerys[index]] - } else if (listQuery.isAlarm === '0') { // 状态正常的井 + } else if (listQuery.isAlarm === '0') { // 查询状态正常的井 this.firstAmount = false const centerxs = [] const centerys = [] @@ -392,12 +458,15 @@ this.markers.push({ wellId: well.id, wellCode: well.wellCode, + id: well.id, + name: well.wellCode, + lnglat: [parseFloat(well.lngGaode), parseFloat(well.latGaode)], position: [parseFloat(well.lngGaode), parseFloat(well.latGaode)], positionInfo: well.position, wellType: well.wellType, deptid: well.deptid, bfzt: well.bfzt, - icon: this.icons[well.wellType] ? this.icons[well.wellType] : this.otherIcon, + icon: this.commonIcon, visible: true, wellStatus: 'normal' }) @@ -409,11 +478,12 @@ const index = Math.floor(centerxs.length / 2) this.center = [centerxs[index], centerys[index]] } + this.mountMassMarker() } } }) }, - // 点击闸井详情气泡 + // 点击井详情气泡 openInfoWindow(wellId) { this.currentWindow.visible = false getWellInfo(wellId).then(response => { @@ -448,11 +518,13 @@ } this.alarmWells = [] for (const alarm of response.data) { - // 如果报警的井中找到 - // const item = this.alarmWells.findIndex(item => { + // 如果在markers找到该井,更改进状态为alarm + // const item = this.markers.findIndex(item => { // return item.wellCode === alarm.wellCode // }) - // if (item === -1) { + // if (item !== -1) { + // this.markers[item].wellStatus = 'alarm' + // } this.alarmWells.push({ wellCode: alarm.wellCode, wellId: alarm.wellId, @@ -469,11 +541,7 @@ openAlarmWindow(wellId, position) { // 旧弹窗不显示 this.currentWindow.visible = false - // 清空查询条件 - this.listQuery.keywords = '' - this.listQuery.wellType = '' - this.listQuery.deptid = '' - this.search() + this.filterIcon() getWellAlarms(wellId).then(response => { if (response.code === 200) { const wellInfo = response.data @@ -481,10 +549,12 @@ wellCode: wellInfo.wellCode, position: wellInfo.position, deptName: wellInfo.deptName, + wellTypeName: wellInfo.wellTypeName, alarms: wellInfo.alarmList, deep: wellInfo.deep } this.currentWindow.position = position + this.center = position this.$nextTick(() => { this.currentWindow.visible = true this.currentWindow.windowType = 'alarm' @@ -612,7 +682,7 @@ height: 20px; } .alarm-icon{ - width:30px; + width: 29px; height: 30px; } .nomal-info-window{ diff --git a/.eslintrc.js b/.eslintrc.js index 0e5c28a..e5e51a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,9 @@ es6: true, }, extends: ['plugin:vue/recommended', 'eslint:recommended'], - + globals:{ + "AMap":"AMap" + }, // 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..4751ba4 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -97,6 +97,10 @@ } ] }, + externals: { + 'AMap': 'AMap', + 'AMapUI':'AMapUI' + }, 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 61b4997..9f671cf 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -7,9 +7,9 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', // BASE_API: '"http://rest.apizza.net/mock/cfbb939c147bb6d68372de83af189fee/"', - BASE_API: '"http://106.74.146.218:2031"' + // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:14537"' - // BASE_API: '"http://119.254.103.80:14537"' + BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:8083"' // BASE_API: '"http://127.0.0.1:8083"' }) diff --git a/package.json b/package.json index 5003e53..96ae945 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "BaseFront", + "name": "SarmtwellFront", "version": "3.9.0", "license": "MIT", - "description": "A vue Base Front with Element UI & axios & iconfont & permission control & lint", + "description": "A vue Smartwell Front with Element UI & axios & iconfont & permission control & lint", "author": "Stephanie", "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", @@ -24,6 +24,7 @@ "jsencrypt": "^3.0.0-rc.1", "mockjs": "1.0.1-beta3", "normalize.css": "7.0.0", + "npm": "^6.11.3", "nprogress": "0.2.0", "v-charts": "^1.19.0", "vue": "2.5.17", diff --git a/src/api/data.js b/src/api/data.js index 9294c10..7be32bb 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -98,7 +98,7 @@ } // 批量导出开挖数据 -export function batchDigExportData(params) { +export function batchExportDigData(params) { return request({ url: 'digdata/export', method: 'get', diff --git a/src/api/dataStatics.js b/src/api/dataStatics.js index 49592a0..d6b33af 100644 --- a/src/api/dataStatics.js +++ b/src/api/dataStatics.js @@ -2,6 +2,77 @@ * 数据统计管理接口 */ import request from '@/utils/request' + +// 根据布防状态统计闸井数量 +export function wellStaticByBfzt(params) { + return request({ + url: 'well/countByBfzt', + method: 'get', + params + }) +} +// 根据权属单位统计闸井数量 +export function wellStaticByDept(params) { + return request({ + url: 'statics/wellStaticsByDept', + method: 'get', + params + }) +} + +// 根据井类型统计闸井数量 +export function wellStaticByType(params) { + return request({ + url: 'statics/wellStaticsByType', + method: 'get', + params + }) +} + +// 根据设备类型统计设备数量 +export function deviceStaticByType(params) { + return request({ + url: 'statics/deviceStaticsByType', + method: 'get', + params + }) +} + +// 根据权属单位统计设备数量 +export function deviceStaticByDept(params) { + return request({ + url: 'statics/deviceStaticsByDept', + method: 'get', + params + }) +} + +// 根据在线状态统计设备数量 +export function deviceStaticByStatus(params) { + return request({ + url: 'statics/deviceStaticsByStatus', + method: 'get', + params + }) +} + +// 统计当前报警数 +export function alarmNowStatic(params) { + return request({ + url: 'statics/alarmsNow', + method: 'get', + params + }) +} +// 统计每日报警数 +export function alarmStaticByDay(params) { + return request({ + url: 'statics/alarmsByDay', + method: 'get', + params + }) +} + // 根据权属单位进行报警统计查询 export function alarmStaticByDept(params) { return request({ @@ -10,3 +81,13 @@ params }) } + +// 根据权属单位统计工单数量 +export function jobStaticsByDept(params) { + return request({ + url: 'statics/jobsByDept', + method: 'get', + params + }) +} + diff --git a/src/api/digconfig.js b/src/api/digconfig.js index d885e08..3725e71 100644 --- a/src/api/digconfig.js +++ b/src/api/digconfig.js @@ -5,7 +5,7 @@ // 开挖配置查询 export function getDigConfigList(params) { return request({ - url: 'digConfig/list', + url: 'busConfig/digConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改开挖配置 export function editDigConfig(params) { return request({ - url: 'digConfig/config', + url: 'busConfig/digConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'digConfig/batchImport', + url: 'busConfig/digConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportDigConfig(params) { return request({ - url: 'digConfig/batchExport', + url: 'busConfig/digConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/gasconfig.js b/src/api/gasconfig.js index 93f1d09..fc15077 100644 --- a/src/api/gasconfig.js +++ b/src/api/gasconfig.js @@ -5,7 +5,7 @@ // 燃气配置查询 export function getGasConfigList(params) { return request({ - url: 'gasConfig/list', + url: 'busConfig/gasConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改燃气配置 export function editGasConfig(params) { return request({ - url: 'gasConfig/config', + url: 'busConfig/gasConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'gasConfig/batchImport', + url: 'busConfig/gasConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportGasConfig(params) { return request({ - url: 'gasConfig/batchExport', + url: 'busConfig/gasConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/harmfulconfig.js b/src/api/harmfulconfig.js index 29b6b6e..5d34347 100644 --- a/src/api/harmfulconfig.js +++ b/src/api/harmfulconfig.js @@ -5,7 +5,7 @@ // 有害气体配置查询 export function getHarmfulConfigList(params) { return request({ - url: 'harmfulConfig/list', + url: 'busConfig/harmfulConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改有害气体配置 export function editHarmfulConfig(params) { return request({ - url: 'harmfulConfig/config', + url: 'busConfig/harmfulConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'harmfulConfig/batchImport', + url: 'busConfig/harmfulConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportHarmfulConfig(params) { return request({ - url: 'harmfulConfig/batchExport', + url: 'busConfig/harmfulConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/job.js b/src/api/job.js index d1f3313..1ec49a2 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,15 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +20,24 @@ }) } +// 超时未接单告警工单查询 +export function getOvertimeGetJobList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理告警工单查询 +export function getOvertimeHandleJobList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} +// 处理工单 export function handleJob(id) { return request({ url: 'job/handleJob', @@ -41,3 +68,34 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } + +// 批量导出超时未接单工单 +export function exportOvertimeGetJobList(params) { + return request({ + url: 'job/exportOvertimeGetList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 批量导出超时未处理工单 +export function exportOvertimeHandleJobList(params) { + return request({ + url: 'job/exportOvertimeHandleList', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 根据工单状态统计工单数量 +export function jobCountByStatus(params) { + return request({ + url: 'job/countByJobStatus', + method: 'get', + params + }) +} diff --git a/src/api/liquidconfig.js b/src/api/liquidconfig.js index 3eabe58..fcf5aca 100644 --- a/src/api/liquidconfig.js +++ b/src/api/liquidconfig.js @@ -5,7 +5,7 @@ // 液位配置查询 export function getLiquidConfigList(params) { return request({ - url: 'liquidConfig/list', + url: 'busConfig/liquidConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改液位配置 export function editLiquidConfig(params) { return request({ - url: 'liquidConfig/config', + url: 'busConfig/liquidConfig/config', method: 'post', params }) @@ -37,7 +37,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'liquidConfig/batchImport', + url: 'busConfig/liquidConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -46,7 +46,7 @@ // 批量导出 export function batchExportLiquidConfig(params) { return request({ - url: 'liquidConfig/batchExport', + url: 'busConfig/liquidConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/tempconfig.js b/src/api/tempconfig.js index aa4ce86..dc4530c 100644 --- a/src/api/tempconfig.js +++ b/src/api/tempconfig.js @@ -5,7 +5,7 @@ // 温湿度配置查询 export function getTempConfigList(params) { return request({ - url: 'tempConfig/list', + url: 'busConfig/tempConfig/list', method: 'get', params }) @@ -14,7 +14,7 @@ // 修改温湿度配置 export function editTempConfig(params) { return request({ - url: 'tempConfig/config', + url: 'busConfig/tempConfig/config', method: 'post', params }) @@ -25,7 +25,7 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'tempConfig/batchImport', + url: 'busConfig/tempConfig/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param @@ -34,7 +34,7 @@ // 批量导出 export function batchExportTempConfig(params) { return request({ - url: 'tempConfig/batchExport', + url: 'busConfig/tempConfig/batchExport', method: 'get', params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob diff --git a/src/api/well.js b/src/api/well.js index c6eff97..38ba439 100644 --- a/src/api/well.js +++ b/src/api/well.js @@ -112,3 +112,11 @@ }) } +// 根据布防状态统计闸井数量 +export function wellCountByBfzt() { + return request({ + url: 'well/countByBfzt', + method: 'get' + }) +} + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index 7cc7b49..d937a00 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -9,7 +9,7 @@ @hide="onHidePopover"> \ No newline at end of file diff --git a/src/icons/svg/well-common-green.svg b/src/icons/svg/well-common-green.svg new file mode 100644 index 0000000..2bdcaa2 --- /dev/null +++ b/src/icons/svg/well-common-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-grey.svg b/src/icons/svg/well-common-grey.svg new file mode 100644 index 0000000..940c11b --- /dev/null +++ b/src/icons/svg/well-common-grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/well-common-yellow.svg b/src/icons/svg/well-common-yellow.svg new file mode 100644 index 0000000..3e675dc --- /dev/null +++ b/src/icons/svg/well-common-yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c5a8209..e85ba70 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,10 @@ import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ - key: 'b6c27a2051691fcb386543c800356e05', - plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'] + key: 'b6c27a2051691fcb386543c800356e05', // key + plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation'], // 插件 + uiVersion: '1.0.11', // ui组件库版本号 + v: '1.4.4' // sdk版本 }) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index 5879617..5bd54f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,18 @@ meta: { title: '告警工单', icon: 'icon-config', keepAlive: true, permission: ['/job'] } }, { + path: '/listOvertimeGetJob', + name: 'ListJobOvertimeGet', + component: () => import('@/views/jobManage/listJobsOvertimeGet'), + meta: { title: '超时未接收工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeGetList'] } + }, + { + path: '/listOvertimeHandleJob', + name: 'ListJobOvertimeHandle', + component: () => import('@/views/jobManage/listJobsOvertimeHandle'), + meta: { title: '超时未处理工单', icon: 'icon-config', keepAlive: true, permission: ['/job/overtimeHandleList'] } + }, + { path: '/detailJob/:id(\\d+)', name: 'DetailJob', component: () => import('@/views/jobManage/detailJob'), @@ -216,6 +228,12 @@ meta: { title: '历史数据', icon: 'icon-config', permission: ['/datalist'] } }, { + path: '/dataAnalyse', + name: 'DataAnalyse', + component: () => import('@/views/dataStatics/dataStatics'), + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } + }, + { path: '/alarmStatics', name: 'AlarmStatics', component: () => import('@/views/alarmStatics/alarmStatics'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c8877a..6a2e596 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -119,8 +119,16 @@ reject('该用户不支持任何通讯方式') } commit('SET_AREA', data.area) - commit('SET_LNG', data.lng) - commit('SET_LAT', data.lat) + if (data.lng) { + commit('SET_LNG', data.lng) + } else { + commit('SET_LNG', '116.4') + } + if (data.lat) { + commit('SET_LAT', data.lat) + } else { + commit('SET_LAT', '39.9') + } resolve(response) }).catch(error => { reject(error) diff --git a/src/utils/compare.js b/src/utils/compare.js new file mode 100644 index 0000000..c4e668c --- /dev/null +++ b/src/utils/compare.js @@ -0,0 +1,34 @@ +/** + * 根据对象数组中的某个属性值进行排序的方法 + * 使用例子: array.sort(compare('number',false)) + * @param property 排序的属性 + * @param rev true表示升序排序,false表示降序排序 + * @returns {function(*, *): number} + */ +export function compare(property, rev) { + if (rev === undefined) { + rev = 1 + } else { + rev = (rev) ? 1 : -1 + } + // rev是1表示升序,rev是-1表示降序 + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + if (value1 < value2) { + return rev * -1 + } else if (value1 > value2) { + return rev + } else { + return 0 + } + } +} + +export function compareTimeString(property) { + return function(a, b) { + const value1 = a[property] + const value2 = b[property] + return value1 - value2 + } +} diff --git a/src/views/alarmManage/listAlarmRecords.vue b/src/views/alarmManage/listAlarmRecords.vue index aaa2dbc..64cb232 100644 --- a/src/views/alarmManage/listAlarmRecords.vue +++ b/src/views/alarmManage/listAlarmRecords.vue @@ -238,7 +238,9 @@ }, // 工单 showJob(row) { - this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) + const jobId = row.jobId + this.$router.push({ path: '/detailJob/' + jobId, query: { jobId: jobId }}) + //this.$router.push({ name: 'DetailJob', query: { jobId: row.jobId }}) }, // 批量导出 batchExport() { diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue index a5eee6c..4859071 100644 --- a/src/views/dashboard/components/AlarmByDays.vue +++ b/src/views/dashboard/components/AlarmByDays.vue @@ -1,13 +1,16 @@ diff --git a/src/views/dashboard/components/AlarmNowList.vue b/src/views/dashboard/components/AlarmNowList.vue new file mode 100644 index 0000000..890325f --- /dev/null +++ b/src/views/dashboard/components/AlarmNowList.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/views/dashboard/components/DeviceCount.vue b/src/views/dashboard/components/DeviceCount.vue index 8920e87..811e253 100644 --- a/src/views/dashboard/components/DeviceCount.vue +++ b/src/views/dashboard/components/DeviceCount.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/components/DeviceCountByOnline.vue b/src/views/dashboard/components/DeviceCountByOnline.vue index 6abcd03..5ddb3cc 100644 --- a/src/views/dashboard/components/DeviceCountByOnline.vue +++ b/src/views/dashboard/components/DeviceCountByOnline.vue @@ -3,6 +3,8 @@ diff --git a/src/views/dashboard/components/JobByStatus.vue b/src/views/dashboard/components/JobByStatus.vue index a3c971e..3c0f043 100644 --- a/src/views/dashboard/components/JobByStatus.vue +++ b/src/views/dashboard/components/JobByStatus.vue @@ -3,11 +3,14 @@ diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index b89924d..fc3a5d7 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -8,6 +8,9 @@ diff --git a/src/views/dashboard/components/WellCount.vue b/src/views/dashboard/components/WellCount.vue deleted file mode 100644 index b5ce726..0000000 --- a/src/views/dashboard/components/WellCount.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/src/views/dashboard/components/WellCountByBfzt.vue b/src/views/dashboard/components/WellCountByBfzt.vue new file mode 100644 index 0000000..5290140 --- /dev/null +++ b/src/views/dashboard/components/WellCountByBfzt.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/views/dashboard/components/WellCountByType.vue b/src/views/dashboard/components/WellCountByType.vue index da959b5..e2c5285 100644 --- a/src/views/dashboard/components/WellCountByType.vue +++ b/src/views/dashboard/components/WellCountByType.vue @@ -5,6 +5,8 @@ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ef16476..8b8b043 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -2,36 +2,38 @@
+ - + - + + - - + - + + - - - + + - + + @@ -43,7 +45,7 @@ diff --git a/src/views/dataStatics/components/liquidData.vue b/src/views/dataStatics/components/liquidData.vue new file mode 100644 index 0000000..0ee333f --- /dev/null +++ b/src/views/dataStatics/components/liquidData.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/dataStatics/dataStatics.vue b/src/views/dataStatics/dataStatics.vue new file mode 100644 index 0000000..913b6a0 --- /dev/null +++ b/src/views/dataStatics/dataStatics.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/deviceConfig/components/editDigConfig.vue b/src/views/deviceConfig/components/editDigConfig.vue new file mode 100644 index 0000000..05cd8ad --- /dev/null +++ b/src/views/deviceConfig/components/editDigConfig.vue @@ -0,0 +1,308 @@ + + + + + diff --git a/src/views/deviceConfig/components/editGasConfig.vue b/src/views/deviceConfig/components/editGasConfig.vue new file mode 100644 index 0000000..08270a3 --- /dev/null +++ b/src/views/deviceConfig/components/editGasConfig.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/src/views/deviceConfig/components/editHarmfulConfig.vue b/src/views/deviceConfig/components/editHarmfulConfig.vue new file mode 100644 index 0000000..2f39b0c --- /dev/null +++ b/src/views/deviceConfig/components/editHarmfulConfig.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/deviceConfig/components/editLiquidConfig.vue b/src/views/deviceConfig/components/editLiquidConfig.vue new file mode 100644 index 0000000..cd2bcba --- /dev/null +++ b/src/views/deviceConfig/components/editLiquidConfig.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/deviceConfig/components/editTempConfig.vue b/src/views/deviceConfig/components/editTempConfig.vue new file mode 100644 index 0000000..9c67696 --- /dev/null +++ b/src/views/deviceConfig/components/editTempConfig.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/deviceConfig/components/listDigConfig.vue b/src/views/deviceConfig/components/listDigConfig.vue new file mode 100644 index 0000000..7b09102 --- /dev/null +++ b/src/views/deviceConfig/components/listDigConfig.vue @@ -0,0 +1,347 @@ + + + + + diff --git a/src/views/deviceConfig/components/listHarmfulConfig.vue b/src/views/deviceConfig/components/listHarmfulConfig.vue new file mode 100644 index 0000000..7912e4b --- /dev/null +++ b/src/views/deviceConfig/components/listHarmfulConfig.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/deviceConfig/components/listLiquidConfig.vue b/src/views/deviceConfig/components/listLiquidConfig.vue new file mode 100644 index 0000000..7327a3c --- /dev/null +++ b/src/views/deviceConfig/components/listLiquidConfig.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/deviceConfig/components/listTempConfig.vue b/src/views/deviceConfig/components/listTempConfig.vue new file mode 100644 index 0000000..74a3d69 --- /dev/null +++ b/src/views/deviceConfig/components/listTempConfig.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/views/deviceConfig/deviceConfig.vue b/src/views/deviceConfig/deviceConfig.vue index 678c3a4..1918688 100644 --- a/src/views/deviceConfig/deviceConfig.vue +++ b/src/views/deviceConfig/deviceConfig.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/deviceConfig/liquidConfig/editGasConfig.vue b/src/views/deviceConfig/liquidConfig/editGasConfig.vue deleted file mode 100644 index bc61d77..0000000 --- a/src/views/deviceConfig/liquidConfig/editGasConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue deleted file mode 100644 index 0eff7a8..0000000 --- a/src/views/deviceConfig/liquidConfig/editHarmfulConfig.vue +++ /dev/null @@ -1,262 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue deleted file mode 100644 index cd2bcba..0000000 --- a/src/views/deviceConfig/liquidConfig/editLiquidConfig.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/editTempConfig.vue b/src/views/deviceConfig/liquidConfig/editTempConfig.vue deleted file mode 100644 index 76107d9..0000000 --- a/src/views/deviceConfig/liquidConfig/editTempConfig.vue +++ /dev/null @@ -1,284 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listDigConfig.vue b/src/views/deviceConfig/liquidConfig/listDigConfig.vue deleted file mode 100644 index eed641b..0000000 --- a/src/views/deviceConfig/liquidConfig/listDigConfig.vue +++ /dev/null @@ -1,347 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue b/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue deleted file mode 100644 index 4020982..0000000 --- a/src/views/deviceConfig/liquidConfig/listHarmfulConfig.vue +++ /dev/null @@ -1,326 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue b/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue deleted file mode 100644 index bf744db..0000000 --- a/src/views/deviceConfig/liquidConfig/listLiquidConfig.vue +++ /dev/null @@ -1,346 +0,0 @@ - - - - - diff --git a/src/views/deviceConfig/liquidConfig/listTempConfig.vue b/src/views/deviceConfig/liquidConfig/listTempConfig.vue deleted file mode 100644 index 27b4611..0000000 --- a/src/views/deviceConfig/liquidConfig/listTempConfig.vue +++ /dev/null @@ -1,337 +0,0 @@ - - - - - diff --git a/src/views/deviceManage/listDevice.vue b/src/views/deviceManage/listDevice.vue index d13530d..be9095c 100644 --- a/src/views/deviceManage/listDevice.vue +++ b/src/views/deviceManage/listDevice.vue @@ -341,12 +341,13 @@ const devcode = row.devcode const deviceType = row.deviceType const params = { devcode: devcode, deviceType: deviceType } - const routeData = this.$router.resolve({ - name: 'DataManage', - query: params, - params: params - }) - window.open(routeData.href, '_blank') + // const routeData = this.$router.resolve({ + // name: 'DataManage', + // query: params, + // params: params + // }) + this.$router.push({ name: 'DataManage', query: params }) + // window.open(routeData.href, '_blank') }, showWellDetail(row) { this.wellShow = true diff --git a/src/views/jobManage/detailJob.vue b/src/views/jobManage/detailJob.vue index 0020bf4..6f9d5b3 100644 --- a/src/views/jobManage/detailJob.vue +++ b/src/views/jobManage/detailJob.vue @@ -219,7 +219,7 @@ this.handleImageList = [] } // 处理工单动态 - // 若有人接单,状态改为已接单 + // 若有getJobTime有值,表示有人接单,状态改为已接单 if (job.getJobTime) { const activity = { content: job.getJobPerson + '已接单', @@ -243,30 +243,41 @@ this.activities.push(activity) this.activeStep = 2 } else if (job.alarmType === '1') { // 若无人确认且为数据异常插入空的待确认 - const activity = { - content: '待确认', - timestamp: '' + if (job.jobStatus !== '4') { // 状态不为已取消的话,显示待确认 + const activity = { + content: '待确认', + timestamp: '' + } + this.activities.push(activity) } - this.activities.push(activity) } if (job.handleJobTime) { - // 若有处理时间,状态置为已完成 + // 若有处理时间,状态置为已完成或已取消 // 若没有处理人则处理人为系统 let handleJobPerson = job.handleJobPerson if (!handleJobPerson) { handleJobPerson = '系统' } - const activity1 = { - content: handleJobPerson + '处理中', - timestamp: job.handleJobTime + if (job.jobStatus === '3') { // 正常完成 + const activity1 = { + content: handleJobPerson + '处理中', + timestamp: job.handleJobTime + } + const activity2 = { + content: handleJobPerson + '已完成', + timestamp: job.handleJobTime + } + this.activities.push(activity1) + this.activities.push(activity2) + this.activeStep = 3 + } else if (job.jobStatus === '4') { // 已取消 + const activity1 = { + content: handleJobPerson + '已取消', + timestamp: job.handleJobTime + } + this.activities.push(activity1) + this.activeStep = 2 } - const activity2 = { - content: handleJobPerson + '已完成', - timestamp: job.handleJobTime - } - this.activities.push(activity1) - this.activities.push(activity2) - this.activeStep = 3 } else if (this.jobForm.jobStatusName === '完成') { // 特殊情况处理:已确认之后结束的工单,将完成人和时间用确认人代替 const activity = { diff --git a/src/views/jobManage/listJobs.vue b/src/views/jobManage/listJobs.vue index a7106ad..a105203 100644 --- a/src/views/jobManage/listJobs.vue +++ b/src/views/jobManage/listJobs.vue @@ -4,37 +4,58 @@
- - - - - - - - - - - - - - - - - 搜索 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + + + 高级检索 + +
@@ -82,10 +103,10 @@ + + diff --git a/src/views/jobManage/listJobsOverTimeHandle.vue b/src/views/jobManage/listJobsOverTimeHandle.vue new file mode 100644 index 0000000..337c3e6 --- /dev/null +++ b/src/views/jobManage/listJobsOverTimeHandle.vue @@ -0,0 +1,396 @@ + + + + + diff --git a/src/views/overview/overview.vue b/src/views/overview/overview.vue index b44ac7e..3676288 100644 --- a/src/views/overview/overview.vue +++ b/src/views/overview/overview.vue @@ -20,6 +20,7 @@ 搜索 + 清除查询 显示全部闸井 @@ -59,20 +60,20 @@
- + - -
- -
-
+ + + + + + + + + + + +
@@ -97,8 +97,7 @@
{{ wellInfo.wellCode }}
-
闸井类型:{{ wellInfo.wellTypeName }}
-
井深:{{ wellInfo.deep }}(m)
+
井类型:{{ wellInfo.wellTypeName }}
权属单位:{{ wellInfo.deptName }}
详细地址:{{ wellInfo.position }}
@@ -114,7 +113,7 @@
设备编号:{{ alarm.devcode }}
-
井深:{{ alarmInfo.deep }}(m)
+
井类型:{{ wellInfo.wellTypeName }}
权属单位:{{ alarmInfo.deptName }}
详细地址:{{ alarmInfo.position }}
@@ -130,7 +129,9 @@ import { getWellType } from '@/api/well' import { getWellList, getWellInfo, getAlarmsNow, getWellAlarms } from '@/api/overview' import DeptSelect from '../../components/DeptSelect/index' - +// import { AMapManager } from 'vue-amap' +import VueAMap from 'vue-amap' +const aMapManager = new VueAMap.AMapManager() export default { name: 'Overview', components: { DeptSelect, SelectTree }, @@ -167,12 +168,12 @@ width: 180, align: 'center' } - ], // 显示列 + ], // 告警列表显示列 tableShow: true, // 是否显示告警列表 tableIcon: 'el-icon-arrow-up', count: 30, - showWellType: this.showWellType(), // 是否显示闸井类型下拉 - wellTypeList: [], // 闸井类型列表 + showWellType: this.showWellType(), // 是否显示井类型下拉 + wellTypeList: [], // 井类型列表 deptProps: { parent: 'pid', value: 'id', @@ -181,21 +182,13 @@ }, // 权属单位树形下拉菜单 deptTreeList: null, // 组织树列表数据 showDeptTree: 0, // 是否显示权属单位下拉,0不显示,1显示树,2显示平面 - icons: { - '1': 'well-rain', - '2': 'well-sewage', - '3': 'well-gas', - '4': 'well-heat', - '5': 'well-power', - '6': 'well-heat', - '7': 'well-sewage' - }, // 井类型图标字典 - otherIcon: 'well-common', + commonIcon: 'well-common-green', // 通用图标 绿 + commonIconAlarm: 'well-common-red', // 通用图标 红 center: [this.$store.getters.lng, this.$store.getters.lat], // 地图中心 zoom: 12, // 地图缩放比例 markers: [], // 井列表标注marker alarmList: [], // 报警列表 - alarmWells: [], // 报警闸井列表 + alarmWells: [], // 报警井列表 offset: [-10, -10], // 偏移量 alarmOffset: [-15, -30], // 偏移量 wellInfo: { @@ -222,50 +215,45 @@ deptShowTop: false, // 是否显示顶级 clock: null, // 计时器 hasAlarm: false, // 是否有报警, - showAll: false, // 是否显示全部闸井(包含报警和不报警,为false时只显示报警) - firstAmount: false, // 是否第一次加载井数据 - loading: true, - plugins: [{ - pName: 'Geolocation', - events: { - init(o) { - // o 是高德地图定位插件实例 - o.getCurrentPosition((status, result) => { - if (result && result.position) { - console.log('geolocation') - console.log(result) - self.center = [result.position.lng, result.position.lat] - self.$nextTick() - } - }) - } - } - }] + showAll: false, // 是否显示全部井(包含报警和不报警,为false时只显示报警) + firstAmount: true, // 是否第一次加载井数据 + loading: true, // 加载图标是否显示 + aMapManager, + massMarks: null, // 海量点 + showClearBtn: false // 是否显示清除查询按钮 } }, watch: { showAll(val) { if (val) { // 显示全部 this.listQuery.isAlarm = '0' - if (this.firstAmount === false) { // 如果是第一次,从后台加载全部数据 + // 先清空查询条件 + this.listQuery.deptid = '' + this.listQuery.keywords = '' + this.listQuery.wellType = '' + // 如果是第一次勾选这个选项,从后台加载全部数据,否则只需要过滤对象,更新显示 + if (this.firstAmount === true) { this.getWellList() } else { - this.search() + this.filterIcon() } } else { // 仅显示报警 this.listQuery.isAlarm = '1' - this.search() + this.filterIcon() } } }, - created() { - this.fetchWellType() - this.getWellList() - this.refreshAlarm() - this.countDown() + mounted() { + var that = this + that.fetchWellType() + setTimeout(function() { + that.getWellList() + that.refreshAlarm() + that.countDown() + }, 1000) }, methods: { - // 倒计时 + // 倒计时函数,暂时不用了 countDown() { this.clock = window.setInterval(() => { this.count-- @@ -275,10 +263,11 @@ } }, 1000) }, - // 获取闸井类型 + // 获取井类型,显示井类型下拉 fetchWellType() { getWellType().then(response => { this.wellTypeList = [] + // 如果该用户支持的井类型只有一个,则不显示该筛选框 const wellTypes = this.$store.getters.wellTypes for (const wellType of response.data) { if (wellTypes.indexOf(wellType.value) !== -1) { @@ -290,14 +279,35 @@ } }) }, - // 数据筛选 - search() { - this.currentWindow.visible = false + // 数据查询 + search(showMessage = true) { + const keywords = this.listQuery.keywords + const deptid = this.listQuery.deptid + const wellType = this.listQuery.wellType + if (keywords === '' && deptid === '' && wellType === '') { + this.$message.warning('查询条件不能为空') + } else { + this.showClearBtn = true + this.filterIcon(showMessage) + } + }, + // 清除查询 + clearSearch() { + this.listQuery.wellType = '' + this.listQuery.deptid = '' + this.listQuery.keywords = '' + this.filterIcon() + this.showClearBtn = false + }, + // 过滤Marker + filterIcon(showMessage = false) { + this.currentWindow.visible = false // 弹窗隐藏 const hideWellIds = []// 要隐藏的井编号 const keywords = this.listQuery.keywords const deptid = this.listQuery.deptid const wellType = this.listQuery.wellType const isAlarm = this.listQuery.isAlarm + console.log('markers length:', this.markers.length) let center = [] // 查询全部井,是否匹配 for (const marker of this.markers) { @@ -315,8 +325,18 @@ show = false } // 如果只显示报警,井的状态不是报警 - if (isAlarm === '1' && marker.wellStatus !== 'alarm') { - show = false + if (isAlarm === '1') { + const index = this.alarmWells.filter(item => { + if (item.wellCode === marker.wellCode) { + console.log('匹配') + } + return item.wellCode === marker.wellCode + }) + if (index.length === 0) { // 如果不在alarmWells中,即index=-1,表示没有匹配成功,show=false + show = false + } else { + console.log('no hide:', marker.wellCode) + } } if (show === false) { hideWellIds.push(marker.wellId) @@ -325,10 +345,11 @@ } marker.visible = show } - // 如果没有找到符合要求的井 + // 如果没有找到符合要求的井,将全部查询结果隐藏 if (hideWellIds.length === this.markers.length) { - this.$message.warning('查无结果') - // 将全部查询结果隐藏 + if (showMessage) { + this.$message.warning('查无结果') + } for (const alarmWell of this.alarmWells) { alarmWell.visible = false } @@ -345,8 +366,48 @@ if (center.length > 0) { this.center = center } + this.resetMassMarker() }, - // 获取闸井列表 + // 加载海量点 + mountMassMarker() { + const map = aMapManager.getMap() + + // 创建样式对象 + const style = { + url: './static/images/well/pin.svg', + anchor: new AMap.Pixel(8, 15), + size: new AMap.Size(15, 15) + } + // 海量点初始化 + this.massMarks = new AMap.MassMarks(this.markers, { + zIndex: 5, // 海量点图层叠加的顺序 + zooms: [3, 20], // 在指定地图缩放级别范围内展示海量点图层 + style: style // 设置样式对象 + }) + // 将海量点添加至地图实例 + this.massMarks.setMap(map) + // 海量点点击事件 + const that = this + this.massMarks.on('click', function(e) { + that.openInfoWindow(e.data.id) + }) + }, + // 过滤海量点 + resetMassMarker() { + const map = aMapManager.getMap() + let markers = this.markers.filter(item => { + return item.visible === true + }) + if (markers === null) { + markers = [] + this.massMarks.clear() + } else { + this.massMarks.setData(markers) + } + // 将海量点添加至地图实例 + this.massMarks.setMap(map) + }, + // 获取井列表 getWellList() { this.loading = true const listQuery = { @@ -360,20 +421,25 @@ if (response.code === 200) { const wells = response.data if (wells.length > 0) { - // 正在报警的井 + // 查询正在报警的井 if (listQuery.isAlarm === '1') { + this.markers = [] + // centerxs和centerys用于获取所有坐标,目的是排序找到中位数 const centerxs = [] const centerys = [] for (const well of wells) { this.markers.push({ wellId: well.id, + id: well.id, + name: well.wellCode, wellCode: well.wellCode, position: [parseFloat(well.lngGaode), parseFloat(well.latGaode)], + lnglat: [parseFloat(well.lngGaode), parseFloat(well.latGaode)], positionInfo: well.position, wellType: well.wellType, deptid: well.deptid, bfzt: well.bfzt, - icon: this.icons[well.wellType] ? this.icons[well.wellType] : this.otherIcon, + icon: this.commonIcon, visible: true, wellStatus: 'alarm' }) @@ -384,7 +450,7 @@ centerys.sort() const index = Math.floor(centerxs.length / 2) this.center = [centerxs[index], centerys[index]] - } else if (listQuery.isAlarm === '0') { // 状态正常的井 + } else if (listQuery.isAlarm === '0') { // 查询状态正常的井 this.firstAmount = false const centerxs = [] const centerys = [] @@ -392,12 +458,15 @@ this.markers.push({ wellId: well.id, wellCode: well.wellCode, + id: well.id, + name: well.wellCode, + lnglat: [parseFloat(well.lngGaode), parseFloat(well.latGaode)], position: [parseFloat(well.lngGaode), parseFloat(well.latGaode)], positionInfo: well.position, wellType: well.wellType, deptid: well.deptid, bfzt: well.bfzt, - icon: this.icons[well.wellType] ? this.icons[well.wellType] : this.otherIcon, + icon: this.commonIcon, visible: true, wellStatus: 'normal' }) @@ -409,11 +478,12 @@ const index = Math.floor(centerxs.length / 2) this.center = [centerxs[index], centerys[index]] } + this.mountMassMarker() } } }) }, - // 点击闸井详情气泡 + // 点击井详情气泡 openInfoWindow(wellId) { this.currentWindow.visible = false getWellInfo(wellId).then(response => { @@ -448,11 +518,13 @@ } this.alarmWells = [] for (const alarm of response.data) { - // 如果报警的井中找到 - // const item = this.alarmWells.findIndex(item => { + // 如果在markers找到该井,更改进状态为alarm + // const item = this.markers.findIndex(item => { // return item.wellCode === alarm.wellCode // }) - // if (item === -1) { + // if (item !== -1) { + // this.markers[item].wellStatus = 'alarm' + // } this.alarmWells.push({ wellCode: alarm.wellCode, wellId: alarm.wellId, @@ -469,11 +541,7 @@ openAlarmWindow(wellId, position) { // 旧弹窗不显示 this.currentWindow.visible = false - // 清空查询条件 - this.listQuery.keywords = '' - this.listQuery.wellType = '' - this.listQuery.deptid = '' - this.search() + this.filterIcon() getWellAlarms(wellId).then(response => { if (response.code === 200) { const wellInfo = response.data @@ -481,10 +549,12 @@ wellCode: wellInfo.wellCode, position: wellInfo.position, deptName: wellInfo.deptName, + wellTypeName: wellInfo.wellTypeName, alarms: wellInfo.alarmList, deep: wellInfo.deep } this.currentWindow.position = position + this.center = position this.$nextTick(() => { this.currentWindow.visible = true this.currentWindow.windowType = 'alarm' @@ -612,7 +682,7 @@ height: 20px; } .alarm-icon{ - width:30px; + width: 29px; height: 30px; } .nomal-info-window{ diff --git a/src/views/system/user/resetPwd.vue b/src/views/system/user/resetPwd.vue index 69fa532..e03e18c 100644 --- a/src/views/system/user/resetPwd.vue +++ b/src/views/system/user/resetPwd.vue @@ -2,13 +2,13 @@ - + - + - +