Selaa lähdekoodia

标记重点问题优化

洪海涛 4 vuotta sitten
vanhempi
sitoutus
35e603f58f

+ 1 - 0
src/views/monthlyReport/childrenPage/editReport/components/MrTable/index.vue

@@ -367,6 +367,7 @@ export default {
           this.$refs.markingIssues.openModal({
             title: '标记为重点问题',
             scope,
+            headerTitle: this.title,
             columns: this.columns
           })
         })

+ 4 - 1
src/views/monthlyReport/childrenPage/editReport/components/core.vue

@@ -274,11 +274,14 @@ export default {
     marking() {
       this.$refs.markingIssues.modalShow = true
       const params = {
-        title: '标记为重点问题'
+        title: '标记为重点问题',
+        subTitles: this.baseData.subTitles,
+        headerTitle: this.baseData.title
       }
       if (this.baseData.content.length) {
         params.normalAreaName = this.baseData.content[0].value
       }
+      console.log(params)
       this.$nextTick(() => {
         this.$refs.markingIssues.openModal(params)
       })

+ 45 - 4
src/views/monthlyReport/childrenPage/editReport/components/markingIssues.vue

@@ -15,7 +15,8 @@
             v-model="normalAreaName"
             autocomplete="off"
             size="small"
-            maxlength="100"
+            type="textarea"
+            :autosize="{ minRows: 2, maxRows: 30 }"
             show-word-limit
             placeholder="请输入问题"
           />
@@ -68,6 +69,8 @@ export default {
       callBack: null,
       columns: null,
       cascaderValue: null,
+      headerTitle: null,
+      subTitles: null,
       multiplePeople: null
     }
   },
@@ -81,13 +84,15 @@ export default {
   },
   methods: {
     uuid10,
-    openModal({ title, scope, columns, normalAreaName }) {
-      console.log({ title, scope, columns, normalAreaName })
+    openModal(params) {
+      const { title, scope, columns, normalAreaName, subTitles, headerTitle } = params
       this.titleName = title
       if (scope) this.menuData = scope.row
       if (columns) this.columns = columns
       this.$refs.normalDialog.visible = true
       this.modalShow = true
+      this.subTitles = subTitles
+      this.headerTitle = headerTitle
       if (normalAreaName) this.normalAreaName = normalAreaName
       this.setDefaultValues()
     },
@@ -95,8 +100,12 @@ export default {
     setDefaultValues() {
       this.columns &&
         this.columns.forEach((elm) => {
+          // 线上问题
+          if (elm.name === '定级' && this.headerTitle === '线上问题' && this.normalAreaName.search(/级线上问题/) < 0) {
+            this.normalAreaName = `${this.menuData[elm.headerKey]}级线上问题:${this.normalAreaName}`
+          }
           if (elm.name === '问题') {
-            this.normalAreaName = this.menuData[elm.headerKey]
+            this.normalAreaName += this.menuData[elm.headerKey]
           }
           if (elm.name.search(/团队/) > -1) {
             this.cascaderValue = this.menuData[elm.headerKey]
@@ -105,6 +114,38 @@ export default {
             this.multiplePeople = [this.menuData[elm.headerKey]]
           }
         })
+      // 延期
+      if (this.headerTitle.search(/延期 - |提测打回/) > -1) {
+        this.normalAreaName = ''
+        // elm.name === '延期类型'
+        const headerKeyYQ = this.columns.filter(elm => elm.name.search(/类型/) > -1)[0]
+        const headerKeyMC = this.columns.filter(elm => elm.name === '项目名称')[0]
+        this.normalAreaName = `${this.menuData[headerKeyYQ.headerKey]}${this.menuData[headerKeyYQ.headerKey] && this.menuData[headerKeyMC.headerKey] && ':'}${this.menuData[headerKeyMC.headerKey]}`
+      }
+      // 线下缺陷:
+      if (this.headerTitle === '线下缺陷') {
+        this.normalAreaName = ''
+        this.subTitles && this.subTitles.forEach((elm, index) => {
+          // this.normalAreaName += `${elm.copywriter}:${elm.label}`
+          if (index < 3) {
+            this.normalAreaName += `${elm.copywriter}:${elm.label}个${index === 2 ? ';' : ','}`
+          }
+          if (index === 3 && elm.label !== '--') {
+            this.normalAreaName += `${elm.copywriter}:${elm.label}h;`
+          }
+          if (index === 4 && elm.label !== '--') {
+            this.normalAreaName += `${elm.copywriter}:${elm.label}%;`
+          }
+          if (index === 5) {
+            this.normalAreaName += `${elm.copywriter}:${elm.label}。`
+          }
+        })
+      }
+      // 发布&回滚
+      if (this.headerTitle.search(/发布&回滚/) > -1) {
+        const headerKeyMK = this.columns.filter(elm => elm.name.search(/模块/) > -1)[0]
+        this.normalAreaName = this.menuData[headerKeyMK.headerKey] && `${this.menuData[headerKeyMK.headerKey]}模块一次全量回滚`
+      }
     },
     updateModule() {
       this.$store.commit('monthlyReportEdit/MARK_ISSUES', {