洪海涛 4 år sedan
förälder
incheckning
a52ff6a8de

+ 3 - 3
src/views/monthlyReport/childrenPage/editReport/components/ReadOnlyTable.vue

@@ -144,7 +144,7 @@ export default {
         p1: {}
         p1: {}
       },
       },
       ids: [],
       ids: [],
-      openDrawerModalDrawer: false,
+      openDrawerModalDrawer: false
     }
     }
   },
   },
   computed: {
   computed: {
@@ -300,12 +300,12 @@ export default {
       const index = lIndex - 1 || 0
       const index = lIndex - 1 || 0
       const data = row[column.property]
       const data = row[column.property]
 
 
-      if ( index === 3 ) {
+      if (index === 3) {
         this.ids = data.reportBugs
         this.ids = data.reportBugs
         this.openDrawerModalDrawer = true
         this.openDrawerModalDrawer = true
         return
         return
       }
       }
-      
+
       if (index <= 2) {
       if (index <= 2) {
         const yaxis = this.setList(data, index)
         const yaxis = this.setList(data, index)
         this.requireList = { toType: '缺陷', xaxis: this.bugPriority, title: '新增缺陷', yaxis: yaxis, dataIndex: index }
         this.requireList = { toType: '缺陷', xaxis: this.bugPriority, title: '新增缺陷', yaxis: yaxis, dataIndex: index }

+ 7 - 7
src/views/monthlyReport/childrenPage/editReport/components/SubTitle.vue

@@ -76,9 +76,9 @@ export default {
       }
       }
     },
     },
     setCopywriter(copywriter, label, index) {
     setCopywriter(copywriter, label, index) {
-      if (index === this.reportTextList.length -1) return label > 0
+      if (index === this.reportTextList.length - 1) return label > 0
       if (copywriter.search(/过夜率/) > -1) {
       if (copywriter.search(/过夜率/) > -1) {
-         return label > 30
+        return label > 30
       }
       }
       if (copywriter.search(/P0\ /) > -1) return label > 0
       if (copywriter.search(/P0\ /) > -1) return label > 0
       if (copywriter.indexOf('时长') > -1) {
       if (copywriter.indexOf('时长') > -1) {
@@ -91,18 +91,18 @@ export default {
         return 'h'
         return 'h'
       }
       }
       if (copywriter.search(/过夜率|关闭率/) > -1) {
       if (copywriter.search(/过夜率|关闭率/) > -1) {
-         return '%'
+        return '%'
       }
       }
       if (copywriter.search(/次数/) > -1) {
       if (copywriter.search(/次数/) > -1) {
-         return '次'
+        return '次'
       }
       }
       return '个'
       return '个'
     },
     },
     setSign(copywriter, index) {
     setSign(copywriter, index) {
-      if (index === this.reportTextList.length -1) return '。'
+      if (index === this.reportTextList.length - 1) return '。'
       if (this.reportTextList[index + 1].copywriter.search(/过夜率|关闭率/) > -1) return ';'
       if (this.reportTextList[index + 1].copywriter.search(/过夜率|关闭率/) > -1) return ';'
       if (copywriter.search(/过夜率|关闭率/) > -1) {
       if (copywriter.search(/过夜率|关闭率/) > -1) {
-         return ';'
+        return ';'
       }
       }
       if (copywriter.indexOf('时长') > -1) {
       if (copywriter.indexOf('时长') > -1) {
         return ';'
         return ';'
@@ -115,7 +115,7 @@ export default {
         this.ids = data.reportBugs
         this.ids = data.reportBugs
         this.openDrawerModalDrawer = true
         this.openDrawerModalDrawer = true
         return
         return
-      } 
+      }
       if (index <= 2) {
       if (index <= 2) {
         const yaxis = this.setList(data, index)
         const yaxis = this.setList(data, index)
         this.requireList = { toType: '缺陷', xaxis: this.bugPriority, title: '新增缺陷', yaxis: yaxis, dataIndex: index }
         this.requireList = { toType: '缺陷', xaxis: this.bugPriority, title: '新增缺陷', yaxis: yaxis, dataIndex: index }

+ 8 - 7
src/views/monthlyReport/childrenPage/editReport/components/drawerModal/drawerModalData.js

@@ -13,12 +13,13 @@ export default {
     // timeline
     // timeline
     timeline: {
     timeline: {
       // 第一条
       // 第一条
-      one: [ '全部', '已完成', '未完成' ],
+      one: ['全部', '已完成', '未完成'],
       oneStatus: {
       oneStatus: {
         status1: [3],
         status1: [3],
-        status2:  [0, 2, 5, 4]
+        status2: [0, 2, 5, 4]
       },
       },
-      oneClick({value, name, paging, drawerData}) {
+      // 第一个时间轴点击的事件
+      oneClick({ value, name, paging, drawerData }) {
         const newPaging = { ...paging }
         const newPaging = { ...paging }
         if (value) {
         if (value) {
           newPaging.statusList = this.oneStatus[`status${value}`]
           newPaging.statusList = this.oneStatus[`status${value}`]
@@ -27,7 +28,7 @@ export default {
           delete newPaging.statusList
           delete newPaging.statusList
           newPaging.ids = drawerData.map(item => item.id)
           newPaging.ids = drawerData.map(item => item.id)
         }
         }
-        return {paging: newPaging}
+        return { paging: newPaging }
       },
       },
       // 第二条
       // 第二条
       two: null
       two: null
@@ -56,7 +57,7 @@ export default {
         minWidth: 100,
         minWidth: 100,
         align: 'left',
         align: 'left',
         type: 'level'
         type: 'level'
-      },
+      }
     ],
     ],
     // 表格高度
     // 表格高度
     tableHeight: 'calc(100vh - 292px)',
     tableHeight: 'calc(100vh - 292px)',
@@ -67,10 +68,10 @@ export default {
     // 跳转
     // 跳转
     jumper: '缺陷',
     jumper: '缺陷',
     // 设置接口返回值
     // 设置接口返回值
-    setTableList({tableList, oldTableList, paging, res}) {
+    setTableList({ tableList, oldTableList, paging, res }) {
       tableList = res.data
       tableList = res.data
       paging.pageTotal = res.total
       paging.pageTotal = res.total
-      return {tableList, paging}
+      return { tableList, paging }
     }
     }
   }
   }
 }
 }

+ 12 - 16
src/views/monthlyReport/childrenPage/editReport/components/drawerModal/index.vue

@@ -48,8 +48,8 @@
       :total="tableList"
       :total="tableList"
       :column="baseModal && baseModal.column || []"
       :column="baseModal && baseModal.column || []"
       :table-height="baseModal && baseModal.tableHeight ? baseModal.tableHeight : 'auto' "
       :table-height="baseModal && baseModal.tableHeight ? baseModal.tableHeight : 'auto' "
-      @click.stop
       size="mini"
       size="mini"
+      @click.stop
       @change="dmTableChange"
       @change="dmTableChange"
     >
     >
       <!-- 改进项:级别 -->
       <!-- 改进项:级别 -->
@@ -143,21 +143,17 @@ export default {
   },
   },
   watch: {
   watch: {
     drawerData(v, o) {
     drawerData(v, o) {
-      // if (JSON.stringify(v) !== JSON.stringify(o)) {
-      //   this.init()
-      // }
       this.init()
       this.init()
     },
     },
     openDrawer(value) {
     openDrawer(value) {
       this.drawer = value
       this.drawer = value
-      if(this.drawer) {
-        this.init()  
+      if (this.drawer) {
+        this.init()
       }
       }
     }
     }
   },
   },
   mounted() {
   mounted() {
     this.drawer = false
     this.drawer = false
-    // this.handleClose()
   },
   },
   methods: {
   methods: {
     moment,
     moment,
@@ -250,26 +246,26 @@ export default {
       }
       }
       const paging = this.paging
       const paging = this.paging
       this.baseModal.method({
       this.baseModal.method({
-        ...this.paging,
+        ...paging
         // idList: this.drawerData,
         // idList: this.drawerData,
         // curIndex: this.paging.curIndex,
         // curIndex: this.paging.curIndex,
         // pageSize: this.paging.pageSize
         // pageSize: this.paging.pageSize
       }).then(res => {
       }).then(res => {
         if (res.code === 200) {
         if (res.code === 200) {
           // 暴露处理返回值的函数,通过 this.baseModal 调用
           // 暴露处理返回值的函数,通过 this.baseModal 调用
-          const {tableList, oldTableList, paging} = this.baseModal.setTableList({
+          const { tableList, oldTableList, paging } = this.baseModal.setTableList({
             tableList: this.tableList, // 表格展示时使用的数据
             tableList: this.tableList, // 表格展示时使用的数据
             oldTableList: this.oldTableList, // 假分页时使用的数据
             oldTableList: this.oldTableList, // 假分页时使用的数据
             paging: this.paging, // 分页数据和部分给接口传参
             paging: this.paging, // 分页数据和部分给接口传参
             res
             res
           })
           })
-          if ( tableList ) {
-            this.tableList = [ ...tableList ]
+          if (tableList) {
+            this.tableList = [...tableList]
           }
           }
-          if ( oldTableList ) {
-            this.oldTableList = [ ...oldTableList ]
+          if (oldTableList) {
+            this.oldTableList = [...oldTableList]
           }
           }
-          if ( paging ) {
+          if (paging) {
             this.paging = { ...paging }
             this.paging = { ...paging }
           }
           }
           this.loading = false
           this.loading = false
@@ -296,7 +292,7 @@ export default {
     // 设置表头
     // 设置表头
     // 表格跳转
     // 表格跳转
     dmTableChange({ column, row }) {
     dmTableChange({ column, row }) {
-      if ( typeof this.baseModal.jumper === 'string' ) {
+      if (typeof this.baseModal.jumper === 'string') {
         this.jumper(row, this.baseModal.jumper)
         this.jumper(row, this.baseModal.jumper)
       } else {
       } else {
         this.baseModal.jumper({ column, row })
         this.baseModal.jumper({ column, row })
@@ -318,7 +314,7 @@ export default {
       const bizId_id = EncryptId(`${bizId}_${id}`)
       const bizId_id = EncryptId(`${bizId}_${id}`)
       const newTab = this.$router.resolve({ name: name + '详情', query: { bizId_id: bizId_id }})
       const newTab = this.$router.resolve({ name: name + '详情', query: { bizId_id: bizId_id }})
       window.open(newTab.href, '_blank')
       window.open(newTab.href, '_blank')
-    },
+    }
   }
   }
 }
 }
 </script>
 </script>