qinzhipeng_v@didiglobal.com 4 rokov pred
rodič
commit
b8aa4d8e66

+ 0 - 3
src/views/reportManagement/ReleaseReport/newReleaeTemplate.vue

@@ -223,9 +223,6 @@ export default {
       const from = dav
       this.from = { ...this.from, ...dav, 'taskIds': from.taskId }
       this.customList = from.customFields
-      // if (dav.reportName !== null) {
-      //   this.$set(this.from, 'reportName', from.reportName) // 报告名称
-      // }
       if (from.devPlanTimeStart) {
         this.$set(this.from, 'devPlanTimeStart', [from.devPlanTimeStart, from.devPlanTimeEnd]) // 计划开发开始时间-计划开发结束时间
       }

+ 0 - 5
src/views/reportManagement/components/TestingReport.vue

@@ -243,7 +243,6 @@ export default {
         const res = await settingDeleteReportModule({ id: item.id }, item.id)
         if (res.code === 200) {
           this.getreportTemplate()
-          this.closeDefaultPopover()
           this.$message({ message: '已删除’', type: 'success', duration: 1000, offset: 150 })
         }
       } else {
@@ -251,10 +250,6 @@ export default {
       }
     },
 
-    closeDefaultPopover() { // 模拟点击
-      this.$refs.refName.click()
-    },
-
     getCreateData() { // 保存,下一步
       this.$refs.dailyTemplate.reportreleaseCreate(this.updateDaily)
     },

+ 15 - 1
src/views/reportManagement/components/template/customTemplate.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-row :gutter="20">
+  <el-row :gutter="20" class="Layout">
     <el-col v-for="(item, index) in customs" :key="index" :span="12">
       <span v-show="item.bool" style="margin-bottom:20px;" class="Layout_space_between">
         <span class="from-name"><span v-if="item.required" style="color: red;">*</span>{{ item.fieldName }} </span>
@@ -30,6 +30,11 @@ export default {
   watch: {
     custom: {
       handler(newV) {
+        console.log(newV, 'goushi')
+        if (newV && newV[0].bool) {
+          this.customs = newV
+          return
+        }
         this.customs = newV.map(item => ({
           ...item,
           bool: item.conditions === '默认展示' || this.getBoolValue(item.conditions)
@@ -65,6 +70,10 @@ export default {
           } else {
             item.bool = item.conditions === '默认展示' || this.getBoolValue(item.conditions)
           }
+          if (!item.bool) {
+            item.content = ''
+            item.contents = null
+          }
         })
         this.customs = [...this.customs]
       }
@@ -80,4 +89,9 @@ export default {
   .from-name {
     width: 150px !important;
   }
+  .Layout {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+  }
 </style>