From 54b5fa2047324b81b6d2ee7f830693267f946c0a Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期三, 10 一月 2024 17:45:54 +0800 Subject: [PATCH] 1. 编写数据源检查模块 --- src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue | 68 +++++++++++++++++++++++++++------- 1 files changed, 54 insertions(+), 14 deletions(-) diff --git a/src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue b/src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue index 9217bc3..3456d9c 100644 --- a/src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue +++ b/src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue @@ -62,6 +62,9 @@ <script> import evaluateApi from '@/api/fysp/evaluateApi'; import taskApi from '@/api/fysp/taskApi'; +import userMapApi from '@/api/fysp/userMapApi'; +import problemApi from '@/api/fysp/problemApi'; +import complaintApi from '@/api/fytz/complaintApi'; /** * 鐢熸垚涓�椤规暟鎹簮妫�鏌ヨ褰� @@ -98,21 +101,17 @@ emits: ['update:modelValue'], data() { return { - areaInfo: { - _locations: '', - _scenetype: '', - time: '', - sourcetype: '' - }, + areaInfo: {}, // 鏁版嵁婧愭鏌ヨ褰� checkResults: [ + // 鍖哄煙鑼冨洿鍐呯殑鑷姩璇勪及瑙勫垯琛ㄦ槸鍚﹀瓨鍦� baseCheckItem( '鑷姩璇勪及瑙勫垯琛�', '', () => { const param = { taskTypeId: 99, - scensetypeid: this.areaInfo._scenetype.value + ...this.areaInfo }; return evaluateApi.fetchEvaluationRule(param).then((res) => { return res.data.length > 0; @@ -120,12 +119,39 @@ }, true ), - baseCheckItem('鐜板満鐩戠宸℃煡鎬讳换鍔�', '', () => {}), + // 鍖哄煙鑼冨洿鍐呯殑鐩戠浠诲姟鏄惁瀛樺湪 + baseCheckItem('鐜板満鐩戠宸℃煡鎬讳换鍔�', '', () => { + return taskApi.fetchTopTasks(this.areaInfo).then((res) => { + return res.data.length > 0; + }); + }), + // 鍖哄煙鑼冨洿鍐呯殑鐩戞祴鏁版嵁鏄惁瀛樺湪銆佹暟鎹椂闂磋法搴︽槸鍚﹀畬鏁淬�佹暟鎹殑鍒濇鍒嗘瀽鏄惁瀹屾垚 baseCheckItem('鐜板満鐩戞祴鏁版嵁', '', () => {}), - baseCheckItem('鐩戠鐐逛綅涓庣洃娴嬬偣鍖归厤', '', () => {}), - baseCheckItem('鐜板満鐩戠闂绫诲瀷', '', () => {}), - baseCheckItem('淇¤鎶曡瘔', '', () => {}), - baseCheckItem('琛屾斂澶勭綒', '', () => {}) + // 鍖哄煙鑼冨洿鍐呯殑姣忎釜鐩戠鐐逛綅涓庣洃娴嬩华鍣ㄧ殑鍖归厤璁板綍鏄惁瀛樺湪锛岀己澶辨儏鍐电瓑 + baseCheckItem('鐩戠鐐逛綅涓庣洃娴嬬偣鍖归厤', '', () => { + userMapApi.fetchDeviceMap(this.areaInfo).then((res) => { + return res.data.length > 0; + }); + }), + // 鍖哄煙鑼冨洿鍐呯殑鐩戠闂閰嶇疆琛ㄦ槸鍚﹀瓨鍦� + baseCheckItem('鐜板満鐩戠闂绫诲瀷', '', () => { + const param = { + cityCode: this.areaInfo.citycode, + districtCode: this.areaInfo.districtcode, + sceneTypeId: this.areaInfo.scensetypeid + } + problemApi.fetchProblemType(param).then((res) => { + return res.length > 0; + }); + }), + // 鍖哄煙鑼冨洿鍐呯殑淇¤鎶曡瘔璁板綍鏄惁瀛樺湪锛屽彲闅忔椂琛ュ厖 + baseCheckItem('淇¤鎶曡瘔', '', () => { + complaintApi.fetchComplaints(); + }), + // 鍖哄煙鑼冨洿鍐呯殑琛屾斂澶勭綒璁板綍鏄惁瀛樺湪锛屽彲闅忔椂琛ュ厖 + baseCheckItem('琛屾斂澶勭綒', '', () => { + complaintApi.fetchPunishment(); + }) ] }; }, @@ -162,8 +188,22 @@ } }, // 寮�濮嬫鏌ヤ换鍔� - startCheck(v) { - this.areaInfo = v; + startCheck(value) { + const v = value.value + this.areaInfo = { + provincecode: v._locations.pCode, + provincename: v._locations.pName, + citycode: v._locations.cCode, + cityname: v._locations.cName, + districtcode: v._locations.dCode, + districtname: v._locations.dName, + towncode: v._locations.tCode, + townname: v._locations.tName, + starttime: v.time, + scensetypeid: v._scenetype.value, + online: true, + sourceType: v.sourceType, + }; this.checkResults.forEach((e) => { e.fetch(); }); -- Gitblit v1.9.3