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