qinzhipeng_v 5 years ago
parent
commit
ff9099dd5e

+ 4 - 8
src/layout/components/Navbar.vue

@@ -9,13 +9,9 @@
         </el-button>
         <el-dropdown-menu slot="dropdown">
           <div style="margin: 0 10% 10px;">
-            <el-select v-model="value" filterable remote :remote-method="remoteMethod" size="small" style="width: 100%" placeholder="请搜索业务线">
-              <el-option v-for="item in arr_data" :key="item.code" :label="item.name" :value="item.code" @click.native="sumTypeCkeck(item)">
-                {{ item.name }}
-              </el-option>
-            </el-select>
+            <el-input v-model="value" clearable size="small" style="width: 100%" placeholder="业务线搜索" @input="remoteMethod" />
           </div>
-          <div style="height: 200px; overflow:scroll; overflow-x: hidden">
+          <div style="max-height: 200px; overflow:scroll; overflow-x: hidden">
             <el-dropdown-item
               v-for="(item,index) in sumTypeArray"
               :key="index"
@@ -104,11 +100,11 @@ export default {
       if (query !== '') {
         setTimeout(() => {
           settingGetBizList({ bizName: query }).then(res => {
-            this.arr_data = res.data
+            this.sumTypeArray = res.data
           })
         }, 200)
       } else {
-        this.arr_data = []
+        this.get_bizArr()
       }
     },
     // toggleSideBar() {

+ 46 - 38
src/views/projectManage/bugList/details/index.vue

@@ -13,14 +13,17 @@
         @command="openStatsDialog"
       />
       <div style="display: inline-block;float:right">
-        <el-dropdown placement="bottom">
+        <span class="newBtn" @click="getToDetails()"><i class="el-icon-document" /> 查看详情</span>
+        <span class="newBtn" style="padding: 0 10px" @click="openQueryDialog()"><i class="el-icon-document-copy" /> 复制</span>
+        <span class="newBtn" @click="openDeleteDialog()"><i class="el-icon-delete" /> 删除</span>
+        <!-- <el-dropdown placement="bottom">
           <el-button size="small" plain class="button_delete" style="padding:5px"> ··· </el-button>
           <el-dropdown-menu slot="dropdown" style="text-align: center;">
-            <el-dropdown-item @click.native="openQueryDialog()">复制</el-dropdown-item>
-            <el-dropdown-item @click.native="getToDetails()">查看详情</el-dropdown-item>
-            <el-dropdown-item @click.native="openDeleteDialog()">删除</el-dropdown-item>
+            <el-dropdown-item @click.native="openQueryDialog()">复制 </el-dropdown-item>
+            <el-dropdown-item @click.native="getToDetails()">查看详情 </el-dropdown-item>
+            <el-dropdown-item @click.native="openDeleteDialog()">删除 </el-dropdown-item>
           </el-dropdown-menu>
-        </el-dropdown>
+        </el-dropdown> -->
         <div style="display: inline-block;margin-left: 10px;margin-right: 15px;" @mouseover="iconName = 'float_反馈_icon_close_蓝色'" @mouseleave="iconName = 'float_反馈_icon_close'" @mousedown="closeDrawer();">
           <el-button size="medium" type="text" style="margin-top:-5px;">
             <svg-icon :icon-class="iconName" />
@@ -795,18 +798,19 @@ export default {
     this.bugGetEnum()
     this.$nextTick(() => {
       this.bugGet(this.id, false).then(res => {
-        this.assignerOptions = []
-        for (const i in this.bug.assignerList.length) {
-          this.searchUser(this.bug.assigner[i]).then(res => {
-            this.assignerOptions = res.data
-          })
-        }
-        this.currentHandlerOptions = []
-        for (const i in this.bug.currentHandlerList.length) {
-          this.searchUser(this.bug.currentHandler[i]).then(res => {
-            this.currentHandlerOptions = res.data
-          })
-        }
+        // this.assignerOptions = []
+        // for (const i in this.bug.assignerList.length) {
+        //   this.searchUser(this.bug.assigner[i]).then(res => {
+        //     this.assignerOptions = res.data
+        //   })
+        // }
+        // this.currentHandlerOptions = []
+        // for (const i in this.bug.currentHandlerList.length) {
+        //   this.searchUser(this.bug.currentHandler[i]).then(res => {
+        //     this.currentHandlerOptions = res.data
+        //   })
+        // }
+        this.PersonnelData()
         this.changeWidthOnBlur()
         releaseList().then(res => {
           this.appClientList = res.data.appClient // 客户端
@@ -829,18 +833,7 @@ export default {
       this.formHeight = ''
       this.formHeight1 = ''
       this.bugGet(this.id, false).then(res => {
-        this.assignerOptions = []
-        for (const i in this.bug.assignerList.length) {
-          this.searchUser(this.bug.assigner[i]).then(res => {
-            this.assignerOptions = res.data
-          })
-        }
-        this.currentHandlerOptions = []
-        for (const i in this.bug.currentHandlerList.length) {
-          this.searchUser(this.bug.currentHandler[i]).then(res => {
-            this.currentHandlerOptions = res.data
-          })
-        }
+        this.PersonnelData()
         this.changeWidthOnBlur()
         this.getCommentList()
         releaseList().then(res => {
@@ -850,6 +843,20 @@ export default {
         this.editor.txt.html(this.bugDescribe === null ? '' : this.bugDescribe)
       })
     },
+    PersonnelData() {
+      this.assignerOptions = []
+      for (const i in this.bug.assignerList.length) {
+        this.searchUser(this.bug.assigner[i]).then(res => {
+          this.assignerOptions = res.data
+        })
+      }
+      this.currentHandlerOptions = []
+      for (const i in this.bug.currentHandlerList.length) {
+        this.searchUser(this.bug.currentHandler[i]).then(res => {
+          this.currentHandlerOptions = res.data
+        })
+      }
+    },
     listen(event) {
       event.preventDefault() // 阻止浏览器默认换行操作
       return false
@@ -1007,7 +1014,6 @@ export default {
           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)
@@ -1118,9 +1124,9 @@ export default {
           return bugUpdate(objData).then(res => {
             if (res.code === 200) {
               this.changeWidthOnBlur()
-              this.init()
               this.bugModel = JSON.parse(JSON.stringify(this.bug))
               this.$emit('update', false)
+              this.init()
             } else {
               this.bug = JSON.parse(JSON.stringify(this.bugModel))
             }
@@ -1199,9 +1205,6 @@ export default {
     statusDialogCancel() {
       this.statusDialogVisible = false
     },
-    blurAss() {
-      alert('ddds')
-    },
     statusDialogConfirm() {
       if (this.statusDialogTitle === '删除确认') {
         this.bugDelete().then(res => {
@@ -1512,10 +1515,15 @@ border-color: #DCDFE6;
 </style>
 
 <style scoped lang="scss">
- .str {
-   border: '1px solid red';
-   border-radius: '4px'
-   }
+.newBtn {
+  font-size: 14px;
+  color: rgb(51, 59, 74);
+  font-weight: 500;
+}
+.newBtn:hover {
+  color: #409EFF;
+  cursor: pointer;
+}
 .current:hover{
   border-radius: 4px;
   border: 1px solid #DCDFE6;

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

@@ -267,7 +267,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' }],
+        creatorList: [{ required: true, message: '提报人不能为空', trigger: 'change' }],
         currentHandler: [{ required: true, message: '修复人不能为空', trigger: 'change' }]
 
       },
@@ -307,7 +307,7 @@ export default {
       this.fileList = []
       this.fileDbList = []
       this.formInline = {}
-      this.$set(this.formInline, 'creatorList', this.userNames)
+      this.$set(this.formInline, 'creatorList', localStorage.getItem('realname'))
       this.$set(this.formInline, 'bizId', Number(localStorage.getItem('bizId')))
 
       if (e === 1) {