From 6817c96db53ac16f5d5eca72b73230d898f32126 Mon Sep 17 00:00:00 2001 From: ZhangXianQiang <1135831638@qq.com> Date: 星期四, 11 四月 2024 09:43:32 +0800 Subject: [PATCH] Merge branch 'master' into dev-threejs --- vue.config.js | 2 src/views/screen/components/screen-wrapper/index.vue | 35 src/api/platform/calculate-record.js | 44 src/api/system/dept.js | 9 src/views/system/result/default/index.vue | 9 src/views/system/calculate/duty/index.vue | 12 src/views/system/publish/province/index.vue | 2 src/views/system/score/city/index.vue | 6 src/views/login copy.vue | 4 src/views/system/video/index.vue | 64 src/views/screen/components/screen-examine/components/examine-chart.vue | 9 src/views/system/point/index.vue | 10 src/api/platform/default-score.js | 14 src/views/system/rule/default/index.vue | 316 +++ src/api/platform/calculate-rule.js | 44 src/assets/icons/setting.png | 0 src/views/screen/components/select-item/index.vue | 2 src/router/index.js | 29 src/views/screen/components/screen-table/index.vue | 122 + src/views/system/car/index.vue | 69 src/views/system/publish/city/index.vue | 2 src/views/screen/components/screen-examine/index.vue | 5 src/views/system/template/default/index.vue | 58 src/assets/icons/arrow.png | 0 src/views/system/work-order/distribute/index.vue | 146 + src/api/platform/platform.js | 44 src/api/platform/default-result.js | 44 src/api/platform/monitor.js | 16 src/views/system/report/index.vue | 78 src/api/platform/check-rule.js | 12 src/api/platform/check-score.js | 20 src/views/screen/components/wrapper-title/index.vue | 27 src/layout/components/Navbar.vue | 16 src/views/system/platform/index.vue | 412 ++++ src/api/platform/people.js | 8 src/views/screen/components/screen-map/index.vue | 14 src/views/system/result/default/detail.vue | 6 src/views/system/calculate/order/index.vue | 31 src/views/system/result/index.vue | 263 ++ src/api/platform/notify.js | 61 src/views/screen/components/screen-title/index.vue | 4 src/views/system/face/index.vue | 70 src/views/screen/components/screen-examine/components/examine-hola.vue | 13 src/views/system/rule/index.vue | 399 ++++ src/views/system/calculate/report/index.vue | 187 +- src/views/system/template/index.vue | 161 - src/views/system/calculate/rule/index.vue | 322 +- src/api/platform/check-result.js | 16 src/views/system/data-manage/index.vue | 28 src/views/system/publish/default/index.vue | 2 src/api/platform/check-publish.js | 18 src/views/system/equipment/index.vue | 437 ++++ src/api/platform/default-rule.js | 14 src/views/system/calculate/record/index.vue | 296 ++- src/views/system/work-order/index.vue | 35 src/views/system/threshold/index.vue | 17 /dev/null | 405 ---- src/views/system/recovery/index.vue | 78 src/views/screen/components/screen-data/index.vue | 177 + src/views/login.vue | 6 src/views/system/result/detail/index.vue | 286 +++ src/views/system/contract/index.vue | 23 src/views/screen/components/screen-data/components/data-hola.vue | 137 + src/views/system/score/province/index.vue | 6 src/api/platform/default-template.js | 44 src/api/platform/default-publish.js | 24 src/api/platform/check-template.js | 16 src/views/system/score/default/index.vue | 2 src/views/system/unit/index.vue | 4 69 files changed, 4,051 insertions(+), 1,241 deletions(-) diff --git a/src/api/platform/calculate-record.js b/src/api/platform/calculate-record.js new file mode 100644 index 0000000..f31a1e8 --- /dev/null +++ b/src/api/platform/calculate-record.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 鏌ヨ鏍哥畻璁板綍鍒楄〃 +export function listRecord(query) { + return request({ + url: '/calculate/record/list', + method: 'get', + params: query + }) +} + +// 鏌ヨ鏍哥畻璁板綍璇︾粏 +export function getRecord(id) { + return request({ + url: '/calculate/record/' + id, + method: 'get' + }) +} + +// 鏂板鏍哥畻璁板綍 +export function addRecord(data) { + return request({ + url: '/calculate/record', + method: 'post', + data: data + }) +} + +// 淇敼鏍哥畻璁板綍 +export function updateRecord(data) { + return request({ + url: '/calculate/record', + method: 'put', + data: data + }) +} + +// 鍒犻櫎鏍哥畻璁板綍 +export function delRecord(id) { + return request({ + url: '/calculate/record/' + id, + method: 'delete' + }) +} diff --git a/src/api/platform/calculate-rule.js b/src/api/platform/calculate-rule.js new file mode 100644 index 0000000..0f5adc2 --- /dev/null +++ b/src/api/platform/calculate-rule.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 鏌ヨ鏍哥畻瑙勫垯鍒楄〃 +export function listRule(query) { + return request({ + url: '/calculate/rule/list', + method: 'get', + params: query + }) +} + +// 鏌ヨ鏍哥畻瑙勫垯璇︾粏 +export function getRule(id) { + return request({ + url: '/calculate/rule/' + id, + method: 'get' + }) +} + +// 鏂板鏍哥畻瑙勫垯 +export function addRule(data) { + return request({ + url: '/calculate/rule', + method: 'post', + data: data + }) +} + +// 淇敼鏍哥畻瑙勫垯 +export function updateRule(data) { + return request({ + url: '/calculate/rule', + method: 'put', + data: data + }) +} + +// 鍒犻櫎鏍哥畻瑙勫垯 +export function delRule(id) { + return request({ + url: '/calculate/rule/' + id, + method: 'delete' + }) +} diff --git a/src/api/platform/publish.js b/src/api/platform/check-publish.js similarity index 67% rename from src/api/platform/publish.js rename to src/api/platform/check-publish.js index 283f27a..908e629 100644 --- a/src/api/platform/publish.js +++ b/src/api/platform/check-publish.js @@ -3,7 +3,7 @@ // 鏌ヨ鑰冩牳鍙戝竷鍒楄〃 export function listPublish(query) { return request({ - url: '/system/publish/list', + url: '/check/publish/list', method: 'get', params: query }) @@ -12,7 +12,7 @@ // 鏌ヨ鑰冩牳鍙戝竷璇︾粏 export function getPublish(id) { return request({ - url: '/system/publish/' + id, + url: '/check/publish/' + id, method: 'get' }) } @@ -20,7 +20,7 @@ // 鏂板鑰冩牳鍙戝竷 export function addPublish(data) { return request({ - url: '/system/publish', + url: '/check/publish', method: 'post', data: data }) @@ -29,7 +29,7 @@ // 淇敼鑰冩牳鍙戝竷 export function updatePublish(data) { return request({ - url: '/system/publish', + url: '/check/publish', method: 'put', data: data }) @@ -38,15 +38,7 @@ // 鍒犻櫎鑰冩牳鍙戝竷 export function delPublish(id) { return request({ - url: '/system/publish/' + id, + url: '/check/publish/' + id, method: 'delete' - }) -} - -// 鑾峰彇鑰冩牳涓嬫媺鍒楄〃 -export function publishSelect() { - return request({ - url: '/system/publish/all', - method: 'get' }) } diff --git a/src/api/platform/check-result.js b/src/api/platform/check-result.js index 0563673..578e87a 100644 --- a/src/api/platform/check-result.js +++ b/src/api/platform/check-result.js @@ -3,8 +3,8 @@ // 鏌ヨ鑰冩牳缁撴灉鍒楄〃 export function listCheckResult(query) { return request({ - url: '/check-result/page', - method: 'post', + url: '/check/result/list', + method: 'get', data: query }) } @@ -12,7 +12,7 @@ // 鏌ヨ鑰冩牳缁撴灉璇︾粏 export function getCheckResult(id) { return request({ - url: '/check-result/' + id, + url: '/check/result/' + id, method: 'get' }) } @@ -20,7 +20,7 @@ // 鏂板鑰冩牳缁撴灉 export function addCheckResult(data) { return request({ - url: '/check-result', + url: '/check/result', method: 'post', data: data }) @@ -29,7 +29,7 @@ // 淇敼鑰冩牳缁撴灉 export function updateCheckResult(data) { return request({ - url: '/check-result', + url: '/check/result', method: 'put', data: data }) @@ -38,7 +38,7 @@ // 鍒犻櫎鑰冩牳缁撴灉 export function delCheckResult(id) { return request({ - url: '/check-result/' + id, + url: '/check/result/' + id, method: 'delete' }) } @@ -46,7 +46,7 @@ // 鍙戝竷鑰冩牳缁撴灉 export function publishCheckResult(id) { return request({ - url: '/check-result/publish/' + id, + url: '/check/result/publish/' + id, method: 'put' }) } @@ -54,7 +54,7 @@ // 鎻愪氦浜哄伐鍒嗘暟 export function manualScore(data) { return request({ - url: '/check-result/manual-score', + url: '/check/result/manual-score', method: 'post', data: data }) diff --git a/src/api/platform/check-rule.js b/src/api/platform/check-rule.js index 7a43372..6deb1ef 100644 --- a/src/api/platform/check-rule.js +++ b/src/api/platform/check-rule.js @@ -3,7 +3,7 @@ // 鏌ヨ鑰冩牳瑙勫垯鍒楄〃 export function listCheckRule(query) { return request({ - url: '/check-rule/page', + url: '/check/rule/list', method: 'post', data: query }) @@ -12,7 +12,7 @@ // 鏌ヨ鑰冩牳瑙勫垯璇︾粏 export function getCheckRule(id) { return request({ - url: '/check-rule/' + id, + url: '/check/rule/' + id, method: 'get' }) } @@ -20,7 +20,7 @@ // 鏂板鑰冩牳瑙勫垯 export function addCheckRule(data) { return request({ - url: '/check-rule', + url: '/check/rule', method: 'post', data: data }) @@ -29,7 +29,7 @@ // 淇敼鑰冩牳瑙勫垯 export function updateCheckRule(data) { return request({ - url: '/check-rule', + url: '/check/rule', method: 'put', data: data }) @@ -38,12 +38,12 @@ // 鍒犻櫎鑰冩牳瑙勫垯 export function delCheckRule(id) { return request({ - url: '/check-rule/' + id, + url: '/check/rule/' + id, method: 'delete' }) } -// 鑾峰彇杩愮淮鍗曚綅涓嬫媺鍒楄〃 +// 鑾峰彇涓嬫媺鍒楄〃 export function ruleSelect() { return request({ url: '/check-rule/list', diff --git a/src/api/platform/score.js b/src/api/platform/check-score.js similarity index 62% rename from src/api/platform/score.js rename to src/api/platform/check-score.js index a556b90..8724889 100644 --- a/src/api/platform/score.js +++ b/src/api/platform/check-score.js @@ -1,44 +1,44 @@ import request from '@/utils/request' -// 鏌ヨ鑰冩牳璁″垎鍒楄〃 +// 鏌ヨ鑰冩牳绉垎鏄庣粏鍒楄〃 export function listScore(query) { return request({ - url: '/platform/score/list', + url: '/check/score/list', method: 'get', params: query }) } -// 鏌ヨ鑰冩牳璁″垎璇︾粏 +// 鏌ヨ鑰冩牳绉垎鏄庣粏璇︾粏 export function getScore(id) { return request({ - url: '/platform/score/' + id, + url: '/check/score/' + id, method: 'get' }) } -// 鏂板鑰冩牳璁″垎 +// 鏂板鑰冩牳绉垎鏄庣粏 export function addScore(data) { return request({ - url: '/platform/score', + url: '/check/score', method: 'post', data: data }) } -// 淇敼鑰冩牳璁″垎 +// 淇敼鑰冩牳绉垎鏄庣粏 export function updateScore(data) { return request({ - url: '/platform/score', + url: '/check/score', method: 'put', data: data }) } -// 鍒犻櫎鑰冩牳璁″垎 +// 鍒犻櫎鑰冩牳绉垎鏄庣粏 export function delScore(id) { return request({ - url: '/platform/score/' + id, + url: '/check/score/' + id, method: 'delete' }) } diff --git a/src/api/platform/check-template.js b/src/api/platform/check-template.js index c4da329..620fd8f 100644 --- a/src/api/platform/check-template.js +++ b/src/api/platform/check-template.js @@ -3,8 +3,8 @@ // 鏌ヨ鑰冩牳妯℃澘鍒楄〃 export function listCheckTemplate(query) { return request({ - url: '/check-template/page', - method: 'post', + url: '/check/template/list', + method: 'get', data: query }) } @@ -12,7 +12,7 @@ // 鏌ヨ鑰冩牳妯℃澘璇︾粏 export function getCheckTemplate(id) { return request({ - url: '/check-template/' + id, + url: '/check/template/' + id, method: 'get' }) } @@ -20,7 +20,7 @@ // 鏂板鑰冩牳妯℃澘 export function addCheckTemplate(data) { return request({ - url: '/check-template', + url: '/check/template', method: 'post', data: data }) @@ -29,7 +29,7 @@ // 淇敼鑰冩牳妯℃澘 export function updateCheckTemplate(data) { return request({ - url: '/check-template', + url: '/check/template', method: 'put', data: data }) @@ -38,15 +38,15 @@ // 鍒犻櫎鑰冩牳妯℃澘 export function delCheckTemplate(id) { return request({ - url: '/check-template/' + id, + url: '/check/template/' + id, method: 'delete' }) } -// 鑾峰彇杩愮淮鍗曚綅涓嬫媺鍒楄〃 +// 鑾峰彇涓嬫媺鍒楄〃 export function templateSelect() { return request({ - url: '/check-template/list', + url: '/check/template/pullList', method: 'get' }) } diff --git a/src/api/platform/publish.js b/src/api/platform/default-publish.js similarity index 60% copy from src/api/platform/publish.js copy to src/api/platform/default-publish.js index 283f27a..557b219 100644 --- a/src/api/platform/publish.js +++ b/src/api/platform/default-publish.js @@ -1,52 +1,52 @@ import request from '@/utils/request' -// 鏌ヨ鑰冩牳鍙戝竷鍒楄〃 +// 鏌ヨ鍚堝悓鑰冩牳鍙戝竷鍒楄〃 export function listPublish(query) { return request({ - url: '/system/publish/list', + url: '/default/publish/list', method: 'get', params: query }) } -// 鏌ヨ鑰冩牳鍙戝竷璇︾粏 +// 鏌ヨ鍚堝悓鑰冩牳鍙戝竷璇︾粏 export function getPublish(id) { return request({ - url: '/system/publish/' + id, + url: '/default/publish/' + id, method: 'get' }) } -// 鏂板鑰冩牳鍙戝竷 +// 鏂板鍚堝悓鑰冩牳鍙戝竷 export function addPublish(data) { return request({ - url: '/system/publish', + url: '/default/publish', method: 'post', data: data }) } -// 淇敼鑰冩牳鍙戝竷 +// 淇敼鍚堝悓鑰冩牳鍙戝竷 export function updatePublish(data) { return request({ - url: '/system/publish', + url: '/default/publish', method: 'put', data: data }) } -// 鍒犻櫎鑰冩牳鍙戝竷 +// 鍒犻櫎鍚堝悓鑰冩牳鍙戝竷 export function delPublish(id) { return request({ - url: '/system/publish/' + id, + url: '/default/publish/' + id, method: 'delete' }) } -// 鑾峰彇鑰冩牳涓嬫媺鍒楄〃 +// 鑾峰彇鍚堝悓鑰冩牳涓嬫媺鍒楄〃 export function publishSelect() { return request({ - url: '/system/publish/all', + url: '/default/publish/all', method: 'get' }) } diff --git a/src/api/platform/default-result.js b/src/api/platform/default-result.js new file mode 100644 index 0000000..29598b2 --- /dev/null +++ b/src/api/platform/default-result.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 鏌ヨ鍚堝悓鑰冩牳缁撴灉鍒楄〃 +export function listResult(query) { + return request({ + url: '/default/result/list', + method: 'get', + params: query + }) +} + +// 鏌ヨ鍚堝悓鑰冩牳缁撴灉璇︾粏 +export function getResult(id) { + return request({ + url: '/default/result/' + id, + method: 'get' + }) +} + +// 鏂板鍚堝悓鑰冩牳缁撴灉 +export function addResult(data) { + return request({ + url: '/default/result', + method: 'post', + data: data + }) +} + +// 淇敼鍚堝悓鑰冩牳缁撴灉 +export function updateResult(data) { + return request({ + url: '/default/result', + method: 'put', + data: data + }) +} + +// 鍒犻櫎鍚堝悓鑰冩牳缁撴灉 +export function delResult(id) { + return request({ + url: '/default/result/' + id, + method: 'delete' + }) +} diff --git a/src/api/platform/default-rule.js b/src/api/platform/default-rule.js index e43c2de..3812c7a 100644 --- a/src/api/platform/default-rule.js +++ b/src/api/platform/default-rule.js @@ -3,8 +3,8 @@ // 鏌ヨ杩濈害瑙勫垯鍒楄〃 export function listRule(data) { return request({ - url: '/default-rule/page', - method: 'post', + url: '/default/rule/list', + method: 'get', data: data }) } @@ -12,7 +12,7 @@ // 鏌ヨ杩濈害瑙勫垯璇︾粏 export function getRule(id) { return request({ - url: '/default-rule/' + id, + url: '/default/rule/' + id, method: 'get' }) } @@ -20,7 +20,7 @@ // 鏂板杩濈害瑙勫垯 export function addRule(data) { return request({ - url: '/default-rule', + url: '/default/rule', method: 'post', data: data }) @@ -29,7 +29,7 @@ // 淇敼杩濈害瑙勫垯 export function updateRule(data) { return request({ - url: '/default-rule', + url: '/default/rule', method: 'put', data: data }) @@ -38,7 +38,7 @@ // 鍒犻櫎杩濈害瑙勫垯 export function delRule(id) { return request({ - url: '/default-rule/' + id, + url: '/default/rule/' + id, method: 'delete' }) } @@ -46,7 +46,7 @@ // 鍚敤/鍋滅敤杩濈害瑙勫垯 export function setRule(data) { return request({ - url: '/default-rule/set', + url: '/default/rule/set', method: 'post', data: data }) diff --git a/src/api/platform/default-auditing.js b/src/api/platform/default-score.js similarity index 75% rename from src/api/platform/default-auditing.js rename to src/api/platform/default-score.js index b5c5b02..e5f66bc 100644 --- a/src/api/platform/default-auditing.js +++ b/src/api/platform/default-score.js @@ -3,8 +3,8 @@ // 鏌ヨ杩濊瀹℃牳鍒楄〃 export function listAuditing(data) { return request({ - url: '/default-auditing/page', - method: 'post', + url: '/default/score/list', + method: 'get', data: data }) } @@ -12,7 +12,7 @@ // 鏌ヨ杩濊瀹℃牳璇︾粏 export function getAuditing(id) { return request({ - url: '/default-auditing/' + id, + url: '/default/score/' + id, method: 'get' }) } @@ -20,7 +20,7 @@ // 鏂板杩濊瀹℃牳 export function addAuditing(data) { return request({ - url: '/default-auditing', + url: '/default/score', method: 'post', data: data }) @@ -29,7 +29,7 @@ // 淇敼杩濊瀹℃牳 export function updateAuditing(data) { return request({ - url: '/default-auditing', + url: '/default/score', method: 'put', data: data }) @@ -38,7 +38,7 @@ // 鍒犻櫎杩濊瀹℃牳 export function delAuditing(id) { return request({ - url: '/default-auditing/' + id, + url: '/default/score/' + id, method: 'delete' }) } @@ -46,7 +46,7 @@ // 瀹℃牳 export function auditing(data) { return request({ - url: '/default-auditing/auditing', + url: '/default/score/auditing', method: 'post', data: data }) diff --git a/src/api/platform/default-template.js b/src/api/platform/default-template.js new file mode 100644 index 0000000..8a151f5 --- /dev/null +++ b/src/api/platform/default-template.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 鏌ヨ杩濈害瑙勫垯妯℃澘鍒楄〃 +export function listTemplate(query) { + return request({ + url: '/default/template/list', + method: 'get', + params: query + }) +} + +// 鏌ヨ杩濈害瑙勫垯妯℃澘璇︾粏 +export function getTemplate(id) { + return request({ + url: '/default/template/' + id, + method: 'get' + }) +} + +// 鏂板杩濈害瑙勫垯妯℃澘 +export function addTemplate(data) { + return request({ + url: '/default/template', + method: 'post', + data: data + }) +} + +// 淇敼杩濈害瑙勫垯妯℃澘 +export function updateTemplate(data) { + return request({ + url: '/default/template', + method: 'put', + data: data + }) +} + +// 鍒犻櫎杩濈害瑙勫垯妯℃澘 +export function delTemplate(id) { + return request({ + url: '/default/template/' + id, + method: 'delete' + }) +} diff --git a/src/api/platform/monitor.js b/src/api/platform/monitor.js index d3f6317..b2f006f 100644 --- a/src/api/platform/monitor.js +++ b/src/api/platform/monitor.js @@ -9,6 +9,22 @@ }) } +// 鏌ヨ璁惧璧勪骇缁熻鏁� +export function videoCount(type) { + return request({ + url: '/system/monitor/getVideoCount/' + type, + method: 'get' + }) +} + +// 鏌ヨ寮傚父鎭㈠璁惧璧勪骇缁熻鏁� +export function recoveryException() { + return request({ + url: '/system/monitor/recoveryException', + method: 'get' + }) +} + // 鏌ヨ璁惧璧勪骇璇︾粏 export function getMonitor(id) { return request({ diff --git a/src/api/platform/notify.js b/src/api/platform/notify.js new file mode 100644 index 0000000..6b0a016 --- /dev/null +++ b/src/api/platform/notify.js @@ -0,0 +1,61 @@ +import axios from "./request"; + +// 鑾峰彇閫氱煡鍒嗛〉 +export const getNotifys = (params) => { + return axios({ + url: "/notify/page", + method: "GET", + params: params + }) +} + +// 鑾峰彇閫氱煡鍒楄〃 +export const getNotifyList = () => { + return axios({ + url: "/notify/list", + method: "GET" + }) +} + +// 閫氳繃id鑾峰彇閫氱煡 +export const getNotifyById = (params) => { + return axios({ + url: "/notify/" + params, + method: "GET" + }) +} + +// 閫氳繃id鍒犻櫎閫氱煡 +export const deleteNotifyById = (params) => { + return axios({ + url: "/notify/" + params, + method: "DELETE" + }) +} + +// 鎵归噺鍒犻櫎閫氱煡 +export const deleteNotifyByIds = (params) => { + return axios({ + url: "/notify/batch", + method: "DELETE", + data: params + }) +} + +// 淇敼閫氱煡 +export const editNotify = (params) => { + return axios({ + url: "/notify/", + method: "PUT", + data: params + }) +} + +// 娣诲姞閫氱煡 +export const addNotify = (params) => { + return axios({ + url: "/notify/", + method: "POST", + data: params + }) +} diff --git a/src/api/platform/people.js b/src/api/platform/people.js index efc0d1f..5ee7a10 100644 --- a/src/api/platform/people.js +++ b/src/api/platform/people.js @@ -17,6 +17,14 @@ }) } +// 鏍规嵁杩愮淮鍗曚綅鏌ヨ杩愮淮浜哄憳璇︾粏 +export function getPeopleByUnitId(id) { + return request({ + url: '/yw-people/getPeopleByUnitId/' + id, + method: 'get' + }) +} + // 鏂板杩愮淮浜哄憳 export function addPeople(data) { return request({ diff --git a/src/api/platform/platform.js b/src/api/platform/platform.js new file mode 100644 index 0000000..5fe4eb7 --- /dev/null +++ b/src/api/platform/platform.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 鏌ヨ骞冲彴杩愯鐩戞帶鍒楄〃 +export function listPlatform(query) { + return request({ + url: '/platform/platformMonitor/list', + method: 'get', + params: query + }) +} + +// 鏌ヨ骞冲彴杩愯鐩戞帶璇︾粏 +export function getPlatform(id) { + return request({ + url: '/platform/platformMonitor/' + id, + method: 'get' + }) +} + +// 鏂板骞冲彴杩愯鐩戞帶 +export function addPlatform(data) { + return request({ + url: '/platform/platformMonitor', + method: 'post', + data: data + }) +} + +// 淇敼骞冲彴杩愯鐩戞帶 +export function updatePlatform(data) { + return request({ + url: '/platform/platformMonitor', + method: 'put', + data: data + }) +} + +// 鍒犻櫎骞冲彴杩愯鐩戞帶 +export function delPlatform(id) { + return request({ + url: '/platform/platformMonitor/' + id, + method: 'delete' + }) +} diff --git a/src/api/platform/rules.js b/src/api/platform/rules.js deleted file mode 100644 index 7ff7568..0000000 --- a/src/api/platform/rules.js +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' - -// 鏌ヨ鏍哥畻瑙勫垯鍒楄〃 -export function listRules(query) { - return request({ - url: '/platform/rules/list', - method: 'get', - params: query - }) -} - -// 鏌ヨ鏍哥畻瑙勫垯璇︾粏 -export function getRules(id) { - return request({ - url: '/platform/rules/' + id, - method: 'get' - }) -} - -// 鏂板鏍哥畻瑙勫垯 -export function addRules(data) { - return request({ - url: '/platform/rules', - method: 'post', - data: data - }) -} - -// 淇敼鏍哥畻瑙勫垯 -export function updateRules(data) { - return request({ - url: '/platform/rules', - method: 'put', - data: data - }) -} - -// 鍒犻櫎鏍哥畻瑙勫垯 -export function delRules(id) { - return request({ - url: '/platform/rules/' + id, - method: 'delete' - }) -} diff --git a/src/api/system/dept.js b/src/api/system/dept.js index b6c0f1d..277263c 100644 --- a/src/api/system/dept.js +++ b/src/api/system/dept.js @@ -51,10 +51,17 @@ }) } -// 鑾峰彇杩愮淮鍗曚綅涓嬫媺鍒楄〃 +// 鑾峰彇閮ㄩ棬涓嬫媺鍒楄〃 export function deptSelect() { return request({ url: '/system/dept/all', method: 'get' }) } +// 鑾峰彇鍖哄煙涓嬫媺鍒楄〃 +export function areaSelect() { + return request({ + url: '/system/dept/pullList', + method: 'get' + }) +} diff --git a/src/assets/icons/arrow.png b/src/assets/icons/arrow.png new file mode 100644 index 0000000..5a0f2ed --- /dev/null +++ b/src/assets/icons/arrow.png Binary files differ diff --git a/src/assets/icons/setting.png b/src/assets/icons/setting.png new file mode 100644 index 0000000..4ff2803 --- /dev/null +++ b/src/assets/icons/setting.png Binary files differ diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index cd90e52..7defbcf 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -41,6 +41,12 @@ <div class="button-container"> <el-button type="primary" @click="toScreen">鍙鍖栧ぇ灞�</el-button> </div> + <div class="button-container"> + <el-button type="primary" @click="toSystemB">璺宠浆B绯荤粺</el-button> + </div> + <div class="button-container"> + <el-button type="primary" @click="toSystemA">璺宠浆A绯荤粺</el-button> + </div> </div> </template> @@ -109,6 +115,16 @@ this.$router.push({ path: '/screen' }) + }, + toSystemA() { + this.$router.push({ + path: '/screen' + }) + }, + toSystemB() { + this.$router.push({ + path: '/screen' + }) } } } diff --git a/src/router/index.js b/src/router/index.js index 80ba5f6..b9f2252 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -60,6 +60,19 @@ ] }, { + path: '/car/equipment', + component: Layout, + hidden: true, + children: [ + { + path: 'index', + name: 'equipment', + component: () => import('@/views/system/equipment/index'), + meta: { title: '璧勪骇绠$悊', activeMenu: '/system/equipment' } + } + ] + }, + { path: '/check-result/contract', component: Layout, hidden: true, @@ -67,7 +80,7 @@ { path: 'detail', name: 'check-result-contract', - component: () => import('@/views/system/check-result/contract/detail'), + component: () => import('@/views/system/result/default/detail'), meta: { title: '鍚堝悓缁撴灉璇︽儏', activeMenu: '/system/check-result/contract' } } ] @@ -77,12 +90,7 @@ component: Layout, hidden: true, children: [ - { - path: 'detail', - name: 'check-result-city', - component: () => import('@/views/system/check-result/city/detail'), - meta: { title: '甯傚眬鑰冩牳缁撴灉璇︽儏', activeMenu: '/system/check-result/city' } - } + ] }, { @@ -90,12 +98,7 @@ component: Layout, hidden: true, children: [ - { - path: 'detail', - name: 'check-result-province', - component: () => import('@/views/system/check-result/province/detail'), - meta: { title: '鐪佸巺鑰冩牳缁撴灉璇︽儏', activeMenu: '/system/check-result/province' } - } + ] }, { diff --git a/src/views/login copy.vue b/src/views/login copy.vue index e855493..cbe738d 100644 --- a/src/views/login copy.vue +++ b/src/views/login copy.vue @@ -1,10 +1,10 @@ <template> <div class="login"> <div class="title-container"> - <h3 class="title">鑷础鍏畨澶╃綉杩愮淮骞冲彴</h3> + <h3 class="title">杩愮淮鑰冩牳骞冲彴</h3> </div> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> - <h3 class="title">鑷础鍏畨澶╃綉杩愮淮骞冲彴</h3> + <h3 class="title">杩愮淮鑰冩牳骞冲彴</h3> <el-form-item prop="username"> <el-input diff --git a/src/views/login.vue b/src/views/login.vue index b0e0d55..623456e 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -7,7 +7,7 @@ <div class="logo"> <img src="../assets/icons/logo.png" alt=""> </div> - <p class="title">鑷础鍏畨澶╃綉杩愮淮骞冲彴</p> + <p class="title">杩愮淮鑰冩牳骞冲彴</p> </div> <div class="logo-wrapper"> <img src="../assets/svg/login-box-bg.svg" alt=""> @@ -100,8 +100,8 @@ return { codeUrl: "", loginForm: { - username: "admin", - password: "admin123", + username: "", + password: "", rememberMe: false, code: "", uuid: "" diff --git a/src/views/screen/components/screen-data/components/data-hola.vue b/src/views/screen/components/screen-data/components/data-hola.vue new file mode 100644 index 0000000..da906ed --- /dev/null +++ b/src/views/screen/components/screen-data/components/data-hola.vue @@ -0,0 +1,137 @@ +<template> + <div class="hola-container"> + <div class="chart" id="dataChart" ref="chartRef"></div> + </div> +</template> + +<script> +import * as echarts from 'echarts'; +let myChart = null; +export default { + name: 'DataHola', + props: { + centerValue: { + type: [Number, String], + default: 0 + }, + holaColor: { + type: String, + default: '#4ea8ff' + }, + holaTitle: { + type: String, + default: '' + } + }, + data() { + return { + + } + }, + methods: { + initChart() { + const series= [ + { + type: 'gauge', // 浠〃鐩樼被鍨� + name: '绯诲垪鍚嶇О', // 鐢ㄤ簬tooltip鐨勬樉绀� + startAngle: 90, // 浠〃鐩樺紑濮嬭搴︼紙璁剧疆鑳屾櫙鍦嗙殑瑙掑害锛� + endAngle: -270, // 浠〃鐩樼粨鏉熻搴� + center: ['50%', '50%'], // 涓績鐐癸紙鍦嗗績鍧愭爣锛� + radius: '100%', // 鍦嗗ぇ灏忥紙浠〃鐩樺崐寰勶級 + clockwise: true, // 浠〃鐩樺埢搴︽槸鍚︽槸椤烘椂閽堝闀� + // 浠〃鐩樿酱绾跨浉鍏抽厤缃� + axisLine: { + show: true, + roundCap: false, // 涓ょ鏄剧ず鎴愬渾褰紙鑳屾櫙鐜級 + clip: false, // 鏄惁瑁佸壀瓒呭嚭閮ㄥ垎 + // 璁剧疆鑳屾櫙鍦嗙幆鏍峰紡 + lineStyle: { + width: 6, // 鍦嗙幆瀹藉害 + color: [[1, '#002865']] // 鍦嗙幆鑳屾櫙鑹� + } + }, + max: 5000, + // 浠〃鐩樻寚閽� + pointer: { + show: false + }, + // 杩涘害璁剧疆 + progress: { + show: true, + overlap: false, // 澶氱粍鏁版嵁鏃惰繘搴︽潯鏄惁閲嶅彔 + roundCap: true, // 鏄惁鍦ㄤ袱绔樉绀烘垚鍦嗗舰 + clip: false, // 鏄惁瑁佹帀瓒呭嚭閮ㄥ垎 + // 杩涘害鏉℃牱寮� + itemStyle: { + borderWidth: 0, + shadowColor: '', + color: this.holaColor + } + }, + // 浠〃鐩樺垎鍓茬嚎 + splitLine: { + show: false + }, + // 鍒诲害鏍峰紡 + axisTick: { + show: false + }, + // 鍒诲害鏍囩 + axisLabel: { + show: false + }, + title: { + show: false, + fontSize: 20 + }, + detail: { + // width: 50, + // height: 14, + fontSize: 20, + color: 'auto' + }, + data: [ + { + value: this.centerValue, + name: this.holaTitle, + title: { + show: true, + fontSize: 14, + color: '#fff', + offsetCenter: ['0%', '30%'], + }, + detail: { + fontSize: 18, + // 涓績title璁剧疆 + offsetCenter: ['0%', '-10%'], + color: '#fff', + formatter: '{value}' + + } + } + ], + } + ]; + myChart.setOption({ + series: series + }) + } + }, + mounted() { + myChart = echarts.init(this.$refs['chartRef']); + this.initChart(); + } +} +</script> + +<style lang="scss" scoped> +.hola-container { + width: 100%; + height: 100%; + + .chart { + width: 100%; + height: 100%; + } +} +</style> \ No newline at end of file diff --git a/src/views/screen/components/screen-data/index.vue b/src/views/screen/components/screen-data/index.vue new file mode 100644 index 0000000..300142c --- /dev/null +++ b/src/views/screen/components/screen-data/index.vue @@ -0,0 +1,177 @@ +<template> + <div class="data-container"> + <wrapper-title :title="'宸ュ崟鏁版嵁'" :path="'/work-order-center/maintenance/work-order/work-order'"></wrapper-title> + + <div class="data-content"> + <div class="data-panel"> + <div class="panel-title"> + <div class="icon"> + <img src="@/assets/icons/arrow.png" alt=""> + </div> + <div class="title"> + 鏁翠綋宸ュ崟鏁� + </div> + </div> + <div class="panel-container"> + <div class="panel-item"> + <data-hola :holaTitle="`宸ュ崟鎬绘暟`" :centerValue="3000" :holaColor="`#4ea8ff`"></data-hola> + </div> + <div class="panel-item"> + <data-hola :holaTitle="`宸插鐞嗗伐鍗曟暟`" :centerValue="1600" :holaColor="`#5dec24`"></data-hola> + </div> + <div class="panel-item"> + <data-hola :holaTitle="`鏈鐞嗗伐鍗曟暟`" :centerValue="200" :holaColor="`#dfc639`"></data-hola> + </div> + </div> + </div> + <div class="data-panel"> + <div class="panel-title"> + <div class="icon"> + <img src="@/assets/icons/arrow.png" alt=""> + </div> + <div class="title"> + 鍒嗗尯宸ュ崟鏁� + </div> + </div> + <div class="echart-container"> + <div id="barChart" ref="barChart"></div> + </div> + </div> + </div> + </div> +</template> + +<script> +import * as echarts from 'echarts'; +import WrapperTitle from '../wrapper-title/index'; +import DataHola from './components/data-hola'; +let chart = null; +export default { + name: 'ScreenData', + components: { + WrapperTitle, + DataHola + }, + data() { + return { + dataList: { + name: ['瀵岄『鍘�', '鑽e幙', '楂樻柊鍖�', '鑷祦浜曞尯', '璐′簳鍖�', '澶у畨鍖�', '娌挎哗鍖�'], + data1: [210, 310, 40, 102, 111, 201, 123], + data2: [20, 30, 10, 10, 11, 21, 5], + }, + } + }, + methods: { + initEchart() { + const option = { + grid: { + top: '10%', + right: 0, + bottom: '15%', + }, + legend: { + right: 0, + textStyle: { + color: '#447ED6' + } + }, + tooltip: {}, + xAxis: { + type: 'category', + axisLabel: { + color: '#447ED6', + rotate: 45 + }, + data: this.dataList.name + }, + yAxis: { + axisLabel: { + color: '#4D76B0', + }, + }, + series: [ + { + type: 'bar', + name: '宸插鐞嗗伐鍗曟暟', + stack: 'total', + itemStyle: { + color: '#4ea8ff' + }, + data: this.dataList.data1 + }, + { + type: 'bar', + name: '鏈鐞嗗伐鍗曟暟', + stack: 'total', + itemStyle: { + color: '#dfc639' + }, + data: this.dataList.data2 + }, + ] + } + chart.setOption(option, true); + + } + }, + mounted() { + chart = echarts.init(this.$refs.barChart); + this.initEchart(); + } +} +</script> + +<style lang="scss" scoped> +.data-container { + width: 100%; + height: 500px; + display: flex; + flex-direction: column; + + .data-content { + flex: 1; + background: rgba(67, 102, 155, 0.3); + border: 1px solid rgba(47, 91, 157, 0.8); + padding: 10px; + box-sizing: border-box; + } +} + +.echart-container { + width: 100%; + height: 260px; + + #barChart { + width: 100%; + height: 100%; + } +} + +.panel-title { + color: #b9b9b9; + display: flex; + align-items: center; + + .icon { + width: 20px; + margin-right: 5px; + + img { + width: 100%; + display: block; + } + } +} + +.panel-container { + width: 100%; + display: flex; + justify-content: space-around; + margin: 10px 0; + + .panel-item { + width: 120px; + height: 120px; + } +} +</style> \ No newline at end of file diff --git a/src/views/screen/components/screen-examine/components/examine-chart.vue b/src/views/screen/components/screen-examine/components/examine-chart.vue index 803c32a..d12f01e 100644 --- a/src/views/screen/components/screen-examine/components/examine-chart.vue +++ b/src/views/screen/components/screen-examine/components/examine-chart.vue @@ -25,10 +25,7 @@ { id: 3, name: '妗f鑰冩牳姣�', value: 60, routerUrl: '/car/vehicle-data-monitor/index' }, { id: 4, name: '鐐逛綅鍦ㄧ嚎鐜�', value: 40, routerUrl: '/car/vehicle-data-monitor/index' }, { id: 5, name: '褰曞儚鍙敤鐜�', value: 80, routerUrl: '/car/vehicle-data-monitor/index' }, - { id: 6, name: '閲嶇偣鐐逛綅褰曞儚鍙敤鐜�', value: 20, routerUrl: '/car/vehicle-data-monitor/index' }, - { id: 7, name: '淇℃伅閲囬泦鍑嗙‘鐜�', value: 60, routerUrl: '/car/vehicle-data-monitor/index' }, - { id: 8, name: '杞﹁締杩囧崱鍙f暟鎹竴鑷存��', value: 40, routerUrl: '/car/vehicle-data-monitor/index' }, - + { id: 6, name: '閲嶇偣鐐逛綅褰曞儚鍙敤鐜�', value: 20, routerUrl: '/car/vehicle-data-monitor/index' } ] } }, @@ -59,8 +56,8 @@ .hola-item { flex-shrink: 0; - width: 180px; - height: 180px; + width: 150px; + height: 120px; } } } diff --git a/src/views/screen/components/screen-examine/components/examine-hola.vue b/src/views/screen/components/screen-examine/components/examine-hola.vue index a4c2d87..83a0396 100644 --- a/src/views/screen/components/screen-examine/components/examine-hola.vue +++ b/src/views/screen/components/screen-examine/components/examine-hola.vue @@ -3,7 +3,7 @@ <div class="progressChart"> <div class="chart" id="progressChart" ref="chartRef"></div> <el-link class="bottom le-0-font" :underline="false" @click="handleDetail(routerPath)"> - <label >{{ bottomTitle }}</label> + <label>{{ bottomTitle }}</label> </el-link> </div> </template> @@ -28,7 +28,7 @@ clip: false, // 鏄惁瑁佸壀瓒呭嚭閮ㄥ垎 // 璁剧疆鑳屾櫙鍦嗙幆鏍峰紡 lineStyle: { - width: 10, // 鍦嗙幆瀹藉害 + width: 6, // 鍦嗙幆瀹藉害 color: [[1, '#002865']] // 鍦嗙幆鑳屾櫙鑹� } }, @@ -85,7 +85,7 @@ detail: { // width: 50, // height: 14, - fontSize: 14, + fontSize: 20, color: 'auto' }, data: [ @@ -151,7 +151,9 @@ .progressChart { width: 100%; height: 100%; - + display: flex; + flex-direction: column; + align-items: center; .chart { width: 100%; height: 75%; @@ -162,8 +164,9 @@ width: 100%; color: #01f8ff; text-align: center; - font-size: 16px; + font-size: 14px; margin-top: 10px; } } + </style> diff --git a/src/views/screen/components/screen-examine/index.vue b/src/views/screen/components/screen-examine/index.vue index 161dbfe..8bdd44f 100644 --- a/src/views/screen/components/screen-examine/index.vue +++ b/src/views/screen/components/screen-examine/index.vue @@ -1,6 +1,6 @@ <template> <div class="examine-container"> - <wrapper-title :title="'鑰冩牳鏁版嵁'" :path="'/examine/check-rule'"></wrapper-title> + <wrapper-title :title="'鑰冩牳鏁版嵁'" :path="'/examine/default'"></wrapper-title> <div class="examine-content"> <div class="examine-wrapper"> @@ -72,10 +72,11 @@ <style lang="scss" scoped> .examine-container { + flex: 1; width: 100%; - height: 100%; display: flex; flex-direction: column; + margin-bottom: 20px } .examine-content { diff --git a/src/views/screen/components/screen-map/index.vue b/src/views/screen/components/screen-map/index.vue index 89992b9..d949913 100644 --- a/src/views/screen/components/screen-map/index.vue +++ b/src/views/screen/components/screen-map/index.vue @@ -2,6 +2,7 @@ <div class="map-container"> <wrapper-title :title="'鍖哄煙鍦板浘'"></wrapper-title> <div class="map-content"> + <div ref="map" class="map-style"></div> </div> </div> @@ -13,6 +14,7 @@ import 'echarts-gl'; import mapData from '@/assets/map/zigong1.json'; import WrapperTitle from '../wrapper-title/index'; +import ScreenData from '../screen-data/index'; echarts.registerMap('zigong', mapData); let mapChart = null; @@ -161,7 +163,8 @@ } }, components: { - WrapperTitle + WrapperTitle, + ScreenData }, methods: { filterData(name) { @@ -236,6 +239,7 @@ .map-content { flex: 1; + position: relative; // background: rgba(67, 102, 155, 0.3); // border: 1px solid rgba(47, 91, 157, 0.8); } @@ -245,4 +249,12 @@ height: 100%; } } + +.data-container { + width: 100%; + display: flex; + position: absolute; + top: 0; + left: 0; +} </style> \ No newline at end of file diff --git a/src/views/screen/components/screen-table/index.vue b/src/views/screen/components/screen-table/index.vue index df8fd27..01e715d 100644 --- a/src/views/screen/components/screen-table/index.vue +++ b/src/views/screen/components/screen-table/index.vue @@ -1,35 +1,81 @@ <template> <div class="table-container"> + <wrapper-title :title="'鍖哄煙璁惧鏁版嵁'" :path="'/monitorServe/recovery'"></wrapper-title> <div class="table-content" ref="tabContent"> - <el-table :data="tableData" border :height="tableHeight" :max-height="tableHeight" class="rank-table"> - <el-table-column prop="name" label="鍦板尯" align="center" width="100"> - </el-table-column> - <el-table-column label="浜鸿劯璁惧" align="center"> - <el-table-column prop="data1" label="璁惧姝e父鏁�" align="center"> + <div class="table-wrapper"> + <el-table :data="tableData" border :height="tableHeight" :max-height="tableHeight" class="rank-table"> + <el-table-column prop="name" label="鍦板尯" align="center" width="100"> </el-table-column> - <el-table-column prop="data1" label="璁惧寮傚父鏁�" align="center"> + + <el-table-column label="浜鸿劯璁惧姝e父鐜�" align="center"> + <template slot-scope="scope"> + <el-tooltip placement="top"> + <div slot="content"> + <div class="tip-item"> + <div class="tip-label">璁惧姝e父鏁�:</div> + <div class="tip-info tip-success">12</div> + </div> + <div class="tip-item"> + <div class="tip-label">璁惧寮傚父鏁�:</div> + <div class="tip-info tip-danger">4</div> + </div> + </div> + <div class="tip-num">75%</div> + </el-tooltip> + </template> </el-table-column> - </el-table-column> - <el-table-column label="杞﹁締璁惧" align="center"> - <el-table-column prop="data1" label="璁惧姝e父鏁�" align="center"> + + <el-table-column label="杞﹁締璁惧姝e父鐜�" align="center"> + <template slot-scope="scope"> + <el-tooltip placement="top"> + <div slot="content"> + <div class="tip-item"> + <div class="tip-label">璁惧姝e父鏁�:</div> + <div class="tip-info tip-success">12</div> + </div> + <div class="tip-item"> + <div class="tip-label">璁惧寮傚父鏁�:</div> + <div class="tip-info tip-danger">4</div> + </div> + </div> + <div class="tip-num">75%</div> + </el-tooltip> + </template> </el-table-column> - <el-table-column prop="data1" label="璁惧寮傚父鏁�" align="center"> + + <el-table-column label="瑙嗛璁惧姝e父鐜�" align="center"> + <template slot-scope="scope"> + <el-tooltip placement="top"> + <div slot="content"> + <div class="tip-item"> + <div class="tip-label">璁惧姝e父鏁�:</div> + <div class="tip-info tip-success">12</div> + </div> + <div class="tip-item"> + <div class="tip-label">璁惧寮傚父鏁�:</div> + <div class="tip-info tip-danger">4</div> + </div> + </div> + <div class="tip-num">75%</div> + </el-tooltip> + </template> </el-table-column> - </el-table-column> - <el-table-column label="瑙嗛璁惧" align="center"> - <el-table-column prop="data1" label="璁惧姝e父鏁�" align="center"> - </el-table-column> - <el-table-column prop="data1" label="璁惧寮傚父鏁�" align="center"> - </el-table-column> - </el-table-column> - </el-table> + </el-table> + </div> </div> </div> </template> <script> +import WrapperTitle from '../wrapper-title/index'; + export default { + name: 'ScreenTable', + + components: { + WrapperTitle + }, data() { return { tableHeight: 40, @@ -101,14 +147,18 @@ // flex: 1; height: 350px; position: relative; - background: rgba(67, 102, 155, 0.3); - border: 1px solid rgba(47, 91, 157, 0.8); + + display: flex; + flex-direction: column; .table-content { - position: absolute; - width: 100%; - top: 0; - bottom: 0; + flex: 1; + background: rgba(67, 102, 155, 0.3); + border: 1px solid rgba(47, 91, 157, 0.8); + // position: absolute; + // width: 100%; + // top: 0; + // bottom: 0; } } @@ -165,4 +215,28 @@ ::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell { background-color: #447ed648; } + +.tip-item { + display: flex; + align-items: center; + margin-bottom: 10px; + font-size: 16px; + + &:last-of-type { + margin-bottom: 0; + } + + .tip-label { + color: #5b83bd; + margin-right: 10px; + } + + .tip-success { + color: #0cd81d; + } + + .tip-danger { + color: #e20c0c; + } +} </style> \ No newline at end of file diff --git a/src/views/screen/components/screen-title/index.vue b/src/views/screen/components/screen-title/index.vue index a771169..14c5bd9 100644 --- a/src/views/screen/components/screen-title/index.vue +++ b/src/views/screen/components/screen-title/index.vue @@ -5,7 +5,7 @@ <img src="@/assets/images/screen/header_bg.png" class="width-img" alt=""> </div> <div class="header-text"> - 鑷础甯傝繍缁磋�冩牳澶у睆 + 杩愮淮鑰冩牳澶у睆 </div> </div> </div> @@ -38,4 +38,4 @@ color: #fff; font-size: 24px; } -</style> \ No newline at end of file +</style> diff --git a/src/views/screen/components/screen-wrapper/index.vue b/src/views/screen/components/screen-wrapper/index.vue index c501131..e401f5a 100644 --- a/src/views/screen/components/screen-wrapper/index.vue +++ b/src/views/screen/components/screen-wrapper/index.vue @@ -1,8 +1,8 @@ <template> <div class="wrapper-container"> <select-item></select-item> - <div class="return-button"> - <el-button type="primary" @click="returnPath">绠$悊绯荤粺</el-button> + <div class="return-button" @click="returnPath"> + 杩斿洖 </div> <div class="wrapper-content"> <screen-map-three></screen-map-three> @@ -12,14 +12,14 @@ <screen-video class="enter-left animate-delay-2" :class="{ 'animate-enter-x': isEnd }"></screen-video> </div> <div class="center-container center-wrapper"> - <!-- <screen-map></screen-map> --> - <screen-map-cover></screen-map-cover> + <screen-map></screen-map> <screen-table class="enter-top" :class="{ 'animate-enter-y': isEnd }"></screen-table> <!-- <screen-detection></screen-detection> --> </div> <div class="right-container wrapper"> <screen-examine class="enter-right" :class="{ 'animate-enter-x': isEnd }"></screen-examine> + <screen-data class="enter-right animate-delay-1" :class="{ 'animate-enter-x': isEnd }"></screen-data> </div> </div> </div> @@ -27,8 +27,8 @@ <script> import SelectItem from '../select-item/index'; -import ScreenFace from '../screen-face/index'; import ScreenExamine from '../screen-examine/index'; +import ScreenFace from '../screen-face/index'; import ScreenVideo from '../screen-video/index'; import ScreenCar from '../screen-car/index'; import ScreenMap from '../screen-map/index'; @@ -40,14 +40,15 @@ name: 'ScreenWrapper', components: { SelectItem, - ScreenFace, ScreenExamine, - ScreenVideo, - ScreenCar, ScreenMap, ScreenTable, ScreenMapCover, - ScreenMapThree + ScreenMapThree, + ScreenFace, + ScreenVideo, + ScreenCar, + ScreenData }, data() { return { @@ -80,7 +81,13 @@ .return-button { position: absolute; right: 20px; - top: 40px; + top: 10px; + border-radius: 4px; + border: 1px solid #4481DD; + background-color: rgba(67, 102, 155, 0.4); + color: #4481DD; + padding: 5px 20px; + cursor: pointer; } .wrapper-container { @@ -93,8 +100,8 @@ .wrapper-content { width: 100%; - height: calc(100% - 100px); - margin-top: 100px; + height: calc(100% - 60px); + margin-top: 60px; position: relative; box-sizing: border-box; padding: 20px; @@ -105,7 +112,7 @@ } .wrapper { - width: 20%; + width: 25%; height: 100%; box-sizing: border-box; padding: 0 10px; @@ -123,7 +130,7 @@ } .center-wrapper { - width: 60%; + width: 50%; height: 100%; box-sizing: border-box; padding: 0 10px; diff --git a/src/views/screen/components/select-item/index.vue b/src/views/screen/components/select-item/index.vue index 53a40cd..75ee4bb 100644 --- a/src/views/screen/components/select-item/index.vue +++ b/src/views/screen/components/select-item/index.vue @@ -87,7 +87,7 @@ <style lang="scss" scoped> .select-container { position: absolute; - top: 40px; + top: 10px; left: 20px; display: flex; align-items: center; diff --git a/src/views/screen/components/wrapper-title/index.vue b/src/views/screen/components/wrapper-title/index.vue index 6351d2b..265b777 100644 --- a/src/views/screen/components/wrapper-title/index.vue +++ b/src/views/screen/components/wrapper-title/index.vue @@ -3,11 +3,12 @@ <span class="title">{{ title }}</span> <div class="more-button" v-if="path" @click="toPath"> - <dv-border-box-12> - <div class="button-text"> - 璇︽儏 - </div> - </dv-border-box-12> + <div class="icon"> + <img src="@/assets/icons/setting.png" alt=""> + </div> + <div class="button-text"> + 鏌ョ湅鏇村 + </div> </div> </div> </template> @@ -26,7 +27,7 @@ } }, methods: { - toPath () { + toPath() { this.$router.push(this.path); } } @@ -56,9 +57,19 @@ } .more-button { - width: 100px; height: 40px; cursor: pointer; + display: flex; + align-items: center; + .icon { + width: 20px; + margin-top: 4px; + margin-right: 2px; + img { + width: 100%; + display: block; + } + } .button-text { width: 100%; @@ -67,7 +78,7 @@ justify-content: center; align-items: center; color: #ffffff81; - font-size: 20px; + font-size: 16px; } } } diff --git a/src/views/system/calculate/duty/index.vue b/src/views/system/calculate/duty/index.vue index 2ac514d..7432547 100644 --- a/src/views/system/calculate/duty/index.vue +++ b/src/views/system/calculate/duty/index.vue @@ -30,10 +30,10 @@ <el-table v-loading="loading" :data="scoreList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="杩濈害鍚�" align="center" prop="examineName" /> - <el-table-column label="杩濈害瀵硅薄" align="center" prop="unitName" /> + <el-table-column label="杩愮淮鑰冩牳鍚�" align="center" prop="examineName" /> + <el-table-column label="鑰冩牳瀵硅薄" align="center" prop="unitName" /> <el-table-column label="鍒嗗��" align="center" prop="score" /> - <el-table-column label="杩濈害瑙勫垯" align="center" prop="scoreCategory"> + <el-table-column label="杩愮淮鑰冩牳瑙勫垯" align="center" prop="scoreCategory"> <template slot-scope="scope"> <div v-if="scope.row.scoreCategory === 1">瑙嗛鍦ㄧ嚎鐜�</div> <div v-else-if="scope.row.scoreCategory === 2">瀛樺偍鏁呴殰</div> @@ -66,7 +66,7 @@ </el-option> </el-select> </el-form-item> - <el-form-item label="杩濈害鍚�" prop="examineId"> + <el-form-item label="杩愮淮鑰冩牳鍚�" prop="examineId"> <el-select v-model="form.examineId" placeholder="璇烽�夋嫨"> <el-option v-for="item in examineList" :key="item.id" :label="item.value" :value="item.id"> </el-option> @@ -88,9 +88,9 @@ </template> <script> -import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/score"; +import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/default-score"; import { unitSelect } from "@/api/platform/unit"; -import { publishSelect } from "@/api/platform/publish"; +import { publishSelect } from "@/api/platform/default-publish"; export default { name: "Score", diff --git a/src/views/system/calculate/order/index.vue b/src/views/system/calculate/order/index.vue index 155ebdc..c944342 100644 --- a/src/views/system/calculate/order/index.vue +++ b/src/views/system/calculate/order/index.vue @@ -22,18 +22,6 @@ </el-option> </el-select> </el-form-item> - <el-form-item label="鑰冩牳鑼冨洿" prop="examineRange"> - <el-select v-model="queryParams.examineRange" clearable @clear="handleQuery" placeholder="鑰冩牳鑼冨洿"> - <el-option - label="甯傚眬鑰冩牳" - value="2"> - </el-option> - <el-option - label="鍒嗗眬鑰冩牳" - value="1"> - </el-option> - </el-select> - </el-form-item> <el-form-item label="鑰冩牳鏃堕棿"> <el-date-picker v-model="daterangeCheckTime" @@ -86,10 +74,10 @@ <el-card class="box-card" v-for="(item) in checkResultList"> <div slot="header" class="clearfix"> - <span>{{ item.checkUnitName }}</span> + <span>{{ checkUnitName }}</span> <el-button style="float: right; padding: 3px 0" type="text" @click="handleDetail(item)">璇︽儏</el-button> </div> - <div class="text item">鑰冩牳<span class="time">{{ item.examineName }}</span></div> + <div class="text item">鑰冩牳<span class="time">{{ examineName }}</span></div> <div class="text item">鑰冩牳棰戠巼<span class="time">{{ "瀛e害鑰冩牳" }}</span></div> <div class="text item">鑰冩牳鍒嗘暟<span class="time">{{ item.checkScore }}</span></div> <div class="text item">鑰冩牳鏃堕棿 @@ -155,21 +143,14 @@ <i class="el-icon-user"></i> 鑰冩牳瀵硅薄 </template> - {{detail.checkUnitName}} + {{checkUnitName}} </el-descriptions-item> <el-descriptions-item> <template slot="label"> <i class="el-icon-s-management"></i> 鑰冩牳鍚嶇О </template> - {{detail.examineName}} - </el-descriptions-item> - <el-descriptions-item> - <template slot="label"> - <i class="el-icon-full-screen"></i> - 鑰冩牳鑼冨洿 - </template> - <el-tag size="small">{{detail.examineRange === 1 ? '鍒嗗眬鑰冩牳' : '甯傚眬鑰冩牳'}}</el-tag> + {{examineName}} </el-descriptions-item> <el-descriptions-item> <template slot="label"> @@ -231,6 +212,8 @@ detail:{ }, + checkUnitName: '鎴愰兘x杩愮淮', + examineName: '鎴愰兘x杩愮淮鑰冩牳', tableData: [{ name: '瑙嗛骞冲潎鍦ㄧ嚎鐜�', content: '97%', @@ -313,7 +296,7 @@ this.queryParams["end"] = this.daterangeCheckTime[1]; } listCheckResult(this.queryParams).then(response => { - this.checkResultList = response.data; + this.checkResultList = response.rows; this.total = response.total; this.loading = false; }); diff --git a/src/views/system/calculate/record/index.vue b/src/views/system/calculate/record/index.vue index 3f07233..b321768 100644 --- a/src/views/system/calculate/record/index.vue +++ b/src/views/system/calculate/record/index.vue @@ -1,21 +1,23 @@ <template> <div class="app-container"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="rulesName"> - <el-input - v-model="queryParams.rulesName" - placeholder="璇疯緭鍏ヨ鍒欏悕绉�" - clearable - @keyup.enter.native="handleQuery" - /> + <el-form-item label="鍗曚綅鍚�" prop="checkUnitId"> + <el-select v-model="form.unitId" placeholder="璇烽�夋嫨"> + <el-option + v-for="item in unitList" + :key="item.id" + :label="item.value" + :value="item.id"> + </el-option> + </el-select> </el-form-item> - <el-form-item label="鍚堝悓鍚嶇О" prop="contractName"> - <el-input - v-model="queryParams.contractName" - placeholder="璇疯緭鍏ュ悎鍚屽悕绉�" - clearable - @keyup.enter.native="handleQuery" - /> + <el-form-item label="鏍哥畻鏃ユ湡" prop="date" > + <el-date-picker clearable + v-model="queryParams.date" + type="date" + value-format="yyyy-MM-dd" + placeholder="璇烽�夋嫨鏍哥畻鏃ユ湡"> + </el-date-picker> </el-form-item> <el-form-item> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> @@ -26,33 +28,85 @@ <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button + type="primary" + plain + icon="el-icon-plus" + size="mini" + @click="handleAdd" + v-hasPermi="['system:record:add']" + >鏂板</el-button> + </el-col> + <el-col :span="1.5"> + <el-button + type="success" + plain + icon="el-icon-edit" + size="mini" + :disabled="single" + @click="handleUpdate" + v-hasPermi="['system:record:edit']" + >淇敼</el-button> + </el-col> + <el-col :span="1.5"> + <el-button + type="danger" + plain + icon="el-icon-delete" + size="mini" + :disabled="multiple" + @click="handleDelete" + v-hasPermi="['system:record:remove']" + >鍒犻櫎</el-button> + </el-col> + <el-col :span="1.5"> + <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" - >瀵煎嚭 - </el-button> + v-hasPermi="['system:record:export']" + >瀵煎嚭</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> - <el-table v-loading="loading" :data="rulesList" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center"/> - <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="rulesName"/> - <el-table-column label="鍚堝悓鍚嶇О" align="center" prop="contractName"/> - <el-table-column label="閲戦(鍏�)" align="center" prop="amount"/> - <el-table-column label="鏁伴噺" align="center" prop="num"> - 100 - </el-table-column> - <el-table-column label="鍚堣(鍏�)" align="center" prop="money"> - <template slot-scope="scope" > - {{scope.row.amount*100}} + <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange"> + <el-table-column type="selection" width="55" align="center" /> + <el-table-column label="鏍哥畻璁板綍鏃ユ湡" align="center" prop="date" width="180"> + <template slot-scope="scope"> + <span>{{ parseTime(scope.row.date, '{y}-{m}-{d}') }}</span> </template> </el-table-column> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180"> + <el-table-column label="鏍哥畻瑙勫垯" align="center" prop="ruleId"> <template slot-scope="scope"> - <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> + <div v-if="scope.row.ruleId == 1">鎴愰兘x杩愮淮鑰冩牳缁撴灉搴旂敤瑙勫垯</div> + </template> + </el-table-column> + <el-table-column label="鍗曚綅鍚�" align="center" prop="unitId" > + <template slot-scope="scope"> + <div v-if="scope.row.unitId == 2">鎴愰兘x杩愮淮</div> + </template> + </el-table-column> + <!-- <el-table-column label="鎬绘湇鍔¤垂" align="center" prop="totalAmount" /> --> + <!-- <el-table-column label="鎵e噺鏈嶅姟璐�" align="center" prop="deductAmount" /> --> + <el-table-column label="鑰冩牳鍒嗘暟" align="center" prop="score" /> + <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> + <template slot-scope="scope"> + <el-button + size="mini" + type="text" + icon="el-icon-edit" + @click="handleUpdate(scope.row)" + v-hasPermi="['system:record:edit']" + >淇敼</el-button> + <el-button + size="mini" + type="text" + icon="el-icon-delete" + @click="handleDelete(scope.row)" + v-hasPermi="['system:record:remove']" + >鍒犻櫎</el-button> </template> </el-table-column> </el-table> @@ -65,19 +119,41 @@ @pagination="getList" /> - <!-- 娣诲姞鎴栦慨鏀规牳绠楄鍒欏璇濇 --> + <!-- 娣诲姞鎴栦慨鏀规牳绠楄褰曞璇濇 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="rulesName"> - <el-input v-model="form.rulesName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�"/> + <el-form ref="form" :model="form" :rules="rules" label-width="100px"> + <el-form-item label="鏍哥畻瀵硅薄" prop="checkUnitId"> + <el-select v-model="form.unitId" placeholder="璇烽�夋嫨"> + <el-option + v-for="item in unitList" + :key="item.id" + :label="item.value" + :value="item.id"> + </el-option> + </el-select> </el-form-item> - <el-form-item label="鍚堝悓鍚嶇О" prop="contractName"> - <el-input v-model="form.contractName" placeholder="璇疯緭鍏ュ悎鍚屽悕绉�"/> + <el-form-item label="鏍哥畻瑙勫垯" prop="ruleId"> + <el-select v-model="form.ruleId" placeholder="璇烽�夋嫨"> + <el-option label="鎴愰兘x杩愮淮鑰冩牳缁撴灉搴旂敤瑙勫垯" value="1">鎴愰兘x杩愮淮鑰冩牳缁撴灉搴旂敤瑙勫垯</el-option> + </el-select> </el-form-item> - <el-form-item label="閲戦" prop="amount"> - <el-input v-model="form.amount" placeholder="璇疯緭鍏ラ噾棰�"/> + <el-form-item label="鏍哥畻璁板綍鏃ユ湡" prop="date" > + <el-date-picker clearable + v-model="form.date" + type="date" + value-format="yyyy-MM-dd" + placeholder="璇烽�夋嫨鏍哥畻璁板綍鏃ユ湡"> + </el-date-picker> </el-form-item> - + <!-- <el-form-item label="鎬绘湇鍔¤垂" prop="totalAmount"> + <el-input v-model="form.totalAmount" placeholder="璇疯緭鍏ユ�绘湇鍔¤垂" /> + </el-form-item> --> + <!-- <el-form-item label="鎵e噺鏈嶅姟璐�" prop="deductAmount"> + <el-input v-model="form.deductAmount" placeholder="璇疯緭鍏ユ墸鍑忔湇鍔¤垂" /> + </el-form-item> --> + <el-form-item label="鑰冩牳鍒嗘暟" prop="score"> + <el-input v-model="form.score" placeholder="璇疯緭鍏ヨ�冩牳鍒嗘暟" /> + </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> @@ -88,13 +164,12 @@ </template> <script> -import { listRules, getRules, delRules, addRules, updateRules } from '@/api/platform/rules' - +import { listRecord, getRecord, delRecord, addRecord, updateRecord } from "@/api/platform/calculate-record"; +import {unitSelect} from "@/api/platform/unit"; export default { - name: 'Rules', + name: "Record", data() { return { - num: 100, // 閬僵灞� loading: true, // 閫変腑鏁扮粍 @@ -107,126 +182,139 @@ showSearch: true, // 鎬绘潯鏁� total: 0, - // 鏍哥畻瑙勫垯琛ㄦ牸鏁版嵁 - rulesList: [], + // 鏍哥畻璁板綍琛ㄦ牸鏁版嵁 + recordList: [], // 寮瑰嚭灞傛爣棰� - title: '', + title: "", // 鏄惁鏄剧ず寮瑰嚭灞� open: false, // 鏌ヨ鍙傛暟 queryParams: { pageNum: 1, pageSize: 10, - rulesName: null, - contractName: null, - deleted: null + date: null, + ruleId: null, + unitId: null, + totalAmount: null, + deductAmount: null, + score: null }, // 琛ㄥ崟鍙傛暟 form: {}, // 琛ㄥ崟鏍¢獙 - rules: {} - } + rules: { + id: [ + { required: true, message: "$comment涓嶈兘涓虹┖", trigger: "blur" } + ], + } + }; }, created() { - this.getList() + this.getList(); + this.selectUnit(); }, methods: { - /** 鏌ヨ鏍哥畻瑙勫垯鍒楄〃 */ - getList() { - this.loading = true - listRules(this.queryParams).then(response => { - this.rulesList = response.rows - this.total = response.total - this.loading = false + // 杩愮淮鍏徃涓嬫媺鏁版嵁 + selectUnit() { + unitSelect().then(res => { + this.unitList = res.data; }) + }, + /** 鏌ヨ鏍哥畻璁板綍鍒楄〃 */ + getList() { + this.loading = true; + listRecord(this.queryParams).then(response => { + this.recordList = response.rows; + this.total = response.total; + this.loading = false; + }); }, // 鍙栨秷鎸夐挳 cancel() { - this.open = false - this.reset() + this.open = false; + this.reset(); }, // 琛ㄥ崟閲嶇疆 reset() { this.form = { id: null, - rulesName: null, - contractName: null, - amount: null, - createTime: null, - updateTime: null, - deleted: null - } - this.resetForm('form') + date: null, + ruleId: null, + unitId: null, + totalAmount: null, + deductAmount: null, + score: null + }; + this.resetForm("form"); }, /** 鎼滅储鎸夐挳鎿嶄綔 */ handleQuery() { - this.queryParams.pageNum = 1 - this.getList() + this.queryParams.pageNum = 1; + this.getList(); }, /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { - this.resetForm('queryForm') - this.handleQuery() + this.resetForm("queryForm"); + this.handleQuery(); }, // 澶氶�夋閫変腑鏁版嵁 handleSelectionChange(selection) { this.ids = selection.map(item => item.id) - this.single = selection.length !== 1 + this.single = selection.length!==1 this.multiple = !selection.length }, /** 鏂板鎸夐挳鎿嶄綔 */ handleAdd() { - this.reset() - this.open = true - this.title = '娣诲姞鏍哥畻瑙勫垯' + this.reset(); + this.open = true; + this.title = "娣诲姞鏍哥畻璁板綍"; }, /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { - this.reset() + this.reset(); const id = row.id || this.ids - getRules(id).then(response => { - this.form = response.data - this.open = true - this.title = '淇敼鏍哥畻瑙勫垯' - }) + getRecord(id).then(response => { + this.form = response.data; + this.open = true; + this.title = "淇敼鏍哥畻璁板綍"; + }); }, /** 鎻愪氦鎸夐挳 */ submitForm() { - this.$refs['form'].validate(valid => { + this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) { - updateRules(this.form).then(response => { - this.$modal.msgSuccess('淇敼鎴愬姛') - this.open = false - this.getList() - }) + updateRecord(this.form).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.getList(); + }); } else { - addRules(this.form).then(response => { - this.$modal.msgSuccess('鏂板鎴愬姛') - this.open = false - this.getList() - }) + addRecord(this.form).then(response => { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.getList(); + }); } } - }) + }); }, /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { - const ids = row.id || this.ids - this.$modal.confirm('鏄惁纭鍒犻櫎鏍哥畻瑙勫垯缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return delRules(ids) + const ids = row.id || this.ids; + this.$modal.confirm('鏄惁纭鍒犻櫎鏍哥畻璁板綍缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { + return delRecord(ids); }).then(() => { - this.getList() - this.$modal.msgSuccess('鍒犻櫎鎴愬姛') - }).catch(() => { - }) + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }).catch(() => {}); }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { - this.download('platform/rules/export', { + this.download('system/record/export', { ...this.queryParams - }, `rules_${new Date().getTime()}.xlsx`) + }, `record_${new Date().getTime()}.xlsx`) } } -} +}; </script> diff --git a/src/views/system/calculate/report/index.vue b/src/views/system/calculate/report/index.vue index ba3f141..6dea7bd 100644 --- a/src/views/system/calculate/report/index.vue +++ b/src/views/system/calculate/report/index.vue @@ -63,48 +63,19 @@ <el-card class="box-card" v-for="(item) in checkResultList"> <div slot="header" class="clearfix"> - <span>{{ item.checkUnitName }}</span> - <el-button style="float: right; padding: 3px 0" type="text" @click="handleDetail(item)">璇︽儏</el-button> + <span>{{ checkUnitName }}</span> + <el-button style="float: right; padding: 3px 0" type="text" @click="handleDetail(item)">鏍哥畻</el-button> </div> - <div class="text item">鍚堝悓<span class="time">{{ item.checkUnitName }}</span></div> - <div class="text item">鏍哥畻閲戦<span class="time">{{ "40090" }}</span></div> - <div class="text item">鑰冩牳鍒嗘暟<span class="time">{{ item.checkScore }}</span></div> - <div class="text item">鏍哥畻鏃堕棿 + <div class="text item">鍚堝悓<span class="time">{{ checkUnitName }}</span></div> + <div class="text item">鎬婚噾棰�<span class="time">{{ "1000鍏�" }}</span></div> + <div class="text item">鎵e噺閲戦<span class="time">{{ "10鍏�" }}</span></div> + <div class="text item">鍓╀綑閲戦<span class="time">{{ "990鍏�" }}</span></div> + <div class="text item">鏈�鏂版牳绠楁椂闂� <span class="time">{{ item.checkTime }}</span> </div> + <el-button size="small" round style="float: right;margin-bottom: 18px;" @click="handlePublish(item)" v-show="item.publish != 1" v-hasPermi="['result:contract:publish']">纭鍙戝竷</el-button> + <el-button size="small" round style="float: right;margin-bottom: 18px;" @click="handlePublish(item)" v-show="item.publish == 1" v-hasPermi="['result:contract:publish']">宸插彂甯�</el-button> </el-card> - - <!-- <el-table v-loading="loading" :data="checkResultList" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="鑰冩牳瀵硅薄" align="center" prop="checkUnitName" /> - <el-table-column label="鑰冩牳" align="center" prop="examineName" /> - <el-table-column label="鑰冩牳鑼冨洿":formatter="examineRangeFormatter" align="center" prop="examineRange" /> - <el-table-column label="鑰冩牳棰戠巼" :formatter="frequencyFormatter" align="center" prop="frequency" /> - <el-table-column label="鑰冩牳鍒嗘暟" falign="center" prop="checkScore" /> - <el-table-column label="鑰冩牳鏃堕棿" align="center" prop="checkTime" /> - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope"> - <el-button - size="mini" - type="text" - icon="el-icon-view" - @click="handleDetail(scope.row)" - >璇︽儏</el-button> - <el-button - type="text" - size="mini" - icon="el-icon-edit" - @click="handleSetManualScore(scope.row)" - >浜哄伐鎵撳垎</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - >鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> <pagination v-show="total>0" @@ -112,17 +83,9 @@ :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" - /> --> + /> - <el-dialog :title="manualScoreTitle" :visible.sync="manualScoreOpen" width="500px" append-to-body> - <el-input v-model="manualScoreForm.manualScore" type="number" placeholder="璇蜂负璇ュ崟浣嶆墦鍒�"/> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitManualScore">纭� 瀹�</el-button> - <el-button @click="cancelManualScore">鍙� 娑�</el-button> - </div> - </el-dialog> - - <el-dialog :title="detailTitle" :visible.sync="detailOpen" width="700px" append-to-body> + <el-dialog :title="detailTitle" :visible.sync="detailOpen" width="760px" append-to-body> <el-descriptions class="margin-top" :column="3" border> <!-- <template slot="extra">--> <!-- <el-button type="primary" size="small">鎿嶄綔</el-button>--> @@ -132,39 +95,60 @@ <i class="el-icon-user"></i> 鏍哥畻瀵硅薄 </template> - {{detail.checkUnitName}} + {{checkUnitName}} </el-descriptions-item> <el-descriptions-item> <template slot="label"> <i class="el-icon-s-management"></i> 鍚堝悓鍚嶇О </template> - {{detail.checkUnitName}} + {{checkUnitName}} </el-descriptions-item> </el-descriptions> <el-table :data="tableData" show-summary - style="width: 100%"> + :summary-method="getSummaries" + style="width: 100%;text-align:center"> <el-table-column - prop="name" - label="瑙勫垯鍚�" + prop="time" + label="鏍哥畻鏃ユ湡" width="180"> </el-table-column> <el-table-column - prop="amount" - label="鏁伴噺" - width="180"> + prop="score" + label="鑰冩牳鍒嗘暟" + width="180" + doNotSum> </el-table-column> - <el-table-column + <el-table-column + prop="score" + label="鎵e垎绯绘暟" + width="180"> + <template slot-scope="scope"> + <el-tooltip class="item" effect="dark" :content="'鑰冩牳瑙勫垯锛�' + scope.row.description" placement="top"> + <span>{{ scope.row.value }}</span> + </el-tooltip> + </template> + </el-table-column> + <el-table-column + label="鎵e噺閲戦(鍏�)" prop="money" - label="閲戦(鍏�)"> - </el-table-column> - <el-table-column - prop="total" - label="鍚堣(鍏�)"> - </el-table-column> + width="180"> + <template slot-scope="scope"> + <el-input type="number" + :precision="2" :step="0.1" + :min="0" :max="1000000" + v-model="scope.row.money" + placeholder="璇疯緭鍏ユ墸鍑忛噾棰�"> + </el-input> + </template> + </el-table-column> </el-table> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> </el-dialog> <!-- 娣诲姞鎴栦慨鏀硅�冩牳缁撴灉瀵硅瘽妗� --> @@ -191,27 +175,20 @@ detail:{ }, + checkUnitName:'鎴愰兘x杩愮淮', tableData: [{ - name: '瀛樺偍鏁呴殰', - amount: '100', - money: '100', - total: '10000' + time: '2024-03-03', + score: '94', + value: '0.01', + money: '', + description: '姣忓皯1鍒嗘墸褰撴湀鎬绘湇鍔¤垂鐨�1%銆備緥濡傦細褰撴湀鑰冩牳寰楀垎91.5鍒嗭紝鎵i櫎褰撴湀鏈嶅姟璐�3.5%鐨勯噾棰�', }, { - name: '鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�', - amount: '100', - money: '100.45', - total: '10045' - }, { - name: '涓�鏈轰竴妗�24灏忔椂鏈慨澶�', - amount: '100', - money: '100', - total: '10000' - }, { - name: '瑙嗛杩愯鐜�(96%)', - amount: '100', - money: '100.45', - total: '10045' - }], + time: '2024-04-03', + score: '95', + value: '0', + money: '', + description: '姣忓皯1鍒嗘墸褰撴湀鎬绘湇鍔¤垂鐨�1%銆備緥濡傦細褰撴湀鑰冩牳寰楀垎91.5鍒嗭紝鎵i櫎褰撴湀鏈嶅姟璐�3.5%鐨勯噾棰�', + }, ], manualScoreOpen: false, manualScoreForm: {}, manualScoreTitle: '', @@ -277,14 +254,14 @@ this.queryParams["end"] = this.daterangeCheckTime[1]; } listCheckResult(this.queryParams).then(response => { - this.checkResultList = response.data; + this.checkResultList = response.rows; this.total = response.total; this.loading = false; }); }, // 鍙栨秷鎸夐挳 cancel() { - this.open = false; + this.detailOpen = false; this.reset(); }, // 琛ㄥ崟閲嶇疆 @@ -319,16 +296,11 @@ this.getList(); }) }, - handleSetManualScore(row) { - this.manualScoreForm.id = row.id; - this.manualScoreForm.manualScore = parseInt(row.manualScore); - this.manualScoreTitle = row.checkUnitName + '浜哄伐鎵撳垎' - this.manualScoreOpen = true; - }, handleDetail(row) { + console.log("row", row) this.detail = row; this.detail.carOnlineRate = '97%'; - this.detailTitle = row.checkUnitName + '鑰冩牳缁撴灉'; + this.detailTitle = this.checkUnitName + '鑰冩牳缁撴灉'; this.detailOpen = true; }, @@ -378,6 +350,7 @@ }, /** 鎻愪氦鎸夐挳 */ submitForm() { + this.detailOpen = false; this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) { @@ -411,6 +384,38 @@ this.download('system/checkResult/export', { ...this.queryParams }, `checkResult_${new Date().getTime()}.xlsx`) + }, + getSummaries(param) { + const { columns, data } = param; + const sums = []; + columns.forEach((column, index) => { + if (index === 0) { + sums[index] = '鍚堣'; + return; + } + const values = data.map(item => Number(item[column.property])); + if (!values.every(value => isNaN(value))) { + sums[index] = values.reduce((prev, curr) => { + const value = Number(curr); + if (!isNaN(value)) { + return prev + curr; + } else { + return prev; + } + }, 0); + sums[index] += ' 鍏�'; + if (column.property === 'score') { + sums[index] = '-'; // 鎴栬�呭叾浠栦綘鎯宠鏄剧ず鐨勫唴瀹� + } + if (column.property === 'value') { + sums[index] = '-'; // 鎴栬�呭叾浠栦綘鎯宠鏄剧ず鐨勫唴瀹� + } + } else { + sums[index] = 'N/A'; + } + }); + + return sums; } } }; diff --git a/src/views/system/calculate/rule/index.vue b/src/views/system/calculate/rule/index.vue index c362c97..6831222 100644 --- a/src/views/system/calculate/rule/index.vue +++ b/src/views/system/calculate/rule/index.vue @@ -1,36 +1,5 @@ <template> <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="rulesName"> - <el-input - v-model="queryParams.rulesName" - placeholder="璇疯緭鍏ヨ鍒欏悕绉�" - clearable - @keyup.enter.native="handleQuery" - /> - </el-form-item> - <el-form-item label="鍚堝悓鍚嶇О" prop="contractName"> - <el-input - v-model="queryParams.contractName" - placeholder="璇疯緭鍏ュ悎鍚屽悕绉�" - clearable - @keyup.enter.native="handleQuery" - /> - </el-form-item> - <el-form-item label="閫昏緫鍒犻櫎" prop="deleted"> - <el-input - v-model="queryParams.deleted" - placeholder="璇疯緭鍏ラ�昏緫鍒犻櫎" - clearable - @keyup.enter.native="handleQuery" - /> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button @@ -39,54 +8,37 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - >鏂板 - </el-button> + v-hasPermi="['system:rule:add']" + >鏂板</el-button> </el-col> <el-col :span="1.5"> <el-button - type="success" + type="info" plain - icon="el-icon-edit" + icon="el-icon-sort" size="mini" - :disabled="single" - @click="handleUpdate" - >淇敼 - </el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - :disabled="multiple" - @click="handleDelete" - >鍒犻櫎 - </el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="el-icon-download" - size="mini" - @click="handleExport" - >瀵煎嚭 - </el-button> + @click="toggleExpandAll" + >灞曞紑/鎶樺彔</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> - <el-table v-loading="loading" :data="rulesList" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center"/> - <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="rulesName"/> - <el-table-column label="鍚堝悓鍚嶇О" align="center" prop="contractName"/> - <el-table-column label="閲戦" align="center" prop="amount"/> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180"> + <el-table + v-if="refreshTable" + v-loading="loading" + :data="ruleList" + row-key="id" + :default-expand-all="isExpandAll" + :tree-props="{children: 'children', hasChildren: 'hasChildren'}" + > + <el-table-column label="瑙勫垯鍚嶇О" prop="name" /> + <el-table-column label="鍗曚綅" align="center" prop="unitId" > <template slot-scope="scope"> - <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> + <div v-if="scope.row.unitId == 2">鎴愰兘x杩愮淮</div> </template> </el-table-column> + <el-table-column label="鎵e垎绯绘暟" align="center" prop="value" /> + <el-table-column label="瑙勫垯鎻忚堪" align="center" prop="description" /> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button @@ -94,38 +46,46 @@ type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" - >淇敼 - </el-button> + v-hasPermi="['system:rule:edit']" + >淇敼</el-button> + <el-button + size="mini" + type="text" + icon="el-icon-plus" + @click="handleAdd(scope.row)" + v-hasPermi="['system:rule:add']" + >鏂板</el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" - >鍒犻櫎 - </el-button> + v-hasPermi="['system:rule:remove']" + >鍒犻櫎</el-button> </template> </el-table-column> </el-table> - <pagination - v-show="total>0" - :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" - @pagination="getList" - /> - <!-- 娣诲姞鎴栦慨鏀规牳绠楄鍒欏璇濇 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="rulesName"> - <el-input v-model="form.rulesName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�"/> + <el-form-item label="瑙勫垯鍚�" prop="name"> + <el-input v-model="form.name" placeholder="璇疯緭鍏�" /> </el-form-item> - <el-form-item label="鍚堝悓鍚嶇О" prop="contractName"> - <el-input v-model="form.contractName" placeholder="璇疯緭鍏ュ悎鍚屽悕绉�"/> + <el-form-item label="妯℃澘鍚�" prop="templateId"> + <el-input v-model="form.templateId" placeholder="璇疯緭鍏�" /> </el-form-item> - <el-form-item label="閲戦" prop="amount"> - <el-input v-model="form.amount" placeholder="璇疯緭鍏ラ噾棰�"/> + <el-form-item label="鐖惰鍒�" prop="parentId"> + <treeselect v-model="form.parentId" :options="ruleOptions" :normalizer="normalizer" placeholder="璇烽�夋嫨" /> + </el-form-item> + <el-form-item label="鑰冩牳瀵硅薄" prop="unitId"> + <el-input v-model="form.unitId" placeholder="璇疯緭鍏ュ崟浣峣d" /> + </el-form-item> + <el-form-item label="鎵e垎绯绘暟" prop="value"> + <el-input v-model="form.value" placeholder="璇疯緭鍏ユ墸鍒嗙郴鏁�" /> + </el-form-item> + <el-form-item label="瑙勫垯鎻忚堪" prop="description"> + <el-input v-model="form.description" placeholder="璇疯緭鍏ヨ鍒欐弿杩�" /> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> @@ -137,144 +97,170 @@ </template> <script> -import { listRules, getRules, delRules, addRules, updateRules } from '@/api/platform/rules' +import { listRule, getRule, delRule, addRule, updateRule } from "@/api/platform/calculate-rule"; +import Treeselect from "@riophae/vue-treeselect"; +import "@riophae/vue-treeselect/dist/vue-treeselect.css"; export default { - name: 'Rules', + name: "Rule", + components: { + Treeselect + }, data() { return { // 閬僵灞� loading: true, - // 閫変腑鏁扮粍 - ids: [], - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, // 鏄剧ず鎼滅储鏉′欢 showSearch: true, - // 鎬绘潯鏁� - total: 0, // 鏍哥畻瑙勫垯琛ㄦ牸鏁版嵁 - rulesList: [], + ruleList: [], + // 鏍哥畻瑙勫垯鏍戦�夐」 + ruleOptions: [], // 寮瑰嚭灞傛爣棰� - title: '', + title: "", // 鏄惁鏄剧ず寮瑰嚭灞� open: false, + // 鏄惁灞曞紑锛岄粯璁ゅ叏閮ㄥ睍寮� + isExpandAll: true, + // 閲嶆柊娓叉煋琛ㄦ牸鐘舵�� + refreshTable: true, // 鏌ヨ鍙傛暟 queryParams: { - pageNum: 1, - pageSize: 10, - rulesName: null, - contractName: null, - deleted: null + name: null, + templateId: null, + parentId: null, + unitId: null, + value: null, + description: null }, // 琛ㄥ崟鍙傛暟 form: {}, // 琛ㄥ崟鏍¢獙 - rules: {} - } + rules: { + } + }; }, created() { - this.getList() + this.getList(); }, methods: { /** 鏌ヨ鏍哥畻瑙勫垯鍒楄〃 */ getList() { - this.loading = true - listRules(this.queryParams).then(response => { - this.rulesList = response.rows - this.total = response.total - this.loading = false - }) + this.loading = true; + listRule(this.queryParams).then(response => { + this.ruleList = this.handleTree(response.data, "id", "parentId"); + this.loading = false; + }); + }, + /** 杞崲鏍哥畻瑙勫垯鏁版嵁缁撴瀯 */ + normalizer(node) { + if (node.children && !node.children.length) { + delete node.children; + } + return { + id: node.id, + label: node.name, + children: node.children + }; + }, + /** 鏌ヨ鏍哥畻瑙勫垯涓嬫媺鏍戠粨鏋� */ + getTreeselect() { + listRule().then(response => { + this.ruleOptions = []; + const data = { id: 0, name: '椤剁骇鑺傜偣', children: [] }; + data.children = this.handleTree(response.data, "id", "parentId"); + this.ruleOptions.push(data); + }); }, // 鍙栨秷鎸夐挳 cancel() { - this.open = false - this.reset() + this.open = false; + this.reset(); }, // 琛ㄥ崟閲嶇疆 reset() { this.form = { id: null, - rulesName: null, - contractName: null, - amount: null, - createTime: null, - updateTime: null, - deleted: null - } - this.resetForm('form') + name: null, + templateId: null, + parentId: null, + unitId: null, + value: null, + description: null + }; + this.resetForm("form"); }, /** 鎼滅储鎸夐挳鎿嶄綔 */ handleQuery() { - this.queryParams.pageNum = 1 - this.getList() + this.getList(); }, /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { - this.resetForm('queryForm') - this.handleQuery() - }, - // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - this.ids = selection.map(item => item.id) - this.single = selection.length !== 1 - this.multiple = !selection.length + this.resetForm("queryForm"); + this.handleQuery(); }, /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { - this.reset() - this.open = true - this.title = '娣诲姞鏍哥畻瑙勫垯' + handleAdd(row) { + this.reset(); + this.getTreeselect(); + if (row != null && row.id) { + this.form.parentId = row.id; + } else { + this.form.parentId = 0; + } + this.open = true; + this.title = "娣诲姞鏍哥畻瑙勫垯"; + }, + /** 灞曞紑/鎶樺彔鎿嶄綔 */ + toggleExpandAll() { + this.refreshTable = false; + this.isExpandAll = !this.isExpandAll; + this.$nextTick(() => { + this.refreshTable = true; + }); }, /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { - this.reset() - const id = row.id || this.ids - getRules(id).then(response => { - this.form = response.data - this.open = true - this.title = '淇敼鏍哥畻瑙勫垯' - }) + this.reset(); + this.getTreeselect(); + if (row != null) { + this.form.parentId = row.id; + } + getRule(row.id).then(response => { + this.form = response.data; + this.open = true; + this.title = "淇敼鏍哥畻瑙勫垯"; + }); }, /** 鎻愪氦鎸夐挳 */ submitForm() { - this.$refs['form'].validate(valid => { + this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) { - updateRules(this.form).then(response => { - this.$modal.msgSuccess('淇敼鎴愬姛') - this.open = false - this.getList() - }) + updateRule(this.form).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.getList(); + }); } else { - addRules(this.form).then(response => { - this.$modal.msgSuccess('鏂板鎴愬姛') - this.open = false - this.getList() - }) + addRule(this.form).then(response => { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.getList(); + }); } } - }) + }); }, /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { - const ids = row.id || this.ids - this.$modal.confirm('鏄惁纭鍒犻櫎鏍哥畻瑙勫垯缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return delRules(ids) + this.$modal.confirm('鏄惁纭鍒犻櫎鏍哥畻瑙勫垯缂栧彿涓�"' + row.id + '"鐨勬暟鎹」锛�').then(function() { + return delRule(row.id); }).then(() => { - this.getList() - this.$modal.msgSuccess('鍒犻櫎鎴愬姛') - }).catch(() => { - }) - }, - /** 瀵煎嚭鎸夐挳鎿嶄綔 */ - handleExport() { - this.download('platform/rules/export', { - ...this.queryParams - }, `rules_${new Date().getTime()}.xlsx`) + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }).catch(() => {}); } } -} +}; </script> diff --git a/src/views/system/car/index.vue b/src/views/system/car/index.vue index 8f9ba87..4df65e2 100644 --- a/src/views/system/car/index.vue +++ b/src/views/system/car/index.vue @@ -10,27 +10,27 @@ <el-col :xl="14" :lg="14" :md="12" :sm="14" :xs="16"> <div class="dashboard"> <div class="dashboard-item"> - <h3 style="color: #5C9BF8">{{ totalPosts }}</h3> + <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3> <p>璁惧鎬绘暟</p > </div> <div class="dashboard-item"> - <h3 style="color: #3eba45">{{ totalMembers }}</h3> + <h3 style="color: #3eba45">{{ count.totalMembers }}</h3> <p>姝e父鏁�</p > </div> <div class="dashboard-item"> - <h3 style="color: #fe640d">{{ postsPercentage }}</h3> + <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3> <p>寮傚父鏁�</p > </div> <div class="dashboard-item"> - <h3>{{ totalViews }}</h3> + <h3>{{ count.totalViews }}</h3> <p>鐢熸垚寮傚父宸ュ崟鏁�</p > </div> <div class="dashboard-item"> - <h3>{{ totalCar }}</h3> + <h3>{{ count.totalCar }}</h3> <p>杩囪溅鏁版嵁鎬婚噺</p > </div> <div class="dashboard-item"> - <h3>{{ viewsPercentage }}%</h3> + <h3>{{ count.viewsPercentage }}%</h3> <p>璁惧杩愯鐜�</p > </div> </div> @@ -110,29 +110,29 @@ @click="handleExport" >瀵煎嚭</el-button> </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> </el-row> <el-table v-loading="loading" :data="monitorList" @selection-change="handleSelectionChange"> <el-table-column type="selection" align="center" /> <el-table-column label="璁惧鍚嶇О" align="center" prop="name" width="280" fixed/> <el-table-column label="璁惧缂栫爜" align="center" prop="serialNumber" width="180"/> - <el-table-column label="鏍囩" align="center" prop="publicSecurity" width="180"/> - <el-table-column label="鍖哄煙" align="center" prop="address" width="180"/> - <el-table-column label="璁惧鐘舵��" align="center" prop="onState"> + <el-table-column label="鏍囩" align="center" prop="publicSecurity" width="180" v-if="columns[0].visible"/> + <el-table-column label="鍖哄煙" align="center" prop="address" width="180" v-if="columns[1].visible"/> + <el-table-column label="璁惧鐘舵��" align="center" prop="onState" v-if="columns[2].visible"> <template slot-scope="scope"> <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/> </template> </el-table-column> - <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="defaultOrder" width="180"> + <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="defaultOrder" width="180" v-if="columns[3].visible"> <template slot-scope="scope"> <dict-tag :options="dict.type.platform_yes_no" :value="scope.row.defaultOrder"/> </template> </el-table-column> - <el-table-column label="鏁版嵁鏃堕棿" align="center" prop="installedTime" width="180"/> - <el-table-column label="绠$悊鍗曚綅" align="center" prop="managementUnit" width="180"/> - <el-table-column label="杩囪溅鏁版嵁閲�" align="center" prop="model" width="180"/> - <el-table-column label="鎸佺画鏃犳暟鎹ぉ鏁�" align="center" prop="recovery" width="180"/> + <el-table-column label="鏁版嵁鏃堕棿" align="center" prop="installedTime" width="180" v-if="columns[4].visible"/> + <el-table-column label="绠$悊鍗曚綅" align="center" prop="managementUnit" width="180" v-if="columns[5].visible"/> + <el-table-column label="杩囪溅鏁版嵁閲�" align="center" prop="a" width="180" v-if="columns[6].visible"/> + <el-table-column label="鎸佺画鏃犳暟鎹ぉ鏁�" align="center" prop="a" width="180" v-if="columns[7].visible"/> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" fixed="right"> <template slot-scope="scope"> <el-button @@ -182,10 +182,10 @@ <el-form-item label="绠$悊鍗曚綅锛�">{{ form.managementUnit }}</el-form-item> </el-col> <el-col :span="24"> - <el-form-item label="杩囪溅鏁版嵁閲忥細">{{ form.model }}</el-form-item> + <el-form-item label="杩囪溅鏁版嵁閲忥細">{{ form.a }}</el-form-item> </el-col> <el-col :span="24"> - <el-form-item label="鎸佺画鏃犳暟鎹ぉ鏁帮細">{{ form.recovery }}</el-form-item> + <el-form-item label="鎸佺画鏃犳暟鎹ぉ鏁帮細">{{ form.a }}</el-form-item> </el-col> </el-row> </el-form> @@ -197,19 +197,32 @@ </template> <script> -import { listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor"; +import { videoCount, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor"; export default { name: "Monitor", dicts: ['sys_normal_disable','platform_yes_no','camera_state'], data() { return { - totalPosts: 1156, - totalMembers: 931, - postsPercentage: 182, - totalViews: 43, - viewsPercentage: 80.53, - totalCar: 2098530, + // 鍒椾俊鎭� + columns: [ + { key: 0, label: `鏍囩`, visible: true }, + { key: 1, label: `鍖哄煙`, visible: true }, + { key: 2, label: `璁惧鐘舵�乣, visible: true }, + { key: 3, label: `鏄惁鐢熸垚寮傚父宸ュ崟`, visible: true }, + { key: 4, label: `鏁版嵁鏃堕棿`, visible: true }, + { key: 5, label: `绠$悊鍗曚綅`, visible: true }, + { key: 6, label: `杩囪溅鏁版嵁閲廯, visible: true }, + { key: 7, label: `鎸佺画鏃犳暟鎹ぉ鏁癭, visible: true }, + ], + count: { + totalPosts: 0, + totalMembers: 0, + postsPercentage: 0, + totalViews: 0, + viewsPercentage: 0, + totalCar: 0, + }, // 閬僵灞� loading: true, // 閫変腑鏁扮粍 @@ -261,6 +274,7 @@ }; }, created() { + this.getVideoCount(); this.getList(); }, methods: { @@ -271,6 +285,12 @@ this.monitorList = response.rows; this.total = response.total; this.loading = false; + }); + }, + /** 鏌ヨ璁惧璧勪骇缁熻鏁� */ + getVideoCount() { + videoCount('2').then(response => { + this.count = response.data; }); }, // 鍙栨秷鎸夐挳 @@ -301,6 +321,7 @@ this.queryParams.pageNum = 1; this.queryParams.cameraFunType = 2; this.getList(); + this.getVideoCount(); }, /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { diff --git a/src/views/system/check-result/city/detail.vue b/src/views/system/check-result/city/detail.vue deleted file mode 100644 index 171a8ad..0000000 --- a/src/views/system/check-result/city/detail.vue +++ /dev/null @@ -1,791 +0,0 @@ -<template> - <div class="app-container"> - <el-page-header @back="goBack" content="璇︽儏椤甸潰"> - </el-page-header> - <el-container> - <el-main style="padding-top: 0px"> - <h2>鑰冩牳鍒嗘暟鏄庣粏</h2> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="success" - plain - icon="el-icon-edit" - size="mini" - :disabled="single" - @click="handleScoreUpdate" - >淇敼</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - :disabled="multiple" - @click="handleDelete" - >鍒犻櫎</el-button> - </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getScoreList"></right-toolbar> - </el-row> - - <el-table v-loading="loading" :data="scoreList" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="鑰冩牳鍚�" align="center" prop="examineName" /> - <el-table-column label="鑰冩牳绫诲瀷" align="center" prop="examineCategory"> - <template slot-scope="scope"> - <div v-if="scope.row.examineCategory == 1">鐪佸巺鑰冩牳</div> - <div v-else-if="scope.row.examineCategory == 2">甯傚眬鑰冩牳</div> - <div v-else-if="scope.row.examineCategory == 3">鍚堝悓鑰冩牳</div> - </template> - </el-table-column> - <el-table-column label="鑰冩牳瀵硅薄" align="center" prop="unitName"> - <template slot-scope="scope"> - <div v-if="scope.row.unitName ==='鎴愰兘x杩愮淮' ">鎴愰兘x杩愮淮</div> - <div v-else>鑷祦浜曞尯</div> - </template> - </el-table-column> - <el-table-column label="鍒嗗��" align="center" prop="score" /> - <el-table-column label="鑰冩牳瑙勫垯" align="center" prop="ruleCategory"> - <template slot-scope="scope"> - <div v-if="scope.row.ruleCategory == 1">瑙嗛鍦ㄧ嚎鐜�</div> - <div v-else-if="scope.row.ruleCategory == 2">瀛樺偍鏁呴殰</div> - <div v-else-if="scope.row.ruleCategory == 3">瑙嗗浘搴撳鎺ョǔ瀹氭��</div> - <div v-else-if="scope.row.ruleCategory == 4">涓�鏈轰竴妗�24灏忔椂鏈慨澶�</div> - <div v-else-if="scope.row.ruleCategory == 5">鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�</div> - </template> - </el-table-column> - <el-table-column label="鍒涘缓浜�" align="center" prop="createBy" /> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" /> - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope"> - <el-button - size="mini" - type="text" - icon="el-icon-edit" - @click="handleScoreUpdate(scope.row)" - >淇敼</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleScoreDelete(scope.row)" - >鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> - - </el-main> - </el-container> - <el-container> - <el-main> - <h2>鑰冩牳瑙勫垯</h2> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="success" - plain - icon="el-icon-edit" - size="mini" - :disabled="single" - @click="handleRuleUpdate" - >淇敼</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - :disabled="multiple" - @click="handleDelete" - >鍒犻櫎</el-button> - </el-col> - <!-- <el-col :span="1.5">--> - <!-- <el-button--> - <!-- type="warning"--> - <!-- plain--> - <!-- icon="el-icon-download"--> - <!-- size="mini"--> - <!-- @click="handleExport"--> - <!-- v-hasPermi="['system:checkRule:export']"--> - <!-- >瀵煎嚭</el-button>--> - <!-- </el-col>--> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getRuleList"></right-toolbar> - </el-row> - - <el-table v-loading="loading" :data="ruleList" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="ruleName" /> - <el-table-column label="杩愮淮绫诲埆" align="center" prop="category"> - <template slot-scope="scope"> - <div v-if="scope.row.category === 1">瑙嗛鐩戞帶</div> - <div v-else-if="scope.row.category === 2">杞﹁締璇嗗埆</div> - <div v-else-if="scope.row.category === 3">浜鸿劯璇嗗埆</div> - </template> - </el-table-column> - <el-table-column label="瑙勫垯鎻忚堪" align="center" prop="ruleDetail" /> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" /> - <el-table-column label="瀹℃牳鐘舵��" align="center" prop="auditState"> - <template slot-scope="scope"> - <dict-tag :options="dict.type.platform_audit_state" :value="scope.row.auditState"/> - </template> - </el-table-column> - <el-table-column label="瀹℃牳浜�" align="center" prop="auditUser" /> - <el-table-column label="瀹℃牳鏃堕棿" align="center" prop="auditTime" /> - <el-table-column label="瀹℃牳鎰忚" align="center" prop="auditDescription" /> - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope"> - <el-button - size="mini" - type="text" - icon="el-icon-edit" - @click="handleRuleUpdate(scope.row)" - >淇敼</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - >鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> - - <pagination - v-show="total>0" - :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" - @pagination="getRuleList" - /> - </el-main> - </el-container> - - <el-container> - <el-main> - <h2>鑰冩牳鎴愮哗</h2> - <el-collapse v-model="activeNames" @change="handleChange" > - <el-collapse-item name="1"> - <template slot="title"> - <div style="width: 10%" >鑷祦浜曞尯</div><div style="margin-left: 75%">寰楀垎:0.97</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item name="2"> - <template slot="title"> - <div style="width: 10%">璐′簳鍖�</div><div style="margin-left: 75%">寰楀垎:0.94</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="澶у畨鍖�" name="3"> - <template slot="title"> - <div style="width: 10%">澶у畨鍖�</div><div style="margin-left: 75%">寰楀垎:0.95</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="娌挎哗鍖�" name="4"> - <template slot="title"> - <div style="width: 10%">娌挎哗鍖�</div><div style="margin-left: 75%">寰楀垎:0.94</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="鑽e幙" name="5"> - <template slot="title"> - <div style="width: 10%">鑽e幙</div><div style="margin-left: 75%">寰楀垎:0.93</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="瀵岄『鍖�" name="6"> - <template slot="title"> - <div style="width: 10%">瀵岄『鍖�</div><div style="margin-left: 75%">寰楀垎:0.95</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="楂樻柊鍖�" name="7"> - <template slot="title"> - <div style="width: 10%">楂樻柊鍖�</div><div style="margin-left: 75%;">寰楀垎:0.96</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - </el-collapse> - </el-main> - </el-container> - - <!-- 娣诲姞鎴栦慨鏀硅�冩牳瑙勫垯瀵硅瘽妗� --> - <el-dialog :title="title" :visible.sync="ruleOpen" width="600px" append-to-body> - <el-form ref="form" :model="ruleForm" :rules="rules" label-width="80px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> - <el-input v-model="ruleForm.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" /> - </el-form-item> - <el-form-item label="瑙勫垯绫诲瀷" prop="category"> - <el-select v-model="ruleForm.category" placeholder="瑙勫垯绫诲瀷"> - <el-option - v-for="item in categoryList" - :key="item.id" - :label="item.value" - :value="item.id"> - </el-option> - </el-select> - </el-form-item> - <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDetail"> - <el-input v-model="ruleForm.ruleDetail" type="textarea" show-word-limit maxlength="150" placeholder="璇疯緭鍏ヨ鍒欐弿杩�"/> - </el-form-item> - <el-form-item label="鍙傛暟閰嶇疆" prop="ruleDetail"> - <div class="row-warp"> - <div class="row"> - <div class="row-left">鍙傛暟鍚�</div> - <div class="row-right">鏉′欢</div> - </div> - <div class="row"> - <div class="row-left">澶╃綉瑙嗛鐐逛綅鏁�</div> - <div class="row-right"> - <div>涓嶅皯浜�</div> - <div> - <el-input class="input-w" type="number" v-model="ruleForm.videoPointNum"/>{{" %"}} - </div> - </div> - </div> - <div class="row"> - <div class="row-left">杞﹁締鍗″彛鐐逛綅鏁�</div> - <div class="row-right"> - <div>涓嶅皯浜�</div> - <div><el-input class="input-w" type="number" v-model="ruleForm.vehicleCheckpointNum"/></div>{{" %"}} - </div> - </div> - <div class="row"> - <div class="row-left">浜鸿劯鍗″彛鐐逛綅鏁�</div> - <div class="row-right"> - <div>涓嶅皯浜�</div> - <div> - <el-input class="input-w" type="number" v-model="ruleForm.faceChceckpointNum" /></div>{{" %"}} - </div> - </div> - </div> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </el-dialog> - - <!-- 瑙勫垯璇︽儏 --> - <el-dialog title="瑙勫垯璇︽儏" :visible.sync="ruleDetailOpen" width="50%" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> - <el-input class="input" disabled v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" /> - </el-form-item> - <el-form-item label="杩愮淮鍏徃" prop="companyName"> - <el-input class="input" disabled :value ="companyName" placeholder="璇疯緭鍏ヨ繍缁村叕鍙稿悕绉�"></el-input> - </el-form-item> - <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDesc"> - <el-input class="input" disabled v-model="form.ruleDesc" placeholder="璇疯緭鍏ヨ鍒欐弿杩�" /> - </el-form-item> - <el-form-item label="瑙勫垯璁剧疆"> - <div > - <div class="line"> - <div class="line-left">鏃堕挓鍚屾锛堣秴杩嚶�3绉掍负涓嶅悎鏍硷級24灏忔椂鍐呮湭淇鐨勶細鎵i櫎鐩稿叧闀滃ご鏁伴噺*</div> - <div class="line-right"><el-input disabled v-model="jsonRule.overTime" type="text"/></div>鍒� - </div> - <div class="line"> - <div class="line-left">OSD鏍囪瘑涓嶆弧瓒炽�奊AT 751-2008 瑙嗛鍥惧儚鏂囧瓧鏍囨敞瑙勮寖銆嬶紝24灏忔椂鍐呮湭淇鐨勶細鏍囨墸闄ょ浉鍏抽暅澶存暟閲�*</div> - <div class="line-right"><el-input disabled v-model="jsonRule.failNum" type="text"/></div>鍒� - </div> - <div class="line"> - <div class="line-left">鐢ㄦ埛鎶芥锛屼竴鏈轰竴妗f暟鎹」涓嶅悎鏍硷紙鎻愪緵铏氬亣鏁版嵁鎴栭敊璇暟鎹负涓嶅悎鏍硷級锛�24灏忔椂鍐呮湭淇鐨勶細鎵i櫎鐩稿叧闀滃ご鏁伴噺*</div> - <div class="line-right"><el-input disabled v-model="jsonRule.failNum" type="text"/></div>鍒� - </div> - </div> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button @click="cancel">鍏抽棴</el-button> - </div> - </el-dialog> - - <!-- 娣诲姞鎴栦慨鏀硅�冩牳璁″垎瀵硅瘽妗� --> - <el-dialog :title="title" :visible.sync="scoreOpen" width="500px" append-to-body> - <el-form ref="form" :model="scoreForm" :rules="rules" label-width="80px"> - <el-form-item label="鍒嗗��" prop="score"> - <el-input v-model="scoreForm.score" placeholder="璇疯緭鍏ュ垎鍊�" /> - </el-form-item> - <el-form-item label="鑰冩牳鍚�" prop="examineId"> - <el-select v-model="scoreForm.examineId" placeholder="璇烽�夋嫨"> - <el-option - v-for="item in examineList" - :key="item.id" - :label="item.value" - :value="item.id"> - </el-option> - </el-select> - </el-form-item> - <el-form-item label="鑰冩牳瀵硅薄" prop="unitId"> - <el-select v-model="scoreForm.unitId" placeholder="璇烽�夋嫨"> - <el-option - v-for="item in unitList" - :key="item.id" - :label="item.value" - :value="item.id"> - </el-option> - </el-select> - </el-form-item> - <el-form-item label="鑰冩牳瑙勫垯" prop="ruleCategory"> - <el-select v-model="scoreForm.ruleCategory" placeholder="璇烽�夋嫨"> - <el-option - v-for="item in ruleCategoryList" - :key="item.id" - :label="item.value" - :value="item.id"> - </el-option> - </el-select> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </el-dialog> - </div> -</template> - -<script> -import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; -import { listCheckRule, getCheckRule, delCheckRule, addCheckRule, updateCheckRule } from "@/api/platform/check-rule"; -import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/score"; -import {unitSelect} from "../../../../api/platform/unit"; -import {publishSelect} from "../../../../api/platform/publish"; - -export default { - name: "CheckResult", - dicts: ['platform_audit_state'], - data() { - return { - activeNames: ['1'], - companyName: "鎴愰兘x杩愮淮鍏徃", - detailTitle: '', - detailOpen: false, - detail:{ - }, - examineList: [], - unitList: [ - {id:2,value: '鎴愰兘x杩愮淮'}, - {id:3,value: '鑷祦浜曞尯'}, - ], - ruleCategoryList: [ - { id: 1, value: '瑙嗛鍦ㄧ嚎鐜�' }, - { id: 2, value: '瀛樺偍鏁呴殰' }, - { id: 3, value: '瑙嗗浘搴撳鎺ョǔ瀹氭��' }, - { id: 4, value: '涓�鏈轰竴妗�24灏忔椂鏈慨澶�' }, - { id: 5, value: '鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�' }, - ], - tableData: [{ - name: '瑙嗛骞冲潎鍦ㄧ嚎鐜�', - content: '97%', - score: '-5' - }, { - name: '涓�鏈轰竴妗�24灏忔椂鏈慨澶�', - content: '5涓�', - score: '-0.5' - }, { - name: '瀛樺偍鏁呴殰', - content: '5灏忔椂', - score: '-0.3' - }, { - name: '鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�', - content: '3涓�', - score: '-0.5' - }], - // 杩愮淮绫诲瀷 - categoryList: [ - { id: 1, value: '瑙嗛鐩戞帶' }, - { id: 2, value: '杞﹁締璇嗗埆' }, - { id: 3, value: '浜鸿劯璇嗗埆' }, - ], - manualScoreOpen: false, - manualScoreForm: {}, - manualScoreTitle: '', - // 閬僵灞� - loading: true, - // 閫変腑鏁扮粍 - ids: [], - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, - // 鏄剧ず鎼滅储鏉′欢 - showSearch: true, - // 鎬绘潯鏁� - total: 0, - // 鑰冩牳缁撴灉琛ㄦ牸鏁版嵁 - checkResultList: [], - // 寮瑰嚭灞傛爣棰� - title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - scoreOpen: false, - ruleOpen: false, - ruleDetailOpen: false, - // 閫昏緫鍒犻櫎鏃堕棿鑼冨洿 - daterangeCheckTime: [], - // 琛ㄥ崟鍙傛暟 - form: {}, - scoreForm: {}, - ruleForm: {}, - jsonRule: {}, - // 鑰冩牳瑙勫垯鍒楄〃 - ruleList: [], - // 鑰冩牳璁″垎琛ㄦ牸鏁版嵁 - scoreList: [], - //杩濈害瑙勫垯璇锋眰鍙傛暟 - queryParams: { - pageNum: 1, - pageSize: 10, - ruleName: null, - ruleStatus: null, - createTime: null, - }, - //鑰冩牳鍒嗘暟璇锋眰鍙傛暟 - scoreQueryParams: { - pageNum: 1, - pageSize: 10, - examineCategory: 2, - }, - // 琛ㄥ崟鏍¢獙 - rules: { - } - }; - }, - created() { - //鑰冩牳鎴愮哗璇︽儏璺宠浆鍙傛暟鎺ユ敹 - if(this.$route.query.detail){ - this.detail = this.$route.query.detail - console.log(this.$route.query.detail,"detail------------") - } - // 鑰冩牳瑙勫垯鍒楄〃 - this.getRuleList(); - // 鑰冩牳绉垎鍒楄〃 - this.getScoreList(); - // this.selectUnit(); - this.selectExamine(); - }, - methods: { - handleChange(val) { - console.log(val); - }, - // 杩愮淮鍏徃涓嬫媺鏁版嵁 - // selectUnit() { - // unitSelect().then(res => { - // this.unitList = res.data; - // }) - // }, - // 鑰冩牳涓嬫媺鏁版嵁 - selectExamine() { - publishSelect().then(res => { - this.examineList = res.data; - }) - }, - /** 鏌ヨ鑰冩牳璁″垎鍒楄〃 */ - getScoreList() { - this.loading = true; - listScore(this.scoreQueryParams).then(response => { - this.scoreList = response.rows; - this.loading = false; - }); - }, - /** 鏌ヨ杩濈害瑙勫垯鍒楄〃 */ - getRuleList() { - this.loading = true; - if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) { - this.queryParams["start"] = this.daterangeCreateTime[0]; - this.queryParams["end"] = this.daterangeCreateTime[1]; - } - listCheckRule(this.queryParams).then(response => { - this.ruleList = response.data; - this.total = response.total; - this.loading = false; - }); - }, - frequencyFormatter(row) { - if (row.frequency === "1") { - return "鏈堝害鑰冩牳" - } - if (row.frequency === "2") { - return "瀛e害鑰冩牳" - } - }, - examineRangeFormatter(row) { - if (row.examineRange === "1") { - return "鍒嗗眬鑰冩牳" - } - if (row.examineRange === "2") { - return "甯傚眬鑰冩牳" - } - }, - /** 鏌ヨ鑰冩牳缁撴灉鍒楄〃 */ - getCheckResult() { - this.loading = true; - getCheckResult(id).then(response => { - this.detail = response.data; - this.loading = false; - }); - }, - // 鍙栨秷鎸夐挳 - cancel() { - this.scoreOpen = false; - this.ruleOpen = false; - this.ruleDetailOpen = false; - this.ruleDetailOpen = false; - this.reset(); - }, - // 琛ㄥ崟閲嶇疆 - reset() { - this.form = { - id: null, - checkUnitId: null, - checkPublishId: null, - checkScore: null, - systemScore: null, - manualScore: null, - checkTime: null, - createTime: null, - updateTime: null, - deleted: null - }; - this.resetForm("form"); - }, - cancelManualScore() { - this.manualScoreForm = {}; - this.manualScoreTitle = ""; - this.manualScoreOpen = false; - }, - submitManualScore() { - if (! this.manualScoreForm.manualScore) { - this.$modal.msgWarning("璇峰~鍐欏垎鏁�"); - return - } - manualScore(this.manualScoreForm).then(res => { - this.$modal.msgSuccess("鎿嶄綔鎴愬姛"); - this.cancelManualScore(); - this.getList(); - }) - }, - handleSetManualScore(row) { - this.manualScoreForm.id = row.id; - this.manualScoreForm.manualScore = parseInt(row.manualScore); - this.manualScoreTitle = row.checkUnitName + '浜哄伐鎵撳垎' - this.manualScoreOpen = true; - }, - - handlePublish(row) { - let text = row.publish == 1 ? '鍙栨秷鍙戝竷' : '鍙戝竷'; - const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭' + text + '鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return publishCheckResult(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess(text + "鎴愬姛"); - }).catch(() => {}); - - }, - /** 鎼滅储鎸夐挳鎿嶄綔 */ - handleQuery() { - this.queryParams.pageNum = 1; - this.getList(); - }, - /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { - this.daterangeCheckTime = []; - this.resetForm("queryForm"); - this.handleQuery(); - }, - // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - this.ids = selection.map(item => item.id) - this.single = selection.length!==1 - this.multiple = !selection.length - }, - /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { - this.reset(); - this.open = true; - this.title = "娣诲姞鑰冩牳缁撴灉"; - }, - /** 淇敼绉垎鎸夐挳鎿嶄綔 */ - handleScoreUpdate(row) { - this.reset(); - const id = row.id || this.ids - getScore(id).then(response => { - this.scoreForm = response.data; - this.scoreOpen = true; - this.title = "淇敼鑰冩牳璁″垎"; - }); - }, - /** 淇敼鎸夐挳鎿嶄綔 */ - handleRuleUpdate(row) { - this.reset(); - const id = row.id || this.ids - getCheckRule(id).then(response => { - this.ruleForm = response.data; - this.ruleOpen = true; - this.title = "淇敼鑰冩牳瑙勫垯"; - - }); - }, - // 璇︽儏鎸夐挳 - handleRuleDetail(row) { - this.ruleDetailOpen = true; - this.form = row; - this.jsonRule = JSON.parse(this.form.ruleDetail); - }, - /** 鎻愪氦鎸夐挳 */ - submitForm() { - this.$refs["form"].validate(valid => { - if (valid) { - if (this.form.id != null) { - updateCheckResult(this.form).then(response => { - this.$modal.msgSuccess("淇敼鎴愬姛"); - this.open = false; - this.getList(); - }); - } else { - addCheckResult(this.form).then(response => { - this.$modal.msgSuccess("鏂板鎴愬姛"); - this.open = false; - this.getList(); - }); - } - } - }); - }, - /** 鍒犻櫎鎸夐挳鎿嶄綔 */ - handleDelete(row) { - const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return delCheckResult(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); - }, - /** 瀵煎嚭鎸夐挳鎿嶄綔 */ - handleExport() { - this.download('system/checkResult/export', { - ...this.queryParams - }, `checkResult_${new Date().getTime()}.xlsx`) - } - } -}; -</script> -<style scoped> - -.line { - display: flex; - flex-direction: row; - justify-content: flex-start; - align-items: center; -} - -.line-right { - width: 50px; -} -.input{ - width: 200px; -} - -.input-w { - margin-left: 5px; - width: 70px; -} -.row-warp { - display: flex; - flex-direction: column; - justify-content: center; - text-align: center; - border: solid 1px gray; - /*padding: 3px;*/ -} -.row { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - border-bottom: solid 1px gray; - padding: 3px; -} -.row:last-of-type { - border-bottom: none; -} -.row-left { - flex: 2; - border-right: solid 1px gray; -} -.row-right { - flex: 4; - display: flex; - flex-direction: row; - justify-content: center; -} -</style> diff --git a/src/views/system/check-result/city/index.vue b/src/views/system/check-result/city/index.vue deleted file mode 100644 index 3d41c4c..0000000 --- a/src/views/system/check-result/city/index.vue +++ /dev/null @@ -1,471 +0,0 @@ -<template> - <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> - <el-form-item label="鑰冩牳瀵硅薄" prop="checkUnitId"> - <el-input - v-model="queryParams.checkUnitName" - placeholder="璇疯緭鍏ヨ�冩牳瀵硅薄" - clearable - @clear="handleQuery" - @keyup.enter.native="handleQuery" - /> - </el-form-item> - <el-form-item label="鑰冩牳棰戠巼" prop="frequency"> - <el-select v-model="queryParams.frequency" clearable @clear="handleQuery" placeholder="鑰冩牳棰戠巼"> - <el-option - label="鏈堝害鑰冩牳" - value="1"> - </el-option> - <el-option - label="瀛e害鑰冩牳" - value="2"> - </el-option> - </el-select> - </el-form-item> - <el-form-item label="鑰冩牳鑼冨洿" prop="examineRange"> - <el-select v-model="queryParams.examineRange" clearable @clear="handleQuery" placeholder="鑰冩牳鑼冨洿"> - <el-option - label="甯傚眬鑰冩牳" - value="2"> - </el-option> - <el-option - label="鍒嗗眬鑰冩牳" - value="1"> - </el-option> - </el-select> - </el-form-item> - <el-form-item label="鑰冩牳鏃堕棿"> - <el-date-picker - v-model="daterangeCheckTime" - style="width: 240px" - value-format="yyyy-MM-dd HH:mm:ss" - type="daterange" - range-separator="-" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - ></el-date-picker> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - :disabled="multiple" - @click="handleDelete" - >鍒犻櫎</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="el-icon-download" - size="mini" - @click="handleExport" - >瀵煎嚭</el-button> - </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> - </el-row> - - <el-card class="box-card" v-for="(item) in checkResultList"> - <div slot="header" class="clearfix"> - <span>{{ "杞﹁締鑰冩牳" }}</span> - <el-button style="float: right; padding: 3px 0" type="text" @click="handleDetail(item)">璇︽儏</el-button> - </div> - <div class="text item">鑰冩牳鏍囩<span class="time">{{ "鍥涘尯澶╃綉浜屾湡" }}</span></div> - <div class="text item">鑰冩牳鑼冨洿<span class="time">{{ "甯傚尯鑰冩牳" }}</span></div> - <div class="text item">鑰冩牳棰戠巼<span class="time">{{ "瀛e害" }}</span></div> - <div class="text item">鑰冩牳鏃堕棿 - <span class="time">{{ item.checkTime }}</span> - <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish != 1" v-hasPermi="['result:city:publish']">纭鍙戝竷</el-button> - <el-button size="small" round style="float: right;" v-show="item.publish == 1" disabled="true" v-hasPermi="['result:city:publish']">宸插彂甯�</el-button> - </div> - </el-card> - - <!-- <pagination - v-show="total>0" - :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" - @pagination="getList" - /> --> - - <el-dialog :title="detailName" :visible.sync="detail" width="800px" append-to-body> - <el-form label-position="left" inline class="table-expand"> - <el-collapse v-model="activeNames" @change="handleChange"> - <el-collapse-item name="1"> - <template slot="title"> - <div style="width: 10%">鑷祦浜曞尯</div><div style="margin-left: 75%">寰楀垎:0.97</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item name="2"> - <template slot="title"> - <div style="width: 10%">璐′簳鍖�</div><div style="margin-left: 75%">寰楀垎:0.94</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="澶у畨鍖�" name="3"> - <template slot="title"> - <div style="width: 10%">澶у畨鍖�</div><div style="margin-left: 75%">寰楀垎:0.95</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="娌挎哗鍖�" name="4"> - <template slot="title"> - <div style="width: 10%">娌挎哗鍖�</div><div style="margin-left: 75%">寰楀垎:0.94</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="鑽e幙" name="5"> - <template slot="title"> - <div style="width: 10%">鑽e幙</div><div style="margin-left: 75%">寰楀垎:0.93</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="瀵岄『鍖�" name="6"> - <template slot="title"> - <div style="width: 10%">瀵岄『鍖�</div><div style="margin-left: 75%">寰楀垎:0.95</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="楂樻柊鍖�" name="7"> - <template slot="title"> - <div style="width: 10%">楂樻柊鍖�</div><div style="margin-left: 75%;">寰楀垎:0.96</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - </el-collapse> - </el-form> - </el-dialog> - - <!-- 娣诲姞鎴栦慨鏀硅�冩牳缁撴灉瀵硅瘽妗� --> - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </el-dialog> - </div> -</template> - -<script> -import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; - -export default { - name: "CheckResult", - data() { - return { - detailTitle: '', - detailOpen: false, - // 鏄惁鏄剧ず璇︽儏 - detail: false, - // 璇︽儏鏍囬 - detailName: "鑰冩牳缁撴灉", - activeNames: ['1'], - manualScoreOpen: false, - manualScoreForm: {}, - manualScoreTitle: '', - // 閬僵灞� - loading: true, - // 閫変腑鏁扮粍 - ids: [], - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, - // 鏄剧ず鎼滅储鏉′欢 - showSearch: true, - // 鎬绘潯鏁� - total: 0, - // 鑰冩牳缁撴灉琛ㄦ牸鏁版嵁 - checkResultList: [], - // 寮瑰嚭灞傛爣棰� - title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, - // 閫昏緫鍒犻櫎鏃堕棿鑼冨洿 - daterangeCheckTime: [], - // 鏌ヨ鍙傛暟 - queryParams: { - pageNum: 1, - pageSize: 10, - checkUnitId: null, - checkTime: null, - }, - // 琛ㄥ崟鍙傛暟 - form: {}, - // 琛ㄥ崟鏍¢獙 - rules: { - } - }; - }, - created() { - this.getList(); - }, - methods: { - handleChange(val) { - console.log(val); - }, - frequencyFormatter(row) { - if (row.frequency === "1") { - return "鏈堝害鑰冩牳" - } - if (row.frequency === "2") { - return "瀛e害鑰冩牳" - } - }, - examineRangeFormatter(row) { - if (row.examineRange === "1") { - return "鍒嗗眬鑰冩牳" - } - if (row.examineRange === "2") { - return "甯傚眬鑰冩牳" - } - }, - /** 鏌ヨ鑰冩牳缁撴灉鍒楄〃 */ - getList() { - this.loading = true; - if (null != this.daterangeCheckTime && '' != this.daterangeCheckTime) { - this.queryParams["start"] = this.daterangeCheckTime[0]; - this.queryParams["end"] = this.daterangeCheckTime[1]; - } - listCheckResult(this.queryParams).then(response => { - this.checkResultList = response.data; - this.total = response.total; - this.loading = false; - }); - }, - // 鍙栨秷鎸夐挳 - cancel() { - this.open = false; - this.reset(); - }, - // 琛ㄥ崟閲嶇疆 - reset() { - this.form = { - id: null, - checkUnitId: null, - checkPublishId: null, - checkScore: null, - systemScore: null, - manualScore: null, - checkTime: null, - createTime: null, - updateTime: null, - deleted: null - }; - this.resetForm("form"); - }, - cancelManualScore() { - this.manualScoreForm = {}; - this.manualScoreTitle = ""; - this.manualScoreOpen = false; - }, - submitManualScore() { - if (! this.manualScoreForm.manualScore) { - this.$modal.msgWarning("璇峰~鍐欏垎鏁�"); - return - } - manualScore(this.manualScoreForm).then(res => { - this.$modal.msgSuccess("鎿嶄綔鎴愬姛"); - this.cancelManualScore(); - this.getList(); - }) - }, - handleSetManualScore(row) { - this.manualScoreForm.id = row.id; - this.manualScoreForm.manualScore = parseInt(row.manualScore); - this.manualScoreTitle = row.checkUnitName + '浜哄伐鎵撳垎' - this.manualScoreOpen = true; - }, - handleDetail(item) { - this.detail = item; - this.detail.carOnlineRate = '97%'; - console.log(this.detail,"detail") - this.$router.push({ - path: '/check-result/city/detail', - query: { - detail: this.detail - } - }) - }, - handlePublish(row) { - const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍙戝竷鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return publishCheckResult(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("鍙戝竷鎴愬姛"); - }).catch(() => {}); - - }, - /** 鎼滅储鎸夐挳鎿嶄綔 */ - handleQuery() { - this.queryParams.pageNum = 1; - this.getList(); - }, - /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { - this.daterangeCheckTime = []; - this.resetForm("queryForm"); - this.handleQuery(); - }, - // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - this.ids = selection.map(item => item.id) - this.single = selection.length!==1 - this.multiple = !selection.length - }, - /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { - this.reset(); - this.open = true; - this.title = "娣诲姞鑰冩牳缁撴灉"; - }, - /** 淇敼鎸夐挳鎿嶄綔 */ - handleUpdate(row) { - this.reset(); - const id = row.id || this.ids - getCheckResult(id).then(response => { - this.form = response.data; - this.open = true; - this.title = "淇敼鑰冩牳缁撴灉"; - }); - }, - /** 鎻愪氦鎸夐挳 */ - submitForm() { - this.$refs["form"].validate(valid => { - if (valid) { - if (this.form.id != null) { - updateCheckResult(this.form).then(response => { - this.$modal.msgSuccess("淇敼鎴愬姛"); - this.open = false; - this.getList(); - }); - } else { - addCheckResult(this.form).then(response => { - this.$modal.msgSuccess("鏂板鎴愬姛"); - this.open = false; - this.getList(); - }); - } - } - }); - }, - /** 鍒犻櫎鎸夐挳鎿嶄綔 */ - handleDelete(row) { - const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return delCheckResult(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); - }, - /** 瀵煎嚭鎸夐挳鎿嶄綔 */ - handleExport() { - this.download('system/checkResult/export', { - ...this.queryParams - }, `checkResult_${new Date().getTime()}.xlsx`) - } - } -}; -</script> -<style> - .text { - font-size: 14px; - } - .time { - font-size: 13px; - color: #999; - margin-left: 10px; - } - .item { - margin-bottom: 18px; - } - .clearfix:before, - .clearfix:after { - display: table; - content: ""; - } - .clearfix:after { - clear: both - } - .box-card { - width: 480px; - } - -</style> diff --git a/src/views/system/check-result/province/detail.vue b/src/views/system/check-result/province/detail.vue deleted file mode 100644 index 73f1396..0000000 --- a/src/views/system/check-result/province/detail.vue +++ /dev/null @@ -1,791 +0,0 @@ -<template> - <div class="app-container"> - <el-page-header @back="goBack" content="璇︽儏椤甸潰"> - </el-page-header> - <el-container> - <el-main style="padding-top: 0px"> - <h2>鑰冩牳鍒嗘暟鏄庣粏</h2> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="success" - plain - icon="el-icon-edit" - size="mini" - :disabled="single" - @click="handleScoreUpdate" - >淇敼</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - :disabled="multiple" - @click="handleDelete" - >鍒犻櫎</el-button> - </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getScoreList"></right-toolbar> - </el-row> - - <el-table v-loading="loading" :data="scoreList" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="鑰冩牳鍚�" align="center" prop="examineName" /> - <el-table-column label="鑰冩牳绫诲瀷" align="center" prop="examineCategory"> - <template slot-scope="scope"> - <div v-if="scope.row.examineCategory == 1">鐪佸巺鑰冩牳</div> - <div v-else-if="scope.row.examineCategory == 2">甯傚眬鑰冩牳</div> - <div v-else-if="scope.row.examineCategory == 3">鍚堝悓鑰冩牳</div> - </template> - </el-table-column> - <el-table-column label="鑰冩牳瀵硅薄" align="center" prop="unitName"> - <template slot-scope="scope"> - <div v-if="scope.row.unitName ==='鎴愰兘x杩愮淮' ">鎴愰兘x杩愮淮</div> - <div v-else>鑷祦浜曞尯</div> - </template> - </el-table-column> - <el-table-column label="鍒嗗��" align="center" prop="score" /> - <el-table-column label="鑰冩牳瑙勫垯" align="center" prop="ruleCategory"> - <template slot-scope="scope"> - <div v-if="scope.row.ruleCategory == 1">瑙嗛鍦ㄧ嚎鐜�</div> - <div v-else-if="scope.row.ruleCategory == 2">瀛樺偍鏁呴殰</div> - <div v-else-if="scope.row.ruleCategory == 3">瑙嗗浘搴撳鎺ョǔ瀹氭��</div> - <div v-else-if="scope.row.ruleCategory == 4">涓�鏈轰竴妗�24灏忔椂鏈慨澶�</div> - <div v-else-if="scope.row.ruleCategory == 5">鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�</div> - </template> - </el-table-column> - <el-table-column label="鍒涘缓浜�" align="center" prop="createBy" /> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" /> - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope"> - <el-button - size="mini" - type="text" - icon="el-icon-edit" - @click="handleScoreUpdate(scope.row)" - >淇敼</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleScoreDelete(scope.row)" - >鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> - - </el-main> - </el-container> - <el-container> - <el-main> - <h2>鑰冩牳瑙勫垯</h2> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="success" - plain - icon="el-icon-edit" - size="mini" - :disabled="single" - @click="handleRuleUpdate" - >淇敼</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - :disabled="multiple" - @click="handleDelete" - >鍒犻櫎</el-button> - </el-col> - <!-- <el-col :span="1.5">--> - <!-- <el-button--> - <!-- type="warning"--> - <!-- plain--> - <!-- icon="el-icon-download"--> - <!-- size="mini"--> - <!-- @click="handleExport"--> - <!-- v-hasPermi="['system:checkRule:export']"--> - <!-- >瀵煎嚭</el-button>--> - <!-- </el-col>--> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getRuleList"></right-toolbar> - </el-row> - - <el-table v-loading="loading" :data="ruleList" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="ruleName" /> - <el-table-column label="杩愮淮绫诲埆" align="center" prop="category"> - <template slot-scope="scope"> - <div v-if="scope.row.category === 1">瑙嗛鐩戞帶</div> - <div v-else-if="scope.row.category === 2">杞﹁締璇嗗埆</div> - <div v-else-if="scope.row.category === 3">浜鸿劯璇嗗埆</div> - </template> - </el-table-column> - <el-table-column label="瑙勫垯鎻忚堪" align="center" prop="ruleDetail" /> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" /> - <el-table-column label="瀹℃牳鐘舵��" align="center" prop="auditState"> - <template slot-scope="scope"> - <dict-tag :options="dict.type.platform_audit_state" :value="scope.row.auditState"/> - </template> - </el-table-column> - <el-table-column label="瀹℃牳浜�" align="center" prop="auditUser" /> - <el-table-column label="瀹℃牳鏃堕棿" align="center" prop="auditTime" /> - <el-table-column label="瀹℃牳鎰忚" align="center" prop="auditDescription" /> - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope"> - <el-button - size="mini" - type="text" - icon="el-icon-edit" - @click="handleRuleUpdate(scope.row)" - >淇敼</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - >鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> - - <pagination - v-show="total>0" - :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" - @pagination="getRuleList" - /> - </el-main> - </el-container> - - <el-container> - <el-main> - <h2>鑰冩牳鎴愮哗</h2> - <el-collapse v-model="activeNames" @change="handleChange" > - <el-collapse-item name="1"> - <template slot="title"> - <div style="width: 10%" >鑷祦浜曞尯</div><div style="margin-left: 75%">寰楀垎:0.97</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item name="2"> - <template slot="title"> - <div style="width: 10%">璐′簳鍖�</div><div style="margin-left: 75%">寰楀垎:0.94</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="澶у畨鍖�" name="3"> - <template slot="title"> - <div style="width: 10%">澶у畨鍖�</div><div style="margin-left: 75%">寰楀垎:0.95</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="娌挎哗鍖�" name="4"> - <template slot="title"> - <div style="width: 10%">娌挎哗鍖�</div><div style="margin-left: 75%">寰楀垎:0.94</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="鑽e幙" name="5"> - <template slot="title"> - <div style="width: 10%">鑽e幙</div><div style="margin-left: 75%">寰楀垎:0.93</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="瀵岄『鍖�" name="6"> - <template slot="title"> - <div style="width: 10%">瀵岄『鍖�</div><div style="margin-left: 75%">寰楀垎:0.95</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="楂樻柊鍖�" name="7"> - <template slot="title"> - <div style="width: 10%">楂樻柊鍖�</div><div style="margin-left: 75%;">寰楀垎:0.96</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - </el-collapse> - </el-main> - </el-container> - - <!-- 娣诲姞鎴栦慨鏀硅�冩牳瑙勫垯瀵硅瘽妗� --> - <el-dialog :title="title" :visible.sync="ruleOpen" width="600px" append-to-body> - <el-form ref="form" :model="ruleForm" :rules="rules" label-width="80px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> - <el-input v-model="ruleForm.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" /> - </el-form-item> - <el-form-item label="瑙勫垯绫诲瀷" prop="category"> - <el-select v-model="ruleForm.category" placeholder="瑙勫垯绫诲瀷"> - <el-option - v-for="item in categoryList" - :key="item.id" - :label="item.value" - :value="item.id"> - </el-option> - </el-select> - </el-form-item> - <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDetail"> - <el-input v-model="ruleForm.ruleDetail" type="textarea" show-word-limit maxlength="150" placeholder="璇疯緭鍏ヨ鍒欐弿杩�"/> - </el-form-item> - <el-form-item label="鍙傛暟閰嶇疆" prop="ruleDetail"> - <div class="row-warp"> - <div class="row"> - <div class="row-left">鍙傛暟鍚�</div> - <div class="row-right">鏉′欢</div> - </div> - <div class="row"> - <div class="row-left">澶╃綉瑙嗛鐐逛綅鏁�</div> - <div class="row-right"> - <div>涓嶅皯浜�</div> - <div> - <el-input class="input-w" type="number" v-model="ruleForm.videoPointNum"/>{{" %"}} - </div> - </div> - </div> - <div class="row"> - <div class="row-left">杞﹁締鍗″彛鐐逛綅鏁�</div> - <div class="row-right"> - <div>涓嶅皯浜�</div> - <div><el-input class="input-w" type="number" v-model="ruleForm.vehicleCheckpointNum"/></div>{{" %"}} - </div> - </div> - <div class="row"> - <div class="row-left">浜鸿劯鍗″彛鐐逛綅鏁�</div> - <div class="row-right"> - <div>涓嶅皯浜�</div> - <div> - <el-input class="input-w" type="number" v-model="ruleForm.faceChceckpointNum" /></div>{{" %"}} - </div> - </div> - </div> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </el-dialog> - - <!-- 瑙勫垯璇︽儏 --> - <el-dialog title="瑙勫垯璇︽儏" :visible.sync="ruleDetailOpen" width="50%" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> - <el-input class="input" disabled v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" /> - </el-form-item> - <el-form-item label="杩愮淮鍏徃" prop="companyName"> - <el-input class="input" disabled :value ="companyName" placeholder="璇疯緭鍏ヨ繍缁村叕鍙稿悕绉�"></el-input> - </el-form-item> - <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDesc"> - <el-input class="input" disabled v-model="form.ruleDesc" placeholder="璇疯緭鍏ヨ鍒欐弿杩�" /> - </el-form-item> - <el-form-item label="瑙勫垯璁剧疆"> - <div > - <div class="line"> - <div class="line-left">鏃堕挓鍚屾锛堣秴杩嚶�3绉掍负涓嶅悎鏍硷級24灏忔椂鍐呮湭淇鐨勶細鎵i櫎鐩稿叧闀滃ご鏁伴噺*</div> - <div class="line-right"><el-input disabled v-model="jsonRule.overTime" type="text"/></div>鍒� - </div> - <div class="line"> - <div class="line-left">OSD鏍囪瘑涓嶆弧瓒炽�奊AT 751-2008 瑙嗛鍥惧儚鏂囧瓧鏍囨敞瑙勮寖銆嬶紝24灏忔椂鍐呮湭淇鐨勶細鏍囨墸闄ょ浉鍏抽暅澶存暟閲�*</div> - <div class="line-right"><el-input disabled v-model="jsonRule.failNum" type="text"/></div>鍒� - </div> - <div class="line"> - <div class="line-left">鐢ㄦ埛鎶芥锛屼竴鏈轰竴妗f暟鎹」涓嶅悎鏍硷紙鎻愪緵铏氬亣鏁版嵁鎴栭敊璇暟鎹负涓嶅悎鏍硷級锛�24灏忔椂鍐呮湭淇鐨勶細鎵i櫎鐩稿叧闀滃ご鏁伴噺*</div> - <div class="line-right"><el-input disabled v-model="jsonRule.failNum" type="text"/></div>鍒� - </div> - </div> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button @click="cancel">鍏抽棴</el-button> - </div> - </el-dialog> - - <!-- 娣诲姞鎴栦慨鏀硅�冩牳璁″垎瀵硅瘽妗� --> - <el-dialog :title="title" :visible.sync="scoreOpen" width="500px" append-to-body> - <el-form ref="form" :model="scoreForm" :rules="rules" label-width="80px"> - <el-form-item label="鍒嗗��" prop="score"> - <el-input v-model="scoreForm.score" placeholder="璇疯緭鍏ュ垎鍊�" /> - </el-form-item> - <el-form-item label="鑰冩牳鍚�" prop="examineId"> - <el-select v-model="scoreForm.examineId" placeholder="璇烽�夋嫨"> - <el-option - v-for="item in examineList" - :key="item.id" - :label="item.value" - :value="item.id"> - </el-option> - </el-select> - </el-form-item> - <el-form-item label="鑰冩牳瀵硅薄" prop="unitId"> - <el-select v-model="scoreForm.unitId" placeholder="璇烽�夋嫨"> - <el-option - v-for="item in unitList" - :key="item.id" - :label="item.value" - :value="item.id"> - </el-option> - </el-select> - </el-form-item> - <el-form-item label="鑰冩牳瑙勫垯" prop="ruleCategory"> - <el-select v-model="scoreForm.ruleCategory" placeholder="璇烽�夋嫨"> - <el-option - v-for="item in ruleCategoryList" - :key="item.id" - :label="item.value" - :value="item.id"> - </el-option> - </el-select> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </el-dialog> - </div> -</template> - -<script> -import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; -import { listCheckRule, getCheckRule, delCheckRule, addCheckRule, updateCheckRule } from "@/api/platform/check-rule"; -import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/score"; -import {unitSelect} from "../../../../api/platform/unit"; -import {publishSelect} from "../../../../api/platform/publish"; - -export default { - name: "CheckResult", - dicts: ['platform_audit_state'], - data() { - return { - activeNames: ['1'], - companyName: "鎴愰兘x杩愮淮鍏徃", - detailTitle: '', - detailOpen: false, - detail:{ - }, - examineList: [], - unitList: [ - {id:2,value: '鎴愰兘x杩愮淮'}, - {id:3,value: '鑷祦浜曞尯'}, - ], - ruleCategoryList: [ - { id: 1, value: '瑙嗛鍦ㄧ嚎鐜�' }, - { id: 2, value: '瀛樺偍鏁呴殰' }, - { id: 3, value: '瑙嗗浘搴撳鎺ョǔ瀹氭��' }, - { id: 4, value: '涓�鏈轰竴妗�24灏忔椂鏈慨澶�' }, - { id: 5, value: '鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�' }, - ], - tableData: [{ - name: '瑙嗛骞冲潎鍦ㄧ嚎鐜�', - content: '97%', - score: '-5' - }, { - name: '涓�鏈轰竴妗�24灏忔椂鏈慨澶�', - content: '5涓�', - score: '-0.5' - }, { - name: '瀛樺偍鏁呴殰', - content: '5灏忔椂', - score: '-0.3' - }, { - name: '鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�', - content: '3涓�', - score: '-0.5' - }], - // 杩愮淮绫诲瀷 - categoryList: [ - { id: 1, value: '瑙嗛鐩戞帶' }, - { id: 2, value: '杞﹁締璇嗗埆' }, - { id: 3, value: '浜鸿劯璇嗗埆' }, - ], - manualScoreOpen: false, - manualScoreForm: {}, - manualScoreTitle: '', - // 閬僵灞� - loading: true, - // 閫変腑鏁扮粍 - ids: [], - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, - // 鏄剧ず鎼滅储鏉′欢 - showSearch: true, - // 鎬绘潯鏁� - total: 0, - // 鑰冩牳缁撴灉琛ㄦ牸鏁版嵁 - checkResultList: [], - // 寮瑰嚭灞傛爣棰� - title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - scoreOpen: false, - ruleOpen: false, - ruleDetailOpen: false, - // 閫昏緫鍒犻櫎鏃堕棿鑼冨洿 - daterangeCheckTime: [], - // 琛ㄥ崟鍙傛暟 - form: {}, - scoreForm: {}, - ruleForm: {}, - jsonRule: {}, - // 鑰冩牳瑙勫垯鍒楄〃 - ruleList: [], - // 鑰冩牳璁″垎琛ㄦ牸鏁版嵁 - scoreList: [], - //杩濈害瑙勫垯璇锋眰鍙傛暟 - queryParams: { - pageNum: 1, - pageSize: 10, - ruleName: null, - ruleStatus: null, - createTime: null, - }, - //鑰冩牳鍒嗘暟璇锋眰鍙傛暟 - scoreQueryParams: { - pageNum: 1, - pageSize: 10, - examineCategory: 1, - }, - // 琛ㄥ崟鏍¢獙 - rules: { - } - }; - }, - created() { - //鑰冩牳鎴愮哗璇︽儏璺宠浆鍙傛暟鎺ユ敹 - if(this.$route.query.detail){ - this.detail = this.$route.query.detail - console.log(this.$route.query.detail,"detail------------") - } - // 鑰冩牳瑙勫垯鍒楄〃 - this.getRuleList(); - // 鑰冩牳绉垎鍒楄〃 - this.getScoreList(); - // this.selectUnit(); - this.selectExamine(); - }, - methods: { - handleChange(val) { - console.log(val); - }, - // 杩愮淮鍏徃涓嬫媺鏁版嵁 - // selectUnit() { - // unitSelect().then(res => { - // this.unitList = res.data; - // }) - // }, - // 鑰冩牳涓嬫媺鏁版嵁 - selectExamine() { - publishSelect().then(res => { - this.examineList = res.data; - }) - }, - /** 鏌ヨ鑰冩牳璁″垎鍒楄〃 */ - getScoreList() { - this.loading = true; - listScore(this.scoreQueryParams).then(response => { - this.scoreList = response.rows; - this.loading = false; - }); - }, - /** 鏌ヨ杩濈害瑙勫垯鍒楄〃 */ - getRuleList() { - this.loading = true; - if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) { - this.queryParams["start"] = this.daterangeCreateTime[0]; - this.queryParams["end"] = this.daterangeCreateTime[1]; - } - listCheckRule(this.queryParams).then(response => { - this.ruleList = response.data; - this.total = response.total; - this.loading = false; - }); - }, - frequencyFormatter(row) { - if (row.frequency === "1") { - return "鏈堝害鑰冩牳" - } - if (row.frequency === "2") { - return "瀛e害鑰冩牳" - } - }, - examineRangeFormatter(row) { - if (row.examineRange === "1") { - return "鍒嗗眬鑰冩牳" - } - if (row.examineRange === "2") { - return "甯傚眬鑰冩牳" - } - }, - /** 鏌ヨ鑰冩牳缁撴灉鍒楄〃 */ - getCheckResult() { - this.loading = true; - getCheckResult(id).then(response => { - this.detail = response.data; - this.loading = false; - }); - }, - // 鍙栨秷鎸夐挳 - cancel() { - this.scoreOpen = false; - this.ruleOpen = false; - this.ruleDetailOpen = false; - this.ruleDetailOpen = false; - this.reset(); - }, - // 琛ㄥ崟閲嶇疆 - reset() { - this.form = { - id: null, - checkUnitId: null, - checkPublishId: null, - checkScore: null, - systemScore: null, - manualScore: null, - checkTime: null, - createTime: null, - updateTime: null, - deleted: null - }; - this.resetForm("form"); - }, - cancelManualScore() { - this.manualScoreForm = {}; - this.manualScoreTitle = ""; - this.manualScoreOpen = false; - }, - submitManualScore() { - if (! this.manualScoreForm.manualScore) { - this.$modal.msgWarning("璇峰~鍐欏垎鏁�"); - return - } - manualScore(this.manualScoreForm).then(res => { - this.$modal.msgSuccess("鎿嶄綔鎴愬姛"); - this.cancelManualScore(); - this.getList(); - }) - }, - handleSetManualScore(row) { - this.manualScoreForm.id = row.id; - this.manualScoreForm.manualScore = parseInt(row.manualScore); - this.manualScoreTitle = row.checkUnitName + '浜哄伐鎵撳垎' - this.manualScoreOpen = true; - }, - - handlePublish(row) { - let text = row.publish == 1 ? '鍙栨秷鍙戝竷' : '鍙戝竷'; - const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭' + text + '鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return publishCheckResult(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess(text + "鎴愬姛"); - }).catch(() => {}); - - }, - /** 鎼滅储鎸夐挳鎿嶄綔 */ - handleQuery() { - this.queryParams.pageNum = 1; - this.getList(); - }, - /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { - this.daterangeCheckTime = []; - this.resetForm("queryForm"); - this.handleQuery(); - }, - // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - this.ids = selection.map(item => item.id) - this.single = selection.length!==1 - this.multiple = !selection.length - }, - /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { - this.reset(); - this.open = true; - this.title = "娣诲姞鑰冩牳缁撴灉"; - }, - /** 淇敼绉垎鎸夐挳鎿嶄綔 */ - handleScoreUpdate(row) { - this.reset(); - const id = row.id || this.ids - getScore(id).then(response => { - this.scoreForm = response.data; - this.scoreOpen = true; - this.title = "淇敼鑰冩牳璁″垎"; - }); - }, - /** 淇敼鎸夐挳鎿嶄綔 */ - handleRuleUpdate(row) { - this.reset(); - const id = row.id || this.ids - getCheckRule(id).then(response => { - this.ruleForm = response.data; - this.ruleOpen = true; - this.title = "淇敼鑰冩牳瑙勫垯"; - - }); - }, - // 璇︽儏鎸夐挳 - handleRuleDetail(row) { - this.ruleDetailOpen = true; - this.form = row; - this.jsonRule = JSON.parse(this.form.ruleDetail); - }, - /** 鎻愪氦鎸夐挳 */ - submitForm() { - this.$refs["form"].validate(valid => { - if (valid) { - if (this.form.id != null) { - updateCheckResult(this.form).then(response => { - this.$modal.msgSuccess("淇敼鎴愬姛"); - this.open = false; - this.getList(); - }); - } else { - addCheckResult(this.form).then(response => { - this.$modal.msgSuccess("鏂板鎴愬姛"); - this.open = false; - this.getList(); - }); - } - } - }); - }, - /** 鍒犻櫎鎸夐挳鎿嶄綔 */ - handleDelete(row) { - const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return delCheckResult(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); - }, - /** 瀵煎嚭鎸夐挳鎿嶄綔 */ - handleExport() { - this.download('system/checkResult/export', { - ...this.queryParams - }, `checkResult_${new Date().getTime()}.xlsx`) - } - } -}; -</script> -<style scoped> - -.line { - display: flex; - flex-direction: row; - justify-content: flex-start; - align-items: center; -} - -.line-right { - width: 50px; -} -.input{ - width: 200px; -} - -.input-w { - margin-left: 5px; - width: 70px; -} -.row-warp { - display: flex; - flex-direction: column; - justify-content: center; - text-align: center; - border: solid 1px gray; - /*padding: 3px;*/ -} -.row { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - border-bottom: solid 1px gray; - padding: 3px; -} -.row:last-of-type { - border-bottom: none; -} -.row-left { - flex: 2; - border-right: solid 1px gray; -} -.row-right { - flex: 4; - display: flex; - flex-direction: row; - justify-content: center; -} -</style> diff --git a/src/views/system/check-result/province/index.vue b/src/views/system/check-result/province/index.vue deleted file mode 100644 index 26b7b80..0000000 --- a/src/views/system/check-result/province/index.vue +++ /dev/null @@ -1,471 +0,0 @@ -<template> - <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> - <el-form-item label="鑰冩牳瀵硅薄" prop="checkUnitId"> - <el-input - v-model="queryParams.checkUnitName" - placeholder="璇疯緭鍏ヨ�冩牳瀵硅薄" - clearable - @clear="handleQuery" - @keyup.enter.native="handleQuery" - /> - </el-form-item> - <el-form-item label="鑰冩牳棰戠巼" prop="frequency"> - <el-select v-model="queryParams.frequency" clearable @clear="handleQuery" placeholder="鑰冩牳棰戠巼"> - <el-option - label="鏈堝害鑰冩牳" - value="1"> - </el-option> - <el-option - label="瀛e害鑰冩牳" - value="2"> - </el-option> - </el-select> - </el-form-item> - <el-form-item label="鑰冩牳鑼冨洿" prop="examineRange"> - <el-select v-model="queryParams.examineRange" clearable @clear="handleQuery" placeholder="鑰冩牳鑼冨洿"> - <el-option - label="甯傚眬鑰冩牳" - value="2"> - </el-option> - <el-option - label="鍒嗗眬鑰冩牳" - value="1"> - </el-option> - </el-select> - </el-form-item> - <el-form-item label="鑰冩牳鏃堕棿"> - <el-date-picker - v-model="daterangeCheckTime" - style="width: 240px" - value-format="yyyy-MM-dd HH:mm:ss" - type="daterange" - range-separator="-" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - ></el-date-picker> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - :disabled="multiple" - @click="handleDelete" - >鍒犻櫎</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="el-icon-download" - size="mini" - @click="handleExport" - >瀵煎嚭</el-button> - </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> - </el-row> - - <el-card class="box-card" v-for="(item) in checkResultList"> - <div slot="header" class="clearfix"> - <span>{{ "杞﹁締鑰冩牳" }}</span> - <el-button style="float: right; padding: 3px 0" type="text" @click="handleDetail(item)">璇︽儏</el-button> - </div> - <div class="text item">鑰冩牳鏍囩<span class="time">{{ "鍥涘尯澶╃綉浜屾湡" }}</span></div> - <div class="text item">鑰冩牳鑼冨洿<span class="time">{{ "甯傚尯鑰冩牳" }}</span></div> - <div class="text item">鑰冩牳棰戠巼<span class="time">{{ "瀛e害" }}</span></div> - <div class="text item">鑰冩牳鏃堕棿 - <span class="time">{{ item.checkTime }}</span> - <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish != 1" v-hasPermi="['result:city:publish']">纭鍙戝竷</el-button> - <el-button size="small" round style="float: right;" v-show="item.publish == 1" disabled="true" v-hasPermi="['result:city:publish']">宸插彂甯�</el-button> - </div> - </el-card> - - <!-- <pagination - v-show="total>0" - :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" - @pagination="getList" - /> --> - - <el-dialog :title="detailName" :visible.sync="detail" width="800px" append-to-body> - <el-form label-position="left" inline class="table-expand"> - <el-collapse v-model="activeNames" @change="handleChange"> - <el-collapse-item name="1"> - <template slot="title"> - <div style="width: 10%">鑷祦浜曞尯</div><div style="margin-left: 75%">寰楀垎:0.97</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item name="2"> - <template slot="title"> - <div style="width: 10%">璐′簳鍖�</div><div style="margin-left: 75%">寰楀垎:0.94</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="澶у畨鍖�" name="3"> - <template slot="title"> - <div style="width: 10%">澶у畨鍖�</div><div style="margin-left: 75%">寰楀垎:0.95</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="娌挎哗鍖�" name="4"> - <template slot="title"> - <div style="width: 10%">娌挎哗鍖�</div><div style="margin-left: 75%">寰楀垎:0.94</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="鑽e幙" name="5"> - <template slot="title"> - <div style="width: 10%">鑽e幙</div><div style="margin-left: 75%">寰楀垎:0.93</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="瀵岄『鍖�" name="6"> - <template slot="title"> - <div style="width: 10%">瀵岄『鍖�</div><div style="margin-left: 75%">寰楀垎:0.95</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - <el-collapse-item title="楂樻柊鍖�" name="7"> - <template slot="title"> - <div style="width: 10%">楂樻柊鍖�</div><div style="margin-left: 75%;">寰楀垎:0.96</div> - </template> - <div>瑙嗗浘搴撳鎺ョǔ瀹氭��:95.32%</div> - <div>鐐逛綅鍦ㄧ嚎鐜�:96.46%</div> - <div>鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼:97.26%</div> - <div>杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�:92.33%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�:94.26%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�:94.78%</div> - <div>杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�:93.98%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�:95.86%</div> - <div>杞﹁締鍗″彛璁惧url鍙敤鎬�:94.56%</div> - <div>杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�:91.77%</div> - </el-collapse-item> - </el-collapse> - </el-form> - </el-dialog> - - <!-- 娣诲姞鎴栦慨鏀硅�冩牳缁撴灉瀵硅瘽妗� --> - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </el-dialog> - </div> -</template> - -<script> -import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; - -export default { - name: "CheckResult", - data() { - return { - detailTitle: '', - detailOpen: false, - // 鏄惁鏄剧ず璇︽儏 - detail: false, - // 璇︽儏鏍囬 - detailName: "鑰冩牳缁撴灉", - activeNames: ['1'], - manualScoreOpen: false, - manualScoreForm: {}, - manualScoreTitle: '', - // 閬僵灞� - loading: true, - // 閫変腑鏁扮粍 - ids: [], - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, - // 鏄剧ず鎼滅储鏉′欢 - showSearch: true, - // 鎬绘潯鏁� - total: 0, - // 鑰冩牳缁撴灉琛ㄦ牸鏁版嵁 - checkResultList: [], - // 寮瑰嚭灞傛爣棰� - title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, - // 閫昏緫鍒犻櫎鏃堕棿鑼冨洿 - daterangeCheckTime: [], - // 鏌ヨ鍙傛暟 - queryParams: { - pageNum: 1, - pageSize: 10, - checkUnitId: null, - checkTime: null, - }, - // 琛ㄥ崟鍙傛暟 - form: {}, - // 琛ㄥ崟鏍¢獙 - rules: { - } - }; - }, - created() { - this.getList(); - }, - methods: { - handleChange(val) { - console.log(val); - }, - frequencyFormatter(row) { - if (row.frequency === "1") { - return "鏈堝害鑰冩牳" - } - if (row.frequency === "2") { - return "瀛e害鑰冩牳" - } - }, - examineRangeFormatter(row) { - if (row.examineRange === "1") { - return "鍒嗗眬鑰冩牳" - } - if (row.examineRange === "2") { - return "甯傚眬鑰冩牳" - } - }, - /** 鏌ヨ鑰冩牳缁撴灉鍒楄〃 */ - getList() { - this.loading = true; - if (null != this.daterangeCheckTime && '' != this.daterangeCheckTime) { - this.queryParams["start"] = this.daterangeCheckTime[0]; - this.queryParams["end"] = this.daterangeCheckTime[1]; - } - listCheckResult(this.queryParams).then(response => { - this.checkResultList = response.data; - this.total = response.total; - this.loading = false; - }); - }, - // 鍙栨秷鎸夐挳 - cancel() { - this.open = false; - this.reset(); - }, - // 琛ㄥ崟閲嶇疆 - reset() { - this.form = { - id: null, - checkUnitId: null, - checkPublishId: null, - checkScore: null, - systemScore: null, - manualScore: null, - checkTime: null, - createTime: null, - updateTime: null, - deleted: null - }; - this.resetForm("form"); - }, - cancelManualScore() { - this.manualScoreForm = {}; - this.manualScoreTitle = ""; - this.manualScoreOpen = false; - }, - submitManualScore() { - if (! this.manualScoreForm.manualScore) { - this.$modal.msgWarning("璇峰~鍐欏垎鏁�"); - return - } - manualScore(this.manualScoreForm).then(res => { - this.$modal.msgSuccess("鎿嶄綔鎴愬姛"); - this.cancelManualScore(); - this.getList(); - }) - }, - handleSetManualScore(row) { - this.manualScoreForm.id = row.id; - this.manualScoreForm.manualScore = parseInt(row.manualScore); - this.manualScoreTitle = row.checkUnitName + '浜哄伐鎵撳垎' - this.manualScoreOpen = true; - }, - handleDetail(item) { - this.detail = item; - this.detail.carOnlineRate = '97%'; - console.log(this.detail,"detail") - this.$router.push({ - path: '/check-result/province/detail', - query: { - detail: this.detail - } - }) - }, - handlePublish(row) { - const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍙戝竷鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return publishCheckResult(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("鍙戝竷鎴愬姛"); - }).catch(() => {}); - - }, - /** 鎼滅储鎸夐挳鎿嶄綔 */ - handleQuery() { - this.queryParams.pageNum = 1; - this.getList(); - }, - /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { - this.daterangeCheckTime = []; - this.resetForm("queryForm"); - this.handleQuery(); - }, - // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - this.ids = selection.map(item => item.id) - this.single = selection.length!==1 - this.multiple = !selection.length - }, - /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { - this.reset(); - this.open = true; - this.title = "娣诲姞鑰冩牳缁撴灉"; - }, - /** 淇敼鎸夐挳鎿嶄綔 */ - handleUpdate(row) { - this.reset(); - const id = row.id || this.ids - getCheckResult(id).then(response => { - this.form = response.data; - this.open = true; - this.title = "淇敼鑰冩牳缁撴灉"; - }); - }, - /** 鎻愪氦鎸夐挳 */ - submitForm() { - this.$refs["form"].validate(valid => { - if (valid) { - if (this.form.id != null) { - updateCheckResult(this.form).then(response => { - this.$modal.msgSuccess("淇敼鎴愬姛"); - this.open = false; - this.getList(); - }); - } else { - addCheckResult(this.form).then(response => { - this.$modal.msgSuccess("鏂板鎴愬姛"); - this.open = false; - this.getList(); - }); - } - } - }); - }, - /** 鍒犻櫎鎸夐挳鎿嶄綔 */ - handleDelete(row) { - const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return delCheckResult(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); - }, - /** 瀵煎嚭鎸夐挳鎿嶄綔 */ - handleExport() { - this.download('system/checkResult/export', { - ...this.queryParams - }, `checkResult_${new Date().getTime()}.xlsx`) - } - } -}; -</script> -<style> - .text { - font-size: 14px; - } - .time { - font-size: 13px; - color: #999; - margin-left: 10px; - } - .item { - margin-bottom: 18px; - } - .clearfix:before, - .clearfix:after { - display: table; - content: ""; - } - .clearfix:after { - clear: both - } - .box-card { - width: 480px; - } - -</style> diff --git a/src/views/system/check-rule/index.vue b/src/views/system/check-rule/index.vue deleted file mode 100644 index e507099..0000000 --- a/src/views/system/check-rule/index.vue +++ /dev/null @@ -1,457 +0,0 @@ -<template> - <div class="app-container"> - - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> - <el-input - v-model="queryParams.ruleName" - placeholder="璇疯緭鍏ヨ鍒欏悕绉�" - clearable - @clear="handleQuery" - @keyup.enter.native="handleQuery" - /> - </el-form-item> - <el-form-item label="鍒涘缓鏃堕棿" prop="createTime"> - <el-date-picker - v-model="daterangeCreateTime" - style="width: 240px" - value-format="yyyy-MM-dd HH:mm:ss" - type="daterange" - range-separator="-" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - /> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="success" - plain - icon="el-icon-edit" - size="mini" - :disabled="single" - @click="handleUpdate" - >淇敼</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - :disabled="multiple" - @click="handleDelete" - >鍒犻櫎</el-button> - </el-col> -<!-- <el-col :span="1.5">--> -<!-- <el-button--> -<!-- type="warning"--> -<!-- plain--> -<!-- icon="el-icon-download"--> -<!-- size="mini"--> -<!-- @click="handleExport"--> -<!-- v-hasPermi="['system:checkRule:export']"--> -<!-- >瀵煎嚭</el-button>--> -<!-- </el-col>--> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> - </el-row> - - <el-table v-loading="loading" :data="checkRuleList" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="ruleName" /> - <el-table-column label="杩愮淮绫诲埆" align="center" prop="category"> - <template slot-scope="scope"> - <div v-if="scope.row.category === 1">瑙嗛鐩戞帶</div> - <div v-else-if="scope.row.category === 2">杞﹁締璇嗗埆</div> - <div v-else-if="scope.row.category === 3">浜鸿劯璇嗗埆</div> - </template> - </el-table-column> - <el-table-column label="瑙勫垯鎻忚堪" align="center" prop="ruleDetail" /> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" /> - <el-table-column label="瀹℃牳鐘舵��" align="center" prop="auditState"> - <template slot-scope="scope"> - <dict-tag :options="dict.type.platform_audit_state" :value="scope.row.auditState"/> - </template> - </el-table-column> - <el-table-column label="瀹℃牳浜�" align="center" prop="auditUser" /> - <el-table-column label="瀹℃牳鏃堕棿" align="center" prop="auditTime" /> - <el-table-column label="瀹℃牳鎰忚" align="center" prop="auditDescription" /> - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope"> - <el-button - size="mini" - type="text" - icon="el-icon-s-check" - @click="handleAudit(scope.row)" - v-hasPermi="['check:rule:audit']" - >瀹℃牳</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-edit" - @click="handleUpdate(scope.row)" - >淇敼</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - >鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> - - <pagination - v-show="total>0" - :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" - @pagination="getList" - /> - <div> - <!-- 娣诲姞鎴栦慨鏀硅�冩牳瑙勫垯瀵硅瘽妗� --> - <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> - <el-input v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" /> - </el-form-item> - <el-form-item label="瑙勫垯绫诲瀷" prop="category"> - <el-select v-model="form.category" placeholder="瑙勫垯绫诲瀷"> - <el-option - v-for="item in categoryList" - :key="item.id" - :label="item.value" - :value="item.id"> - </el-option> - </el-select> - </el-form-item> - <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDetail"> - <el-input v-model="form.ruleDetail" type="textarea" show-word-limit maxlength="150" placeholder="璇疯緭鍏ヨ鍒欐弿杩�"/> - </el-form-item> - <el-form-item label="鍙傛暟閰嶇疆" prop="ruleDetail"> - <div class="row-warp"> - <div class="row"> - <div class="row-left">鍙傛暟鍚�</div> - <div class="row-right">鏉′欢</div> - </div> - <div class="row"> - <div class="row-left">澶╃綉瑙嗛鐐逛綅鏁�</div> - <div class="row-right"> - <div>涓嶅皯浜�</div> - <div> - <el-input class="input-w" type="number" v-model="form.videoPointNum"/>{{" %"}} - </div> - </div> - </div> - <div class="row"> - <div class="row-left">杞﹁締鍗″彛鐐逛綅鏁�</div> - <div class="row-right"> - <div>涓嶅皯浜�</div> - <div><el-input class="input-w" type="number" v-model="form.vehicleCheckpointNum"/></div>{{" %"}} - </div> - </div> - <div class="row"> - <div class="row-left">浜鸿劯鍗″彛鐐逛綅鏁�</div> - <div class="row-right"> - <div>涓嶅皯浜�</div> - <div> - <el-input class="input-w" type="number" v-model="form.faceChceckpointNum" /></div>{{" %"}} - </div> - </div> - </div> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </el-dialog> - </div> - - <!-- 瀹℃牳鑰冩牳瑙勫垯瀵硅瘽妗� --> - <el-dialog :title="title" :visible.sync="auditOpen" width="600px" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> - <el-input v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" disabled/> - </el-form-item> - <el-form-item label="瑙勫垯绫诲瀷" prop="category"> - <el-select v-model="form.category" placeholder="瑙勫垯绫诲瀷" disabled> - <el-option - v-for="item in categoryList" - :key="item.id" - :label="item.value" - :value="item.id"> - </el-option> - </el-select> - </el-form-item> - <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDetail"> - <el-input v-model="form.ruleDetail" type="textarea" show-word-limit maxlength="150" placeholder="璇疯緭鍏ヨ鍒欐弿杩�" disabled/> - </el-form-item> - <el-form-item label="鍙傛暟閰嶇疆" prop="ruleDetail" disabled> - <div class="row-warp"> - <div class="row"> - <div class="row-left">鍙傛暟鍚�</div> - <div class="row-right">鏉′欢</div> - </div> - <div class="row"> - <div class="row-left">澶╃綉瑙嗛鐐逛綅鏁�</div> - <div class="row-right"> - <div>涓嶅皯浜�</div> - <div> - <el-input class="input-w" type="number" v-model="form.videoPointNum" disabled/> - </div> - </div> - </div> - <div class="row"> - <div class="row-left">杞﹁締鍗″彛鐐逛綅鏁�</div> - <div class="row-right"> - <div>涓嶅皯浜�</div> - <div><el-input class="input-w" type="number" v-model="form.vehicleCheckpointNum" disabled/></div> - </div> - </div> - <div class="row"> - <div class="row-left">浜鸿劯鍗″彛鐐逛綅鏁�</div> - <div class="row-right"> - <div>涓嶅皯浜�</div> - <div> - <el-input class="input-w" type="number" v-model="form.faceChceckpointNum" disabled/></div> - </div> - </div> - </div> - </el-form-item> - <el-form-item label="瀹℃牳缁撴灉" prop="auditState" > - <el-radio-group v-model="form.auditState"> - <el-radio :label="1">閫氳繃</el-radio> - <el-radio :label="2">椹冲洖</el-radio> - </el-radio-group> - </el-form-item> - <el-form-item label="瀹℃牳璇存槑" prop="auditDescription" > - <el-input v-model="form.auditDescription" type="textarea" show-word-limit maxlength="100" /> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </el-dialog> - - </div> -</template> - -<script> -import { listCheckRule, getCheckRule, delCheckRule, addCheckRule, updateCheckRule } from "@/api/platform/check-rule"; - -export default { - name: "CheckRule", - dicts: ['platform_audit_state'], - data() { - return { - // 閬僵灞� - loading: true, - // 閫変腑鏁扮粍 - ids: [], - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, - // 鏄剧ず鎼滅储鏉′欢 - showSearch: true, - // 鎬绘潯鏁� - total: 0, - // 杩愮淮绫诲瀷 - categoryList: [ - { id: 1, value: '瑙嗛鐩戞帶' }, - { id: 2, value: '杞﹁締璇嗗埆' }, - { id: 3, value: '浜鸿劯璇嗗埆' }, - ], - // 鑰冩牳瑙勫垯琛ㄦ牸鏁版嵁 - checkRuleList: [], - daterangeCreateTime: [], - // 寮瑰嚭灞傛爣棰� - title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, - // 鏄惁鏄剧ず寮瑰嚭灞� - auditOpen: false, - // 鏌ヨ鍙傛暟 - queryParams: { - pageNum: 1, - pageSize: 10, - ruleName: null, - createTime: null, - }, - // 琛ㄥ崟鍙傛暟 - form: {}, - // 琛ㄥ崟鏍¢獙 - rules: { - ruleName: [ - { required: true, message: "瑙勫垯鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } - ], - } - }; - }, - created() { - this.getList(); - }, - methods: { - /** 鏌ヨ鑰冩牳瑙勫垯鍒楄〃 */ - getList() { - this.loading = true; - if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) { - this.queryParams["start"] = this.daterangeCreateTime[0]; - this.queryParams["end"] = this.daterangeCreateTime[1]; - } - listCheckRule(this.queryParams).then(response => { - this.checkRuleList = response.data; - this.total = response.total; - this.loading = false; - }); - }, - // 鍙栨秷鎸夐挳 - cancel() { - this.open = false; - this.auditOpen = false; - this.reset(); - }, - // 琛ㄥ崟閲嶇疆 - reset() { - this.form = { - id: null, - ruleName: null, - ruleDetail: null, - videoPointNum: null, - vehicleCheckpointNum: null, - faceChceckpointNum: null, - createTime: null, - updateTime: null, - deleted: null - }; - this.resetForm("form"); - }, - /** 鎼滅储鎸夐挳鎿嶄綔 */ - handleQuery() { - this.queryParams.pageNum = 1; - this.getList(); - }, - /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { - this.resetForm("queryForm"); - this.handleQuery(); - }, - // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - this.ids = selection.map(item => item.id) - this.single = selection.length!==1 - this.multiple = !selection.length - }, - /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { - this.reset(); - this.open = true; - this.title = "娣诲姞鑰冩牳瑙勫垯"; - }, - /** 淇敼鎸夐挳鎿嶄綔 */ - handleUpdate(row) { - this.reset(); - const id = row.id || this.ids - getCheckRule(id).then(response => { - this.form = response.data; - this.open = true; - this.title = "淇敼鑰冩牳瑙勫垯"; - - }); - }, - /** 瀹℃牳鎸夐挳鎿嶄綔 */ - handleAudit(row) { - this.reset(); - const id = row.id || this.ids - getCheckRule(id).then(response => { - this.form = response.data; - this.auditOpen = true; - this.title = "瀹℃牳鑰冩牳瑙勫垯"; - }); - }, - /** 鎻愪氦鎸夐挳 */ - submitForm() { - this.$refs["form"].validate(valid => { - if (valid) { - if (this.form.id != null) { - updateCheckRule(this.form).then(response => { - this.$modal.msgSuccess("淇敼鎴愬姛"); - this.open = false; - this.auditOpen = false; - this.getList(); - }); - } else { - addCheckRule(this.form).then(response => { - this.$modal.msgSuccess("鏂板鎴愬姛"); - this.open = false; - this.auditOpen = false; - this.getList(); - }); - } - } - }); - }, - /** 鍒犻櫎鎸夐挳鎿嶄綔 */ - handleDelete(row) { - const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎鑰冩牳瑙勫垯缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return delCheckRule(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); - }, - - /** 瀵煎嚭鎸夐挳鎿嶄綔 */ - handleExport() { - this.download('system/checkRule/export', { - ...this.queryParams - }, `checkRule_${new Date().getTime()}.xlsx`) - } - } -}; -</script> - -<style scoped> -.input-w { - margin-left: 5px; - width: 70px; -} -.row-warp { - display: flex; - flex-direction: column; - justify-content: center; - text-align: center; - border: solid 1px gray; - /*padding: 3px;*/ -} -.row { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - border-bottom: solid 1px gray; - padding: 3px; -} -.row:last-of-type { - border-bottom: none; -} -.row-left { - flex: 2; - border-right: solid 1px gray; -} -.row-right { - flex: 4; - display: flex; - flex-direction: row; - justify-content: center; -} -</style> diff --git a/src/views/system/contract/index.vue b/src/views/system/contract/index.vue index 27ccd9f..86713ae 100644 --- a/src/views/system/contract/index.vue +++ b/src/views/system/contract/index.vue @@ -27,26 +27,15 @@ @click="handleAdd" >鏂板</el-button> </el-col> - <!-- <el-col :span="1.5"> + <el-col :span="1.5"> <el-button - type="success" + type="warning" plain - icon="el-icon-edit" + icon="el-icon-top" size="mini" - :disabled="single" - @click="handleUpdate" - >淇敼</el-button> - </el-col> --> - <!-- <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - :disabled="multiple" - @click="handleDelete" - >鍒犻櫎</el-button> - </el-col> --> + @click="handleImportPoint" + >瀵煎叆</el-button> + </el-col> </el-row> diff --git a/src/views/system/data-manage/index.vue b/src/views/system/data-manage/index.vue index 103baba..c4268bc 100644 --- a/src/views/system/data-manage/index.vue +++ b/src/views/system/data-manage/index.vue @@ -89,6 +89,26 @@ </el-col> </el-row> </div> + + <div class="container"> + <el-row type="flex" justify="center"> + <el-col :span="24"> + <h3 style="color: rgb(104,104,103);padding-top: 20px;padding-bottom: 20px;">璧勪骇绠$悊</h3> + </el-col> + </el-row> + + <el-row type="flex" justify="center"> + <el-col :span="6" v-for="(item, index) in equipment" :key="index"> + <el-link @click="handleDetail(item)" :style="item.name == '' ? 'display:none' : ''"> + <el-card style="width:150px;height: 150px;text-align: center;"> + <i style="font-size: 40px;padding: 15px;" :class="item.icon"></i> + <div>{{ item.name }}</div> + </el-card> + </el-link> + </el-col> + </el-row> + <br/> + </div> <br/><br/><br/><br/> </div> </template> @@ -144,6 +164,14 @@ { name: '', icon: 'el-icon-timer', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, { name: '', icon: 'el-icon-money', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, { name: '', icon: 'el-icon-data-analysis', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, + ], + equipment: [ + { name: '璧勪骇绠$悊', icon: 'el-icon-wallet', description: '鎻忚堪淇℃伅', routerUrl: '/car/equipment/index' }, + { name: '', icon: 'el-icon-pie-chart', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, + { name: '', icon: 'el-icon-data-line', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, + { name: '', icon: 'el-icon-timer', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, + { name: '', icon: 'el-icon-money', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, + { name: '', icon: 'el-icon-data-analysis', description: '鎻忚堪淇℃伅', routerUrl: '/car/vehicle-data-monitor/index' }, ] } }, diff --git a/src/views/system/default-rule/index.vue b/src/views/system/default-rule/index.vue deleted file mode 100644 index ebd70e4..0000000 --- a/src/views/system/default-rule/index.vue +++ /dev/null @@ -1,405 +0,0 @@ -<template> - <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> - <el-input - v-model="queryParams.ruleName" - placeholder="璇疯緭鍏ヨ鍒欏悕绉�" - clearable - @clear="handleQuery" - @keyup.enter.native="handleQuery" - /> - </el-form-item> - <el-form-item label="鍒涘缓鏃堕棿"> - <el-date-picker - v-model="daterangeCreateTime" - style="width: 240px" - value-format="yyyy-MM-dd HH:mm:ss" - type="daterange" - range-separator="-" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - ></el-date-picker> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="primary" - plain - icon="el-icon-plus" - size="mini" - @click="handleAdd" - >鏂板</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="success" - plain - icon="el-icon-edit" - size="mini" - :disabled="single" - @click="handleUpdate" - >淇敼</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - :disabled="multiple" - @click="handleDelete" - >鍒犻櫎</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="el-icon-download" - size="mini" - @click="handleExport" - v-hasPermi="['system:rule:export']" - >瀵煎嚭</el-button> - </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> - </el-row> - - <el-table v-loading="loading" :data="ruleList" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="ruleName" /> - <el-table-column label="杩愮淮鍏徃" align="center" prop="companyName" > - {{'鎴愰兘x杩愮淮鍏徃'}} - </el-table-column> - <el-table-column label="瑙勫垯鎻忚堪" align="center" prop="ruleDesc" /> - <el-table-column label="瑙勫垯鐘舵��" align="center" prop="ruleStatus" /> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180"> - <template slot-scope="scope"> - <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> - </template> - </el-table-column> - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope"> - <el-button - v-if="scope.row.ruleStatus === '鏈惎鐢�'" - size="mini" - type="text" - icon="el-icon-zoom-in" - @click="handleUse(scope.row.id, true)" - >鍚敤</el-button> - <el-button - v-else - size="mini" - type="text" - icon="el-icon-zoom-in" - @click="handleUse(scope.row.id, false)" - >鍋滅敤</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-zoom-in" - @click="handleDetail(scope.row)" - >璇︽儏</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-edit" - @click="handleUpdate(scope.row)" - >淇敼</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - >鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> - - <pagination - v-show="total>0" - :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" - @pagination="getList" - /> - - <!-- 瑙勫垯璇︽儏 --> - <el-dialog title="瑙勫垯璇︽儏" :visible.sync="detailOpen" width="50%" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> - <el-input class="input" disabled v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" /> - </el-form-item> - <el-form-item label="杩愮淮鍏徃" prop="companyName"> - <el-input class="input" disabled :value ="companyName" placeholder="璇疯緭鍏ヨ繍缁村叕鍙稿悕绉�"></el-input> - </el-form-item> - <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDesc"> - <el-input class="input" disabled v-model="form.ruleDesc" placeholder="璇疯緭鍏ヨ鍒欐弿杩�" /> - </el-form-item> - <el-form-item label="瑙勫垯璁剧疆"> - <div > - <div class="line"> - <div class="line-left">鏃堕挓鍚屾锛堣秴杩嚶�3绉掍负涓嶅悎鏍硷級24灏忔椂鍐呮湭淇鐨勶細鎵i櫎鐩稿叧闀滃ご鏁伴噺*</div> - <div class="line-right"><el-input disabled v-model="jsonRule.overTime" type="text"/></div>鍒� - </div> - <div class="line"> - <div class="line-left">OSD鏍囪瘑涓嶆弧瓒炽�奊AT 751-2008 瑙嗛鍥惧儚鏂囧瓧鏍囨敞瑙勮寖銆嬶紝24灏忔椂鍐呮湭淇鐨勶細鏍囨墸闄ょ浉鍏抽暅澶存暟閲�*</div> - <div class="line-right"><el-input disabled v-model="jsonRule.failNum" type="text"/></div>鍒� - </div> - <div class="line"> - <div class="line-left">鐢ㄦ埛鎶芥锛屼竴鏈轰竴妗f暟鎹」涓嶅悎鏍硷紙鎻愪緵铏氬亣鏁版嵁鎴栭敊璇暟鎹负涓嶅悎鏍硷級锛�24灏忔椂鍐呮湭淇鐨勶細鎵i櫎鐩稿叧闀滃ご鏁伴噺*</div> - <div class="line-right"><el-input disabled v-model="jsonRule.failNum" type="text"/></div>鍒� - </div> - </div> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button @click="closeDetail">鍏抽棴</el-button> - </div> - </el-dialog> - - <!-- 娣诲姞鎴栦慨鏀硅繚绾﹁鍒欏璇濇 --> - <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> - <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> - <el-input class="input" v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" /> - </el-form-item> - <el-form-item label="杩愮淮鍏徃" prop="companyName"> - <el-input class="input" :value ="companyName" placeholder="璇疯緭鍏ヨ繍缁村叕鍙稿悕绉�"></el-input> - </el-form-item> - <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDesc"> - <el-input class="input" v-model="form.ruleDesc" placeholder="璇疯緭鍏ヨ鍒欐弿杩�" /> - </el-form-item> - <el-form-item label="瑙勫垯璁剧疆"> - <div > - <div class="line"> - <div class="line-left">鏃堕挓鍚屾锛堣秴杩嚶�3绉掍负涓嶅悎鏍硷級24灏忔椂鍐呮湭淇鐨勶細鎵i櫎鐩稿叧闀滃ご鏁伴噺*</div> - <div class="line-right"><el-input v-model="jsonRule.overTime" type="text"/></div>鍒� - </div> - <div class="line"> - <div class="line-left">OSD鏍囪瘑涓嶆弧瓒炽�奊AT 751-2008 瑙嗛鍥惧儚鏂囧瓧鏍囨敞瑙勮寖銆嬶紝24灏忔椂鍐呮湭淇鐨勶細鏍囨墸闄ょ浉鍏抽暅澶存暟閲�*</div> - <div class="line-right"><el-input v-model="jsonRule.failNum" type="text"/></div>鍒� - </div> - <div class="line"> - <div class="line-left">鐢ㄦ埛鎶芥锛屼竴鏈轰竴妗f暟鎹」涓嶅悎鏍硷紙鎻愪緵铏氬亣鏁版嵁鎴栭敊璇暟鎹负涓嶅悎鏍硷級锛�24灏忔椂鍐呮湭淇鐨勶細鎵i櫎鐩稿叧闀滃ご鏁伴噺*</div> - <div class="line-right"><el-input v-model="jsonRule.failNum" type="text"/></div>鍒� - </div> - </div> - </el-form-item> - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </el-dialog> - </div> -</template> - -<script> -import { listRule, getRule, delRule, addRule, updateRule, setRule } from "@/api/platform/default-rule"; - -export default { - name: "Rule", - data() { - return { - companyName: "鎴愰兘x杩愮淮鍏徃", - detailOpen: false, - // 閬僵灞� - loading: true, - // 閫変腑鏁扮粍 - ids: [], - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, - // 鏄剧ず鎼滅储鏉′欢 - showSearch: true, - // 鎬绘潯鏁� - total: 0, - // 杩濈害瑙勫垯琛ㄦ牸鏁版嵁 - ruleList: [], - // 寮瑰嚭灞傛爣棰� - title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, - // 瑙勫垯鐘舵�侊細鍚敤銆佹湭鍚敤鏃堕棿鑼冨洿 - daterangeCreateTime: [], - // 鏌ヨ鍙傛暟 - queryParams: { - pageNum: 1, - pageSize: 10, - ruleName: null, - ruleStatus: null, - createTime: null, - }, - // 琛ㄥ崟鍙傛暟 - form: {}, - jsonRule: {}, - // 琛ㄥ崟鏍¢獙 - rules: { - ruleName: [ - { required: true, message: "瑙勫垯鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } - ], - } - }; - }, - created() { - this.getList(); - }, - methods: { - /** 鏌ヨ杩濈害瑙勫垯鍒楄〃 */ - getList() { - this.loading = true; - if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) { - this.queryParams["start"] = this.daterangeCreateTime[0]; - this.queryParams["end"] = this.daterangeCreateTime[1]; - } - listRule(this.queryParams).then(response => { - this.ruleList = response.data; - this.total = response.total; - this.loading = false; - }); - }, - // 鍙栨秷鎸夐挳 - cancel() { - this.open = false; - this.reset(); - }, - // 琛ㄥ崟閲嶇疆 - reset() { - this.form = { - id: null, - ruleName: null, - ruleDetail: null, - ruleDesc: null, - ruleStatus: null, - createTime: null, - updateTime: null, - deleted: null - }; - this.resetForm("form"); - }, - /** 鎼滅储鎸夐挳鎿嶄綔 */ - handleQuery() { - this.queryParams.pageNum = 1; - this.getList(); - }, - /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { - this.daterangeCreateTime = []; - this.resetForm("queryForm"); - this.handleQuery(); - }, - // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - this.ids = selection.map(item => item.id) - this.single = selection.length!==1 - this.multiple = !selection.length - }, - /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { - this.reset(); - this.open = true; - this.title = "娣诲姞杩濈害瑙勫垯"; - }, - /** 淇敼鎸夐挳鎿嶄綔 */ - handleUpdate(row) { - this.reset(); - const id = row.id || this.ids - getRule(id).then(response => { - this.form = response.data; - this.jsonRule = JSON.parse(this.form.ruleDetail) - this.open = true; - this.title = "淇敼杩濈害瑙勫垯"; - }); - }, - /** 鎻愪氦鎸夐挳 */ - submitForm() { - this.$refs["form"].validate(valid => { - if (valid) { - this.jsonRule.overtime = this.jsonRule.overtime ? this.jsonRule.overtime : 0; - this.jsonRule.failNum = this.jsonRule.failNum ? this.jsonRule.failNum : 0; - this.form.ruleDetail = JSON.stringify(this.jsonRule); - if (this.form.id != null) { - updateRule(this.form).then(response => { - this.$modal.msgSuccess("淇敼鎴愬姛"); - this.open = false; - this.getList(); - }); - } else { - addRule(this.form).then(response => { - this.$modal.msgSuccess("鏂板鎴愬姛"); - this.open = false; - this.getList(); - }); - } - } - }); - }, - // 鍚敤銆佸仠鐢� - handleUse(id, flag) { - let data = { - id: id, - flag: flag - } - setRule(data).then(res => { - if (res.code === 200) { - this.$modal.msgSuccess("璁剧疆鎴愬姛"); - } else { - this.$modal.msgError(res.msg); - } - this.getList(); - }) - }, - // 璇︽儏鎸夐挳 - handleDetail(row) { - this.detailOpen = true; - this.form = row; - this.jsonRule = JSON.parse(this.form.ruleDetail); - }, - // 鍏抽棴璇︽儏 - closeDetail() { - this.jsonRule = {}; - this.form = {}; - this.detailOpen = false; - }, - /** 鍒犻櫎鎸夐挳鎿嶄綔 */ - handleDelete(row) { - const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎杩濈害瑙勫垯缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return delRule(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); - }, - /** 瀵煎嚭鎸夐挳鎿嶄綔 */ - handleExport() { - this.download('system/rule/export', { - ...this.queryParams - }, `rule_${new Date().getTime()}.xlsx`) - } - } -}; -</script> - -<style scoped> -.line { - display: flex; - flex-direction: row; - justify-content: flex-start; - align-items: center; -} - -.line-right { - width: 50px; -} -.input{ - width: 200px; -} -</style> diff --git a/src/views/system/equipment/index.vue b/src/views/system/equipment/index.vue new file mode 100644 index 0000000..ada2e73 --- /dev/null +++ b/src/views/system/equipment/index.vue @@ -0,0 +1,437 @@ +<template> + + <div class="app-container"> + + <el-card class="box-card" > + <el-row type="flex" align="middle" justify="space-between"> + <el-col :xl="8" :lg="8" :md="10" :sm="8" :xs="6"> + <div class="icon-container" style="background-color: #5599F7"> + <i class="el-icon-wallet"></i> + </div> + </el-col> + <el-col :xl="14" :lg="14" :md="12" :sm="14" :xs="16"> + <div class="dashboard"> + <div class="dashboard-item"> + <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3> + <p>璁惧鎬绘暟</p > + </div> + <div class="dashboard-item"> + <h3 style="color: #3eba45">{{ count.totalMembers }}</h3> + <p>姝e父鏁�</p > + </div> + <div class="dashboard-item"> + <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3> + <p>寮傚父鏁�</p > + </div> + <div class="dashboard-item"> + <h3>{{ count.totalViews }}</h3> + <p>鐢熸垚寮傚父宸ュ崟鏁�</p > + </div> + <div class="dashboard-item"> + <h3>{{ count.noStore }}</h3> + <p>鏃犲瓨鍌�</p > + </div> + <div class="dashboard-item"> + <h3>{{ count.partStore }}</h3> + <p>閮ㄥ垎瀛樺偍</p > + </div> + <div class="dashboard-item"> + <h3>{{ count.viewsPercentage }}%</h3> + <p>璁惧杩愯鐜�</p > + </div> + </div> + </el-col> + </el-row> + </el-card> + + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> + <el-form-item label="鍏抽敭瀛�" prop="name"> + <el-input + v-model="queryParams.name" + placeholder="璇疯緭鍏ュ叧閿瓧" + clearable + @keyup.enter.native="handleQuery" + /> + </el-form-item> + <el-form-item label="鍖哄煙" prop="onState"> + <el-select + v-model="queryParams.address" + placeholder="璇烽�夋嫨鍖哄煙" + clearable + > + <el-option label="鑷础甯�" value="鑷础甯�"/> + <el-option label="娌挎哗鍖�" value="娌挎哗鍖�"/> + <el-option label="澶у畨鍖�" value="澶у畨鍖�"/> + <el-option label="璐′簳鍖�" value="璐′簳鍖�"/> + <el-option label="鑷祦浜曞尯" value="鑷祦浜曞尯"/> + <el-option label="楂樻柊鍖�" value="楂樻柊鍖�"/> + <el-option label="鑽e幙" value="鑽e幙"/> + <el-option label="瀵岄『鍘�" value="瀵岄『鍘�"/> + </el-select> + </el-form-item> + <el-form-item label="璁惧鐘舵��" prop="onState"> + <el-select + v-model="queryParams.onState" + placeholder="璁惧鐘舵��" + clearable + style="width: 100px" + > + <el-option + v-for="dict in dict.type.camera_state" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <el-form-item label="鏄惁鐢熸垚寮傚父宸ュ崟" prop="defaultOrder" label-width="130px"> + <el-select + v-model="queryParams.defaultOrder" + placeholder="鏄惁鐢熸垚寮傚父宸ュ崟" + clearable + style="width: 170px" + > + <el-option + v-for="dict in dict.type.platform_yes_no" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + + <el-form-item> + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> + </el-form-item> + </el-form> + + <el-row :gutter="10" class="mb8"> + <el-col :span="1.5"> + <el-button + type="warning" + plain + icon="el-icon-download" + size="mini" + @click="handleExport" + >瀵煎嚭</el-button> + </el-col> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> + </el-row> + + <el-table v-loading="loading" :data="monitorList" @selection-change="handleSelectionChange"> + <el-table-column type="selection" align="center" /> + <el-table-column label="璁惧鍚嶇О" align="center" prop="name" width="280" fixed/> + <el-table-column label="璁惧缂栫爜" align="center" prop="serialNumber" width="180"/> + <el-table-column label="鏍囩" align="center" prop="publicSecurity" width="180" v-if="columns[0].visible"/> + <el-table-column label="鍖哄煙" align="center" prop="address" width="180" v-if="columns[1].visible"/> + <el-table-column label="璁惧鐘舵��" align="center" prop="onState" v-if="columns[2].visible"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/> + </template> + </el-table-column> + <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="defaultOrder" width="180" v-if="columns[3].visible"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.platform_yes_no" :value="scope.row.defaultOrder"/> + </template> + </el-table-column> + <el-table-column label="鏁版嵁鏃堕棿" align="center" prop="installedTime" width="180" v-if="columns[4].visible"/> + <el-table-column label="绠$悊鍗曚綅" align="center" prop="managementUnit" width="180" v-if="columns[5].visible"/> + <el-table-column label="淇′护鏃跺欢(ms)" align="center" prop="sipDelay" width="180" v-if="columns[6].visible"/> + <el-table-column label="瑙嗛鏃跺欢(ms)" align="center" prop="videoDelay" width="180" v-if="columns[7].visible"/> + <el-table-column label="鍏抽敭甯ф椂寤�(ms)" align="center" prop="iframeDelay" width="180" v-if="columns[8].visible"/> + <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" fixed="right"> + <template slot-scope="scope"> + <el-button + size="mini" + type="text" + icon="el-icon-view" + @click="handleView(scope.row,scope.index)" + >璇︾粏</el-button> + </template> + </el-table-column> + </el-table> + + <pagination + v-show="total>0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + /> + + <!-- 璁惧璧勪骇璇︽儏 --> + <el-dialog title="鎿嶄綔鏃ュ織璇︾粏" :visible.sync="open" width="800px" append-to-body> + <el-form ref="form" :model="form" label-width="150px" size="mini"> + <el-row> + <el-col :span="12"> + <el-form-item label="璁惧缂栫爜锛�">{{ form.serialNumber }}</el-form-item> + <el-form-item label="璁惧鍚嶇О锛�">{{ form.name }} </el-form-item> + <el-form-item label="鍦板尯锛�">{{ form.address }} </el-form-item> + <el-form-item label="涓婃姤閮ㄩ棬锛�">{{ form.deptName }} </el-form-item> + <el-form-item label="璁惧鐘舵�侊細"> + <div v-if="form.onState === 1">鍙敤</div> + <div v-else-if="form.onState === 2">涓嶅彲鐢�</div> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="鍦板潃锛�">{{ form.address }}</el-form-item> + <el-form-item label="鏄惁鐢熸垚寮傚父宸ュ崟锛�"> + <div v-if="form.defaultOrder === 1">鏄�</div> + <div v-else-if="form.defaultOrder === 2">鍚�</div> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="瀹夎鏃堕棿锛�">{{ form.installedTime }}</el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="绠$悊鍗曚綅锛�">{{ form.managementUnit }}</el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="淇′护鏃跺欢(ms)锛�"></el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="瑙嗛鏃跺欢(ms)锛�"></el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="鍏抽敭甯ф椂寤�(ms)锛�"></el-form-item> + </el-col> + </el-row> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button @click="open = false">鍏� 闂�</el-button> + </div> + </el-dialog> + </div> +</template> + +<script> +import { videoCount, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor"; +export default { + name: "Monitor", + dicts: ['sys_normal_disable', 'platform_yes_no','camera_state'], + data() { + return { + // 鍒椾俊鎭� + columns: [ + { key: 0, label: `鏍囩`, visible: true }, + { key: 1, label: `鍖哄煙`, visible: true }, + { key: 2, label: `璁惧鐘舵�乣, visible: true }, + { key: 3, label: `鏄惁鐢熸垚寮傚父宸ュ崟`, visible: true }, + { key: 4, label: `鏁版嵁鏃堕棿`, visible: true }, + { key: 5, label: `绠$悊鍗曚綅`, visible: true }, + { key: 6, label: `淇′护鏃跺欢`, visible: true }, + { key: 7, label: `瑙嗛鏃跺欢`, visible: true }, + { key: 8, label: `鍏抽敭甯ф椂寤禶, visible: true } + ], + count: { + totalPosts: 0, + totalMembers: 0, + postsPercentage: 0, + totalViews: 0, + noStore: 0, + partStore: 0, + viewsPercentage: 0 + }, + // 閬僵灞� + loading: true, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + // 璁惧璧勪骇琛ㄦ牸鏁版嵁 + monitorList: [], + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + serialNumber: null, + name: null, + onState: null, + address: null, + installedTime: null, + managementUnit: null, + defaultOrder: null, + cameraFunType: 1, + }, + // 琛ㄥ崟鍙傛暟 + form: {}, + // 琛ㄥ崟鏍¢獙 + rules: { + serialNumber: [ + { required: true, message: "璁惧缂栫爜涓嶈兘涓虹┖", trigger: "blur" } + ], + name: [ + { required: true, message: "璁惧鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } + ], + onState: [ + { required: true, message: "璁惧鐘舵��", trigger: "blur" } + ], + address: [ + { required: true, message: "鍦板潃涓嶈兘涓虹┖", trigger: "blur" } + ], + } + }; + }, + created() { + this.getVideoCount(); + this.getList(); + this.getCountyList(); + }, + methods: { + /** 鏌ヨ璁惧璧勪骇鍒楄〃 */ + getList() { + this.loading = true; + listMonitor(this.queryParams).then(response => { + this.monitorList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + /** 鏌ヨ璁惧璧勪骇缁熻鏁� */ + getVideoCount() { + videoCount('1').then(response => { + this.count = response.data; + }); + }, + // 鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + id: null, + serialNumber: null, + name: null, + onState: null, + address: null, + installedTime: null, + managementUnit: null, + defaultOrder: null, + }; + this.resetForm("form"); + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + this.queryParams.cameraFunType = 1; + this.getList(); + this.getVideoCount(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.resetForm("queryForm"); + this.handleQuery(); + }, + + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map(item => item.id) + this.single = selection.length!==1 + this.multiple = !selection.length + }, + /** 鏂板鎸夐挳鎿嶄綔 */ + handleAdd() { + this.reset(); + this.open = true; + this.title = "娣诲姞璁惧璧勪骇"; + }, + /** 璇︾粏鎸夐挳鎿嶄綔 */ + handleView(row) { + this.open = true; + this.form = row; + }, + /** 淇敼鎸夐挳鎿嶄綔 */ + handleUpdate(row) { + this.reset(); + const id = row.id || this.ids + getMonitor(id).then(response => { + this.form = response.data; + this.open = true; + this.title = "淇敼璁惧璧勪骇"; + }); + }, + /** 鎻愪氦鎸夐挳 */ + submitForm() { + this.$refs["form"].validate(valid => { + if (valid) { + if (this.form.id != null) { + updateMonitor(this.form).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.getList(); + }); + } else { + addMonitor(this.form).then(response => { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.getList(); + }); + } + } + }); + }, + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + handleDelete(row) { + const ids = row.id || this.ids; + this.$modal.confirm('鏄惁纭鍒犻櫎璁惧璧勪骇缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { + return delMonitor(ids); + }).then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }).catch(() => {}); + }, + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + handleExport() { + this.download('system/monitor/export', { + ...this.queryParams + }, `monitor_${new Date().getTime()}.xlsx`) + } + } +}; +</script> +<style lang="scss" scoped> + +.box-card { + background-color: #F5F9FE; + width: 100%; + margin-bottom: 20px; + height: 120px +} +.icon-container { + display: flex; + justify-content: center; + align-items: center; + border-radius: 20px; + width: 20%; + height: 80px; + margin-left: 5%; +} +.el-icon-wallet { + font-size: 50px; + color: #FFFFFF; +} + +.dashboard { + display: flex; + gap: 10%; + align-items: center; + margin-left: -50%; +} + +.dashboard-item { + text-align: center; +} +</style> diff --git a/src/views/system/face/index.vue b/src/views/system/face/index.vue index 2755297..d571bbc 100644 --- a/src/views/system/face/index.vue +++ b/src/views/system/face/index.vue @@ -10,27 +10,27 @@ <el-col :xl="14" :lg="14" :md="12" :sm="14" :xs="16"> <div class="dashboard"> <div class="dashboard-item"> - <h3 style="color: #5C9BF8">{{ totalPosts }}</h3> + <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3> <p>璁惧鎬绘暟</p > </div> <div class="dashboard-item"> - <h3 style="color: #3eba45">{{ totalMembers }}</h3> + <h3 style="color: #3eba45">{{ count.totalMembers }}</h3> <p>姝e父鏁�</p > </div> <div class="dashboard-item"> - <h3 style="color: #fe640d">{{ postsPercentage }}</h3> + <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3> <p>寮傚父鏁�</p > </div> <div class="dashboard-item"> - <h3>{{ totalOrders }}</h3> + <h3>{{ count.totalViews }}</h3> <p>鐢熸垚寮傚父宸ュ崟鏁�</p > </div> <div class="dashboard-item"> - <h3>{{ totalViews }}</h3> + <h3>{{ count.totalFace }}</h3> <p>鎶撴媿鏁版嵁鎬婚噺</p > </div> <div class="dashboard-item"> - <h3>{{ viewsPercentage }}%</h3> + <h3>{{ count.viewsPercentage }}%</h3> <p>璁惧杩愯鐜�</p > </div> </div> @@ -109,29 +109,29 @@ @click="handleExport" >瀵煎嚭</el-button> </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> </el-row> <el-table v-loading="loading" :data="monitorList" @selection-change="handleSelectionChange"> <el-table-column type="selection" align="center" /> <el-table-column label="璁惧鍚嶇О" align="center" prop="name" width="280" fixed/> <el-table-column label="璁惧缂栫爜" align="center" prop="serialNumber" width="180"/> - <el-table-column label="鏍囩" align="center" prop="publicSecurity" width="180"/> - <el-table-column label="鍖哄煙" align="center" prop="address" width="180"/> - <el-table-column label="璁惧鐘舵��" align="center" prop="onState"> + <el-table-column label="鏍囩" align="center" prop="publicSecurity" width="180" v-if="columns[0].visible"/> + <el-table-column label="鍖哄煙" align="center" prop="address" width="180" v-if="columns[1].visible"/> + <el-table-column label="璁惧鐘舵��" align="center" prop="onState" v-if="columns[2].visible"> <template slot-scope="scope"> <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/> </template> </el-table-column> - <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="defaultOrder" width="180"> + <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="defaultOrder" width="180" v-if="columns[3].visible"> <template slot-scope="scope"> <dict-tag :options="dict.type.platform_yes_no" :value="scope.row.defaultOrder"/> </template> </el-table-column> - <el-table-column label="鏁版嵁鏃堕棿" align="center" prop="installedTime" width="180"/> - <el-table-column label="绠$悊鍗曚綅" align="center" prop="managementUnit" width="180"/> - <el-table-column label="鎶撴媿閲�" align="center" prop="model" width="180"/> - <el-table-column label="鎸佺画鏃犳暟鎹ぉ鏁�" align="center" prop="recovery" width="180"/> + <el-table-column label="鏁版嵁鏃堕棿" align="center" prop="installedTime" width="180" v-if="columns[4].visible"/> + <el-table-column label="绠$悊鍗曚綅" align="center" prop="managementUnit" width="180" v-if="columns[5].visible"/> + <el-table-column label="鎶撴媿閲�" align="center" prop="a" width="180" v-if="columns[6].visible"/> + <el-table-column label="鎸佺画鏃犳暟鎹ぉ鏁�" align="center" prop="a" width="180" v-if="columns[7].visible"/> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" fixed="right"> <template slot-scope="scope"> <el-button @@ -222,10 +222,10 @@ <el-form-item label="绠$悊鍗曚綅锛�">{{ form.managementUnit }}</el-form-item> </el-col> <el-col :span="24"> - <el-form-item label="鎶撴媿閲忥細">{{ form.model }}</el-form-item> + <el-form-item label="鎶撴媿閲忥細"></el-form-item> </el-col> <el-col :span="24"> - <el-form-item label="鎸佺画鏃犳暟鎹ぉ鏁帮細">{{ form.recovery }}</el-form-item> + <el-form-item label="鎸佺画鏃犳暟鎹ぉ鏁帮細"></el-form-item> </el-col> </el-row> </el-form> @@ -237,20 +237,32 @@ </template> <script> -import { listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor"; +import { videoCount, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor"; export default { name: "Monitor", dicts: ['sys_normal_disable','platform_yes_no','camera_state'], data() { return { - totalPosts: 1490, - totalMembers: 1090, - postsPercentage: 319, - totalViews: 1200164, - totalOrders: 81, - viewsPercentage: 73.15, - totalErrors: 0, + // 鍒椾俊鎭� + columns: [ + { key: 0, label: `鏍囩`, visible: true }, + { key: 1, label: `鍖哄煙`, visible: true }, + { key: 2, label: `璁惧鐘舵�乣, visible: true }, + { key: 3, label: `鏄惁鐢熸垚寮傚父宸ュ崟`, visible: true }, + { key: 4, label: `鏁版嵁鏃堕棿`, visible: true }, + { key: 5, label: `绠$悊鍗曚綅`, visible: true }, + { key: 6, label: `鎶撴媿閲廯, visible: true }, + { key: 7, label: `鎸佺画鏃犳暟鎹ぉ鏁癭, visible: true } + ], + count: { + totalPosts: 0, + totalMembers: 0, + postsPercentage: 0, + totalViews: 0, + totalFace: 0, + viewsPercentage: 0 + }, // 閬僵灞� loading: true, // 閫変腑鏁扮粍 @@ -302,6 +314,7 @@ }; }, created() { + this.getVideoCount(); this.getList(); }, methods: { @@ -312,6 +325,12 @@ this.monitorList = response.rows; this.total = response.total; this.loading = false; + }); + }, + /** 鏌ヨ璁惧璧勪骇缁熻鏁� */ + getVideoCount() { + videoCount('3').then(response => { + this.count = response.data; }); }, // 鍙栨秷鎸夐挳 @@ -337,6 +356,7 @@ this.queryParams.pageNum = 1; this.queryParams.cameraFunType = 3 this.getList(); + this.getVideoCount(); }, /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { diff --git a/src/views/system/platform/index.vue b/src/views/system/platform/index.vue new file mode 100644 index 0000000..34d5f02 --- /dev/null +++ b/src/views/system/platform/index.vue @@ -0,0 +1,412 @@ +<template> + <div class="app-container"> + <el-card class="box-card" > + <el-row type="flex" align="middle" justify="space-between"> + <el-col :xl="8" :lg="8" :md="10" :sm="8" :xs="6"> + <div class="icon-container" style="background-color: #5599F7"> + <i class="el-icon-connection"></i> + </div> + </el-col> + <el-col :xl="14" :lg="14" :md="12" :sm="14" :xs="16"> + <div class="dashboard"> + <div class="dashboard-item"> + <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3> + <p>璁惧鎬绘暟</p > + </div> + <div class="dashboard-item"> + <h3 style="color: #3eba45">{{ count.totalMembers }}</h3> + <p>姝e父鏁�</p > + </div> + <div class="dashboard-item"> + <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3> + <p>寮傚父鏁�</p > + </div> + <div class="dashboard-item"> + <h3>{{ count.totalViews }}</h3> + <p>鐢熸垚寮傚父宸ュ崟鏁�</p > + </div> + </div> + </el-col> + </el-row> + </el-card> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form-item label="骞冲彴缂栫爜" prop="platformCode"> + <el-input + v-model="queryParams.platformCode" + placeholder="璇疯緭鍏ュ钩鍙扮紪鐮�" + clearable + @keyup.enter.native="handleQuery" + /> + </el-form-item> + <el-form-item label="骞冲彴鍚嶇О" prop="platformName"> + <el-input + v-model="queryParams.platformName" + placeholder="璇疯緭鍏ュ钩鍙板悕绉�" + clearable + @keyup.enter.native="handleQuery" + /> + </el-form-item> + <el-form-item label="璁惧鐘舵��" prop="onState"> + <el-select + v-model="queryParams.status" + placeholder="璁惧鐘舵��" + clearable + style="width: 100px" + > + <el-option + v-for="dict in dict.type.camera_state" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <el-form-item label="鏄惁鐢熸垚寮傚父宸ュ崟" prop="defaultOrder" label-width="130px"> + <el-select + v-model="queryParams.status" + placeholder="鏄惁鐢熸垚寮傚父宸ュ崟" + clearable + style="width: 170px" + > + <el-option + v-for="dict in dict.type.platform_yes_no" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <el-form-item> + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> + </el-form-item> + </el-form> + + <el-row :gutter="10" class="mb8"> + <!-- <el-col :span="1.5"> + <el-button + type="primary" + plain + icon="el-icon-plus" + size="mini" + @click="handleAdd" + v-hasPermi="['platform:platform:add']" + >鏂板</el-button> + </el-col> + <el-col :span="1.5"> + <el-button + type="success" + plain + icon="el-icon-edit" + size="mini" + :disabled="single" + @click="handleUpdate" + v-hasPermi="['platform:platform:edit']" + >淇敼</el-button> + </el-col> + <el-col :span="1.5"> + <el-button + type="danger" + plain + icon="el-icon-delete" + size="mini" + :disabled="multiple" + @click="handleDelete" + v-hasPermi="['platform:platform:remove']" + >鍒犻櫎</el-button> + </el-col> --> + <el-col :span="1.5"> + <el-button + type="warning" + plain + icon="el-icon-download" + size="mini" + @click="handleExport" + v-hasPermi="['platform:platform:export']" + >瀵煎嚭</el-button> + </el-col> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> + </el-row> + + <el-table v-loading="loading" :data="platformList" @selection-change="handleSelectionChange"> + <el-table-column type="selection" width="55" align="center" /> + <el-table-column label="骞冲彴缂栫爜" align="center" prop="platformCode" /> + <el-table-column label="骞冲彴鍚嶇О" align="center" prop="platformName" /> + <!-- <el-table-column label="骞冲彴鑱旂郴浜�" align="center" prop="platformContact" /> + <el-table-column label="骞冲彴鑱旂郴浜虹數璇�" align="center" prop="platformContactPhone" /> --> + <el-table-column label="鐘舵��" align="center" prop="status"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.camera_state" :value="scope.row.status"/> + </template> + </el-table-column> + <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="defaultOrder" width="180"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.platform_yes_no" :value="scope.row.status"/> + </template> + </el-table-column> + <!-- <el-table-column label="澶囨敞" align="center" prop="remark" /> --> + <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> + <template slot-scope="scope"> + <el-button + size="mini" + type="text" + icon="el-icon-edit" + @click="handleUpdate(scope.row)" + v-hasPermi="['platform:platform:edit']" + >淇敼</el-button> + <el-button + size="mini" + type="text" + icon="el-icon-delete" + @click="handleDelete(scope.row)" + v-hasPermi="['platform:platform:remove']" + >鍒犻櫎</el-button> + </template> + </el-table-column> + </el-table> + + <pagination + v-show="total>0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + /> + + <!-- 娣诲姞鎴栦慨鏀瑰钩鍙拌繍琛岀洃鎺у璇濇 --> + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> + <el-form-item label="骞冲彴缂栫爜" prop="platformCode"> + <el-input v-model="form.platformCode" placeholder="璇疯緭鍏ュ钩鍙扮紪鐮�" /> + </el-form-item> + <el-form-item label="骞冲彴鍚嶇О" prop="platformName"> + <el-input v-model="form.platformName" placeholder="璇疯緭鍏ュ钩鍙板悕绉�" /> + </el-form-item> + <el-form-item label="骞冲彴鑱旂郴浜�" prop="platformContact"> + <el-input v-model="form.platformContact" placeholder="璇疯緭鍏ュ钩鍙拌仈绯讳汉" /> + </el-form-item> + <el-form-item label="骞冲彴鑱旂郴浜虹數璇�" prop="platformContactPhone"> + <el-input v-model="form.platformContactPhone" placeholder="璇疯緭鍏ュ钩鍙拌仈绯讳汉鐢佃瘽" /> + </el-form-item> + <el-form-item label="澶囨敞" prop="remark"> + <el-input v-model="form.remark" placeholder="璇疯緭鍏ュ娉�" /> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + </div> +</template> + +<script> +import { listPlatform, getPlatform, delPlatform, addPlatform, updatePlatform } from "@/api/platform/platform"; +import { videoCount } from "@/api/platform/monitor"; +export default { + name: "Platform", + dicts: ['sys_normal_disable', 'platform_yes_no','camera_state'], + data() { + return { + count: { + totalPosts: 0, + totalMembers: 0, + postsPercentage: 0, + totalViews: 0, + noStore: 0, + partStore: 0, + viewsPercentage: 0 + }, + // 閬僵灞� + loading: true, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + // 骞冲彴杩愯鐩戞帶琛ㄦ牸鏁版嵁 + platformList: [], + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + platformCode: null, + platformName: null, + platformContact: null, + platformContactPhone: null, + status: null, + remark: null, + }, + // 琛ㄥ崟鍙傛暟 + form: {}, + // 琛ㄥ崟鏍¢獙 + rules: { + platformCode: [ + { required: true, message: "骞冲彴缂栫爜涓嶈兘涓虹┖", trigger: "blur" } + ], + platformName: [ + { required: true, message: "骞冲彴鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } + ], + platformContact: [ + { required: true, message: "骞冲彴鑱旂郴浜轰笉鑳戒负绌�", trigger: "blur" } + ], + platformContactPhone: [ + { required: true, message: "骞冲彴鑱旂郴浜虹數璇濅笉鑳戒负绌�", trigger: "blur" } + ], + } + }; + }, + created() { + this.getList(); + this.getVideoCount(); + }, + methods: { + /** 鏌ヨ骞冲彴杩愯鐩戞帶鍒楄〃 */ + getList() { + this.loading = true; + listPlatform(this.queryParams).then(response => { + this.platformList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + /** 鏌ヨ璁惧璧勪骇缁熻鏁� */ + getVideoCount() { + videoCount('1').then(response => { + this.count = response.data; + }); + }, + // 鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + id: null, + platformCode: null, + platformName: null, + platformContact: null, + platformContactPhone: null, + status: null, + remark: null, + createTime: null, + updateTime: null, + deleted: null + }; + this.resetForm("form"); + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.resetForm("queryForm"); + this.handleQuery(); + }, + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map(item => item.id) + this.single = selection.length!==1 + this.multiple = !selection.length + }, + /** 鏂板鎸夐挳鎿嶄綔 */ + handleAdd() { + this.reset(); + this.open = true; + this.title = "娣诲姞骞冲彴杩愯鐩戞帶"; + }, + /** 淇敼鎸夐挳鎿嶄綔 */ + handleUpdate(row) { + this.reset(); + const id = row.id || this.ids + getPlatform(id).then(response => { + this.form = response.data; + this.open = true; + this.title = "淇敼骞冲彴杩愯鐩戞帶"; + }); + }, + /** 鎻愪氦鎸夐挳 */ + submitForm() { + this.$refs["form"].validate(valid => { + if (valid) { + if (this.form.id != null) { + updatePlatform(this.form).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.getList(); + }); + } else { + addPlatform(this.form).then(response => { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.getList(); + }); + } + } + }); + }, + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + handleDelete(row) { + const ids = row.id || this.ids; + this.$modal.confirm('鏄惁纭鍒犻櫎骞冲彴杩愯鐩戞帶缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { + return delPlatform(ids); + }).then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }).catch(() => {}); + }, + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + handleExport() { + this.download('platform/platform/export', { + ...this.queryParams + }, `platform_${new Date().getTime()}.xlsx`) + } + } +}; +</script> +<style lang="scss" scoped> + +.box-card { + background-color: #F5F9FE; + width: 100%; + margin-bottom: 20px; + height: 120px +} +.icon-container { + display: flex; + justify-content: center; + align-items: center; + border-radius: 20px; + width: 20%; + height: 80px; + margin-left: 5%; +} +.el-icon-connection { + font-size: 50px; + color: #FFFFFF; +} + +.dashboard { + display: flex; + gap: 10%; + align-items: center; + margin-left: -50%; +} + +.dashboard-item { + text-align: center; +} +</style> \ No newline at end of file diff --git a/src/views/system/point/index.vue b/src/views/system/point/index.vue index 854dc37..5a84703 100644 --- a/src/views/system/point/index.vue +++ b/src/views/system/point/index.vue @@ -85,6 +85,9 @@ <el-table v-loading="loading" :data="pointList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="鐐逛綅鍚嶇О" align="center" prop="pointName" /> + <el-table-column label="鏍囩" align="center" prop="tag" > + <span>{{important}}</span> + </el-table-column> <el-table-column label="鐐逛綅寮�濮嬫椂闂�" align="center" prop="startTime" width="180"> <template slot-scope="scope"> <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span> @@ -137,6 +140,12 @@ <el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form-item label="鐐逛綅鍚嶇О" prop="pointName"> <el-input v-model="form.pointName" placeholder="璇疯緭鍏ョ偣浣嶅悕绉�" /> + </el-form-item> + <el-form-item label="鐐逛綅鏍囩" prop="tag"> + <el-select v-model="form.tag" placeholder="鐐逛綅鏍囩"> + <el-option label="鏅�氱偣浣�" value="鏅�氱偣浣�"/> + <el-option label="閲嶇偣鐐逛綅" value="閲嶇偣鐐逛綅"/> + </el-select> </el-form-item> <el-form-item label="鐐逛綅鎵�鍦ㄥ湴" prop="region"> <el-cascader v-model="form.region" :options="regionList" placeholder="鐐逛綅鎵�鍦ㄥ湴" :props="props" collapse-tags></el-cascader> @@ -249,6 +258,7 @@ editingIndex: null, // 閬僵灞� loading: true, + important: '閲嶇偣鐐逛綅', // 閫変腑鏁扮粍 ids: [], // 闈炲崟涓鐢� diff --git a/src/views/system/publish/index.vue b/src/views/system/publish/city/index.vue similarity index 99% copy from src/views/system/publish/index.vue copy to src/views/system/publish/city/index.vue index b508a11..f5368ee 100644 --- a/src/views/system/publish/index.vue +++ b/src/views/system/publish/city/index.vue @@ -326,7 +326,7 @@ </template> <script> -import { listPublish, getPublish, delPublish, addPublish, updatePublish } from "@/api/platform/publish"; +import { listPublish, getPublish, delPublish, addPublish, updatePublish } from "@/api/platform/check-publish"; import { templateSelect } from "@/api/platform/check-template"; export default { name: "Publish", diff --git a/src/views/system/publish/index.vue b/src/views/system/publish/default/index.vue similarity index 99% rename from src/views/system/publish/index.vue rename to src/views/system/publish/default/index.vue index b508a11..d6d9b6a 100644 --- a/src/views/system/publish/index.vue +++ b/src/views/system/publish/default/index.vue @@ -326,7 +326,7 @@ </template> <script> -import { listPublish, getPublish, delPublish, addPublish, updatePublish } from "@/api/platform/publish"; +import { listPublish, getPublish, delPublish, addPublish, updatePublish } from "@/api/platform/default-publish"; import { templateSelect } from "@/api/platform/check-template"; export default { name: "Publish", diff --git a/src/views/system/publish/index.vue b/src/views/system/publish/province/index.vue similarity index 99% copy from src/views/system/publish/index.vue copy to src/views/system/publish/province/index.vue index b508a11..f5368ee 100644 --- a/src/views/system/publish/index.vue +++ b/src/views/system/publish/province/index.vue @@ -326,7 +326,7 @@ </template> <script> -import { listPublish, getPublish, delPublish, addPublish, updatePublish } from "@/api/platform/publish"; +import { listPublish, getPublish, delPublish, addPublish, updatePublish } from "@/api/platform/check-publish"; import { templateSelect } from "@/api/platform/check-template"; export default { name: "Publish", diff --git a/src/views/system/recovery/index.vue b/src/views/system/recovery/index.vue index 9ec015a..29912d5 100644 --- a/src/views/system/recovery/index.vue +++ b/src/views/system/recovery/index.vue @@ -10,23 +10,23 @@ <el-col :xl="14" :lg="14" :md="12" :sm="14" :xs="16"> <div class="dashboard"> <div class="dashboard-item"> - <h3 style="color: #5C9BF8">{{ totalPosts }}</h3> + <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3> <p>璁惧鎬绘暟</p > </div> <div class="dashboard-item"> - <h3 style="color: #3eba45">{{ totalMembers }}</h3> + <h3 style="color: #3eba45">{{ count.totalMembers }}</h3> <p>姝e父鏁�</p > </div> <div class="dashboard-item"> - <h3 style="color: #fe640d">{{ postsPercentage }}</h3> + <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3> <p>寮傚父鏁�</p > </div> <div class="dashboard-item"> - <h3>{{ totalViews }}</h3> + <h3>{{ count.totalViews }}</h3> <p>鐢熸垚寮傚父宸ュ崟鏁�</p > </div> <div class="dashboard-item"> - <h3>{{ viewsPercentage }}%</h3> + <h3>{{ count.viewsPercentage }}%</h3> <p>璁惧杩愯鐜�</p > </div> </div> @@ -34,7 +34,7 @@ </el-row> </el-card> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> <el-form-item label="鍏抽敭瀛�" prop="name"> <el-input v-model="queryParams.name" @@ -59,6 +59,17 @@ <el-option label="瀵岄『鍘�" value="瀵岄『鍘�"/> </el-select> </el-form-item> + <el-form-item label="鐩戞帶绫诲瀷" prop="onState"> + <el-select + v-model="queryParams.cameraFunType" + placeholder="璇烽�夋嫨鐩戞帶绫诲瀷" + clearable + > + <el-option label="瑙嗛鐩戞帶" value="1"/> + <el-option label="杞﹁締璇嗗埆" value="2"/> + <el-option label="浜哄憳璇嗗埆" value="3"/> + </el-select> + </el-form-item> <el-form-item> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> @@ -76,33 +87,29 @@ @click="handleExport" >瀵煎嚭</el-button> </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> </el-row> <el-table v-loading="loading" :data="monitorList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="璁惧鍚嶇О" align="center" prop="name" /> <el-table-column label="璁惧缂栫爜" align="center" prop="serialNumber" width="180px" /> - <el-table-column label="鏍囩" align="center" prop="tag" > - {{"鐪佸巺鑰冩牳"}} - </el-table-column> - <el-table-column label="鍖哄煙" align="center" prop="region" > - {{"澶у畨鍖�"}} - </el-table-column> - <el-table-column label="璁惧鐘舵��" align="center" prop="onState"> + <el-table-column label="鏍囩" align="center" prop="publicSecurity" v-if="columns[0].visible" /> + <el-table-column label="鍖哄煙" align="center" prop="address" v-if="columns[1].visible"/> + <el-table-column label="璁惧鐘舵��" align="center" prop="onState" v-if="columns[2].visible"> <template slot-scope="scope"> <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/> </template> </el-table-column> - <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="defaultOrder"> + <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="defaultOrder" v-if="columns[3].visible"> <template slot-scope="scope"> <dict-tag :options="dict.type.platform_yes_no" :value="scope.row.defaultOrder"/> </template> </el-table-column> - <el-table-column label="寮傚父鍘熷洜" align="center" prop="reason" /> - <el-table-column label="寮傚父鎭㈠鏃堕棿" align="center" prop="recoveryTime" width="180"> + <el-table-column label="寮傚父鍘熷洜" align="center" prop="reason" v-if="columns[4].visible" /> + <el-table-column label="寮傚父鎭㈠鏃堕棿" align="center" prop="recoveryTime" width="180" v-if="columns[5].visible"> </el-table-column> - <el-table-column label="绠$悊鍗曚綅" align="center" prop="managementUnit" /> + <el-table-column label="绠$悊鍗曚綅" align="center" prop="managementUnit" v-if="columns[6].visible" /> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button @@ -162,19 +169,31 @@ </template> <script> -import { listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor"; +import { recoveryException, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor"; export default { name: "Monitor", dicts: ['sys_normal_disable','platform_yes_no','camera_state'], data() { return { - totalPosts: 8896, - totalMembers: 8029, - postsPercentage: 382, - totalViews: 141, - viewsPercentage: 90.25, - totalErrors: 0, + // 鍒椾俊鎭� + columns: [ + { key: 0, label: `鏍囩`, visible: true }, + { key: 1, label: `鍖哄煙`, visible: true }, + { key: 2, label: `璁惧鐘舵�乣, visible: true }, + { key: 3, label: `鏄惁鐢熸垚寮傚父宸ュ崟`, visible: true }, + { key: 4, label: `寮傚父鍘熷洜`, visible: true }, + { key: 5, label: `寮傚父鎭㈠鏃堕棿`, visible: true }, + { key: 6, label: `绠$悊鍗曚綅`, visible: true }, + ], + count: { + totalPosts: 0, + totalMembers: 0, + postsPercentage: 0, + totalViews: 0, + viewsPercentage: 0, + totalErrors: 0, + }, // 閬僵灞� loading: true, // 閫変腑鏁扮粍 @@ -205,6 +224,7 @@ managementUnit: null, defaultOrder: null, recovery: 1, + cameraFunType: null }, // 琛ㄥ崟鍙傛暟 form: {}, @@ -227,6 +247,7 @@ }, created() { this.getList(); + this.getVideoCount(); }, methods: { /** 鏌ヨ璁惧璧勪骇鍒楄〃 */ @@ -236,6 +257,12 @@ this.monitorList = response.rows; this.total = response.total; this.loading = false; + }); + }, + /** 鏌ヨ寮傚父鎭㈠璁惧缁熻鏁� */ + getVideoCount() { + recoveryException().then(response => { + this.count = response.data; }); }, // 鍙栨秷鎸夐挳 @@ -266,6 +293,7 @@ this.queryParams.pageNum = 1; this.queryParams.recovery = 1 this.getList(); + this.getVideoCount(); }, /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { diff --git a/src/views/system/report/index.vue b/src/views/system/report/index.vue index 6f360b9..950f1e9 100644 --- a/src/views/system/report/index.vue +++ b/src/views/system/report/index.vue @@ -92,7 +92,7 @@ <el-table-column label="鎶ュ浜哄憳" align="center" prop="peopleName" /> <el-table-column label="鐐逛綅" align="center" prop="pointName" /> <el-table-column label="鎶ュ绫诲瀷" align="center" prop="reportType" /> - <el-table-column label="鎶ュ鍐呭" align="center" prop="reportContent" /> + <el-table-column label="鎶ュ鍐呭" align="center" prop="reportContent" show-overflow-tooltip="true" /> <el-table-column label="涓婃姤鏉愭枡" align="center" prop="reportMaterials" /> <el-table-column label="鏁呴殰绫诲瀷" align="center" prop="errorType" /> <el-table-column label="瀹℃牳鏃堕棿" align="center" prop="auditingTime" width="180"> @@ -115,6 +115,7 @@ icon="el-icon-edit" @click="handleAuditing(scope.row)" v-hasPermi="['system:report:audit']" + v-if="scope.row.status === 0" >瀹℃牳</el-button> <el-button size="mini" @@ -149,9 +150,9 @@ :loading="selectLoading"> <el-option v-for="item in pointList" - :key="item.value" - :label="item.label" - :value="item.value"> + :key="item.id" + :label="item.value" + :value="item.id"> </el-option> </el-select> </el-form-item> @@ -167,6 +168,17 @@ <el-option label="璁惧鏁呴殰" value="璁惧鏁呴殰"/> <el-option label="璁惧閬楀け" value="璁惧閬楀け"/> </el-select> + </el-form-item> + <el-form-item label="鏈夋晥鏃堕棿"> + <el-date-picker + v-model="expirTime" + style="width: 240px" + value-format="yyyy-MM-dd" + type="daterange" + range-separator="-" + start-placeholder="鐢熸晥鏃ユ湡" + end-placeholder="澶辨晥鏃ユ湡" + ></el-date-picker> </el-form-item> <el-form-item label="鎶ュ鍐呭" prop="reportContent"> <editor v-model="form.reportContent" :min-height="192"/> @@ -200,19 +212,30 @@ <el-form-item label="鏁呴殰绫诲瀷"> <el-input v-model="auditingForm.errorType" disabled /> </el-form-item> - <el-form-item label="鎶ュ鍐呭"> - <el-input v-model="auditingForm.pointName" disabled /> + <el-form-item label="鐢熸晥鏃堕棿"> + <el-date-picker v-model="auditingForm.beginCreateTime" disabled /> </el-form-item> - <el-form-item label="瀹℃牳缁撴灉" prop="auditing"> - <el-radio v-model="auditingForm.auditing" label="pass">閫氳繃</el-radio> - <el-radio v-model="auditingForm.auditing" label="reject">椹冲洖</el-radio> + <el-form-item label="澶辨晥鏃堕棿"> + <el-date-picker v-model="auditingForm.endCreateTime" disabled /> + </el-form-item> + <el-form-item label="鎶ュ鍐呭"> + <el-input type="textarea" v-html="auditingForm.reportContent" disabled /> + </el-form-item> + <el-form-item label="涓婃姤鏉愭枡"> + <el-link :href="auditingForm.reportMaterials" :underline="false">{{ auditingForm.reportMaterials }}</el-link> + </el-form-item> + <el-form-item label="瀹℃牳缁撴灉"> + <el-radio-group v-model="auditingForm.status"> + <el-radio :label="1">閫氳繃</el-radio> + <el-radio :label="2">椹冲洖</el-radio> + </el-radio-group> </el-form-item> <el-form-item label="瀹℃牳鎰忚" prop="suggest"> - <el-input v-model="auditingForm.suggest"/> + <el-input v-model="auditingForm.auditOpinion"/> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> - <el-button type="primary">纭� 瀹�</el-button> + <el-button type="primary" @click="auditingSubmit">纭� 瀹�</el-button> <el-button @click="auditingCancel">鍙� 娑�</el-button> </div> </el-dialog> @@ -252,6 +275,7 @@ open: false, // 鏁呴殰绫诲瀷鏃堕棿鑼冨洿 daterangeCreateTime: [], + expirTime: [], // 鏁呴殰绫诲瀷鏃堕棿鑼冨洿 daterangeAuditingTime: [], auditingOpen: false, @@ -265,6 +289,8 @@ auditing: "", suggest: "", reportType: "", + beginCreateTime: null, + endCreateTime: null }, // 鏌ヨ鍙傛暟 queryParams: { @@ -298,6 +324,12 @@ reportType: [ { required: true, message: "璇烽�夋嫨鎶ュ绫诲瀷", trigger: "blur" } ], + errorType: [ + { required: true, message: "璇烽�夋嫨鏁呴殰绫诲瀷", trigger: "blur" } + ], + expirTime: [ + { required: true, message: "璇烽�夋嫨鏈夋晥鏃堕棿", trigger: "blur" } + ], } }; }, @@ -311,12 +343,16 @@ handleAuditing(row) { this.auditingOpen = true; this.auditingForm.id =row.id + this.auditingForm.pointId =row.pointId this.auditingForm.pointName =row.pointName this.auditingForm.unitName =row.unitName this.auditingForm.peopleName =row.peopleName this.auditingForm.errorType =row.errorType this.auditingForm.reportContent =row.reportContent this.auditingForm.reportType =row.reportType + this.auditingForm.endCreateTime =row.endCreateTime + this.auditingForm.beginCreateTime =row.beginCreateTime + this.auditingForm.reportMaterials =row.reportMaterials }, // 杩滅▼鎼滅储鐐逛綅 remoteGetPoints(query) { @@ -381,6 +417,8 @@ resetQuery() { this.daterangeCreateTime = []; this.daterangeAuditingTime = []; + this.queryParams["beginCreateTime"] = null; + this.queryParams["endCreateTime"] = null; this.resetForm("queryForm"); this.handleQuery(); }, @@ -406,8 +444,24 @@ this.title = "淇敼鎶ュ"; }); }, + /** 瀹℃牳鎸夐挳鎿嶄綔 */ + auditingSubmit() { + this.auditingForm.auditingTime = new Date(); + updateReport(this.auditingForm).then(response => { + this.$modal.msgSuccess("瀹℃牳鎴愬姛"); + this.auditingOpen = false + this.getList(); + this.auditingForm = {} + }); + }, /** 鎻愪氦鎸夐挳 */ submitForm() { + + if (null != this.expirTime && '' != this.expirTime) { + this.form["beginCreateTime"] = this.expirTime[0]; + this.form["endCreateTime"] = this.expirTime[1]; + } + // todo 鍒ゆ柇鏄簨鍓嶆姤澶� this.$refs["form"].validate(valid => { @@ -440,7 +494,7 @@ }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { - this.download('system/report/export', { + this.download('report/export', { ...this.queryParams }, `report_${new Date().getTime()}.xlsx`) } diff --git a/src/views/system/check-result/contract/detail.vue b/src/views/system/result/default/detail.vue similarity index 99% rename from src/views/system/check-result/contract/detail.vue rename to src/views/system/result/default/detail.vue index e86acd4..f1aafb2 100644 --- a/src/views/system/check-result/contract/detail.vue +++ b/src/views/system/result/default/detail.vue @@ -353,12 +353,12 @@ </template> <script> -import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; +import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/default-result"; import { listRule, getRule, delRule, addRule, updateRule, setRule } from "@/api/platform/default-rule"; -import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/score"; +import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/default-score"; import {unitSelect} from "../../../../api/platform/unit"; -import {publishSelect} from "../../../../api/platform/publish"; +import {publishSelect} from "../../../../api/platform/check-publish"; export default { name: "CheckResult", data() { diff --git a/src/views/system/check-result/contract/index.vue b/src/views/system/result/default/index.vue similarity index 98% rename from src/views/system/check-result/contract/index.vue rename to src/views/system/result/default/index.vue index f6ff3a4..cb2b248 100644 --- a/src/views/system/check-result/contract/index.vue +++ b/src/views/system/result/default/index.vue @@ -90,6 +90,13 @@ </div> </el-card> + <pagination + v-show="total>0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + /> <el-dialog :title="manualScoreTitle" :visible.sync="manualScoreOpen" width="500px" append-to-body> <el-input v-model="manualScoreForm.manualScore" type="number" placeholder="璇蜂负璇ュ崟浣嶆墦鍒�"/> <div slot="footer" class="dialog-footer"> @@ -170,7 +177,7 @@ </template> <script> -import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; +import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/default-result"; export default { name: "CheckResult", diff --git a/src/views/system/result/detail/index.vue b/src/views/system/result/detail/index.vue new file mode 100644 index 0000000..54eeb5a --- /dev/null +++ b/src/views/system/result/detail/index.vue @@ -0,0 +1,286 @@ +<template> + <div style="display: flex;flex-direction: row; padding: 15px"> + <div id="left"> + <div> + <div> + <div style="display: flex;flex-direction: row;"> + <div class="now-item"> + <div class="box now"> + <div class="title"> + 瑙嗛 + </div> + <div> + 98 + </div> + </div> + </div> + <div class="now-item"> + <div class="box now"> + <div class="title"> + 浜鸿劯 + </div> + <div> + 98 + </div> + </div> + </div> + <div class="now-item"> + <div class="box now"> + <div class="title"> + 鐩戞帶 + </div> + <div> + 98 + </div> + </div> + </div> + <div style="justify-content: center;align-items: center;display: flex;width: 80px"> + <i class="el-icon-caret-left">鏈湀</i> + </div> + + </div> + </div> + </div> + + <div style="margin-top: 20px"> + <div style="display: flex;flex-direction: row;"> + <div class="now-item"> + <div class="box"> + <div class="title"> + 瑙嗛 + </div> + <div> + 98 + </div> + </div> + </div> + <div class="now-item"> + <div class="box"> + <div class="title"> + 浜鸿劯 + </div> + <div> + 98 + </div> + </div> + </div> + <div class="now-item"> + <div class="box"> + <div class="title"> + 鐩戞帶 + </div> + <div> + 98 + </div> + </div> + </div> + <div style="justify-content: center;align-items: center;display: flex;width: 80px"> + <i class="el-icon-caret-left">24.<span style="font-size: large">3</span></i> + </div> + </div> + </div> + <div style="margin-top: 20px"> + <div style="display: flex;flex-direction: row;"> + <div class="now-item"> + <div class="box"> + <div class="title"> + 瑙嗛 + </div> + <div> + 98 + </div> + </div> + </div> + <div class="now-item"> + <div class="box"> + <div class="title"> + 浜鸿劯 + </div> + <div> + 98 + </div> + </div> + </div> + <div class="now-item"> + <div class="box"> + <div class="title"> + 鐩戞帶 + </div> + <div> + 98 + </div> + </div> + </div> + <div style="justify-content: center;align-items: center;display: flex;width: 80px"> + <i class="el-icon-caret-left">24.<span style="font-size: large">2</span></i> + </div> + </div> + </div> + <div style="margin-top: 20px"> + <div style="display: flex;flex-direction: row;"> + <div class="now-item"> + <div class="box"> + <div class="title"> + 瑙嗛 + </div> + <div> + 98 + </div> + </div> + </div> + <div class="now-item"> + <div class="box"> + <div class="title"> + 浜鸿劯 + </div> + <div> + 98 + </div> + </div> + </div> + <div class="now-item"> + <div class="box"> + <div class="title"> + 鐩戞帶 + </div> + <div> + 98 + </div> + </div> + </div> + <div style="justify-content: center;align-items: center;display: flex;width: 80px"> + <i class="el-icon-caret-left">24.<span style="font-size: large">1</span></i> + </div> + </div> + </div> + <div style="margin-top: 20px"> + <div style="display: flex;flex-direction: row;"> + <div class="now-item"> + <div class="box"> + <div class="title"> + 瑙嗛 + </div> + <div> + 98 + </div> + </div> + </div> + <div class="now-item"> + <div class="box"> + <div class="title"> + 浜鸿劯 + </div> + <div> + 98 + </div> + </div> + </div> + <div class="now-item"> + <div class="box"> + <div class="title"> + 鐩戞帶 + </div> + <div> + 98 + </div> + </div> + </div> + <div style="justify-content: center;align-items: center;display: flex;width: 80px"> + <i class="el-icon-caret-left">23.<span style="font-size: large">12</span></i> + </div> + </div> + </div> + </div> + <div id="right"> + <div style="margin-top: 120px; display: flex;flex-direction: column; justify-content: center; align-items: center"> + <div style="width: 210px; margin-bottom: 15px"> + <el-switch + v-model="searchForm.type" + active-text="甯傚眬" + inactive-text="鐪佸巺"> + </el-switch> + </div> + <div style="width: 210px; margin-bottom: 15px"> + <el-date-picker + clearable + v-model="searchForm.startTime" + type="month" + placeholder="寮�濮嬫椂闂�"> + </el-date-picker> + </div> + <div style="width: 210px; margin-bottom: 15px"> + <el-date-picker + clearable + v-model="searchForm.endTime" + type="month" + placeholder="缁撴潫鏃堕棿"> + </el-date-picker> + </div> + + </div> + </div> + </div> +</template> + +<script> +export default { + name: 'index', + data() { + return { + searchForm: { + + } + } + } +} +</script> + +<style scoped> +.now-item { + flex: 1; + display: flex; + justify-content: center; + align-items: center; +} +.now { + background-color: #42b983; + height: 80px !important; +} +.box { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + box-shadow: 0 2px 6px hsla(0, 0%, 7%, .1); + border-radius: 10px; + width: 240px; + height: 50px; +} +.box:hover{ + cursor: pointer; +} +.month { + margin-top: 20px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} +.title { + font-size: larger; +} +.item { + flex: 1; +} +#left { + flex: 5; +} +#right { + flex: 1.5; + height: 100%; + overflow: hidden; + display: flex; + justify-content: center; + align-items: center; +} +</style> diff --git a/src/views/system/result/index.vue b/src/views/system/result/index.vue new file mode 100644 index 0000000..0d78705 --- /dev/null +++ b/src/views/system/result/index.vue @@ -0,0 +1,263 @@ +<template> + <div id="warp"> + <el-row> + <el-col :span="6"> + <div class="city-warp"> + <div class="city"> + <div class="title"> + 鑷祦浜� + </div> + <div class="score-warp"> + <div class="score-item"> + <div>瑙嗛锛�</div> + <div class="score">99.5</div> + </div> + <div class="score-item"> + <div>浜鸿劯锛�</div> + <div class="score">87</div> + </div> + <div class="score-item"> + <div>鐩戞帶锛�</div> + <div class="score">94</div> + </div> + </div> + <div class="bottom-publish"> + <el-button size="medium" type="success">鍙戝竷</el-button> + <el-button size="medium" @click="jumpDetail" type="info">璇︽儏</el-button> + </div> + </div> + </div> + </el-col> + <el-col :span="6"> + <div class="city-warp"> + <div class="city"> + <div class="title"> + 瀵岄『 + </div> + <div class="score-warp"> + <div class="score-item"> + <div>瑙嗛锛�</div> + <div class="score">99.5</div> + </div> + <div class="score-item"> + <div>浜鸿劯锛�</div> + <div class="score">87</div> + </div> + <div class="score-item"> + <div>鐩戞帶锛�</div> + <div class="score">94</div> + </div> + </div> + <div class="bottom-publish"> + <el-button size="medium" type="success">鍙戝竷</el-button> + <el-button size="medium" @click="jumpDetail" type="info">璇︽儏</el-button> + </div> + </div> + </div> + </el-col> + <el-col :span="6"> + <div class="city-warp"> + <div class="city"> + <div class="title"> + 鑽e幙 + </div> + <div class="score-warp"> + <div class="score-item"> + <div>瑙嗛锛�</div> + <div class="score">99.5</div> + </div> + <div class="score-item"> + <div>浜鸿劯锛�</div> + <div class="score">87</div> + </div> + <div class="score-item"> + <div>鐩戞帶锛�</div> + <div class="score">94</div> + </div> + </div> + <div class="bottom-publish"> + <el-button size="medium" type="success">鍙戝竷</el-button> + <el-button size="medium" @click="jumpDetail" type="info">璇︽儏</el-button> + </div> + </div> + </div> + </el-col> + <el-col :span="6"> + <div class="city-warp"> + <div class="city"> + <div class="title"> + 娌挎哗鍖� + </div> + <div class="score-warp"> + <div class="score-item"> + <div>瑙嗛锛�</div> + <div class="score">99.5</div> + </div> + <div class="score-item"> + <div>浜鸿劯锛�</div> + <div class="score">87</div> + </div> + <div class="score-item"> + <div>鐩戞帶锛�</div> + <div class="score">94</div> + </div> + </div> + <div class="bottom-publish"> + <el-button size="medium" type="success">鍙戝竷</el-button> + <el-button size="medium" @click="jumpDetail" type="info">璇︽儏</el-button> + </div> + </div> + </div> + </el-col> + + + </el-row> + + <el-row style="margin-top: 30px"> + <el-col :span="6"> + <div class="city-warp"> + <div class="city"> + <div class="title"> + 楂樻柊鍖� + </div> + <div class="score-warp"> + <div class="score-item"> + <div>瑙嗛锛�</div> + <div class="score">99.5</div> + </div> + <div class="score-item"> + <div>浜鸿劯锛�</div> + <div class="score">87</div> + </div> + <div class="score-item"> + <div>鐩戞帶锛�</div> + <div class="score">94</div> + </div> + </div> + <div class="bottom-publish"> + <el-button size="medium" type="success">鍙戝竷</el-button> + <el-button size="medium" @click="jumpDetail" type="info">璇︽儏</el-button> + </div> + </div> + </div> + </el-col> + <el-col :span="6"> + <div class="city-warp"> + <div class="city"> + <div class="title"> + 澶у畨鍖� + </div> + <div class="score-warp"> + <div class="score-item"> + <div>瑙嗛锛�</div> + <div class="score">99.5</div> + </div> + <div class="score-item"> + <div>浜鸿劯锛�</div> + <div class="score">87</div> + </div> + <div class="score-item"> + <div>鐩戞帶锛�</div> + <div class="score">94</div> + </div> + </div> + <div class="bottom-publish"> + <el-button size="medium" type="success">鍙戝竷</el-button> + <el-button size="medium" @click="jumpDetail" type="info">璇︽儏</el-button> + </div> + </div> + </div> + </el-col> + <el-col :span="6"> + <div class="city-warp"> + <div class="city"> + <div class="title"> + 璐′簳鍖� + </div> + <div class="score-warp"> + <div class="score-item"> + <div>瑙嗛锛�</div> + <div class="score">99.5</div> + </div> + <div class="score-item"> + <div>浜鸿劯锛�</div> + <div class="score">87</div> + </div> + <div class="score-item"> + <div>鐩戞帶锛�</div> + <div class="score">94</div> + </div> + </div> + <div class="bottom-publish"> + <el-button size="medium" type="success">鍙戝竷</el-button> + <el-button size="medium" @click="jumpDetail" type="info">璇︽儏</el-button> + </div> + </div> + </div> + </el-col> + </el-row> + </div> + +</template> + +<script> +export default { + name: 'index', + data() { + return { + + } + }, + methods: { + jumpDetail() { + this.$router.push("/examine/detail") + } + } +} +</script> + +<style scoped> +.score-warp { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + color: #797777 +} +.score-item { + display: flex; + flex-direction: row; +} +.score { + width: 60px; + text-align: right; +} +#warp { + padding: 20px; +} +.city-warp { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 210px; +} +.city { + width: 240px; + height: 100%; + box-shadow: 0 2px 6px hsla(0, 0%, 7%, .1); + border-radius: 10px; + position: relative; + text-align: center; + padding: 10px 0px; +} +.bottom-publish { + width: 100%; + position: absolute; + bottom: 10px; +} +.title { + font-size: larger; + margin-bottom: 25px; +} +</style> diff --git a/src/views/system/rule/default/index.vue b/src/views/system/rule/default/index.vue new file mode 100644 index 0000000..2cf4c33 --- /dev/null +++ b/src/views/system/rule/default/index.vue @@ -0,0 +1,316 @@ +<template> + <div class="app-container"> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> + <el-input + v-model="queryParams.ruleName" + placeholder="璇疯緭鍏ヨ鍒欏悕绉�" + clearable + @keyup.enter.native="handleQuery" + /> + </el-form-item> + <el-form-item label="鎵e噺鏂瑰紡" prop="deductCategory"> + <el-select v-model="queryParams.deductCategory" placeholder="璇烽�夋嫨鎵e噺鏂瑰紡" clearable> + <el-option + v-for="dict in dict.type.platform_deduct_category" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <el-form-item label="瑙勫垯鐘舵��" prop="ruleStatus"> + <el-select v-model="queryParams.ruleStatus" placeholder="璇烽�夋嫨瑙勫垯鐘舵��" clearable> + <el-option + v-for="dict in dict.type.sys_normal_disable" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <el-form-item> + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> + </el-form-item> + </el-form> + + <el-row :gutter="10" class="mb8"> + <el-col :span="1.5"> + <el-button + type="primary" + plain + icon="el-icon-plus" + size="mini" + @click="handleAdd" + v-hasPermi="['system:rule:add']" + >鏂板</el-button> + </el-col> + <el-col :span="1.5"> + <el-button + type="info" + plain + icon="el-icon-sort" + size="mini" + @click="toggleExpandAll" + >灞曞紑/鎶樺彔</el-button> + </el-col> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> + </el-row> + + <el-table + v-if="refreshTable" + v-loading="loading" + :data="ruleList" + row-key="id" + :default-expand-all="isExpandAll" + :tree-props="{children: 'children', hasChildren: 'hasChildren'}" + > + <el-table-column label="瑙勫垯鍚嶇О" prop="ruleName" /> + <el-table-column label="鎵e噺鏂瑰紡" align="center" prop="deductCategory"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.platform_deduct_category" :value="scope.row.deductCategory"/> + </template> + </el-table-column> + <el-table-column label="瑙勫垯鎻忚堪" align="center" prop="ruleDesc" /> + <el-table-column label="瑙勫垯鐘舵��" align="center" prop="ruleStatus"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.ruleStatus"/> + </template> + </el-table-column> + <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> + <template slot-scope="scope"> + <el-button + size="mini" + type="text" + icon="el-icon-edit" + @click="handleUpdate(scope.row)" + v-hasPermi="['system:rule:edit']" + >淇敼</el-button> + <el-button + size="mini" + type="text" + icon="el-icon-plus" + @click="handleAdd(scope.row)" + v-hasPermi="['system:rule:add']" + >鏂板</el-button> + <el-button + size="mini" + type="text" + icon="el-icon-delete" + @click="handleDelete(scope.row)" + v-hasPermi="['system:rule:remove']" + >鍒犻櫎</el-button> + </template> + </el-table-column> + </el-table> + + <!-- 娣诲姞鎴栦慨鏀硅繚绾﹁鍒欏璇濇 --> + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> + <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> + <el-input v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" /> + </el-form-item> + <el-form-item label="鎵e噺鏂瑰紡" prop="deductCategory"> + <el-select v-model="form.deductCategory" placeholder="璇烽�夋嫨鎵e噺鏂瑰紡"> + <el-option + v-for="dict in dict.type.platform_deduct_category" + :key="dict.value" + :label="dict.label" + :value="parseInt(dict.value)" + ></el-option> + </el-select> + </el-form-item> + <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDesc"> + <el-input v-model="form.ruleDesc" placeholder="璇疯緭鍏ヨ鍒欐弿杩�" /> + </el-form-item> + <el-form-item label="瑙勫垯鐘舵��" prop="ruleStatus"> + <el-radio-group v-model="form.ruleStatus"> + <el-radio + v-for="dict in dict.type.sys_normal_disable" + :key="dict.value" + :label="dict.value" + >{{dict.label}}</el-radio> + </el-radio-group> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + </div> +</template> + +<script> +import { listRule, getRule, delRule, addRule, updateRule } from "@/api/platform/default-rule"; +import Treeselect from "@riophae/vue-treeselect"; +import "@riophae/vue-treeselect/dist/vue-treeselect.css"; + +export default { + name: "Rule", + dicts: ['platform_deduct_category', 'sys_normal_disable'], + components: { + Treeselect + }, + data() { + return { + // 閬僵灞� + loading: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 杩濈害瑙勫垯琛ㄦ牸鏁版嵁 + ruleList: [], + // 杩濈害瑙勫垯鏍戦�夐」 + ruleOptions: [], + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 鏄惁灞曞紑锛岄粯璁ゅ叏閮ㄥ睍寮� + isExpandAll: true, + // 閲嶆柊娓叉煋琛ㄦ牸鐘舵�� + refreshTable: true, + // 鏌ヨ鍙傛暟 + queryParams: { + ruleName: null, + deductCategory: null, + ruleStatus: null, + }, + // 琛ㄥ崟鍙傛暟 + form: {}, + // 琛ㄥ崟鏍¢獙 + rules: { + ruleName: [ + { required: true, message: "瑙勫垯鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } + ], + } + }; + }, + created() { + this.getList(); + }, + methods: { + /** 鏌ヨ杩濈害瑙勫垯鍒楄〃 */ + getList() { + this.loading = true; + listRule(this.queryParams).then(response => { + this.ruleList = this.handleTree(response.data, "id", "parentId"); + this.loading = false; + }); + }, + /** 杞崲杩濈害瑙勫垯鏁版嵁缁撴瀯 */ + normalizer(node) { + if (node.children && !node.children.length) { + delete node.children; + } + return { + id: node.id, + label: node.ruleName, + children: node.children + }; + }, + /** 鏌ヨ杩濈害瑙勫垯涓嬫媺鏍戠粨鏋� */ + getTreeselect() { + listRule().then(response => { + this.ruleOptions = []; + const data = { id: 0, ruleName: '椤剁骇鑺傜偣', children: [] }; + data.children = this.handleTree(response.data, "id", "parentId"); + this.ruleOptions.push(data); + }); + }, + // 鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + id: null, + ruleName: null, + parentId: null, + deductCategory: null, + deductWay: null, + ruleDesc: null, + ruleStatus: null, + createTime: null, + updateTime: null, + deleted: null + }; + this.resetForm("form"); + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.resetForm("queryForm"); + this.handleQuery(); + }, + /** 鏂板鎸夐挳鎿嶄綔 */ + handleAdd(row) { + this.reset(); + this.getTreeselect(); + if (row != null && row.id) { + this.form.parentId = row.id; + } else { + this.form.parentId = 0; + } + this.open = true; + this.title = "娣诲姞杩濈害瑙勫垯"; + }, + /** 灞曞紑/鎶樺彔鎿嶄綔 */ + toggleExpandAll() { + this.refreshTable = false; + this.isExpandAll = !this.isExpandAll; + this.$nextTick(() => { + this.refreshTable = true; + }); + }, + /** 淇敼鎸夐挳鎿嶄綔 */ + handleUpdate(row) { + this.reset(); + this.getTreeselect(); + if (row != null) { + this.form.parentId = row.id; + } + getRule(row.id).then(response => { + this.form = response.data; + this.open = true; + this.title = "淇敼杩濈害瑙勫垯"; + }); + }, + /** 鎻愪氦鎸夐挳 */ + submitForm() { + this.$refs["form"].validate(valid => { + if (valid) { + if (this.form.id != null) { + updateRule(this.form).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.getList(); + }); + } else { + addRule(this.form).then(response => { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.getList(); + }); + } + } + }); + }, + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + handleDelete(row) { + this.$modal.confirm('鏄惁纭鍒犻櫎杩濈害瑙勫垯缂栧彿涓�"' + row.id + '"鐨勬暟鎹」锛�').then(function() { + return delRule(row.id); + }).then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }).catch(() => {}); + } + } +}; +</script> diff --git a/src/views/system/rule/index.vue b/src/views/system/rule/index.vue new file mode 100644 index 0000000..75d534d --- /dev/null +++ b/src/views/system/rule/index.vue @@ -0,0 +1,399 @@ +<template> + <div> + + <div class="container"> + <el-row type="flex" justify="start"> + <el-col :span="24"> + <h3 style="color: rgb(104,104,103);padding-top: 20px;padding-bottom: 20px;">瑙嗛鑰冩牳瑙勫垯</h3> + </el-col> + </el-row> + + <el-row type="flex" justify="start" v-for="(items, index) in groupData(videoData)"> + <el-col :span="4" v-for="item in items" :key="item.id"> + <el-card :style="{ borderBottomColor: getStatusColor(item.auditStatus) }"style="width:150px;height: 150px;text-align: center;border-bottom-width: 3px;"> + <i style="font-size: 40px;padding: 15px;" :class="item.icon"></i> + <div style="font-size:12px; text-align: center; height: 25px;">{{ item.name }} </div> + <div class="bottom clearfix"> + <el-button type="text" class="button" @click="handleAudit(item)">瀹℃牳</el-button> + <el-button type="text" class="button" @click="handleUpdate(item)">淇敼</el-button> + </div> + </el-card> + <br/> + </el-col> + </el-row> + </div> + + <div class="container"> + <el-row type="flex" justify="center"> + <el-col :span="24"> + <h3 style="color: rgb(104,104,103);padding-top: 20px;padding-bottom: 20px;">杞﹁締鑰冩牳瑙勫垯</h3> + </el-col> + </el-row> + + <el-row type="flex" justify="start" v-for="(items, index) in groupData(carData)"> + <el-col :span="4" v-for="item in items" :key="item.id"> + <el-card :style="{ borderBottomColor: getStatusColor(item.auditStatus) }"style="width:150px;height: 150px;text-align: center;border-bottom-width: 3px;"> + <i style="font-size: 40px;padding: 15px;" :class="item.icon"></i> + <div style="font-size:12px; text-align: center; height: 25px;">{{ item.name }} </div> + <div class="bottom clearfix"> + <el-button type="text" class="button" @click="handleAudit(item)">瀹℃牳</el-button> + <el-button type="text" class="button" @click="handleUpdate(item)">淇敼</el-button> + </div> + </el-card> + <br/> + </el-col> + </el-row> + </div> + + <div class="container"> + <el-row type="flex" justify="center"> + <el-col :span="24"> + <h3 style="color: rgb(104,104,103);padding-top: 20px;padding-bottom: 20px;">浜鸿劯鑰冩牳瑙勫垯</h3> + </el-col> + </el-row> + + <el-row type="flex" justify="start" v-for="(items, index) in groupData(faceData)"> + <el-col :span="4" v-for="item in items" :key="item.id"> + <el-card :style="{ borderBottomColor: getStatusColor(item.auditStatus) }"style="width:150px;height: 150px;text-align: center;border-bottom-width: 3px;"> + <i style="font-size: 40px;padding: 15px;" :class="item.icon"></i> + <div style="font-size:12px; text-align: center; height: 25px;">{{ item.name }} </div> + <div class="bottom clearfix"> + <el-button type="text" class="button" @click="handleAudit(item)">瀹℃牳</el-button> + <el-button type="text" class="button" @click="handleUpdate(item)">淇敼</el-button> + </div> + </el-card> + <br/> + </el-col> + </el-row> + </div> + <br/><br/><br/><br/> + + <!-- 娣诲姞鎴栦慨鏀硅�冩牳瑙勫垯瀵硅瘽妗� --> + <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> + <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> + <el-input v-model="form.name" placeholder="璇疯緭鍏ヨ鍒欏悕绉�"/> + </el-form-item> + <el-form-item label="鑰冩牳绫诲瀷" prop="examineCategory"> + <el-select v-model="form.examineCategory" placeholder="鑰冩牳绫诲瀷"> + <el-option + v-for="dict in dict.type.platform_examine_category" + :key="dict.value" + :label="dict.label" + :value="parseInt(dict.value)" + /> + </el-select> + </el-form-item> + <el-form-item label="瑙勫垯绫诲瀷" prop="ruleCategory"> + <el-select v-model="form.ruleCategory" placeholder="瑙勫垯绫诲瀷"> + <el-option + v-for="dict in dict.type.platform_rule_category" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDescription"> + <el-input v-model="form.ruleDescription" type="textarea" :autosize="{ minRows: 4, maxRows: 6}" placeholder="璇疯緭鍏ヨ鍒欏悕绉�"/> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + + + <!-- 瀹℃牳鑰冩牳瑙勫垯瀵硅瘽妗� --> + <el-dialog :title="title" :visible.sync="auditOpen" width="600px" append-to-body> + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> + <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName"> + <el-input v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" disabled/> + </el-form-item> + <el-form-item label="鑰冩牳绫诲瀷" prop="examineCategory"> + <el-select v-model="form.examineCategory" placeholder="鑰冩牳绫诲瀷" disabled> + <el-option + v-for="dict in dict.type.platform_examine_category" + :key="dict.value" + :label="dict.label" + :value="parseInt(dict.value)" + /> + </el-select> + </el-form-item> + <el-form-item label="瑙勫垯绫诲瀷" prop="ruleCategory"> + <el-select v-model="form.ruleCategory" placeholder="鑰冩牳绫诲瀷" disabled> + <el-option + v-for="dict in dict.type.platform_rule_category" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDescription"> + <el-input v-model="form.ruleDescription" type="textarea" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" disabled/> + </el-form-item> + + + <el-form-item label="瀹℃牳缁撴灉" prop="auditState" > + <el-radio-group v-model="form.auditState"> + <el-radio :label="1">閫氳繃</el-radio> + <el-radio :label="2">椹冲洖</el-radio> + </el-radio-group> + </el-form-item> + <el-form-item label="瀹℃牳璇存槑" prop="auditDescription" > + <el-input v-model="form.auditDescription" type="textarea" show-word-limit maxlength="100" /> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + + </div> +</template> + +<script> +import { listCheckRule, getCheckRule, delCheckRule, addCheckRule, updateCheckRule } from "@/api/platform/check-rule"; +import { templateSelect} from "@/api/platform/check-template" +export default { + name: "CheckRule", + dicts: ['platform_audit_state','platform_examine_category','platform_rule_category'], + data() { + return { + // 閬僵灞� + loading: true, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + templateList:[], + // 鑰冩牳瑙勫垯琛ㄦ牸鏁版嵁 + checkRuleList: [], + daterangeCreateTime: [], + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 鏄惁鏄剧ず寮瑰嚭灞� + auditOpen: false, + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + ruleName: null, + createTime: null, + ruleCategory: null, + templateId: null, + examineCategory: 1, + }, + videoData: [ + { name: '骞冲彴鍦ㄧ嚎鐜�', icon: 'el-icon-connection', ruleDescription: '鐪佸巺瀵瑰競绾у叡浜拰鑱旂綉骞冲彴杩涜瀹炴椂鐩戞祴锛屽競绾у叡浜�/鑱旂綉骞冲彴姣忔湀绂荤嚎鎬绘椂闀垮湪30鍒嗛挓浠ュ唴鐨勫钩鍙板湪绾跨巼涓�100%锛屾瘡瓒呰繃30鍒嗛挓鎵�10涓櫨鍒嗙偣锛屾墸瀹屼负姝€��' + + '姣忎釜鏈堝簳鏈�鍚�4涓伐浣滄棩涓洪鐣欑殑璋冭瘯鏃堕棿锛屽彲杩涜骞冲彴瀵规帴璋冭瘯鎴栬�呭崌绾ф敼閫狅紝骞冲彴瀵规帴璋冭瘯鎴栬�呭崌绾ф敼閫犻』鎻愬墠鍚戠渷鍘呮姤澶囥�傞櫎' + + '姣忔湀搴�4涓伐浣滄棩锛屽叾浣欐椂闂存姤澶囨瘡娆℃墸10涓櫨鍒嗙偣锛屾瘡娆℃姤澶囦笉瓒呰繃24灏忔椂锛屾瘡鏈堜笉瓒呰繃3娆°�傦紙閲嶅ぇ鐗规畩鎯呭喌锛屽閲嶅ぇ鑷劧鐏惧绛夋姤鍘呴瀵兼壒绀猴級', examineCategory:0,ruleCategory:'0', auditStatus: 'approved'}, + { name: '涓�鏈轰竴妗e悎鏍肩巼', icon: 'el-icon-folder', ruleDescription: '杩愮淮骞冲彴姣忔湀鍒濆鍚勫湴涓婁紶鑷宠仈缃戝钩鍙扮殑鈥滀竴鏈轰竴妗b�濇暟鎹簱涓殑鎽勫儚鏈烘。妗堟暟鎹繘琛岃川閲忔牎楠岋紝瀵瑰繀濉」濉姤鍑嗙‘銆佽鑼冪殑妗f鏁版嵁瑙嗕负鍚堟牸銆俓n' + + '涓�鏈轰竴妗e悎鏍肩巼=鍚堟牸鐨勬。妗堟暟鎹潯鏁�/妗f鏁版嵁鎬绘潯鏁�', examineCategory:0,ruleCategory:'0', auditStatus: 'pending' }, + { name: '涓�鏈轰竴妗f敞鍐岀巼', icon: 'el-icon-folder', ruleDescription: '杩愮淮骞冲彴姣忔湀瀵圭渷鍘呰鍥惧簱鐨勫墠绔憚鍍忔満鐐逛綅鏁伴噺鍜屼竴鏈轰竴妗g殑鏁版嵁鍖归厤銆傦紙涓婃湀搴曟渶鍚庝竴澶╃‘璁や竴鏈轰竴妗h溅杈嗐�佷汉鑴哥偣浣嶆暟锛�1鍙风敱瑙嗗浘搴撲晶杩涜鑰冩牳锛塡n' + + '浜鸿劯鍗″彛璧勪骇娉ㄥ唽鐜�=璧勪骇搴撶櫥璁板湪鐢ㄧ殑浜鸿劯鍗″彛鏁伴噺/锛堟湭娉ㄥ唽鐨勫湪绾夸汉鑴稿崱鍙f暟閲�+璧勪骇搴撶櫥璁板湪鐢ㄧ殑浜鸿劯鍗″彛鏁伴噺锛塡n' + + '杞﹁締鍗″彛璧勪骇娉ㄥ唽鐜�=璧勪骇搴撶櫥璁板湪鐢ㄧ殑浜鸿劯鍗″彛鏁伴噺/锛堟湭娉ㄥ唽鐨勫湪绾夸汉鑴稿崱鍙f暟閲�+璧勪骇搴撶櫥璁板湪鐢ㄧ殑浜鸿劯鍗″彛鏁伴噺锛�', examineCategory:0,ruleCategory:'0', auditStatus: 'rejected' }, + { name: '妗f鑰冩牳姣�', icon: 'el-icon-folder', ruleDescription: '鎻忚堪淇℃伅', examineCategory:0,ruleCategory:'0',auditStatus: 'approved' }, + { name: '鐐逛綅鍦ㄧ嚎鐜�', icon: 'el-icon-search', ruleDescription: '鎻忚堪淇℃伅', examineCategory:0,ruleCategory:'0',auditStatus: 'approved'}, + { name: '褰曞儚鍙敤鐜�', icon: 'el-icon-turn-off', ruleDescription: '鎻忚堪淇℃伅',examineCategory:0,ruleCategory:'0',auditStatus: 'approved'}, + { name: '鏍囨敞姝g‘鐜�', icon: 'el-icon-place', ruleDescription: '鎻忚堪淇℃伅', examineCategory:0,ruleCategory:'0',auditStatus: 'approved' }, + { name: '鏍℃椂姝g‘鐜�', icon: 'el-icon-place', ruleDescription: '鎻忚堪淇℃伅', examineCategory:0,ruleCategory:'0',auditStatus: 'approved' }, + { name: '閲嶇偣鐐逛綅鍦ㄧ嚎鐜�', icon: 'el-icon-place', ruleDescription: '鎻忚堪淇℃伅', examineCategory:0,ruleCategory:'0',auditStatus: 'approved'}, + { name: '閲嶇偣鐐逛綅鏍℃椂姝g‘鐜�', icon: 'el-icon-place', ruleDescription: '鎻忚堪淇℃伅', examineCategory:0,ruleCategory:'0',auditStatus: 'approved' }, + { name: '閲嶇偣鎸囨尌鍥惧儚鍦ㄧ嚎鐜�', icon: 'el-icon-place', ruleDescription: '鎻忚堪淇℃伅', examineCategory:0,ruleCategory:'0',auditStatus: 'approved' }, + { name: '瑙嗛鍥惧儚璧勬簮瀹夊叏绠$悊', icon: 'el-icon-place', ruleDescription: '鎻忚堪淇℃伅', examineCategory:0,ruleCategory:'0',auditStatus: 'approved' }, + ], + carData: [ + { name: '瑙嗗浘搴撳鎺ョǔ瀹氭��', icon: 'el-icon-truck', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '鐐逛綅鍦ㄧ嚎鐜�', icon: 'el-icon-truck', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '鑱旂綉鍗″彛璁惧鐩綍涓�鑷寸巼', icon: 'el-icon-truck', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '杞﹁締鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�', icon: 'el-icon-truck', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁瀹屾暣鎬�', icon: 'el-icon-truck', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁鍑嗙‘鎬�', icon: 'el-icon-truck', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�', icon: 'el-icon-truck', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�', icon: 'el-icon-truck', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '杞﹁締鍗″彛璁惧url鍙敤鎬�', icon: 'el-icon-truck', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '杞﹁締鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�', icon: 'el-icon-truck', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + ], + faceData: [ + { name: '瑙嗗浘搴撳鎺ョǔ瀹氭��', icon: 'el-icon-alarm-clock', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '鐐逛綅鍦ㄧ嚎鐜�', icon: 'el-icon-user', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '鐩綍涓�鑷寸巼', icon: 'el-icon-data-line', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '浜鸿劯鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�', icon: 'el-icon-timer', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '璁惧鎶撴媿鍥剧墖鍚堟牸鎬�', icon: 'el-icon-money', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '璁惧鎶撴媿鍥剧墖鏃堕挓鍑嗙‘鎬�', icon: 'el-icon-data-analysis', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '鎶撴媿浜鸿劯鏁版嵁涓婁紶鍙婃椂鎬�', icon: 'el-icon-data-analysis', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + { name: '浜鸿劯鍗″彛璁惧鎶撴媿鏁版嵁澶у浘鍙敤鎬�', icon: 'el-icon-data-analysis', ruleDescription: '鎻忚堪淇℃伅', auditStatus: 'approved' }, + ], + activeIndex: '0', + // 琛ㄥ崟鍙傛暟 + form: {}, + // 琛ㄥ崟鏍¢獙 + rules: { + ruleName: [ + { required: true, message: "瑙勫垯鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } + ], + } + }; + }, + created() { + + }, + methods: { + groupData(data) { + // 灏嗘暟鎹寜姣忓叚涓竴缁勮繘琛屽垎缁� + const groupedData = []; + for (let i = 0; i < data.length; i += 6) { + groupedData.push(data.slice(i, i + 6)); + } + return groupedData; + }, + /** 鑰冩牳妯℃澘涓嬫媺鍒楄〃 */ + getTemplateSelect() { + templateSelect().then((res) => { + this.templateList = res.data; + }) + }, + /** 鏌ヨ鑰冩牳瑙勫垯鍒楄〃 */ + getList() { + this.loading = true; + if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) { + this.queryParams["start"] = this.daterangeCreateTime[0]; + this.queryParams["end"] = this.daterangeCreateTime[1]; + } + listCheckRule(this.queryParams).then(response => { + this.checkRuleList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + // 鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.auditOpen = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + id: null, + ruleName: null, + ruleDetail: null, + videoPointNum: null, + vehicleCheckpointNum: null, + faceChceckpointNum: null, + createTime: null, + updateTime: null, + deleted: null + }; + this.resetForm("form"); + }, + handleSelect(key, keyPath) { + console.log(key, keyPath); + }, + getStatusColor(status) { + switch (status) { + case 'pending': + return '#ffffff'; // '#00a1d6'钃濊壊锛岃〃绀哄緟瀹℃牳 + case 'approved': + return '#ffffff'; // '#00e297'缁胯壊锛岃〃绀哄凡瀹℃牳 + case 'rejected': + return '#f56c6c'; // 绾㈣壊锛岃〃绀哄鏍告湭閫氳繃 + default: + return '#ffffff'; // 鐧借壊锛岄粯璁ょ姸鎬� + } + }, + + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map(item => item.id) + this.single = selection.length!==1 + this.multiple = !selection.length + }, + /** 鏂板鎸夐挳鎿嶄綔 */ + handleAdd() { + this.reset(); + this.open = true; + this.title = "娣诲姞鑰冩牳瑙勫垯"; + }, + /** 淇敼鎸夐挳鎿嶄綔 */ + handleUpdate(item) { + this.reset(); + const id = item.id || this.ids + this.form = item; + this.open = true; + this.title = "淇敼鑰冩牳瑙勫垯"; + }, + /** 瀹℃牳鎸夐挳鎿嶄綔 */ + handleAudit(row) { + this.reset(); + const id = row.id || this.ids + getCheckRule(id).then(response => { + this.form = response.data; + this.auditOpen = true; + this.title = "瀹℃牳鑰冩牳瑙勫垯"; + }); + }, + /** 鎻愪氦鎸夐挳 */ + submitForm() { + this.$refs["form"].validate(valid => { + if (valid) { + if (this.form.id != null) { + updateCheckRule(this.form).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.auditOpen = false; + this.getList(); + }); + } else { + addCheckRule(this.form).then(response => { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.auditOpen = false; + this.getList(); + }); + } + } + }); + }, + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + handleDelete(row) { + const ids = row.id || this.ids; + this.$modal.confirm('鏄惁纭鍒犻櫎鑰冩牳瑙勫垯缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { + return delCheckRule(ids); + }).then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }).catch(() => {}); + }, + + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + handleExport() { + this.download('system/checkRule/export', { + ...this.queryParams + }, `checkRule_${new Date().getTime()}.xlsx`) + } + } +}; +</script> + +<style scoped> +.container { + width: 90%; + margin: 10px auto; +} +.el-menu{ + margin: 10px auto; +} +</style> diff --git a/src/views/system/score/index.vue b/src/views/system/score/city/index.vue similarity index 98% rename from src/views/system/score/index.vue rename to src/views/system/score/city/index.vue index bb56f27..45602dc 100644 --- a/src/views/system/score/index.vue +++ b/src/views/system/score/city/index.vue @@ -159,9 +159,9 @@ </template> <script> -import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/score"; -import {unitSelect} from "../../../api/platform/unit"; -import {publishSelect} from "../../../api/platform/publish"; +import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/check-score"; +import {unitSelect} from "@/api/platform/unit"; +import {publishSelect} from "@/api/platform/check-publish"; export default { name: "Score", diff --git a/src/views/system/default-auditing/index.vue b/src/views/system/score/default/index.vue similarity index 99% rename from src/views/system/default-auditing/index.vue rename to src/views/system/score/default/index.vue index af857d8..bb8463e 100644 --- a/src/views/system/default-auditing/index.vue +++ b/src/views/system/score/default/index.vue @@ -225,7 +225,7 @@ </template> <script> -import { listAuditing, getAuditing, delAuditing, addAuditing, updateAuditing,auditing } from "@/api/platform/default-auditing"; +import { listAuditing, getAuditing, delAuditing, addAuditing, updateAuditing,auditing } from "@/api/platform/default-score"; import { unitSelect } from "@/api/platform/unit"; export default { diff --git a/src/views/system/score/index.vue b/src/views/system/score/province/index.vue similarity index 98% copy from src/views/system/score/index.vue copy to src/views/system/score/province/index.vue index bb56f27..45602dc 100644 --- a/src/views/system/score/index.vue +++ b/src/views/system/score/province/index.vue @@ -159,9 +159,9 @@ </template> <script> -import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/score"; -import {unitSelect} from "../../../api/platform/unit"; -import {publishSelect} from "../../../api/platform/publish"; +import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/check-score"; +import {unitSelect} from "@/api/platform/unit"; +import {publishSelect} from "@/api/platform/check-publish"; export default { name: "Score", diff --git a/src/views/system/check-template/index.vue b/src/views/system/template/default/index.vue similarity index 88% rename from src/views/system/check-template/index.vue rename to src/views/system/template/default/index.vue index 227f892..418ad37 100644 --- a/src/views/system/check-template/index.vue +++ b/src/views/system/template/default/index.vue @@ -86,8 +86,6 @@ <div v-else-if="scope.row.unitId === 3">瀵岄『鍘�,鑽e幙,楂樻柊鍖�,鑷祦浜曞尯,璐′簳鍖�,澶у畨鍖�,娌挎哗鍖�</div> </template> </el-table-column> - <el-table-column label="璋冩暣绯绘暟" align="center" prop="adjustCoefficient" /> - <el-table-column label="璋冩暣绯绘暟璁$畻鏂瑰紡" align="center" prop="adjustWay"/> <el-table-column label="鐘舵��" align="center" prop="status" /> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> @@ -121,6 +119,13 @@ <el-form-item label="妯℃澘鍚嶇О" prop="templateName"> <el-input v-model="form.templateName" placeholder="璇疯緭鍏ユā鏉垮悕绉�" /> </el-form-item> + <el-form-item label="鑰冩牳绫诲瀷" prop="examineCategory"> + <el-select v-model="form.examineCategory" placeholder="璇烽�夋嫨鑰冩牳绫诲瀷"> + <el-option label="鐪佸巺鑰冩牳" value="鐪佸巺鑰冩牳"/> + <el-option label="鍖哄幙鑰冩牳" value="鍖哄幙鑰冩牳"/> + <el-option label="杩愮淮鑰冩牳" value="鍏徃鑰冩牳"/> + </el-select> + </el-form-item> <el-form-item label="鑰冩牳瀵硅薄" prop="unitName"> <div class="block"> <span class="demonstration"></span> @@ -149,7 +154,7 @@ </div> </div> <div class="row-right"> - <div>鏉冮噸</div> + <div>鏁板��</div> <div class="margin-5"> <el-input type="number" v-model="form.weight"/> </div> @@ -162,21 +167,6 @@ <el-button type="success" @click="nextAdd" size="mini" plain>娣诲姞</el-button> </div> </div> - </el-form-item> - <el-form-item label="璋冩暣绯绘暟" prop="adjustCoefficient"> - <el-input v-model="form.adjustCoefficient" placeholder="璇疯緭鍏ョ郴鏁板��" /> - </el-form-item> - <el-form-item label="璋冩暣鏂瑰紡" prop="adjustWay"> - <el-select v-model="form.adjustWay" placeholder="璇烽�夋嫨璋冩暣绯绘暟璁$畻鏂瑰紡"> - <el-option - label="涔�" - value="*"> - </el-option> - <el-option - label="闄�" - value="/"> - </el-option> - </el-select> </el-form-item> <el-form-item label="鐘舵��" prop="status"> <el-radio v-model="form.status" label="use">鍚敤</el-radio> @@ -192,9 +182,9 @@ </template> <script> -import { listCheckTemplate, getCheckTemplate, delCheckTemplate, addCheckTemplate, updateCheckTemplate } from "@/api/platform/check-template"; -import { ruleSelect } from '../../../api/platform/check-rule' -import { unitSelect } from '../../../api/platform/unit' +import { listTemplate, getTemplate, delTemplate, addTemplate, updateTemplate } from "@/api/platform/default-template"; +// import { ruleSelect } from '@/api/platform/default-rule' +import { unitSelect } from '@/api/platform/unit' export default { name: "CheckTemplate", @@ -282,12 +272,6 @@ templateName: [ { required: true, message: "妯℃澘鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } ], - adjustCoefficient: [ - { required: true, message: "璋冩暣绯绘暟涓嶈兘涓虹┖", trigger: "blur" } - ], - adjustWay: [ - { required: true, message: "璋冩暣鏂瑰紡锛氫箻闄や笉鑳戒负绌�", trigger: "blur" } - ], } }; }, @@ -316,11 +300,11 @@ this.tempRuleFormList.push({"ruleId": null, "weight": null}) }, // 鑰冩牳瑙勫垯涓嬫媺鏁版嵁 - selectCheckRule() { - ruleSelect().then(res => { - this.ruleList = res.data; - }) - }, + // selectCheckRule() { + // ruleSelect().then(res => { + // this.ruleList = res.data; + // }) + // }, // 杩愮淮鍏徃涓嬫媺鏁版嵁 selectUnit() { unitSelect().then(res => { @@ -334,7 +318,7 @@ this.queryParams["start"] = this.daterangeCreateTime[0]; this.queryParams["end"] = this.daterangeCreateTime[1]; } - listCheckTemplate(this.queryParams).then(response => { + listTemplate(this.queryParams).then(response => { this.checkTemplateList = response.data; this.total = response.total; this.loading = false; @@ -385,7 +369,7 @@ handleUpdate(row) { this.reset(); const id = row.id || this.ids - getCheckTemplate(id).then(response => { + getTemplate(id).then(response => { this.form = response.data; this.tempRuleFormList = this.form.ruleFormList; this.ruleFormList = this.form.ruleFormList; @@ -399,7 +383,7 @@ if (valid) { this.form.ruleFormList = this.tempRuleFormList; if (this.form.id != null) { - updateCheckTemplate(this.form).then(response => { + updateTemplate(this.form).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛"); this.open = false; this.tempRuleFormList = []; @@ -407,7 +391,7 @@ this.getList(); }); } else { - addCheckTemplate(this.form).then(response => { + addTemplate(this.form).then(response => { this.$modal.msgSuccess("鏂板鎴愬姛"); this.open = false; this.getList(); @@ -420,7 +404,7 @@ handleDelete(row) { const ids = row.id || this.ids; this.$modal.confirm('鏄惁纭鍒犻櫎鑰冩牳妯℃澘缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return delCheckTemplate(ids); + return delTemplate(ids); }).then(() => { this.getList(); this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); diff --git a/src/views/system/check-template/index.vue b/src/views/system/template/index.vue similarity index 78% copy from src/views/system/check-template/index.vue copy to src/views/system/template/index.vue index 227f892..9fe7f3c 100644 --- a/src/views/system/check-template/index.vue +++ b/src/views/system/template/index.vue @@ -1,7 +1,7 @@ <template> <div class="app-container"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> - <el-form-item label="鐘舵��" prop="status"> + <!-- <el-form-item label="鐘舵��" prop="status"> <el-input v-model="queryParams.status" placeholder="璇疯緭鍏ョ姸鎬�" @@ -27,7 +27,17 @@ start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" ></el-date-picker> - </el-form-item> + </el-form-item> --> + <el-form-item label="鑰冩牳绫诲瀷" prop="examineCategory"> + <el-select v-model="queryParams.status" placeholder="鑰冩牳绫诲瀷" clearable @keyup.enter.native="handleQuery"> + <el-option + v-for="dict in dict.type.platform_examine_category" + :key="dict.value" + :label="dict.label" + :value="parseInt(dict.value)" + /> + </el-select> + </el-form-item> <el-form-item> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> @@ -44,7 +54,7 @@ @click="handleAdd" >鏂板</el-button> </el-col> - <el-col :span="1.5"> + <!-- <el-col :span="1.5"> <el-button type="success" plain @@ -63,7 +73,7 @@ :disabled="multiple" @click="handleDelete" >鍒犻櫎</el-button> - </el-col> + </el-col> --> <el-col :span="1.5"> <el-button type="warning" @@ -76,36 +86,19 @@ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> - <el-table v-loading="loading" :data="checkTemplateList" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="妯℃澘鍚嶇О" align="center" prop="templateName" width="220px"/> - <el-table-column label="鑰冩牳绫诲瀷" align="center" prop="examineCategory" /> - <el-table-column label="鑰冩牳瀵硅薄" align="center" prop="unitId" width="400px" > - <template slot-scope="scope"> - <div v-if="scope.row.unitId === 2">鎴愰兘x杩愮淮</div> - <div v-else-if="scope.row.unitId === 3">瀵岄『鍘�,鑽e幙,楂樻柊鍖�,鑷祦浜曞尯,璐′簳鍖�,澶у畨鍖�,娌挎哗鍖�</div> - </template> - </el-table-column> - <el-table-column label="璋冩暣绯绘暟" align="center" prop="adjustCoefficient" /> - <el-table-column label="璋冩暣绯绘暟璁$畻鏂瑰紡" align="center" prop="adjustWay"/> - <el-table-column label="鐘舵��" align="center" prop="status" /> - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope"> - <el-button - size="mini" - type="text" - icon="el-icon-edit" - @click="handleUpdate(scope.row)" - >淇敼</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - >鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> + <el-card class="box-card" v-for="item in checkTemplateList" :key="item"> + <div class="text item">妯℃澘鍚嶇О锛歿{ item.templateName }}</div> + <div class="text item">鑰冩牳绫诲瀷锛歿{ item.examineCategory == 0 ? '鐪佸巺鑰冩牳' : '鍖哄煙鑰冩牳' }}</div> + <div class="text item">鑰冩牳瀵硅薄锛歿{ item.deptId }}</div> + <div class="text item">鍙戝竷鐘舵�侊細{{ item.status == 0 ? '鍚敤' : '鍋滅敤' }}</div> + <div class="bottom clearfix"> + <el-button type="text" class="button" @click="">瀹℃牳</el-button> + <el-button type="text" class="button" @click="">鍙戝竷</el-button> + <el-button type="text" class="button" @click="">澶嶅埗</el-button> + <el-button type="text" class="button" @click="handleUpdate(item)">淇敼</el-button> + <el-button type="text" class="button" @click="handleDelete(item)">鍒犻櫎</el-button> + </div> + </el-card> <pagination v-show="total>0" @@ -121,16 +114,25 @@ <el-form-item label="妯℃澘鍚嶇О" prop="templateName"> <el-input v-model="form.templateName" placeholder="璇疯緭鍏ユā鏉垮悕绉�" /> </el-form-item> - <el-form-item label="鑰冩牳瀵硅薄" prop="unitName"> - <div class="block"> - <span class="demonstration"></span> - <el-cascader - v-model="value" - :options="options" - :props = "props" - @change="handleChange"></el-cascader> - </div> - + <el-form-item label="鑰冩牳绫诲瀷" prop="examineCategory"> + <el-select v-model="form.examineCategory" placeholder="鑰冩牳绫诲瀷"> + <el-option + v-for="dict in dict.type.platform_examine_category" + :key="dict.value" + :label="dict.label" + :value="parseInt(dict.value)" + /> + </el-select> + </el-form-item> + <el-form-item label="鑰冩牳瀵硅薄" prop="deptId"> + <el-select v-model="form.deptId" multiple placeholder="璇烽�夋嫨"> + <el-option + v-for="item in areaList" + :key="item.id" + :label="item.value" + :value="item.id"> + </el-option> + </el-select> </el-form-item> <el-form-item label="鑰冩牳瑙勫垯" prop="tempRuleFormList"> <div class="row-warp"> @@ -193,53 +195,17 @@ <script> import { listCheckTemplate, getCheckTemplate, delCheckTemplate, addCheckTemplate, updateCheckTemplate } from "@/api/platform/check-template"; -import { ruleSelect } from '../../../api/platform/check-rule' -import { unitSelect } from '../../../api/platform/unit' +// import { ruleSelect } from '@/api/platform/check-rule' + import { areaSelect } from '@/api/system/dept' export default { name: "CheckTemplate", + dicts: ['platform_audit_state','platform_examine_category','platform_rule_category'], data() { return { props: { multiple: true }, value: [], - options: [{ - value: 'city', - label: '鍖哄幙', - children: [{ - value: 'fushun', - label: '瀵岄『鍘�', - }, { - value: 'rong', - label: '鑽e幙', - },{ - value: 'gaoxin', - label: '楂樻柊鍖�', - },{ - value: 'ziliujing', - label: '鑷祦浜曞尯', - },{ - value: 'gongjing', - label: '璐′簳鍖�', - },{ - value: 'daan', - label: '澶у畨鍖�', - },{ - value: 'yantan', - label: '娌挎哗鍖�', - }, - ] - }, { - value: 'company', - label: '鍏徃', - children: [{ - value: 'yunwei', - label: '鎴愰兘x杩愮淮', - }, { - value: 'yunwei2', - label: '鑷础x杩愮淮', - }, ] - }, - ], + areaList:[], ruleList: [], unitList: [], // 涓存椂瑙勫垯琛ㄥ崟 @@ -293,8 +259,11 @@ }, created() { this.getList(); + this.areaSelect(); this.selectCheckRule(); - this.selectUnit(); + if (typeof this.form.deptId === 'string' && this.form.deptId.length > 0) { + this.form.deptId = this.form.deptId.split(',').map(Number); // 鍋囪deptId鐨勫�兼槸浠ラ�楀彿鍒嗛殧鐨勬暟瀛楀瓧绗︿覆 + } }, methods: { handleChange(value) { @@ -322,9 +291,9 @@ }) }, // 杩愮淮鍏徃涓嬫媺鏁版嵁 - selectUnit() { - unitSelect().then(res => { - this.unitList = res.data; + areaSelect() { + areaSelect().then(res => { + this.areaList = res.data; }) }, /** 鏌ヨ鑰冩牳妯℃澘鍒楄〃 */ @@ -335,7 +304,7 @@ this.queryParams["end"] = this.daterangeCreateTime[1]; } listCheckTemplate(this.queryParams).then(response => { - this.checkTemplateList = response.data; + this.checkTemplateList = response.rows; this.total = response.total; this.loading = false; }); @@ -461,4 +430,18 @@ display: flex; flex-direction: row; } +.text { + font-size: 14px; + } + + .item { + margin-bottom: 18px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .box-card { + width: 20%; + } </style> diff --git a/src/views/system/threshold/index.vue b/src/views/system/threshold/index.vue index a334492..5b536ca 100644 --- a/src/views/system/threshold/index.vue +++ b/src/views/system/threshold/index.vue @@ -24,10 +24,17 @@ </template> </el-table-column> <el-table-column label="瓒呮椂澶╂暟" align="center" prop="timeout"/> - <el-table-column label="鎸囨爣" align="center" prop="indicator"> + <el-table-column label="宸ュ崟闃堝��" align="center" prop="indicator"> <template slot-scope="scope"> <div v-for="item in JSON.parse(scope.row.indicator)" :key="item"> {{ item.label }}锛歿{ item.value }} + </div> + </template> + </el-table-column> + <el-table-column label="涓嬪彂闃堝��" align="center" prop="indicator"> + <template slot-scope="scope"> + <div v-for="item in JSON.parse(scope.row.indicator)" :key="item"> + {{ item.label }}锛歿{ item.value2 }} </div> </template> </el-table-column> @@ -75,7 +82,8 @@ <el-input type="number" min="0" max="1000" v-model="form.timeout" placeholder="璇疯緭鍏ヨ秴鏃跺ぉ鏁�"/> </el-form-item> <el-form-item :label="indicator.label" prop="indexOneValue" v-for="indicator in indicators" label-width="150px"> - <el-input class="el-input-width" v-model="indicator.value" :placeholder="'璇疯緭鍏�' + indicator.label"/> + <el-input class="el-input-half-width" v-model="indicator.value" placeholder="宸ュ崟闃堝��"/> + <el-input style="float: right;" class="el-input-half-width" v-model="indicator.value2" placeholder="涓嬪彂闃堝��"/> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> @@ -325,3 +333,8 @@ } } </script> +<style> +.el-input-half-width { + width: calc(50% - 6px); /* 鍑忓幓涓�浜涢棿闅� */ +} +</style> \ No newline at end of file diff --git a/src/views/system/unit/index.vue b/src/views/system/unit/index.vue index dc3bf74..4409bfa 100644 --- a/src/views/system/unit/index.vue +++ b/src/views/system/unit/index.vue @@ -261,6 +261,8 @@ /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { this.daterangeCreateTime = []; + this.queryParams.start = null; + this.queryParams.end = null; this.resetForm("queryForm"); this.handleQuery(); }, @@ -318,7 +320,7 @@ }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { - this.download('system/unit/export', { + this.download('yw-unit/export', { ...this.queryParams }, `unit_${new Date().getTime()}.xlsx`) } diff --git a/src/views/system/video/index.vue b/src/views/system/video/index.vue index 8df8e43..22bfe76 100644 --- a/src/views/system/video/index.vue +++ b/src/views/system/video/index.vue @@ -12,31 +12,31 @@ <el-col :xl="14" :lg="14" :md="12" :sm="14" :xs="16"> <div class="dashboard"> <div class="dashboard-item"> - <h3 style="color: #5C9BF8">{{ totalPosts }}</h3> + <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3> <p>璁惧鎬绘暟</p > </div> <div class="dashboard-item"> - <h3 style="color: #3eba45">{{ totalMembers }}</h3> + <h3 style="color: #3eba45">{{ count.totalMembers }}</h3> <p>姝e父鏁�</p > </div> <div class="dashboard-item"> - <h3 style="color: #fe640d">{{ postsPercentage }}</h3> + <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3> <p>寮傚父鏁�</p > </div> <div class="dashboard-item"> - <h3>{{ totalViews }}</h3> + <h3>{{ count.totalViews }}</h3> <p>鐢熸垚寮傚父宸ュ崟鏁�</p > </div> <div class="dashboard-item"> - <h3>{{ noStore }}</h3> + <h3>{{ count.noStore }}</h3> <p>鏃犲瓨鍌�</p > </div> <div class="dashboard-item"> - <h3>{{ partStore }}</h3> + <h3>{{ count.partStore }}</h3> <p>閮ㄥ垎瀛樺偍</p > </div> <div class="dashboard-item"> - <h3>{{ viewsPercentage }}%</h3> + <h3>{{ count.viewsPercentage }}%</h3> <p>璁惧杩愯鐜�</p > </div> </div> @@ -44,7 +44,7 @@ </el-row> </el-card> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> <el-form-item label="鍏抽敭瀛�" prop="name"> <el-input v-model="queryParams.name" @@ -123,8 +123,8 @@ <el-table-column type="selection" align="center" /> <el-table-column label="璁惧鍚嶇О" align="center" prop="name" width="280" fixed/> <el-table-column label="璁惧缂栫爜" align="center" prop="serialNumber" width="180"/> - <el-table-column label="鏍囩" align="center" prop="tag" width="180" v-if="columns[0].visible"/> - <el-table-column label="鍖哄煙" align="center" prop="region" width="180" v-if="columns[1].visible"/> + <el-table-column label="鏍囩" align="center" prop="publicSecurity" width="180" v-if="columns[0].visible"/> + <el-table-column label="鍖哄煙" align="center" prop="address" width="180" v-if="columns[1].visible"/> <el-table-column label="璁惧鐘舵��" align="center" prop="onState" v-if="columns[2].visible"> <template slot-scope="scope"> <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/> @@ -167,21 +167,19 @@ <el-col :span="12"> <el-form-item label="璁惧缂栫爜锛�">{{ form.serialNumber }}</el-form-item> <el-form-item label="璁惧鍚嶇О锛�">{{ form.name }} </el-form-item> - <el-form-item label="鏍囩锛�">{{ form.tag }} </el-form-item> - <el-form-item label="鍖哄煙锛�">{{ form.region }} </el-form-item> + <el-form-item label="鍦板尯锛�">{{ form.address }} </el-form-item> + <el-form-item label="涓婃姤閮ㄩ棬锛�">{{ form.deptName }} </el-form-item> <el-form-item label="璁惧鐘舵�侊細"> <div v-if="form.onState === 1">鍙敤</div> <div v-else-if="form.onState === 2">涓嶅彲鐢�</div> </el-form-item> </el-col> <el-col :span="24"> + <el-form-item label="鍦板潃锛�">{{ form.address }}</el-form-item> <el-form-item label="鏄惁鐢熸垚寮傚父宸ュ崟锛�"> <div v-if="form.defaultOrder === 1">鏄�</div> <div v-else-if="form.defaultOrder === 2">鍚�</div> </el-form-item> - </el-col> - <el-col :span="24"> - <el-form-item label="寮傚父鍘熷洜锛�">{{ form.reason }}</el-form-item> </el-col> <el-col :span="24"> <el-form-item label="瀹夎鏃堕棿锛�">{{ form.installedTime }}</el-form-item> @@ -190,13 +188,13 @@ <el-form-item label="绠$悊鍗曚綅锛�">{{ form.managementUnit }}</el-form-item> </el-col> <el-col :span="24"> - <el-form-item label="淇′护鏃跺欢(ms)锛�">{{ form.sipDelay }}</el-form-item> + <el-form-item label="淇′护鏃跺欢(ms)锛�"></el-form-item> </el-col> <el-col :span="24"> - <el-form-item label="瑙嗛鏃跺欢(ms)锛�">{{ form.videoDelay }}</el-form-item> + <el-form-item label="瑙嗛鏃跺欢(ms)锛�"></el-form-item> </el-col> <el-col :span="24"> - <el-form-item label="鍏抽敭甯ф椂寤�(ms)锛�">{{ form.iframeDelay }}</el-form-item> + <el-form-item label="鍏抽敭甯ф椂寤�(ms)锛�"></el-form-item> </el-col> </el-row> </el-form> @@ -208,8 +206,7 @@ </template> <script> -import { listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/video-monitor"; -import {getCountyList} from "@/api/platform/region"; +import { videoCount, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor"; export default { name: "Monitor", dicts: ['sys_normal_disable', 'platform_yes_no','camera_state'], @@ -227,14 +224,15 @@ { key: 7, label: `瑙嗛鏃跺欢`, visible: true }, { key: 8, label: `鍏抽敭甯ф椂寤禶, visible: true } ], - totalPosts: 6250, - totalMembers: 6008, - postsPercentage: 51, - totalViews: 17, - noStore: 47, - partStore: 56, - viewsPercentage: 96.12, - totalErrors: 0, + count: { + totalPosts: 0, + totalMembers: 0, + postsPercentage: 0, + totalViews: 0, + noStore: 0, + partStore: 0, + viewsPercentage: 0 + }, // 閬僵灞� loading: true, // 閫変腑鏁扮粍 @@ -264,6 +262,7 @@ installedTime: null, managementUnit: null, defaultOrder: null, + cameraFunType: 1, }, // 琛ㄥ崟鍙傛暟 form: {}, @@ -285,9 +284,9 @@ }; }, created() { + this.getVideoCount(); this.getList(); this.getCountyList(); - }, methods: { /** 鏌ヨ璁惧璧勪骇鍒楄〃 */ @@ -297,6 +296,12 @@ this.monitorList = response.rows; this.total = response.total; this.loading = false; + }); + }, + /** 鏌ヨ璁惧璧勪骇缁熻鏁� */ + getVideoCount() { + videoCount('1').then(response => { + this.count = response.data; }); }, // 鍙栨秷鎸夐挳 @@ -323,6 +328,7 @@ this.queryParams.pageNum = 1; this.queryParams.cameraFunType = 1; this.getList(); + this.getVideoCount(); }, /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { diff --git a/src/views/system/work-order/distribute/index.vue b/src/views/system/work-order/distribute/index.vue index 6ae9267..45fae99 100644 --- a/src/views/system/work-order/distribute/index.vue +++ b/src/views/system/work-order/distribute/index.vue @@ -83,6 +83,13 @@ end-placeholder="缁撴潫鏃ユ湡"> </el-date-picker> </el-form-item> + <el-form-item label="鏁呴殰绫诲瀷" prop="errorType"> + <el-select v-model="fastDistributeForm.errorType"> + <el-option label="甯傛斂鏂藉伐" value="甯傛斂鏂藉伐"/> + <el-option label="璁惧鏁呴殰" value="璁惧鏁呴殰"/> + <el-option label="璁惧閬楀け" value="璁惧閬楀け"/> + </el-select> + </el-form-item> <el-form-item label="鏁伴噺闄愬埗" prop="fastNumLimit"> <el-input v-model="fastDistributeForm.fastNumLimit" size="small" type="number" placeholder="姝ゆ宸ュ崟涓嬪彂鏈�澶ф暟閲�"></el-input> </el-form-item> @@ -92,7 +99,8 @@ </el-form> <el-button slot="reference" type="primary" size="small">蹇嵎涓嬪彂</el-button> </el-popover> - <el-button size="small" type="primary" @click="page" class="op">鍒锋柊</el-button> + <el-button size="small" type="primary" @click="page">鍒锋柊</el-button> + <el-button size="small" type="primary" @click="handleAdd">鏂板</el-button> </el-col> </el-row> @@ -117,11 +125,58 @@ </el-col> </el-row> + + <!-- 娣诲姞鎴栦慨鏀广�愯濉啓鍔熻兘鍚嶇О銆戝璇濇 --> + <el-dialog :title="detailName" :visible.sync="open" width="500px" append-to-body> + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> + <el-form-item label="杩愮淮鍗曚綅" prop="unitId"> + <el-select v-model="form.unitId" placeholder="璇烽�夋嫨"> + <el-option + v-for="item in unitList" + :key="item.id" + :label="item.value" + :value="item.id"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="宸ュ崟鏉ユ簮" prop="source"> + <el-select + v-model="form.source" + filterable + remote + reserve-keyword + placeholder="璇烽�夋嫨鏉ユ簮" + :remote-method="remoteGetPoints" + :loading="selectLoading"> + <el-option + v-for="item in pointList" + :key="item.id" + :label="item.value" + :value="item.value"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="鏁呴殰绫诲瀷" prop="errorType"> + <el-select v-model="form.errorType"> + <el-option label="甯傛斂鏂藉伐" value="甯傛斂鏂藉伐"/> + <el-option label="璁惧鏁呴殰" value="璁惧鏁呴殰"/> + <el-option label="璁惧閬楀け" value="璁惧閬楀け"/> + </el-select> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + </div> </template> <script> -import {distributeWorkOrder, fastDistribute} from '@/api/platform/work-order' +import {distributeWorkOrder, fastDistribute, addWorkOrder, updateWorkOrder} from '@/api/platform/work-order' +import {unitSelect} from "@/api/platform/unit"; +import { pointSelectData } from "@/api/platform/point"; export default { name: 'index', data() { @@ -169,6 +224,9 @@ fastNumLimit: [ { required: true, message: "璇疯緭鍏ュ揩閫熷垎鍙戞暟閲忛檺鍒�", trigger: "change" } ], + errorType: [ + { required: true, message: "璇锋晠闅滅被鍨�", trigger: "change" } + ], }, queryParams: { unitId: null, @@ -182,10 +240,37 @@ activeIndex: '0', loading: false, workOrderList: [], + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 琛ㄥ崟鍙傛暟 + form: { + }, + // 涓嬫媺鍔犺浇 + selectLoading: false, + // 鐐逛綅list + pointList: [], + // 琛ㄥ崟鏍¢獙 + rules: { + source: [ + { required: true, message: "宸ュ崟鏉ユ簮涓嶈兘涓虹┖", trigger: "blur" } + ], + workOrderNo: [ + { required: true, message: "宸ュ崟鍙蜂笉鑳戒负绌�", trigger: "blur" } + ], + unitId: [ + { required: true, message: "杩愮淮鍗曚綅涓嶈兘涓虹┖", trigger: "blur" } + ], + errorType: [ + { required: true, message: "璇烽�夋嫨鏁呴殰绫诲瀷", trigger: "blur" } + ], + } } }, mounted() { this.page(); + this.selectUnit(); }, methods: { submitSetting() { @@ -264,6 +349,63 @@ handleSelectionChange(selection) { this.multipleSelection = selection.map(item => item.id) }, + /** 鏂板鎸夐挳鎿嶄綔 */ + handleAdd() { + this.reset(); + this.open = true; + this.title = "娣诲姞鍚堝悓"; + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = {}; + this.resetForm("form"); + }, + /** 鎻愪氦鎸夐挳 */ + submitForm() { + this.$refs["form"].validate(valid => { + if (valid) { + if (this.form.id != null) { + updateWorkOrder(this.form).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.page(); + }); + } else { + addWorkOrder(this.form).then(response => { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.page(); + }); + } + } + }); + }, + // 鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.reset(); + }, + // 杩愮淮鍏徃涓嬫媺鏁版嵁 + selectUnit() { + unitSelect().then(res => { + this.unitList = res.data; + }) + }, + // 杩滅▼鎼滅储鐐逛綅 + remoteGetPoints(query) { + if (query !== '') { + this.selectLoading = true; + let data = { + "keyword": query + } + pointSelectData(data).then(res => { + this.pointList = res.data; + this.selectLoading = false; + }) + } else { + this.pointList = []; + } + }, } } </script> diff --git a/src/views/system/work-order/index.vue b/src/views/system/work-order/index.vue index 77c4441..ad79c56 100644 --- a/src/views/system/work-order/index.vue +++ b/src/views/system/work-order/index.vue @@ -10,6 +10,12 @@ @keyup.enter.native="handleQuery" /> </el-form-item> + <el-form-item label="鏁呴殰绫诲瀷" prop="workOrderNo"> + <el-select v-model="queryParams.errorType" placeholder="鏁呴殰绫诲瀷" clearable @clear="handleQuery"> + <el-option label="甯傛斂鏂藉伐" value="甯傛斂鏂藉伐"></el-option> + <el-option label="璁惧閬楀け" value="璁惧閬楀け"></el-option> + </el-select> + </el-form-item> <el-form-item label="杩愮淮澶勭悊鏃堕棿"> <el-date-picker clearable @@ -35,15 +41,18 @@ <el-image :preview-src-list="['https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357']" fit="cover" src="https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357" class="image"/> <div style="padding-right: 10px;padding-top: 10px;float: right;"> <el-row> + <el-col :span="24" class="time">鏁呴殰绫诲瀷锛�<el-tag size="small" type="danger">甯傛斂鏂藉伐</el-tag></el-col> + </el-row> + <el-row class="work-order-item"> <el-col class="time" :span="24">杩愮淮浜哄憳锛歿{ item.ywPeopleName }}</el-col> </el-row> - <el-row style="margin-top: 5px"> + <el-row class="work-order-item"> <el-col class="time" :span="24">杩愮淮鍗曚綅锛歿{ item.unitName }}</el-col> </el-row> - <el-row style="margin-top: 5px"> + <el-row class="work-order-item"> <el-col :span="24" class="time">宸ュ崟缂栧彿锛歿{ item.workOrderNo }}</el-col> </el-row> - <el-row style="margin-top: 5px"> + <el-row> <el-col :span="24" class="time">澶勭悊鏃堕棿锛歿{ item.ywHandleTime }}</el-col> </el-row> <el-row> @@ -63,12 +72,12 @@ <!-- type="text"--> <!-- @click="handleYwResult(scope.row)"--> <!-- >杩愮淮缁撴灉</el-button>--> - <el-button - size="mini" - type="text" - @click="handleCheckResult(item)" - v-hasPermi="['work:order:result']" - >妫�娴嬬粨鏋�</el-button> +<!-- <el-button--> +<!-- size="mini"--> +<!-- type="text"--> +<!-- @click="handleCheckResult(item)"--> +<!-- v-hasPermi="['work:order:result']"--> +<!-- >妫�娴嬬粨鏋�</el-button>--> <el-button size="mini" type="text" @@ -745,15 +754,17 @@ </script> <style scoped> - +.work-order-item { + margin-bottom: 5px; +} .time { font-size: 13px; color: #999; } .image { - width: 125px; - height: 125px; + width: 165px; + height: 150px; padding: 10px; } </style> diff --git a/vue.config.js b/vue.config.js index e61f74f..0dae064 100644 --- a/vue.config.js +++ b/vue.config.js @@ -7,7 +7,7 @@ const CompressionPlugin = require('compression-webpack-plugin') -const name = process.env.VUE_APP_TITLE || '鑷础鍏畨澶╃綉杩愮淮骞冲彴' // 缃戦〉鏍囬 +const name = process.env.VUE_APP_TITLE || '杩愮淮鑰冩牳骞冲彴' // 缃戦〉鏍囬 const port = process.env.port || process.env.npm_config_port || 80 // 绔彛 -- Gitblit v1.8.0