qinzhipeng_v 5 жил өмнө
parent
commit
8a02be94fd

+ 2 - 2
src/apiConfig/api.js

@@ -1,6 +1,6 @@
 /*eslint-disable*/   //规避eslint的检查,如没有eslint可不写
-// export const mockUrl = 'http://10.179.24.176:8980' // 线下
-export const mockUrl = 'http://10.179.24.123:8980' // 线上
+export const mockUrl = 'http://10.179.24.176:8980' // 线下
+// export const mockUrl = 'http://10.179.24.123:8980' // 线上
 
 // export const mockUrl = 'http://172.23.162.48:8980' // 美双姐本地
 

+ 1 - 1
src/router/index.js

@@ -144,7 +144,7 @@ export const constantRoutes = [
       {
         path: '/Platform/useCasePage',
         name: '用例管理',
-        hidden: true,
+        // hidden: true,
         component: () => import('@/views/Platform/useCasePage'),
         meta: { title: '用例管理' },
         children: [

+ 6 - 4
src/views/Platform/bugManage/bugQuery.vue

@@ -223,10 +223,12 @@ export default {
       })
       bugGet(this.$route.query.id).then(res => {
         this.form = res.data
-        var str = res.data.accessory
-        var obj = JSON.parse(str.split('{}')[0])
-        for (var a of obj) {
-          this.uptataKey.push(a)
+        if (res.data.accessory === '') {
+          var str = res.data.accessory
+          var obj = JSON.parse(str.split('{}')[0])
+          for (var a of obj) {
+            this.uptataKey.push(a)
+          }
         }
         for (const a of this.bizIdEnumList) {
           if (this.form.bizId === a.code) {

+ 13 - 7
src/views/Platform/useCase/createUse.vue

@@ -28,11 +28,11 @@
         <div v-for="(item, index) in arr" ref="for" :key="index">
           <div ref="div1">
             <div style="box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04); margin-bottom:2%;">
-              <el-form :model="caseData" label-width="90pt">
+              <el-form :model="caseInfos_List" label-width="90pt">
                 <el-row>
                   <el-col :span="20" style="margin:2% 0 0 0; white-space:nowrap;">
                     <el-form-item label="执行步骤">
-                      <el-input v-model="caseData.description" type="textarea" :rows="4" placeholder="请输入内容" />
+                      <el-input v-model="caseInfos_List.description" type="textarea" :rows="4" placeholder="请输入内容" />
                       <el-button v-show="plus" size="mini" type="primary" icon="el-icon-plus" style="margin-bottom: 6%;" @click="addform(caseData, key)" />
                       <el-button v-show="plus" size="mini" icon="el-icon-minus" @click="deleteData" />
                     </el-form-item>
@@ -41,7 +41,7 @@
                 <el-row>
                   <el-col :span="22">
                     <el-form-item label="预期结果">
-                      <el-input v-model="caseData.expectedResult" placeholder="请输入内容" />
+                      <el-input v-model="caseInfos_List.expectedResult" placeholder="请输入内容" />
                     </el-form-item>
                   </el-col>
                 </el-row>
@@ -58,7 +58,7 @@
                   <el-row style="flex:1;">
                     <el-col :span="20">
                       <el-form-item label="备注">
-                        <el-input v-model="caseData.remark" type="textarea" :rows="8" placeholder="请输入内容" />
+                        <el-input v-model="caseInfos_List.remark" type="textarea" :rows="8" placeholder="请输入内容" />
                       </el-form-item>
                     </el-col>
                   </el-row>
@@ -84,7 +84,7 @@
         </div>
         <el-row>
           <el-col :span="22" style="text-align:right; ">
-            <el-button :disabled="dis" type="primary" @click="caseCreateCase(caseData, titleName)">保 存</el-button>
+            <el-button :disabled="dis" type="primary" @click="caseCreateCase(caseData, titleName, caseInfos_List)">保 存</el-button>
             <el-button style="margin:9% 0 0 4%;" @click="Return">取 消</el-button>
           </el-col>
         </el-row>
@@ -104,6 +104,7 @@ export default {
       caseFolderId: '',
       caseData: {},
       add_obj: {},
+      caseInfos_List: {},
       btn_show: true,
       plus: true,
       dis: false,
@@ -207,20 +208,25 @@ export default {
     },
 
     // 新建Data
-    caseCreateCase(vel, e) {
-      debugger
+    caseCreateCase(vel, e, ele) {
       if (e === '编辑') {
         this.caseData = vel
+        this.caseData.remark = ele.remark
+        this.caseData.expectedResult = ele.expectedResult
+        this.caseData.description = ele.description
         this.caseData.accessory = JSON.stringify(this.uptataKey)
         updateCaseData(this.caseData).then(res => {
           this.$message({ type: 'success', message: res.msg })
           this.$router.go(-1)
         })
       }
+      // var list = []
+      // var obj = { accessory: JSON.stringify(this.uptataKey), remark: ele.remark, expectedResult: ele.expectedResult, description: ele.description }
       if (e === '新增') {
         this.$refs['caseData'].validate((valid) => {
           if (valid) {
             this.caseData = vel
+            // this.caseData.caseInfos =
             this.caseData.accessory = JSON.stringify(this.uptataKey)
             this.caseData.creator = this.userInformation
             this.caseData.creatorName = this.userNames

+ 29 - 23
src/views/Platform/useCasePage.vue

@@ -74,9 +74,9 @@
               </el-row>
             </el-header>
             <el-main style="background:#ffffff; width:94%;margin:0% 3% 3% 3%; font-size:14px;border-radius:8px;">
-              <el-button type="primary" style="margin-left:1%;width:15%;" @click="uploadFile()">导入Excel/Xmind</el-button>
-              <el-button style="margin-left:2%;width:15%;" @click="exportExcel">导出Excel/Xmind</el-button>
-              <el-button style="margin-left:2%;width:15%;" @click="exportExcel">导出Excel模版</el-button>
+              <el-button type="primary" style="margin-left:1%;width:15%;" @click="uploadFile()">导入</el-button>
+              <el-button style="margin-left:2%;width:15%;" @click="exportExcel">导出</el-button>
+              <el-button style="margin-left:2%;width:15%;" @click="exportExcel">导出模版</el-button>
               <!-- 主页table -->
               <el-table :data="gridData" style="width: 100%" @select-all="clickAllData" @selection-change="handleSelectionChange">
                 <el-table-column type="selection" min-width="55" align="center" @change="clickAllData(gridData)" />
@@ -296,26 +296,32 @@ export default {
     },
     // 隐藏input
     hide_input(vel) {
-      vel === '' ? vel = '新建文件夹' : ''
-      this.formData = {
-        bizId: this.bizJson,
-        folderName: vel,
-        parentFolderId: this.startId,
-        creator: this.userInformation,
-        modifier: this.userInformation
-      }
-      createFolderData(this.formData).then(res => {
-        if (res.code === 200) {
-          this.successFun(res.msg)
-          this.createCaseCode = false
-          this.dataShow = true
-          this.data1 = []
-          this.AllQueryFolderData()
-        } else {
-          this.errorFun(res.msg)
+      if (vel !== '') {
+        this.startId === '' ? this.startId = '-1' : ''
+        this.formData = {
+          bizId: this.bizJson,
+          folderName: vel,
+          xmindUrl: '',
+          parentFolderId: this.startId,
+          creator: this.userInformation,
+          modifier: this.userInformation
         }
-      })
-      this.Folder_Show = false
+        createFolderData(this.formData).then(res => {
+          if (res.code === 200) {
+            this.successFun(res.msg)
+            this.createCaseCode = false
+            this.dataShow = true
+            this.data1 = []
+            this.AllQueryFolderData()
+          } else {
+            this.errorFun(res.msg)
+          }
+        })
+        this.Folder_Show = false
+      } else {
+        this.$message({ message: '取消创建文件夹', type: 'success', duration: 1000, offset: 150 })
+        this.Folder_Show = false
+      }
     },
 
     // 新建文件夹
@@ -413,7 +419,7 @@ export default {
     handleDrop(draggingNode, dropNode, dropType, ev) {
       console.log('拖拽成功完成时触发的事件', dropNode.key, dropType)
       this.endKey = dropNode.key
-      var startEnd = { bizId: this.bizJson, modifier: this.userInformation, folderName: dropNode.label, parentFolderId: this.endKey, creator: this.userInformation }
+      var startEnd = { xmindUrl: '', id: this.startKey, bizId: this.bizJson, modifier: this.userInformation, folderName: dropNode.label, parentFolderId: this.endKey, creator: this.userInformation }
       console.log(startEnd)
       updateFolderData(startEnd).then(res => {
         if (res.code === 200) {

+ 16 - 10
src/views/Platform/workbench.vue

@@ -106,7 +106,7 @@
     <el-dialog tltle="详情" :visible.sync="dialogTableVisible" width="70%">
       <el-table :data="gridData" max-height="390" style="cursor:pointer" @row-click="clickQueryTable">
         <el-table-column type="index" label="序号" min-width="120" align="center" />
-        <el-table-column label="主题" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
+        <el-table-column label="任务" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
         <el-table-column label="进展" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.stageString }}</template></el-table-column>
         <el-table-column label="优先级" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.priorityString }}</template></el-table-column>
         <el-table-column label="状态" min-width="120" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.statusString }}</el-tag></template></el-table-column>
@@ -118,7 +118,7 @@
     <el-dialog tltle="详情" :visible.sync="dialogTableVisible0" width="70%">
       <el-table :data="gridData3" max-height="390" style="cursor:pointer" @row-click="clickQueryTable1">
         <el-table-column type="index" label="序号" min-width="120" align="center" />
-        <el-table-column label="主题" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
+        <el-table-column label="项目" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
         <el-table-column label="进展" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.stageString }}</template></el-table-column>
         <el-table-column label="优先级" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.priorityString }}</template></el-table-column>
         <el-table-column label="状态" min-width="120" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.statusString }}</el-tag></template></el-table-column>
@@ -130,7 +130,7 @@
     <el-dialog tltle="详情" :visible.sync="dialogTableVisible1" width="70%">
       <el-table :data="gridData1" max-height="390" style="cursor:pointer" :header-cell-style="getRowClass" @row-click="clickQueryTable2">
         <el-table-column type="index" label="序号" min-width="120" align="center" />
-        <el-table-column label="主题" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
+        <el-table-column label="任务" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.name }}</template></el-table-column>
         <el-table-column label="进展" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.stageString }}</template></el-table-column>
         <el-table-column label="平台类型" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.typeString }}</template></el-table-column>
         <el-table-column label="优先级" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.priorityString }}</template></el-table-column>
@@ -139,11 +139,11 @@
       </el-table>
     </el-dialog>
 
-    <!-- 缺陷展 示 -->
+    <!-- 缺陷展示 -->
     <el-dialog tltle="详情" :visible.sync="dialogTableVisibleTow" width="70%">
       <el-table :data="gridData2" max-height="390" style="cursor:pointer" :header-cell-style="getRowClass" @row-click="clickQueryTable3">
         <el-table-column type="index" label="序号" min-width="120" align="center" />
-        <el-table-column label="主题" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.bugName }}</template></el-table-column>
+        <el-table-column label="缺陷" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.bugName }}</template></el-table-column>
         <el-table-column label="类型" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.bugTypeName }}</template></el-table-column>
         <el-table-column label="优先级" min-width="120" align="center"><template slot-scope="scope">{{ scope.row.priorityName }}</template></el-table-column>
         <el-table-column label="状态" min-width="120" align="center"><template slot-scope="scope"><el-tag type="success">{{ scope.row.bugStatusName }}</el-tag></template></el-table-column>
@@ -242,6 +242,7 @@ export default {
       this.userName = { bizId: this.bizJson, ename: this.userInformation }
       personalworkstationQueryBackLog(this.userName).then(res => {
         if (res.code === 200) {
+          this.getAllData = res.data.list
           if (res.data.list[0]) {
             this.oneData = res.data.list[0]
             // this.num1 = res.data.list[0].taskCount
@@ -351,7 +352,7 @@ export default {
     // 工作统计全局list
     handleClick(tab) {
       this.total = 0
-      this.$set(this.bugOrTask, 'isBugOrTask', '任务')
+      this.$set(this.bugOrTask, 'isBugOrTask', 1)
       if (tab.label === '工作统计') {
         this.userName = { bizId: this.bizJson, handlerPerson: this.userInformation, timeType: 0 }
         personalworkstationQueryPeriodBugAndTask(this.userName).then(res => {
@@ -452,20 +453,25 @@ export default {
     },
 
     clickQueryTable1(e) {
-      this.$router.push({ path: '/Platform/presentation/projectQuery', query: { id: e.id }})
+      for (var el of this.getAllData) {
+        el.id === e.id ? this.gridData = el.taskInfoDOList : ''
+      }
+      this.dialogTableVisible = true
+      this.dialogTableVisible0 = false
+      // this.$router.push({ path: '/Platform/presentation/projectQuery', query: { id: e.id }})
     },
     clickQueryTable(e) {
-      this.$router.push({ path: '/Platform/presentation/taskQuery', query: { id: e.id }})
+      this.$router.push({ path: '/Platform/projectManage/taskPreview', query: { id: e.id }})
     },
     clickQueryTable2(e) {
-      this.$router.push({ path: '/Platform/presentation/taskQuery', query: { id: e.id }})
+      this.$router.push({ path: '/Platform/projectManage/taskPreview', query: { id: e.id }})
     },
     clickQueryTable3(e) {
       this.$router.push({ path: '/Platform/defectManagement/bugQuery', query: { id: e.id }})
     },
     clickQueryTableTask(e) {
       if (e.isBugOrTask === '任务') {
-        this.$router.push({ path: '/Platform/presentation/taskQuery', query: { id: e.id }})
+        this.$router.push({ path: '/Platform/projectManage/taskPreview', query: { id: e.id }})
       }
       if (e.isBugOrTask === '缺陷') {
         this.$router.push({ path: '/Platform/defectManagement/bugQuery', query: { id: e.id }})