dedsudiyu %!s(int64=2) %!d(string=hai) anos
pai
achega
d43d2ac7f0

+ 1 - 1
src/views/safetyCheck/safetyHazard/batchAudit.vue

@@ -19,7 +19,7 @@
               v-model="dateRange"
               size="small"
               style="width: 240px"
-              value-format="examineOpinion-MM-dd"
+              value-format="yyyy-MM-dd"
               type="daterange"
               range-separator="-"
               start-placeholder="开始日期"

+ 136 - 12
src/views/safetyCheck/schoolInspection/inspectionPlan/addDialog.vue

@@ -155,7 +155,7 @@
           <p v-if="lookInfoType">{{deptNumLeft}}</p>
         </div>
         <div class="dept-table-max-box">
-          <el-form v-if="!lookInfoType" :model="deptQueryParamsLeft" class="form-box" ref="queryForm" :inline="true" label-width="50px">
+          <el-form :model="deptQueryParamsLeft" class="form-box" ref="queryForm" :inline="true" label-width="50px">
             <el-form-item label="" prop="searchValue" class="form-index">
               <el-input
                 maxLength="30"
@@ -163,16 +163,25 @@
                 placeholder="搜索学院"
                 clearable
                 style="width: 240px">
-                <p class="el-icon-search" slot="append" @click="deptGetListLeft"></p>
+                <p v-if="!lookInfoType" class="el-icon-search" slot="append" @click="deptGetListLeft"></p>
+                <p v-if="lookInfoType" class="el-icon-search" slot="append" @click="lookDeptLeftSearch"></p>
               </el-input>
             </el-form-item>
             <el-form-item style="margin-right:0;">
-              <p class="inquire-button-one" @click="deptResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
+              <p v-if="!lookInfoType" class="inquire-button-one" @click="deptResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
+              <p v-if="lookInfoType" class="inquire-button-one" @click="lookDeptLeftReset" style="width:60px;margin-right:0;">重置</p>
             </el-form-item>
           </el-form>
           <el-table ref="leftDeptTable" border :data="deptTableListLeft" @select-all="deptChange" @select="deptChange" :row-key="getDeptRowKeys">
             <el-table-column v-if="!lookInfoType" type="selection" width="50" :reserve-selection="true" align="center"/>
-            <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip/>
+            <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <div style="display: flex;">
+                  <p style="flex:1;">{{scope.row.deptName}}</p>
+                  <p style="width:80px;text-align: center">共{{scope.row.subNum}}间</p>
+                </div>
+              </template>
+            </el-table-column>
           </el-table>
         </div>
       </div>
@@ -182,7 +191,7 @@
           <p></p>
         </div>
         <div class="dept-table-max-box">
-          <el-form v-if="!lookInfoType" :model="deptQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
+          <el-form :model="deptQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
             <el-form-item label="" prop="typeId">
               <el-select v-model="deptQueryParamsRight.typeId" clearable placeholder="选择分类" style="width: 120px">
                 <el-option
@@ -220,11 +229,13 @@
                 placeholder="实验室/房间号"
                 clearable
                 style="width: 190px">
-                <p class="el-icon-search" slot="append" @click="deptHandleQueryRight"></p>
+                <p v-if="!lookInfoType" class="el-icon-search" slot="append" @click="deptHandleQueryRight"></p>
+                <p v-if="lookInfoType" class="el-icon-search" slot="append" @click="lookDeptRightSearch"></p>
               </el-input>
             </el-form-item>
             <el-form-item style="margin-right:0;">
-              <p class="inquire-button-one" @click="deptResetQueryRight" style="width:60px;margin-right:0;">重置</p>
+              <p v-if="!lookInfoType" class="inquire-button-one" @click="deptResetQueryRight" style="width:60px;margin-right:0;">重置</p>
+              <p v-if="lookInfoType" class="inquire-button-one" @click="lookDeptRightReset" style="width:60px;margin-right:0;">重置</p>
             </el-form-item>
           </el-form>
           <el-table  border :data="deptTableListRight">
@@ -333,9 +344,9 @@
           <p v-if="lookInfoType">{{subTotalRight}}</p>
         </div>
         <div class="dept-table-max-box">
-          <el-form v-if="!lookInfoType" :model="subQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
+          <el-form :model="subQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
             <el-form-item label="" prop="typeId">
-              <el-select v-model="subQueryParamsRight.typeId" clearable placeholder="选择分类" style="width: 110px">
+              <el-select v-model="subQueryParamsRight.typeId" clearable placeholder="选择分类" :style="!lookInfoType?'width:110px':'width:140px'">
                 <el-option
                   v-for="item in classTypeList"
                   :key="item.id"
@@ -345,7 +356,7 @@
               </el-select>
             </el-form-item>
             <el-form-item label="" prop="level">
-              <el-select v-model="subQueryParamsRight.level" clearable placeholder="选择分级" style="width: 110px">
+              <el-select v-model="subQueryParamsRight.level" clearable placeholder="选择分级" :style="!lookInfoType?'width:110px':'width:140px'">
                 <el-option
                   v-for="item in classifiedList"
                   :key="item.id"
@@ -355,7 +366,7 @@
               </el-select>
             </el-form-item>
             <el-form-item label="" prop="deptId">
-              <el-select v-model="subQueryParamsRight.deptId" clearable placeholder="学院" style="width: 80px">
+              <el-select v-model="subQueryParamsRight.deptId" clearable placeholder="学院" :style="!lookInfoType?'width:80px':'width:180px'">
                 <el-option
                   v-for="item in deptSelectList"
                   :key="item.deptId"
@@ -370,7 +381,7 @@
                 v-model="subQueryParamsRight.searchValue"
                 placeholder="实验室/房间号"
                 clearable
-                style="width: 140px">
+                :style="!lookInfoType?'width:140px':'width:180px'">
                 <p class="el-icon-search" slot="append" @click="subHandleQueryRight"></p>
               </el-input>
             </el-form-item>
@@ -960,6 +971,7 @@
                   }
                   self.$set(self,'deptTableListLeft',response.data);
                   self.$set(self,'deptTotalLeft',response.data.length);
+                  self.$set(self,'changeDeptSelectList',response.data);
                   let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
                   obj.deptIds = self.dialogForm.collegeIds;
                   findSubInfoByDeptIds(obj).then(response => {
@@ -1467,6 +1479,118 @@
         }).then(() => {
         }).catch(() => {});
       },
+      //查看时学院左侧搜索
+      lookDeptLeftSearch(){
+        let self = this;
+        conditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
+          let list = [];
+          for(let i=0;i<response.data.length;i++){
+            for(let o=0;o<self.dialogForm.collegeIds.length;o++){
+              if(response.data[i].deptId == self.dialogForm.collegeIds[o]  && response.data[i].deptName.indexOf(this.deptQueryParamsLeft.searchValue)!= -1){
+                list.push(response.data[i]);
+              }
+            }
+          }
+          self.$set(self,'deptTableListLeft',list);
+          self.$set(self,'deptTotalLeft',list.length);
+          self.$set(self,'changeDeptSelectList',list);
+          this.$set(this,'deptQueryParamsRight',{
+            pageNum:1,
+            pageSize:20,
+            searchValue:"",
+            deptId:"",
+            level:"",
+            typeId:"",
+          });
+          let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
+          let ids = [];
+          for(let o=0;o<list.length;o++){
+            ids.push(list[o].deptId)
+          }
+          obj.deptIds = ids;
+          findSubInfoByDeptIds(obj).then(response => {
+            this.deptTotalRight = response.total;
+            this.deptTableListRight = response.rows;
+            this.$set(this.deptCheckData,'subNum',response.total);
+            this.$set(this,'deptNumLeft',self.dialogForm.collegeIds.length);
+          });
+        })
+      },
+      //查看时学院左侧重置
+      lookDeptLeftReset(){
+        let self = this;
+        this.$set(this,'deptQueryParamsLeft',{ searchValue:"", });
+        conditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
+            //查看时
+            for(let i=0;i<response.data.length;i++){
+              let num = 0;
+              for(let o=0;o<self.dialogForm.collegeIds.length;o++){
+                if(response.data[i].deptId == self.dialogForm.collegeIds[o]){
+                  num++
+                }
+              }
+              if(num == 0){
+                response.data.splice(i,1);
+                i--
+              }
+            }
+            self.$set(self,'deptTableListLeft',response.data);
+            self.$set(self,'deptTotalLeft',response.data.length);
+            self.$set(self,'changeDeptSelectList',response.data);
+            this.$set(this,'deptQueryParamsRight',{
+              pageNum:1,
+              pageSize:20,
+              searchValue:"",
+              deptId:"",
+              level:"",
+              typeId:"",
+            });
+            let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
+            obj.deptIds = self.dialogForm.collegeIds;
+            findSubInfoByDeptIds(obj).then(response => {
+              this.deptTotalRight = response.total;
+              this.deptTableListRight = response.rows;
+              this.$set(this.deptCheckData,'subNum',response.total);
+              this.$set(this,'deptNumLeft',self.dialogForm.collegeIds.length);
+            });
+        })
+      },
+      //查看时学院右侧搜索
+      lookDeptRightSearch(){
+        let self = this;
+        let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
+        let ids = [];
+        for(let o=0;o<self.deptTableListLeft.length;o++){
+          ids.push(self.deptTableListLeft[o].deptId)
+        }
+        obj.deptIds = ids;
+        findSubInfoByDeptIds(obj).then(response => {
+          this.deptTotalRight = response.total;
+          this.deptTableListRight = response.rows;
+        });
+      },
+      //查看时学院右侧重置
+      lookDeptRightReset(){
+        let self = this;
+        this.$set(this,'deptQueryParamsRight',{
+          pageNum:1,
+          pageSize:20,
+          searchValue:"",
+          deptId:"",
+          level:"",
+          typeId:"",
+        });
+        let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
+        let ids = [];
+        for(let o=0;o<self.deptTableListLeft.length;o++){
+          ids.push(self.deptTableListLeft[o].deptId)
+        }
+        obj.deptIds = ids;
+        findSubInfoByDeptIds(obj).then(response => {
+          this.deptTotalRight = response.total;
+          this.deptTableListRight = response.rows;
+        });
+      },
     }
   }
 </script>

+ 2 - 2
src/views/safetyCheck/startInspection/index.vue

@@ -19,7 +19,7 @@
                 </el-select>
               </el-form-item>
               <el-form-item label="楼栋" prop="buildId">
-                <el-select v-model="addForm.buildId" clearable placeholder="请选择学院"
+                <el-select v-model="addForm.buildId" placeholder="请选择学院"
                            @change="buildingsChange" style="width: 500px">
                   <el-option
                     v-for="item in buildingsSelectList"
@@ -66,7 +66,7 @@
             </div>
             <div class="top-form-right-box">
               <el-form-item label="学院" prop="deptId">
-                <el-select v-model="addForm.deptId" clearable placeholder="请选择学院"
+                <el-select v-model="addForm.deptId" placeholder="请选择学院"
                            @change="deptChange" style="width: 500px">
                   <el-option
                     v-for="item in deptSelectList"