Procházet zdrojové kódy

甘特图弹窗无数据时清空缓存

fujunwen před 4 roky
rodič
revize
65e9bc8915

+ 6 - 3
src/views/analysis/GanttChart.vue

@@ -51,14 +51,14 @@
               <PlanTime class="icon" />
               <div class="title">计划时间</div>
             </div>
-            <div class="info">{{this.ganttDetail.planTime}}</div>
+            <div class="info">{{ganttDetail.planTime}}</div>
           </div>
           <div class="row">
             <div>
               <RealTime class="icon" />
               <div class="title">实际执行时间</div>
             </div>
-            <div class="info">{{this.ganttDetail.realTime}}</div>
+            <div class="info">{{ganttDetail.realTime}}</div>
           </div>
           <div class="row picture">
             <div>
@@ -453,7 +453,10 @@ export default {
       queryGanttDetail("/data/base/queryGanttChartDetails", param).then(res => {
         const { result, data } = res;
         if (result === "success") {
-          if (!data) return
+          if (!data) {
+            this.ganttDetail = {}
+            return
+          }
           const {
             status,
             planStartDate,

+ 5 - 1
src/views/analysis/SpecificationUpdateRecord.vue

@@ -141,7 +141,11 @@ export default {
           _.map(data, (item) => {
             let text = _.find(this.incidentList, (o) => {return o.id === item.objtype}).name
             item.evenType = text;
-            item.time = moment.unix(item.changedate / 1000).format('YYYY.MM.DD')
+            if (item.objtype === 0 || item.objtype === 2) {
+              item.time = moment.unix(item.changedate / 1000).format('YYYY-MM-DD')
+            } else {
+              item.time = moment.unix(item.changedate / 1000).format('YYYY-MM-DD HH-mm')
+            }
             return
           })
           this.tableData = data;