Browse Source

优化缺陷

qinzhipeng_v 5 years ago
parent
commit
926268bd2c

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

@@ -3,7 +3,7 @@
     <div v-if="type!=='page'" style="padding: 15px 5px 5px 30px" class="Layout_space_between bug_manage_container bug_manage_title">
       <div class="Layout_flex_start">
         <span style="font-size:18px;font-weight:500;color:#333b4a; margin-right: 20px;">{{ 'BUG-'+ id }}</span>
-        <statusChange v-if="map.bugEnumList && typeof bug.status !== 'undefined'" :status-code="bug.status" :bug-data="bug" />
+        <statusChange v-if="map.bugEnumList && typeof bug.status !== 'undefined'" :status-code="bug.status" :bug-data="bug" @bugGet="updateBugStatus" />
       </div>
       <div style="display: inline-block;float:right">
         <span class="newBtn" @click="getToDetails()"><i class="el-icon-document" /> 查看详情</span>
@@ -817,7 +817,6 @@ export default {
       this.dialogVisible = true
     },
     handleChange(response, file, fileList) {
-      console.log('response', response)
       const reg = new RegExp(/.*(\.gif|\.jpeg|\.png|\.jpg|\.bmp|\.gif)/i)
       if (!response.success) {
         this.$message({
@@ -1000,6 +999,9 @@ export default {
       const list = this.appClientList.filter(value => value.code === e)
       this.versionList = list[0] ? list[0].childEnumInfos : []
     },
+    updateBugStatus() {
+      this.bugGet(this.bug.id)
+    },
     bugGet(id, isLoading) {
       this.loading.fullscreen = isLoading
       return bugDetails({ id: id }).then(res => {

+ 1 - 1
src/views/projectManage/bugList/details/statusChange.vue

@@ -113,9 +113,9 @@ export default {
               this.statusDialogVisible = false
               this.statusDialogForm = {}
               this.$message({ message: '成功修改状态为' + this.statusDialogTitle, type: 'success', center: true })
+              this.$emit('bugGet')
             } else if (res.code !== 200) {
               this.status = this.statusCode
-              // this.$message({ message: '修改失败' + res.msg, type: 'error', center: true })
             }
           })
         }

+ 1 - 1
src/views/workbench/bugTableList.vue

@@ -26,7 +26,7 @@
       <el-table-column prop="priorityName" label="缺陷等级" align="center" />
       <el-table-column prop="bugStatusName" label="状态" min-width="110" align="center">
         <template slot-scope="scope">
-          <statusChange :status-code="Number(scope.row.status)" :bug-data="scope.row" />
+          <statusChange :status-code="Number(scope.row.status)" :bug-data="scope.row" @bugGet="bugGetTableList" />
         </template>
       </el-table-column>
       <el-table-column prop="taskName" label="所属任务" align="center" min-width="250" show-overflow-tooltip />