Эх сурвалжийг харах

月报标记重点问题:部门负责人

洪海涛 4 жил өмнө
parent
commit
5a1957872f

+ 11 - 0
src/api/qualityMonthlyReport/edit.js

@@ -187,3 +187,14 @@ export function getMonthlyReportPreView(reportId) {
     method: 'get'
   })
 }
+
+// 获取月报负责人
+// /monthlyReport/getDeptCharge
+export function getDeptCharge(data) {
+  return request({
+    url: projectManagementUrl + '/monthlyReport/getDeptCharge',
+    method: 'post',
+    timeout: '20000',
+    data
+  })
+}

+ 39 - 21
src/views/monthlyReport/childrenPage/editReport/components/markingIssues.vue

@@ -50,6 +50,7 @@ import Cascader from './Cascader'
 import normalDialog from '@/components/dialog/normalDialog'
 import Clickoutside from 'element-ui/src/utils/clickoutside'
 import searchPeople from '@/components/select/searchPeople'
+import { getDeptCharge } from '@/api/qualityMonthlyReport/edit'
 // import _ from 'lodash' // 人员select
 
 export default {
@@ -126,27 +127,35 @@ export default {
       // 线下缺陷:
       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}。`
-          }
-        })
+        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]}模块一次全量回滚`
+        const headerKeyMK = this.columns.filter(
+          (elm) => elm.name.search(/模块/) > -1
+        )[0]
+        this.normalAreaName =
+          this.menuData[headerKeyMK.headerKey] &&
+          `${this.menuData[headerKeyMK.headerKey]}模块一次全量回滚`
       }
+      this.setDeptCharge()
     },
     updateModule() {
       this.$store.commit('monthlyReportEdit/MARK_ISSUES', {
@@ -156,18 +165,27 @@ export default {
       })
       this.modalShow = false
       this.$refs.normalDialog.visible = false
+    },
+    // 设置部门数据
+    async setDeptCharge() {
+      const res = await getDeptCharge({ deptCode: this.cascaderValue })
+      if (res.code === 200) {
+        this.multiplePeople = Array.from(new Set([...this.multiplePeople, this.cascaderValue]))
+      }
     }
   }
 }
 </script>
 <style scoped lang="less">
 /deep/ .el-form-item__label {
-  text-align: left!important;
+  text-align: left !important;
 }
-.el-form-item{
+
+.el-form-item {
   margin-bottom: 10px;
 }
-/deep/.el-dialog__body{
-  padding-bottom: 0
+
+/deep/ .el-dialog__body {
+  padding-bottom: 0;
 }
 </style>