Quellcode durchsuchen

添加缺陷交互优化

qinzhipeng_v vor 5 Jahren
Ursprung
Commit
970511322c
1 geänderte Dateien mit 35 neuen und 4 gelöschten Zeilen
  1. 35 4
      src/views/projectManage/bugList/details/index.vue

+ 35 - 4
src/views/projectManage/bugList/details/index.vue

@@ -97,7 +97,7 @@
                 <el-form label-width="30%" label-position="left" label-suffix=":">
                   <el-form-item label="所属任务">
                     <span v-if="clielIcon === true" class="str-task-name" @mouseover="mouseOver" @mouseleave="mouseLeave"><span @click="JumpTask(bug.taskId)">{{ bug.taskName }}</span> <i v-if="active" class="el-icon-edit" @click="getclielIcon" /></span>
-                    <el-select v-if="clielIcon === false" ref="searchOfChatRoom" v-model="bug.taskId" @blur="mouseLeaves" @change="bugUpdate(bug,'details')">
+                    <el-select v-if="clielIcon === false" ref="searchOfChatRoom" v-model="bug.taskId" filterable @visible-change="mouseLeaves" @change="bugUpdates(bug,'details')">
                       <el-option
                         v-for="item in taskEnumList"
                         :key="item.id"
@@ -1112,6 +1112,38 @@ export default {
         this.formHeight = 'type'
       }
     },
+    async bugUpdates(form, loadingStr) {
+      if (form.currentHandler.length > 0) {
+        if (form.assigner.length > 0) {
+          this.formHeight = ''
+          this.formHeight1 = ''
+          loadingStr ? this.loading[loadingStr] = true : this.loading.fullscreen = true
+          const userData = { id: '', ename: this.userInformation, name: this.userNames }
+          this.num = 1
+          const data = form
+          data.currentHandler = form.currentHandler.join(',')
+          data.assigner = form.assigner.join(',')
+          const objData = { bugBaseInfo: data, user: userData }
+          console.log(objData, '要提交的数据')
+          const res = await bugUpdate(objData)
+          if (res.code === 200) {
+            this.changeWidthOnBlur()
+            this.clielIcon = true
+            this.active = false
+            this.bugModel = JSON.parse(JSON.stringify(this.bug))
+            this.$emit('update', false)
+            this.init()
+          } else {
+            this.bug = JSON.parse(JSON.stringify(this.bugModel))
+          }
+          loadingStr ? this.loading[loadingStr] = false : this.loading.fullscreen = false
+        } else {
+          this.formHeight1 = 'type'
+        }
+      } else {
+        this.formHeight = 'type'
+      }
+    },
     getBusinessLinePlatformModule() {
       settingQueryBizModuleList(Number(localStorage.getItem('bizId'))).then(res => {
         this.business_platform_Modular = res.data.map(item => ({
@@ -1192,9 +1224,8 @@ export default {
         this.$refs.searchOfChatRoom.focus()
       })
     },
-    mouseLeaves() {
-      alert()
-      this.clielIcon = true
+    mouseLeaves(e) {
+      e ? '' : this.clielIcon = true
     },
     async confirmUpload() {
       if (this.imageName.name === null || this.imageName.name.replace(/\s+/g, '') === '') {