wenbobowen 4 ani în urmă
părinte
comite
0b4134c4f1

+ 10 - 1
src/api/publishTask.js

@@ -65,7 +65,16 @@ export function getCommentList(data) {
 // 创建评论列表/comment/create
 export function createComment(data) {
   return request({
-    url: `${host}/comment/list`,
+    url: `${host}/comment/create`,
+    method: 'post',
+    data
+  })
+}
+
+// 获取变更记录列表
+export function getRecordList(data) {
+  return request({
+    url: `${host}/operationLog/checkList`,
     method: 'post',
     data
   })

+ 32 - 0
src/components/checkListStopConfirm/index.vue

@@ -0,0 +1,32 @@
+<template>
+  <div class="dialog-main">
+    <el-dialog
+      title="设置checklist"
+      :visible.sync="visible"
+      width="30%"
+      :close-on-click-modal="false"
+      :show-close="false"
+    >
+      <div style="position: absolute; top: 23px; left: 12px;width:4px;height:17px;background:#409EFF;border-radius:1px;" />
+      <div align="center">
+        <div>是否需为任务设置发布checklist?</div>
+        <div style="color: #f79232;">您所在的业务线要求提测前设置发布checklist</div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" size="mini" @click="$emit('confirm')">是,去设置</el-button>
+        <el-button type="danger" size="mini" @click="$emit('cancel')">不需要</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+<script>
+export default {
+  props: {
+    visible: {
+      type: Boolean,
+      default: false,
+      required: true
+    }
+  }
+}
+</script>

+ 22 - 2
src/views/ToConfigure/components/bizConfigure.vue

@@ -10,7 +10,21 @@
     </el-radio-group>
     <el-button v-if="!Prohibit" size="small" class="biz_buttom" @click="cancel"> 取消 </el-button>
     <el-button v-if="!Prohibit" size="small" class="biz_buttom" type="primary" @click="preservation"> 保存 </el-button>
-
+    <!--- ck ---->
+    <p class="biz_property">
+      提测前checklist拦截
+      <el-tooltip class="item" effect="dark" content="设置为拦截后,业务线发送提测报告前会校验checklist是否已创建" placement="top">
+        <i class="el-icon-info" />
+      </el-tooltip>
+      <i v-if="!isCkEdit" class="el-icon-edit icon-sty" @click="isCkEdit = true" />
+    </p>
+    <el-radio-group v-model="ckStatus" :disabled="!isCkEdit" class="biz_radio">
+      <el-radio label="0"> 拦截 </el-radio>
+      <el-radio label="1"> 不拦截</el-radio>
+    </el-radio-group>
+    <el-button v-if="isCkEdit" size="small" class="biz_buttom" @click="cancel"> 取消 </el-button>
+    <el-button v-if="isCkEdit" size="small" class="biz_buttom" type="primary" @click="preservation"> 保存 </el-button>
+    <!-- ck -->
     <div v-if="bizObj.fromDpm">
       <p class="biz_property">
         排期同步望岳
@@ -39,6 +53,8 @@ export default {
       radio: '1',
       Prohibit: true,
       Schedule: true, // 排期同步望岳
+      isCkEdit: false, // checklist编辑
+      ckStatus: '1', // ckecklist状态
       bizObj: {},
       num: 30
     }
@@ -62,18 +78,22 @@ export default {
         this.bizObj = res.data[0]
         this.num = this.bizObj.syncScheduleDpm
         this.radio = JSON.stringify(this.bizObj.isSecret)
+        this.ckStatus = '' + this.bizObj.isChecklistIntercept
       }
     },
     async preservation() { // 保存业务线配置
-      const res = await settingUpdateBiz({ id: this.bizId, isSecret: Number(this.radio), bizName: this.bizObj.name })
+      const res = await settingUpdateBiz({ id: this.bizId, isSecret: Number(this.radio), bizName: this.bizObj.name, isChecklistIntercept: Number(this.ckStatus) })
       if (res.code === 200) {
         this.Prohibit = true
+        this.isCkEdit = false
         this.$message({ message: '修改成功', type: 'success', duration: 1000, offset: 150 })
       }
     },
     cancel() {
       this.Prohibit = true
+      this.isCkEdit = false
       this.radio = JSON.stringify(this.bizObj.isSecret)
+      this.ckStatus = '' + this.bizObj.isChecklistIntercept
     },
     async changeSchedule() { // 设置同步望岳时间
       const res = await updateBiz({ id: this.bizId, syncScheduleDpm: this.num })

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

@@ -117,12 +117,18 @@
       title="新建排期"
       @update="get_allTask()"
     />
+    <checkListStopConfirm
+      :visible="checklistStopVisible"
+      @confirm="checklistConfirm"
+      @cancel="checklistCancel"
+    />
   </div>
 </template>
 <script>
 import { analysisBizId_id, EncryptId } from '@/utils/crypto-js.js'
 import { mapGetters } from 'vuex'
 import imgUrl from '@/assets/建立档案@2x.png'
+import checkListStopConfirm from '@/components/checkListStopConfirm'
 import TestReport from '@/views/reportManagement/components/TestingReport' // 提测
 import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
 import ReleaseReport from '@/views/reportManagement/components/ReleaseReport' // 准出
@@ -141,7 +147,8 @@ export default {
     ReleaseReport,
     scheduleList,
     taskDialog,
-    modifySchedule
+    modifySchedule,
+    checkListStopConfirm
   },
   data() {
     return {
@@ -167,7 +174,9 @@ export default {
       nowChangeTask: null, // 当前正在改变的任务对象
       taskId: '', // 将要修改状态的任务id
       visibleSchedule: false, // 排期弹框
-      selectTaskList: [] // 已选任务的id
+      selectTaskList: [], // 已选任务的id
+      checklistStopVisible: false, // checklist拦截弹窗是否显示
+      firstChecklistTaskId: -1
     }
   },
   computed: {
@@ -297,6 +306,11 @@ 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) {
+          this.checklistStopVisible = true
+          this.firstChecklistTaskId = res.data.id
+          return
+        }
         this.dialogTestReport = true
         this.$nextTick(() => {
           this.$refs.TestReport.init(7, this.curcentList.map(item => { return item.id }))
@@ -329,6 +343,20 @@ export default {
     link_task(id) { // 跳转到任务详情页
       const bizId_id = EncryptId(`${this.bizId}_${id}`)
       this.$router.push({ name: '任务详情', query: { bizId_id: bizId_id }})
+    },
+    checklistConfirm() {
+      this.checklistStopVisible = false
+      const { bizId = null } = this.$store.state.global || {}
+      const bizId_id = EncryptId(`${bizId}_${this.firstChecklistTaskId}`)
+      const newTab = this.$router.resolve({ name: '任务详情', query: { bizId_id: bizId_id, page: 6 }})
+      window.open(newTab.href, '_blank')
+    },
+    checklistCancel() {
+      this.checklistStopVisible = false
+      this.dialogTestReport = true
+      this.$nextTick(() => {
+        this.$refs.TestReport.init(7, this.curcentList.map(item => { return item.id }))
+      })
     }
   }
 }

+ 41 - 7
src/views/projectManage/publishTask/index.vue

@@ -24,7 +24,7 @@
         <div class="moduleList wrap">
           <redTipword v-if="!edit" title="检查项" :isedit="edit" />
           <div v-for="(item, index) in data.templates" :key="item.id" class="item">
-            <div v-if="item.content.indexOf('s') > -1">
+            <div v-if="item.type === 1">
               <p :id="`s${item.id}`" class="title">
                 <el-checkbox v-if="!edit" v-model="item.isCheck" :label="item.name" @change="updateCheckItemHandle(item.isCheck, item)">{{ item.name }}</el-checkbox>
                 <span v-else>{{ item.name }}</span>
@@ -69,7 +69,7 @@
         <div>
           <headTitle title="动态" />
         </div>
-        <actionDynamic :comments="commentlist" @addComment="createCommentHandle" />
+        <actionDynamic :comments="commentlist" :change-record="changeRecordList" @addComment="createCommentHandle" />
       </section>
       <div v-if="!showEmpty" class="step">
         <step :data="data.templates" :type-list="data.templates" @goto="scrollToHandle" />
@@ -98,7 +98,8 @@ import {
   createChecklist,
   updateTemplateCheckStatus,
   getCommentList,
-  createComment
+  createComment,
+  getRecordList
 } from '@/api/publishTask'
 export default {
   components: {
@@ -141,7 +142,8 @@ export default {
       openEdit: true,
       data: {},
       temList: [],
-      commentlist: [] // 评价列表
+      commentlist: [], // 评价列表
+      changeRecordList: [] // 变更记录列表
     }
   },
   mounted() {
@@ -151,6 +153,8 @@ export default {
     this.getList()
     // 获取评论列表
     this.getCommentList()
+    // 获取变更记录
+    this.getRecordList()
   },
   methods: {
     // 获取checklist详情
@@ -172,18 +176,25 @@ export default {
     // 获取业务线下绑定的可以选checklist列表
     async getBizBindTemList() {
       const { bizId = null } = store.state.global || {}
-      const res = await getBizBindTemList({ name: '', bizId, belongType: 2 })
+      const res = await getBizBindTemList({ name: '', bizId })
       this.temList = res.data
     },
 
     async getCommentList() {
       const res = await getCommentList({ type: 5, joinId: this.taskId })
-      this.commentList = res.data
       if (res.code === 200) {
-        this.comments = res.data
+        this.commentlist = res.data
       }
     },
 
+    // 获取变更记录
+    async getRecordList() {
+      const res = await getRecordList({ taskId: this.taskId })
+      console.log(res)
+      if (res.code === 200) {
+        this.changeRecordList = res.data
+      }
+    },
     // 添加评论
     async createCommentHandle(content, callback) {
       const commentInfo = {
@@ -268,6 +279,8 @@ export default {
       if (res.code === 200) {
         this.edit = false
         this.openEdit = true
+        // 保存更新变更记录
+        this.getRecordList()
         this.$message({
           message: '保存成功',
           type: 'success'
@@ -286,6 +299,10 @@ export default {
     },
     // 点击添加
     addAction() {
+      // 校验是否绑定过checklist模板
+      if (!this.RegHasCheckListTem()) {
+        return
+      }
       // 复制一份数据,以便取消时复原
       this.copyData = this.data
       // 编辑按钮隐藏
@@ -307,6 +324,10 @@ export default {
 
     // 编辑
     editHandle() {
+      // 校验是否绑定过checklist模板
+      if (!this.RegHasCheckListTem()) {
+        return
+      }
       // 复制一份数据,以便取消时复原
       this.copyData = this.data
       // 编辑状态打开
@@ -327,6 +348,19 @@ export default {
       }
     },
 
+    // 校验是否该业务线有绑定checklist模板
+    RegHasCheckListTem() {
+      if (!this.temList || this.temList.length < 1) {
+        this.$message({
+          message: '该业务线暂无绑定checklist模板,请先绑定checklist模板',
+          type: 'error'
+        })
+        return false
+      } else {
+        return true
+      }
+    },
+
     // 修改checklist绑定模版列表
     updateSelectedTemHandle(checkedIds) {
       console.log(checkedIds)

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

@@ -119,12 +119,18 @@
       type="requirement"
       @update="get_allTask()"
     />
+    <checkListStopConfirm
+      :visible="checklistStopVisible"
+      @confirm="checklistConfirm"
+      @cancel="checklistCancel"
+    />
   </div>
 </template>
 <script>
 import { analysisBizId_id, EncryptId } from '@/utils/crypto-js.js'
 import { mapGetters } from 'vuex'
 import imgUrl from '@/assets/建立档案@2x.png'
+import checkListStopConfirm from '@/components/checkListStopConfirm'
 import TestReport from '@/views/reportManagement/components/TestingReport' // 提测
 import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
 import ReleaseReport from '@/views/reportManagement/components/ReleaseReport' // 准出
@@ -143,7 +149,8 @@ export default {
     ReleaseReport,
     scheduleList,
     taskDialog,
-    modifySchedule
+    modifySchedule,
+    checkListStopConfirm
   },
   data() {
     return {
@@ -168,7 +175,9 @@ export default {
       nowChangeTask: null, // 当前正在改变的任务对象
       taskId: '', // 将要修改状态的任务id
       visibleSchedule: false, // 排期弹框
-      selectTaskList: [] // 已选任务的id
+      selectTaskList: [], // 已选任务的id
+      checklistStopVisible: false, // checklist拦截弹窗是否显示
+      firstChecklistTaskId: -1
     }
   },
   computed: {
@@ -305,6 +314,11 @@ 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) {
+          this.checklistStopVisible = true
+          this.firstChecklistTaskId = res.data.id
+          return
+        }
         this.dialogTestReport = true
         this.$nextTick(() => {
           this.$refs.TestReport.init(7, this.curcentList.map(item => { return item.id }))
@@ -335,6 +349,20 @@ export default {
     link_task(ele) { // 跳转到任务详情页
       const bizId_id = EncryptId(`${ele.bizId}_${ele.id}`)
       this.$router.push({ name: '任务详情', query: { bizId_id: bizId_id }})
+    },
+    checklistConfirm() {
+      this.checklistStopVisible = false
+      const { bizId = null } = this.$store.state.global || {}
+      const bizId_id = EncryptId(`${bizId}_${this.firstChecklistTaskId}`)
+      const newTab = this.$router.resolve({ name: '任务详情', query: { bizId_id: bizId_id, page: 6 }})
+      window.open(newTab.href, '_blank')
+    },
+    checklistCancel() {
+      this.checklistStopVisible = false
+      this.dialogTestReport = true
+      this.$nextTick(() => {
+        this.$refs.TestReport.init(7, this.curcentList.map(item => { return item.id }))
+      })
     }
   }
 }

+ 29 - 3
src/views/projectManage/taskList/taskViewDetail.vue

@@ -389,6 +389,11 @@
         @childValInput="childVal"
         @click.stop
       />
+      <checkListStopConfirm
+        :visible="checklistStopVisible"
+        @confirm="checklistConfirm"
+        @cancel="checklistCancel"
+      />
     </el-container>
   </div>
 </template>
@@ -398,6 +403,7 @@ import Vue from 'vue'
 import VueClipboard from 'vue-clipboard2'
 Vue.use(VueClipboard)
 import { mapGetters } from 'vuex'
+// import store from '@/store'
 import { EncryptId, analysisBizId_id } from '@/utils/crypto-js.js'
 import {
   taskGet,
@@ -411,6 +417,7 @@ import {
   configShowRequirementVersionEnum,
   scheduleGetTaskScheduleHistory
 } from '@/api/taskIndex'
+import checkListStopConfirm from '@/components/checkListStopConfirm'
 import { listByTask, taskUpdates } from '@/api/projectViewDetails'
 import { projectListProject, scheduleGetHistoryScheduleById, taskListAvailableDpmTask, taskSetTaskRelated, taskDeleteRelationship } from '@/api/requirement.js'
 import searchPeople from '@/components/select/searchPeople'
@@ -465,7 +472,8 @@ export default {
     timeLine,
     workflowAndStatus,
     synchronizeDialog,
-    publishTask
+    publishTask,
+    checkListStopConfirm // checklist拦截弹窗
   },
   filters: {
     ellipsis(value, num) {
@@ -528,7 +536,9 @@ export default {
       comments: [], // 评论列表
       taskIds: '', // 将要修改状态的任务id
       synchronizeDialog: false, // 同步任务至望月弹框
-      dplOption: [] // 关联的望岳任务
+      dplOption: [], // 关联的望岳任务
+      checklistStopVisible: false, // checklist拦截弹窗是否显示
+      firstChecklistTaskId: -1
     }
   },
 
@@ -803,11 +813,15 @@ export default {
         case 1: // 提测
           reportdelivertestCheckStatus([this.taskId]).then(res => {
             if (res.code === 200) {
+              if (res.data && res.data.id) {
+                this.checklistStopVisible = true
+                this.firstChecklistTaskId = res.data.id
+                return
+              }
               this.dialogTest = true
               this.$nextTick(() => { this.$refs.TestReport.init(7, [this.taskId]) })
             }
           })
-
           break
         case 2: // 日报
           dailyReportCheckStatus([this.taskId]).then(res => {
@@ -884,6 +898,18 @@ export default {
         this.taskGet()
         this.$message({ message: '已取消关联', type: 'success', offset: 150 })
       }
+    },
+    checklistConfirm() {
+      this.checklistStopVisible = false
+      const { bizId = null } = this.$store.state.global || {}
+      const bizId_id = EncryptId(`${bizId}_${this.firstChecklistTaskId}`)
+      const newTab = this.$router.resolve({ name: '任务详情', query: { bizId_id: bizId_id, page: 6 }})
+      window.open(newTab.href, '_blank')
+    },
+    checklistCancel() {
+      this.checklistStopVisible = false
+      this.dialogTest = true
+      this.$nextTick(() => { this.$refs.TestReport.init(7, [this.taskId]) })
     }
   }
 }

+ 44 - 2
src/views/reportManagement/testPresentation.vue

@@ -146,6 +146,11 @@
         <acceptTheReport v-if="acceptTheReport" :message="message" />
       </div>
     </el-dialog>
+    <checkListStopConfirm
+      :visible="checklistStopVisible"
+      @confirm="checklistConfirm"
+      @cancel="checklistCancel"
+    />
   </div>
 </template>
 
@@ -154,6 +159,7 @@ const _ = require('lodash')
 import { EncryptId } from '@/utils/crypto-js.js'
 import { mapGetters } from 'vuex'
 import '@/styles/PublicStyle/index.scss'
+import checkListStopConfirm from '@/components/checkListStopConfirm'
 import { dailyReportDelete } from '@/api/testPresentetion' // 日报
 import { projectTestReportList } from '@/api/ResultPage' // 准出
 import { launchTestList } from '@/api/InterfaceReport' // 提测
@@ -174,7 +180,8 @@ export default {
     ReleaseReport,
     testPresenyL,
     ResultPageyL,
-    acceptTheReport
+    acceptTheReport,
+    checkListStopConfirm
   },
   data() {
     return {
@@ -212,7 +219,10 @@ export default {
       indexPage: {
         pageSize: 10,
         curIndex: 1
-      }
+      },
+      goDataReport: -1,
+      checklistStopVisible: false, // checklist拦截弹窗是否显示
+      firstChecklistTaskId: -1
     }
   },
   computed: {
@@ -375,6 +385,12 @@ export default {
               const data = res.data
               reportdelivertestCheckStatus(data.taskIds).then(response => {
                 if (response.code === 200) {
+                  if (response.data && response.data.id) {
+                    this.checklistStopVisible = true
+                    this.firstChecklistTaskId = response.data.id
+                    this.goDataReport = data
+                    return
+                  }
                   this.dialogVisible1 = true
                   this.$nextTick(() => {
                     this.$refs.TestReport.init(4, data)
@@ -453,6 +469,12 @@ export default {
           const res = await reportdelivertestCheckStatus([vel])
           if (res.code === 200) {
             this.centerDialogVisible = false
+            if (res.data && res.data.id) {
+              this.checklistStopVisible = true
+              this.firstChecklistTaskId = res.data.id
+              this.goDataReport = vel
+              return
+            }
             this.dialogVisible1 = true
             this.$nextTick(() => {
               this.$refs.TestReport.init(7, [vel])
@@ -553,6 +575,26 @@ export default {
     handleCurrentChange1(curIndex) { // used 分页
       this.curIndex = curIndex
       this.gethistoryData()
+    },
+    checklistConfirm() {
+      this.checklistStopVisible = false
+      const { bizId = null } = this.$store.state.global || {}
+      const bizId_id = EncryptId(`${bizId}_${this.firstChecklistTaskId}`)
+      const newTab = this.$router.resolve({ name: '任务详情', query: { bizId_id: bizId_id, page: 6 }})
+      window.open(newTab.href, '_blank')
+    },
+    checklistCancel() {
+      this.checklistStopVisible = false
+      this.dialogVisible1 = true
+      if (this.goDataReport.taskIds) {
+        this.$nextTick(() => {
+          this.$refs.TestReport.init(4, this.goDataReport)
+        })
+      } else {
+        this.$nextTick(() => {
+          this.$refs.TestReport.init(7, [this.goDataReport])
+        })
+      }
     }
   }
 }