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

+ 135 - 1
src/api/safetyCheck/index.js

@@ -1,5 +1,16 @@
 import request from '@/utils/request'
 
+/***************************工作台***************************/
+
+//工作台-查询是否院级用户
+export function isSCollege(query) {
+  return request({
+    url: '/security/collegCheck/isSCollege',
+    method: 'get',
+    params: query
+  })
+}
+
 //工作台-校级巡查数据
 export function schoolWorkCheck(query) {
   return request({
@@ -83,15 +94,138 @@ export function hiddenCountByType(query) {
 //工作台-指标统计(院级)
 export function collegCheckHiddenCountByType(query) {
   return request({
-    url: 'security/collegCheck/hiddenCountByType',
+    url: '/security/collegCheck/hiddenCountByType',
+    method: 'get',
+    params: query
+  })
+}
+
+/***************************检查计划***************************/
+
+//检查计划-列表
+export function checkPlanList(data) {
+  return request({
+    url: '/zd-security/checkPlan/list',
+    method: 'post',
+    data: data
+  })
+}
+
+/***************************随手拍***************************/
+
+//随手拍-上报记录-列表
+export function securityCheckClapList(query) {
+  return request({
+    url: '/zd-security/checkClap/list',
+    method: 'get',
+    params: query
+  })
+}
+
+//随手拍-上报记录-提交
+export function checkClapAdd(data) {
+  return request({
+    url: '/zd-security/checkClap/add',
+    method: 'post',
+    data: data
+  })
+}
+
+//随手拍-上报记录-详情
+export function findById(query) {
+  return request({
+    url: '/zd-security/checkClap/findById',
+    method: 'get',
+    params: query
+  })
+}
+
+//随手拍-上报记录-整改
+export function clapApprove(data) {
+  return request({
+    url: '/zd-security/checkClap/clapApprove',
+    method: 'post',
+    data: data
+  })
+}
+
+//随手拍-上报记录-上报记录
+export function checkClapMylist(query) {
+  return request({
+    url: '/zd-security/checkClap/mylist',
     method: 'get',
     params: query
   })
 }
 
+/***************************整改报告***************************/
+
+//整改报告-列表
+export function checkRectifyList(query) {
+  return request({
+    url: '/zd-security/checkRectify/list',
+    method: 'get',
+    params: query
+  })
+}
+//整改报告-下载  '/zd-security/checkRectify/genReport/'+row.id
+//整改报告-批量下载  '/zd-security/checkRectify/genReport/zip/'+text
+
+/***************************项目检查库***************************/
+
+//项目检查库-树状列表
+export function checkOptionList(query) {
+  return request({
+    url: '/zd-security/checkOption/list',
+    method: 'get',
+    params: query
+  })
+}
+
+//项目检查库-添加
+export function checkOptionAdd(data) {
+  return request({
+    url: '/zd-security/checkOption/add',
+    method: 'post',
+    data: data
+  })
+}
+
+//项目检查库-编辑
+export function checkOptionUpdate(data) {
+  return request({
+    url: '/zd-security/checkOption/update',
+    method: 'post',
+    data: data
+  })
+}
 
+//项目检查库-删除
+export function checkOptionDelete(id) {
+  return request({
+    url: '/zd-security/checkOption/delete/'+id,
+    method: 'delete'
+  })
+}
 
+//项目检查库-批量删除
+export function checkOptionBatchDelete(ids) {
+  return request({
+    url: '/zd-security/checkOption/batchDelete/'+ids,
+    method: 'delete'
+  })
+}
+
+/***************************检查配置***************************/
 
+//检查配置 检查人员/整改人员-列表
+export function checkStaffList(query) {
+  return request({
+    url: '/zd-security/checkStaff/list',
+    method: 'get',
+    params: query
+  })
+}
 
 
 

+ 25 - 19
src/views/safetyCheck/checkConfiguration/checkUserPage.vue

@@ -9,13 +9,13 @@
           clearable
           style="width: 200px"/>
       </el-form-item>
-      <el-form-item label="学院" prop="data1" label-width="50px">
-        <el-select v-model="queryParams.data1" clearable placeholder="请选择学院">
+      <el-form-item label="学院" prop="deptId" label-width="50px">
+        <el-select v-model="queryParams.deptId" clearable placeholder="请选择学院">
           <el-option
             v-for="item in deptSelectList"
-            :key="item.key"
-            :label="item.label"
-            :value="item.key">
+            :key="item.deptId"
+            :label="item.deptName"
+            :value="item.deptId">
           </el-option>
         </el-select>
       </el-form-item>
@@ -34,11 +34,11 @@
     </el-form>
     <el-table  border :data="tableList" ref="multipleTable">
       <el-table-column label="序号" align="center"  type="index" width="60" />
-      <el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip/>
+      <el-table-column label="实验室" align="center" prop="subName" show-overflow-tooltip/>
       <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip width="300"/>
-      <el-table-column label="检查者" align="center" prop="deptName" show-overflow-tooltip width="300"/>
-      <el-table-column label="操作人" align="center" prop="deptName" show-overflow-tooltip width="200"/>
-      <el-table-column label="操作时间" align="center" prop="deptName" show-overflow-tooltip width="300"/>
+      <el-table-column label="检查者" align="center" prop="nickNames" show-overflow-tooltip width="300"/>
+      <el-table-column label="操作人" align="center" prop="createName" show-overflow-tooltip width="200"/>
+      <el-table-column label="操作时间" align="center" prop="createTime" show-overflow-tooltip width="300"/>
     </el-table>
     <pagination :page-sizes="[20, 30, 40, 50]"
                 v-show="total>0"
@@ -52,6 +52,8 @@
 </template>
 
 <script>
+  import { listDepartments } from "@/api/system/dept";
+  import { checkStaffList } from '@/api/safetyCheck/index'
   import configDialog from './configDialog.vue'
   export default {
     name: 'checkUserPage',
@@ -71,7 +73,7 @@
           pageNum:1,
           pageSize:20,
           searchValue:"",
-          data1:""
+          deptId:""
         },
         tableList:[{}],
         total:0,
@@ -81,7 +83,8 @@
 
     },
     mounted(){
-
+      this.listDepartments();
+      this.getList();
     },
     methods:{
       //配置按钮
@@ -95,12 +98,10 @@
       },
       //获取数据列表
       getList(){
-        // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
-        // this.queryParamsData.type = 'RFID_RECOGNIZER';
-        // listHardware(this.queryParamsData).then(response => {
-        //   this.total = response.total;
-        //   this.tableList = response.rows;
-        // });
+        checkStaffList(this.queryParamsData).then(response => {
+          this.total = response.total;
+          this.tableList = response.rows;
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -109,15 +110,20 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
-        this.$set(this,'dateRange',[]);
         this.$set(this,'queryParams',{
           pageNum:1,
           pageSize:20,
           searchValue:"",
-          data1:""
+          deptId:""
         });
         this.handleQuery();
       },
+      //获取学院列表
+      listDepartments(){
+        listDepartments().then(response => {
+          this.deptSelectList = response.data;
+        });
+      },
     }
   }
 </script>

+ 25 - 18
src/views/safetyCheck/checkConfiguration/rectificationUserPage.vue

@@ -9,13 +9,13 @@
           clearable
           style="width: 200px"/>
       </el-form-item>
-      <el-form-item label="学院" prop="data1" label-width="50px">
-        <el-select v-model="queryParams.data1" clearable placeholder="请选择学院">
+      <el-form-item label="学院" prop="deptId" label-width="50px">
+        <el-select v-model="queryParams.deptId" clearable placeholder="请选择学院">
           <el-option
             v-for="item in deptSelectList"
-            :key="item.key"
-            :label="item.label"
-            :value="item.key">
+            :key="item.deptId"
+            :label="item.deptName"
+            :value="item.deptId">
           </el-option>
         </el-select>
       </el-form-item>
@@ -34,11 +34,11 @@
     </el-form>
     <el-table  border :data="tableList" ref="multipleTable">
       <el-table-column label="序号" align="center"  type="index" width="60" />
-      <el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip/>
+      <el-table-column label="实验室" align="center" prop="subName" show-overflow-tooltip/>
       <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip width="300"/>
-      <el-table-column label="检查者" align="center" prop="deptName" show-overflow-tooltip width="300"/>
-      <el-table-column label="整改人" align="center" prop="deptName" show-overflow-tooltip width="200"/>
-      <el-table-column label="操作时间" align="center" prop="deptName" show-overflow-tooltip width="300"/>
+      <el-table-column label="检查者" align="center" prop="nickNames" show-overflow-tooltip width="300"/>
+      <el-table-column label="操作人" align="center" prop="createName" show-overflow-tooltip width="200"/>
+      <el-table-column label="操作时间" align="center" prop="createTime" show-overflow-tooltip width="300"/>
     </el-table>
     <pagination :page-sizes="[20, 30, 40, 50]"
                 v-show="total>0"
@@ -52,6 +52,8 @@
 </template>
 
 <script>
+  import { listDepartments } from "@/api/system/dept";
+  import { checkStaffList } from '@/api/safetyCheck/index'
   import configDialog from './configDialog.vue'
   export default {
     name: 'rectificationUserPage',
@@ -71,7 +73,7 @@
           pageNum:1,
           pageSize:20,
           searchValue:"",
-          data1:""
+          deptId:""
         },
         tableList:[{}],
         total:0,
@@ -81,7 +83,8 @@
 
     },
     mounted(){
-
+      this.listDepartments();
+      this.getList();
     },
     methods:{
       //配置按钮
@@ -94,12 +97,10 @@
       },
       //获取数据列表
       getList(){
-        // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
-        // this.queryParamsData.type = 'RFID_RECOGNIZER';
-        // listHardware(this.queryParamsData).then(response => {
-        //   this.total = response.total;
-        //   this.tableList = response.rows;
-        // });
+        checkStaffList(this.queryParamsData).then(response => {
+          this.total = response.total;
+          this.tableList = response.rows;
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -112,10 +113,16 @@
           pageNum:1,
           pageSize:20,
           searchValue:"",
-          data1:""
+          deptId:""
         });
         this.handleQuery();
       },
+      //获取学院列表
+      listDepartments(){
+        listDepartments().then(response => {
+          this.deptSelectList = response.data;
+        });
+      },
     }
   }
 </script>

+ 90 - 35
src/views/safetyCheck/checkItemLibrary/index.vue

@@ -61,7 +61,7 @@
         <el-table-column type="selection" width="50" align="center"/>
         <el-table-column label="序号" prop="code" width="140"/>
         <el-table-column label="检查项目" prop="name"/>
-        <el-table-column label="检查要点" prop="name" width="700"/>
+        <el-table-column label="检查要点" prop="mainPoint" width="700"/>
         <el-table-column label="操作" width="180">
           <template slot-scope="scope">
             <div class="table-button-box">
@@ -109,36 +109,36 @@
     </el-dialog>
     <!--添加窗口-->
     <el-dialog :title="addDialogTitle" :visible.sync="addDialogType" v-if="addDialogType" @close="addDialogOff" width="780px" append-to-body class="checkItemLibrary-dialog-box">
-      <el-form  :model="addDialogForm" :rules="rules" label-width="120px">
-        <el-form-item label="上级指标" prop="data1">
+      <el-form ref="addDialogForm" :model="addDialogForm" :rules="rules" label-width="120px">
+        <el-form-item label="上级指标" prop="parentId">
           <el-cascader
             style="width:548px;"
-            v-model="addDialogForm.data1"
+            v-model="addDialogForm.parentId"
             :options="cascaderData"
             :props="{ checkStrictly: true, value: 'id', label: 'labelName',emitPath:false }"
             @change="cascaderCheck"></el-cascader>
         </el-form-item>
-        <el-form-item label="添加序号" prop="data2">
-          <el-input v-model="addDialogForm.data2" placeholder="未选择指标" maxLength="6" disabled style="width:548px;"/>
+        <el-form-item label="添加序号" prop="code">
+          <el-input v-model="addDialogForm.code" placeholder="未选择指标" maxLength="6" disabled style="width:548px;"/>
         </el-form-item>
-        <el-form-item label="检查项目" prop="data3">
+        <el-form-item label="检查项目" prop="name">
           <el-input
             type="textarea"
             :autosize="{ minRows: 5, maxRows: 5}"
             placeholder="请输入检查项目内容"
-            v-model="addDialogForm.data3"
+            v-model="addDialogForm.name"
             maxlength="100"
             resize="none"
             show-word-limit
             style="width:548px;">
           </el-input>
         </el-form-item>
-        <el-form-item label="检查要点" prop="data4" v-if="addDialogLevel>1">
+        <el-form-item label="检查要点" prop="mainPoint" v-if="addDialogLevel>1">
           <el-input
             type="textarea"
             :autosize="{ minRows: 8, maxRows: 8}"
             placeholder="请输入检查检查要点:"
-            v-model="addDialogForm.data4"
+            v-model="addDialogForm.mainPoint"
             maxlength="300"
             resize="none"
             show-word-limit
@@ -149,7 +149,7 @@
       <div slot="footer" class="dialog-footer dialog-footer-box" style="display: flex">
         <p class="dialog-footer-button-null"></p>
         <p class="dialog-footer-button-info" @click="addDialogOff">取消</p>
-        <p class="dialog-footer-button-primary">确定</p>
+        <p class="dialog-footer-button-primary" @click="upDataButton">确定</p>
         <p class="dialog-footer-button-null"></p>
       </div>
     </el-dialog>
@@ -157,7 +157,7 @@
 </template>
 
 <script>
-  import { listCheckOption } from "@/api/laboratory/checkOption";
+  import { checkOptionList,checkOptionAdd,checkOptionUpdate,checkOptionDelete,checkOptionBatchDelete } from '@/api/safetyCheck/index'
   import { getToken } from "@/utils/auth";
   export default {
     name: 'index',
@@ -194,18 +194,18 @@
         addDialogTitle:null,
         addDialogLevel:0,
         addDialogForm:{
-          data1:"",
-          data2:"",
-          data3:"",
-          data4:"",
+          parentId:"",
+          code:"",
+          name:"",
+          mainPoint:"",
         },
         // 表单校验
         rules: {
-          data1: [
+          parentId: [
             { required: true, message: "请选择上级指标", trigger: "change" },
             { required: true, message: "请选择上级指标", validator: this.spaceJudgment, trigger: "change" },
           ],
-          data3: [
+          name: [
             { required: true, message: "请输入检查项目内容", trigger: "change" },
             { required: true, message: "请输入检查项目内容", validator: this.spaceJudgment, trigger: "change" },
           ],
@@ -219,38 +219,80 @@
       this.getList();
     },
     methods:{
+      //确定按钮
+      upDataButton(){
+        this.$refs["addDialogForm"].validate(valid => {
+          if (valid) {
+            if(this.addDialogForm.id){
+              //编辑
+              let obj = JSON.parse(JSON.stringify(this.addDialogForm))
+              obj.level = this.addDialogLevel+1;
+              obj.mainPoint = this.addDialogLevel>1?obj.mainPoint:'';
+              checkOptionUpdate(obj).then( response => {
+                this.msgSuccess(response.msg)
+                this.addDialogOff();
+                this.getList();
+              })
+            }else{
+              //新增
+              let obj = JSON.parse(JSON.stringify(this.addDialogForm))
+              obj.level = this.addDialogLevel+1;
+              checkOptionAdd(obj).then( response => {
+                this.msgSuccess(response.msg)
+                this.addDialogOff();
+                this.getList();
+              })
+            }
+          }
+        })
+      },
       //添加页面开启
       addDialogOpen(type,row){
         if(type == 1){
-
+          //新增
           this.$set(this,'addDialogTitle','添加检查项目');
+          this.$set(this,'addDialogLevel',0);
+          this.$set(this,'addDialogForm',{
+            parentId:"",
+            code:"",
+            name:"",
+            mainPoint:"",
+          });
           this.$set(this,'addDialogType',true);
         }else if(type == 2){
-
+          //列表新增
           this.$set(this,'addDialogTitle','添加检查项目');
+          let obj = this.cascaderCheckData(row.id,this.cascaderDataPrimitive);
+          this.$set(this,'addDialogLevel',obj.level);
+          this.$set(this,'addDialogForm',{
+            parentId:row.id,
+            code:obj.key,
+            name:"",
+            mainPoint:"",
+          });
           this.$set(this,'addDialogType',true);
         }else if(type == 3){
-
+          //编辑
           this.$set(this,'addDialogTitle','编辑检查项目');
+          this.$set(this,'addDialogLevel',row.level-1);
+          this.$set(this,'addDialogForm',{
+            id:row.id,
+            parentId:row.parentId,
+            code:row.code,
+            name:row.name,
+            mainPoint:row.mainPoint,
+          });
           this.$set(this,'addDialogType',true);
         }
       },
       //添加页面关闭
       addDialogOff(){
         this.$set(this,'addDialogType',false);
-        this.$set(this,'addDialogTitle',null);
-        this.$set(this,'addDialogLevel',0);
-        this.$set(this,'addDialogForm',{
-          data1:"",
-          data2:"",
-          data3:"",
-          data4:"",
-        });
       },
       //联级选中
       cascaderCheck(val){
         let obj = this.cascaderCheckData(val,this.cascaderDataPrimitive);
-        this.$set(this.addDialogForm,'data2',obj.key);
+        this.$set(this.addDialogForm,'code',obj.key);
         this.$set(this,'addDialogLevel',obj.level);
       },
       cascaderCheckData(val,list){
@@ -290,17 +332,22 @@
       },
       //删除
       delItem(row){
+        let self = this;
         this.$confirm('是否确认删除?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
         }).then(function() {
-
+          checkOptionDelete(row.id).then( response => {
+            self.msgSuccess(response.msg)
+            self.getList();
+          })
         }).then(() => {
         }).catch(() => {});
       },
       //批量删除
       allDel(){
+        let self = this;
         if(!this.$refs.multipleTable.selection[0]){
           this.msgError('请勾选数据')
           return
@@ -310,17 +357,25 @@
           cancelButtonText: "取消",
           type: "warning"
         }).then(function() {
-
+          let list = self.$refs.multipleTable.selection;
+          let ids = [];
+          for(let i=0;i<list.length;i++){
+            ids.push(list[i].id)
+          }
+          checkOptionBatchDelete(ids+'').then( response => {
+            self.msgSuccess(response.msg);
+            self.getList();
+          })
         }).then(() => {
         }).catch(() => {});
       },
       /** 查询检查项选项列表 */
       getList() {
         this.loading = true;
-        listCheckOption(this.queryParams).then( response => {
+        checkOptionList(this.queryParams).then( response => {
           this.$set(this,'tableData',JSON.parse(JSON.stringify(response.data)));
           let list = [{
-            id:0,
+            id:'0',
             name:"最上级",
             code:false,
             level:0,
@@ -337,7 +392,7 @@
       getCascaderData(list){
         let self = this;
         for(let i=0;i<list.length;i++){
-          list[i].labelName = list[i].code? list[i].code + list[i].name:list[i].name
+          list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
           if(list[i].level == 0 || list[i].level == 1){
             self.getCascaderData(list[i].children)
           }else{

+ 64 - 35
src/views/safetyCheck/rectificationReport/index.vue

@@ -11,13 +11,13 @@
             style="width: 200px"
           />
         </el-form-item>
-        <el-form-item label="学校" prop="data1" label-width="50px">
-          <el-select v-model="queryParams.data1" clearable placeholder="请选择层级">
+        <el-form-item label="学院" prop="deptId" label-width="50px">
+          <el-select v-model="queryParams.deptId" clearable placeholder="学院" style="width: 150px">
             <el-option
-              v-for="item in optionsList"
-              :key="item.key"
-              :label="item.label"
-              :value="item.key">
+              v-for="item in deptSelectList"
+              :key="item.deptId"
+              :label="item.deptName"
+              :value="item.deptId">
             </el-option>
           </el-select>
         </el-form-item>
@@ -42,6 +42,7 @@
           <el-col :span="1.5">
             <p class="inquire-button-one"
                style="width:100px;"
+               @click="allDownload"
             >批量下载</p>
           </el-col>
         </el-form-item>
@@ -51,17 +52,15 @@
       <el-table  border :data="tableList" ref="multipleTable" @selection-change="handleSelectionChange"  :row-key="getRowKeys">
         <el-table-column type="selection" width="50" align="center" :reserve-selection="true"/>
         <el-table-column label="序号" align="center"  type="index" width="50" />
-        <el-table-column label="计划任务" align="center" prop="deptName" show-overflow-tooltip/>
-        <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip width="100"/>
-        <el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip width="100"/>
-        <el-table-column label="房间号" align="center" prop="deptName" show-overflow-tooltip width="80"/>
-        <el-table-column label="楼栋" align="center" prop="deptName" show-overflow-tooltip width="100"/>
-        <el-table-column label="隐患数" align="center" prop="deptName" show-overflow-tooltip width="80"/>
-        <el-table-column label="计划周期" align="center" prop="deptName" show-overflow-tooltip width="200"/>
-        <el-table-column label="检查者" align="center" prop="deptName" show-overflow-tooltip width="80"/>
-        <el-table-column label="检查时间" align="center" prop="deptName" show-overflow-tooltip width="120"/>
-        <el-table-column label="整改员" align="center" prop="deptName" show-overflow-tooltip width="80"/>
-        <el-table-column label="整改时间" align="center" prop="deptName" show-overflow-tooltip width="120"/>
+        <el-table-column label="计划任务" align="center" prop="title" show-overflow-tooltip/>
+        <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="160"/>
+        <el-table-column label="实验室" align="center" prop="subjectName" show-overflow-tooltip width="160"/>
+        <el-table-column label="房间号" align="center" prop="roomNumber" show-overflow-tooltip width="80"/>
+        <el-table-column label="楼栋" align="center" prop="buildName" show-overflow-tooltip width="100"/>
+        <el-table-column label="隐患数" align="center" prop="hazardCount" show-overflow-tooltip width="80"/>
+        <el-table-column label="计划周期" align="center" prop="cycleTime" show-overflow-tooltip width="200"/>
+        <el-table-column label="检查者" align="center" prop="checkUser" show-overflow-tooltip width="80"/>
+        <el-table-column label="检查时间" align="center" prop="checkTime" show-overflow-tooltip width="120"/>
         <el-table-column label="操作" align="center" prop="deptName" width="200">
           <template slot-scope="scope">
             <div class="table-button-box">
@@ -86,6 +85,8 @@
 </template>
 
 <script>
+  import { listDepartments } from "@/api/system/dept";
+  import { checkRectifyList,genReport,genReportZip } from '@/api/safetyCheck/index'
   import infoDialog from '@/views/safetyCheck/components/infoDialog/infoDialog.vue'
   import lookDocumentDialog from '@/components/lookDocumentDialog/lookDocumentDialog.vue'
   export default {
@@ -100,15 +101,12 @@
         infoDialogType:false,
         lookDocumentType:false,
         propsLookDocumentData:{},
-        optionsList:[],
+        deptSelectList:[],
         queryParams:{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          safetyType:"",
-          timeType:0,
-          searchValue:"",
-          data1:""
+          deptId:'',
+          searchValue:'',
         },
         dateRange:[],
         tableList:[{
@@ -123,12 +121,30 @@
 
     },
     mounted(){
-
+      this.listDepartments();
+      this.getList();
     },
     methods:{
+      // 批量下载
+      allDownload(){
+        let self = this;
+        if(!this.ids[0]){
+          this.msgError('请先勾选数据')
+          return
+        }
+        this.$confirm('是否批量下载?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          let text = self.ids+'';
+          self.download('/zd-security/checkRectify/genReport/zip/'+text, {}, '批量报告下载.zip')
+        }).then(() => {
+        }).catch(() => {});
+      },
       // 单个下载按钮
       downloadButton(row){
-        this.download(row.url, {}, row.name)
+        this.download('/zd-security/checkRectify/genReport/'+row.id, {}, row.title+'.docx')
       },
       //开关详情页面
       addDialogOpen(type,data){
@@ -151,12 +167,21 @@
       },
       //获取数据列表
       getList(){
-        // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
-        // this.queryParamsData.type = 'RFID_RECOGNIZER';
-        // listHardware(this.queryParamsData).then(response => {
-        //   this.total = response.total;
-        //   this.tableList = response.rows;
-        // });
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.beginTime = this.dateRange[0]
+        }else{
+          obj.beginTime = ""
+        }
+        if(this.dateRange[1]){
+          obj.endTime = this.dateRange[1]
+        }else{
+          obj.endTime = ""
+        }
+        checkRectifyList(obj).then(response => {
+          this.total = response.total;
+          this.tableList = response.rows;
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -169,10 +194,8 @@
         this.$set(this,'queryParams',{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          timeType:0,
-          searchValue:"",
-          data1:""
+          deptId:'',
+          searchValue:'',
         });
         this.handleQuery();
       },
@@ -188,6 +211,12 @@
         this.selectedNum = selection.length;
         this.ids = selection.map(item => item.id)
       },
+      //获取学院列表
+      listDepartments(){
+        listDepartments().then(response => {
+          this.deptSelectList = response.data;
+        });
+      },
     },
   }
 </script>

+ 5 - 6
src/views/safetyCheck/schoolInspection/inspectionPlan/index.vue

@@ -101,6 +101,7 @@
   import addDialog from './addDialog.vue'
   import listPage from './listPage.vue'
   import lookDocumentListDialog from '@/components/lookDocumentDialog/lookDocumentListDialog.vue'
+  import { checkPlanList } from '@/api/safetyCheck/index'
   export default {
     name: 'index',
     components: {
@@ -184,12 +185,10 @@
       },
       //获取数据列表
       getList(){
-        // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
-        // this.queryParamsData.type = 'RFID_RECOGNIZER';
-        // listHardware(this.queryParamsData).then(response => {
-        //   this.total = response.total;
-        //   this.tableList = response.rows;
-        // });
+        checkPlanList(this.queryParamsData).then(response => {
+          this.total = response.total;
+          this.tableList = response.rows;
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {

+ 144 - 80
src/views/safetyCheck/snapshotManagement/index.vue

@@ -5,21 +5,21 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
           <div class="form-button-max-big-box">
             <div class="form-button-big-box" style="margin-left:10px;">
-              <div :class="queryParams.buttonType==1?'checkDiv':''" @click="topLeftClickType(1)">
+              <div :class="queryParams.rectifyStatus===''?'checkDiv':''" @click="topLeftClickType('')">
                 <p class="text-p">全部</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==1"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===''"></p>
               </div>
-              <div :class="queryParams.buttonType==2?'checkDiv':''" @click="topLeftClickType(2)">
+              <div :class="queryParams.rectifyStatus===0?'checkDiv':''" @click="topLeftClickType(0)">
                 <p class="text-p">待整改</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==2"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===0"></p>
               </div>
-              <div :class="queryParams.buttonType==3?'checkDiv':''" @click="topLeftClickType(3)">
+              <div :class="queryParams.rectifyStatus===1?'checkDiv':''" @click="topLeftClickType(1)">
                 <p class="text-p">已整改</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==3"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===1"></p>
               </div>
-              <div :class="queryParams.buttonType==4?'checkDiv':''" @click="topLeftClickType(4)">
+              <div :class="queryParams.rectifyStatus===2?'checkDiv':''" @click="topLeftClickType(2)">
                 <p class="text-p">暂无法整改</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==4"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===2"></p>
               </div>
             </div>
           </div>
@@ -29,16 +29,15 @@
               v-model="queryParams.searchValue"
               placeholder="实验室/房间号/上报人"
               clearable
-              style="width: 180px"
-            />
+              style="width: 180px"/>
           </el-form-item>
           <el-form-item label="学院" prop="deptId" label-width="50px">
             <el-select v-model="queryParams.deptId" clearable placeholder="学院" style="width: 150px">
               <el-option
                 v-for="item in deptSelectList"
-                :key="item.key"
-                :label="item.label"
-                :value="item.key">
+                :key="item.deptId"
+                :label="item.deptName"
+                :value="item.deptId">
               </el-option>
             </el-select>
           </el-form-item>
@@ -62,7 +61,7 @@
           <el-form-item style="float: right;">
             <el-col :span="1.5">
               <p class="inquire-button-one"
-                 style="width:100px;"
+                 style="width:100px;margin-right:0;"
                  @click="addButton"
               ><i class="el-icon-plus"></i> 随手拍</p>
             </el-col>
@@ -81,14 +80,18 @@
         <el-table  border :data="tableList" ref="multipleTable" @sort-change="sortChange">
           <el-table-column label="序号" align="center"  type="index" width="60" />
           <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip/>
-          <el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip width="220"/>
-          <el-table-column label="安全责任人" align="center" prop="deptName" show-overflow-tooltip width="120"/>
-          <el-table-column label="上报人" align="center" prop="deptName" show-overflow-tooltip width="90"/>
-          <el-table-column label="上报时间" sortable align="center" prop="deptName" show-overflow-tooltip width="157"/>
-          <el-table-column label="隐患描述" align="center" prop="deptName" show-overflow-tooltip width="280"/>
-          <el-table-column label="整改人" align="center" prop="deptName" show-overflow-tooltip width="100"/>
-          <el-table-column label="整改时间" sortable align="center" prop="deptName" show-overflow-tooltip width="157"/>
-          <el-table-column label="整改状态" align="center" prop="deptName" show-overflow-tooltip width="120"/>
+          <el-table-column label="实验室" align="center" prop="subName" show-overflow-tooltip width="220"/>
+          <el-table-column label="安全责任人" align="center" prop="safetyPeople" show-overflow-tooltip width="120"/>
+          <el-table-column label="上报人" align="center" prop="createName" show-overflow-tooltip width="90"/>
+          <el-table-column label="上报时间" sortable="custom" align="center" prop="createTime" show-overflow-tooltip width="157"/>
+          <el-table-column label="隐患描述" align="center" prop="hazardDescribe" show-overflow-tooltip width="280"/>
+          <el-table-column label="整改人" align="center" prop="rectifyPeople" show-overflow-tooltip width="100"/>
+          <el-table-column label="整改时间" sortable="custom" align="center" prop="rectifyTime" show-overflow-tooltip width="157"/>
+          <el-table-column label="整改状态" align="center" prop="rectifyStatus" show-overflow-tooltip width="120">
+            <template slot-scope="scope">
+              {{scope.row.rectifyStatus==0?'待整改':(scope.row.rectifyStatus==1?'已整改':(scope.row.rectifyStatus==2?'暂无法整改':''))}}
+            </template>
+          </el-table-column>
           <el-table-column label="操作" align="center" prop="deptName" width="70">
             <template slot-scope="scope">
               <div class="table-button-box">
@@ -102,38 +105,35 @@
                     :total="total"
                     :page.sync="queryParams.pageNum"
                     :limit.sync="queryParams.pageSize"
-                    @pagination="getList"
-        />
+                    @pagination="getList"/>
       </div>
     </div>
     <listPage v-if="pageType == 2"></listPage>
-    <infoPage v-if="pageType == 3"></infoPage>
+    <infoPage v-if="pageType == 3" :infoPropsData="infoPropsData"></infoPage>
     <el-dialog class="safetyHazard-info-dialog-box" @close="outDialog"
                title="随手拍上报" :visible.sync="addDialogType" v-if="addDialogType"
                width="787px" append-to-body>
       <div>
-        <el-form  :model="addDialogForm" :rules="rules" label-width="140px">
+        <el-form  ref="addDialogForm" :model="addDialogForm" :rules="rules" label-width="140px">
           <el-form-item label="学院:" prop="deptId">
-            <el-select v-model="addDialogForm.deptId" placeholder="请选择学院" style="width:548px;">
+            <el-select v-model="addDialogForm.deptId" @change="dialogDeptChange" placeholder="请选择学院" style="width:548px;">
               <el-option
-                v-for="item in dialogDeptOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value">
+                v-for="item in deptSelectList"
+                :key="item.deptId"
+                :label="item.deptName"
+                :value="item.deptId">
               </el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="实验室:" prop="subId">
             <el-select
               style="width:548px;"
-              v-model="addDialogForm.subjectId"
+              v-model="addDialogForm.subId"
               filterable
               remote
-              clearable
-              @focus="selectFocus"
               reserve-keyword
-              @clear="clearClick"
               placeholder="搜索选择实验室"
+              @change="dialogSubChange"
               :remote-method="getSelectList"
               :loading="dialogLoading">
               <el-option
@@ -144,21 +144,21 @@
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="隐患描述:" prop="text">
+          <el-form-item label="隐患描述:" prop="hazardDescribe">
             <el-input
               type="textarea"
               :autosize="{ minRows: 4, maxRows: 4}"
               placeholder="请输入隐患描述"
-              v-model="addDialogForm.text"
+              v-model="addDialogForm.hazardDescribe"
               maxlength="100"
               resize="none"
               show-word-limit
               style="width:548px;">
             </el-input>
           </el-form-item>
-          <el-form-item label="隐患照片:" prop="imgList">
-            <div class="snapshotManagement-for-img-box" v-for="(img,imgIndex) in addDialogForm.imgList" :key="imgIndex">
-              <img class="for-img" :src="img.url">
+          <el-form-item label="隐患照片:" prop="imgDtoList">
+            <div class="snapshotManagement-for-img-box" v-for="(img,imgIndex) in addDialogForm.imgDtoList" :key="imgIndex">
+              <img class="for-img" :src="img.fileUrl">
               <p class="for-del-button el-icon-circle-close" @click="delImg(imgIndex)"></p>
             </div>
             <el-upload
@@ -178,7 +178,7 @@
       <div slot="footer" class="dialog-footer dialog-footer-box" style="display: flex">
         <p class="dialog-footer-button-null"></p>
         <p class="dialog-footer-button-info" @click="outDialog">取消</p>
-        <p class="dialog-footer-button-primary">确定</p>
+        <p class="dialog-footer-button-primary" @click="upDialogButton">确定</p>
         <p class="dialog-footer-button-null"></p>
       </div>
     </el-dialog>
@@ -186,6 +186,9 @@
 </template>
 
 <script>
+  import { securityCheckClapList,checkClapAdd } from '@/api/safetyCheck/index'
+  import { getNoAdminSubjectListNopage } from "@/api/laboratory/subject";
+  import { listDepartments } from "@/api/system/dept";
   import listPage from './listPage.vue'
   import infoPage from './infoPage.vue'
   import { getToken } from "@/utils/auth";
@@ -206,10 +209,11 @@
         queryParams:{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          timeType:0,
-          searchValue:"",
-          data1:""
+          deptId:'',
+          searchValue:'',
+          rectifyStatus:'',
+          upTimeOrder:"",
+          zgTimeOrder:"",
         },
         dateRange:[],
         tableList:[{}],
@@ -218,9 +222,11 @@
         addDialogType:false,
         addDialogForm:{
           deptId:"",
+          deptName:"",
           subId:"",
-          text:"",
-          imgList:[],
+          subName:"",
+          hazardDescribe:"",
+          imgDtoList:[],
         },
         rules:{
           deptId: [
@@ -229,7 +235,7 @@
           subId: [
             { required: true, message: "请选择实验室", trigger: "change" },
           ],
-          imgList: [
+          imgDtoList: [
             { required: true, message: "请上传隐患照片", trigger: "change" },
           ],
         },
@@ -238,13 +244,16 @@
         dialogSubList:[],
         dialogSubListData:[],
         suffixName:"",
+        //详情
+        infoPropsData:{}
       }
     },
     created(){
 
     },
     mounted(){
-
+      this.listDepartments();
+      this.getList();
     },
     methods:{
       goPage(type,data){
@@ -254,33 +263,50 @@
           } else if(type==2){
             this.$set(this,'pageType',type);
           } else if(type==3){
+            this.$set(this,'infoPropsData',data);
             this.$set(this,'pageType',type);
           } else if(type==4){
-            this.$set(this,'pageType',type);
+            this.$set(this,'pageType',1);
+            this.getList();
           }
         }
       },
       //范围选择
       topLeftClickType(type){
-        if(this.queryParams.buttonType != type){
-          this.$set(this.queryParams,'buttonType',type);
+        if(this.queryParams.rectifyStatus !== type){
+          this.$set(this.queryParams,'rectifyStatus',type);
           this.getList();
         }
       },
       //时间排序方法
       sortChange(val){
-        //ascending 上    descending 下    null  无
-        console.log('val',val.order)
-        this.$set(this.queryParams,'timeType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+        if(val.prop == 'rectifyTime'){
+          this.$set(this.queryParams,'zgTimeOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
+          this.$set(this.queryParams,'upTimeOrder','');
+          this.getList();
+        }else if(val.prop == 'createTime'){
+          this.$set(this.queryParams,'upTimeOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
+          this.$set(this.queryParams,'zgTimeOrder','');
+          this.getList();
+        }
       },
       //获取数据列表
       getList(){
-        // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
-        // this.queryParamsData.type = 'RFID_RECOGNIZER';
-        // listHardware(this.queryParamsData).then(response => {
-        //   this.total = response.total;
-        //   this.tableList = response.rows;
-        // });
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.beginTime = this.dateRange[0]
+        }else{
+          obj.beginTime = ""
+        }
+        if(this.dateRange[1]){
+          obj.endTime = this.dateRange[1]
+        }else{
+          obj.endTime = ""
+        }
+        securityCheckClapList(obj).then(response => {
+          this.total = response.total;
+          this.tableList = response.rows;
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -293,16 +319,17 @@
         this.$set(this,'queryParams',{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          timeType:0,
-          searchValue:"",
-          data1:""
+          deptId:'',
+          searchValue:'',
+          rectifyStatus:'',
+          upTimeOrder:"",
+          zgTimeOrder:"",
         });
         this.handleQuery();
       },
       /*==========上传相关==========*/
       handleAvatarSuccess(res) {
-        if(this.addDialogForm.imgList.length>4){
+        if(this.addDialogForm.imgDtoList.length>4){
           this.msgError('最多只可上传5张')
           return
         }
@@ -314,14 +341,14 @@
           return
         }
         let obj ={
-          name:this.upDataName,
-          url:res.data.url,
+          fileName:this.upDataName,
+          fileUrl:res.data.url,
         };
-        this.addDialogForm.imgList.push(obj);
+        this.addDialogForm.imgDtoList.push(obj);
         this.$forceUpdate()
       },
       beforeAvatarUpload(file) {
-        if(this.addDialogForm.imgList.length>4){
+        if(this.addDialogForm.imgDtoList.length>4){
           this.msgError('最多只可上传5张')
           return false
         }
@@ -341,30 +368,61 @@
       },
       //删除照片
       delImg(imgIndex){
-        this.addDialogForm.imgList.splice(imgIndex,1);
+        this.addDialogForm.imgDtoList.splice(imgIndex,1);
       },
       /**************** 新增窗口 ******************/
+      //提交
+      upDialogButton(){
+        this.$refs["addDialogForm"].validate(valid => {
+          if (valid) {
+            checkClapAdd(this.addDialogForm).then(response => {
+              this.msgSuccess(response.msg);
+              this.outDialog();
+              this.getList();
+            });
+          }
+        })
+      },
       addButton(){
         this.$set(this,'addDialogForm',{
           deptId:"",
+          deptName:"",
           subId:"",
-          text:"",
-          imgList:[],
+          subName:"",
+          hazardDescribe:"",
+          imgDtoList:[],
         });
         this.$set(this,'addDialogType',true);
       },
       outDialog(){
         this.$set(this,'addDialogType',false);
       },
-      //搜索实验室相关
-      selectFocus(){
-        if(!this.dialogSubList[0]){
-
+      //选中院系
+      dialogDeptChange(val){
+        let self = this;
+        let obj = {
+          deptId:val,
         }
+        getNoAdminSubjectListNopage(obj).then(response => {
+          this.$set(this,'dialogSubListData',response.data);
+          this.$set(this,'dialogSubList',response.data);
+          for(let i=0;i<self.deptSelectList.length;i++){
+            if(val == self.deptSelectList[i].deptId){
+              self.$set(self.addDialogForm,'deptName',self.deptSelectList[i].deptName);
+            }
+          }
+          this.$set(this.addDialogForm,'subId','');
+          this.$set(this.addDialogForm,'subName','');
+        });
       },
-      //实验室选中清除
-      clearClick(){
-        this.dialogSubList = JSON.parse(JSON.stringify(this.dialogSubListData))
+      //实验室选中
+      dialogSubChange(val){
+        let self = this;
+        for(let i=0;i<self.dialogSubList.length;i++){
+          if(val == self.dialogSubList[i].id){
+            self.$set(self.addDialogForm,'subName',self.dialogSubList[i].name);
+          }
+        }
       },
       /** 实验室-本地懒加载 */
       getSelectList(val) {
@@ -377,6 +435,12 @@
         }
         this.dialogSubList = JSON.parse(JSON.stringify(list))
       },
+      //获取学院列表
+      listDepartments(){
+        listDepartments().then(response => {
+          this.deptSelectList = response.data;
+        });
+      },
     }
   }
 </script>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 70 - 56
src/views/safetyCheck/snapshotManagement/infoPage.vue


+ 88 - 44
src/views/safetyCheck/snapshotManagement/listPage.vue

@@ -5,21 +5,21 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
           <div class="form-button-max-big-box">
             <div class="form-button-big-box" style="margin-left:10px;">
-              <div :class="queryParams.buttonType==1?'checkDiv':''" @click="topLeftClickType(1)">
+              <div :class="queryParams.rectifyStatus===''?'checkDiv':''" @click="topLeftClickType('')">
                 <p class="text-p">全部</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==1"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===''"></p>
               </div>
-              <div :class="queryParams.buttonType==2?'checkDiv':''" @click="topLeftClickType(2)">
+              <div :class="queryParams.rectifyStatus===0?'checkDiv':''" @click="topLeftClickType(0)">
                 <p class="text-p">待整改</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==2"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===0"></p>
               </div>
-              <div :class="queryParams.buttonType==3?'checkDiv':''" @click="topLeftClickType(3)">
+              <div :class="queryParams.rectifyStatus===1?'checkDiv':''" @click="topLeftClickType(1)">
                 <p class="text-p">已整改</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==3"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===1"></p>
               </div>
-              <div :class="queryParams.buttonType==4?'checkDiv':''" @click="topLeftClickType(4)">
+              <div :class="queryParams.rectifyStatus===2?'checkDiv':''" @click="topLeftClickType(2)">
                 <p class="text-p">暂无法整改</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==4"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===2"></p>
               </div>
             </div>
           </div>
@@ -36,9 +36,9 @@
             <el-select v-model="queryParams.deptId" clearable placeholder="学院" style="width: 150px">
               <el-option
                 v-for="item in deptSelectList"
-                :key="item.key"
-                :label="item.label"
-                :value="item.key">
+                :key="item.deptId"
+                :label="item.deptName"
+                :value="item.deptId">
               </el-option>
             </el-select>
           </el-form-item>
@@ -62,7 +62,7 @@
           <el-form-item style="float: right;">
             <el-col :span="1.5">
               <p class="add-button-one-90"
-                 style="width:100px;"
+                 style="width:100px;font-weight:500;"
                  @click="outButton"
               >返回</p>
             </el-col>
@@ -73,18 +73,22 @@
         <el-table  border :data="tableList" ref="multipleTable" @sort-change="sortChange">
           <el-table-column label="序号" align="center"  type="index" width="60" />
           <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip/>
-          <el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip width="220"/>
-          <el-table-column label="安全责任人" align="center" prop="deptName" show-overflow-tooltip width="120"/>
-          <el-table-column label="上报人" align="center" prop="deptName" show-overflow-tooltip width="90"/>
-          <el-table-column label="上报时间" sortable align="center" prop="deptName" show-overflow-tooltip width="157"/>
-          <el-table-column label="隐患描述" align="center" prop="deptName" show-overflow-tooltip width="280"/>
-          <el-table-column label="整改人" align="center" prop="deptName" show-overflow-tooltip width="100"/>
-          <el-table-column label="整改时间" sortable align="center" prop="deptName" show-overflow-tooltip width="157"/>
-          <el-table-column label="整改状态" align="center" prop="deptName" show-overflow-tooltip width="120"/>
+          <el-table-column label="实验室" align="center" prop="subName" show-overflow-tooltip width="220"/>
+          <el-table-column label="安全责任人" align="center" prop="safetyPeople" show-overflow-tooltip width="120"/>
+          <el-table-column label="上报人" align="center" prop="createName" show-overflow-tooltip width="90"/>
+          <el-table-column label="上报时间" sortable="custom" align="center" prop="createTime" show-overflow-tooltip width="157"/>
+          <el-table-column label="隐患描述" align="center" prop="hazardDescribe" show-overflow-tooltip width="280"/>
+          <el-table-column label="整改人" align="center" prop="rectifyPeople" show-overflow-tooltip width="100"/>
+          <el-table-column label="整改时间" sortable="custom" align="center" prop="rectifyTime" show-overflow-tooltip width="157"/>
+          <el-table-column label="整改状态" align="center" prop="rectifyStatus" show-overflow-tooltip width="120">
+            <template slot-scope="scope">
+              {{scope.row.rectifyStatus==0?'待整改':(scope.row.rectifyStatus==1?'已整改':(scope.row.rectifyStatus==2?'暂无法整改':''))}}
+            </template>
+          </el-table-column>
           <el-table-column label="操作" align="center" prop="deptName" width="70">
             <template slot-scope="scope">
               <div class="table-button-box">
-                <p class="table-button-p" @click="goPage(2,scope.row)">详情</p>
+                <p class="table-button-p" @click="goPage(3,scope.row)">详情</p>
               </div>
             </template>
           </el-table-column>
@@ -98,11 +102,13 @@
         />
       </div>
     </div>
-    <infoPage v-if="infoPageType == 2"></infoPage>
+    <infoPage v-if="infoPageType == 3" :infoPropsData="infoPropsData"></infoPage>
   </div>
 </template>
 
 <script>
+  import { listDepartments } from "@/api/system/dept";
+  import { checkClapMylist } from '@/api/safetyCheck/index'
   import infoPage from './infoPage.vue'
   export default {
     name: 'listPage',
@@ -116,26 +122,42 @@
         queryParams:{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          timeType:0,
-          searchValue:"",
-          data1:""
+          deptId:'',
+          searchValue:'',
+          rectifyStatus:'',
+          upTimeOrder:"",
+          zgTimeOrder:"",
         },
         dateRange:[],
         tableList:[{}],
         total:0,
+        //详情
+        infoPropsData:{}
       }
     },
     created(){
 
     },
     mounted(){
-
+      this.listDepartments();
+      this.getList();
     },
     methods:{
       //详情按钮
-      goPage(type){
-        this.$set(this,'infoPageType',type);
+      goPage(type,data){
+        if(this.infoPageType != type){
+          if (type==1){
+            this.$set(this,'infoPageType',type);
+          } else if(type==2){
+            this.$set(this,'infoPageType',type);
+          } else if(type==3){
+            this.$set(this,'infoPropsData',data);
+            this.$set(this,'infoPageType',type);
+          } else if(type==4){
+            this.$set(this,'infoPageType',1);
+            this.getList();
+          }
+        }
       },
       //返回按钮
       outButton(){
@@ -143,25 +165,40 @@
       },
       //范围选择
       topLeftClickType(type){
-        if(this.queryParams.buttonType != type){
-          this.$set(this.queryParams,'buttonType',type);
+        if(this.queryParams.rectifyStatus !== type){
+          this.$set(this.queryParams,'rectifyStatus',type);
           this.getList();
         }
       },
       //时间排序方法
       sortChange(val){
-        //ascending 上    descending 下    null  无
-        console.log('val',val.order)
-        this.$set(this.queryParams,'timeType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+        if(val.prop == 'rectifyTime'){
+          this.$set(this.queryParams,'zgTimeOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
+          this.$set(this.queryParams,'upTimeOrder','');
+          this.getList();
+        }else if(val.prop == 'createTime'){
+          this.$set(this.queryParams,'upTimeOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
+          this.$set(this.queryParams,'zgTimeOrder','');
+          this.getList();
+        }
       },
       //获取数据列表
       getList(){
-        // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
-        // this.queryParamsData.type = 'RFID_RECOGNIZER';
-        // listHardware(this.queryParamsData).then(response => {
-        //   this.total = response.total;
-        //   this.tableList = response.rows;
-        // });
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.beginTime = this.dateRange[0]
+        }else{
+          obj.beginTime = ""
+        }
+        if(this.dateRange[1]){
+          obj.endTime = this.dateRange[1]
+        }else{
+          obj.endTime = ""
+        }
+        checkClapMylist(obj).then(response => {
+          this.total = response.total;
+          this.tableList = response.rows;
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -174,13 +211,20 @@
         this.$set(this,'queryParams',{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          timeType:0,
-          searchValue:"",
-          data1:""
+          deptId:'',
+          searchValue:'',
+          rectifyStatus:'',
+          upTimeOrder:"",
+          zgTimeOrder:"",
         });
         this.handleQuery();
       },
+      //获取学院列表
+      listDepartments(){
+        listDepartments().then(response => {
+          this.deptSelectList = response.data;
+        });
+      },
     }
   }
 </script>

+ 3 - 2
src/views/safetyCheck/worktable/coverageRateEcharts.vue

@@ -5,7 +5,7 @@
 
 <script>
   import echarts from 'echarts'
-  import { yearRate } from '@/api/safetyCheck/index.js'
+  import { yearRate } from '@/api/safetyCheck/index'
   export default {
     name: 'coverageRateEcharts',
     data(){
@@ -171,7 +171,8 @@
                       }
                     },
                   textStyle: {
-                    fontSize: 12
+                    fontSize: 12,
+                    color:'#333'
                   },
                   padding: [0, -60, 26, -60],
                 }

+ 21 - 9
src/views/safetyCheck/worktable/hiddenDangerStatisticsEcharts.vue

@@ -13,27 +13,40 @@
 
 <script>
   import echarts from 'echarts'
-  import { hiddenCountByType, collegCheckHiddenCountByType } from '@/api/safetyCheck/index.js'
+  import { hiddenCountByType, collegCheckHiddenCountByType,isSCollege } from '@/api/safetyCheck/index'
   export default {
     name: 'hiddenDangerStatisticsEcharts',
     data(){
       return{
         hdLevel:1,
+        userFlg:true,
       }
     },
     created(){
 
     },
     mounted(){
-      this.schoolEcharts();
-      // this.departmentEcharts();
+      this.isSCollege();
     },
     methods:{
+      isSCollege(){
+        isSCollege().then(response => {
+          this.$set(this,'userFlg',response.data.userFlg);
+          if(this.userFlg){
+            this.departmentEcharts();
+          }else{
+            this.schoolEcharts();
+          }
+        })
+      },
       titleButtonClick(type){
         if(this.hdLevel != type){
           this.$set(this,'hdLevel',type);
-          this.schoolEcharts();
-          // this.departmentEcharts();
+          if(this.userFlg){
+            this.departmentEcharts();
+          }else{
+            this.schoolEcharts();
+          }
         }
       },
       schoolEcharts(){
@@ -77,7 +90,8 @@
                   normal: {
                     formatter: '{b}\n隐患{c}\t占比{d}%',
                     textStyle: {
-                      fontSize: 12
+                      fontSize: 12,
+                      color:'#333'
                     },
                     padding: [0, -110, 26, -110],
                   }
@@ -92,7 +106,7 @@
                 itemStyle: {
                   normal: {
                     color: function (colors) {
-                      var colorList = ['#009DFF', '#FFA200', '#FF2A00', '#A069FF', '#41BE26', '#2758E0', '#39dbed', '#ff5e86','#a52a2a','#4682b4','#9400d3'];
+                      var colorList = ['#0183FA', '#A069FF', '#80C459', '#FFA200', '#39DBED', '#FF2A00', '#009DFF', '#41BE26', '#2758E0', '#FFE019', '#FF5E86'];
                       return colorList[colors.dataIndex];
                     }
                   },
@@ -128,8 +142,6 @@
             tooltip: {
               trigger: 'axis',
               formatter: params => {
-                console.log('params',params)
-                console.log('dataIndex',params[0].dataIndex)
                 return data.nameText[params[0].dataIndex] +' 隐患:'+ data.num[params[0].dataIndex]
                 // return `${params.data.nameText} 隐患:${params.data.value} 占比:${params.percent}%`
               },

+ 9 - 9
src/views/safetyCheck/worktable/index.vue

@@ -7,7 +7,7 @@
           <img src="@/assets/ZDimages/safetyCheck/icon_gzt_xyxc.png">
           <div>
             <p>校院巡查</p>
-            <el-tooltip class="item" effect="dark" :content="':'+schoolWorkData.subCount" placement="top">
+            <el-tooltip class="item" effect="dark" :content="'校院巡查总数:'+schoolWorkData.subCount" placement="top">
               <p>{{schoolWorkData.subCount}}</p>
             </el-tooltip>
           </div>
@@ -15,13 +15,13 @@
         <div class="right-min-box">
           <div>
             <img src="@/assets/ZDimages/safetyCheck/icon_gzt_aqyh.png">
-            <el-tooltip class="item" effect="dark" :content="':'+schoolWorkData.yhCount" placement="top">
+            <el-tooltip class="item" effect="dark" :content="'发现隐患数:'+schoolWorkData.yhCount" placement="top">
               <p>{{schoolWorkData.yhCount}}</p>
             </el-tooltip>
           </div>
           <div>
             <img src="@/assets/ZDimages/safetyCheck/icon_gzt_yjcsys.png">
-            <el-tooltip class="item" effect="dark" :content="':'+schoolWorkData.xcCount" placement="top">
+            <el-tooltip class="item" effect="dark" :content="'涉及实验室数:'+schoolWorkData.xcCount" placement="top">
               <p>{{schoolWorkData.xcCount}}</p>
             </el-tooltip>
           </div>
@@ -33,7 +33,7 @@
           <img src="@/assets/ZDimages/safetyCheck/icon_gzt_syszc.png">
           <div>
             <p>实验室自查</p>
-            <el-tooltip class="item" effect="dark" :content="':'+schoolWorkSubData.subCount" placement="top">
+            <el-tooltip class="item" effect="dark" :content="'实验室自查总数:'+schoolWorkSubData.subCount" placement="top">
               <p>{{schoolWorkSubData.subCount}}</p>
             </el-tooltip>
           </div>
@@ -41,13 +41,13 @@
         <div class="right-min-box">
           <div>
             <img src="@/assets/ZDimages/safetyCheck/icon_gzt_aqyh.png">
-            <el-tooltip class="item" effect="dark" :content="':'+schoolWorkSubData.zcCount" placement="top">
+            <el-tooltip class="item" effect="dark" :content="'发现隐患数:'+schoolWorkSubData.zcCount" placement="top">
               <p>{{schoolWorkSubData.zcCount}}</p>
             </el-tooltip>
           </div>
           <div>
             <img src="@/assets/ZDimages/safetyCheck/icon_gzt_yjcsys.png">
-            <el-tooltip class="item" effect="dark" :content="':'+schoolWorkSubData.yhCount" placement="top">
+            <el-tooltip class="item" effect="dark" :content="'涉及实验室数:'+schoolWorkSubData.yhCount" placement="top">
               <p>{{schoolWorkSubData.yhCount}}</p>
             </el-tooltip>
           </div>
@@ -77,14 +77,14 @@
           <div class="hidden-danger-big-box">
             <div class="hidden-danger-min-box">
               <img src="@/assets/ZDimages/safetyCheck/icon_gzt_gjyh_2.png">
-              <el-tooltip class="item" effect="dark" :content="'全校所有未整改隐患总数:'+hiddenCountData.hiddenCount" placement="top">
+              <el-tooltip class="item" effect="dark" :content="'未整改隐患总数:'+hiddenCountData.hiddenCount" placement="top">
                 <p>共计{{hiddenCountData.hiddenCount}}项隐患</p>
               </el-tooltip>
             </div>
             <p class="center-null-p"></p>
             <div class="hidden-danger-min-box">
               <img src="@/assets/ZDimages/safetyCheck/icon_gzt_sjsys_2.png">
-              <el-tooltip class="item" effect="dark" :content="'涉及实验室总数:'+hiddenCountData.subjectCount" placement="top">
+              <el-tooltip class="item" effect="dark" :content="'隐患涉及实验室总数:'+hiddenCountData.subjectCount" placement="top">
                 <p>涉及{{hiddenCountData.subjectCount}}个实验室</p>
               </el-tooltip>
             </div>
@@ -157,7 +157,7 @@
 </template>
 
 <script>
-  import { schoolWorkCheck, schoolWorkSubCheck, hiddenCount, hiddenDangerRectify } from '@/api/safetyCheck/index.js'
+  import { schoolWorkCheck, schoolWorkSubCheck, hiddenCount, hiddenDangerRectify } from '@/api/safetyCheck/index'
   import toDoListBox from './toDoListBox.vue'
   import worktableButtonBox from './worktableButtonBox.vue'
   import coverageRateEcharts from './coverageRateEcharts.vue'

+ 1 - 1
src/views/safetyCheck/worktable/inspectionStatisticsEcharts.vue

@@ -3,7 +3,7 @@
 </template>
 
 <script>
-  import { checkStatistics } from '@/api/safetyCheck/index.js'
+  import { checkStatistics } from '@/api/safetyCheck/index'
   export default {
     name: 'inspectionStatisticsEcharts',
     data(){

+ 1 - 1
src/views/safetyCheck/worktable/toDoListBox.vue

@@ -51,7 +51,7 @@
 </template>
 
 <script>
-  import { todoList, tobeReviewed } from '@/api/safetyCheck/index.js'
+  import { todoList, tobeReviewed } from '@/api/safetyCheck/index'
   export default {
     name: 'toDoListBox',
     data(){