From 393c717d50fe8933e57d3014c6932b2acb750a50 Mon Sep 17 00:00:00 2001
From: whychdw <49690745@qq.com>
Date: 星期一, 24 五月 2021 10:27:17 +0800
Subject: [PATCH] 提交内容

---
 src/pages/test/dialog/testStepCheck.vue |   95 +++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 91 insertions(+), 4 deletions(-)

diff --git a/src/pages/test/dialog/testStepCheck.vue b/src/pages/test/dialog/testStepCheck.vue
index d5b575f..4916634 100644
--- a/src/pages/test/dialog/testStepCheck.vue
+++ b/src/pages/test/dialog/testStepCheck.vue
@@ -1,17 +1,104 @@
 <template>
-    <div class="params-container params-container-flex">
-        <div class="form-wrapper">
-
+    <div class="test-check">
+        <div class="test-explain">
+            <p class="p-h">鍓嶇疆鏉′欢妫�鏌�</p>
+        </div>
+        <div class="test-explain"
+            v-loading="loading"
+            element-loading-text="妫�鏌ヤ腑"
+            element-loading-spinner="el-icon-loading"
+            element-loading-background="rgba(0, 0, 0, 0)">
+            <table>
+                <tbody>
+                <tr v-for="(item, key) in list" :key="'item'+key">
+                    <td class="td-name">{{ item.name }}</td>
+                    <td>{{ item.valueDescription }}</td>
+                    <td class="td-status">{{ item.status ? "妫�鏌ユ甯�" : "妫�鏌ュ紓甯�" }}</td>
+                </tr>
+                </tbody>
+            </table>
+        </div>
+        <div class="test-check-button" v-if="showButton">
+            <el-button type="primary" size="small" @click="startTest">寮�濮嬭瘯楠�</el-button>
         </div>
     </div>
 </template>
 
 <script>
+import {checkPrecondition} from "@/pages/test/js/api";
+
 export default {
-    name: "testStepCheck"
+    name: "testStepCheck",
+    props: {
+        type: {
+            type: String,
+            default: ""
+        }
+    },
+    data() {
+        return {
+            loading: false,
+            showButton: false,
+            list: [],
+        }
+    },
+    methods: {
+        checkPrecondition() {
+            this.loading = true;
+            this.$nextTick(() => {
+                checkPrecondition(this.type).then(res => {
+                    let rs = res.data;
+                    let data = [];
+                    if (rs.code == 1) {
+                        data = rs.data;
+                    }
+                    this.list = data;
+                    this.loading = false;
+                    this.showButton = true;
+                }).catch(error => {
+                    this.loading = false;
+                    console.log(error);
+                });
+            });
+        },
+        startTest() {
+            this.$emit('startTest');
+        }
+    },
+    mounted() {
+        this.checkPrecondition();
+    }
 }
 </script>
 
 <style scoped>
+.p-h {
+    font-size: 18px;
+    font-weight: 700;
+}
 
+.test-check {
+    min-height: 300px;
+}
+
+.test-explain table {
+    margin-left: 32px;
+}
+
+.test-explain table td {
+    padding: 4px 16px;
+}
+
+.test-explain table td.td-name {
+    text-align: right;
+}
+
+.test-explain table td.td-status {
+    font-weight: 700;
+}
+
+.test-check-button {
+    padding: 8px 16px;
+    text-align: right;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.9.1