dedsudiyu 2 éve
szülő
commit
8d6a94b6f7

+ 6 - 3
src/views/comprehensive/laboratoryManagement/timingExhaustAir/addPage.vue

@@ -73,7 +73,7 @@
               <span v-show="!formData.executionDateVoList[1]"></span>
               <p class="form-title-p">执行日期</p>
               <div class="festival-box" @click="festivalButton" v-if="festival[0]">
-                <img src="@/assets/ZDimages/personnelManagement/icon_xzqx_zc.png" v-if="!formData.executionDateType==1">
+                <img src="@/assets/ZDimages/personnelManagement/icon_xzqx_zc.png" v-if="formData.executionDateType!=1">
                 <img src="@/assets/ZDimages/personnelManagement/icon_xzqx_xz.png" v-if="formData.executionDateType==1">
                 <p>节假日不执行排风</p>
               </div>
@@ -323,11 +323,13 @@
       this.getHoliday();
       if(this.propsData.id){
         let obj = JSON.parse(JSON.stringify(this.propsData))
-        let list = [{dateRange:[]}];
+        let list = [];
         if(obj.executionDateVoList){
           for(let i=0;i<obj.executionDateVoList.length;i++){
             list.push({dateRange:[obj.executionDateVoList[i].beginDate,obj.executionDateVoList[i].endDate]})
           }
+        }else{
+          list = [{dateRange:[]}];
         }
         obj.executionDateVoList = list;
         this.$set(this,'formData',obj);
@@ -422,6 +424,7 @@
         let newObj = {
           taskName:this.formData.taskName,
           exhaustType:this.formData.exhaustType,
+          executionDateType:this.formData.executionDateType,
           exhaustPeriodVoList:this.formData.exhaustPeriodVoList,
           executionDateVoList:this.formData.executionDateVoList
         }
@@ -574,7 +577,7 @@
         let date = new Date(this.accMul(timestamp,1000)); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
         let Y = date.getFullYear() + "-";//年
         let M = (date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1) + "-";//月
-        let D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";//日
+        let D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate());//日
         return Y + M + D;
       },
       //获取节假日数据

+ 48 - 8
src/views/comprehensive/laboratoryManagement/timingExhaustAir/index.vue

@@ -25,7 +25,8 @@
             <p class="inquire-button-one" @click="handleQuery">查询</p>
             <p class="reset-button-one" @click="resetQuery">重置</p>
           </el-form-item>
-          <el-form-item style="float: right;margin-right:0;">
+          <el-form-item style="float: right;margin-right:0;"
+                        v-hasPermi="['laboratory:exhaust:add']">
             <el-col :span="1.5">
               <p class="inquire-button-one" style="width:80px;margin:0;"
                  @click="goPage(2)"
@@ -54,12 +55,18 @@
           </el-table-column>
           <el-table-column label="编辑时间" align="left" prop="updateTime" width="300" show-overflow-tooltip/>
           <el-table-column label="操作人" align="left" prop="updateBy" width="200" show-overflow-tooltip/>
-          <el-table-column label="操作" align="left" prop="createTime" width="300" show-overflow-tooltip>
+          <el-table-column label="操作" align="left" prop="createTime" width="300" show-overflow-tooltip v-if="tableButtonType">
             <template slot-scope="scope">
               <div class="button-box">
-                <p class="table-min-button" style="margin-left:20px!important;" @click="correlationButton(scope.row.id)">关联实验室</p>
-                <p class="table-min-button" style="margin-left:20px!important;" @click="goPage(3,scope.row.id)">编辑</p>
-                <p class="table-min-button" style="margin-left:20px!important;" @click="delExhaust(scope.row.id)">删除</p>
+                <p class="table-min-button" style="margin-left:20px!important;"
+                   v-hasPermiAnd="['laboratory:exhaust:query','laboratory:exjoinsub:add']"
+                   @click="correlationButton(scope.row.id)">关联实验室</p>
+                <p class="table-min-button" style="margin-left:20px!important;"
+                   v-hasPermiAnd="['laboratory:exhaust:query','laboratory:exhaust:edit']"
+                   @click="goPage(3,scope.row.id)">编辑</p>
+                <p class="table-min-button" style="margin-left:20px!important;"
+                   v-hasPermi="['laboratory:exhaust:remove']"
+                   @click="delExhaust(scope.row.id)">删除</p>
               </div>
             </template>
           </el-table-column>
@@ -75,7 +82,13 @@
       <add-page v-if="pageType == 2" :propsData="propsData"></add-page>
       <el-dialog title="关联实验室" :visible.sync="exhaustPageType" v-if="exhaustPageType"
                  width="1470px" append-to-body id="exhaust-correlation-dialog-box">
-        <p class="exhaust-title-p">任务执行时间</p>
+        <p class="exhaust-title-p" v-if="!correlationData.executionDate">任务执行时间 <span>(适用所有日期)</span></p>
+        <div class="exhaust-title-box" v-else>
+          <p class="title-p">任务执行时间</p>
+          <div class="text-box">
+            <span v-for="(item,index) in correlationData.executionDate" :key="index">{{item.beginDate}}至 {{item.endDate}}{{index!=correlationData.executionDate.length-1?',':''}}</span>
+          </div>
+        </div>
         <div class="time-max-box">
           <div class="for-time-box" v-for="(item,index) in correlationData.exhaustPeriodVoList" :key="index">
             <p class="for-title-p">{{item.beginTime}}~{{item.endTime}}</p>
@@ -213,6 +226,7 @@
     },
     data() {
       return {
+        tableButtonType:this.hasPermiDom(['laboratory:exhaust:query','laboratory:exhaust:edit','laboratory:exjoinsub:add','laboratory:exhaust:remove']),
         //关联实验室也页面状态
         exhaustPageType:false,
         //页面状态
@@ -413,6 +427,9 @@
               response.data.exhaustPeriodVoList[i].customTime = response.data.exhaustPeriodVoList[i].customTime.split(',');
             }
           }
+          if(response.data.executionDate){
+            response.data.executionDate = JSON.parse(response.data.executionDate);
+          }
           this.$set(this,'correlationData',response.data);
           this.leftResetQuery();
           this.rightResetQuery();
@@ -640,6 +657,29 @@
       color:#0045AF;
       font-size:18px;
       line-height:60px;
+      span{
+        margin-left:20px;
+        font-size:18px;
+      }
+    }
+    .exhaust-title-box{
+      color:#0045AF;
+      display: flex;
+      .title-p{
+        width:130px;
+        font-size:18px;
+        line-height:60px;
+      }
+      .text-box{
+        flex:1;
+        padding:10px 0;
+        span{
+          display: inline-block;
+          margin-right:20px;
+          font-size:18px;
+          line-height:40px;
+        }
+      }
     }
     .time-max-box{
       display: flex;
@@ -677,8 +717,8 @@
       }
     }
     .exhaust-sub-max-box{
-      margin:41px 0 28px;
-      padding-top:41px;
+      margin:20px 0 28px;
+      padding-top:20px;
       border-top:1px dashed #D8D8D8;
       display: flex;
       .left-sub-max-box{