dedsudiyu 11 달 전
부모
커밋
00788bc8cd

+ 99 - 11
src/api/safetyCheck/indexTow.js

@@ -28,6 +28,15 @@ export function getFindByCheckPlanId(query) {
     params: query
   })
 }
+//检查计划-根据计划ID查询管理列表
+//自查任务-根据计划ID查询管理列表
+export function findByCheckPlanId(data) {
+  return request({
+    url: '/zd-security/checkManage/findByCheckPlanId',
+    method: 'post',
+    data: data
+  })
+}
 // 查询校级下实验室数量
 export function laboratorySubRelInfoGetAllSubNum(query) {
   return request({
@@ -100,7 +109,7 @@ export function findCheckPlan(query) {
 export function checkPlanUpdate(data) {
   return request({
     url: '/zd-security/checkPlan/update',
-    method: 'put',
+    method: 'post',
     data: data
   })
 }
@@ -125,20 +134,11 @@ export function getHistoryPlanTitles(query) {
 //工作台-查询是否院级用户
 export function isSCollege(query) {
   return request({
-    url: '/security/collegCheck/isSCollege',
+    url: '/zd-security/collegCheck/isSCollege',
     method: 'get',
     params: query
   })
 }
-
-//校院巡察组-获取巡察组下拉列表
-export function findGroupList(data) {
-  return request({
-    url: '/zd-security/checkGroup/findGroupList',
-    method: 'post',
-    data: data
-  })
-}
 //检查计划-根据ID隐藏历史标题
 export function hideHistoryPlanTitle(query) {
   return request({
@@ -155,3 +155,91 @@ export function haveHazardInSub(data) {
     data: data
   })
 }
+//项目检查库-树状列表
+export function checkOptionList(query) {
+  return request({
+    url: '/zd-security/checkOption/list',
+    method: 'get',
+    params: query
+  })
+}
+//检查计划-查询管理详情接口
+//自查任务-查询管理详情接口
+//自查任务-查询管理计划详情接口
+//自查任务-查询管理任务详情接口
+export function findCheckManage(query) {
+  return request({
+    url: '/zd-security/checkManage/findCheckManage',
+    method: 'get',
+    params: query
+  })
+}
+//检查计划-查询管理保存/提交
+//自查任务-查询管理保存/提交
+export function checkManageUpdate(data) {
+  return request({
+    url: '/zd-security/checkManage/update',
+    method: 'put',
+    data: data
+  })
+}
+//通用接口-查询检查项再特定实验室发生历史次数
+export function countHazardNum(query) {
+  return request({
+    url: '/zd-security/checkHazard/countHazardNum',
+    method: 'get',
+    params: query
+  })
+}
+
+/***************************校院巡察组***************************/
+//校院巡察组-启用-停用巡查组
+export function checkGroupEnable(query) {
+  return request({
+    url: '/zd-security/checkGroup/enable',
+    method: 'put',
+    params: query
+  })
+}
+//校院巡察组-通过id删除巡查组
+export function checkGroupDelete(query) {
+  return request({
+    url: '/zd-security/checkGroup/delete',
+    method: 'delete',
+    params: query
+  })
+}
+//校院巡察组-分页获取校院巡查组列表
+export function checkGroupList(data) {
+  return request({
+    url: '/zd-security/checkGroup/list',
+    method: 'post',
+    data: data
+  })
+}
+//校院巡察组-新增
+export function checkGroupAdd(data) {
+  return request({
+    url: '/zd-security/checkGroup/add',
+    method: 'post',
+    data: data
+  })
+}
+
+//校院巡察组-编辑
+export function checkGroupUpdate(data) {
+  return request({
+    url: '/zd-security/checkGroup/update',
+    method: 'put',
+    data: data
+  })
+}
+
+//校院巡察组-获取巡察组下拉列表
+export function findGroupList(data) {
+  return request({
+    url: '/zd-security/checkGroup/findGroupList',
+    method: 'post',
+    data: data
+  })
+}

+ 19 - 0
src/api/systemManagement/index.js

@@ -484,3 +484,22 @@ export function systemUserFaceUpdate(data) {
     data: data
   })
 }
+
+/********************************* 电子签章 *********************************/
+
+// 查询部门电子签章列表
+export function signList(query) {
+  return request({
+    url: '/system/dept/sign/list',
+    method: 'get',
+    params: query
+  })
+}
+// 编辑电子签章
+export function deptSign(data) {
+  return request({
+    url: '/system/dept/sign',
+    method: 'put',
+    data: data
+  })
+}

+ 110 - 17
src/components/lookDocumentDialog/lookDocumentListDialog.vue

@@ -26,7 +26,7 @@
   <el-dialog class="lookDocumentListDialog" :title="lookDocumentListTitle"
              :visible.sync="lookDocumentListType" v-if="lookDocumentListType"
              @close="outLook"
-             width="1300px" height="700" append-to-body>
+             width="1500px" height="700" append-to-body>
     <div class="lookDocumentListDialog-page">
       <div class="left-box">
         <div class="left-title-box">
@@ -42,12 +42,25 @@
       </div>
       <div class="center-border"></div>
       <div class="right-box">
-        <iframe
-          v-if="lookDocumentSrc"
-          class="iframe"
-          :src="lookDocumentSrc" scrolling="auto" frameborder="0">
-        </iframe>
-        <p class="positionButton" @click="goPage">全屏</p>
+        <vue-office-docx
+          v-if="officeType === 'docx'&&!officeNullType"
+          :src="lookUrl"
+          @rendered="renderedHandler"
+          @error="errorHandler"
+        />
+        <vue-office-excel
+          v-if="officeType === 'excel'&&!officeNullType"
+          :src="lookUrl"
+          @rendered="renderedHandler"
+          @error="errorHandler"
+        />
+        <vue-office-pdf
+          v-if="officeType === 'pdf'&&!officeNullType"
+          :src="lookUrl"
+          @rendered="renderedHandler"
+          @error="errorHandler"
+        />
+        <p v-if="officeNullType" class="office-null-text">加载失败...</p>
       </div>
     </div>
     <div slot="footer" class="dialog-footer dialog-footer-box" style="display: flex">
@@ -60,11 +73,27 @@
 </template>
 
 <script>
+  //引入VueOfficeDocx组件
+  import VueOfficeDocx from '@vue-office/docx'
+  import '@vue-office/docx/lib/index.css'
+  //引入VueOfficeExcel组件
+  import VueOfficeExcel from '@vue-office/excel'
+  import '@vue-office/excel/lib/index.css'
+  //引入VueOfficePdf组件
+  import VueOfficePdf from '@vue-office/pdf'
+  import axios from 'axios'
+  import saveAs from 'file-saver'
+  import JSZip from 'jszip'
   export default {
     name: 'lookDocumentListDialog',
     props:{
       propsLookDocumentListData:{},
     },
+    components: {
+      VueOfficeDocx,
+      VueOfficeExcel,
+      VueOfficePdf
+    },
     data(){
       return{
         lookDocumentListType:true,
@@ -72,12 +101,19 @@
         lookDocumentList:[],
         lookDocumentSrc:"",
         lookDocumentListIndex:0,
+        //文档类型
+        officeType:null,
+        //开关
+        officeNullType:true,
+        //文档地址
+        lookUrl:"",
+        fileBrowseEnvironment:window.location.href.split('://')[0]+'://'+localStorage.getItem('fileBrowseEnvironment'),
       }
     },
     created(){
       this.$set(this,'lookDocumentListTitle',this.propsLookDocumentListData.title);
       this.$set(this,'lookDocumentList',this.propsLookDocumentListData.list);
-      this.$set(this,'lookDocumentSrc',this.urlJudge(this.propsLookDocumentListData.list[0].url));
+      this.lookDocumentListCheck(0);
     },
     mounted(){
 
@@ -85,15 +121,54 @@
     methods:{
       //全部下载
       allDownloadButton(){
-        let self = this;
-        for(let i=0;i<self.lookDocumentList.length;i++){
-          this.downloadGet(this.lookDocumentList[i].url,this.lookDocumentList[i].name)
-        }
+        // 初始化一个zip打包对象
+        let zip = new JSZip()
+        var promises = [];
+        this.lookDocumentList.forEach(item => {
+          const promise = this.getFile(item.url).then(data => {
+            console.log(data)
+            zip.file(item.name, data, { binary: true });
+          });
+          promises.push(promise);
+        });
+        Promise.all(promises).then(() => {
+          zip.generateAsync({ type: "blob" }).then(content => {
+            // 生成二进制流
+            saveAs(content, '材料附件.zip')
+            this.msgSuccess('操作成功')
+          });
+        });
+      },
+      getFile(url){
+        return new Promise((resolve, reject) => {
+          axios({
+            method: "get",
+            url:this.fileBrowseEnvironment+url,
+            responseType: "blob"
+          })
+            .then(data => {
+              resolve(data.data);
+            })
+            .catch(error => {
+              reject(error.toString());
+            });
+        });
       },
       // 切换按钮
       lookDocumentListCheck(val){
+        let type = '';
+        if(this.lookDocumentList[val].name.split('.')[1] == 'docx'){
+          type = 'docx'
+        }else if(this.lookDocumentList[val].name.split('.')[1] == 'xlsx'){
+          type = 'excel'
+        }else if(this.lookDocumentList[val].name.split('.')[1] == 'pdf'){
+          type = 'pdf'
+        }
+        let url = this.fileBrowseEnvironment + this.lookDocumentList[val].url;
+        this.$set(this,'lookUrl',url);
         this.$set(this,'lookDocumentListIndex',val);
-        this.$set(this,'lookDocumentSrc',this.urlJudge(this.lookDocumentList[val].url));
+        this.$set(this,'officeType',type);
+        this.$set(this,'officeNullType',false);
       },
       // 返回按钮
       outLook(){
@@ -101,11 +176,29 @@
       },
       // 下载按钮
       downloadButton(){
-        this.downloadGet(this.lookDocumentList[this.lookDocumentListIndex].url,this.lookDocumentList[this.lookDocumentListIndex].name)
+        let name = this.lookDocumentList[this.lookDocumentListIndex].name.split('.')[0];
+        let type = this.lookDocumentList[this.lookDocumentListIndex].name.split('.')[1];
+        let url = this.fileBrowseEnvironment + this.lookDocumentList[this.lookDocumentListIndex].url;
+        const oReq = new XMLHttpRequest()
+        oReq.open('GET', url, true)// URL 为下载的URL地址
+        oReq.responseType = 'blob'
+        oReq.onload = function() {
+          const file = new Blob([oReq.response], {
+            type: 'blob'
+          })
+          saveAs(file, name+'.'+type) // fileName为文件名
+        }
+        oReq.send()
+      },
+      //文件加载成功
+      renderedHandler() {
+        console.log("渲染完成")
+        this.$set(this,'officeNullType',false);
       },
-      //打开新窗口
-      goPage(){
-        window.open(this.lookDocumentSrc)
+      //文件加载失败
+      errorHandler() {
+        console.log("渲染失败")
+        this.$set(this,'officeNullType',true);
       },
     }
   }

+ 2 - 2
src/views/safetyCheck/components/addPage/addPage.vue

@@ -2,7 +2,7 @@
   <div class="inspectionManagement-addPage" v-loading.fullscreen.lock="loading">
     <div class="title-max-box">
       <p class="title-p">{{addPageTitle}}</p>
-      <p class="title-button add-button-one-90" @click="outButton">返回</p>
+      <p class="title-button page-out-common-style-button" @click="outButton">返回</p>
       <img class="position-img" v-if="addForm.checkRange == 1" src="@/assets/ZDimages/safetyCheck/icon_xyxc_qx.png">
       <img class="position-img" v-if="addForm.checkRange == 2" src="@/assets/ZDimages/safetyCheck/icon_xyxc_xy.png">
       <img class="position-img" v-if="addForm.checkRange == 3" src="@/assets/ZDimages/safetyCheck/icon_xyxc_sys.png">
@@ -270,7 +270,7 @@
 <script>
   import { getToken } from "@/utils/auth";
   import lookImgDialog from '@/components/lookImgDialog/lookImgDialog.vue'
-  import { findCheckManage,checkOptionList,checkManageUpdate,countHazardNum } from '@/apiDemo/safetyCheck/index'
+  import { findCheckManage,checkOptionList,checkManageUpdate,countHazardNum } from '@/api/safetyCheck/indexTow'
   import { delUserHaikang } from '@/apiDemo/laboratory/subject'
   export default {
     name: 'addPage',

+ 2 - 2
src/views/safetyCheck/components/infoPage/infoPage.vue

@@ -2,7 +2,7 @@
   <div class="inspectionManagement-infoPage">
     <div class="title-max-box">
       <p class="title-p">检查详情</p>
-      <p class="title-button add-button-one-90" @click="outButton">返回</p>
+      <p class="title-button page-out-common-style-button" @click="outButton">返回</p>
       <img class="position-img" v-if="addForm.checkRange == 1" src="@/assets/ZDimages/safetyCheck/icon_xyxc_qx.png">
       <img class="position-img" v-if="addForm.checkRange == 2" src="@/assets/ZDimages/safetyCheck/icon_xyxc_xy.png">
       <img class="position-img" v-if="addForm.checkRange == 3" src="@/assets/ZDimages/safetyCheck/icon_xyxc_sys.png">
@@ -255,7 +255,7 @@
 </template>
 
 <script>
-import { checkOptionList, findCheckManage, getFindByCheckPlanId } from '@/apiDemo/safetyCheck/index'
+import { checkOptionList, findCheckManage, getFindByCheckPlanId } from '@/api/safetyCheck/indexTow'
   import lookImgDialog from '@/components/lookImgDialog/lookImgDialog.vue'
   import lookDocumentDataDialog from '@/components/lookDocumentDialog/lookDocumentDataDialog.vue'
   import lookDocumentListDialog from '@/components/lookDocumentDialog/lookDocumentListDialog.vue'

+ 184 - 138
src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/addDialog.vue

@@ -62,8 +62,8 @@
                 </el-select>
               </div>
               <div class="dialog-range-text-box">
-                <p class="inquire-button-one button-p" :style="lookInfoType?'background:#0183FA;border:1px solid #0183FA;':''" v-if="dialogForm.checkRange == 2" @click="dialogClickType(2)">{{lookInfoType?'查看':'选择学院'}}</p>
-                <p class="inquire-button-one button-p" :style="lookInfoType?'background:#0183FA;border:1px solid #0183FA;':''" v-if="dialogForm.checkRange == 3" @click="dialogClickType(3)">{{lookInfoType?'查看':'选择实验室'}}</p>
+                <p class="page-submit-common-style-button button-p" :style="lookInfoType?'background:#0183FA;border:1px solid #0183FA;':''" v-if="dialogForm.checkRange == 2" @click="dialogClickType(2)">{{lookInfoType?'查看':'选择学院'}}</p>
+                <p class="page-submit-common-style-button button-p" :style="lookInfoType?'background:#0183FA;border:1px solid #0183FA;':''" v-if="dialogForm.checkRange == 3" @click="dialogClickType(3)">{{lookInfoType?'查看':'选择实验室'}}</p>
                 <p class="text-p" v-if="dialogForm.checkRange ==1 && dialogForm.schoolSubCheckNum>0">已选择{{dialogForm.schoolSubCheckNum}}间实验室</p>
                 <p class="text-p" v-if="dialogForm.checkRange == 2 && dialogForm.collegeNum>0">已选择{{dialogForm.collegeNum}}个学院,共{{dialogForm.collegeSubNum}}间实验室</p>
                 <p class="text-p" v-if="dialogForm.checkRange ==3 && dialogForm.subCheckNum>0">已选择{{dialogForm.subCheckNum}}间实验室</p>
@@ -84,7 +84,7 @@
                 </el-select>
               </div>
               <div class="dialog-range-text-box" v-if="dialogForm.checkCategory==2">
-                <p class="inquire-button-one button-p"  @click="dialogClickType(6)">选择检查内容</p>
+                <p class="page-submit-common-style-button button-p"  @click="dialogClickType(6)">选择检查内容</p>
                 <p class="text-p">已选择{{dialogForm.hazardNum}}种</p>
               </div>
             </div>
@@ -112,9 +112,9 @@
                   :on-success="(res)=>handleAvatarSuccess(res)"
                   :headers="headers"
                   :before-upload="beforeAvatarUpload">
-                  <p class="add-button-one-120">+  选择文件</p>
+                  <p class="page-add-common-style-button">+  选择文件</p>
                 </el-upload>
-                <p class="dialog-material-text">支持doc/docx/xls/xlsx/pdf格式文件</p>
+                <p class="dialog-material-text">支持docx/xlsx/pdf格式文件</p>
               </div>
               <div class="dialog-material-list-box">
                 <div v-for="(item,index) in dialogForm.uploadDtoList" :key="index">
@@ -152,8 +152,8 @@
               </el-input>
             </el-form-item>
             <el-form-item style="margin-right:0;">
-              <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>
+              <p v-if="!lookInfoType" class="page-submit-common-style-button" @click="deptResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
+              <p v-if="lookInfoType" class="page-submit-common-style-button" @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">
@@ -180,19 +180,19 @@
               <el-select v-model="deptQueryParamsRight.typeId" clearable placeholder="选择分类" style="width: 120px">
                 <el-option
                   v-for="item in classTypeList"
-                  :key="item.id"
+                  :key="item.typeId"
                   :label="item.typeName"
-                  :value="item.id">
+                  :value="item.typeId">
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="" prop="level">
-              <el-select v-model="deptQueryParamsRight.level" clearable placeholder="选择分级" style="width: 120px">
+            <el-form-item label="" prop="levelId">
+              <el-select v-model="deptQueryParamsRight.levelId" clearable placeholder="选择分级" style="width: 120px">
                 <el-option
                   v-for="item in classifiedList"
-                  :key="item.id"
-                  :label="item.classifiedName"
-                  :value="item.id">
+                  :key="item.levelId"
+                  :label="item.levelName"
+                  :value="item.levelId">
                 </el-option>
               </el-select>
             </el-form-item>
@@ -218,8 +218,8 @@
               </el-input>
             </el-form-item>
             <el-form-item style="margin-right:0;">
-              <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>
+              <p v-if="!lookInfoType" class="page-submit-common-style-button" @click="deptResetQueryRight" style="width:60px;margin-right:0;">重置</p>
+              <p v-if="lookInfoType" class="page-submit-common-style-button" @click="lookDeptRightReset" style="width:60px;margin-right:0;">重置</p>
             </el-form-item>
           </el-form>
           <el-table  border :data="deptTableListRight">
@@ -230,9 +230,9 @@
             <el-table-column label="楼栋楼层" align="center" prop="buildName" show-overflow-tooltip width="150"/>
             <el-table-column label="分类分级" align="center" prop="deptName" show-overflow-tooltip width="150">
               <template slot-scope="scope">
-                <span v-for="item in classTypeList" v-if="item.id == scope.row.typeId">{{item.typeName}}</span>
-                <span style="border-right:1px solid #E0E0E0;margin:0 10px;"></span>
-                <span v-for="item in classifiedList" v-if="item.id == scope.row.level" :style="'color:'+item.classifiedColor+';'">{{item.classifiedName}}</span>
+                <span>{{scope.row.classTypeNames}}</span>
+                <span>-</span>
+                <span :style="'color:'+scope.row.classLevelColor+';'">{{scope.row.classLevelName}}</span>
               </template>
             </el-table-column>
             <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="140"/>
@@ -259,19 +259,19 @@
               <el-select v-model="subQueryParamsLeft.typeId" clearable placeholder="选择分类" style="width: 110px">
                 <el-option
                   v-for="item in classTypeList"
-                  :key="item.id"
+                  :key="item.typeId"
                   :label="item.typeName"
-                  :value="item.id">
+                  :value="item.typeId">
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="" prop="level">
-              <el-select v-model="subQueryParamsLeft.level" clearable placeholder="选择分级" style="width: 110px">
+            <el-form-item label="" prop="levelId">
+              <el-select v-model="subQueryParamsLeft.levelId" clearable placeholder="选择分级" style="width: 110px">
                 <el-option
                   v-for="item in classifiedList"
-                  :key="item.id"
-                  :label="item.classifiedName"
-                  :value="item.id">
+                  :key="item.levelId"
+                  :label="item.levelName"
+                  :value="item.levelId">
                 </el-option>
               </el-select>
             </el-form-item>
@@ -296,7 +296,7 @@
               </el-input>
             </el-form-item>
             <el-form-item style="margin-right:0;">
-              <p class="inquire-button-one" @click="subResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
+              <p class="page-submit-common-style-button" @click="subResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
             </el-form-item>
           </el-form>
           <el-table ref="leftSubTable" border :data="subTableListLeft" @selection-change="subChangeLeft" :row-key="getSubRowKeys">
@@ -306,9 +306,9 @@
             </el-table-column>
             <el-table-column label="分类分级" align="center" prop="deptName" show-overflow-tooltip width="140">
               <template slot-scope="scope">
-                <span v-for="item in classTypeList" v-if="item.id == scope.row.typeId">{{item.typeName}}</span>
-                <span style="border-right:1px solid #E0E0E0;margin:0 10px;"></span>
-                <span v-for="item in classifiedList" v-if="item.id == scope.row.level" :style="'color:'+item.classifiedColor+';'">{{item.classifiedName}}</span>
+                <span>{{scope.row.classTypeNames}}</span>
+                <span>-</span>
+                <span :style="'color:'+scope.row.classLevelColor+';'">{{scope.row.classLevelName}}</span>
               </template>
             </el-table-column>
             <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="150"/>
@@ -337,19 +337,19 @@
               <el-select v-model="subQueryParamsRight.typeId" clearable placeholder="选择分类" style="width: 110px">
                 <el-option
                   v-for="item in classTypeList"
-                  :key="item.id"
+                  :key="item.typeId"
                   :label="item.typeName"
-                  :value="item.id">
+                  :value="item.typeId">
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="" prop="level">
-              <el-select v-model="subQueryParamsRight.level" clearable placeholder="选择分级" style="width: 110px">
+            <el-form-item label="" prop="levelId">
+              <el-select v-model="subQueryParamsRight.levelId" clearable placeholder="选择分级" style="width: 110px">
                 <el-option
                   v-for="item in classifiedList"
-                  :key="item.id"
-                  :label="item.classifiedName"
-                  :value="item.id">
+                  :key="item.levelId"
+                  :label="item.levelName"
+                  :value="item.levelId">
                 </el-option>
               </el-select>
             </el-form-item>
@@ -374,7 +374,7 @@
               </el-input>
             </el-form-item>
             <el-form-item style="margin-right:0;">
-              <p class="inquire-button-one" @click="subResetQueryRight" style="width:60px;margin-right:0;">重置</p>
+              <p class="page-submit-common-style-button" @click="subResetQueryRight" style="width:60px;margin-right:0;">重置</p>
             </el-form-item>
           </el-form>
           <el-table ref="rightSubTable" border :data="subTableListRight" @selection-change="subChangeRight" :row-key="getSubRowKeys">
@@ -384,9 +384,9 @@
             </el-table-column>
             <el-table-column label="分类分级" align="center" prop="deptName" show-overflow-tooltip width="140">
               <template slot-scope="scope">
-                <span v-for="item in classTypeList" v-if="item.id == scope.row.typeId">{{item.typeName}}</span>
-                <span style="border-right:1px solid #E0E0E0;margin:0 10px;"></span>
-                <span v-for="item in classifiedList" v-if="item.id == scope.row.level" :style="'color:'+item.classifiedColor+';'">{{item.classifiedName}}</span>
+                <span>{{scope.row.classTypeNames}}</span>
+                <span>-</span>
+                <span :style="'color:'+scope.row.classLevelColor+';'">{{scope.row.classLevelName}}</span>
               </template>
             </el-table-column>
             <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="150"/>
@@ -435,7 +435,7 @@
               </el-input>
             </el-form-item>
             <el-form-item style="margin-right:0;">
-              <p class="reset-button-one" @click="deviceResetQueryLeft" style="width:60px;">重置</p>
+              <p class="page-submit-common-style-button" @click="deviceResetQueryLeft" style="width:60px;">重置</p>
             </el-form-item>
           </el-form>
           <el-table ref="leftDeviceTable" border :data="deviceTableListLeft" @selection-change="deviceChangeLeft" :row-key="getDeviceRowKeys">
@@ -485,7 +485,7 @@
               </el-input>
             </el-form-item>
             <el-form-item style="margin-right:0;">
-              <p class="reset-button-one" @click="deviceResetQueryRight" style="width:60px;">重置</p>
+              <p class="page-submit-common-style-button" @click="deviceResetQueryRight" style="width:60px;">重置</p>
             </el-form-item>
           </el-form>
           <el-table ref="rightDeviceTable" border :data="deviceTableListRight" @selection-change="deviceChangeRight" :row-key="getDeviceRowKeys">
@@ -510,32 +510,49 @@
       <p class="dialog-footer-button-primary" v-if="!lookInfoType && addDialogBoxType!=5" @click="addUserButton">确定</p>
       <p class="dialog-footer-button-null"></p>
     </div>
+    <fullScreenFileLook ref="fullScreenFileLook"></fullScreenFileLook>
   </el-dialog>
 </template>
 
 <script>
-  import { getToken } from "@/utils/auth";
   import { listDepartments } from "@/apiDemo/system/dept";
   import { listClassifiedAll } from "@/apiDemo/laboratory/classified";
   import { listClasstypeAll } from "@/apiDemo/laboratory/classtype";
-  import {
-    getHistoryPlanTitles, checkGroupFind, findUserList,
-    getAllSubNum, isSCollege, conditionCollegeInfo, findSubInfoByDeptIds,
-    checkPlanAdd, conditionSubjectInfo, findCheckPlan, checkPlanUpdate,
-    hideHistoryPlanTitle, findDeviceList,haveHazardInSub
-  } from '@/apiDemo/safetyCheck/index'
   import { dangerList } from '@/apiDemo/gasManage3_0/gasManage'
+  //                        V3
+  import fullScreenFileLook from "@/components/fullScreenFileLook/fullScreenFileLook.vue";
+  import { getToken } from "@/utils/auth";
+  import {
+    getDeptDropList,
+    laboratoryClassTypeGetList,
+    laboratoryClassLevelGetList,
+  } from '@/api/commonality/permission'
+  import { getDicts } from '@/api/commonality/noPermission'
+  import {
+    laboratorySubRelInfoGetAllSubNum,
+    laboratorySubRelInfoConditionCollegeInfo,
+    getHistoryPlanTitles,isSCollege,
+    laboratorySubRelInfoGetRelListByCondition,
+    laboratorySubRelInfoConditionSubjectInfo,
+    laboratoryHazardQueryHazardList,
+    checkPlanAdd,findCheckPlan,
+    checkPlanUpdate, hideHistoryPlanTitle,
+    haveHazardInSub,
+  } from '@/api/safetyCheck/indexTow'
   export default {
     name: 'addDialog',
     props:{
       addDialogData:{},
     },
+    components: {
+      fullScreenFileLook,
+    },
     data(){
       return{
         loading:false,
         uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
         headers: {
-          Authorization: "Bearer " + getToken(),
+          Authorization: getToken(),
         },
         addDialogTitle:"",
         addDialogType:true,
@@ -625,7 +642,7 @@
           searchValue:"",
           deptId:"",
           deptIds:"",
-          level:"",
+          levelId:"",
           typeId:"",
         },
         deptTableListRight:[],
@@ -635,7 +652,7 @@
           page:1,
           pageSize:20,
           typeId:"",
-          level:"",
+          levelId:"",
           deptId:"",
           searchValue:"",
           filtType:1
@@ -648,7 +665,7 @@
           page:1,
           pageSize:20,
           typeId:"",
-          level:"",
+          levelId:"",
           deptId:"",
           searchValue:"",
           filtType:2
@@ -708,17 +725,17 @@
         //获取历史标题
         this.getHistoryPlanTitles();
         //获取学院列表
-        listDepartments().then(response => {
-          this.deptSelectList = response.data;
-        });
+        getDeptDropList({ deptName: '', level: 2, deptType: 1 }).then(response => {
+          this.$set(this, 'deptSelectList', response.data)
+        })
         /**获取分级*/
-        listClassifiedAll().then(response=>{
-          this.classifiedList = response.data
+        laboratoryClassLevelGetList({}).then(response => {
+          this.$set(this, 'classifiedList', response.data)
         })
         /**获取分类*/
-        listClasstypeAll().then(response=>{
-          this.classTypeList = response.data;
-        });
+        laboratoryClassTypeGetList({}).then(response => {
+          this.$set(this, 'classTypeList', response.data)
+        })
         //查询当前用户是否是院级
         isSCollege().then(response=>{
           if(response.data.userFlg){
@@ -774,7 +791,7 @@
       rangeChange(val){
         if(val == 1){
           //全校
-          getAllSubNum().then(response => {
+          laboratorySubRelInfoGetAllSubNum().then(response => {
             this.$set(this.dialogForm,'schoolSubCheckNum',response.data.subCount);
           })
         }
@@ -792,6 +809,10 @@
                   this.msgError('请选择学院')
                   return
                 }
+                if(this.dialogForm.collegeSubNum<1){
+                  this.msgError('所选学院下实验室数量不足')
+                  return
+                }
               }else if(this.dialogForm.checkRange == 3){
                 if(!this.subCheckData.subIds[0]){
                   this.msgError('请选择实验室')
@@ -858,7 +879,7 @@
               subId:self.dialogTableSubDataList[o].subId,
               subjectName:self.dialogTableSubDataList[o].subjectName,
               typeId:self.dialogTableSubDataList[o].typeId,
-              level:self.dialogTableSubDataList[o].level,
+              levelId:self.dialogTableSubDataList[o].levelId,
               collegeName:self.dialogTableSubDataList[o].collegeName,
             };
             list.push(obj)
@@ -870,7 +891,7 @@
         }else if(this.addDialogBoxType == 6){
           let list=[]
           for(let i=0;i<self.deviceDialogTableDataList.length;i++){
-            list.push(self.deviceDialogTableDataList[i].id)
+            list.push(self.deviceDialogTableDataList[i].hazardId)
           }
           this.$set(this.dialogForm,'hazardIds',list.join(','));
           this.$set(this.dialogForm,'hazardNum',list.length);
@@ -908,10 +929,40 @@
       dialogClickType(type,item){
         let self = this;
         if(type == 5){
-          console.log('item',item);
-          this.$set(this,'iframeSrc',this.urlJudge(item.fileUrl));
-          this.$set(this,'addDialogBoxType',type);
+          //判断类型
+          let type = '';
+          if(item.fileName.split('.')[1] == 'docx'){
+            type = 'docx'
+          }else if(item.fileName.split('.')[1] == 'xlsx'){
+            type = 'excel'
+          }else if(item.fileName.split('.')[1] == 'pdf'){
+            type = 'pdf'
+          }
+          let url = window.location.href.split('://')[0]+'://'+localStorage.getItem('fileBrowseEnvironment')+item.fileUrl;
+          this.$refs['fullScreenFileLook'].initialize(item.fileName,url,type);
         }else if(type == 6){//检查设备
+          if(!this.dialogForm.checkRange){
+            this.msgError('请选择检查范围')
+            return
+          }
+          if(this.dialogForm.checkRange == 1){
+            if(this.dialogForm.schoolSubCheckNum<1){
+              this.msgError('该校区没有实验室')
+              return
+            }
+          }
+          if(this.dialogForm.checkRange == 2){
+            if(this.dialogForm.collegeSubNum<1){
+              this.msgError('未检测到学院下的实验室')
+              return
+            }
+          }
+          if(this.dialogForm.checkRange == 3 ){
+            if(this.dialogForm.subCheckNum<1){
+              this.msgError('请选择实验室实验室')
+              return
+            }
+          }
           //设备
           let list=[];
           let list2=[];
@@ -919,7 +970,7 @@
             list=this.dialogForm.hazardIds.split(',')
             for(let i=0;i<this.deviceDialogList.length;i++){
               for(let b=0;b<list.length;b++){
-                if(list[b]==this.deviceDialogList[i].id){
+                if(list[b]==this.deviceDialogList[i].hazardId){
                   list2.push(this.deviceDialogList[i])
                 }
               }
@@ -935,7 +986,7 @@
           this.deptResetQueryLeft();
           if(this.dialogForm.collegeIds[0]){
             this.$nextTick(() => {
-              conditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
+              laboratorySubRelInfoConditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
                 if(this.lookInfoType){
                   //查看时
                   let list = [];
@@ -959,15 +1010,15 @@
                     pageSize:20,
                     searchValue:"",
                     deptId:"",
-                    level:"",
+                    levelId:"",
                     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);
+                  laboratorySubRelInfoGetRelListByCondition(obj).then(response => {
+                    this.deptTotalRight = response.data.total;
+                    this.deptTableListRight = response.data.records;
+                    this.$set(this.deptCheckData,'subNum',response.data.total);
                     this.$set(this,'deptNumLeft',self.dialogForm.collegeIds.length);
                   });
                 }else{
@@ -1059,7 +1110,7 @@
       },
       //查询接口
       deptGetListLeft(){
-        conditionCollegeInfo(this.deptQueryParamsLeft).then(response => {
+        laboratorySubRelInfoConditionCollegeInfo(this.deptQueryParamsLeft).then(response => {
           this.$set(this,'deptTableListLeft',response.data);
           this.$set(this,'deptTotalLeft',response.data.length);
         })
@@ -1076,7 +1127,7 @@
           searchValue:"",
           deptId:"",
           deptIds:"",
-          level:"",
+          levelId:"",
           typeId:"",
         });
         this.deptHandleQueryRight();
@@ -1089,9 +1140,9 @@
         }else{
           obj.deptIds = this.deptIdsLeft;
         }
-        findSubInfoByDeptIds(obj).then(response => {
-          this.deptTotalRight = response.total;
-          this.deptTableListRight = response.rows;
+        laboratorySubRelInfoGetRelListByCondition(obj).then(response => {
+          this.deptTotalRight = response.data.total;
+          this.deptTableListRight = response.data.records;
         });
       },
       /*===================================实验室选择相关===================================*/
@@ -1106,7 +1157,7 @@
           page:1,
           pageSize:20,
           typeId:"",
-          level:"",
+          levelId:"",
           deptId:"",
           searchValue:"",
           filtType:1
@@ -1121,9 +1172,9 @@
         for(let i=0;i<self.dialogTableSubDataList.length;i++){
           leftObj.selectedSubIds.push(self.dialogTableSubDataList[i].subId);
         }
-        conditionSubjectInfo(leftObj).then(response => {
-          this.subTotalLeft = response.total;
-          this.subTableListLeft = response.rows;
+        laboratorySubRelInfoConditionSubjectInfo(leftObj).then(response => {
+          this.subTotalLeft = response.data.total;
+          this.subTableListLeft = response.data.records;
         });
       },
       //查询
@@ -1137,7 +1188,7 @@
           page:1,
           pageSize:20,
           typeId:"",
-          level:"",
+          levelId:"",
           deptId:"",
           searchValue:"",
           filtType:2
@@ -1152,9 +1203,9 @@
         for(let i=0;i<self.dialogTableSubDataList.length;i++){
           rightObj.subIds.push(self.dialogTableSubDataList[i].subId);
         }
-        conditionSubjectInfo(rightObj).then(response => {
-          this.subTotalRight = response.total;
-          this.subTableListRight = response.rows;
+        laboratorySubRelInfoConditionSubjectInfo(rightObj).then(response => {
+          this.subTotalRight = response.data.total;
+          this.subTableListRight = response.data.records;
         });
       },
       //实验室穿梭按钮
@@ -1187,7 +1238,7 @@
                 subId:subIdsLeft[i].subId,
                 subjectName:subIdsLeft[i].subjectName,
                 typeId:subIdsLeft[i].typeId,
-                level:subIdsLeft[i].level,
+                levelId:subIdsLeft[i].levelId,
                 collegeName:subIdsLeft[i].collegeName,
               }
               list.push(obj);
@@ -1204,10 +1255,12 @@
       /*===================================设备相关相关===================================*/
       //获取危险源类型
       dangerList(){
-        let _this=this;
-        dangerList().then( response => {
-          let res=response.rows;
-          _this.dangerArr=res;
+        getDicts('classify_dictionaries_all').then(response => {
+          let list = response.data;
+          getDicts('level_dictionaries_all').then(response => {
+            list = list.concat(response.data)
+            this.$set(this,'dangerArr',list);
+          });
         });
       },
       //查询
@@ -1235,12 +1288,12 @@
         let leftObj = JSON.parse(JSON.stringify(this.deviceQueryParamsLeft));
         leftObj.selectedHazardIds = [];
         for(let i=0;i<self.deviceDialogTableDataList.length;i++){
-          leftObj.selectedHazardIds.push(self.deviceDialogTableDataList[i].id);
+          leftObj.selectedHazardIds.push(self.deviceDialogTableDataList[i].hazardId);
         }
 
-        findDeviceList(leftObj).then(response => {
-          this.deviceTotalLeft = response.total;
-          this.deviceTableListLeft = response.rows;
+        laboratoryHazardQueryHazardList(leftObj).then(response => {
+          this.deviceTotalLeft = response.data.total;
+          this.deviceTableListLeft = response.data.records;
         });
       },
       //查询
@@ -1271,8 +1324,8 @@
           searchValue:"",
           filtType:""
         }
-        findDeviceList(obj).then(response => {
-          this.deviceDialogList=response.rows
+        laboratoryHazardQueryHazardList(obj).then(response => {
+          this.deviceDialogList=response.data.records
         });
       },
       //查询接口
@@ -1281,11 +1334,11 @@
         let rightObj = JSON.parse(JSON.stringify(this.deviceQueryParamsRight));
         rightObj.hazardIds = [];
         for(let i=0;i<self.deviceDialogTableDataList.length;i++){
-          rightObj.hazardIds.push(self.deviceDialogTableDataList[i].id);
+          rightObj.hazardIds.push(self.deviceDialogTableDataList[i].hazardId);
         }
-        findDeviceList(rightObj).then(response => {
-          this.deviceTotalRight = response.total;
-          this.deviceTableListRight = response.rows;
+        laboratoryHazardQueryHazardList(rightObj).then(response => {
+          this.deviceTotalRight = response.data.total;
+          this.deviceTableListRight = response.data.records;
         });
       },
       //设备穿梭按钮
@@ -1298,7 +1351,7 @@
             let deviceIdsRight = JSON.parse(JSON.stringify(this.$refs.rightDeviceTable.selection))
             for(let i=0;i<deviceIdsRight.length;i++){
               for(let s=0;s<list.length;s++){
-                if(deviceIdsRight[i].id == list[s].id){
+                if(deviceIdsRight[i].hazardId == list[s].hazardId){
                   list.splice(s,1);
                   s--
                 }
@@ -1318,17 +1371,10 @@
             let deviceIdsLeft = JSON.parse(JSON.stringify(this.$refs.leftDeviceTable.selection))
             for(let i=0;i<deviceIdsLeft.length;i++){
               let obj = {
-                // userId:deviceIdsLeft[i].userId,
-                // name:deviceIdsLeft[i].nickName,
-                // jobNum:deviceIdsLeft[i].userName,
-                // deptName:deviceIdsLeft[i].deptName,
-                // deptId:deviceIdsLeft[i].deptId,
-                // userType:deviceIdsLeft[i].userType,
-
                 chName:deviceIdsLeft[i].chName,
-                code:deviceIdsLeft[i].code,
-                hazardTypeMode:deviceIdsLeft[i].hazardTypeMode,
-                id:deviceIdsLeft[i].id,
+                code:deviceIdsLeft[i].hazardCode,
+                bigTypeValue:deviceIdsLeft[i].bigTypeValue,
+                hazardId:deviceIdsLeft[i].hazardId,
               }
               list.push(obj);
             }
@@ -1371,7 +1417,7 @@
       },
       beforeAvatarUpload(file) {
         let type = false;
-        if (file.type == 'application/pdf' || file.type == 'application/msword' || file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'|| file.type == 'application/vnd.ms-excel' || file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
+        if (file.type == 'application/pdf' || file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' || file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
           if(file.size> 5250000){
             this.msgError('上传大小不能超过5M')
             return false
@@ -1380,7 +1426,7 @@
           this.upDataName = file.name;
           type = true;
         }else{
-          this.$message.error('只能上传doc/docx/xls/xlsx/pdf格式');
+          this.$message.error('只能上传docx/xlsx/pdf格式');
           type = false;
         }
         return type;
@@ -1399,7 +1445,7 @@
         return row.subId
       },
       getDeviceRowKeys(row) {
-        return row.id
+        return row.hazardId
       },
       deptChange(selection){
         let self = this;
@@ -1439,11 +1485,11 @@
       },
       deviceChangeLeft(selection){
         this.deviceNumLeft = selection.length;
-        this.deviceIdsLeft = selection.map(item => item.id);
+        this.deviceIdsLeft = selection.map(item => item.hazardId);
       },
       deviceChangeRight(selection){
         this.deviceNumRight = selection.length;
-        this.deviceIdsRight = selection.map(item => item.id);
+        this.deviceIdsRight = selection.map(item => item.hazardId);
       },
       //加法
       accAdd(arg1,arg2){
@@ -1489,7 +1535,7 @@
       //查看时学院左侧搜索
       lookDeptLeftSearch(){
         let self = this;
-        conditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
+        laboratorySubRelInfoConditionCollegeInfo(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++){
@@ -1506,7 +1552,7 @@
             pageSize:20,
             searchValue:"",
             deptId:"",
-            level:"",
+            levelId:"",
             typeId:"",
           });
           let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
@@ -1515,10 +1561,10 @@
             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);
+          laboratorySubRelInfoGetRelListByCondition(obj).then(response => {
+            this.deptTotalRight = response.data.total;
+            this.deptTableListRight = response.data.records;
+            this.$set(this.deptCheckData,'subNum',response.data.total);
             this.$set(this,'deptNumLeft',self.dialogForm.collegeIds.length);
           });
         })
@@ -1527,7 +1573,7 @@
       lookDeptLeftReset(){
         let self = this;
         this.$set(this,'deptQueryParamsLeft',{ searchValue:"", });
-        conditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
+        laboratorySubRelInfoConditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
           //查看时
           for(let i=0;i<response.data.length;i++){
             let num = 0;
@@ -1549,15 +1595,15 @@
             pageSize:20,
             searchValue:"",
             deptId:"",
-            level:"",
+            levelId:"",
             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);
+          laboratorySubRelInfoGetRelListByCondition(obj).then(response => {
+            this.deptTotalRight = response.data.total;
+            this.deptTableListRight = response.data.records;
+            this.$set(this.deptCheckData,'subNum',response.data.total);
             this.$set(this,'deptNumLeft',self.dialogForm.collegeIds.length);
           });
         })
@@ -1571,9 +1617,9 @@
           ids.push(self.deptTableListLeft[o].deptId)
         }
         obj.deptIds = ids;
-        findSubInfoByDeptIds(obj).then(response => {
-          this.deptTotalRight = response.total;
-          this.deptTableListRight = response.rows;
+        laboratorySubRelInfoGetRelListByCondition(obj).then(response => {
+          this.deptTotalRight = response.data.total;
+          this.deptTableListRight = response.data.records;
         });
       },
       //查看时学院右侧重置
@@ -1584,7 +1630,7 @@
           pageSize:20,
           searchValue:"",
           deptId:"",
-          level:"",
+          levelId:"",
           typeId:"",
         });
         let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
@@ -1593,9 +1639,9 @@
           ids.push(self.deptTableListLeft[o].deptId)
         }
         obj.deptIds = ids;
-        findSubInfoByDeptIds(obj).then(response => {
-          this.deptTotalRight = response.total;
-          this.deptTableListRight = response.rows;
+        laboratorySubRelInfoGetRelListByCondition(obj).then(response => {
+          this.deptTotalRight = response.data.total;
+          this.deptTableListRight = response.data.records;
         });
       },
     }

+ 1 - 1
src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/index.vue

@@ -115,7 +115,7 @@
   import addDialog from './addDialog.vue'
   import listPage from './listPage.vue'
   import lookDocumentListDialog from '@/components/lookDocumentDialog/lookDocumentListDialog.vue'
-  import { checkPlanList,checkPlanDelete,getFindByCheckPlanId } from '@/apiDemo/safetyCheck/index'
+  import { checkPlanList,checkPlanDelete,getFindByCheckPlanId } from '@/api/safetyCheck/indexTow'
   export default {
     name: 'index',
     components: {

+ 17 - 17
src/views/safetyCheck/schoolInspection/inspectionGroup/addDialog.vue

@@ -28,10 +28,10 @@
         <div class="dialog-table-title-box">
           <img src="@/assets/ZDimages/safetyCheck/icon_xyxc_cy.png">
           <p class="dialog-table-title-p">巡查成员</p>
-          <p v-if="!lookInfoType" class="inquire-button-one dialog-table-title-button" @click="dialogClickType(2)">+ 添加</p>
+          <p v-if="!lookInfoType" class="page-submit-common-style-button dialog-table-title-button" @click="dialogClickType(2)">+ 添加</p>
           <p v-if="lookInfoType" class="dialog-table-title-text">{{dialogTableList[0]?dialogTableList.length+'人':'0人'}}</p>
         </div>
-        <el-table border :data="dialogTableList">
+        <el-table class="table-box" border :data="dialogTableList">
           <el-table-column label="序号" align="center"  type="index" width="140"/>
           <el-table-column label="姓名" align="center" prop="name" show-overflow-tooltip/>
           <el-table-column label="工号" align="center" prop="jobNum" show-overflow-tooltip/>
@@ -97,10 +97,10 @@
             <p class="reset-button-one" @click="userResetQueryLeft" style="width:60px;">重置</p>
           </el-form-item>
         </el-form>
-        <el-table ref="leftUserTable" border :data="userTableListLeft" @selection-change="userChangeLeft" :row-key="getRowKeys">
+        <el-table class="table-box" ref="leftUserTable" border :data="userTableListLeft" @selection-change="userChangeLeft" :row-key="getRowKeys">
           <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
-          <el-table-column label="姓名" align="center" prop="nickName" show-overflow-tooltip/>
-          <el-table-column label="工号" align="center" prop="userName" show-overflow-tooltip width="150"/>
+          <el-table-column label="姓名" align="center" prop="userName" show-overflow-tooltip/>
+          <el-table-column label="工号" align="center" prop="account" show-overflow-tooltip width="150"/>
           <el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip width="168"/>
         </el-table>
         <pagination layout="total, prev, pager, next, jumper"
@@ -147,10 +147,10 @@
               <p class="reset-button-one" @click="userResetQueryRight" style="width:60px;">重置</p>
             </el-form-item>
           </el-form>
-          <el-table ref="rightUserTable" border :data="userTableListRight" @selection-change="userChangeRight" :row-key="getRowKeys">
+          <el-table class="table-box" ref="rightUserTable" border :data="userTableListRight" @selection-change="userChangeRight" :row-key="getRowKeys">
             <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
-            <el-table-column label="姓名" align="center" prop="nickName" show-overflow-tooltip/>
-            <el-table-column label="工号" align="center" prop="userName" show-overflow-tooltip width="150"/>
+            <el-table-column label="姓名" align="center" prop="userName" show-overflow-tooltip/>
+            <el-table-column label="工号" align="center" prop="account" show-overflow-tooltip width="150"/>
             <el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip width="168"/>
           </el-table>
           <pagination layout="total, prev, pager, next, jumper"
@@ -175,7 +175,7 @@
 
 <script>
   import { listDepartments } from "@/apiDemo/system/dept";
-  import { checkGroupFind,findUserList,checkGroupAdd,checkGroupUpdate } from '@/apiDemo/safetyCheck/index'
+  import { checkGroupFind,findUserList,checkGroupAdd,checkGroupUpdate } from '@/api/safetyCheck/indexTow'
   export default {
     name: 'addDialog',
     props:{
@@ -283,7 +283,7 @@
                 let obj = this.dialogForm;
                 obj.checkGroupMemberList = this.dialogTableList
                 checkGroupUpdate(obj).then(response => {
-                  this.msgSuccess(response.msg);
+                  this.msgSuccess(response.message);
                   this.$parent.addDialogOpen(5)
                 })
               }else{
@@ -291,7 +291,7 @@
                 let obj = this.dialogForm;
                 obj.checkGroupMemberList = this.dialogTableList
                 checkGroupAdd(obj).then(response => {
-                  this.msgSuccess(response.msg);
+                  this.msgSuccess(response.message);
                   this.$parent.addDialogOpen(5)
                 })
               }
@@ -386,8 +386,8 @@
           leftObj.selectedUserIds.push(self.dialogTableDataList[i].userId);
         }
         findUserList(leftObj).then(response => {
-          this.userTotalLeft = response.total;
-          this.userTableListLeft = response.rows;
+          this.userTotalLeft = response.data.total;
+          this.userTableListLeft = response.data.records;
         });
       },
       //查询
@@ -418,8 +418,8 @@
           rightObj.userIds.push(self.dialogTableDataList[i].userId);
         }
         findUserList(rightObj).then(response => {
-          this.userTotalRight = response.total;
-          this.userTableListRight = response.rows;
+          this.userTotalRight = response.data.total;
+          this.userTableListRight = response.data.records;
         });
       },
       //穿梭按钮
@@ -453,8 +453,8 @@
             for(let i=0;i<userIdsLeft.length;i++){
               let obj = {
                 userId:userIdsLeft[i].userId,
-                name:userIdsLeft[i].nickName,
-                jobNum:userIdsLeft[i].userName,
+                name:userIdsLeft[i].userName,
+                jobNum:userIdsLeft[i].account,
                 deptName:userIdsLeft[i].deptName,
                 deptId:userIdsLeft[i].deptId,
                 userType:userIdsLeft[i].userType,

+ 3 - 3
src/views/safetyCheck/schoolInspection/inspectionGroup/index.vue

@@ -85,7 +85,7 @@
 
 <script>
   import addDialog from './addDialog.vue'
-  import { checkGroupList,checkGroupDelete,checkGroupEnable } from '@/apiDemo/safetyCheck/index'
+  import { checkGroupList,checkGroupDelete,checkGroupEnable } from '@/api/safetyCheck/indexTow'
   export default {
     name: 'index',
     components: {
@@ -161,7 +161,7 @@
             enable:data.enable==1?0:1
           };
           checkGroupEnable(obj).then(response => {
-            self.msgSuccess(response.msg)
+            self.msgSuccess(response.message)
             self.getList();
           });
         }).then(() => {
@@ -198,7 +198,7 @@
           type: "warning"
         }).then(function() {
           checkGroupDelete({id:data.id}).then(response => {
-            self.msgSuccess(response.msg)
+            self.msgSuccess(response.message)
             self.getList();
           });
         }).then(() => {

+ 8 - 4
src/views/safetyCheck/schoolInspection/inspectionPlan/addDialog.vue

@@ -884,7 +884,7 @@ export default {
     initializationInterface(){
       //获取历史标题
       this.getHistoryPlanTitles();
-      //
+      //获取学院列表
       getDeptDropList({ deptName: '', level: 2, deptType: 1 }).then(response => {
         this.$set(this, 'deptSelectList', response.data)
       })
@@ -996,6 +996,10 @@ export default {
                 this.msgError('请选择学院')
                 return
               }
+              if(this.dialogForm.collegeSubNum<1){
+                this.msgError('所选学院下实验室数量不足')
+                return
+              }
             }else if(this.dialogForm.checkRange == 3){
               if(!this.subCheckData.subIds[0]){
                 this.msgError('请选择实验室')
@@ -1057,13 +1061,13 @@ export default {
               }
               obj.id = this.addDialogData.id;
               checkPlanUpdate(obj).then(response => {
-                this.msgSuccess(response.msg)
+                this.msgSuccess(response.message)
                 this.$parent.addDialogOpen(5)
               })
             }else{
               //新增
               checkPlanAdd(obj).then(response => {
-                this.msgSuccess(response.msg)
+                this.msgSuccess(response.message)
                 this.$parent.addDialogOpen(5)
               })
             }
@@ -1889,7 +1893,7 @@ export default {
         type: "warning"
       }).then(function() {
         hideHistoryPlanTitle({checkPlanId:item.id}).then(response => {
-          self.msgSuccess(response.msg)
+          self.msgSuccess(response.message)
           self.getHistoryPlanTitles();
         });
       }).then(() => {

+ 1 - 1
src/views/safetyCheck/schoolInspection/inspectionPlan/index.vue

@@ -282,7 +282,7 @@
           type: "warning"
         }).then(function() {
           checkPlanDelete({id:obj.id,checkType:obj.checkType}).then(response => {
-            self.msgSuccess(response.msg)
+            self.msgSuccess(response.message)
             self.getList();
           })
         }).then(() => {

+ 42 - 22
src/views/safetyCheck/schoolInspection/inspectionPlan/listPage.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="selfInspectionManagement">
     <div class="selfInspectionManagement-page" v-if="pageType == 1">
-      <div class="title-box">
+      <div class="title-box page-form-title-box">
         <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;">
@@ -24,16 +24,16 @@
               </div>
             </div>
           </div>
-          <el-form-item label="关键字" prop="searchValue">
+          <el-form-item label="" prop="searchValue">
             <el-input
               maxLength="30"
               v-model="queryParams.searchValue"
               placeholder="计划标题/实验室/房间号/检查者"
               clearable
-              style="width: 250px"
+              style="width: 250px;margin-left:10px;"
             />
           </el-form-item>
-          <el-form-item label="学院" prop="deptId" label-width="50px">
+          <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"
@@ -43,7 +43,7 @@
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="检查时间" prop="dateRange" style="margin-left:10px;" label-width="70px">
+          <el-form-item label="" prop="dateRange" style="margin-left:10px;" label-width="70px">
             <el-date-picker
               :clearable="false"
               v-model="dateRange"
@@ -57,16 +57,16 @@
             ></el-date-picker>
           </el-form-item>
           <el-form-item>
-            <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
-            <p class="reset-button-one" @click="resetQuery">重置</p>
+            <p class="page-inquire-common-style-button" @click="handleQuery" style="margin-right:10px;">查询</p>
+            <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
           </el-form-item>
           <el-form-item style="float: right">
-            <p class="add-button-one-90" style="width:80px;" @click="outButton">返回</p>
+            <p class="page-out-common-style-button" style="width:80px;" @click="outButton">返回</p>
           </el-form-item>
         </el-form>
       </div>
-      <div class="content-box">
-        <el-table  border :data="tableList" ref="multipleTable" @sort-change="sortChange">
+      <div class="page-content-box">
+        <el-table class="table-box" border :data="tableList" ref="multipleTable" @sort-change="sortChange">
           <el-table-column label="序号" align="center"  type="index" width="60" fixed/>
           <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip width="250" fixed/>
           <el-table-column label="实验室" align="center" prop="subjectName" show-overflow-tooltip width="220" fixed>
@@ -127,18 +127,24 @@
     </div>
     <addPage v-if="pageType==2" :propsAddData="propsAddData"></addPage>
     <infoPage v-if="pageType==3" :propsInfoData="propsInfoData"></infoPage>
-    <lookDocumentDataDialog v-if="lookDocumentType" :propsLookDocumentData="propsLookDocumentData"></lookDocumentDataDialog>
     <lookDocumentListDialog v-if="lookDocumentListType" :propsLookDocumentListData="propsLookDocumentListData"></lookDocumentListDialog>
+    <fullScreenFileLook ref="fullScreenFileLook"></fullScreenFileLook>
   </div>
 </template>
 
 <script>
-  import { listDepartments } from "@/apiDemo/system/dept";
-  import { findByCheckPlanId,getFindByCheckPlanId } from '@/apiDemo/safetyCheck/index'
   import addPage from '@/views/safetyCheck/components/addPage/addPage.vue'
   import infoPage from '@/views/safetyCheck/components/infoPage/infoPage.vue'
-  import lookDocumentDataDialog from '@/components/lookDocumentDialog/lookDocumentDataDialog.vue'
   import lookDocumentListDialog from '@/components/lookDocumentDialog/lookDocumentListDialog.vue'
+  //                        V3
+  import {
+    getDeptDropList
+  } from '@/api/commonality/permission'
+  import {
+    findByCheckPlanId,
+    getFindByCheckPlanId,
+  } from '@/api/safetyCheck/indexTow'
+  import fullScreenFileLook from "@/components/fullScreenFileLook/fullScreenFileLook.vue";
   export default {
     name: 'index',
     props:{
@@ -147,13 +153,12 @@
     components: {
       addPage,
       infoPage,
-      lookDocumentDataDialog,
-      lookDocumentListDialog
+      lookDocumentListDialog,
+      fullScreenFileLook
     },
     data(){
       return{
         //子组件数据
-        lookDocumentType:false,
         propsLookDocumentData:{},
         lookDocumentListType:false,
         propsLookDocumentListData:{},
@@ -179,7 +184,7 @@
 
     },
     mounted(){
-      this.listDepartments();
+      this.getDeptDropList();
       this.getList();
     },
     methods:{
@@ -261,6 +266,21 @@
       },
       //查看单个文档
       lookDocumentButton(type,row){
+        console.log('type',type);
+        console.log('row',row);
+        return
+        //判断类型
+        // let type = '';
+        // if(item.fileName.split('.')[1] == 'docx'){
+        //   type = 'docx'
+        // }else if(item.fileName.split('.')[1] == 'xlsx'){
+        //   type = 'excel'
+        // }else if(item.fileName.split('.')[1] == 'pdf'){
+        //   type = 'pdf'
+        // }
+        // let url = window.location.href.split('://')[0]+'://'+localStorage.getItem('fileBrowseEnvironment')+item.fileUrl;
+        // this.$refs['fullScreenFileLook'].initialize(item.fileName,url,type);
+
         if(type==1){
           this.$set(this,'propsLookDocumentData',{
             title:"整改报告",
@@ -296,10 +316,10 @@
         }
       },
       //获取学院列表
-      listDepartments(){
-        listDepartments().then(response => {
-          this.deptSelectList = response.data;
-        });
+      getDeptDropList(){
+        getDeptDropList({ deptName: '', level: 2, deptType: 1 }).then(response => {
+          this.$set(this, 'deptSelectList', response.data)
+        })
       },
     },
   }

+ 365 - 0
src/views/systemManagement/dept/index.vue

@@ -0,0 +1,365 @@
+<!--电子签章-->
+<template>
+  <div class="app-container dept">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
+      <el-form-item label="部门名称" prop="deptName">
+        <el-input
+          v-model="queryParams.deptName"
+          placeholder="请输入部门名称"
+          clearable
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item>
+        <p class="inquire-button-one" @click="handleQuery">查询</p>
+        <p class="reset-button-one" @click="resetQuery">重置</p>
+      </el-form-item>
+    </el-form>
+    <el-table class="table-box" border v-loading="loading"
+              :data="deptList" row-key="deptId" default-expand-all
+              :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
+      <el-table-column prop="deptName" label="部门名称">
+        <template slot-scope="scope">
+          <img v-if="scope.row.deptImg" class="scope-img" :src="scope.row.deptImg">
+          <p class="scope-name">{{ scope.row.deptName }}</p>
+        </template>
+      </el-table-column>
+      <el-table-column prop="deptSign" label="电子签章">
+        <template slot-scope="scope">
+          <img :src="scope.row.deptSign" style="width:40px;height:40px;" @click="lookSign(2,scope.row.deptSign)">
+        </template>
+      </el-table-column>
+      <el-table-column prop="isLower" label="适用下级">
+        <template slot-scope="scope">
+          {{scope.row.isLower == 0?'否':'是'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" width="120" v-if="tableButtonType">
+        <template slot-scope="scope">
+          <div class="table-button-box">
+            <p class="table-button-null"></p>
+            <p class="table-button-p"
+               v-hasPermiRouter="['system:dept_sign:edit']"
+               @click="addButton(scope.row)"
+            >编辑</p>
+            <p class="table-button-null"></p>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-dialog class="up-img-box" title="电子签章" :visible.sync="upFaceOpen" width="600px" append-to-body
+               :close-on-click-modal="false">
+      <el-form ref="form" :model="upFaceForm" :rules="rules">
+        <el-form-item label="是否适用下级" prop="isLower" style="margin-top:30px;" label-width="140px">
+          <el-select v-model="upFaceForm.isLower" placeholder="请选择是否适用下级" style="width:300px;">
+            <el-option label="是" :value="1"/>
+            <el-option label="否" :value="0"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="" prop="deptSign" style="width:200px;cursor: pointer;margin:20px 180px 0;">
+          <el-upload
+            @click="upImgOpenClick(1)"
+            style="width:200px;height:200px;cursor: pointer;overflow: hidden"
+            class="position-button"
+            :action="uploadImgUrl"
+            :show-file-list="false"
+            accept="image/jpeg,image/gif,image/png"
+            :on-success="handleAvatarSuccess"
+            :headers="headers"
+            :before-upload="beforeAvatarUpload">
+            <div v-if="!upFaceForm.deptSign" style="width:200px;height:200px;border: 1px dashed #E0E0E0;">
+              <p style="text-align: center;color:#999;font-weight:500;font-size: 20px;line-height:200px;margin:0;">+</p>
+            </div>
+            <img :src="upFaceForm.deptSign" v-if="upFaceForm.deptSign"
+                 style="width:198px;height:198px;cursor: pointer;">
+          </el-upload>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="deptSignUp(1)">取 消</el-button>
+        <el-button type="primary" @click="deptSignUp(2)">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="电子签章" :visible.sync="signType" width="600px" append-to-body :close-on-click-modal="false">
+      <img :src="signUrl" style="width:300px;height:300px;display: block;margin:0 auto;">
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="lookSign(1)" style="width:100px; margin:0 auto;display: block;">确 定
+        </el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    signList,
+    deptSign
+  } from '@/api/systemManagement/index'
+  import Treeselect from '@riophae/vue-treeselect'
+  import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+  import { getToken } from '@/utils/auth'
+
+  export default {
+    name: 'Dept',
+    components: { Treeselect },
+    data() {
+      return {
+        tableButtonType: this.hasPermiDom(['system:dept_sign:edit']),
+        uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
+        headers: {
+          Authorization: getToken()
+        },
+        // 遮罩层
+        loading: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 表格树数据
+        deptList: [],
+        // 部门树选项
+        deptOptions: [],
+        // 弹出层标题
+        title: '',
+        // 是否显示弹出层
+        open: false,
+        // 状态数据字典
+        statusOptions: [],
+        // 查询参数
+        queryParams: {
+          deptName: undefined,
+          status: undefined
+        },
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {
+          isLower: [
+            { required: true, message: '请选择是否适用下级', trigger: 'blur' }
+          ],
+          deptSign: [
+            { required: true, message: '请上传签章', trigger: 'blur' }
+          ],
+          parentId: [
+            { required: true, message: '上级部门不能为空', trigger: 'blur' }
+          ],
+          deptName: [
+            { required: true, message: '部门名称不能为空', trigger: 'blur' },
+            { required: true, message: '部门名称不能为空', validator: this.spaceJudgment, trigger: 'blur' }
+          ],
+          orderNum: [
+            { required: true, message: '显示排序不能为空', trigger: 'blur' },
+            { required: true, message: '显示排序不能为空', validator: this.spaceJudgment, trigger: 'blur' }
+          ],
+          email: [
+            {
+              type: 'email',
+              message: '\'请输入正确的邮箱地址',
+              trigger: ['blur', 'change']
+            },
+            { required: true, message: '请输入正确的邮箱地址', validator: this.spaceJudgment, trigger: 'blur' }
+          ],
+          phone: [
+            {
+              pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+              message: '请输入正确的联系方式',
+              trigger: 'blur'
+            },
+            { required: true, message: '请输入正确的联系方式', validator: this.spaceJudgment, trigger: 'blur' }
+          ],
+          type: [
+            { required: true, message: '请选择是否适用下级', trigger: 'blur' }
+          ]
+        },
+        //电子签章
+        upFaceOpen: false,
+        upFaceForm: {
+          type: ''
+        },
+        upFaceUrl: '',
+        signType: false,
+        signUrl: ''
+      }
+    },
+    created() {
+      this.getList()
+      this.getDicts('sys_normal_disable').then(response => {
+        this.statusOptions = response.data
+      })
+    },
+    methods: {
+      //签章编辑窗口按钮
+      deptSignUp(type) {
+        if (type == 1) {
+          this.upFaceOpen = false
+        } else if (type == 2) {
+          this.$refs['form'].validate(valid => {
+            if (valid) {
+              let obj = {
+                deptId: this.upFaceForm.deptId,
+                isLower: this.upFaceForm.isLower,
+                deptSign: this.upFaceForm.deptSign
+
+              }
+              deptSign(obj).then(response => {
+                this.msgSuccess(response.msg)
+                this.upFaceOpen = false
+                this.getList()
+              })
+            }
+          })
+        }
+      },
+      //查看签章
+      lookSign(type, url) {
+        if (type == 1) {
+          this.signType = false
+        } else if (type == 2) {
+          this.signUrl = url
+          this.signType = true
+        }
+      },
+      //编辑签章
+      addButton(row) {
+        this.upFaceForm = JSON.parse(JSON.stringify(row))
+        if (!this.upFaceForm.isLower) {
+          this.upFaceForm.isLower = 0
+        }
+        this.upFaceUrl = this.upFaceForm.deptSign
+        this.upFaceOpen = true
+      },
+      //上传
+      handleAvatarSuccess(res) {
+        console.log(res.data.url)
+        this.upFaceForm.deptSign = res.data.url
+        this.$forceUpdate()
+      },
+      beforeAvatarUpload(file) {
+        let type = false
+        console.log('file', file)
+        if (file.type == 'image/png' || file.type == 'image/jpeg' || file.type == 'image/gif') {
+          type = true
+        } else {
+          this.$message.error('只能上传png/jpeg/gif格式图片')
+          type = false
+        }
+        return type
+      },
+      /** 查询部门列表 */
+      getList() {
+        let self = this
+        this.loading = true
+        signList(this.queryParams).then(response => {
+          this.deptList = this.handleTree(response.data, 'deptId')
+          let num = this.getDepth(this.deptList, 1) + 10
+          let listA = JSON.parse(JSON.stringify(response.data))
+          let listB = []
+          //deptId 本身的名字  parentId 父名
+          for (let i = 0; i < num; i++) {
+            console.log('num===', i)
+            for (let o = 0; o < listA.length; o++) {
+              let age = 0
+              for (let k = 0; k < listA.length; k++) {
+                if (listA[o].deptId == listA[k].parentId) {
+                  age++
+                  console.log(listA[o].deptId, listA[o].deptName)
+                  console.log(listA[k].parentId, listA[k].deptName)
+                  break
+                }
+              }
+              if (age == 0) {
+                for (let k = 0; k < listA.length; k++) {
+                  if (listA[o].parentId == listA[k].deptId) {
+                    listA[k].totalPeople = listA[k].totalPeople + listA[o].totalPeople
+                    listA[k].totalSub = listA[k].totalSub + listA[o].totalSub
+                    listB.push(listA[o])
+                    listA.splice(o, 1)
+                    console.log('listA', listA)
+                    console.log('listB', listB)
+                    break
+                    // return
+                  }
+                }
+              }
+            }
+            if (listA.length == 1) {
+              listB.push(listA[0])
+              break
+            }
+          }
+          this.deptList = this.handleTree(listB, 'deptId')
+          this.loading = false
+        })
+      },
+      /** 转换部门数据结构 */
+      normalizer(node) {
+        if (node.children && !node.children.length) {
+          delete node.children
+        }
+        return {
+          id: node.deptId,
+          label: node.deptName,
+          children: node.children
+        }
+      },
+      // 字典状态字典翻译
+      statusFormat(row, column) {
+        return this.selectDictLabel(this.statusOptions, row.status)
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.getList()
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm('queryForm')
+        this.handleQuery()
+      },
+      //计算层级
+      getDepth(arr, depth) {
+        var flag = false
+        var temp = []
+        for (let i = 0; i < arr.length; i++) {
+          if (arr[i].children instanceof Array) { // 判断是否是数组
+            for (let j = 0; j < arr[i].children.length; j++) {
+              temp.push(arr[i].children[j]) // 解析出arr下第一层
+            }
+            flag = true
+          }
+        }
+        if (flag) { // 如果还有数组,则继续解析,直到最后一层有不为数组为止
+          depth++
+          return this.getDepth(temp, depth)
+        } else {
+          return depth
+        }
+      },
+      //加法
+      accAdd(arg1, arg2) {
+        var r1, r2, m
+        try {
+          r1 = arg1.toString().split('.')[1].length
+        } catch (e) {
+          r1 = 0
+        }
+        try {
+          r2 = arg2.toString().split('.')[1].length
+        } catch (e) {
+          r2 = 0
+        }
+        m = Math.pow(10, Math.max(r1, r2))
+        return ((arg1 * m + arg2 * m) / m).toFixed(0)
+      }
+    }
+  }
+</script>
+<style scoped lang="scss">
+  .dept {
+    display: flex !important;
+    flex-direction: column;
+    box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
+    padding: 11px 20px 20px !important;
+    .button-box {
+      width: 300px;
+      display: flex;
+    }
+  }
+</style>