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 +++++++++++++++++++++++++++-
 src/styles/element/animation.scss                                    |   17 ++++
 src/views/fysp/evaluation/components/precheck/CompCheckExemption.vue |    2 
 src/views/fysp/evaluation/components/precheck/CompCheckArea.vue      |   64 ++++++++--------
 src/views/fysp/evaluation/DataSource.vue                             |   20 ++++-
 src/styles/element/index.scss                                        |    1 
 6 files changed, 178 insertions(+), 41 deletions(-)

diff --git a/src/styles/element/animation.scss b/src/styles/element/animation.scss
new file mode 100644
index 0000000..24be9f8
--- /dev/null
+++ b/src/styles/element/animation.scss
@@ -0,0 +1,17 @@
+// @mixin animation($value) {
+//   animation: $value;
+//   -webkit-animation: $value;
+// }
+
+// @keyframes rotatemove {
+//   from {
+//     transform: rotate(0deg);
+//   }
+//   to {
+//     transform: rotate(360deg);
+//   }
+// }
+
+// .icon-rotate {
+//   @include animation(rotatemove 2s linear infinite);
+// }
diff --git a/src/styles/element/index.scss b/src/styles/element/index.scss
index e0db086..ae918df 100644
--- a/src/styles/element/index.scss
+++ b/src/styles/element/index.scss
@@ -40,3 +40,4 @@
 
 // custom dark variables
 @use "./dark.scss";
+@use "./animation.scss"
diff --git a/src/views/fysp/evaluation/DataSource.vue b/src/views/fysp/evaluation/DataSource.vue
index 61476d4..c680dec 100644
--- a/src/views/fysp/evaluation/DataSource.vue
+++ b/src/views/fysp/evaluation/DataSource.vue
@@ -4,13 +4,25 @@
       <CompPreCheck></CompPreCheck>
     </el-col>
     <el-col :span="8">
-      <div class="radius"></div>
+      <el-card shadow="never" class="radius">
+        <template #header>
+          <el-row justify="space-between">
+            <div>
+              <div><el-text tag="b" size="large">鑷姩璇勪及浠诲姟</el-text></div>
+              <el-text size="small" type="info">鏄剧ず褰撳墠姝e湪杩涜鐨勮嚜鍔ㄨ瘎浼颁换鍔$姸鎬�</el-text>
+            </div>
+            <el-button icon="Refresh" type="primary" size="default" :loading="loading" @click="submit"
+              >鍒锋柊浠诲姟</el-button
+            >
+          </el-row>
+        </template>
+      </el-card>
     </el-col>
   </el-row>
 </template>
 
 <script>
-import CompPreCheck from "./components/CompPreCheck.vue";
+import CompPreCheck from './components/CompPreCheck.vue';
 export default {
   name: 'DataSource',
   components: { CompPreCheck },
@@ -22,7 +34,7 @@
 <style scoped>
 .radius {
   height: 80vh;
-  border: 1px solid var(--el-border-color);
-  border-radius: var(--el-border-radius-base);
+  /* border: 1px solid var(--el-border-color); */
+  /* border-radius: var(--el-border-radius-base); */
 }
 </style>
diff --git a/src/views/fysp/evaluation/components/precheck/CompCheckArea.vue b/src/views/fysp/evaluation/components/precheck/CompCheckArea.vue
index 171acd3..3bdeeb2 100644
--- a/src/views/fysp/evaluation/components/precheck/CompCheckArea.vue
+++ b/src/views/fysp/evaluation/components/precheck/CompCheckArea.vue
@@ -4,38 +4,35 @@
       <div><el-text tag="b" size="large">閫夋嫨璇勪及鑼冨洿</el-text></div>
       <el-text size="small" type="info">鍖呮嫭鍖哄幙銆佸満鏅被鍨嬩互鍙婃湀浠�</el-text>
     </template>
-    <FYForm
-      ref="formRef"
-      :rules="evaConditionRules"
-      :showButtons="false"
-      @submit="nextStep"
-    >
-      <template #form-item="{ formObj }">
-        <CompQuickSet @quick-set="setOptions"></CompQuickSet>
-        <!-- 鍖哄幙 -->
-        <FYOptionLocation
-          :allOption="false"
-          :level="3"
-          :initValue="false"
-          :checkStrictly="false"
-          v-model:value="formObj._locations"
-        ></FYOptionLocation>
-        <!-- 鍦烘櫙绫诲瀷 -->
-        <FYOptionScene
-          :allOption="false"
-          :initValue="false"
-          :type="2"
-          v-model:value="formObj._scenetype"
-        ></FYOptionScene>
-        <!-- 鏃堕棿 -->
-        <FYOptionTime
-          prop="time"
-          :initValue="true"
-          type="month"
-          v-model:value="formObj.time"
-        ></FYOptionTime>
-      </template>
-    </FYForm>
+    <FormCol>
+      <FYForm ref="formRef" :rules="evaConditionRules" :showButtons="false" @submit="nextStep">
+        <template #form-item="{ formObj }">
+          <CompQuickSet @quick-set="setOptions"></CompQuickSet>
+          <!-- 鍖哄幙 -->
+          <FYOptionLocation
+            :allOption="false"
+            :level="3"
+            :initValue="false"
+            :checkStrictly="false"
+            v-model:value="formObj._locations"
+          ></FYOptionLocation>
+          <!-- 鍦烘櫙绫诲瀷 -->
+          <FYOptionScene
+            :allOption="false"
+            :initValue="false"
+            :type="2"
+            v-model:value="formObj._scenetype"
+          ></FYOptionScene>
+          <!-- 鏃堕棿 -->
+          <FYOptionTime
+            prop="time"
+            :initValue="true"
+            type="month"
+            v-model:value="formObj.time"
+          ></FYOptionTime>
+        </template>
+      </FYForm>
+    </FormCol>
     <template #footer>
       <el-row justify="space-around">
         <el-button type="primary" size="default" :loading="loading" @click="submit"
@@ -83,6 +80,9 @@
     },
     // 璺宠浆涓嬩竴姝�
     nextStep() {
+      // todo: 妫�鏌ユ槸鍚﹀凡鏈夎瘎浼拌褰曪紝鎻愮ず鐢ㄦ埛鍙洿鎺ヨ烦杞煡鐪嬫垨缁х画涓嬩竴姝�
+
+      
       this.loading = true;
       return new Promise((reslove, reject) => {
         setTimeout(() => {
diff --git a/src/views/fysp/evaluation/components/precheck/CompCheckExemption.vue b/src/views/fysp/evaluation/components/precheck/CompCheckExemption.vue
index 4098017..5392bda 100644
--- a/src/views/fysp/evaluation/components/precheck/CompCheckExemption.vue
+++ b/src/views/fysp/evaluation/components/precheck/CompCheckExemption.vue
@@ -1,6 +1,6 @@
 <template>
   <el-card shadow="never">
-    Never3
+    璞佸厤鏉$洰鍔熻兘鏆傛湭瀹屾垚锛岃鐩存帴鐐瑰嚮涓嬩竴姝�
     <template #footer>
       <el-row justify="space-around">
         <el-button type="primary" size="default" @click="lastStep">涓婁竴姝�</el-button>
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