qinzhipeng_v 5 rokov pred
rodič
commit
8ae3161dbe

+ 9 - 5
src/views/projectManage/bugList/details/index.vue

@@ -35,7 +35,7 @@
     >
       <el-header height="0" />
       <el-container>
-        <el-main v-loading="loading.title" class="layout_main bug_manage_title" :style="type=='page'?{'padding': '15px 30px 15px 30px'}:{'padding':'0px 30px 10px 15px'}">
+        <el-main v-loading="loading.title" class="layout_main bug_manage_title" :style="type=='page'?{'padding': '15px 30px 15px 30px'}:{'padding':'0px 30px 15px 15px'}">
           <span id="spanLength">{{ bugNameForm.bugName }}</span>
           <el-row v-if="type=='page'">
             <el-form
@@ -702,6 +702,7 @@ export default {
       uploadDialogVisible: false,
       uploadDialogImageUrl: '',
       test: '测试',
+      num: 0,
       userLoading: false,
       statusDialogVisible: false,
       statusDialogTitle: '',
@@ -710,8 +711,6 @@ export default {
         { name: '测试', code: 1 },
         { name: '测试2', code: 2 }
       ],
-      // isAssignerFocusOpen: true,
-      // isCurrentHandlerOpen: true,
       assignerOptions: [],
       currentHandlerOptions: [],
       bug: {},
@@ -759,7 +758,7 @@ export default {
       }
     },
     id(newVal, oldVal) {
-      window.scrollTo(0, 0)
+      // window.scrollTo(0, 0)
       this.bug = {}
       this.bugModel = {}
       this.bugNameForm = { bugName: '' }
@@ -936,6 +935,7 @@ export default {
     },
     changeBugName() {
       if (this.bugNameForm.bugName.length < 1) {
+        this.bugNameForm.bugName = this.bug.bugName
         return
       }
       this.bug.bugName = this.bugNameForm.bugName
@@ -990,7 +990,10 @@ export default {
       this.loading.fullscreen = isLoading
       return bugDetails({ id: id }).then(res => {
         if (res.code === 200) {
-          document.getElementsByClassName('scop')[0].scrollTop = 0
+          if (this.num === 0) {
+            document.getElementsByClassName('scop')[0].scrollTop = 0
+          }
+
           // if (this.type !== 'page') {
           //   if (res.data.bizId !== Number(localStorage.getItem('bizId'))) {
           //     Utils.$emit('demo', res.data.bizId)
@@ -1081,6 +1084,7 @@ export default {
         ename: this.userInformation,
         name: this.userNames
       }
+      this.num = 1
       let objData
       if (form) {
         const data = form

+ 29 - 2
src/views/projectManage/bugList/file/createdBug.vue

@@ -95,7 +95,7 @@
                     <el-option v-for="item in discoveryMethEnumList" :key="item.code" :label="item.name" :value="item.code" />
                   </el-select>
                 </el-form-item>
-                <el-form-item label="提报人" style="width:100%;" prop="currentHandler">
+                <el-form-item label="提报人" style="width:100%;" prop="creatorList">
                   <el-input v-model="formInline.creatorList" :disabled="true" size="small" placeholder="请输入姓名或邮箱前缀" style="width:100%;" />
                 </el-form-item>
                 <el-form-item label="修复人" style="width:100%;" prop="currentHandler">
@@ -263,6 +263,7 @@ export default {
         priority: [{ required: true, message: '缺陷等级不能为空', trigger: 'change' }],
         discoveryStage: [{ required: true, message: '发现阶段不能为空', trigger: 'change' }],
         theBugType: [{ required: true, message: '缺陷类型不能为空', trigger: 'change' }],
+        creatorList: [{ required: true, message: '修复人不能为空', trigger: 'change' }],
         currentHandler: [{ required: true, message: '修复人不能为空', trigger: 'change' }]
 
       },
@@ -284,7 +285,9 @@ export default {
       showCopyFile: false, // 复制文件对话框
       imageName: null,
       imageUrl: null,
-      editr: false
+      editr: false,
+      formData: [],
+      formData1: []
     }
   },
   created() {
@@ -316,6 +319,16 @@ export default {
           this.show2 = true
           this.$set(this.formInline, 'bugName', '')
           this.$set(this.formInline, 'accessory', '')
+          this.options = []
+          this.formData = []
+          this.formData1 = []
+          this.formData = this.formInline.assigner.concat(this.formInline.currentHandler)
+          this.formData1 = this.unique6(this.formData)
+          this.formData1.map(item => {
+            this.searchUser(item).then(res => {
+              this.options.push(res.data[0])
+            })
+          })
         }
       }
       this.$nextTick(() => {
@@ -324,6 +337,20 @@ export default {
         this.getEcharts()
       })
     },
+    unique6(arr) {
+      var newArr = []
+      newArr = arr.filter(item => {
+        return newArr.includes(item) ? '' : newArr.push(item)
+      })
+      return newArr
+    },
+    searchUser(query) {
+      this.loading = true
+      return memberQueryMemberInfoByIDAPorName({ memberIDAP: query }).then(res => {
+        this.loading = false
+        return res
+      })
+    },
     getEcharts() {
       setTimeout(() => {
         this.$set(this.formInline, 'bugDescribe', '')