dedsudiyu 10 月之前
父節點
當前提交
9d41046ca2

+ 35 - 0
src/api/integratedManagement/index.js

@@ -663,3 +663,38 @@ export function laboratoryHazardDetail(query) {
     params: query
   })
 }
+
+/********************** 值班/巡查 **********************/
+
+//查询值班列表
+export function laboratoryXxpDutyListYmd(query) {
+  return request({
+    url: '/laboratory/xxpDuty/listYmd',
+    method: 'get',
+    params: query
+  })
+}
+//添加值班人员
+export function addXxpDuty(data) {
+  return request({
+    url: '/laboratory/XxpDuty',
+    method: 'post',
+    data: data
+  })
+}
+//获取树状实验室列表接口
+export function laboratorySubRelInfoGetDeptInSubList(data) {
+  return request({
+    url: '/laboratory/subRelInfo/getDeptInSubList',
+    method: 'post',
+    data: data
+  })
+}
+//获取实验室可选值班人员列表
+export function getUserDutyList(query) {
+  return request({
+    url: '/system/user/getUserDutyList',
+    method: 'get',
+    params: query
+  })
+}

+ 4 - 4
src/views/basicsModules/home.vue

@@ -86,12 +86,12 @@
     mounted(){
       if(this.initPage){
         //开启首页时-学生自动跳转-老师留在首页
-        if (this.userType == '22'){
+        if (this.userType == '2'){
           this.autoSkip();
         }
       }else{
         //关闭首页时
-        if (this.userType == '22'){
+        if (this.userType == '2'){
           if(this.homeConfigData.studentsSkip){
             //开启了指定页面跳转
             this.appointSkip();
@@ -145,7 +145,7 @@
       },
       //指定跳转
       appointSkip(){
-        if(this.userType == '22'){
+        if(this.userType == '2'){
           //学生
           let path = this.circularCallIdSkip(this.homeConfigData.studentsSkipMenuId,this.routeData);
           if(path){
@@ -153,7 +153,7 @@
           }else{
             this.outLogin();
           }
-        }else if(this.userType == '11'){
+        }else if(this.userType == '1'){
           //老师
           let path = this.circularCallIdSkip(this.homeConfigData.teacherSkipMenuId,this.routeData);
           if(path){

+ 2 - 2
src/views/basicsModules/login.vue

@@ -415,7 +415,7 @@ export default {
                 });
               }
               //身份字段规则转义 原定11老师 22学生  新版本后0系统1老师2学生,这里身份字段转义为旧版本规则
-              localStorage.setItem('userType',res.data.userType==0||res.data.userType==1?'11':'22')
+              localStorage.setItem('userType',res.data.userType==0||res.data.userType==1?'1':'2')
               //新的身份字段 用于区分系统身份(旧的未废弃)
               localStorage.setItem('userStanding',res.data.accountType)
               localStorage.setItem('userId',res.data.userId)
@@ -480,7 +480,7 @@ export default {
                   });
                 }
                 //身份字段规则转义 原定11老师 22学生  新版本后0系统1老师2学生,这里身份字段转义为旧版本规则
-                localStorage.setItem('userType',res.data.userType==0||res.data.userType==1?'11':'22')
+                localStorage.setItem('userType',res.data.userType==0||res.data.userType==1?'1':'2')
                 //新的身份字段 用于区分系统身份(旧的未废弃)
                 localStorage.setItem('userStanding',res.data.accountType)
                 localStorage.setItem('userId',res.data.userId)

+ 1 - 1
src/views/chemicalManage/inventoryManagement/savePending/addPage.vue

@@ -391,7 +391,7 @@
             unReguLiquidsMax:0,//非管控液体最大值
             unReguSolidMax:0,//非管控固体最大值
           });
-          if (this.userType==11 ||this.userType==22){
+          if (this.userType==1 ||this.userType==2){
             this.chemicalApplyGetUserInfo();
           }
 

+ 2 - 2
src/views/chemicalManage/purchaseManage/purchaseRegister/addPage.vue

@@ -74,7 +74,7 @@
             </el-form-item>
           </div>
           <div class="form-right-max-box">
-            <el-form-item label="导师:" prop="mentorId" label-width="150px" v-if="userType==22">
+            <el-form-item label="导师:" prop="mentorId" label-width="150px" v-if="userType==2">
               <el-input v-model="newData.mentorAll" placeholder="请输入导师" maxLength="20" style="width:825px;"></el-input>
             </el-form-item>
             <div class="form-text-box">
@@ -392,7 +392,7 @@
             unReguLiquidsMax:0,//非管控液体最大值
             unReguSolidMax:0,//非管控固体最大值
           });
-          if (this.userType==11 ||this.userType==22){
+          if (this.userType==1 ||this.userType==2){
             this.chemicalApplyGetUserInfo();
           }
 

+ 211 - 0
src/views/emergencyManagement/performEvacuation/performEvacuationData.vue

@@ -388,6 +388,37 @@
         <p class="evacuation-button-p" @click="executeEvacuation(1)">已确定疏散出口,立即执行疏散</p>
       </div>
     </div>
+    <!--红外控制器-->
+    <el-dialog class="performEvacuationData-dialog" :title='infraredControllerTitle' width="460px" append-to-body
+               :visible.sync="infraredControllerType" v-if="infraredControllerType" @close="dialogOff()"
+               :close-on-click-modal="false" :close-on-press-escape="false">
+      <div class="infraredController-max-big-box">
+        <div class="infraredController-switchType-box">
+          <p class="switchType-name-p">{{infraredControllerForm.name}}</p>
+          <p class="switchType-type-p"
+             @click="switchTypeButton"
+             :class="infraredControllerForm.switchType == 1 ? '': 'switchType-type-off-p'">{{infraredControllerForm.switchType == 1 ? '开启':'关闭'}}</p>
+        </div>
+        <div style="overflow: hidden;height:130px;">
+          <div class="infraredController-functionType-box" v-if="infraredControllerForm.switchType == 1">
+            <p :class="infraredControllerForm.functionType == item.value?'check-button':''"
+               @click="functionButton(item.value)"
+               v-for="(item,index) in infraredControllerData.functionList"
+               :key="index">{{item.label}}</p>
+          </div>
+          <div class="infraredController-orderType-box" v-if="infraredControllerForm.switchType == 1 && (infraredControllerForm.functionType == 1 || infraredControllerForm.functionType == 2)">
+            <p class="order-minus" @click="minusTextButton()">-</p>
+            <p class="order-text" v-for="(item,index) in infraredControllerData.orderList" :key="index" v-if="infraredControllerForm.orderType == item.value">{{item.label}}</p>
+            <p class="order-add" @click="addTextButton()">+</p>
+          </div>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer dialog-footer-box">
+        <p class="dialog-footer-button-null"></p>
+        <p class="dialog-footer-button-primary" @click="dialogSubmit">确定</p>
+        <p class="dialog-footer-button-null"></p>
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -491,6 +522,34 @@
         //预案
         planOpic:'lab/risk/plan/change',
         planClient:{},
+        /****************** 红外控制器相关 ******************/
+        infraredControllerType:true,
+        infraredControllerTitle:"",
+        infraredControllerForm:{
+          name:'空调控制器空调控制器空调控制器空调控制器空调控制器空调控制器',//设备名称
+          switchType:1,//0.关 1.开
+          functionType:'1', //1.制冷 2.制热 3.通风
+          orderType:18, //温度指令
+        },
+        infraredControllerData:{
+          functionList:[
+            {label:'制冷',value:'1'},
+            {label:'制热',value:'2'},
+            {label:'通风',value:'3'},
+          ],
+          orderList:[
+            {label:"18°C",value:18},
+            {label:"19°C",value:19},
+            {label:"20°C",value:20},
+            {label:"21°C",value:21},
+            {label:"22°C",value:22},
+            {label:"23°C",value:23},
+            {label:"24°C",value:24},
+            {label:"25°C",value:25},
+            {label:"26°C",value:26},
+            {label:"27°C",value:27},
+          ],
+        }
       }
     },
     created () {
@@ -1692,6 +1751,51 @@
           }
         });
       },
+      /**************** 红外控制器操作相关 ****************/
+      //弹层关闭
+      dialogOff(){
+        this.$set(this,'infraredControllerType',false);
+      },
+      //弹层开启
+      dialogOpen(){
+        this.dialogFormReset();
+        this.$set(this,'infraredControllerTitle','空调控制');
+        this.$set(this,'infraredControllerType',true);
+      },
+      dialogSubmit(){
+        let text = '';
+        if(this.infraredControllerForm.switchType == 1){
+          if(this.infraredControllerForm.functionType != 3){
+            text = '1-' + this.infraredControllerForm.functionType + '-' + this.infraredControllerForm.orderType;
+          }else {
+            text = '1-3';
+          }
+        }else if(this.infraredControllerForm.switchType == 0){
+          text = '0';
+        }
+        console.log('text',text)
+      },
+      //开关切换
+      switchTypeButton(){
+        this.$set(this.infraredControllerForm,'switchType',!this.infraredControllerForm.switchType);
+      },
+      //状态切换
+      functionButton(value){
+        if(this.infraredControllerForm.functionType != value){
+          this.$set(this.infraredControllerForm,'functionType',value);
+        }
+      },
+      //指令切换
+      minusTextButton(){
+        if(this.infraredControllerForm.orderType>18){
+          this.infraredControllerForm.orderType--
+        }
+      },
+      addTextButton(){
+        if(this.infraredControllerForm.orderType<27){
+          this.infraredControllerForm.orderType++
+        }
+      },
     },
     beforeDestroy() {
       //清除MQTT
@@ -2949,3 +3053,110 @@
     }
   }
 </style>
+<style lang="scss">
+  .performEvacuationData-dialog{
+    .el-dialog{
+      background: #011020;
+      border:1px solid #116e8e;
+      .el-dialog__header{
+        border-bottom:1px solid #116e8e;
+        .el-dialog__title{
+          color:#24D1F9;
+        }
+      }
+      .el-dialog__footer{
+        border-top:1px solid #116e8e;
+        .dialog-footer-button-primary{
+          background-color: #1E768E;
+          border:1px solid #1E768E;
+        }
+        .dialog-footer-button-primary:hover{
+          background-color: #24D1F9;
+          border:1px solid #24D1F9;
+        }
+      }
+    }
+    .infraredController-max-big-box{
+      font-size:16px;
+      .infraredController-switchType-box{
+        display: flex;
+        p{
+          line-height:30px;
+        }
+        .switchType-name-p{
+          font-size:18px;
+          flex:1;
+          display:block;
+          overflow:hidden;
+          text-overflow:ellipsis;
+          white-space:nowrap;
+          color:#24D1F9;
+        }
+        .switchType-type-p{
+          cursor: pointer;
+          width:80px;
+          text-align: center;
+          border-radius:6px;
+          background-color: #116e8e;
+          border:1px solid #116e8e;
+          color:#fff;
+        }
+        .switchType-type-off-p{
+          background-color: #011020!important;
+          border:1px solid #116e8e!important;
+          color:#116e8e!important;
+        }
+      }
+      .infraredController-functionType-box{
+        margin-top:20px;
+        display: flex;
+        p{
+          border-radius:6px;
+          background-color: #011020;
+          border:1px solid #116e8e;
+          color:#116e8e;
+          line-height:40px;
+          width:130px;
+          text-align: center;
+          margin-left:14px;
+          cursor: pointer;
+        }
+        p:nth-child(1){
+          margin-left:0!important;
+        }
+        .check-button{
+          background-color: #116e8e!important;
+          border:1px solid #116e8e!important;
+          color:#fff!important;
+        }
+      }
+      .infraredController-orderType-box{
+        margin-top:20px;
+        display: flex;
+        p{
+          text-align: center;
+          line-height:40px;
+          width:60px;
+          color:#24D1F9;
+        }
+        .order-minus{
+          cursor: pointer;
+          border:1px solid #116e8e;
+          border-top-left-radius: 6px;
+          border-bottom-left-radius: 6px;
+        }
+        .order-text{
+          width:300px;
+          border-top:1px solid #116e8e;
+          border-bottom:1px solid #116e8e;
+        }
+        .order-add{
+          cursor: pointer;
+          border:1px solid #116e8e;
+          border-top-right-radius: 6px;
+          border-bottom-right-radius: 6px;
+        }
+      }
+    }
+  }
+</style>

+ 1 - 1
src/views/gasManage3_0/manage/labCenterPerson/labCenterPersonAdd.vue

@@ -97,7 +97,7 @@ export default {
     },
     //懒加载
     userSelectList(e){
-      selectUserListByName({nickName:e,userType:11}).then(response => {
+      selectUserListByName({nickName:e,userType:1}).then(response => {
         this.laboratoryOptions = response.data;
       });
     },

+ 1 - 1
src/views/integratedManagement/laboratoryManagement/accessAuthorization/lookImpower.vue

@@ -275,7 +275,7 @@ export default {
             level:"1",//1.普通搜索 2.高级搜索  普通搜索默认会在高级搜索时显示
             type:"2",//类型 1.input 2.select 3.TimePicker
             universal:[ //通用参数 select时为列表数据 //TimePicker时可不传
-              {label:"学生",value:"22"},{label:"教师",value:"11"},
+              {label:"学生",value:"2"},{label:"教师",value:"1"},
             ],
             width:'175',//el-form-item 长度 可传可不传 不传时input/select默认180长度 TimePicker默认240长度
           },

+ 186 - 28
src/views/integratedManagement/laboratoryManagement/subject/indexRightPage/hardwarePage.vue

@@ -3,34 +3,6 @@
   <div class="indexRightPage-hardwarePage scrollbar-box">
     <img class="null-img" src="@/assets/ZDimages/basicsModules/null-data-1.png" v-if="!hardwareList[0]">
     <div class="for-hardware-max-big-box scrollbar-box">
-      <!--<div class="for-hardware-big-box" :class="!item.online?'offLineColor':'onLineColor'"-->
-           <!--v-for="(item,index) in hardwareList" :key="index">-->
-        <!--<div class="for-hardware-box">-->
-          <!--<div class="for-hardware-text-box" >-->
-            <!--<el-tooltip class="item" effect="dark" :content="item.hardwareName" placement="bottom">-->
-              <!--<p>{{item.hardwareName}}</p>-->
-            <!--</el-tooltip>-->
-            <!--<p v-if="!item.online">离线</p>-->
-          <!--</div>-->
-          <!--<div class="for-hardware-switch-box">-->
-            <!--<div class="for-hardware-switch-title">-->
-              <!--<p v-if="item.online && item.operatingState && item.reservedThree">{{item.reservedThree}}</p>-->
-            <!--</div>-->
-            <!--<div class="for-hardware-switch" v-if="item.online">-->
-              <!--<el-switch-->
-                <!--class="switch"-->
-                <!--@click.native="changeIsNeedCaptcha(item)"-->
-                <!--v-model="item.operatingState"-->
-                <!--:active-value="true"-->
-                <!--:inactive-value="false"-->
-                <!--active-text="开启"-->
-                <!--inactive-text="关闭"-->
-                <!--disabled>-->
-              <!--</el-switch>-->
-            <!--</div>-->
-          <!--</div>-->
-        <!--</div>-->
-      <!--</div>-->
       <div class="for-hardware-big-box onLineColor"
            v-for="(item,index) in hardwareList" :key="index">
         <div class="for-hardware-box">
@@ -59,6 +31,37 @@
         </div>
       </div>
     </div>
+    <!--红外控制器-->
+    <el-dialog class="indexRightPage-hardwarePage-dialog" :title='infraredControllerTitle' width="460px" append-to-body
+               :visible.sync="infraredControllerType" v-if="infraredControllerType" @close="dialogOff()"
+               :close-on-click-modal="false" :close-on-press-escape="false">
+      <div class="infraredController-max-big-box">
+        <div class="infraredController-switchType-box">
+          <p class="switchType-name-p">{{infraredControllerForm.name}}</p>
+          <p class="switchType-type-p"
+             @click="switchTypeButton"
+             :class="infraredControllerForm.switchType == 1 ? '': 'switchType-type-off-p'">{{infraredControllerForm.switchType == 1 ? '开启':'关闭'}}</p>
+        </div>
+        <div style="overflow: hidden;height:130px;">
+          <div class="infraredController-functionType-box" v-if="infraredControllerForm.switchType == 1">
+            <p :class="infraredControllerForm.functionType == item.value?'check-button':''"
+               @click="functionButton(item.value)"
+               v-for="(item,index) in infraredControllerData.functionList"
+               :key="index">{{item.label}}</p>
+          </div>
+          <div class="infraredController-orderType-box" v-if="infraredControllerForm.switchType == 1 && (infraredControllerForm.functionType == 1 || infraredControllerForm.functionType == 2)">
+            <p class="order-minus" @click="minusTextButton()">-</p>
+            <p class="order-text" v-for="(item,index) in infraredControllerData.orderList" :key="index" v-if="infraredControllerForm.orderType == item.value">{{item.label}}</p>
+            <p class="order-add" @click="addTextButton()">+</p>
+          </div>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer dialog-footer-box">
+        <p class="dialog-footer-button-null"></p>
+        <p class="dialog-footer-button-primary" @click="dialogSubmit">确定</p>
+        <p class="dialog-footer-button-null"></p>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -77,6 +80,34 @@
         mtOpic:"iot/hardware/all/sub/",
         client:{},
         hardwareList:[],
+        //红外控制器相关
+        infraredControllerType:true,
+        infraredControllerTitle:"",
+        infraredControllerForm:{
+          name:'空调控制器空调控制器空调控制器空调控制器空调控制器空调控制器',//设备名称
+          switchType:1,//0.关 1.开
+          functionType:'1', //1.制冷 2.制热 3.通风
+          orderType:18, //温度指令
+        },
+        infraredControllerData:{
+          functionList:[
+            {label:'制冷',value:'1'},
+            {label:'制热',value:'2'},
+            {label:'通风',value:'3'},
+          ],
+          orderList:[
+            {label:"18°C",value:18},
+            {label:"19°C",value:19},
+            {label:"20°C",value:20},
+            {label:"21°C",value:21},
+            {label:"22°C",value:22},
+            {label:"23°C",value:23},
+            {label:"24°C",value:24},
+            {label:"25°C",value:25},
+            {label:"26°C",value:26},
+            {label:"27°C",value:27},
+          ],
+        }
       }
     },
     created(){
@@ -90,6 +121,51 @@
         this.iotHardwareFindByType();
         this.offMQTT('on');
       },
+      //红外控制器操作相关
+      //弹层关闭
+      dialogOff(){
+        this.$set(this,'infraredControllerType',false);
+      },
+      //弹层开启
+      dialogOpen(){
+        this.dialogFormReset();
+        this.$set(this,'infraredControllerTitle','空调控制');
+        this.$set(this,'infraredControllerType',true);
+      },
+      dialogSubmit(){
+        let text = '';
+        if(this.infraredControllerForm.switchType == 1){
+          if(this.infraredControllerForm.functionType != 3){
+            text = '1-' + this.infraredControllerForm.functionType + '-' + this.infraredControllerForm.orderType;
+          }else {
+            text = '1-3';
+          }
+        }else if(this.infraredControllerForm.switchType == 0){
+          text = '0';
+        }
+        console.log('text',text)
+      },
+      //开关切换
+      switchTypeButton(){
+        this.$set(this.infraredControllerForm,'switchType',!this.infraredControllerForm.switchType);
+      },
+      //状态切换
+      functionButton(value){
+        if(this.infraredControllerForm.functionType != value){
+          this.$set(this.infraredControllerForm,'functionType',value);
+        }
+      },
+      //指令切换
+      minusTextButton(){
+        if(this.infraredControllerForm.orderType>18){
+          this.infraredControllerForm.orderType--
+        }
+      },
+      addTextButton(){
+        if(this.infraredControllerForm.orderType<27){
+          this.infraredControllerForm.orderType++
+        }
+      },
       //查询硬件数据
       iotHardwareFindByType(){
         iotHardwareFindByType({subjectId:this.$parent.subId}).then(response => {
@@ -317,4 +393,86 @@
       margin-left: -16px!important;
     }
   }
+  .indexRightPage-hardwarePage-dialog{
+    .infraredController-max-big-box{
+      font-size:16px;
+      .infraredController-switchType-box{
+        display: flex;
+        p{
+          line-height:30px;
+        }
+        .switchType-name-p{
+          font-size:18px;
+          flex:1;
+          display:block;
+          overflow:hidden;
+          text-overflow:ellipsis;
+          white-space:nowrap;
+        }
+        .switchType-type-p{
+          cursor: pointer;
+          width:80px;
+          text-align: center;
+          border-radius:6px;
+          background-color: #fff;
+          border:1px solid #0183FB;
+          color:#0183FB;
+        }
+        .switchType-type-off-p{
+          background-color: #fff!important;
+          border:1px solid #999!important;
+          color:#999!important;
+        }
+      }
+      .infraredController-functionType-box{
+        margin-top:20px;
+        display: flex;
+        p{
+          border-radius:6px;
+          background-color: #fff;
+          border:1px solid #999;
+          color:#333;
+          line-height:40px;
+          width:130px;
+          text-align: center;
+          margin-left:14px;
+          cursor: pointer;
+        }
+        p:nth-child(1){
+          margin-left:0!important;
+        }
+        .check-button{
+          background-color: #0183FB!important;
+          border:1px solid #0183FB!important;
+          color:#fff!important;
+        }
+      }
+      .infraredController-orderType-box{
+        margin-top:20px;
+        display: flex;
+        p{
+          text-align: center;
+          line-height:40px;
+          width:60px;
+        }
+        .order-minus{
+          cursor: pointer;
+          border:1px solid #999;
+          border-top-left-radius: 6px;
+          border-bottom-left-radius: 6px;
+        }
+        .order-text{
+          width:300px;
+          border-top:1px solid #999;
+          border-bottom:1px solid #999;
+        }
+        .order-add{
+          cursor: pointer;
+          border:1px solid #999;
+          border-top-right-radius: 6px;
+          border-bottom-right-radius: 6px;
+        }
+      }
+    }
+  }
 </style>

+ 187 - 0
src/views/integratedManagement/laboratoryManagement/subject/infoPage.vue

@@ -214,6 +214,37 @@
           <el-button type="primary" @click="submitFormOne">确 定</el-button>
         </div>
       </el-dialog>
+      <!--红外控制器-->
+      <el-dialog class="subject-infoPage-dialog" :title='infraredControllerTitle' width="460px" append-to-body
+                 :visible.sync="infraredControllerType" v-if="infraredControllerType" @close="dialogOff()"
+                 :close-on-click-modal="false" :close-on-press-escape="false">
+        <div class="infraredController-max-big-box">
+          <div class="infraredController-switchType-box">
+            <p class="switchType-name-p">{{infraredControllerForm.name}}</p>
+            <p class="switchType-type-p"
+               @click="switchTypeButton"
+               :class="infraredControllerForm.switchType == 1 ? '': 'switchType-type-off-p'">{{infraredControllerForm.switchType == 1 ? '开启':'关闭'}}</p>
+          </div>
+          <div style="overflow: hidden;height:130px;">
+            <div class="infraredController-functionType-box" v-if="infraredControllerForm.switchType == 1">
+              <p :class="infraredControllerForm.functionType == item.value?'check-button':''"
+                 @click="functionButton(item.value)"
+                 v-for="(item,index) in infraredControllerData.functionList"
+                 :key="index">{{item.label}}</p>
+            </div>
+            <div class="infraredController-orderType-box" v-if="infraredControllerForm.switchType == 1 && (infraredControllerForm.functionType == 1 || infraredControllerForm.functionType == 2)">
+              <p class="order-minus" @click="minusTextButton()">-</p>
+              <p class="order-text" v-for="(item,index) in infraredControllerData.orderList" :key="index" v-if="infraredControllerForm.orderType == item.value">{{item.label}}</p>
+              <p class="order-add" @click="addTextButton()">+</p>
+            </div>
+          </div>
+        </div>
+        <div slot="footer" class="dialog-footer dialog-footer-box">
+          <p class="dialog-footer-button-null"></p>
+          <p class="dialog-footer-button-primary" @click="dialogSubmit">确定</p>
+          <p class="dialog-footer-button-null"></p>
+        </div>
+      </el-dialog>
     </div>
 </template>
 
@@ -298,6 +329,34 @@
           //MQTT请求参数-传感器
           hardwareMtOpic:"iot/hardware/all/sub/",
           hardwareClient:{},
+          //红外控制器相关
+          infraredControllerType:true,
+          infraredControllerTitle:"",
+          infraredControllerForm:{
+            name:'空调控制器空调控制器空调控制器空调控制器空调控制器空调控制器',//设备名称
+            switchType:1,//0.关 1.开
+            functionType:'1', //1.制冷 2.制热 3.通风
+            orderType:18, //温度指令
+          },
+          infraredControllerData:{
+            functionList:[
+              {label:'制冷',value:'1'},
+              {label:'制热',value:'2'},
+              {label:'通风',value:'3'},
+            ],
+            orderList:[
+              {label:"18°C",value:18},
+              {label:"19°C",value:19},
+              {label:"20°C",value:20},
+              {label:"21°C",value:21},
+              {label:"22°C",value:22},
+              {label:"23°C",value:23},
+              {label:"24°C",value:24},
+              {label:"25°C",value:25},
+              {label:"26°C",value:26},
+              {label:"27°C",value:27},
+            ],
+          }
         }
       },
       created() {
@@ -539,6 +598,52 @@
             this.hardwareMQTT();
           }
         },
+
+        /**************** 红外控制器操作相关 ****************/
+        //弹层关闭
+        dialogOff(){
+          this.$set(this,'infraredControllerType',false);
+        },
+        //弹层开启
+        dialogOpen(){
+          this.dialogFormReset();
+          this.$set(this,'infraredControllerTitle','空调控制');
+          this.$set(this,'infraredControllerType',true);
+        },
+        dialogSubmit(){
+          let text = '';
+          if(this.infraredControllerForm.switchType == 1){
+            if(this.infraredControllerForm.functionType != 3){
+              text = '1-' + this.infraredControllerForm.functionType + '-' + this.infraredControllerForm.orderType;
+            }else {
+              text = '1-3';
+            }
+          }else if(this.infraredControllerForm.switchType == 0){
+            text = '0';
+          }
+          console.log('text',text)
+        },
+        //开关切换
+        switchTypeButton(){
+          this.$set(this.infraredControllerForm,'switchType',!this.infraredControllerForm.switchType);
+        },
+        //状态切换
+        functionButton(value){
+          if(this.infraredControllerForm.functionType != value){
+            this.$set(this.infraredControllerForm,'functionType',value);
+          }
+        },
+        //指令切换
+        minusTextButton(){
+          if(this.infraredControllerForm.orderType>18){
+            this.infraredControllerForm.orderType--
+          }
+        },
+        addTextButton(){
+          if(this.infraredControllerForm.orderType<27){
+            this.infraredControllerForm.orderType++
+          }
+        },
       },
       beforeDestroy() {
         //清除定时器
@@ -918,4 +1023,86 @@
       margin-left: -16px!important;
     }
   }
+  .subject-infoPage-dialog{
+    .infraredController-max-big-box{
+      font-size:16px;
+      .infraredController-switchType-box{
+        display: flex;
+        p{
+          line-height:30px;
+        }
+        .switchType-name-p{
+          font-size:18px;
+          flex:1;
+          display:block;
+          overflow:hidden;
+          text-overflow:ellipsis;
+          white-space:nowrap;
+        }
+        .switchType-type-p{
+          cursor: pointer;
+          width:80px;
+          text-align: center;
+          border-radius:6px;
+          background-color: #fff;
+          border:1px solid #0183FB;
+          color:#0183FB;
+        }
+        .switchType-type-off-p{
+          background-color: #fff!important;
+          border:1px solid #999!important;
+          color:#999!important;
+        }
+      }
+      .infraredController-functionType-box{
+        margin-top:20px;
+        display: flex;
+        p{
+          border-radius:6px;
+          background-color: #fff;
+          border:1px solid #999;
+          color:#333;
+          line-height:40px;
+          width:130px;
+          text-align: center;
+          margin-left:14px;
+          cursor: pointer;
+        }
+        p:nth-child(1){
+          margin-left:0!important;
+        }
+        .check-button{
+          background-color: #0183FB!important;
+          border:1px solid #0183FB!important;
+          color:#fff!important;
+        }
+      }
+      .infraredController-orderType-box{
+        margin-top:20px;
+        display: flex;
+        p{
+          text-align: center;
+          line-height:40px;
+          width:60px;
+        }
+        .order-minus{
+          cursor: pointer;
+          border:1px solid #999;
+          border-top-left-radius: 6px;
+          border-bottom-left-radius: 6px;
+        }
+        .order-text{
+          width:300px;
+          border-top:1px solid #999;
+          border-bottom:1px solid #999;
+        }
+        .order-add{
+          cursor: pointer;
+          border:1px solid #999;
+          border-top-right-radius: 6px;
+          border-bottom-right-radius: 6px;
+        }
+      }
+    }
+  }
 </style>

+ 30 - 47
src/views/integratedManagement/personnelManage/onDutyConfiguration/index.vue

@@ -33,7 +33,7 @@
           <p class="flex-p"></p>
           <!--<p class="all-button add-button-one-90" @click="allButton">{{allButtonType?'取消全选':'全选'}}</p>-->
           <p class="add-button page-submit-common-style-button" @click="addButton"
-             v-hasPermiRouter="['laboratory:duty:add']">+ 新增</p>
+             v-hasPermiRouter="['laboratory:duty:add']">新增</p>
         </div>
         <div class="month-max-big-box scrollbar-box" v-if="yearMonthType === 1">
           <div class="month-week-box">
@@ -93,6 +93,7 @@
         <el-form :model="formData" ref="upForm" :rules="rules">
           <el-form-item label="实验室:" prop="subCheckList" class="form-item" label-width="80px">
             <el-cascader
+              style="width:400px;"
               @change="cascaderChange"
               ref="subCascader"
               v-model="formData.subCheckList"
@@ -131,15 +132,15 @@
                 </el-select>
               </el-form-item>
               <el-form-item>
-                <p class="inquire-button-one" @click="handleQuery">查询</p>
-                <p class="reset-button-one" @click="resetQuery">重置</p>
+                <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+                <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
               </el-form-item>
             </el-form>
-            <el-table v-loading="loading" border :data="dataList">
+            <el-table class="table-box" v-loading="loading" border :data="dataList">
               <el-table-column label="姓名" align="left" prop="nickName" show-overflow-tooltip/>
               <el-table-column label="类别" align="left" prop="userType" width="124" show-overflow-tooltip>
                 <template slot-scope="scope">
-                  <span>{{scope.row.userType ==11?'教职工':(scope.row.userType ==22?'学生':'未定义')}}</span>
+                  <span>{{scope.row.userType ==1?'教职工':(scope.row.userType ==2?'学生':'未定义')}}</span>
                 </template>
               </el-table-column>
               <el-table-column label="电话" align="left" prop="phonenumber" width="227" show-overflow-tooltip/>
@@ -166,7 +167,7 @@
           <p class="bottom-dialog-right-title-p">已选择人员({{userCheckList.length}}人)</p>
           <div class="bottom-dialog-right-for-max-box scrollbar-box">
             <div class="bottom-dialog-right-for-box" v-for="(item,index) in userCheckList" :key="index">
-              <p>{{item.nickName}}({{item.userType==11?'教职工':(item.userType==22?'学生':'未定义')}})</p>
+              <p>{{item.nickName}}({{item.userType==1?'教职工':(item.userType==2?'学生':'未定义')}})</p>
               <p class="el-icon-delete" @click="deleteDataButton(item,index)"></p>
             </div>
           </div>
@@ -181,10 +182,11 @@
 </template>
 
 <script>
-  import { getListYmd,addXxpDuty,treeDeptSubSel,getUserDutyList } from '@/apiDemo/laboratory/onDutyConfiguration'
+  import { addXxpDuty,getUserDutyList } from '@/apiDemo/laboratory/onDutyConfiguration'
   import infoPage from "./infoPage.vue";
   //                                  V3
   import { systemDeptOrganizeStructureByDept } from "@/api/commonality/permission";
+  import { laboratoryXxpDutyListYmd,laboratorySubRelInfoGetDeptInSubList } from '@/api/integratedManagement/index'
 
   export default {
     name: 'index',
@@ -275,8 +277,8 @@
         loading:false,
         total:0,
         classOptions:[
-          {key:'22',value:'学生'},
-          {key:'11',value:'教职工'},
+          {key:'2',value:'学生'},
+          {key:'1',value:'教职工'},
         ],
         queryParams:{
           pageNum: 1,
@@ -379,8 +381,8 @@
         }
       },
       //获取树状实验室列表
-      treeDeptSubSel(){
-        treeDeptSubSel().then( response => {
+      laboratorySubRelInfoGetDeptInSubList(){
+        laboratorySubRelInfoGetDeptInSubList({}).then( response => {
           this.options = response.data;
           this.listForDel(this.options);
         })
@@ -428,7 +430,6 @@
             };
             let subList = this.$refs.subCascader.getCheckedNodes()
             subList.forEach(item=>{
-              console.log('item',item);
               if(!item.children[0]){
                 obj.subjectList.push({
                   id:item.data.subOrDeptId,
@@ -466,21 +467,19 @@
       },
       /************************日历页面**************************/
       //查询值班列表
-      getListYmd(){
+      laboratoryXxpDutyListYmd(){
         let self = this;
         let obj = {
           deptId:this.checkTreeId,
-          // beginTime:this.yearDate[0].list[0].value,
-          beginTime:"",
-          // endTime:this.yearDate[this.yearDate.length-1].list[this.yearDate[this.yearDate.length-1].list.length-1].value,
-          endTime:"",
+          beginTimeStr:"",
+          endTimeStr:"",
         };
         if(this.yearMonthType == 1){
           for(let i=0;i<self.yearDate.length;i++){
             if(self.yearDate[i].year == self.yearMonthData.year &&
                self.yearDate[i].month == self.yearMonthData.month){
-              obj.beginTime = self.yearDate[i].list[0].value;
-              obj.endTime = self.yearDate[i].list[self.yearDate[i].list.length-1].value;
+              obj.beginTimeStr = self.yearDate[i].list[0].value;
+              obj.endTimeStr = self.yearDate[i].list[self.yearDate[i].list.length-1].value;
             }
           }
         }else if(this.yearMonthType == 2){
@@ -490,10 +489,10 @@
               list.push(self.yearDate[i]);
             }
           }
-          obj.beginTime = list[0].list[0].value;
-          obj.endTime = list[list.length-1].list[list[list.length-1].list.length-1].value;
+          obj.beginTimeStr = list[0].list[0].value;
+          obj.endTimeStr = list[list.length-1].list[list[list.length-1].list.length-1].value;
         }
-        getListYmd(obj).then(response => {
+        laboratoryXxpDutyListYmd(obj).then(response => {
           for(let o=0;o<self.yearDate.length;o++){
             for(let x=0;x<self.yearDate[o].list.length;x++){
               let subSum = 0;
@@ -508,22 +507,6 @@
               self.yearDate[o].list[x].userSum = userSum
             }
           }
-
-
-          // for(let i=0;i<response.rows.length;i++){
-          //   let year = parseInt(response.rows[i].dutyTime.split('-')[0]);
-          //   let month = parseInt(response.rows[i].dutyTime.split('-')[1]);
-          //   for(let o=0;o<self.yearDate.length;o++){
-          //     if(self.yearDate[o].year == year && self.yearDate[o].month == month){
-          //       for(let x=0;x<self.yearDate[o].list.length;x++){
-          //         if(self.yearDate[o].list[x].value == response.rows[i].dutyTime){
-          //           self.yearDate[o].list[x].subSum = response.rows[i].subSum
-          //           self.yearDate[o].list[x].userSum = response.rows[i].userSum
-          //         }
-          //       }
-          //     }
-          //   }
-          // }
         });
       },
       //时间初始化
@@ -542,7 +525,7 @@
         if(this.generateDate()){
           //后端数据回填
           this.allCheckJudgment();
-          this.getListYmd();
+          this.laboratoryXxpDutyListYmd();
         }
       },
       /** 查询部门下拉树结构 */
@@ -566,15 +549,15 @@
       },
       // 节点单击事件
       handleNodeClick(data) {
-        if(data.id != this.checkTreeId){
-          this.$set(this,'checkTreeId',data.id);
+        if(data.deptId != this.checkTreeId){
+          this.$set(this,'checkTreeId',data.deptId);
           this.initializationDate();
         }
       },
       //页面切换
       goPage(type,item){
         if(type == 'get'){
-          this.getListYmd();
+          this.laboratoryXxpDutyListYmd();
           this.$set(this,'pageType',1)
         }else if(type=='info'){
           if(!this.hasPermiDom(['laboratory:duty:query'])){
@@ -698,7 +681,7 @@
           this.$set(this.formData,'subCheckList',[]);
           this.$set(this,'checkList',list);
           // this.resetQuery();
-          this.treeDeptSubSel();
+          this.laboratorySubRelInfoGetDeptInSubList();
           this.$set(this,'addPageType',true);
         }
       },
@@ -706,7 +689,7 @@
       returnPresent(){
         this.$set(this.yearMonthData,'year',this.yearMonthData.presentYear);
         this.$set(this.yearMonthData,'month',this.yearMonthData.presentMonth);
-        this.getListYmd();
+        this.laboratoryXxpDutyListYmd();
       },
       //年或月增加
       addDate(){
@@ -727,7 +710,7 @@
           this.yearMonthData.year++
         }
         this.allCheckJudgment();
-        this.getListYmd();
+        this.laboratoryXxpDutyListYmd();
       },
       //年或月减少
       subtractDate(){
@@ -748,14 +731,14 @@
           this.yearMonthData.year--
         }
         this.allCheckJudgment();
-        this.getListYmd();
+        this.laboratoryXxpDutyListYmd();
       },
       //年月展示切换按钮
       yearMonthSwitchButton(type){
         if(this.yearMonthType != type){
           this.$set(this,'yearMonthType',type);
           this.allCheckJudgment();
-          this.getListYmd();
+          this.laboratoryXxpDutyListYmd();
         }
       },
       // 生成日历

+ 1 - 1
src/views/integratedManagement/personnelManage/onDutyConfiguration/infoPage.vue

@@ -11,7 +11,7 @@
           <el-table-column label="值班人员" align="left" prop="userName" show-overflow-tooltip/>
           <el-table-column label="类别" align="left" prop="data2" show-overflow-tooltip width="230">
             <template slot-scope="scope">
-              <span>{{scope.row.userType == 11?'教职工':'学生'}}</span>
+              <span>{{scope.row.userType == 1?'教职工':(scope.row.userType == 2?'学生':'')}}</span>
             </template>
           </el-table-column>
           <el-table-column label="电话" align="left" prop="userPhone" show-overflow-tooltip width="200"/>

+ 14 - 32
src/views/integratedManagement/personnelManage/patrolRecord/index.vue

@@ -74,10 +74,10 @@
 </template>
 
 <script>
-  import { getListYmd } from '@/apiDemo/laboratory/patrolRecord'
   import infoPage from "./infoPage.vue";
   //                                  V3
   import { systemDeptOrganizeStructureByDept } from "@/api/commonality/permission";
+  import { laboratoryXxpDutyListYmd } from '@/api/integratedManagement/index'
   export default {
     name: 'index',
     components: {
@@ -158,21 +158,19 @@
     methods: {
       /**************************************************/
       //查询值班记录列表
-      getListYmd(){
+      laboratoryXxpDutyListYmd(){
         let self = this;
         let obj = {
           deptId:this.checkTreeId,
-          // beginTime:this.yearDate[0].list[0].value,
-          beginTime:"",
-          // endTime:this.yearDate[this.yearDate.length-1].list[this.yearDate[this.yearDate.length-1].list.length-1].value,
-          endTime:"",
+          beginTimeStr:"",
+          endTimeStr:"",
         };
         if(this.yearMonthType == 1){
           for(let i=0;i<self.yearDate.length;i++){
             if(self.yearDate[i].year == self.yearMonthData.year &&
               self.yearDate[i].month == self.yearMonthData.month){
-              obj.beginTime = self.yearDate[i].list[0].value;
-              obj.endTime = self.yearDate[i].list[self.yearDate[i].list.length-1].value;
+              obj.beginTimeStr = self.yearDate[i].list[0].value;
+              obj.endTimeStr = self.yearDate[i].list[self.yearDate[i].list.length-1].value;
             }
           }
         }else if(this.yearMonthType == 2){
@@ -182,10 +180,10 @@
               list.push(self.yearDate[i]);
             }
           }
-          obj.beginTime = list[0].list[0].value;
-          obj.endTime = list[list.length-1].list[list[list.length-1].list.length-1].value;
+          obj.beginTimeStr = list[0].list[0].value;
+          obj.endTimeStr = list[list.length-1].list[list[list.length-1].list.length-1].value;
         }
-        getListYmd(obj).then(response => {
+        laboratoryXxpDutyListYmd(obj).then(response => {
           for(let o=0;o<self.yearDate.length;o++){
             for(let x=0;x<self.yearDate[o].list.length;x++){
               let signInCount = 0;
@@ -200,22 +198,6 @@
               self.yearDate[o].list[x].noSignedInCount = noSignedInCount
             }
           }
-
-
-          // for(let i=0;i<response.data.length;i++){
-          //   let year = parseInt(response.data[i].dutyTime.split('-')[0]);
-          //   let month = parseInt(response.data[i].dutyTime.split('-')[1]);
-          //   for(let o=0;o<self.yearDate.length;o++){
-          //     if(self.yearDate[o].year == year && self.yearDate[o].month == month){
-          //       for(let x=0;x<self.yearDate[o].list.length;x++){
-          //         if(self.yearDate[o].list[x].value == response.data[i].dutyTime){
-          //           self.yearDate[o].list[x].signInCount = response.data[i].signInCount
-          //           self.yearDate[o].list[x].noSignedInCount = response.data[i].noSignedInCount
-          //         }
-          //       }
-          //     }
-          //   }
-          // }
         });
       },
       //时间初始化
@@ -233,7 +215,7 @@
         this.$set(this,'checkList',[]);
         if(this.generateDate()){
           //后端数据回填
-          this.getListYmd();
+          this.laboratoryXxpDutyListYmd();
         }
       },
       /** 查询部门下拉树结构 */
@@ -284,7 +266,7 @@
       returnPresent(){
         this.$set(this.yearMonthData,'year',this.yearMonthData.presentYear);
         this.$set(this.yearMonthData,'month',this.yearMonthData.presentMonth);
-        this.getListYmd();
+        this.laboratoryXxpDutyListYmd();
       },
       //年或月增加
       addDate(){
@@ -304,7 +286,7 @@
           }
           this.yearMonthData.year++
         }
-        this.getListYmd();
+        this.laboratoryXxpDutyListYmd();
       },
       //年或月减少
       subtractDate(){
@@ -324,14 +306,14 @@
           }
           this.yearMonthData.year--
         }
-        this.getListYmd();
+        this.laboratoryXxpDutyListYmd();
       },
       //年月展示切换按钮
       yearMonthSwitchButton(type){
         if(this.yearMonthType != type){
           this.$set(this,'yearMonthType',type);
         }
-        this.getListYmd();
+        this.laboratoryXxpDutyListYmd();
       },
       // 生成日历
       generateDate() {