Browse Source

合规性分析默认数据

maxiaoxiao 1 year ago
parent
commit
7c5a642de9

+ 8 - 3
src/views/complianceAnalysis/components/hgxsc.vue

@@ -114,12 +114,17 @@ export default {
     };
   },
   mounted() {
-    this.ruleForm.xmmc = `合规_${moment(new Date()).format( "YYYY-MM-DD-HH-mm-ss")}`;
-    this.ruleForm.xmlx = `项目类型`;
-    this.ruleForm.jsdw = `建设单位`;
+    this.initform();
     this.getKzx();
   },
   methods: {
+    initform() {
+      this.ruleForm.xmmc = `合规_${moment(new Date()).format(
+        "YYYY-MM-DD-HH-mm-ss"
+      )}`;
+      this.ruleForm.xmlx = `项目类型`;
+      this.ruleForm.jsdw = `建设单位`;
+    },
     //获取检查要素
     getKzx() {
       GetScx().then((res) => {

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

@@ -6,7 +6,7 @@
         <span class="pange_text">合规性分析</span>
       </h2>
       <el-tabs type="border-card" class="xz_box" v-model="activeTabs" stretch>
-        <el-tab-pane label="合规性分析" name="hgxsc">
+        <el-tab-pane label="合规性分析" name="hgxfx">
           <Hgxsc
             v-loading="loading"
             @updateParent="changeData"
@@ -56,7 +56,7 @@ export default {
   data() {
     return {
       loading: false,
-      activeTabs: "hgxsc",
+      activeTabs: "hgxfx",
       // 日志
       rzBsm: "",
       nowObj: {}, //当前点击对象
@@ -76,6 +76,8 @@ export default {
       if (newValue != "hgxfx") this.$refs.hgxfx.reset();
       if (newValue != "lsju") this.$refs.lsju.reset();
       if (newValue != "scjg") this.$refs.scjg.reset();
+      console.log(newValue,'---',this.$refs.hgxfx)
+      if (newValue == "hgxfx") this.$refs.hgxfx.initform();
       if (newValue == "lsju") {
         this.$refs.lsju.reset();
         this.$refs.lsju.changeForm();