|
@@ -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>
|