maxiaoxiao 11 ماه پیش
والد
کامیت
99c07c59c3
2فایلهای تغییر یافته به همراه124 افزوده شده و 1 حذف شده
  1. 120 0
      src/views/complianceAnalysis/components/rzDtails.vue
  2. 4 1
      src/views/complianceAnalysis/index.vue

+ 120 - 0
src/views/complianceAnalysis/components/rzDtails.vue

@@ -0,0 +1,120 @@
+<template>
+  <div>
+    <el-dialog
+      :title="rzMc"
+      v-model="dialog"
+      width="600px"
+      :before-close="handleClose"
+    >
+      <el-scrollbar class="logs height-350 max-width">
+        <el-timeline class="max-box box-sizing">
+          <el-timeline-item
+            v-for="item in data"
+            :key="item.bsm"
+            :timestamp="item.rzsj"
+            :type="
+              item.rzlx == 'info'
+                ? 'success'
+                : item.rzlx == 'warning'
+                ? 'warning'
+                : 'danger'
+            "
+          >
+            <div class="" style="white-space: normal">
+              {{ item.rzlr }}
+            </div>
+          </el-timeline-item>
+        </el-timeline>
+      </el-scrollbar>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="handleClose" class="btn-style">确 定</el-button>
+        </span>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { GetLog } from "@/api/ghss/hgxfx.js";
+export default {
+  props: {
+    rzBsm: {
+      type: String,
+    },
+    rzMc: {
+      type: String,
+    },
+  },
+  data() {
+    return {
+      data: [],
+      dialog: false,
+      timer: "",
+    };
+  },
+  mounted() {
+    clearTimeout(this.timer);
+  },
+  methods: {
+    handleClose() {
+      parent.emit("update:rzBsm", "");
+    },
+    getRzData() {
+      GetLog({ bsm: this.$props.rzBsm }).then((res) => {
+        if (res.success) {
+          this.data = res.data;
+          // if (res.data.rwzt != (2 || 3)) {
+          //   this.timer = setTimeout(() => {
+          //      this.$props.rzBsm != "" && this.getRzData();
+          //   }, 3000);
+          // }
+          if (!res.data[0]) {
+            this.timer = setTimeout(() => {
+              this.$props.rzBsm != "" && this.getRzData();
+            }, 3000);
+          } else if (
+            res.data[0].rzlr == "分析完成" ||
+            res.data[0].rzlx == "error"
+          ) {
+          } else {
+            this.timer = setTimeout(() => {
+              this.$props.rzBsm != "" && this.getRzData();
+            }, 3000);
+          }
+        }
+      });
+    },
+  },
+  watch: {
+    rzBsm(newValue) {
+      if (newValue != "") {
+        this.dialog = true;
+        console.log("-------")
+        this.getRzData();
+      } else {
+        this.dialog = false;
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.logs {
+  background: rgb(255, 255, 255);
+  border: 1px solid #d2d2d3;
+  :deep(.el-timeline-item) {
+    padding-bottom: 5px;
+  }
+  ul {
+    padding-left: 35px;
+    li {
+      line-height: 35px;
+    }
+  }
+}
+:deep(.el-dialog__body) {
+  padding: 10px 20px;
+}
+</style>

+ 4 - 1
src/views/complianceAnalysis/index.vue

@@ -3,7 +3,7 @@
   <div class="ghzc complianceAnalysis">
     <div class="innerContainer leftPane">
       <h2 class="vl-notice-title">
-        <span class="lv-title">合规性分析{{ activeTabs }}</span>
+        <span class="lv-title">合规性分析</span>
         <span class="lv-icon-maxmini"> </span>
         <i class="icon-remove"></i>
       </h2>
@@ -23,6 +23,7 @@
         ></el-tab-pane>
       </el-tabs>
     </div>
+    <RzDtails :rzBsm="rzBsm" :rzMc="rzMc"></RzDtails>
   </div>
 </template>
 
@@ -30,6 +31,7 @@
 import Hgxsc from "./components/hgxsc.vue";
 import Lsjl from "./components/lsjl.vue";
 import Scjg from "./components/scjg.vue";
+import RzDtails from "./components/rzDtails.vue";
 // import TabelView from "./components/tabelView.vue";
 export default {
   name: "complianceAnalysis",
@@ -37,6 +39,7 @@ export default {
     Hgxsc,
     Lsjl,
     Scjg,
+    RzDtails,
     // TabelView,
   },
   data() {