From 440522ea896377c45ffd80f4b70927d27e701c64 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 25 十二月 2023 17:30:30 +0800
Subject: [PATCH] 编写评估任务模块逻辑,未完成

---
 src/views/fysp/evaluation/components/precheck/CompCheckSource.vue |  115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 111 insertions(+), 4 deletions(-)

diff --git a/src/views/fysp/evaluation/components/precheck/CompCheckSource.vue b/src/views/fysp/evaluation/components/precheck/CompCheckSource.vue
index 49ed8e9..1ddbc54 100644
--- a/src/views/fysp/evaluation/components/precheck/CompCheckSource.vue
+++ b/src/views/fysp/evaluation/components/precheck/CompCheckSource.vue
@@ -1,10 +1,47 @@
 <template>
   <el-card shadow="never">
-    Never2
+    <template #header>
+      <div><el-text tag="b" size="large">鏁版嵁婧愭鏌�</el-text></div>
+      <el-text size="small" type="info">妫�鏌ヨ瘎浼版墍闇�鏁版嵁婧愭槸鍚﹀畬鏁�</el-text>
+    </template>
+    <FormCol>
+      <el-form-item align="middle" v-for="(v, i) in checkResults" :key="i">
+        <el-col :span="14">
+          <el-row align="middle">
+            <el-text size="default" :class="v.required ? 'required' : 'not-required'">*</el-text>
+            <el-text size="default">{{ v.name }}</el-text>
+          </el-row>
+        </el-col>
+        <el-col :span="5">
+          <el-row align="middle">
+            <el-space>
+              <template v-if="v.loading">
+                <el-icon class="is-loading"><Loading /></el-icon>
+                <el-text size="default" type="default">妫�鏌ヤ腑...</el-text>
+              </template>
+              <template v-else-if="v.pass">
+                <el-icon color="var(--el-color-success)"><Check /></el-icon>
+                <el-text size="default" type="success">閫氳繃</el-text>
+              </template>
+              <template v-else>
+                <el-icon color="var(--el-color-danger)"><Close /></el-icon>
+                <el-text size="default" type="danger">缂哄け</el-text>
+              </template>
+            </el-space>
+          </el-row>
+        </el-col>
+        <el-col :span="5">
+          <el-button v-if="!v.pass" type="primary" size="small" @click="goto(v.path)">
+            鍘诲畬鍠�
+            <el-icon style="margin-left: 4px"><Right /></el-icon>
+          </el-button>
+        </el-col>
+      </el-form-item>
+    </FormCol>
     <template #footer>
       <el-row justify="space-around">
         <el-button type="primary" size="default" @click="lastStep">涓婁竴姝�</el-button>
-        <el-button type="primary" size="default" @click="nextStep">涓嬩竴姝�</el-button>
+        <el-button :disabled="!checkPass" type="primary" size="default" @click="nextStep">涓嬩竴姝�</el-button>
       </el-row>
     </template>
   </el-card>
@@ -22,18 +59,88 @@
   emits: ['update:modelValue'],
   data() {
     return {
-      
+      // 鏁版嵁婧愭鏌ヨ褰�
+      checkResults: [
+        {
+          required: true,
+          name: '鑷姩璇勪及瑙勫垯琛�',
+          loading: false,
+          pass: true,
+          path: ''
+        },
+        {
+          name: '鐜板満鐩戠宸℃煡鎬讳换鍔�',
+          loading: false,
+          pass: true,
+          path: ''
+        },
+        {
+          name: '鐜板満鐩戞祴鏁版嵁',
+          loading: false,
+          pass: false,
+          path: ''
+        },
+        {
+          name: '鐜板満鐩戠闂绫诲瀷',
+          loading: false,
+          pass: true,
+          path: ''
+        },
+        {
+          name: '淇¤鎶曡瘔',
+          loading: false,
+          pass: true,
+          path: ''
+        },
+        {
+          name: '琛屾斂澶勭綒',
+          loading: false,
+          pass: true,
+          path: ''
+        }
+      ]
     };
+  },
+  computed: {
+    /**
+     * 鍒ゆ柇鏁版嵁婧愭鏌ユ槸鍚﹂�氳繃
+     * 鍏ㄩ儴鍔犺浇瀹屾垚鍚庯紝蹇呰椤瑰繀椤婚�氳繃锛屽彲閫夐」闈炲繀椤婚�氳繃
+     */
+    checkPass() {
+      let res = true;
+      this.checkResults.forEach((e) => {
+        if (e.loading) {
+          res = res && false
+        } else if (e.required) {
+          res = res && e.pass;
+        }
+      });
+      return res;
+    }
   },
   methods: {
     // 璺宠浆涓嬩竴姝�
     nextStep() {
       this.$emit('update:modelValue', this.modelValue + 1);
     },
-    // 璺宠浆涓嬩竴姝�
+    // 璺宠浆涓婁竴姝�
     lastStep() {
       this.$emit('update:modelValue', this.modelValue - 1);
+    },
+    goto(path) {
+      if (path && path != '') {
+        this.$router.push(path);
+      }
     }
   }
 };
 </script>
+<style scoped>
+.required {
+  color: var(--el-color-danger);
+}
+
+.not-required {
+  color: transparent;
+}
+</style>

--
Gitblit v1.9.3