Browse Source

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

# Conflicts:
#	src/components/dialog/normalDialog.vue
PrinceLee 5 years ago
parent
commit
7ccf02fd12

+ 12 - 1
src/components/dialog/normalDialog.vue

@@ -6,12 +6,13 @@
       :width="width"
       :modal-append-to-body="false"
       :close-on-click-modal="false"
+      :top="top"
       @close="cancel()"
     >
       <slot />
       <span v-show="showFooter" slot="footer" class="dialog-footer">
         <el-button @click="cancel()">取 消</el-button>
-        <el-button type="primary" @click="confirm()">确 定</el-button>
+        <el-button type="primary" @click="confirm()">{{ submitButton }}</el-button>
       </span>
     </el-dialog>
   </div>
@@ -19,6 +20,11 @@
 <script>
 export default {
   props: {
+    top: {
+      type: String,
+      default: '15vh',
+      required: false
+    },
     title: {
       type: String,
       default: '',
@@ -38,6 +44,11 @@ export default {
       type: Boolean,
       default: true,
       required: false
+    },
+    submitButton: {// 提交按钮名字
+      type: String,
+      default: '确 定',
+      required: false
     }
   },
   data() {

+ 5 - 2
src/views/Platform/presentation/PresentReport.vue

@@ -159,6 +159,11 @@ export default {
     this.getRouterData()
   },
   mounted() {
+    this.$nextTick(function() {
+      this.$on('getRouterData', function() {
+        this.getRouterData()
+      })
+    })
     this.DetailsOfProposal = new E('#DetailsOfProposal', '#DetailsOfProposal1')
     this.DetailsOfProposal.customConfig.zIndex = 110
     this.DetailsOfProposal.customConfig.menus = ['bold', 'italic', 'underline', 'link', 'list', 'justify', 'table']
@@ -171,7 +176,6 @@ export default {
       console.log(this.clienData, '提测客户端')
       this.dataChange = this.clienData
       if (this.dataChange.id) {
-        console.log(this.clienData, '111111')
         if (this.dataChange.lateStatus === 1) {
           this.lateStatusBtn1 = 'success'
           this.lateStatusBtn = 'info'
@@ -210,7 +214,6 @@ export default {
         })
       }
       if (!this.clienData[0] === undefined) {
-        console.log('sssss')
         Object.assign(this.$data, this.$options.data())
       }
     },

+ 2 - 0
src/views/Platform/presentation/Templates/TestReport.vue

@@ -155,6 +155,8 @@ export default {
       this.active = 1
     },
     gou_out() {
+      this.$emit('getRouterData')
+      this.clienData = this.preview
       this.showOne = false
       this.showThree = false
       this.showTow = true

+ 2 - 2
src/views/Platform/presentation/acceptTheReport.vue

@@ -178,7 +178,7 @@ export default {
 }
 </script>
 
-<style scoped lang="scss">
+<style scoped>
   .reportContent {
     padding: 2%;
   }
@@ -202,7 +202,7 @@ export default {
     font-weight: bold;
   }
   .rich>>> table tr td{border:1px solid #ccc;font-size: 15px; color: #606266}
-  .rich>>> table th{border:1px solid #ccc; font-size: 15px; color: #606266}
+  .rich>>> table th{border:1px solid #ccc; font-size: 15px; background: #F0F7FF; color: #606266}
   .rich>>> table {border:1px solid #ccc; border-collapse: collapse;line-height: 30px; text-align: center;font-size: 15px; color: #606266}
 
 </style>

+ 4 - 4
src/views/Platform/presentation/testPresenyL.vue

@@ -98,7 +98,7 @@ export default {
 }
 </script>
 
-<style scoped lang="scss">
+<style scoped>
   .from-creat {
     margin: 3% auto;
     padding: 0 2%;
@@ -117,7 +117,7 @@ export default {
     white-space: pre-line;
     padding-left: 10px;
   }
-  .rich>>> table tr td{border:1px solid #ccc;font-size: 14px; color: #606266}
-  .rich>>> table th{border:1px solid #ccc; font-size: 14px; background: #F0F7FF; color: #606266}
-  .rich>>> table {border:1px solid #ccc; border-collapse: collapse;line-height: 30px; text-align: center;font-size: 14px; color: #606266}
+    .rich>>> table tr td{border:1px solid #ccc;font-size: 15px; color: #606266}
+  .rich>>> table th{border:1px solid #ccc; font-size: 15px; background: #F0F7FF; color: #606266}
+  .rich>>> table {border:1px solid #ccc; border-collapse: collapse;line-height: 30px; text-align: center;font-size: 15px; color: #606266}
 </style>

+ 3 - 6
src/views/projectManage/bugList/bugindex.vue

@@ -136,7 +136,6 @@
                         filterable
                         clearable
                         remote
-                        reserve-keyword
                         :remote-method="remoteMethod"
                         :loading="loading"
                         size="small"
@@ -167,7 +166,6 @@
                         filterable
                         clearable
                         remote
-                        reserve-keyword
                         :remote-method="remoteMethod"
                         :loading="loading"
                         size="small"
@@ -198,7 +196,6 @@
                         filterable
                         clearable
                         remote
-                        reserve-keyword
                         :remote-method="remoteMethod"
                         :loading="loading"
                         size="small"
@@ -462,7 +459,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"
@@ -648,7 +645,7 @@ export default {
   watch: {
     clickCount(newVal, oldVal) {
       this.drawerShow = false
-      this.$store.state.data.bizId = false
+      // this.$store.state.data.bizId = false
     }
   },
   created() {
@@ -795,7 +792,7 @@ export default {
         JSON.stringify(this.tableData.filter(value => value.id === e)[0])
       )
       this.drawerShow = true
-      this.$store.state.data.bizId = true
+      // this.$store.state.data.bizId = true
     },
     createdDefect() {
       this.modalShow = true

+ 134 - 75
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>
@@ -34,7 +35,7 @@
     >
       <el-header height="0" />
       <el-container>
-        <el-main v-loading="loading.title" class="layout_main bug_manage_title" :style="type=='page'?{'padding': '15px 30px 15px 30px'}:{'padding':'0px 30px 10px 15px'}">
+        <el-main v-loading="loading.title" class="layout_main bug_manage_title" :style="type=='page'?{'padding': '15px 30px 15px 30px'}:{'padding':'0px 30px 15px 15px'}">
           <span id="spanLength">{{ bugNameForm.bugName }}</span>
           <el-row v-if="type=='page'">
             <el-form
@@ -241,7 +242,7 @@
                     <el-input v-model="bug.osType" placeholder="请输入" @change="bugUpdate(bug,'appInfo')" />
                   </el-form-item>
                   <el-form-item label="网络">
-                    <el-select v-model="bug.networkType" @change="bugUpdate(bug,'appInfo')">
+                    <el-select v-model="bug.networkType" clearable @change="bugUpdate(bug,'appInfo')">
                       <el-option
                         v-for="item in enums.networkTypeEnumList"
                         :key="item.code"
@@ -285,21 +286,22 @@
               <div class="module_title__caption">用户信息</div>
             </div>
             <el-divider v-if="type !== 'page'" />
-            <el-aside :width="type=='page'?'100%':'49%'">
-              <el-form label-width="30%" label-position="left" label-suffix=":">
+            <el-aside :width="type=='page'?'100%':'100%'">
+              <el-form :label-width="type=='page'?'30%':'16%'" label-position="left" label-suffix=":">
                 <el-form-item label="提报人">
                   <div style="padding-left: 15px" class="bug_manage_div">{{ bug.creatorList }}</div>
                 </el-form-item>
                 <el-form-item label="责任人">
                   <el-select
                     v-model="bug.assigner"
+                    class="current"
                     filterable
+                    multiple
                     remote
                     placeholder="请输入姓名或邮箱前缀"
                     :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"
@@ -322,13 +324,14 @@
                 <el-form-item label="修复人">
                   <el-select
                     v-model="bug.currentHandler"
+                    class="current"
+                    multiple
                     filterable
                     remote
                     placeholder="请输入姓名或邮箱前缀"
                     :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"
@@ -584,23 +587,28 @@
           <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="'复制信息'"
-        :width="'35%'"
+        :title="'上传截图'"
+        :width="'50%'"
+        :submit-button="'上传'"
+        :top="'5vh'"
         @confirm="confirmUpload()"
         @cancel="showCopyFile=false"
       >
         <div class="file-dialog">
-          <el-form ref="form" label-width="80px">
-            <el-form-item label="图片名">
-              <el-col :span="20">
+          <el-form ref="form" label-width="20%">
+            <el-form-item label="图片名">
+              <el-col style="width: 75%">
                 <el-input v-model="imageName" />
               </el-col>
-              <el-col :span="4">.png</el-col>
+              <el-col style="width: 10%">.png</el-col>
             </el-form-item>
           </el-form>
-          <img :src="imageUrl" class="image-url">
+          <div class="image">
+            <img :src="imageUrl" class="image-url">
+          </div>
         </div>
       </normal-dialog>
     </el-container>
@@ -625,6 +633,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) {
@@ -646,6 +655,7 @@ export default {
   name: 'BugDetails',
   components: {
     Dropdown,
+    createdBug,
     normalDialog
   },
   mixins: [fackClickOutSide],
@@ -665,6 +675,7 @@ export default {
   },
   data() {
     return {
+      modalShow: false,
       iconName: 'float_反馈_icon_close',
       bugNameIsFocus: false,
       props: { multiple: true },
@@ -695,6 +706,7 @@ export default {
       uploadDialogVisible: false,
       uploadDialogImageUrl: '',
       test: '测试',
+      num: 0,
       userLoading: false,
       statusDialogVisible: false,
       statusDialogTitle: '',
@@ -703,8 +715,6 @@ export default {
         { name: '测试', code: 1 },
         { name: '测试2', code: 2 }
       ],
-      isAssignerFocusOpen: true,
-      isCurrentHandlerOpen: true,
       assignerOptions: [],
       currentHandlerOptions: [],
       bug: {},
@@ -752,7 +762,7 @@ export default {
       }
     },
     id(newVal, oldVal) {
-      window.scrollTo(0, 0)
+      // window.scrollTo(0, 0)
       this.bug = {}
       this.bugModel = {}
       this.bugNameForm = { bugName: '' }
@@ -764,8 +774,6 @@ export default {
     }
   },
   created() {
-    this.$store.state.data.status = true
-    this.$store.state.data.bizId = true
     if (this.type !== 'page') {
       var height = window.innerHeight > document.body.clientHeight ? window.innerHeight : document.body.clientHeight
       height -= 130
@@ -777,25 +785,27 @@ export default {
   },
   mounted() {
     this.bugGetEnum()
-    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 // 客户端
-        this.getVersionList(this.bug.appId)
+    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.changeWidthOnBlur()
+        releaseList().then(res => {
+          this.appClientList = res.data.appClient // 客户端
+          this.getVersionList(this.bug.appId)
+        })
+        this.RichText()
       })
-      this.RichText()
     })
     this.getCommentList()
     this.getBusinessLinePlatformModule()
@@ -803,28 +813,24 @@ export default {
       this.taskEnumList = res.data // 所属任务
     })
   },
-  destroyed() {
-    this.$store.state.data.status = false
-    this.$store.state.data.bizId = false
-  },
   methods: {
     closeDrawer() {
       this.$emit('close', false)
     },
     init() {
       this.bugGet(this.id, false).then(res => {
-        const assignerItem = {
-          idapName: null,
-          name: this.bug.assignerList,
-          idap: this.bug.assigner
+        this.assignerOptions = []
+        for (const i in this.bug.assignerList.length) {
+          this.searchUser(this.bug.assigner[i]).then(res => {
+            this.assignerOptions = res.data
+          })
         }
-        this.assignerOptions.push(assignerItem)
-        const currentHandlerItem = {
-          idapName: null,
-          name: this.bug.currentHandlerList,
-          idap: this.bug.currentHandler
+        this.currentHandlerOptions = []
+        for (const i in this.bug.currentHandlerList.length) {
+          this.searchUser(this.bug.currentHandler[i]).then(res => {
+            this.currentHandlerOptions = res.data
+          })
         }
-        this.currentHandlerOptions.push(currentHandlerItem)
         this.changeWidthOnBlur()
         this.getCommentList()
         releaseList().then(res => {
@@ -856,7 +862,7 @@ export default {
         return item.name !== file.name
       })
       this.bug.accessory = JSON.stringify(this.fileDbList)
-      this.bugUpdate()
+      this.bugUpdate(this.bug, 'accessory')
     },
     handlePictureCardPreview(file) {
       this.dialogImageUrl = file.url
@@ -933,6 +939,7 @@ export default {
     },
     changeBugName() {
       if (this.bugNameForm.bugName.length < 1) {
+        this.bugNameForm.bugName = this.bug.bugName
         return
       }
       this.bug.bugName = this.bugNameForm.bugName
@@ -940,6 +947,7 @@ export default {
     },
     RichText() {
       this.editor = new E('#wage', '#wage1')
+      this.editor.customConfig.zIndex = 0
       this.editor.customConfig.menus = [
         'bold',
         'italic',
@@ -986,13 +994,28 @@ export default {
       this.loading.fullscreen = isLoading
       return bugDetails({ id: id }).then(res => {
         if (res.code === 200) {
-          document.getElementsByClassName('scop')[0].scrollTop = 0
+          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)
           //   }
           // }
           this.bug = res.data
+          this.bug.currentHandler = res.data.currentHandler.split(',')
+          this.bug.assigner = res.data.assigner.split(',')
+          this.bug.currentHandler.map(item => {
+            this.searchUser(item).then(res => {
+              this.currentHandlerOptions.push(res.data[0])
+            })
+          })
+          this.bug.assigner.map(item => {
+            this.searchUser(item).then(res => {
+              this.assignerOptions.push(res.data[0])
+            })
+          })
           this.bugModel = JSON.parse(JSON.stringify(res.data))
           this.bugDescribe = this.bug.bugDescribe
           if (this.bugDescribe !== null) {
@@ -1022,6 +1045,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
@@ -1047,9 +1080,6 @@ export default {
       return bugDelete(userData, this.bug.id).then(res => {
         return res
       })
-    },
-    bugTitleUpdate() {
-
     },
     bugUpdate(form, loadingStr) {
       loadingStr ? this.loading[loadingStr] = true : this.loading.fullscreen = true
@@ -1058,23 +1088,37 @@ export default {
         ename: this.userInformation,
         name: this.userNames
       }
+      this.num = 1
       let objData
       if (form) {
-        objData = { bugBaseInfo: form, user: userData }
+        const data = form
+        data.currentHandler = form.currentHandler.join(',')
+        data.assigner = form.assigner.join(',')
+        objData = { bugBaseInfo: data, user: userData }
       } else {
-        objData = { bugBaseInfo: this.bug, user: userData }
+        const data = form
+        data.currentHandler = form.currentHandler.join(',')
+        data.assigner = form.assigner.join(',')
+        objData = { bugBaseInfo: data, user: userData }
+      }
+      if (objData.bugBaseInfo.currentHandler !== '' && objData.bugBaseInfo.assigner !== '') {
+        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)
+          } else {
+            this.bug = JSON.parse(JSON.stringify(this.bugModel))
+          }
+          loadingStr ? this.loading[loadingStr] = false : this.loading.fullscreen = false
+          return res
+        })
+      } else {
+        this.$message.warning('责任人,修复人不能为空')
+        this.loading.userInfo = false
+        this.bugGet(this.bug.id, false)
       }
-      return bugUpdate(objData).then(res => {
-        if (res.code === 200) {
-          this.changeWidthOnBlur()
-          this.bugModel = JSON.parse(JSON.stringify(this.bug))
-          this.$emit('update', false)
-        } else {
-          this.bug = JSON.parse(JSON.stringify(this.bugModel))
-        }
-        loadingStr ? this.loading[loadingStr] = false : this.loading.fullscreen = false
-        return res
-      })
     },
     searchUser(query) {
       this.userLoading = true
@@ -1103,11 +1147,13 @@ export default {
       })
     },
     searchAssigner(val) {
+      this.assignerOptions = []
       this.searchUser(val).then(res => {
         this.assignerOptions = res.data
       })
     },
     searchCurrentHandler(val) {
+      this.currentHandlerOptions = []
       this.searchUser(val).then(res => {
         this.currentHandlerOptions = res.data
       })
@@ -1446,6 +1492,10 @@ export default {
 </style>
 
 <style scoped lang="scss">
+.current:hover{
+  border-radius: 4px;
+  border: 1px solid #DCDFE6;
+}
 .module_title{
   display:flex;
   align-items: center;
@@ -1473,7 +1523,7 @@ export default {
   margin:10px 0 5px 0;
 }
 .tips {
-  color:#F56C6C;
+  color:#DCDFE6;
   position: absolute;
 }
 .file-dialog {
@@ -1481,12 +1531,21 @@ export default {
   flex-direction: column;
   align-items: center;
   .el-form {
-    width: 80%;
+    width: 100%;
+  }
+  .image {
+    position: relative;
+    width: 61%;
+    padding-top: 60%;
+    border:1px solid #409EFF;
+    .image-url {
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%,-50%);
+      width: 100%;
+      max-height: 100%;
+    }
   }
-}
-.image-url {
-  width: 90%;
-  max-height: 60vh;
-  border:1px solid #EBEEF5;
 }
 </style>

+ 81 - 38
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">
@@ -56,7 +56,7 @@
                 </el-form-item>
 
                 <el-form-item label="责任人" style="width:100%;" prop="assigner">
-                  <el-select v-model="formInline.assigner" filterable remote reserve-keyword :remote-method="remoteMethod" :loading="loading" size="small" style="width: 100%" placeholder="请输入姓名或邮箱前缀" @change="getcurrentHandler(formInline.assigner)">
+                  <el-select v-model="formInline.assigner" multiple filterable remote :remote-method="remoteMethod" :loading="loading" size="small" style="width: 100%" placeholder="请输入姓名或邮箱前缀" @change="getcurrentHandler(formInline.assigner)">
                     <el-option v-for="item in options" :key="item.idap" :label="item.name" :value="test2(item, 0)">
                       <div style="display: flex;justify-content: start;">
                         <div style="min-width:100px;color: #8492a6; font-size: 13px; overflow:hidden">{{ item.deptName }}</div>
@@ -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" />
@@ -95,11 +95,11 @@
                     <el-option v-for="item in discoveryMethEnumList" :key="item.code" :label="item.name" :value="item.code" />
                   </el-select>
                 </el-form-item>
-                <el-form-item label="提报人" style="width:100%;" prop="currentHandler">
+                <el-form-item label="提报人" style="width:100%;" prop="creatorList">
                   <el-input v-model="formInline.creatorList" :disabled="true" size="small" placeholder="请输入姓名或邮箱前缀" style="width:100%;" />
                 </el-form-item>
                 <el-form-item label="修复人" style="width:100%;" prop="currentHandler">
-                  <el-select v-model="formInline.currentHandler" filterable remote reserve-keyword :remote-method="remoteMethod" :loading="loading" size="small" style="width: 100%" placeholder="请输入姓名或邮箱前缀">
+                  <el-select v-model="formInline.currentHandler" multiple filterable remote :remote-method="remoteMethod" :loading="loading" size="small" style="width: 100%" placeholder="请输入姓名或邮箱前缀">
                     <el-option v-for="item in options" :key="item.idap" :label="item.name" :value="test2(item, 0)">
                       <div style="display: flex;justify-content: start;">
                         <div style="min-width:100px;color: #8492a6; font-size: 13px; overflow:hidden">{{ item.deptName }}</div>
@@ -141,7 +141,7 @@
             </div>
             <div style=" margin: 0 4%;">
               <el-form-item label="描述" style="width:100%;">
-                <el-row>
+                <el-row v-if="editr">
                   <el-col :span="24">
                     <div id="wange" style="background-color: #FFF;" class="toolbar" />
                     <div id="wange1" class="text" />
@@ -174,21 +174,25 @@
     </el-dialog>
     <normal-dialog
       :show-dialog="showCopyFile"
-      :title="'复制信息'"
-      :width="'35%'"
+      :title="'上传截图'"
+      :width="'50%'"
+      :submit-button="'上传'"
+      :top="'5vh'"
       @confirm="confirmUpload()"
       @cancel="showCopyFile=false"
     >
       <div class="file-dialog">
-        <el-form ref="form" label-width="80px">
-          <el-form-item label="图片名">
-            <el-col :span="20">
+        <el-form ref="form" label-width="20%">
+          <el-form-item label="图片名">
+            <el-col style="width: 75%">
               <el-input v-model="imageName" />
             </el-col>
-            <el-col :span="4">.png</el-col>
+            <el-col style="width: 10%">.png</el-col>
           </el-form-item>
         </el-form>
-        <img :src="imageUrl" class="image-url">
+        <div class="image">
+          <img :src="imageUrl" class="image-url">
+        </div>
       </div>
     </normal-dialog>
     <el-dialog title="附件预览" :modal-append-to-body="false" :visible.sync="dialogVisible">
@@ -233,10 +237,6 @@ export default {
   },
   data() {
     return {
-      dd: `P0:阻塞进程的bug,如新功能未实现、app启动失败、如接单crash、开单crash 
-           P1:主流程功能bug,新需求的功能性bug建议放在该等级 
-           P2:功能bug,不影响主流程 
-           P3:不影响功能使用的小问题,如界面显示有异常,文案、UI微调,建议优化类`,
       dialogImageUrl: '', // 附件展示图片
       modalShow: false, // 缺陷新建弹窗
       dialogVisible: false,
@@ -267,6 +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' }],
         currentHandler: [{ required: true, message: '修复人不能为空', trigger: 'change' }]
 
       },
@@ -287,46 +288,74 @@ export default {
       sysTypeEnumList: [], // 端类型
       showCopyFile: false, // 复制文件对话框
       imageName: null,
-      imageUrl: null
+      imageUrl: null,
+      editr: false,
+      formData: [],
+      formData1: []
     }
   },
   created() {
     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 = {}
       this.$set(this.formInline, 'creatorList', this.userNames)
       this.$set(this.formInline, 'bizId', Number(localStorage.getItem('bizId')))
+
       if (e === 1) {
         this.titleName = '新建缺陷'
         if (ele !== undefined) {
           this.$set(this.formInline, 'taskId', ele.id)
         }
       }
+      if (e === 2) {
+        this.titleName = '复制缺陷'
+        if (ele !== undefined) {
+          this.formInline = ele
+          this.show2 = true
+          this.$set(this.formInline, 'bugName', '')
+          this.$set(this.formInline, 'accessory', '')
+          this.options = []
+          this.formData = []
+          this.formData1 = []
+          this.formData = this.formInline.assigner.concat(this.formInline.currentHandler)
+          this.formData1 = this.unique6(this.formData)
+          this.formData1.map(item => {
+            this.searchUser(item).then(res => {
+              this.options.push(res.data[0])
+            })
+          })
+        }
+      }
       this.$nextTick(() => {
         document.getElementById('soll').scrollTop = 0
+        this.editr = true
+        this.getEcharts()
       })
+    },
+    unique6(arr) {
+      var newArr = []
+      newArr = arr.filter(item => {
+        return newArr.includes(item) ? '' : newArr.push(item)
+      })
+      return newArr
+    },
+    searchUser(query) {
+      this.loading = true
+      return memberQueryMemberInfoByIDAPorName({ memberIDAP: query }).then(res => {
+        this.loading = false
+        return res
+      })
+    },
+    getEcharts() {
       setTimeout(() => {
         this.$set(this.formInline, 'bugDescribe', '')
         const editorRemark = new E('#wange', '#wange1')
@@ -349,6 +378,7 @@ export default {
       this.fileList = []
       this.fileDbList = []
       this.formInline = {}
+      this.editr = false
       this.modalShow = false
     },
     // 上传成功回调
@@ -372,11 +402,15 @@ export default {
     bug_created(e) { // 创建(提交)
       this.$refs['formInline'].validate((valid) => {
         if (valid) {
+          const data = e
+          data.currentHandler = e.currentHandler.join()
+          data.assigner = e.assigner.join()
           var user = { name: this.userNames, ename: this.userInformation, id: '' }
-          bugCreate({ bugBaseInfo: e, user }).then(res => {
+          bugCreate({ bugBaseInfo: data, user }).then(res => {
             this.bugListSelect()
             this.modalShow = false
             this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
+            this.$emit('father')
             if (this.getBugList) {
               this.getBugList()
             }
@@ -559,12 +593,21 @@ export default {
   flex-direction: column;
   align-items: center;
   .el-form {
-    width: 80%;
+    width: 100%;
+  }
+  .image {
+    position: relative;
+    width: 61%;
+    padding-top: 60%;
+    border:1px solid #409EFF;
+    .image-url {
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%,-50%);
+      width: 100%;
+      max-height: 100%;
+    }
   }
-}
-.image-url {
-  width: 90%;
-  max-height: 60vh;
-  border:1px solid #EBEEF5;
 }
 </style>

+ 21 - 3
src/views/projectManage/dialog_vue.vue

@@ -41,7 +41,7 @@
               </el-select>
             </el-form-item>
             <el-form-item label="开发负责人">
-              <el-select v-model="task_form.rdOwner" filterable clearable remote reserve-keyword placeholder="请输入姓名或邮箱前缀" :remote-method="remoteMethod" :loading="loading" style="width: 100%">
+              <el-select v-model="task_form.rdOwner" filterable clearable remote placeholder="请输入姓名或邮箱前缀" :remote-method="remoteMethod" :loading="loading" style="width: 100%">
                 <el-option v-for="item in options" :key="item.idap" :label="item.name" :value="test2(item, 0)">
                   <div style="display: flex;justify-content: start;">
                     <div style="min-width:100px;color: #8492a6; font-size: 13px; overflow:hidden">{{ item.deptName }}</div>
@@ -63,8 +63,8 @@
               <el-cascader v-model="task_form.moduleIds" clearable collapse-tags :props="props" :options="business_platform_Modular" placeholder="请选择" style="width: 20vw" @click.native="bugDataGet" />
             </el-form-item>
             <el-form-item label="测试负责人">
-              <el-select v-model="task_form.qaOwner" filterable clearable remote reserve-keyword placeholder="请输入姓名或邮箱前缀" :remote-method="remoteMethod" :loading="loading" style="width: 20vw">
-                <el-option v-for="item in options" :key="item.idap" :label="item.name" :value="test2(item, 0)">
+              <el-select v-model="task_form.qaOwner" filterable clearable remote placeholder="请输入姓名或邮箱前缀" :remote-method="remoteMethod1" :loading="loading" style="width: 20vw">
+                <el-option v-for="item in options1" :key="item.idap" :label="item.name" :value="test2(item, 0)">
                   <div style="display: flex;justify-content: start;">
                     <div style="min-width:100px;color: #8492a6; font-size: 13px; overflow:hidden">{{ item.deptName }}</div>
                     <div style="min-width:80px">{{ item.name }}</div>
@@ -121,6 +121,7 @@ export default {
       projectId: '', // 项目id
       requireId: '', // 需求id
       options: [], // 员工信息
+      options1: [],
       noTest: [], // 是否免测
       all_bizId: [], // 业务线
       appClient: [], // 涉及业务线
@@ -335,6 +336,23 @@ export default {
         this.options = []
       }
     },
+    remoteMethod1(query) { // 人员查询
+      if (query !== '') {
+        this.loading = true
+        setTimeout(() => {
+          this.loading = false
+          memberQueryMemberInfoByIDAPorName({ memberIDAP: query }).then(res => {
+            const obj = {}
+            this.options1 = res.data.reduce((cur, next) => {
+              obj[next.idap] ? '' : obj[next.idap] = true && cur.push(next)
+              return cur
+            }, [])
+          })
+        }, 200)
+      } else {
+        this.options = []
+      }
+    },
     get_source(e) {
       switch (e) {
         case 1:

+ 21 - 1
src/views/projectManage/projectList/projectIndex.vue

@@ -17,7 +17,19 @@
             </div>
             <div class="Layout">
               <div class="queryName marginLeft">负责人</div>
-              <el-select v-model="form_all.projectOwner" filterable clearable remote reserve-keyword placeholder="请输入姓名或邮箱前缀" :remote-method="remoteMethod" :loading="loading" size="small" @change="query_project(form_all)">
+              <el-select
+                v-model="form_all.projectOwner"
+                filterable
+                clearable
+                remote
+                reserve-keyword
+                placeholder="请输入姓名或邮箱前缀"
+                :remote-method="remoteMethod"
+                :loading="loading"
+                size="small"
+                @focus="optionsClear"
+                @change="query_project(form_all)"
+              >
                 <el-option v-for="item in options" :key="item.idap" style="min-width:300px" :label="item.name" :value="test2(item, 0)">
                   <div class="flex_start">
                     <div class="deptName">{{ item.deptName }}</div>
@@ -58,6 +70,7 @@
                 :remote-method="remoteMethod"
                 :loading="loading"
                 size="small"
+                @focus="optionsClear"
               >
                 <el-option
                   v-for="item in options"
@@ -193,6 +206,7 @@
                 :remote-method="remoteMethod"
                 :loading="loading"
                 style="width: 100%"
+                @focus="optionsClear"
               >
                 <el-option
                   v-for="item in options"
@@ -219,6 +233,7 @@
                 :remote-method="remoteMethod"
                 :loading="loading"
                 style="width: 100%"
+                @focus="optionsClear"
               >
                 <el-option
                   v-for="item in options"
@@ -256,6 +271,7 @@
                 :remote-method="remoteMethod"
                 :loading="loading"
                 style="width: 100%"
+                @focus="optionsClear"
               >
                 <el-option
                   v-for="item in options"
@@ -282,6 +298,7 @@
                 :remote-method="remoteMethod"
                 :loading="loading"
                 style="width: 100%"
+                @focus="optionsClear"
               >
                 <el-option
                   v-for="item in options"
@@ -434,6 +451,9 @@ export default {
         this.options = []
       }
     },
+    optionsClear() {
+      this.options = []
+    },
     link_project(e) {
       this.$router.push({ name: '项目详情', query: { id: e }})
     },

+ 58 - 54
src/views/projectManage/requirement/list/create.vue

@@ -4,7 +4,7 @@
       <div style="width:4px;height:17px;background:#409EFF;border-radius:1px;" />
       <div style="width:83px;height:20px;font-size:18px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px">{{ title }}</div>
     </div>
-    <el-form :model="form" :rules="rules" label-position="right" label-width="120px">
+    <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="120px">
       <el-form-item label="需求名称" prop="name">
         <el-input v-model="form.name" placeholder="请输入需求名称" />
       </el-form-item>
@@ -222,64 +222,68 @@ export default {
       this.isVisible = false
     },
     confirm: function() {
-      for (const i in this.form) {
-        if (!this.form[i]) {
-          if (i === 'name') {
-            this.$message.warning('需求名称为空,请输入需求名称')
-            return
-          } else if (i === 'priority') {
-            if (this.form[i] === 0) {
-              break
-            }
-            this.$message.warning('请选择优先级')
-            return
-          } else if (i === 'sourceType') {
-            this.$message.warning('请选择需求来源')
-            return
-          } else if (i === 'bizId') {
-            this.$message.warning('请选择业务线')
-            return
-          } else if (i === 'pm') {
-            this.$message.warning('请填写PM名称')
-            return
-          } else if (i === 'mrdUrl') {
-            this.$message.warning('请输入Prd链接')
-            return
-          } else if (i === 'dependOnRelease') {
-            if (this.form[i] === 0) {
-              break
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          for (const i in this.form) {
+            if (!this.form[i]) {
+              if (i === 'name') {
+                this.$message.warning('需求名称为空,请输入需求名称')
+                return
+              } else if (i === 'priority') {
+                if (this.form[i] === 0) {
+                  break
+                }
+                this.$message.warning('请选择优先级')
+                return
+              } else if (i === 'sourceType') {
+                this.$message.warning('请选择需求来源')
+                return
+              } else if (i === 'bizId') {
+                this.$message.warning('请选择业务线')
+                return
+              } else if (i === 'pm') {
+                this.$message.warning('请填写PM名称')
+                return
+              } else if (i === 'mrdUrl') {
+                this.$message.warning('请输入Prd链接')
+                return
+              } else if (i === 'dependOnRelease') {
+                if (this.form[i] === 0) {
+                  break
+                }
+                return
+              } else if (i === 'referredClientType' && this.form.dependOnRelease === 1) {
+                this.$message.warning('请选择客户端')
+                return
+              }
             }
-            return
-          } else if (i === 'referredClientType' && this.form.dependOnRelease === 1) {
+          }
+          if (this.form.referredClientType && this.form.dependOnRelease === 1 && this.form.referredClientType.length === 0) {
             this.$message.warning('请选择客户端')
             return
           }
+          this.form.creator = localStorage.getItem('username')
+          if (this.title === '新建需求') {
+            createRequirement(this.form)
+              .then(res => {
+                if (res.code === 200) {
+                  this.$emit('confirm', this.form)
+                } else {
+                  this.$message.warning(res.msg)
+                }
+              })
+          } else {
+            updateRequirement(this.form)
+              .then(res => {
+                if (res.code === 200) {
+                  this.$emit('confirm', this.form)
+                } else {
+                  this.$message.warning(res.msg)
+                }
+              })
+          }
         }
-      }
-      if (this.form.referredClientType && this.form.dependOnRelease === 1 && this.form.referredClientType.length === 0) {
-        this.$message.warning('请选择客户端')
-        return
-      }
-      this.form.creator = localStorage.getItem('username')
-      if (this.title === '新建需求') {
-        createRequirement(this.form)
-          .then(res => {
-            if (res.code === 200) {
-              this.$emit('confirm', this.form)
-            } else {
-              this.$message.warning(res.msg)
-            }
-          })
-      } else {
-        updateRequirement(this.form)
-          .then(res => {
-            if (res.code === 200) {
-              this.$emit('confirm', this.form)
-            } else {
-              this.$message.warning(res.msg)
-            }
-          })
-      }
+      })
     },
     searchUser(query) {
       this.userLoading = true

+ 4 - 4
src/views/virtualDevices/HTvehicle.vue

@@ -58,10 +58,10 @@
             <template slot-scope="scope"><span>{{ scope.row.gmtModify }}</span></template>
           </el-table-column> -->
           <el-table-column label="经度" min-width="60px" align="center" show-overflow-tooltip>
-            <template slot-scope="scope"><span>{{ scope.row.deviceLng }}</span></template>
+            <template slot-scope="scope"><span>{{ scope.row.deviceLat }}</span></template>
           </el-table-column>
           <el-table-column label="纬度" min-width="60px" align="center" show-overflow-tooltip>
-            <template slot-scope="scope"><span>{{ scope.row.deviceLat }}</span></template>
+            <template slot-scope="scope"><span>{{ scope.row.deviceLng }}</span></template>
           </el-table-column>
           <el-table-column label="关锁" align="center" min-width="60px" class-name="small-padding fixed-width">
             <template slot-scope="{row}">
@@ -137,9 +137,9 @@
             </tr>
             <tr>
               <th width="12%" height="40" style="background-color:#F1F4F7">经度</th>
-              <td>{{ detailData.deviceLng }}</td>
+              <td>{{ detailData.deviceLat }}</td>
               <th style="background-color:#F1F4F7">纬度 </th>
-              <td> {{ detailData.deviceLat }}</td>
+              <td> {{ detailData.deviceLng }}</td>
             </tr>
             <tr>
               <th width="12%" height="40" style="background-color:#F1F4F7">锁状态</th>