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

Merge branch 'http_mock' of git.xiaojukeji.com:jacklijiajia/thoth-frontend into http_mock

qinzhipeng_v 5 жил өмнө
parent
commit
3dd45f7b45

+ 24 - 9
src/views/projectManage/bugList/bugindex.vue

@@ -1,12 +1,12 @@
 <template>
-  <el-container class="bgColor">
+  <el-container class="bgColor" @click.native="listenClick()">
     <el-header style="height: auto; margin-top: 1%; padding: 0 1%;">
       <el-row class="headerBg" style="padding-bottom: 0;">
         <el-col :span="24" class="Layout">
           <div class="titFont Layout">
             <span style="margin-left: 20%; width: 100px;  font-size: 22px; font-family:PingFangSC-Medium,PingFang SC;">缺陷</span>
           </div>
-          <el-button type="primary" size="mini" @click="createdDefect">新建缺陷</el-button>
+          <el-button type="primary" size="mini" style="font-size: 14px;padding: 7px 10px;font-weight: normal" @click="createdDefect">新建缺陷</el-button>
         </el-col>
         <el-col :span="24">
           <el-divider style="color: #EEF0F5;" />
@@ -134,7 +134,7 @@
     <el-main style="padding: 1%">
       <el-row class="headerBg table_v" style=" padding-top: 0px;">
         <el-col :span="24" style="min-height: 47vh;">
-          <el-table size="small" :data="tableData" style="width: 100%; font-size: 14px; color:rgba(102,102,102,1);" :default-sort="{prop: 'priorityCode'}" show-overflow-tooltip="true" :header-cell-style="{ color: '#4A4A4A', fontSize: '14px', fontWeight: '550' }">
+          <el-table size="small" :data="tableData" style="width: 100%; font-size: 14px; color:rgba(102,102,102,1);" :default-sort="{prop: 'priorityCode'}" show-overflow-tooltip="true" :header-cell-style="{ color: '#4A4A4A', fontSize: '14px', fontWeight: '500' }">
             <el-table-column label="优先级" prop="priorityCode" sortable align="center">
               <template slot-scope="scope">
                 <div class="div_priority" :style="{background: priorityColors[scope.row.priorityCode]}">{{ scope.row.priorityLevel | oneA }}</div>
@@ -183,15 +183,17 @@
       :visible.sync="drawerShow"
       :modal="false"
       :with-header="false"
-      size="60%"
+      size="50%"
       class="bug_manage_drawer"
     >
       <div style="position:sticky;text-align:right;padding: 10px 15px">
-        <el-button size="medium" type="text" @click="drawerShow = false;iconName = 'float_反馈_icon_close'">
-          <svg-icon :icon-class="iconName" @mousedown="iconName = 'float_反馈_icon_close_蓝色'" />
-        </el-button>
+        <div style="display: inline-block" @mousedown="iconName = 'float_反馈_icon_close_蓝色'">
+          <el-button size="medium" type="text" @click="drawerShow = false;iconName = 'float_反馈_icon_close'">
+            <svg-icon :icon-class="iconName" />
+          </el-button>
+        </div>
       </div>
-      <bug-details :id="bugQuery.id+''" :type="'drawer'" @delete="drawerShow = false;getBugList()" />
+      <bug-details :id="bugQuery.id+''" :type="'drawer'" @delete="drawerShow = false;getBugList()" @update="getBugList()" />
     </el-drawer>
   </el-container>
 </template>
@@ -239,6 +241,7 @@ export default {
       bugStageEnumList: [], // 发现阶段
       sysTypeEnumList: [], // 端类型
       bugQuery: '', // bug详情
+      bugQueryModel: '',
       commentShow: true, // 评论为空默认显示
       content: '', // 评论
       comment_content: '', // 评论内容
@@ -268,6 +271,16 @@ export default {
     this.bugListSelect()
   },
   methods: {
+    listenClick() {
+      this.isBugNameClick = false
+      setTimeout(() => {
+        if (this.isBugNameClick) {
+          this.drawerShow = true
+        } else {
+          this.drawerShow = false
+        }
+      }, 200)
+    },
     getBugList() {
       this.indexPage = this.formInline
       this.indexPage.pageSize = this.pageSize
@@ -345,7 +358,9 @@ export default {
     },
     click_bugName(e) {
       this.bugQuery = this.tableData.filter(value => value.id === e)[0]
-      this.drawerShow = true
+      setTimeout(() => {
+        this.isBugNameClick = true
+      }, 100)
     },
     onSubmit() {
       console.log('submit!')

+ 6 - 0
src/views/projectManage/bugList/css/index.css

@@ -165,6 +165,12 @@
 .bug_manage_drawer .el-drawer__header{
   margin-bottom: 15px;
 }
+.bug_manage_drawer {
+  pointer-events: none;
+}
+.bug_manage_drawer .el-drawer{
+  pointer-events: auto;
+}
 .marginLeft {
   margin-left: 3%;
 }

+ 81 - 47
src/views/projectManage/bugList/details/index.vue

@@ -96,16 +96,14 @@
     <el-container :style="type=='page'?{'margin-top':'20px'}:{}" class="bug_manage" :direction="type == 'page'?'horizontal':'vertical'">
       <el-aside :style="type=='page'?{'margin-right':'1.5%','width':'70%'}:{'width':'100%'}">
         <el-main v-loading="loading.details" class="layout_main bug_manage_bug_details" :style="type=='page'?{'padding': '20px 30px'}:{'padding-left': '30px','padding-right': '30px'}">
-          <div style="display:flex;align-items: center;margin-bottom: 20px">
-            <div style="width:4px;height:15px;background:#409EFF;border-radius:1px;" />
-            <div
-              style="width:83px;height:18px;font-size:16px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px"
-            >缺陷详情</div>
+          <div class="module_title">
+            <div class="module_title__sign" />
+            <div class="module_title__caption">缺陷详情</div>
           </div>
           <el-divider v-if="type !== 'page'" />
           <el-container width="100%">
             <el-aside width="49%" style="margin-right: 2%">
-              <el-form :label-width="type=='page'?'28%':'25%'" label-position="left" label-suffix=":">
+              <el-form label-width="30%" label-position="left" label-suffix=":">
                 <el-form-item label="所属的任务">
                   <el-select v-model="bug.taskId" filterable clearable @change="bugUpdate(bug,'details')">
                     <el-option
@@ -153,7 +151,7 @@
               </el-form>
             </el-aside>
             <el-aside width="49%">
-              <el-form :label-width="type=='page'?'28%':'25%'" label-position="left" label-suffix=":">
+              <el-form label-width="30%" label-position="left" label-suffix=":">
                 <el-form-item label="端类型">
                   <el-select v-model="bug.sysType" @change="bugUpdate(bug,'details')">
                     <el-option
@@ -206,16 +204,14 @@
           </el-container>
         </el-main>
         <el-main v-loading="loading.appInfo" :style="type=='page'?{'padding': '20px 30px','margin-top': '20px'}:{'padding-left':'30px','padding-right':'30px'}" class="layout_main bug_manage bug_manage_app_info">
-          <div style="display:flex;align-items: center;margin-bottom: 20px">
-            <div style="width:4px;height:15px;background:#409EFF;border-radius:1px;" />
-            <div
-              style="width:100px;height:18px;font-size:16px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px"
-            >客户端信息</div>
+          <div class="module_title">
+            <div class="module_title__sign" />
+            <div class="module_title__caption">客户端信息</div>
           </div>
           <el-divider v-if="type !== 'page'" />
           <el-container width="100%">
             <el-aside width="49%" style="margin-right: 2%">
-              <el-form :label-width="type=='page'?'28%':'25%'" label-position="left" label-suffix=":">
+              <el-form label-width="30%" label-position="left" label-suffix=":">
                 <el-form-item label="客户端">
                   <el-select
                     v-model="bug.appId"
@@ -247,7 +243,7 @@
               </el-form>
             </el-aside>
             <el-aside width="49%">
-              <el-form :label-width="type=='page'?'28%':'25%'" label-position="left" label-suffix=":">
+              <el-form label-width="30%" label-position="left" label-suffix=":">
                 <el-form-item label="影响版本">
                   <el-select
                     v-model="bug.appVersion"
@@ -274,15 +270,13 @@
       </el-aside>
       <el-aside :width="type=='page'?'28.5%':'100%'">
         <el-main v-loading="loading.userInfo" :style="type=='page'?{'padding': '20px 30px'}:{'padding-left':'30px'}" class="layout_main bug_manage_user_info">
-          <div style="display:flex;align-items: center;margin-bottom: 20px;">
-            <div style="width:4px;height:15px;background:#409EFF;border-radius:1px;" />
-            <div
-              style="width:83px;height:18px;font-size:16px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px"
-            >用户信息</div>
+          <div class="module_title">
+            <div class="module_title__sign" />
+            <div class="module_title__caption">用户信息</div>
           </div>
           <el-divider v-if="type !== 'page'" />
           <el-aside :width="type=='page'?'100%':'49%'">
-            <el-form :label-width="type=='page'?'30%':'25%'" label-position="left" label-suffix=":">
+            <el-form label-width="30%" label-position="left" label-suffix=":">
               <el-form-item label="提报人">
                 <div style="padding-left: 15px" class="bug_manage_div">{{ bug.creatorList }}</div>
               </el-form-item>
@@ -295,6 +289,7 @@
                   :remote-method="searchAssigner"
                   :loading="userLoading"
                   @change="bugUpdate(bug,'userInfo')"
+                  @focus="isAssignerFocusOpen?searchAssigner(bug.assigner):null;isAssignerFocusOpen = false"
                 >
                   <el-option
                     v-for="(item,index) in assignerOptions"
@@ -323,6 +318,7 @@
                   :remote-method="searchCurrentHandler"
                   :loading="userLoading"
                   @change="bugUpdate(bug,'userInfo')"
+                  @focus="isCurrentHandlerOpen?searchCurrentHandler(bug.currentHandler):null;isCurrentHandlerOpen = false"
                 >
                   <el-option
                     v-for="(item,index) in currentHandlerOptions"
@@ -346,15 +342,13 @@
           </el-aside>
         </el-main>
         <el-main class="layout_main bug_manage_time_length" :style="type=='page'?{'padding': '20px 30px','margin-top': '20px'}:{'padding-left':'30px'}">
-          <div style="display:flex;align-items: center;margin-bottom: 20px">
-            <div style="width:4px;height:15px;background:#409EFF;border-radius:1px;" />
-            <div
-              style="width:83px;height:18px;font-size:16px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px"
-            >时间</div>
+          <div class="module_title">
+            <div class="module_title__sign" />
+            <div class="module_title__caption">时间</div>
           </div>
           <el-divider v-if="type !== 'page'" />
           <el-aside :width="type=='page'?'100%':'49%'">
-            <el-form :label-width="type=='page'?'30%':'25%'" label-position="left" label-suffix=":">
+            <el-form label-width="30%" label-position="left" label-suffix=":">
               <el-form-item label="提报时间">
                 <div style="padding-left: 15px" class="bug_manage_div">{{ bug.gmtCreate }}</div>
               </el-form-item>
@@ -379,11 +373,9 @@
     </el-container>
     <el-container :style="type=='page'?{'width':'70%'}:{'width':'100%'}" direction="vertical">
       <el-main v-loading="loading.describe" :style="type=='page'?{'padding': '20px 30px','margin-top': '20px'}:{'padding-left':'30px'}" class="layout_main">
-        <div style="display:flex;align-items: center;margin-bottom: 20px">
-          <div style="width:4px;height:15px;background:#409EFF;border-radius:1px;" />
-          <div
-            style="width:100px;height:18px;font-size:16px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px"
-          >描述</div>
+        <div class="module_title">
+          <div class="module_title__sign" />
+          <div class="module_title__caption">描述</div>
         </div>
         <el-divider v-if="type !== 'page'" />
         <div
@@ -412,11 +404,9 @@
         </div>
       </el-main>
       <el-main v-loading="loading.accessory" :style="type=='page'?{'padding': '20px 30px','margin-top': '20px'}:{'padding-left':'30px'}" class="layout_main">
-        <div style="display:flex;align-items: center;margin-bottom: 20px">
-          <div style="width:4px;height:15px;background:#409EFF;border-radius:1px;" />
-          <div
-            style="width:100px;height:18px;font-size:16px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px"
-          >附件</div>
+        <div class="module_title">
+          <div class="module_title__sign" />
+          <div class="module_title__caption">附件</div>
         </div>
         <el-divider v-if="type !== 'page'" />
         <el-upload
@@ -438,11 +428,9 @@
         </el-dialog>
       </el-main>
       <el-main :style="type=='page'?{'padding': '20px 30px','margin-top': '20px'}:{'padding-left':'30px'}" class="layout_main">
-        <div style="display:flex;align-items: center;margin-bottom: 20px">
-          <div style="width:4px;height:15px;background:#409EFF;border-radius:1px;" />
-          <div
-            style="width:100px;height:18px;font-size:16px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px"
-          >评论</div>
+        <div class="module_title">
+          <div class="module_title__sign" />
+          <div class="module_title__caption">评论</div>
         </div>
         <el-divider v-if="type !== 'page'" />
         <div>
@@ -631,6 +619,8 @@ export default {
         { name: '测试', code: 1 },
         { name: '测试2', code: 2 }
       ],
+      isAssignerFocusOpen: true,
+      isCurrentHandlerOpen: true,
       assignerOptions: [],
       currentHandlerOptions: [],
       bug: {},
@@ -690,9 +680,19 @@ export default {
   },
   mounted() {
     this.bugGetEnum()
-    this.bugGet(this.id, true).then(res => {
-      this.searchAssigner(this.bug.assigner)
-      this.searchCurrentHandler(this.bug.currentHandler)
+    this.bugGet(this.id, false).then(res => {
+      const assignerItem = {
+        idapName: null,
+        name: this.bug.assignerList,
+        idap: this.bug.assigner
+      }
+      this.assignerOptions.push(assignerItem)
+      const currentHandlerItem = {
+        idapName: null,
+        name: this.bug.currentHandlerList,
+        idap: this.bug.currentHandler
+      }
+      this.currentHandlerOptions.push(currentHandlerItem)
       this.changeWidthOnBlur()
       releaseList().then(res => {
         this.appClientList = res.data.appClient // 客户端
@@ -708,9 +708,19 @@ export default {
   },
   methods: {
     init() {
-      this.bugGet(this.id, true).then(res => {
-        this.searchAssigner(this.bug.assigner)
-        this.searchCurrentHandler(this.bug.currentHandler)
+      this.bugGet(this.id, false).then(res => {
+        const assignerItem = {
+          idapName: null,
+          name: this.bug.assignerList,
+          idap: this.bug.assigner
+        }
+        this.assignerOptions.push(assignerItem)
+        const currentHandlerItem = {
+          idapName: null,
+          name: this.bug.currentHandlerList,
+          idap: this.bug.currentHandler
+        }
+        this.currentHandlerOptions.push(currentHandlerItem)
         this.changeWidthOnBlur()
         releaseList().then(res => {
           this.appClientList = res.data.appClient // 客户端
@@ -937,6 +947,7 @@ export default {
         if (res.code === 200) {
           this.changeWidthOnBlur()
           this.bugModel = JSON.parse(JSON.stringify(this.bug))
+          this.$emit('update', false)
         } else {
           this.$message.error(res.msg)
           this.bug = JSON.parse(JSON.stringify(this.bugModel))
@@ -1239,3 +1250,26 @@ export default {
   border: 1px solid rgba(191, 198, 220);
 }
 </style>
+
+<style scoped>
+.module_title{
+  display:flex;
+  align-items: center;
+  margin-bottom: 20px
+}
+.module_title__sign {
+  width:4px;
+  height:15px;
+  background:#409EFF;
+  border-radius:1px;
+}
+.module_title__caption{
+  width:83px;
+  height:18px;
+  font-size:16px;
+  font-family:MicrosoftYaHei;
+  color:rgba(51,59,74,1);
+  margin-left:6px;
+  font-weight: 500;
+}
+</style>