qinzhipeng_v пре 5 година
родитељ
комит
2e430851fb

+ 1 - 1
src/views/projectManage/bugList/bugindex.vue

@@ -445,7 +445,7 @@
         </el-row>
       </el-main>
     </el-container>
-    <createdBug v-if="modalShow" ref="createdBug" :get-bug-list="getBugList" />
+    <createdBug v-show="modalShow" ref="createdBug" :get-bug-list="getBugList" />
     <el-drawer
       :visible.sync="drawerShow"
       :modal="false"

+ 15 - 0
src/views/projectManage/bugList/details/index.vue

@@ -16,6 +16,7 @@
         <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-menu>
@@ -586,6 +587,7 @@
           <el-button type="primary" @click="statusDialogConfirm">确 定</el-button>
         </template>
       </el-dialog>
+      <createdBug v-if="modalShow" ref="createdBug" @father="father" />
       <normal-dialog
         :show-dialog="showCopyFile"
         :title="'复制信息'"
@@ -624,6 +626,7 @@ import {
 } from '@/api/defectManage.js'
 import Dropdown from './dropdown.vue'
 import normalDialog from '@/components/dialog/normalDialog'
+import createdBug from '@/views/projectManage/bugList/file/createdBug'
 import axios from 'axios'
 
 document.body.onpaste = function(event) {
@@ -645,6 +648,7 @@ export default {
   name: 'BugDetails',
   components: {
     Dropdown,
+    createdBug,
     normalDialog
   },
   mixins: [fackClickOutSide],
@@ -664,6 +668,7 @@ export default {
   },
   data() {
     return {
+      modalShow: false,
       iconName: 'float_反馈_icon_close',
       bugNameIsFocus: false,
       props: { multiple: true },
@@ -1059,6 +1064,16 @@ export default {
         return res
       })
     },
+    openQueryDialog() {
+      this.modalShow = true
+      this.$nextTick(() => {
+        this.$refs.createdBug.init(2, this.bug)
+      })
+    },
+    father() {
+      this.bugGet(this.bug.id, false)
+      this.$emit('update', false)
+    },
     bugGetEnum() {
       return bugGetEnum().then(res => {
         this.enums = res.data

+ 16 - 23
src/views/projectManage/bugList/file/createdBug.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="Parent">
-    <el-dialog :visible.sync="modalShow" width="70%" top="4vh" :close-on-click-modal="false" :destroy-on-close="true" @close="modalClose">
+    <el-dialog :visible.sync="modalShow" width="70%" top="4vh" :modal-append-to-body="false" :close-on-click-modal="false" :destroy-on-close="true" @close="modalClose">
       <el-form ref="formInline" label-position="left" :model="formInline" :rules="rules" label-width="90px">
         <el-row style="margin: 0 4% 2% 4%;">
           <el-col :span="24">
@@ -78,7 +78,7 @@
                     class="item"
                     effect="dark"
                     style="white-space:pre-line;"
-                    :content="dd"
+                    :content="`P0:阻塞进程的bug,如新功能未实现、app启动失败、如接单crash、开单crash P1:主流程功能bug,新需求的功能性bug建议放在该等级 P2:功能bug,不影响主流程 P3:不影响功能使用的小问题,如界面显示有异常,文案、UI微调,建议优化类`"
                     placement="bottom"
                   >
                     <i style="color: red; margin-left: -17px;" class="el-icon-warning-outline" />
@@ -230,10 +230,6 @@ export default {
   },
   data() {
     return {
-      dd: `P0:阻塞进程的bug,如新功能未实现、app启动失败、如接单crash、开单crash 
-           P1:主流程功能bug,新需求的功能性bug建议放在该等级 
-           P2:功能bug,不影响主流程 
-           P3:不影响功能使用的小问题,如界面显示有异常,文案、UI微调,建议优化类`,
       dialogImageUrl: '', // 附件展示图片
       modalShow: false, // 缺陷新建弹窗
       dialogVisible: false,
@@ -292,25 +288,12 @@ export default {
     this.bugListSelect()
     this.bugDataGet()
   },
-  mounted() {
-    this.form.remark = 'dd'
-    setTimeout(() => {
-      this.$set(this.formInline, 'bugDescribe', '')
-      const editorRemark = new E('#wange', '#wange1')
-      editorRemark.customConfig.menus = ['bold', 'italic', 'underline', 'link', 'list', 'justify', 'table', 'foreColor']
-      editorRemark.customConfig.onchange = (html) => {
-        this.formInline.bugDescribe = html
-      }
-      editorRemark.create()
-    }, 100)
-  },
   methods: {
     init(e, ele) {
       this.modalShow = true
       this.$nextTick(() => {
         this.$refs['formInline'].clearValidate()
       })
-
       this.fileList = []
       this.fileDbList = []
       this.formInline = {}
@@ -322,9 +305,15 @@ export default {
           this.$set(this.formInline, 'taskId', ele.id)
         }
       }
-      this.$nextTick(() => {
-        document.getElementById('soll').scrollTop = 0
-      })
+      if (e === 2) {
+        this.titleName = '复制缺陷'
+        if (ele !== undefined) {
+          this.formInline = ele
+          this.show2 = true
+          this.$set(this.formInline, 'bugName', '')
+          this.$set(this.formInline, 'accessory', '')
+        }
+      }
       setTimeout(() => {
         this.$set(this.formInline, 'bugDescribe', '')
         const editorRemark = new E('#wange', '#wange1')
@@ -333,7 +322,10 @@ export default {
           this.formInline.bugDescribe = html
         }
         editorRemark.create()
-      }, 100)
+      }, 200)
+      this.$nextTick(() => {
+        document.getElementById('soll').scrollTop = 0
+      })
     },
     getcurrentHandler(e) {
       this.$set(this.formInline, 'currentHandler', e)
@@ -376,6 +368,7 @@ export default {
             this.bugListSelect()
             this.modalShow = false
             this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
+            this.$emit('father')
             if (this.getBugList) {
               this.getBugList()
             }