qinzhipeng_v 5 år sedan
förälder
incheckning
59e780fa53

BIN
src/assets/Unlock.png


BIN
src/assets/lock.png


+ 13 - 0
src/views/projectManage/projectList/components/taskList.vue

@@ -169,6 +169,7 @@ export default {
         //   console.log(`${key}: ${value}`)
         // }
       }
+      this.isShow()
     },
     async getTaskStatus() { // 获取任务状态列表
       const res = await configShowTaskEnum()
@@ -186,6 +187,18 @@ export default {
         this.$refs.planTable.clearSelection()
       }
     },
+    isShow() {
+      const taskA = []
+      this.all_task.map(item => {
+        if (item.isScheduleLocked === 1) {
+          taskA.push(item.taskIdSting)
+          console.log(taskA, 'cdscdscsdc')
+        }
+      })
+      if (taskA.length !== 0) {
+        this.$message({ message: '任务' + taskA + '的排期已锁定,请先解锁排期后再添加排期', type: 'success', offset: 150 })
+      }
+    },
     expandAll(isEx) { // 全部展开
       this.allChange = isEx
       isEx ? this.expandArr = this.all_task.map(item => item.id) : this.expandArr = []

+ 2 - 2
src/views/projectManage/schedule.vue

@@ -10,7 +10,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="具体描述">
-          <el-input v-model="numberValidateForm.remark" type="textarea" />
+          <el-input v-model="numberValidateForm.remark" placeholder="请输入解锁的具体原因" type="textarea" />
         </el-form-item>
       </el-form>
     </div>
@@ -29,7 +29,7 @@ export default {
     visible: { type: Boolean, default: false },
     requireId: { type: Number, required: true },
     name: { type: String, required: true },
-    isScheduleLocked: { type: String, required: true }
+    isScheduleLocked: { type: [String, Number], required: true }
   },
   data() {
     return {

+ 5 - 5
src/views/projectManage/taskList/components/scheduleList.vue

@@ -29,7 +29,7 @@
         align="center"
       >
         <template slot-scope="scope">
-          {{ getType(scope.row.type) }}
+          {{ scope.row.name }}
           <img class="public_image" :src="scope.row.isScheduleLocked === 0 ? Unlock : lock">
         </template>
       </el-table-column>
@@ -177,10 +177,10 @@ export default {
         this.$message({ message: '移动成功', type: 'success', duration: 1000, offset: 150 })
       }
     },
-    getType(value) {
-      const res = this.taskScheduleEvent.find(item => item.code === value) || {}
-      return res.msg
-    },
+    // getType(value) {
+    //   const res = this.taskScheduleEvent.find(item => item.code === value) || {}
+    //   return res.msg
+    // },
     async listByTask(id) { // 获取排期列表
       const res = await listByTask(id)
       if (res.code === 200) {

+ 14 - 4
src/views/projectManage/taskList/taskViewDetail.vue

@@ -125,10 +125,11 @@
             <div class="allTips">
               <div class="tips">
                 <i class="el-icon-warning-outline" />每个任务仅支持一次提测和一次准出,请合理拆解后任务再排期<br>
-                每个任务仅支持一次提测和一次准出,请合理拆解后任务再排期
+                <i v-if="tips" class="el-icon-warning-outline" style="color:#e88792;" />
+                <span v-if="tips" style="color:#e88792;">当前任务归属的需求计划排期呈锁定状态,当前任务的排期无法同步到需求计划中去,请将归属需求的排期解锁!</span>
               </div>
               <div class="Layout_space_between">
-                <div v-show="BackToTheLatest === false" class="Scheduling" style="margin-right: 160px;"><img :src="scheduling"> 回到最新</div>
+                <div v-show="BackToTheLatest === false" class="Scheduling" style="margin-right: 160px;" @click="clickBackToTheLatest"><img :src="scheduling"> 回到最新</div>
                 <div v-show="BackToTheLatest === true" class="Scheduling" style="margin-right: 160px;" @click="clickAddScheduling()"><i class="el-icon-circle-plus-outline" />添加排期</div>
                 <div align="left" class="Scheduling" @click="scheduleHiHide"><img :src="scheduling"> 排期变更记录</div>
               </div>
@@ -233,7 +234,7 @@
       <!-- 删除 -->
       <task-dialog v-if="showTaskDialog" :show.sync="showTaskDialog" :task-id="taskIds.id" :status-name="taskIds.statusString" @getList="taskGet" />
       <!-- 排期锁定 -->
-      <schedule :visible.sync="scheduleVisble" :name="'任务'" :is-schedule-locked="isScheduleLocked" :require-id="taskId" @updataData="getScheduleGetTaskScheduleHistory" />
+      <schedule ref="ScheduleEvent" :visible.sync="scheduleVisble" :name="'任务'" :is-schedule-locked="isScheduleLocked" :require-id="taskId" @updataData="getScheduleGetTaskScheduleHistory" />
       <!-- 排期锁定 -->
       <drawer
         ref="drawer"
@@ -320,6 +321,7 @@ export default {
       LockState: {}, // 锁定状态
       Unlock: Unlock, // 解锁排期
       lock: lock, // 锁定排期
+      tips: '', // 后加入需求的任务排期提示
       scheduleVisble: false, // 排期锁定
       BackToTheLatest: true, // 显示添加排期按钮
       scheduling: scheduling, // 排期变更记录图标
@@ -383,14 +385,22 @@ export default {
       this.SchedulingContent = res.data
       const res1 = await listByTask(this.taskId)
       this.isScheduleLocked = res1.data.isScheduleLocked
+      this.tips = res1.data.tips
     },
     async clickScheduling(ele) {
       const res = await scheduleGetHistoryScheduleById(ele.id)
       this.taskScheduleEvent = res.data.schedulDetailResponses
       this.BackToTheLatest = false
     },
+    clickBackToTheLatest() {
+      this.$refs.taskSchedule.listByTask(this.taskId)
+    },
     changeSchedule() { // 修改锁定状态
-      this.scheduleVisble = true
+      if (this.tips) {
+        this.$message({ message: '无法解锁,请先变更归属需求的排期状态为未锁定状态!', type: 'error', duration: 3000, offset: 150 })
+      } else {
+        this.scheduleVisble = true
+      }
     },
     async changeArea(e) { // area修改
       const taskInfoDO = _.cloneDeep(this.form_query)

+ 7 - 2
src/views/workbench/person/components/calenderDetail.vue

@@ -1,7 +1,7 @@
 <template>
   <article v-show="showDetail" ref="show-schedule-detail" class="show-schedule-detail">
     <template v-if="nowDetailData && nowDetailData.origin === 0">
-      <div class="detail-title">【任务排期】{{ nowDetailData.bizName }}. {{ nowDetailData.name }}:{{ nowDetailData.desc }}</div>
+      <div class="detail-title"><img :src="nowDetailData.isScheduleLocked === 1 ? lock: Unlock" style="width: 13px;padding-bottom: 1px;">【任务排期】{{ nowDetailData.bizName }}. {{ nowDetailData.name }}:{{ nowDetailData.desc }}</div>
       <div class="detail-time item">
         <div class="label">排期:</div>
         <div>{{ nowDetailData.seperateDaysNoHoliday }}(用时<span>{{ nowDetailData.needDays }}</span>天)</div>
@@ -11,7 +11,7 @@
       </div>
       <div class="detail-needs item"><div class="label">所属需求:</div>{{ nowDetailData.requireNames | arrToString }}</div>
       <div class="detail-tasks item"><div class="label">关联任务:</div>{{ nowDetailData.taskNames | arrToString }}</div>
-      <div class="footer">
+      <div v-if="nowDetailData.isScheduleLocked === 0" class="footer">
         <div class="cancel" @click="deleteSchedule">删除</div>
         <div class="edit" @click="editSchedule">编辑</div>
       </div>
@@ -35,6 +35,8 @@
   </article>
 </template>
 <script>
+import lock from '@/assets/lock.png' // 排期锁定图标
+import Unlock from '@/assets/Unlock.png' // 排期锁定图标
 export default {
   filters: {
     arrToString(val) {
@@ -60,6 +62,8 @@ export default {
   },
   data() {
     return {
+      Unlock: Unlock, // 解锁排期
+      lock: lock, // 锁定排期
       showDetail: this.show,
       nowDetailData: this.data
     }
@@ -72,6 +76,7 @@ export default {
       handler(newV) {
         console.log(newV)
         if (newV) {
+          console.log(newV, '////')
           this.nowDetailData = newV
         }
       },

+ 13 - 1
src/views/workbench/person/components/calenderList.vue

@@ -40,7 +40,13 @@
       show-overflow-tooltip="true"
       :header-row-style="{height: '61px'}"
     >
-      <el-table-column label="日程名称" prop="name" width="250" align="center" show-overflow-tooltip />
+      <el-table-column label="日程名称" prop="name" width="250" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          {{ scope.row.name }}
+          <img v-if="scope.row.isScheduleLocked === 1" :src="lock" style="width: 11px;margin-left: 10px;padding-bottom: 1px;">
+          <img v-if="scope.row.isScheduleLocked === 0" :src="Unlock" style="width: 13px;margin-left: 10px;padding-bottom: 1px;">
+        </template>
+      </el-table-column>
       <el-table-column label="日期" min-width="250" align="center" show-overflow-tooltip>
         <template slot-scope="scope">
           <div v-if="busy === 0">
@@ -67,10 +73,12 @@
       <el-table-column align="center" label="操作" width="150" show-overflow-tooltip>
         <template slot-scope="scope">
           <el-button
+            v-if="scope.row.isScheduleLocked === 0"
             size="mini"
             @click="handleEdit(scope.row)"
           >编辑</el-button>
           <el-button
+            v-if="scope.row.isScheduleLocked === 0"
             size="mini"
             type="danger"
             @click="handleDelete(scope.row)"
@@ -97,6 +105,8 @@
 <script>
 import moment from 'moment'
 import { queryWorkList, queryIdleList } from '@/api/workSchedule.js'
+import lock from '@/assets/lock.png' // 排期锁定图标
+import Unlock from '@/assets/Unlock.png' // 排期锁定图标
 export default {
   filters: {
     peopleListHandler(val) {
@@ -117,6 +127,8 @@ export default {
   },
   data() {
     return {
+      Unlock: Unlock, // 解锁排期
+      lock: lock, // 锁定排期
       total: 0,
       pages: {
         curIndex: 1,