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

Merge branch 'http_test' into qz_daily_0.0.3

qinzhipeng_v@didiglobal.com 4 жил өмнө
parent
commit
e083254f91

+ 38 - 57
src/components/actionDynamic/index.vue

@@ -3,33 +3,35 @@
     <el-tabs v-model="activeName" @tab-click="changeTabs">
       <el-tab-pane label="评论" name="Comments">
         <div class="Comments">
-          <div
-            v-for="(item, index) in comments"
-            :key="index"
-          >
-            <div style="font-size: 14px; color: #333b4a; display: inline-block">
-              {{ item.commentInfo.name }}
-            </div>
+          <div class="maxHeight">
             <div
-              style="
-                margin-left: 20px;
-                display: inline-block;
-                color: #9b9b9b;
-                font-size: 12px;
-              "
+              v-for="(item, index) in comments"
+              :key="index"
             >
-              {{ item.commentInfo.gmtCreater }}
+              <div style="font-size: 14px; color: #333b4a; display: inline-block">
+                {{ item.commentInfo.name }}
+              </div>
+              <div
+                style="
+                  margin-left: 20px;
+                  display: inline-block;
+                  color: #9b9b9b;
+                  font-size: 12px;
+                "
+              >
+                {{ item.commentInfo.gmtCreater }}
+              </div>
+              <p
+                style="
+                  font-size: 14px;
+                  color: #333b4a;
+                  margin: 0 0 25px 0;
+                  white-space: pre-line;
+                "
+              >
+                {{ item.commentInfo.content }}
+              </p>
             </div>
-            <p
-              style="
-                font-size: 14px;
-                color: #333b4a;
-                margin: 0 0 25px 0;
-                white-space: pre-line;
-              "
-            >
-              {{ item.commentInfo.content }}
-            </p>
           </div>
           <el-input
             v-model="commentContent"
@@ -51,12 +53,14 @@
         </div>
       </el-tab-pane>
       <el-tab-pane label="变更记录" name="Logs">
-        <div v-for="(item,index) in changeRecord" :key="index" class="Layout_space_between sign-record">
-          <span>
-            <span class="operatorName">{{ item.operator }} : </span>
-            <span class="remark">{{ item.remark }}</span>
-          </span>
-          <span class="createTime">{{ item.createTime }}</span>
+        <div class="maxHeight">
+          <div v-for="(item,index) in changeRecord" :key="index" class="Layout_space_between sign-record">
+            <span>
+              <span class="operatorName">{{ item.operator }} : </span>
+              <span class="remark">{{ item.remark }}</span>
+            </span>
+            <span class="createTime">{{ item.createTime }}</span>
+          </div>
         </div>
       </el-tab-pane>
     </el-tabs>
@@ -81,33 +85,6 @@ export default {
     return {
       activeName: 'Comments',
       commentContent: ''
-      // comments: [
-      //   {
-      //     child: [],
-      //     commentInfo: {"id":11529,"joinId":4721,"bizId":null,"type":3,"fatherId":0,"name":"文博","email":"wenbobowen","content":"test111","gmtCreater":"2020-12-31 15:03:37","gmtModify":"2020-12-31 15:03:37"}
-      //   },
-      //   {
-      //     child: [],
-      //     commentInfo: {"id":11529,"joinId":4721,"bizId":null,"type":3,"fatherId":0,"name":"文博","email":"wenbobowen","content":"test222","gmtCreater":"2020-12-31 15:03:37","gmtModify":"2020-12-31 15:03:37"}
-      //   }
-      // ],
-      // changeRecord: [
-      //   {
-      //     createTime: "2020-12-29 13:48:55",
-      //     operator: "廖子君",
-      //     remark: "更新了任务状态,从【已准出】到【已上线】"
-      //   },
-      //   {
-      //     createTime: "2020-12-29 13:48:55",
-      //     operator: "廖子君",
-      //     remark: "更新了任务状态,从【已准出】到【已上线】"
-      //   },
-      //   {
-      //     createTime: "2020-12-29 13:48:55",
-      //     operator: "廖子君",
-      //     remark: "更新了任务状态,从【已准出】到【已上线】"
-      //   }
-      // ]
     }
   },
   methods: {
@@ -127,6 +104,10 @@ export default {
   .Comments {
     padding: 0 34px 20px 34px;
   }
+  .maxHeight {
+    max-height: 300px;
+    overflow-y: auto;
+  }
 }
 .sign-record {
   margin: 20px 0;

+ 2 - 6
src/views/Platform/useCase/createUse.vue

@@ -95,7 +95,6 @@ export default {
       caseData: {},
       dis: false,
       btn_show: false,
-      id: '',
       arr: [],
       uptataKey: [],
       title_Name: '',
@@ -119,12 +118,9 @@ export default {
       }
       if (this.$route.query.id) {
         this.title_Name = '编辑'
-        this.url = window.location.href // 获取url中"?"符后的字串
-        this.caseFolderId = this.url.split('&caseFolderId=')
-        this.id = this.caseFolderId[0].split('?id=')
-        queryCasesData({ caseFolderId: this.caseFolderId[1] }).then(res => {
+        queryCasesData({ caseFolderId: this.$route.query.caseFolderId }).then(res => {
           for (var el of res.data.list) {
-            if (el.id === Number(this.id[1])) {
+            if (el.id === Number(this.$route.query.id)) {
               this.caseData = el
               if (this.caseData.description !== '') {
                 var obj_description = JSON.parse(this.caseData.description.split('{}'))

+ 6 - 1
src/views/administrators/components/adminContent.vue

@@ -9,7 +9,7 @@
       <div v-html="data.content" />
       <div v-if="data.onlineModule" class="admin-content-online admin-content-start">
         <span style="margin-right: 10px;">上线顺序</span>
-        <div v-for="(item, index) in data.onlineModule.onlineOrder" :key="index" style="margin: 0 10px;">
+        <div v-for="(item, index) in onlineOrder" :key="index" style="margin: 0 10px;">
           <div class="admin-content-start admin-content-item"><div class="admin-content-code">{{ index + 1 }}</div> {{ item }} </div>
         </div>
       </div>
@@ -22,6 +22,11 @@ export default {
   props: {
     data: { type: Object, required: true },
     type: { type: Number, default: 1 }
+  },
+  data() {
+    return {
+      onlineOrder: ['A', 'B', 'C']
+    }
   }
 }
 </script>

+ 2 - 2
src/views/projectManage/projectList/components/taskList.vue

@@ -306,9 +306,9 @@ export default {
       const data = this.curcentList.map(item => { return item.id })
       const res = await reportdelivertestCheckStatus(data)
       if (res.code === 200) {
-        if (res.data && res.data.id) {
+        if (res.data) {
           this.checklistStopVisible = true
-          this.firstChecklistTaskId = res.data.id
+          this.firstChecklistTaskId = res.data
           return
         }
         this.dialogTestReport = true

+ 0 - 4
src/views/projectManage/publishTask/components/multipleSelect.vue

@@ -97,16 +97,12 @@ export default {
       }
     },
     clearHandle(val) {
-      console.log(val)
       let item = null
-      console.log(this.data)
       this.options.forEach(t => {
         if (t.id === val[0]) {
           item = t
         }
-        console.log(t.id === val[0], t)
       })
-      console.log(item)
       this.$emit('change', item, 'add')
       this.query = ''
       this.value = null

+ 0 - 10
src/views/projectManage/publishTask/components/onlineCheckList.vue

@@ -138,9 +138,6 @@ export default {
       name: ''
     }
   },
-  mounted() {
-    console.log(1111111111)
-  },
   methods: {
     async remoteMethod(moduleName) {
       this.moduleName = moduleName
@@ -154,7 +151,6 @@ export default {
       }
     },
     clearHandle(subIdx) {
-      console.log(subIdx, this.value)
       this.$emit('changeSelectedHandle', this.moduleId, subIdx, this.value[0], 'add')
       this.moduleName = ''
       this.value = null
@@ -164,11 +160,6 @@ export default {
         this.$emit('changeSelectedHandle', this.moduleId, subIdx, this.moduleName, 'add')
       }
     },
-    getfocus(index) {
-      console.log(index)
-      // window.elemmm[`s${index}`]=this.$refs[`s${index}`]
-      // this.$refs[`s${index}`][0].focused()
-    },
     handleClose(subIdx, val) {
       this.$emit('changeSelectedHandle', this.moduleId, subIdx, val, 'del')
     },
@@ -179,7 +170,6 @@ export default {
     // 拖拽结束事件
     onEnd() {
       this.drag = false
-      console.log(this.data)
     }
   }
 }

+ 13 - 18
src/views/projectManage/publishTask/index.vue

@@ -143,7 +143,8 @@ export default {
       data: {},
       temList: [],
       commentlist: [], // 评价列表
-      changeRecordList: [] // 变更记录列表
+      changeRecordList: [], // 变更记录列表
+      checkListId: -1
     }
   },
   mounted() {
@@ -153,8 +154,6 @@ export default {
     this.getList()
     // 获取评论列表
     this.getCommentList()
-    // 获取变更记录
-    this.getRecordList()
   },
   methods: {
     // 获取checklist详情
@@ -166,6 +165,9 @@ export default {
           // 如果绑定过
           this.showEmpty = false
           this.data = res.data
+          this.checkListId = res.data.id
+          // 获取变更记录
+          this.getRecordList()
         } else {
           this.showEmpty = true
         }
@@ -174,7 +176,6 @@ export default {
 
     // 获取业务线下绑定的可以选checklist列表
     async getBizBindTemList() {
-      console.log(1111)
       const { bizId = null } = store.state.global || {}
       const res = await getBizBindTemList({ name: '', bizId })
       this.temList = res.data
@@ -189,8 +190,7 @@ export default {
 
     // 获取变更记录
     async getRecordList() {
-      const res = await getRecordList({ taskId: this.taskId })
-      console.log(res)
+      const res = await getRecordList({ checkListId: this.checkListId })
       if (res.code === 200) {
         this.changeRecordList = res.data
       }
@@ -252,14 +252,10 @@ export default {
     },
 
     changeOnlineModuleRow(type, mId, index) {
-      console.log(type, mId, index, this.data.templates)
       this.data.templates.map(t => {
         if (t.parentTemplateId === mId) {
           if (type === 'del') {
-            console.log(t.onlineModule)
             const delModuleNames = t.onlineModule.tableContent[index].moduleNames
-            const test = t.onlineModule.onlineOrder.filter(t => !delModuleNames.includes(t))
-            console.log(delModuleNames, test)
             t.onlineModule.onlineOrder = t.onlineModule.onlineOrder.filter(t => !delModuleNames.includes(t))
             t.onlineModule.tableContent.splice(index, 1)
           } else {
@@ -292,6 +288,7 @@ export default {
         this.openEdit = true
         // 保存更新变更记录
         this.getRecordList()
+        this.getList()
         this.$message({
           message: '保存成功',
           type: 'success'
@@ -387,7 +384,6 @@ export default {
       const tems = []
       const { templates } = this.data
       // 循环都有哪些tem被选择了
-      console.log(templates, this.temList, checkedIds)
       checkedIds.map(checkedId => {
         // 先循环是否有存过模板数据
         this.temList.map(g => {
@@ -408,11 +404,9 @@ export default {
       })
       tems.map((h, index) => templates.map(j => {
         if (h.parentTemplateId === j.parentTemplateId) {
-          console.log(h, j)
           tems[index] = { ...j }
         }
       }))
-      console.log(tems)
       this.data = { ...this.data, templates: tems, selectedBizTemplateIds }
     },
 
@@ -437,7 +431,10 @@ export default {
       } else if (!hasTask) {
         tasks = [...this.data.tasks, task]
       } else {
-        console.log('已经添加过该任务')
+        this.$message({
+          message: '已经添加过该任务',
+          type: 'error'
+        })
         return
       }
       this.data = { ...this.data, tasks }
@@ -445,8 +442,8 @@ export default {
 
     // 更新检查项到数据库
     async updateCheckItemHandle(item) {
-      const { isCheck, parentTemplateId } = item
-      const res = await updateTemplateCheckStatus({ isCheck, taskId: this.taskId, templateId: parentTemplateId })
+      const { isCheck, id } = item
+      const res = await updateTemplateCheckStatus({ isCheck, id, checkListId: this.checkListId })
       if (res.code === 200) {
         this.getRecordList()
         this.$message({
@@ -458,9 +455,7 @@ export default {
 
     // 修改线上问题模块
     onChangeModuleName: _.debounce(function(val, subIdx, index) {
-      console.log(val, subIdx, index, this.data)
       this.data.templates[index].onlineModule.tableContent[subIdx].module = val
-      console.log(this.data)
     })
   }
 }

+ 2 - 2
src/views/projectManage/requirement/components/taskList.vue

@@ -314,9 +314,9 @@ export default {
       const data = this.curcentList.map(item => { return item.id })
       const res = await reportdelivertestCheckStatus(data)
       if (res.code === 200) {
-        if (res.data && res.data.id) {
+        if (res.data) {
           this.checklistStopVisible = true
-          this.firstChecklistTaskId = res.data.id
+          this.firstChecklistTaskId = res.data
           return
         }
         this.dialogTestReport = true

+ 2 - 2
src/views/projectManage/taskList/taskViewDetail.vue

@@ -818,9 +818,9 @@ export default {
         case 1: // 提测
           reportdelivertestCheckStatus([this.taskId]).then(res => {
             if (res.code === 200) {
-              if (res.data && res.data.id) {
+              if (res.data) {
                 this.checklistStopVisible = true
-                this.firstChecklistTaskId = res.data.id
+                this.firstChecklistTaskId = res.data
                 return
               }
               this.dialogTest = true

+ 4 - 4
src/views/reportManagement/testPresentation.vue

@@ -386,9 +386,9 @@ export default {
               const data = res.data
               reportdelivertestCheckStatus(data.taskIds).then(response => {
                 if (response.code === 200) {
-                  if (response.data && response.data.id) {
+                  if (response.data) {
                     this.checklistStopVisible = true
-                    this.firstChecklistTaskId = response.data.id
+                    this.firstChecklistTaskId = response.data
                     this.goDataReport = data
                     return
                   }
@@ -470,9 +470,9 @@ export default {
           const res = await reportdelivertestCheckStatus([vel])
           if (res.code === 200) {
             this.centerDialogVisible = false
-            if (res.data && res.data.id) {
+            if (res.data) {
               this.checklistStopVisible = true
-              this.firstChecklistTaskId = res.data.id
+              this.firstChecklistTaskId = res.data
               this.goDataReport = vel
               return
             }