didi 4 years ago
parent
commit
021a002d22

+ 2 - 2
src/components/chart/statusStayChart.vue

@@ -38,7 +38,7 @@ export default {
   methods: {
     setChart() {
       if (!this.chartData) return
-      const newArr = this.chartData.yaxis.filter(item => { return item.name !== '全部' })
+      const newArr = this.chartData.yaxis.filter(item => { return item?.name !== '全部' })
       const colorArr = ['#409EFF', '#F8CE5C', '#F2904F', '#5EE2BE', '#D873F5', '#7479F5']
       let series = null
       if (this.chartData.type === '0') {
@@ -72,7 +72,7 @@ export default {
             return backString + `<span style="color: #F04864">总和</span>:${total}个`
           }
         },
-        legend: { data: newArr.map(item => { return item.name }), left: 0, top: 0 },
+        legend: { data: newArr.map(item => { return item?.name }), left: 0, top: 0 },
         grid: { left: '0', right: '0', top: '8%', bottom: '0', containLabel: true },
         xAxis: { type: 'category', data: this.chartData.xaxis, axisTick: { alignWithLabel: true }, axisLabel: { interval: 0, rotate: 40 }},
         yAxis: { type: 'value', axisLine: { show: false }, splitLine: { lineStyle: { type: 'dashed' }}, axisLabel: { formatter: '{value}个' }},

+ 1 - 1
src/utils/global.js

@@ -48,6 +48,6 @@ export function formatHMS(data) {
   var hours = parseInt((data % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))
   var minutes = parseInt((data % (1000 * 60 * 60)) / (1000 * 60))
   var seconds = parseInt((data % (1000 * 60)) / 1000)
-  time = (hours < 10 ? ('0' + hours) : hours) + ':' + (minutes < 10 ? ('0' + minutes) : minutes) + ':' + (seconds < 10 ? ('0' + seconds) : seconds)
+  time = (hours < 10 ? ('0' + hours) : hours) + '小时' + (minutes < 10 ? ('0' + minutes) : minutes) + '分' + (seconds < 10 ? ('0' + seconds) : seconds) + '秒'
   return time
 }

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

@@ -4,7 +4,7 @@
     <div v-if="isSchedule === 0" align="center">是否需要锁定当前{{ name === '需求'? '需求': "任务" }}的排期?</div>
     <div v-if="isSchedule === 1" align="center">
       <el-form ref="numberValidateForm" :model="numberValidateForm" label-width="100px" class="demo-ruleForm">
-        <p class="tip"><i class="el-icon-warning icon" />解锁后,排期将在24小时后自动锁定,请及时完成排期调整</p>
+        <p v-if="name === '任务'" class="tip"><i class="el-icon-warning icon" />解锁后,排期将在24小时后自动锁定,请及时完成排期调整</p>
         <el-form-item label="解锁原因" :rules="[{ required: true, message: '解锁原因不能为空'}]">
           <el-select v-model="numberValidateForm.remarkType" style="width:100%;" placeholder="请选择">
             <el-option v-for="(item,index) in scheduleOperateReason" :key="index" :label="item.msg" :value="item.code" />

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

@@ -190,8 +190,8 @@
                     {{ isScheduleLocked === 1 ? '已锁定' : '未锁定' }}
                   </span>
                 </el-tooltip>
-                <span v-if="isScheduleLocked === 0" class="tip">
-                  <i class="el-icon-timer icon" />剩余{{ autoLockScheduleCountdown }}
+                <span v-if="isShowLockedTime" class="tip">
+                  <i class="el-icon-timer icon" />剩余{{ autoLockScheduleCountdown }}将自动锁定
                 </span>
               </div>
             </div>
@@ -462,6 +462,7 @@ export default {
     return {
       autoLockScheduleCountdown: '--', // 解锁剩余时间
       timer: null, // 定时器
+      isShowLockedTime: false, // 是否显示解锁倒计时
       tabPosition: 'first',
       textarea2: '',
       HoldTask: '',
@@ -558,6 +559,7 @@ export default {
       const res1 = await listByTask(this.taskId)
       this.isScheduleLocked = res1.data.isScheduleLocked
       if (res1.data.isScheduleLocked !== 1 && res1.data.autoLockScheduleCountdown > 0) {
+        this.isShowLockedTime = true
         let totolTime = res1.data.autoLockScheduleCountdown || 6000
         clearInterval(this.timer)
         this.timer = setInterval(() => {