From 5b6951defb238197a46407a4db617f55fc99391a Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期五, 15 十一月 2024 11:39:41 +0800 Subject: [PATCH] 白名单故障类型 --- src/api/platform/threshold.js | 52 ++++++++++++++++++++++++++ src/views/system/work-order/threshold/index.vue | 23 +++++++---- src/views/system/check/result/detail/index.vue | 1 src/api/platform/work-order.js | 43 +-------------------- 4 files changed, 70 insertions(+), 49 deletions(-) diff --git a/src/api/platform/threshold.js b/src/api/platform/threshold.js index ef0f6b5..45c4286 100644 --- a/src/api/platform/threshold.js +++ b/src/api/platform/threshold.js @@ -98,3 +98,55 @@ timeout: 150000 }) } + +// 鑾峰彇宸ュ崟鐧藉悕鍗曞垪琛� +export function getWhiteList(query) { + return request({ + url: '/threshold/white/page', + method: 'post', + data: query + }) +} + +// 鑾峰彇宸ュ崟鐧藉悕鍗曡鎯� +export function getWhite(id) { + return request({ + url: '/threshold/white/'+id, + method: 'get', + }) +} +// 鏂板宸ュ崟鐧藉悕鍗� +export function addWhiteList(data) { + return request({ + url: '/threshold/white/add', + method: 'post', + data: data + }) +} +// 淇敼宸ュ崟鐧藉悕鍗� +export function updateWhite(data) { + return request({ + url: '/threshold/white/update', + method: 'post', + data: data + }) +} + +// 鎵归噺鍒犻櫎宸ュ崟鐧藉悕鍗� +export function bathDelete(data) { + return request({ + url: '/threshold/white/batchDelete', + method: 'delete', + data: data + }) +} + +// 瀵煎嚭 +export function whiteExport(param) { + return request({ + url: '/threshold/white/export', + method: 'get', + params: param, + responseType: 'blob' + }) +} diff --git a/src/api/platform/work-order.js b/src/api/platform/work-order.js index e61721c..b857855 100644 --- a/src/api/platform/work-order.js +++ b/src/api/platform/work-order.js @@ -145,47 +145,7 @@ timeout: 120 * 1000, }) } -// 鑾峰彇宸ュ崟鐧藉悕鍗曞垪琛� -export function getWhiteList(query) { - return request({ - url: '/work-order/white/page', - method: 'post', - data: query - }) -} -// 鑾峰彇宸ュ崟鐧藉悕鍗曡鎯� -export function getWhite(id) { - return request({ - url: '/work-order/white/'+id, - method: 'get', - }) -} -// 鏂板宸ュ崟鐧藉悕鍗� -export function addWhiteList(data) { - return request({ - url: '/work-order/white/add', - method: 'post', - data: data - }) -} -// 淇敼宸ュ崟鐧藉悕鍗� -export function updateWhite(data) { - return request({ - url: '/work-order/white/update', - method: 'post', - data: data - }) -} - -// 鎵归噺鍒犻櫎宸ュ崟鐧藉悕鍗� -export function bathDelete(data) { - return request({ - url: '/work-order/white/batchDelete', - method: 'delete', - data: data - }) -} // 鎵归噺鍒犻櫎宸ュ崟 export function batchDelWorkOrder(data) { @@ -203,3 +163,6 @@ method: 'get', }) } + + + diff --git a/src/views/system/check/result/detail/index.vue b/src/views/system/check/result/detail/index.vue index 895d76d..0c1dd20 100644 --- a/src/views/system/check/result/detail/index.vue +++ b/src/views/system/check/result/detail/index.vue @@ -83,6 +83,7 @@ <pagination v-show="total>0" :total="total" + :auto-scroll="false" :page.sync="queryParamsList.pageNum" :limit.sync="queryParamsList.pageSize" @pagination="getList" diff --git a/src/views/system/work-order/threshold/index.vue b/src/views/system/work-order/threshold/index.vue index 7601a9b..1139da9 100644 --- a/src/views/system/work-order/threshold/index.vue +++ b/src/views/system/work-order/threshold/index.vue @@ -347,6 +347,7 @@ <pagination v-show="total>0" :total="total" + :auto-scroll="false" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getWhiteList" @@ -411,22 +412,19 @@ getThreshold, updateThreshold, importData, -} from "@/api/platform/threshold"; -import { editCar, editFace, getCar, getFace, getVideo, -} from "../../../../api/platform/threshold"; - -import { getWhiteList, getWhite, addWhiteList, bathDelete, - updateWhite -} from "@/api/platform/work-order"; + updateWhite, + whiteExport +} from "@/api/platform/threshold"; + import { pointSelectData } from "@/api/platform/point"; export default { dicts: ["image_qualify", "video_qualify", "error_type"], @@ -434,6 +432,7 @@ data() { return { download: false, + scrollPosition: 0, // 鐢ㄤ簬淇濆瓨婊氬姩浣嶇疆 // 涓嬫媺鍔犺浇 selectLoading: false, ifEditVideo: false, @@ -592,7 +591,7 @@ }, handleExport() { this.download = true - exportData(this.queryParams).then(res => { + whiteExport().then(res => { // 灏嗕簩杩涘埗鏁版嵁杞崲涓� Blob 瀵硅薄 let blob = new Blob([res], { type: 'application/octet-stream' }); @@ -703,6 +702,7 @@ }); }, getWhiteList() { + // 淇濆瓨褰撳墠婊氬姩浣嶇疆 this.loading = true; getWhiteList(this.queryParams).then((response) => { this.workOrderWhiteList = response.data; @@ -1031,6 +1031,8 @@ this.upload = false this.fileList = [] this.getWhiteList() + }).catch(()=>{ + this.upload = false }) } } @@ -1077,6 +1079,9 @@ .content-warp { margin-top: 10px; } - +.bottom_ { + width: 100%; + margin-bottom: 8px; +} </style> -- Gitblit v1.8.0