Browse Source

Merge branch 'master' of http://192.168.1.43:3000/v3/v3-lab-web

dedsudiyu 1 year ago
parent
commit
a442a565e8

+ 64 - 0
src/api/chemicalManage/index.js

@@ -443,6 +443,30 @@ export function systemConfigRuleEnableOrDisable(data) {
     data: data
   })
 }
+//预警通知-列表
+export function systemWarningNoticeWarningList(data) {
+  return request({
+    url: '/system/warningNotice/warningList',
+    method: 'post',
+    data: data
+  })
+}
+//预警通知-详情
+export function systemWarningNoticeDetail(query) {
+  return request({
+    url: '/system/warningNotice/detail',
+    method: 'get',
+    params: query
+  })
+}
+//预警通知-处理
+export function systemWarningNoticeHandleMessage(data) {
+  return request({
+    url: '/system/warningNotice/handleMessage',
+    method: 'post',
+    data: data
+  })
+}
 //使用台账-列表
 export function chemicalUserecordList(data) {
   return request({
@@ -467,6 +491,46 @@ export function chemicalUserecordDetail(query) {
     params: query
   })
 }
+//预警事件-列表
+export function systemWarningNoticeList(data) {
+  return request({
+    url: '/system/warningNotice/list',
+    method: 'post',
+    data: data
+  })
+}
+//预警事件-详情
+export function systemWarningNoticeWarningDetail(query) {
+  return request({
+    url: '/system/warningNotice/warningDetail',
+    method: 'get',
+    params: query
+  })
+}
+//预警事件-处理
+export function systemWarningNoticeWarningHandleMessage(data) {
+  return request({
+    url: '/system/warningNotice/warningHandleMessage',
+    method: 'post',
+    data: data
+  })
+}
+//入库记录-列表
+export function chemicalStockListIn(data) {
+  return request({
+    url: '/chemical/stock/listIn',
+    method: 'post',
+    data: data
+  })
+}
+//出库记录-列表
+export function chemicalStockListOut(data) {
+  return request({
+    url: '/chemical/stock/listOut',
+    method: 'post',
+    data: data
+  })
+}
 
 
 

+ 44 - 0
src/api/hazardManagement/index.js

@@ -1,5 +1,49 @@
 import request from '@/utils/request'
 
+//危险源-列表
+export function laboratoryHazardList(data) {
+  return request({
+    url: '/laboratory/hazard/list',
+    method: 'post',
+    data: data
+  })
+}
+//危险源-新增
+export function laboratoryHazardAdd(data) {
+  return request({
+    url: '/laboratory/hazard/add',
+    method: 'post',
+    data: data
+  })
+}
+//危险源-编辑
+export function laboratoryHazardUpdate(data) {
+  return request({
+    url: '/laboratory/hazard/update',
+    method: 'post',
+    data: data
+  })
+}
+//化学品-删除
+export function laboratoryHazardDelete(data) {
+  return request({
+    url: '/laboratory/hazard/delete',
+    method: 'post',
+    data: data
+  })
+}
+
+//化学品-详情
+export function laboratoryHazardDetail(query) {
+  return request({
+    url: '/laboratory/hazard/detail',
+    method: 'get',
+    params: query
+  })
+}
+
+
+
 // 查询危险源列表
 export function listHazard(query) {
   return request({

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

@@ -140,6 +140,14 @@ export function systemRoomInfoDetail(query) {
   })
 }
 /****************安全分类****************/
+//分类认定条件
+export function laboratoryClassTypeGetClassCriteria(query) {
+  return request({
+    url: '/laboratory/classType/getClassCriteria',
+    method: 'get',
+    params: query
+  })
+}
 //安全分类列表
 export function laboratoryClassTypeList(data) {
   return request({

+ 75 - 49
src/views/chemicalManage/earlyWarningEvent/index.vue

@@ -5,8 +5,8 @@
       <div class="page-form-title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="请选择学院" style="width: 200px">
+          <el-form-item label="" prop="deptId">
+            <el-select v-model="queryParams.deptId" placeholder="请选择学院" style="width: 200px">
               <el-option
                 v-for="item in deptOptions"
                 :key="item.deptId"
@@ -15,11 +15,11 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData3">
+          <el-form-item label="" prop="floorId">
             <el-cascader
               placeholder="请选择楼栋楼层"
-              :props="{value: 'id', label: 'name',children:'buildFloorVoList'}"
-              v-model="queryParams.queryParamsData3"
+              :props="{value: 'id', label: 'name',children:'buildFloorVoList',checkStrictly: true}"
+              v-model="queryParams.buildIdAndfloorId"
               :options="buildFloorOptions">
             </el-cascader>
           </el-form-item>
@@ -39,7 +39,7 @@
           <el-form-item label="" prop="queryParamsData1">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
+              v-model="queryParams.searchValue"
               placeholder="实验室/房间号/预警事件/姓名"
               style="width: 220px"
             />
@@ -52,26 +52,40 @@
         <el-table class="table-box" v-loading="loading" border :data="dataList">
           <el-table-column label="报警时间" prop="createTime" width="180" fixed show-overflow-tooltip>
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.createTime) }}</span>
+              <span>{{ parseTime(scope.row.warnTime) }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="预警类型" prop="content" width="200" fixed show-overflow-tooltip/>
-          <el-table-column label="预警事件" prop="name" width="625" show-overflow-tooltip/>
-          <el-table-column label="学院" prop="content" width="200" show-overflow-tooltip/>
-          <el-table-column label="楼栋楼层" prop="content" width="200" show-overflow-tooltip/>
-          <el-table-column label="实验室" prop="content" width="200" show-overflow-tooltip/>
-          <el-table-column label="安全员" prop="content" width="200" show-overflow-tooltip/>
+          <el-table-column label="预警类型" prop="content" width="200" fixed show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.warnType==1?'化学品预警':(scope.row.warnType==2?'气瓶预警':'算法预警')}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="预警事件" prop="warnContent" width="625" show-overflow-tooltip/>
+          <el-table-column label="学院" prop="deptName" width="200" show-overflow-tooltip/>
+          <el-table-column label="楼栋楼层" prop="content" width="200" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.buildName}}-{{scope.row.floorName}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="实验室" prop="content" width="200" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.subName}}-{{scope.row.roomNum}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="安全员" prop="safeInfoStr" width="200" show-overflow-tooltip/>
           <el-table-column label="操作" width="100" show-overflow-tooltip v-if="tableButtonType">
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
                    @click="tableButton(2,scope.row)"
-                   v-hasPermiRouter="['demo:demo:detail']"
+                   v-if="scope.row.noticeStatus==0"
+                   v-hasPermiRouter="['warning:event:edit']"
                 >处理</p>
                 <p class="table-button-p"
                    @click="tableButton(3,scope.row)"
-                   v-hasPermiRouter="['demo:demo:edit']"
+                   v-if="scope.row.noticeStatus!=0"
+                   v-hasPermiRouter="['warning:event:detail']"
                 >详情</p>
                 <p class="table-button-null"></p>
               </div>
@@ -91,11 +105,14 @@
   </div>
 </template>
 <script>
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
   import infoPage from "./infoPage.vue";
   import { getDeptDropList,systemBuildingGetTreeList,} from "@/api/commonality/permission";
+  import {
+    chemicalUserecordDetail,
+    systemWarningNoticeDetail,
+    systemWarningNoticeList,
+    systemWarningNoticeWarningDetail
+  } from '@/api/chemicalManage'
   export default {
     name: 'index',
     components: {
@@ -103,7 +120,7 @@
     },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        tableButtonType:this.hasPermiDom(['warning:event:edit','warning:event:detail']),
         //页面状态
         pageType:1,
         //页面遮罩
@@ -116,14 +133,15 @@
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
-          queryParamsData2 :null,
-          queryParamsData3 :null,
+          searchValue:"",
+          deptId :null,
+          buildId :null,
+          buildIdAndfloorId :[],
         },
         //时间数据
         dateRange:[],
         //列表数据
-        dataList:[{}],
+        dataList:[],
         //数据数量
         total:0,
         //组件传参
@@ -136,11 +154,19 @@
     mounted () {
       this.getDeptDropList();
       this.systemBuildingGetTreeList();
-      //this.getList();
+      this.getList();
     },
     methods: {
       //查询按钮
       handleQuery(){
+        if (this.queryParams.buildIdAndfloorId[0]){
+          if (this.queryParams.buildIdAndfloorId.length ==1){
+            this.$set(this.queryParams,'buildId',this.queryParams.buildIdAndfloorId[0]);
+          }else if (this.queryParams.buildIdAndfloorId.length ==2){
+            this.$set(this.queryParams,'buildId',this.queryParams.buildIdAndfloorId[0]);
+            this.$set(this.queryParams,'floorId',this.queryParams.buildIdAndfloorId[1]);
+          }
+        }
         this.$set(this.queryParams,'page',1);
         this.getList();
       },
@@ -150,40 +176,40 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
-          queryParamsData2 :null,
-          queryParamsData3 :null,
+          searchValue:"",
+          deptId :null,
+          buildId :null,
+          floorId :null,
+          buildIdAndfloorId :[],
         });
         this.getList();
       },
       //获取数据列表
       getList(){
-        // this.$set(this,'loading',true);
-        // let obj = JSON.parse(JSON.stringify(this.queryParams))
-        // if(this.dateRange[0]){
-        //   obj.startTime = this.dateRange[0]+'T00:00:00'
-        //   obj.endTime = this.dateRange[1]+'T23:59:59'
-        // }else{
-        //   obj.startTime = "";
-        //   obj.endTime = "";
-        // }
-        // getListFunction(obj).then(response => {
-        //   this.$set(this,'loading',false);
-        //   this.$set(this,'dataList',response.data.records);
-        //   this.$set(this,'total',response.data.total);
-        // });
+        this.$set(this,'loading',true);
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.startTime = this.dateRange[0]+'T00:00:00'
+          obj.endTime = this.dateRange[1]+'T23:59:59'
+        }else{
+          obj.startTime = "";
+          obj.endTime = "";
+        }
+        systemWarningNoticeList(obj).then(response => {
+          this.$set(this,'loading',false);
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
       },
       //操作按钮
       tableButton(type,row){
-        if(type == 2){
-          //处理
-          this.$set(this,'pageType',3);
-          this.$set(this,'propsData',row);
-        }else if(type == 3){
+        if(type == 2 || type == 3){
           //详情
-          this.$set(this,'pageType',3);
-          this.$set(this,'propsData',row);
-        }else if(type == 4){
+          systemWarningNoticeWarningDetail({id:row.noticeId}).then(response => {
+            this.$set(this,'propsData',JSON.parse(JSON.stringify(response.data)));
+            this.$set(this,'pageType',2);
+          });
+        }else if(type == 'out'){
           //返回并刷新
           this.$set(this,'pageType',1);
           this.getList();

+ 135 - 90
src/views/chemicalManage/earlyWarningEvent/infoPage.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="page-container earlyWarningEvent-infoPage">
     <div class="page-top-title-box">
-      <p class="page-top-title-name-p">{{infoData.infoType == 1?'处理':'详情'}}</p>
+      <p class="page-top-title-name-p">{{infoData.noticeStatus == 0?'处理':'详情'}}</p>
       <p class="page-top-title-out-p" @click="backPage">返回</p>
     </div>
     <div class="content-box scrollbar-box">
@@ -10,111 +10,187 @@
         <div class="text-max-box">
           <div class="text-left-box">
             <p>报警时间:</p>
-            <p>{{infoData.data1}}</p>
+            <p>{{infoData.warnTime}}</p>
           </div>
           <div class="text-center-box">
             <p>预警类型:</p>
-            <p>{{infoData.data2}}</p>
+            <p>{{infoData.warnType==1?'化学品预警':(infoData.warnType==2?'气瓶预警':'算法预警')}}</p>
           </div>
           <div class="text-right-box">
             <p>实验室负责人:</p>
-            <p>{{infoData.data3}}</p>
+            <p v-for="(item,index) in infoData.adminInfoList">{{item.userName}}-{{item.mobile}}</p>
           </div>
         </div>
         <div class="text-max-box">
           <div class="text-left-box">
             <p>学院:</p>
-            <p>{{infoData.data4}}</p>
+            <p>{{infoData.deptName}}</p>
           </div>
           <div class="text-center-box">
             <p>实验室:</p>
-            <p>{{infoData.data5}}</p>
+            <p>{{infoData.subName}}({{infoData.roomNum}})</p>
           </div>
           <div class="text-right-box">
             <p>安全员:</p>
-            <p>{{infoData.data6}}</p>
+            <p v-for="(item,index) in infoData.safeInfoList">{{item.userName}}-{{item.mobile}}</p>
           </div>
         </div>
         <div class="text-max-big-box">
           <div class="text-box">
             <p>预警事件:</p>
-            <p>{{infoData.data7}}</p>
+            <p>{{infoData.warnContent}}</p>
           </div>
         </div>
-        <p class="top-position-p" :class="infoData.infoType != 1?'position-type':''">{{infoData.infoType == 1?'待处理':'已处理'}}</p>
+        <p class="top-position-p" :class="infoData.noticeStatus != 0?'position-type':''">{{infoData.noticeStatus == 1?'已处理':'待处理'}}</p>
       </div>
-      <div class="bottom-max-big-box">
+      <!--化学品预警 -->
+      <div class="bottom-max-big-box" v-if="infoData.warnType==1">
         <p class="title-p">化学品信息</p>
-        <div class="text-max-box">
-          <div class="text-left-box">
-            <p style="width:96px;">化学品名称:</p>
-            <p>{{infoData.data8}}</p>
-          </div>
-          <div class="text-center-box">
-            <p>规格:</p>
-            <p>{{infoData.data9}}</p>
+        <!--列表 化学品1化学品违规带离。2超时未归还-->
+        <div v-if="infoData.chemicalWarnType==1 || infoData.chemicalWarnType==2">
+          <div class="text-max-box">
+            <div class="text-left-box">
+              <p style="width:96px;">化学品名称:</p>
+              <p>{{infoData.chemicalName}}</p>
+            </div>
+            <div class="text-center-box">
+              <p>规格:</p>
+              <p>{{infoData.normsNum}}</p>
+            </div>
+            <div class="text-right-box">
+              <p>存放位置:</p>
+              <p>{{infoData.position}}</p>
+            </div>
           </div>
-          <div class="text-right-box">
-            <p>存放位置:</p>
-            <p>{{infoData.data10}}</p>
+          <div class="text-max-box">
+            <div class="text-left-box">
+              <p style="width:96px;">余量:</p>
+              <p>{{infoData.surplus}}</p>
+            </div>
+            <div class="text-center-box">
+              <p>归属人:</p>
+              <p>{{infoData.belongName}}</p>
+            </div>
+            <div class="text-center-box" v-if="infoData.chemicalWarnType==2">
+              <p>领用人:</p>
+              <p>{{infoData.collectUserName}}</p>
+            </div>
           </div>
         </div>
-        <div class="text-max-box">
-          <div class="text-left-box">
-            <p style="width:96px;">余量:</p>
-            <p>{{infoData.data11}}</p>
+        <!--列表 化学品3化学品过期。4化学品即将过期-->
+        <div class="table-max-big-box" v-if="infoData.chemicalWarnType==3 || infoData.chemicalWarnType==4">
+          <el-table class="table-box" v-loading="loading" border :data="infoData.chemicalExpireList">
+            <el-table-column label="化学品名称" prop="chemicalName" fixed show-overflow-tooltip/>
+            <el-table-column label="规格" prop="normsNum" width="180" fixed show-overflow-tooltip/>
+            <el-table-column label="余量" prop="surplus" width="180" fixed show-overflow-tooltip/>
+            <el-table-column label="归属人" prop="belongName" width="220" fixed show-overflow-tooltip/>
+            <el-table-column label="过期时间" prop="expireTime" width="220" fixed show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{ parseTime(scope.row.expireTime) }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="存放位置" prop="position" width="220" show-overflow-tooltip/>
+          </el-table>
+        </div>
+        <!--列表 化学品3化学品过期。4化学品即将过期-->
+        <div class="table-max-big-box" v-if="infoData.chemicalWarnType==5">
+          <el-table class="table-box" v-loading="loading" border :data="infoData.chemicalOverdueStockList">
+            <el-table-column label="化学品名称" prop="chemicalName" fixed show-overflow-tooltip/>
+            <el-table-column label="CAS" prop="casNum" fixed show-overflow-tooltip/>
+            <el-table-column label="类别" prop="chemicalCategory" fixed show-overflow-tooltip/>
+            <el-table-column label="纯度" prop="chemicalPurity" fixed show-overflow-tooltip/>
+            <el-table-column label="规格" prop="normsNum"  fixed show-overflow-tooltip/>
+            <el-table-column label="数量" prop="applyNum"  fixed show-overflow-tooltip/>
+            <el-table-column label="归属人" prop="belongName"  fixed show-overflow-tooltip/>
+            <el-table-column label="学院" prop="deptName"  fixed show-overflow-tooltip/>
+            <el-table-column label="实验室" prop="subName"  fixed show-overflow-tooltip/>
+            <el-table-column label="类型" prop="source"  fixed show-overflow-tooltip/>
+            <el-table-column label="创建时间" prop="createTime"  fixed show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{ parseTime(scope.row.createTime) }}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <!--气瓶预警 -->
+      <div class="bottom-max-big-box" v-if="infoData.warnType==2">
+        <p class="title-p">气瓶信息</p>
+        <div>
+          <div class="text-max-box">
+            <div class="text-left-box">
+              <p style="width:96px;">气体名称:</p>
+              <p>{{infoData.airBottleName}}</p>
+            </div>
+            <div class="text-center-box">
+              <p>规格:</p>
+              <p>{{infoData.normsNum}}</p>
+            </div>
+            <div class="text-right-box">
+              <p>存放位置:</p>
+              <p>{{infoData.position}}</p>
+            </div>
           </div>
-          <div class="text-center-box">
-            <p>归属人:</p>
-            <p>{{infoData.data12}}</p>
+          <div class="text-max-box">
+            <div class="text-left-box">
+              <p style="width:96px;">余量:</p>
+              <p>{{infoData.surplus}}</p>
+            </div>
+            <div class="text-center-box">
+              <p>定位状态:</p>
+              <p>{{infoData.posiStatus}}</p>
+            </div>
           </div>
         </div>
+
+
       </div>
-      <div class="bottom-max-big-box">
+      <!--化学品报警抓拍 -->
+      <div class="bottom-max-big-box" v-if="(infoData.warnType==1&&infoData.noticeStatus==1) || infoData.warnType==2 ||infoData.warnType==3">
         <p class="title-p">报警抓拍</p>
         <div class="img-list-box">
-          <img v-for="(item,index) in infoData.data13" :key="index"
+          <img v-for="(item,index) in infoData.snapImg" :key="index"
                :src="item" @click="lookImg(index)">
         </div>
       </div>
       <div class="bottom-max-big-box ">
         <p class="title-p">通知记录</p>
         <div class="table-max-big-box">
-          <el-table class="table-box" v-loading="loading" border :data="infoData.data14">
+          <el-table class="table-box" v-loading="loading" border :data="infoData.warningNoticeLogVoList">
             <el-table-column label="通知时间" prop="createTime" width="200" fixed show-overflow-tooltip>
               <template slot-scope="scope">
-                <span>{{ parseTime(scope.row.createTime) }}</span>
+                <span>{{ parseTime(scope.row.noticeTime) }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="通知方式" prop="content" width="180" fixed show-overflow-tooltip/>
-            <el-table-column label="报警级别" prop="name" width="120" show-overflow-tooltip/>
-            <el-table-column label="通知人" prop="content" show-overflow-tooltip/>
+            <el-table-column label="通知方式" prop="noticeType" width="180" fixed show-overflow-tooltip/>
+            <el-table-column label="报警级别" prop="warningLevel" width="120" show-overflow-tooltip/>
+            <el-table-column label="通知人" prop="noticePreson" show-overflow-tooltip/>
           </el-table>
         </div>
       </div>
-      <div class="bottom-max-big-box">
+      <div class="bottom-max-big-box" v-if="infoData.warnType==1 || infoData.warnType==2">
         <p class="title-p">预警处理</p>
-        <div class="text-max-box" v-if="infoData.infoType != 1">
+        <div class="text-max-box" v-if="infoData.noticeStatus != 0">
           <div class="text-left-box">
-            <p>报警时间:</p>
-            <p>{{infoData.data15}}</p>
+            <p>处理方式:</p>
+            <p>{{infoData.handleType==1?'手动处理':(infoData.handleType==2?'归还操作':(infoData.handleType==3?'出库操作':(infoData.handleType==4?'入库操作':'')))}}</p>
           </div>
           <div class="text-center-box">
-            <p>预警类型:</p>
-            <p>{{infoData.data16}}</p>
+            <p>处理人:</p>
+            <p>{{infoData.handlePerson}}-{{infoData.handlePersonPhone}}</p>
           </div>
           <div class="text-right-box">
-            <p>实验室负责人:</p>
-            <p>{{infoData.data17}}</p>
+            <p>处理时间:</p>
+            <p>{{infoData.handleTime}}</p>
           </div>
         </div>
-        <div class="text-max-big-box" v-if="infoData.infoType != 1">
+        <div class="text-max-big-box" v-if="(infoData.warnType == 1 &&infoData.chemicalWarnType == 1) || infoData.warnType == 2">
           <div class="text-box">
             <p>处理备注:</p>
-            <p>{{infoData.data18}}</p>
+            <p>{{infoData.handleNotes}}</p>
           </div>
         </div>
-        <div class="form-max-box" v-if="infoData.infoType == 1">
+        <div class="form-max-box" v-if="infoData.noticeStatus == 0">
           <div class="text-max-box">
             <div class="text-left-box">
               <p>处理方式:</p>
@@ -124,7 +200,7 @@
           <el-form :model="infoDataForm" ref="form" label-width="0">
             <el-form-item label="" prop="name">
               <span style="font-size:16px;">处理备注:</span>
-              <el-input v-model="infoDataForm.name" placeholder="请输入名称" maxLength="70" style="width:1325px;"></el-input>
+              <el-input v-model="infoDataForm.handleNotes" placeholder="请输入名称" maxLength="70" style="width:1325px;"></el-input>
             </el-form-item>
           </el-form>
           <div class="button-bottom-box">
@@ -141,10 +217,8 @@
 </template>
 
 <script>
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
   import fullScreenView from "@/components/fullScreenView/fullScreenView.vue";
+  import { systemWarningNoticeHandleMessage, systemWarningNoticeWarningHandleMessage } from '@/api/chemicalManage'
   export default {
     name: 'infoPage',
     components: {
@@ -155,35 +229,13 @@
     },
     data(){
       return{
+        loading:false,
         showType:false,
         infoData:{
-          infoType:1,
-          data1:'2023-05-27 14:46:18',
-          data2:'化学品',
-          data3:'李苗苗-13255668899、李苗苗-13255668899',
-          data4:'学员名称',
-          data5:'实验室名称(房间号)',
-          data6:'李苗苗-13255668899、李苗苗-13255668899',
-          data7:'【化学品预警】化学品名称(编码)-违规携带离开实验室名称(房间号),请尽快确认!',
-          data8:'2023-05-27 14:46:18',
-          data9:'500ml/瓶',
-          data10:'化学品柜-柜门-柜层',
-          data11:'300ml',
-          data12:'姓名-联系电话',
-          data13:[
-            'https://img1.baidu.com/it/u=1422064840,2936115861&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500',
-            'https://img1.baidu.com/it/u=716638254,3920932970&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
-            'https://img2.baidu.com/it/u=2537370952,3446004972&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500',
-            'https://img2.baidu.com/it/u=2312383180,3750420672&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800',
-          ],
-          data14:[],
-          data15:'归还操作',
-          data16:'姓名-联系电话',
-          data17:'2023-05-27 14:46:18',
-          data18:'手动处理输入的备注内容手动处理输入的备注内容手动处理输入的备注内容手动处理输入的备注内容手动处理输入的备注内容手动处理输入的备注内容手动处理输入的备注内容'
         },
         infoDataForm:{
-          remark:"",
+          noticeId:'',
+          handleNotes:"",
         },
       }
     },
@@ -191,31 +243,24 @@
       this.initialize();
     },
     mounted(){
-
+      this.infoData=this.propsData;
+      this.$set(this.infoDataForm,'noticeId',this.propsData.noticeId);
     },
     methods:{
       //初始化
       initialize(){
-        // this.$set(this,'showType',this.propsData.showType);
-        // if(this.propsData.id){
-        //   let obj = {
-        //     id:this.propsData.id,
-        //     name:this.propsData.name,
-        //   };
-        //   this.$set(this,'infoData',obj);
-        // }else{
-        //   this.$set(this,'infoData',{
-        //     name:"",
-        //   });
-        // }
       },
       // 返回按钮
       backPage(){
-        this.$parent.tableButton(4);
+        this.$parent.tableButton('out');
       },
       /** 提交按钮 */
       submitForm() {
-
+        let self=this;
+        systemWarningNoticeWarningHandleMessage(self.infoDataForm).then( response => {
+          self.msgSuccess("成功")
+          self.$parent.tableButton('out');
+        });
       },
       // 照片预览
       lookImg(index){

+ 105 - 71
src/views/chemicalManage/inventoryManagement/saveRecord/index.vue

@@ -5,8 +5,8 @@
       <div class="page-form-title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2"
+          <el-form-item label="" prop="deptId">
+            <el-select v-model="queryParams.deptId"
                        placeholder="请选择学院"
                        style="width: 140px">
               <el-option
@@ -17,21 +17,19 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData3">
+          <el-form-item label="" prop="floorId">
             <el-cascader
-              style="width: 150px"
+              style="width: 120px"
               placeholder="请选择楼栋楼层"
-              :props="{value: 'id', label: 'name',children:'buildFloorVoList'}"
-              v-model="queryParams.queryParamsData3"
+              :props="{value: 'id', label: 'name',children:'buildFloorVoList',checkStrictly: true}"
+              v-model="queryParams.buildIdAndfloorId"
               :options="buildFloorOptions">
             </el-cascader>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData4">
-            <el-select v-model="queryParams.queryParamsData4"
-                       placeholder="请选择类别"
-                       style="width: 120px">
+          <el-form-item label="" prop="chemicalCategory">
+            <el-select v-model="queryParams.chemicalCategory"  placeholder="请选择类别" style="width: 120px">
               <el-option
-                v-for="dict in optionList"
+                v-for="dict in categoryOptions"
                 :key="dict.value"
                 :label="dict.label"
                 :value="dict.value"
@@ -42,16 +40,16 @@
             <el-select
               style="width:180px;"
               @change="selectChange"
-              v-model="queryParams.queryParamsData5"
+              v-model="queryParams.cabinetId"
               filterable
               remote
               placeholder="请搜索化学品柜"
               :remote-method="searchSelectList">
               <el-option
                 v-for="item in searchOptions"
-                :key="item.userId"
-                :label="item.userName"
-                :value="item.userId">
+                :key="item.cabinetId"
+                :label="item.cabinetName"
+                :value="item.cabinetId">
               </el-option>
             </el-select>
           </el-form-item>
@@ -60,7 +58,7 @@
               :clearable="false"
               v-model="dateRange"
               size="small"
-              style="width: 220px"
+              style="width: 200px"
               value-format="yyyy-MM-dd"
               type="daterange"
               range-separator="-"
@@ -71,7 +69,7 @@
           <el-form-item label="" prop="queryParamsData1">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
+              v-model="queryParams.searchValue"
               placeholder="化学品名/CAS/编码/实验室/房间号/姓名/联系方式/课题组"
               style="width: 390px"
             />
@@ -87,23 +85,39 @@
         <el-table class="table-box" v-loading="loading" border :data="dataList"
                   @selection-change="handleSelectionChange" :row-key="getRowKeys">
           <el-table-column type="selection" width="50" align="center" fixed :reserve-selection="true"/>
-          <el-table-column label="名称" prop="name" width="150" fixed show-overflow-tooltip/>
-          <el-table-column label="CAS" prop="content" width="120" show-overflow-tooltip/>
-          <el-table-column label="类别" prop="content" width="120" show-overflow-tooltip/>
-          <el-table-column label="实验室" prop="content" width="230" show-overflow-tooltip/>
-          <el-table-column label="安全员" prop="content" width="150" show-overflow-tooltip/>
-          <el-table-column label="存储位置" prop="content" width="240" show-overflow-tooltip/>
-          <el-table-column label="规格" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="数量" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="称重方式" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="入库时间" prop="createTime" width="150" show-overflow-tooltip>
+          <el-table-column label="名称" prop="chemicalName" width="150" fixed show-overflow-tooltip/>
+          <el-table-column label="CAS" prop="casNum" width="120" show-overflow-tooltip/>
+          <el-table-column label="类别" prop="chemicalCategoryName" width="120" show-overflow-tooltip/>
+          <el-table-column label="实验室" prop="content" width="230" show-overflow-tooltip>
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.createTime) }}</span>
+              <span>{{scope.row.subName}}({{scope.row.subRoom}})</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="安全员" prop="safeUser" width="150" show-overflow-tooltip/>
+          <el-table-column label="存储位置" prop="position" width="240" show-overflow-tooltip/>
+          <el-table-column label="规格" prop="specNum" width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.specNum}}-{{scope.row.specUnit}}-{{scope.row.packUnit}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="数量" prop="chemicalNumber" width="100" show-overflow-tooltip/>
+          <el-table-column label="称重方式" prop="content" width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.joinType==1?'手动称重':'自动称重'}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="入库时间" prop="joinTime" width="150" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.joinTime) }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="归属人" prop="belongName" width="150" show-overflow-tooltip/>
+          <el-table-column label="操作人" prop="createByName" width="100" show-overflow-tooltip/>
+          <el-table-column label="双人认证" prop="content" width="180" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.oneUserName}} {{scope.row.twoUserName}}</span>
             </template>
           </el-table-column>
-          <el-table-column label="归属人" prop="content" width="150" show-overflow-tooltip/>
-          <el-table-column label="操作人" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="双人认证" prop="content" width="180" show-overflow-tooltip/>
         </el-table>
         <div class="selected-num-box" v-show="total>0">
           <p class="selected-num-p">
@@ -123,12 +137,10 @@
   </div>
 </template>
 <script>
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
-  //import addPage from "./addPage.vue";
   import exportComponent from "@/components/exportComponent/exportComponent.vue";
   import { getDeptDropList,systemBuildingGetTreeList,} from "@/api/commonality/permission";
+  import { chemicalCabinetSelect, chemicalStockListIn } from '@/api/chemicalManage'
+  import { getDicts } from '@/api/commonality/noPermission'
   export default {
     name: 'index',
     components: {
@@ -138,9 +150,9 @@
       return {
         //导出配置
         exportConfig:{
-          api:'system/user/student/export',             //导出接口地址
+          api:'chemical/stock/exportIn',             //导出接口地址
           ids:'',                                       //勾选导出,勾选的IDS
-          fileName:'化学品信息',                         //导出文件的命名
+          fileName:'入库纪录',                         //导出文件的命名
         },
         tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
         //页面状态
@@ -153,19 +165,24 @@
         buildFloorOptions:[],
         //搜索化学品柜
         searchOptions:[],
+        categoryOptions:[],
         //下拉列表数据
         optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
         //查询条件
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+         // flg :'rk',
+          deptId :null,
+          buildId :null,
+          buildIdAndfloorId :[],
+          searchValue:'',
+          cabinetId:'',
         },
         //时间数据
         dateRange:[],
         //列表数据
-        dataList:[{},{},{},{},],
+        dataList:[],
         //数据数量
         total:10,
         // 选中数组
@@ -181,12 +198,21 @@
     },
     mounted () {
       this.getDeptDropList();
+      this.getDicts();
       this.systemBuildingGetTreeList();
       this.getList();
     },
     methods: {
       //查询按钮
       handleQuery(){
+        if (this.queryParams.buildIdAndfloorId[0]){
+          if (this.queryParams.buildIdAndfloorId.length ==1){
+            this.$set(this.queryParams,'buildId',this.queryParams.buildIdAndfloorId[0]);
+          }else if (this.queryParams.buildIdAndfloorId.length ==2){
+            this.$set(this.queryParams,'buildId',this.queryParams.buildIdAndfloorId[0]);
+            this.$set(this.queryParams,'floorId',this.queryParams.buildIdAndfloorId[1]);
+          }
+        }
         this.$set(this.queryParams,'page',1);
         this.getList();
       },
@@ -196,30 +222,38 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
-          queryParamsData2 :null,
-          queryParamsData3 :null,
-          queryParamsData4 :null,
-          queryParamsData5 :null,
+          flg :'rk',
+          deptId :null,
+          buildId :null,
+          floorId :null,
+          buildIdAndfloorId :[],
+          searchValue:'',
+          cabinetId:'',
         });
         this.getList();
       },
+      //获取化学品类别
+      getDicts(){
+        getDicts('chemicals_category').then(response => {
+          this.$set(this,'categoryOptions',response.data);
+        });
+      },
       //获取数据列表
       getList(){
-        // this.$set(this,'loading',true);
-        // let obj = JSON.parse(JSON.stringify(this.queryParams))
-        // if(this.dateRange[0]){
-        //   obj.startTime = this.dateRange[0]+'T00:00:00'
-        //   obj.endTime = this.dateRange[1]+'T23:59:59'
-        // }else{
-        //   obj.startTime = "";
-        //   obj.endTime = "";
-        // }
-        // getListFunction(obj).then(response => {
-        //   this.$set(this,'loading',false);
-        //   this.$set(this,'dataList',response.data.records);
-        //   this.$set(this,'total',response.data.total);
-        // });
+        this.$set(this,'loading',true);
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.startTime = this.dateRange[0]+'T00:00:00'
+          obj.endTime = this.dateRange[1]+'T23:59:59'
+        }else{
+          obj.startTime = "";
+          obj.endTime = "";
+        }
+        chemicalStockListIn(obj).then(response => {
+          this.$set(this,'loading',false);
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
       },
       //查询学院列表
       getDeptDropList(){
@@ -265,22 +299,21 @@
       //搜索化学品柜
       searchSelectList(query) {
         if (query !== '' && query.length>1) {
-          // this.loading = true;
-          // let obj = {
-          //   userName : query,
-          //   userType: 2,
-          //   pageSize: -1,
-          // };
-          // systemUserList(obj).then(response => {
-          //   this.optionsUser = response.data.records;
-          //   this.loading = false;
-          // });
+          this.loading = true;
+          let obj = {
+            userName : query,
+            userType: 2,
+            pageSize: -1,
+          };
+          chemicalCabinetSelect({searchValue:query}).then(response => {
+            this.searchOptions = response.data;
+            this.loading = false;
+          });
         } else {
-          this.optionsUser = [];
+          this.searchOptions = [];
         }
       },
       //化学品柜选中
-      //人员选中
       selectChange(data){
         let self = this;
         // for(let i=0;i<self.optionsUser.length;i++){
@@ -306,6 +339,7 @@
       handleSelectionChange(selection) {
         this.selectedNum = selection.length;
         this.ids = selection.map(item => item.id)
+        this.exportConfig.ids=this.ids;
         this.multiple = !selection.length
       },
     },

+ 113 - 71
src/views/chemicalManage/inventoryManagement/takeRecord/index.vue

@@ -5,10 +5,10 @@
       <div class="page-form-title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2"
+          <el-form-item label="" prop="deptId">
+            <el-select v-model="queryParams.deptId"
                        placeholder="请选择学院"
-                       style="width: 120px">
+                       style="width: 140px">
               <el-option
                 v-for="item in deptOptions"
                 :key="item.deptId"
@@ -17,29 +17,27 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData3">
+          <el-form-item label="" prop="floorId">
             <el-cascader
-              style="width: 150px"
+              style="width: 120px"
               placeholder="请选择楼栋楼层"
-              :props="{value: 'id', label: 'name',children:'buildFloorVoList'}"
-              v-model="queryParams.queryParamsData3"
+              :props="{value: 'id', label: 'name',children:'buildFloorVoList',checkStrictly: true}"
+              v-model="queryParams.buildIdAndfloorId"
               :options="buildFloorOptions">
             </el-cascader>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData4">
-            <el-select v-model="queryParams.queryParamsData4"
-                       placeholder="请选择类别"
-                       style="width: 120px">
+          <el-form-item label="" prop="chemicalCategory">
+            <el-select v-model="queryParams.chemicalCategory"  placeholder="请选择类别" style="width: 120px">
               <el-option
-                v-for="dict in optionList"
+                v-for="dict in categoryOptions"
                 :key="dict.value"
                 :label="dict.label"
                 :value="dict.value"
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData4">
-            <el-select v-model="queryParams.queryParamsData4"
+          <el-form-item label="" prop="status">
+            <el-select v-model="queryParams.status"
                        placeholder="请选择出库方式"
                        style="width: 144px">
               <el-option
@@ -54,16 +52,16 @@
             <el-select
               style="width:145px;"
               @change="selectChange"
-              v-model="queryParams.queryParamsData5"
+              v-model="queryParams.cabinetId"
               filterable
               remote
               placeholder="请搜索化学品柜"
               :remote-method="searchSelectList">
               <el-option
                 v-for="item in searchOptions"
-                :key="item.userId"
-                :label="item.userName"
-                :value="item.userId">
+                :key="item.cabinetId"
+                :label="item.cabinetName"
+                :value="item.cabinetId">
               </el-option>
             </el-select>
           </el-form-item>
@@ -80,10 +78,10 @@
               end-placeholder="结束时间"
             ></el-date-picker>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData1">
+          <el-form-item label="" prop="searchValue">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
+              v-model="queryParams.searchValue"
               placeholder="化学品名/CAS/编码/实验室/房间号/姓名/课题组"
               style="width: 324px"
             />
@@ -99,24 +97,42 @@
         <el-table class="table-box" v-loading="loading" border :data="dataList"
                   @selection-change="handleSelectionChange" :row-key="getRowKeys">
           <el-table-column type="selection" width="50" align="center" fixed :reserve-selection="true"/>
-          <el-table-column label="名称" prop="name" width="150" fixed show-overflow-tooltip/>
-          <el-table-column label="编码" prop="content" width="120" show-overflow-tooltip/>
-          <el-table-column label="类别" prop="content" width="120" show-overflow-tooltip/>
-          <el-table-column label="实验室" prop="content" width="230" show-overflow-tooltip/>
-          <el-table-column label="安全员" prop="content" width="150" show-overflow-tooltip/>
-          <el-table-column label="存储位置" prop="content" width="240" show-overflow-tooltip/>
-          <el-table-column label="规格" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="出库量" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="出库方式" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="称重方式" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="出库时间" prop="createTime" width="150" show-overflow-tooltip>
+          <el-table-column label="名称" prop="chemicalName" width="150" fixed show-overflow-tooltip/>
+          <el-table-column label="编码" prop="tagCode" width="120" show-overflow-tooltip/>
+          <el-table-column label="类别" prop="chemicalCategoryName" width="120" show-overflow-tooltip/>
+          <el-table-column label="实验室" prop="content" width="230" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.subName}}({{scope.row.subRoom}})</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="安全员" prop="safeUser" width="150" show-overflow-tooltip/>
+          <el-table-column label="存储位置" prop="position" width="240" show-overflow-tooltip/>
+          <el-table-column label="规格" prop="specNum" width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.specNum}}-{{scope.row.specUnit}}-{{scope.row.packUnit}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="出库量" prop="surplus" width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.surplus}}{{scope.row.specUnit}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="出库方式" prop="content" width="100" show-overflow-tooltip>
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.createTime) }}</span>
+              <span>{{scope.row.status==2?'用结出库':(scope.row.status==3?'作废出库':(scope.row.status==4?'整瓶领用':''))}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="出库时间" prop="outTime" width="150" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.outTime) }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作人" prop="createByName" width="100" show-overflow-tooltip/>
+          <el-table-column label="双人认证" prop="content" width="180" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.oneUserName}} {{scope.row.twoUserName}}</span>
             </template>
           </el-table-column>
-          <el-table-column label="归属人" prop="content" width="150" show-overflow-tooltip/>
-          <el-table-column label="操作人" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="双人认证" prop="content" width="180" show-overflow-tooltip/>
         </el-table>
         <div class="selected-num-box" v-show="total>0">
           <p class="selected-num-p">
@@ -136,12 +152,10 @@
   </div>
 </template>
 <script>
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
-  //import addPage from "./addPage.vue";
   import exportComponent from "@/components/exportComponent/exportComponent.vue";
   import { getDeptDropList,systemBuildingGetTreeList,} from "@/api/commonality/permission";
+  import { chemicalCabinetSelect, chemicalStockListOut } from '@/api/chemicalManage'
+  import { getDicts } from '@/api/commonality/noPermission'
   export default {
     name: 'index',
     components: {
@@ -151,9 +165,9 @@
       return {
         //导出配置
         exportConfig:{
-          api:'system/user/student/export',             //导出接口地址
+          api:'chemical/stock/exportOut',             //导出接口地址
           ids:'',                                       //勾选导出,勾选的IDS
-          fileName:'化学品信息',                         //导出文件的命名
+          fileName:'出库记录',                         //导出文件的命名
         },
         tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
         //页面状态
@@ -166,14 +180,20 @@
         buildFloorOptions:[],
         //搜索化学品柜
         searchOptions:[],
+        categoryOptions:[],
         //下拉列表数据
-        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        optionList:[{value:2,label:'用结出库'},{value:3,label:'作废出库'},{value:4,label:'整瓶领用'}],
         //查询条件
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          // flg :'ck',
+          deptId :null,
+          buildId :null,
+          buildIdAndfloorId :[],
+          searchValue:'',
+          cabinetId:'',
+          status:'',
         },
         //时间数据
         dateRange:[],
@@ -195,11 +215,20 @@
     mounted () {
       this.getDeptDropList();
       this.systemBuildingGetTreeList();
+      this.getDicts();
       this.getList();
     },
     methods: {
       //查询按钮
       handleQuery(){
+        if (this.queryParams.buildIdAndfloorId[0]){
+          if (this.queryParams.buildIdAndfloorId.length ==1){
+            this.$set(this.queryParams,'buildId',this.queryParams.buildIdAndfloorId[0]);
+          }else if (this.queryParams.buildIdAndfloorId.length ==2){
+            this.$set(this.queryParams,'buildId',this.queryParams.buildIdAndfloorId[0]);
+            this.$set(this.queryParams,'floorId',this.queryParams.buildIdAndfloorId[1]);
+          }
+        }
         this.$set(this.queryParams,'page',1);
         this.getList();
       },
@@ -209,27 +238,39 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          flg :'ck',
+          deptId :null,
+          buildId :null,
+          floorId :null,
+          buildIdAndfloorId :[],
+          searchValue:'',
+          cabinetId:'',
+          status:'',
         });
         this.getList();
       },
+      //获取化学品类别
+      getDicts(){
+        getDicts('chemicals_category').then(response => {
+          this.$set(this,'categoryOptions',response.data);
+        });
+      },
       //获取数据列表
       getList(){
-        // this.$set(this,'loading',true);
-        // let obj = JSON.parse(JSON.stringify(this.queryParams))
-        // if(this.dateRange[0]){
-        //   obj.startTime = this.dateRange[0]+'T00:00:00'
-        //   obj.endTime = this.dateRange[1]+'T23:59:59'
-        // }else{
-        //   obj.startTime = "";
-        //   obj.endTime = "";
-        // }
-        // getListFunction(obj).then(response => {
-        //   this.$set(this,'loading',false);
-        //   this.$set(this,'dataList',response.data.records);
-        //   this.$set(this,'total',response.data.total);
-        // });
+        this.$set(this,'loading',true);
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.startTime = this.dateRange[0]+'T00:00:00'
+          obj.endTime = this.dateRange[1]+'T23:59:59'
+        }else{
+          obj.startTime = "";
+          obj.endTime = "";
+        }
+        chemicalStockListOut(obj).then(response => {
+          this.$set(this,'loading',false);
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
       },
       //查询学院列表
       getDeptDropList(){
@@ -275,18 +316,18 @@
       //搜索化学品柜
       searchSelectList(query) {
         if (query !== '' && query.length>1) {
-          // this.loading = true;
-          // let obj = {
-          //   userName : query,
-          //   userType: 2,
-          //   pageSize: -1,
-          // };
-          // systemUserList(obj).then(response => {
-          //   this.optionsUser = response.data.records;
-          //   this.loading = false;
-          // });
+          this.loading = true;
+          let obj = {
+            userName : query,
+            userType: 2,
+            pageSize: -1,
+          };
+          chemicalCabinetSelect({searchValue:query}).then(response => {
+            this.searchOptions = response.data;
+            this.loading = false;
+          });
         } else {
-          this.optionsUser = [];
+          this.searchOptions = [];
         }
       },
       //化学品柜选中
@@ -316,6 +357,7 @@
       handleSelectionChange(selection) {
         this.selectedNum = selection.length;
         this.ids = selection.map(item => item.id)
+        this.exportConfig.ids=this.ids;
         this.multiple = !selection.length
       },
     },

+ 111 - 127
src/views/hazardManagement/hazard/addLaboratory.vue

@@ -1,10 +1,15 @@
 <!--新增危险源-->
 <template>
-  <div class="addLaboratory scrollbar-box" v-if="getType">
-    <!--<p class="title-p color_one">添加危险源</p>-->
-    <el-form :model="form" ref="form" :rules="rules" label-position="right" label-width="120px">
-      <el-form-item label="危险源名称:" prop="chName" style="margin-bottom:40px;">
+  <div class="page-container addLaboratory">
+    <div class="page-top-title-box">
+      <p class="page-top-title-name-p">{{form.cabinetId?'编辑危险源':'新增危险源'}}</p>
+      <p class="page-top-title-out-p" @click="backPage">返回</p>
+      <p class="page-top-title-submit-p" @click="previewButton">提交</p>
+    </div>
+    <el-form :model="form" ref="form" :rules="rules" label-position="right" label-width="120px" style="margin-top: 46px">
+      <el-form-item label="名称:" prop="chName">
         <el-input
+          style=width:600px;
           v-model="form.chName"
           maxlength="20"
           placeholder="请输入危险源名称"
@@ -12,28 +17,39 @@
           size="small"
         />
       </el-form-item>
-      <el-form-item label="型号:" prop="code" style="margin-bottom:40px;">
+      <el-form-item label="编号:" prop="hazardCode">
         <el-input
-          v-model="form.code"
+          style=width:600px;
+          v-model="form.hazardCode"
           maxlength="10"
-          placeholder="请输入号"
+          placeholder="请输入危险源编号"
           clearable
           size="small"
         />
       </el-form-item>
-      <el-form-item label="危险源类型:" prop="hazardTypeMode">
-        <el-select v-model="form.hazardTypeMode" placeholder="请选择">
-          <el-option :label="item.dictLabel" :value="item.dictValue" v-for="(item,index) in materialTypeList" :key="index"></el-option>
+      <el-form-item label="大分类:" prop="bigTypeValue">
+        <el-select v-model="form.bigTypeValue" clearable placeholder="请选择大分类" @change="bigClassifyChange()" style="width: 600px">
+          <el-option
+            v-for="dict in bigClassifyOptions"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="小分类:" prop="smallTypeValue">
+        <el-select v-model="form.smallTypeValue" clearable placeholder="请选择大分类"  @change="smallClassifyChange()" style="width: 600px">
+          <el-option
+            v-for="dict in smallClassifyOptions"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="详情:" prop="content">
         <UEditor ref="UEditor" :content="form.content" :min-height="192" />
-        <!--<ueditortwo :config=config ref="ueditor"></ueditortwo>-->
       </el-form-item>
-      <div class="button-box">
-        <el-button class="color_99" @click="leftButtonClick">取消</el-button>
-        <el-button class="color_ff back_one" @click="previewButton">提交</el-button>
-      </div>
     </el-form>
     <el-dialog title="预览" class="richTextDialog" v-if="richTextDialogType" :close-on-click-modal="false" :visible.sync="richTextDialogType" append-to-body>
       <div class="button-max-box">
@@ -45,7 +61,7 @@
             :value="item.key">
           </el-option>
         </el-select>
-        <p class="add-button-one-90" style="margin-left:20px;" @click="rightButtonClick">提交</p>
+        <p class="page-inquire-common-style-button" style="margin-left:20px;" @click="rightButtonClick">提交</p>
       </div>
       <div class="text-max-box" :class="previewKey!=2?'move-text-max-box':''">
         <p class="text-max-null-p"></p>
@@ -59,36 +75,44 @@
 </template>
 
 <script>
-import { getHazard, addHazard, updateHazard,dangerList, gasCategoryList } from "@/api/hazardManagement/index";
+import {
+  laboratoryHazardAdd, laboratoryHazardUpdate
+} from '@/api/hazardManagement/index'
+import { getDicts } from '@/api/commonality/noPermission'
 export default {
   props:{
-    hazardId: null,
+    propsData: null,
   },
   name: 'addLaboratory',
   data() {
     return {
-      getType:false,
-      form:{
-        content:'',
-      },
+      form:{},
+      //大分类
+      bigClassifyOptions:[],
+      //小分类
+      smallClassifyOptions:[],
       // 表单校验
       rules: {
         chName: [
-          { required: true, message: "请输入标题", trigger: "blur" },
-          { required: true, message: "请输入标题", validator: this.spaceJudgment, trigger: "blur" }
+          { required: true, message: "请输入危险源名称", trigger: "blur" },
+          { required: true, message: "请输入危险源名称", validator: this.spaceJudgment, trigger: "blur" }
+        ],
+        hazardCode: [
+          { required: true, message: "请输入危险源编号", trigger: "blur" },
+          { required: true, message: "请输入危险源编号", validator: this.spaceJudgment, trigger: "blur" }
+        ],
+        bigTypeValue: [
+          { required: true, message: "请选择大分类", trigger: "blur" },
+          { required: true, message: "请选择大分类", validator: this.spaceJudgment, trigger: "blur" }
         ],
-        code: [
-          { required: true, message: "请输入编号", trigger: "blur" },
-          { required: true, message: "请输入编号", validator: this.spaceJudgment, trigger: "blur" }
+        smallTypeValue: [
+          { required: true, message: "请选择小分类", trigger: "blur" },
+          { required: true, message: "请选择小分类", validator: this.spaceJudgment, trigger: "blur" }
         ],
         content: [
           { required: true, message: "请编辑详情", trigger: "change" },
           { required: true, message: "请编辑详情", validator: this.spaceJudgmentHTML, trigger: "blur" }
         ],
-        hazardTypeMode: [
-          { required: true, message: "请选择危险源类型", trigger: "change" },
-          { required: true, message: "请选择危险源类型", validator: this.spaceJudgmentHTML, trigger: "blur" }
-        ],
 
 
       },
@@ -105,24 +129,9 @@ export default {
         serverUrl: '//'+this.judgmentNetworkReturnAddress()+'/base/exec',
         UEDITOR_HOME_URL: '/public/ueditor-1.4.3.3/'
       },
-      materialTypeList:[],
       richTextDialogType:false,
       previewKey:0,
       previewSetList:[
-        // {
-        //   key:0,
-        //   name:"iphone 12 pro",
-        //   width:390,
-        //   height:884,
-        //   scale:0.203125,
-        // },
-        // {
-        //   key:1,
-        //   name:"iphone XR",
-        //   width:414,
-        //   height:896,
-        //   scale:0.215625,
-        // },
         {
           key:0,
           name:"iphone SE",
@@ -130,13 +139,6 @@ export default {
           height:667,
           scale:0.195312,
         },
-        // {
-        //   key:3,
-        //   name:"Samsung Galaxy A51/71",
-        //   width:412,
-        //   height:914,
-        //   scale:0.214583,
-        // },
         {
           key:1,
           name:"Samsung Galaxy S8+",
@@ -144,13 +146,6 @@ export default {
           height:740,
           scale:0.1875,
         },
-        // {
-        //   key:5,
-        //   name:"Samsung Galaxy S20",
-        //   width:412,
-        //   height:915,
-        //   scale:0.214583,
-        // },
         {
           key:2,
           name:"化学品终端",
@@ -163,18 +158,60 @@ export default {
     }
   },
   created() {
-    this.form.id = this.hazardId
-    if(this.form.id){
-      this.handleUpdate()
+    if(this.propsData){
+      this.getSmallDicts(this.propsData.bigTypeValue)
+      this.form = this.propsData
+      this.form.content = unescape(this.form.content);
+
     }else{
-      this.getType = true;
+      this.form={
+        chName: '',
+        hazardCode: '',
+        bigTypeValue: '',
+        smallTypeValue: '',
+        content: '',
+      }
     }
-
-    this.getDicts("combustibility").then(response => {
-      this.combustibilitys= response.data;
-    })
+  },
+  mounted() {
+    this.getBigDicts();
   },
   methods: {
+    //大分类字典
+    getBigDicts(){
+      getDicts('classification_items').then(response => {
+        this.$set(this,'bigClassifyOptions',response.data);
+      });
+    },
+    //小分类字典
+    getSmallDicts(val){
+      getDicts(val).then(response => {
+        this.$set(this,'smallClassifyOptions',response.data);
+      });
+    },
+    //大分类选中
+    bigClassifyChange(){
+      let self=this;
+      for (let i=0;i<this.bigClassifyOptions.length;i++){
+        if (this.form.bigTypeValue==this.bigClassifyOptions[i].value){
+          this.$set(this.form,'bigTypeName',this.bigClassifyOptions[i].label);
+        }
+      }
+      this.getSmallDicts(this.form.bigTypeValue)
+    },
+    //小分类选中
+    smallClassifyChange(){
+      let self=this;
+      for (let i=0;i<this.smallClassifyOptions.length;i++){
+        if (this.form.smallTypeValue==this.smallClassifyOptions[i].value){
+          this.$set(this.form,'smallTypeName',this.smallClassifyOptions[i].label);
+        }
+      }
+    },
+    // 返回按钮
+    backPage(){
+      this.$parent.tableButton('out','');
+    },
     //预览
     previewButton(){
       this.$set(this.form,'content',this.$refs.UEditor.text);
@@ -184,56 +221,29 @@ export default {
           this.richTextDialogType = !this.richTextDialogType
         }
       });
-      // if(this.$refs.UEditor.text){
-      //   this.$set(this,'text',this.$refs.UEditor.text);
-      //   this.richTextDialogType = !this.richTextDialogType
-      // }else{
-      //   this.msgError('请编辑内容')
-      // }
-    },
-    //获取危险源类型
-    dangerList(){
-      let _this=this;
-      dangerList().then( response => {
-        let res=response.rows;
-        _this.materialTypeList=res;
-      });
-    },
-    leftButtonClick(){
-      this.$parent.offLaboratoryButton();
     },
     rightButtonClick(){
       this.$set(this.form,'content',this.$refs.UEditor.text||"");
       this.form.content = this.$refs.UEditor.text;
       this.submitForm()
     },
-    /** 修改按钮操作 */
-    handleUpdate() {
-      getHazard(this.form.id).then(response => {
-        this.form = response.data;
-        this.form.hazardTypeMode=response.data.hazardTypeMode+''
-        this.form.content = unescape(response.data.content);
-        this.getType = true;
-      });
-    },
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
           this.form.content = escape(this.form.content);
-          // this.form.ignitionPoint = this.form.ignitionPoint + '℃';
-          if (this.form.id != null) {
-            updateHazard(this.form).then(response => {
+          if (this.form.hazardId) {
+            laboratoryHazardUpdate(this.form).then(response => {
               if(response.code = 200){
                 this.msgSuccess("修改成功");
-                this.$parent.clickPageTypeOne()
+                this.backPage()
               }
             });
           } else {
-            addHazard(this.form).then(response => {
+            laboratoryHazardAdd(this.form).then(response => {
               if(response.code = 200){
                 this.msgSuccess("新增成功");
-                this.$parent.clickPageTypeOne()
+                this.backPage()
               }
             });
           }
@@ -241,38 +251,12 @@ export default {
       });
     },
   },
-  mounted() {
-    this.dangerList();
-  }
+
 }
 </script>
 
 <style lang="scss" scoped>
 .addLaboratory{
-  padding:40px 20px;
-  .button-box{
-    margin:0 auto;
-    width:220px;
-    display: flex;
-    p{
-      cursor:pointer;
-      width: 100px;
-      height:40px;
-      line-height:40px;
-      font-size:14px;
-      text-align: center;
-    }
-    p:nth-child(1){
-      margin-right:20px;
-      color:#999;
-      background:#e0e0e0;
-      border-radius:4px;
-    }
-    p:nth-child(2){
-      color:#fff;
-      border-radius:4px;
-    }
-  }
 }
 </style>
 <style lang="scss">

+ 74 - 158
src/views/hazardManagement/hazard/index.vue

@@ -2,31 +2,27 @@
 <template>
   <div class="app-container hazard">
     <div class="hazard-min" v-if="pageType==1">
-      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px" class="form-box">
+      <el-form :model="queryParams" ref="queryForm" :inline="true"  label-width="90px" class="form-box">
         <el-form-item label="危险源名称" prop="name" style="margin-left:20px;">
           <el-input
-            v-model="queryParams.name"
+            v-model="queryParams.chName"
             placeholder="请输入危险源名称"
             clearable
             size="small"
           />
         </el-form-item>
-        <el-form-item style="float: right;">
-          <el-col :span="1.5">
-            <p class="add-button-one-90"
-               @click="addLaboratoryButton"
-               v-hasPermi="['laboratory:hazard:add']"
-            ><i class="el-icon-plus"></i>添加</p>
-          </el-col>
-        </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>
+        <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+        <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+        <p class="page-submit-common-style-button"
+           style="float: right;"
+           @click="tableButton(1,'')"
+           v-hasPermiRouter="['cabinet:info:add']"
+        >新增</p>
       </el-form>
-      <el-table v-loading="loading" border :data="hazardList" @selection-change="handleSelectionChange">
-        <el-table-column label="名称" align="left" prop="name" />
-        <el-table-column label="编号" align="left" prop="code" />
+      <el-table v-loading="loading" class="table-box" border :data="dataList">
+        <el-table-column label="名称" align="left" prop="chName" />
+        <el-table-column label="编号" align="left" prop="hazardCode" />
+        <el-table-column label="类型" align="left" prop="smallTypeName" />
         <el-table-column label="实验室危险源占比" align="left" prop="labScale">
           <template slot-scope="scope">
             <div class="progress-box">
@@ -35,10 +31,10 @@
           </template>
         </el-table-column>
         <el-table-column label="查看次数" align="left" prop="scanCount" width="100" />
-        <el-table-column label="二维码" align="left" width="100">
+        <el-table-column label="二维码" align="center" width="100">
           <template slot-scope="scope">
-            <div @click="dialogQrCodeOn(scope.row.qrCodeUrl)">
-              <vue-qr style="height:23px;width:23px;cursor:pointer;" :text="scope.row.qrCodeUrl" :size="200"></vue-qr>
+            <div style="height:23px;" @click="dialogQrCodeOn(scope.row)">
+              <vue-qr style="height:23px;width:23px;cursor:pointer;" :text="identification+'?code='+scope.row.hazardId+'&type=1'" :size="200"></vue-qr>
             </div>
           </template>
         </el-table-column>
@@ -47,11 +43,11 @@
             <div class="table-button-box">
               <p class="table-button-null"></p>
               <p class="table-button-p"
-                 @click="addLaboratoryButton(scope.row)"
+                 @click="tableButton(2,scope.row)"
                  v-hasPermiAnd="['laboratory:hazard:query','laboratory:hazard:edit']"
               >编辑</p>
               <p class="table-button-p"
-                 @click="handleDelete(scope.row)"
+                 @click="tableButton(3,scope.row)"
                  v-hasPermi="['laboratory:hazard:remove']"
               >删除</p>
               <p class="table-button-null"></p>
@@ -69,156 +65,77 @@
         @pagination="getList"
       />
     </div>
-    <add-laboratory v-if="pageType==2" :hazardId="hazardId"></add-laboratory>
+    <add-laboratory v-if="pageType==2" :propsData="propsData"></add-laboratory>
     <!-- 二维码展示 -->
-    <el-dialog title="二维码" class="qr-codeUrl-dialog" :visible.sync="dialogQrCodeType" width="300px" append-to-body
-               :close-on-click-modal="false">
-      <vue-qr style="display: block;height:200px;width:200px;cursor:pointer;margin:0 auto;" :text="dialogQrCodeUrl" :size="200"></vue-qr>
-    </el-dialog>
+    <qr-code-dialog ref="qrCodeDialog" :qrCodeDialogData="qrCodeDialogData"></qr-code-dialog>
   </div>
 </template>
 
 <script>
-  import { listHazard, getHazard, delHazard, addHazard, updateHazard } from "@/api/hazardManagement/index";
+import qrCodeDialog from "@/components/qrCodeDialog/index.vue"
+import {
+  laboratoryHazardList, laboratoryHazardDelete, laboratoryHazardDetail
+} from '@/api/hazardManagement/index'
   import addLaboratory from "./addLaboratory.vue";
-  import { done } from 'element-ui'
   import vueQr from 'vue-qr'
 export default {
   components: {
     addLaboratory,
-    vueQr
+    vueQr,
+    qrCodeDialog,
   },
   name: "Hazard",
   data() {
     return {
       tableButtonType:this.hasPermiDom(['laboratory:hazard:query','laboratory:hazard:edit','laboratory:hazard:remove']),
       // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 子表选中数据
-      checkedLabHazardSubjectRelation: [],
-      // 非单个禁用
-      single: true,
+      loading: false,
       // 非多个禁用
       multiple: true,
-      // 显示搜索条件
-      showSearch: true,
       // 总条数
       total: 0,
       // 危险源表格数据
-      hazardList: [],
-      // 危险源和实验室关联表格数据
-      labHazardSubjectRelationList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
+      dataList: [],
       // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize:20,
         chName: null,
-        enName: null,
-        casNo: null,
-        dangerCode: null,
-        flammability: null,
-        ignitionPoint: null,
-        combustionProducts: null,
-        stability: null,
-        taboo: null,
-        skinContactAid: null,
-        eyeContactAid: null,
-        inhalationAid: null,
-        ingestionAid: null,
-        engineeringProtection: null,
-        personalProtection: null,
-        storage: null,
-        leakageTreatment: null,
-        deptId: null,
-        deptName: null,
-        userId: null,
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
       },
+      propsData:{},
       //新增危险源
       pageType:1,
-      hazardId: null,
       //二维码展示数据
-      dialogQrCodeType:false,
-      dialogQrCodeUrl:"",
+      qrCodeDialogData:{},
+      //二维码规则 服务器域名,需与微信后台开发配置内一致.
+      identification: localStorage.getItem('codeOnlineAdd'),
     };
   },
   created() {
     this.getList();
   },
   methods: {
-    dialogQrCodeOn(url){
-      this.dialogQrCodeUrl = url;
-      this.dialogQrCodeType = true;
-    },
-    //新建危险源
-    addLaboratoryButton(row){
-      this.hazardId = row.hazardId
-      this.pageType = 2;
-    },
-    offLaboratoryButton(){
-      this.pageType = 1;
+    //展示二维码
+    dialogQrCodeOn(row){
+      this.$set(this,'qrCodeDialogData',{
+        download:true,
+        type:'1',                                                     //二维码类型 用于区分二维码功能类型
+        parameter:row.hazardId,                                             //二维码参数
+        name:row.chName,                                                //二维码名称用于下载时命名
+        codeName:row.chName,                                            //二维码图片下名称展示(非必传)
+      });
+      this.$refs['qrCodeDialog'].initialize();
     },
     /** 查询危险源列表 */
     getList() {
-      this.loading = true;
-      listHazard(this.queryParams).then(response => {
-        this.hazardList = response.rows;
-        this.total = response.total;
-        this.loading = false;
+      this.$set(this,'loading',true);
+      laboratoryHazardList(this.queryParams).then(response => {
+        this.$set(this,'loading',false);
+        this.$set(this,'dataList',response.data.records);
+        this.$set(this,'total',response.data.total);
       });
     },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    clickPageTypeOne(){
-      this.pageType = 1;
-      this.getList();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        chName: null,
-        enName: null,
-        casNo: null,
-        dangerCode: null,
-        flammability: null,
-        ignitionPoint: null,
-        combustionProducts: null,
-        stability: null,
-        taboo: null,
-        skinContactAid: null,
-        eyeContactAid: null,
-        inhalationAid: null,
-        ingestionAid: null,
-        engineeringProtection: null,
-        personalProtection: null,
-        storage: null,
-        leakageTreatment: null,
-        deptId: null,
-        deptName: null,
-        createTime: null,
-        userId: null,
-        createBy: null,
-        updateTime: null,
-        updateBy: null,
-        remark: null
-      };
-      this.labHazardSubjectRelationList = [];
-      this.resetForm("form");
-    },
+
     /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.pageNum = 1;
@@ -226,46 +143,45 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      // this.resetForm("queryForm");
       this.$set(this,'queryParams',{
         pageNum: 1,
         pageSize:20,
-        name:"",
+        chName:"",
       });
       this.handleQuery();
     },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.hazardId)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加危险源";
-    },
+    //操作按钮
+    tableButton(type,row){
+      let self = this;
+      if(type == 1){
+        //新增
+        this.$set(this,'propsData',null);
+        this.$set(this,'pageType',2);
 
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.hazardId || this.ids;
-      this.$confirm('是否确认删除危险源?', "警告", {
+      }else if(type == 2){
+        //编辑
+        laboratoryHazardDetail({hazardId:row.hazardId}).then(response => {
+          this.$set(this,'propsData',response.data);
+          this.$set(this,'pageType',2);
+        });
+      }else if(type == 3){
+        //删除
+        this.$confirm('是否确认删除危险源?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
         }).then(function() {
-          return delHazard(ids);
         }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
+          laboratoryHazardDelete({hazardId:row.hazardId}).then(response => {
+            self.msgSuccess(response.message)
+            self.getList();
+          });
         }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('laboratory/hazard/export', {
-        ...this.queryParams
-      }, `laboratory_hazard.xlsx`)
+      }else if(type == 'out'){
+        //返回
+        this.$set(this,'pageType',1);
+        this.getList();
+      }
     },
   }
 };

+ 158 - 12
src/views/integratedManagement/laboratoryManagement/classifiedGrading/classified.vue

@@ -5,7 +5,7 @@
       <el-form-item label="" prop="levelName">
         <el-input
           v-model="queryParams.levelName"
-          placeholder="请输入分级名称"
+          placeholder="安全分级"
           clearable
           size="small"
         />
@@ -20,7 +20,7 @@
     </el-form>
 
     <el-table class="table-box" v-loading="loading" border :data="classifiedList" @selection-change="handleSelectionChange">
-      <el-table-column label="分级名称" align="left" prop="levelName" />
+      <el-table-column label="安全分级" align="left" prop="levelName" />
       <el-table-column label="颜色" align="left" prop="levelColor" >
         <template slot-scope="scope">
           <p :style="'width:40px;height:23px;margin:0;background:'+scope.row.levelColor"></p>
@@ -57,14 +57,31 @@
     />
 
     <!-- 添加或修改安全分级对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" width="970px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="分级名称" prop="levelName">
-          <el-input v-model="form.levelName" maxlength="10" placeholder="请输入分级名称" />
+          <el-input v-model="form.levelName" maxlength="10" placeholder="请输入分级名称"  style="width: 750px"/>
         </el-form-item>
         <el-form-item label="颜色" prop="levelColor">
           <el-color-picker v-model="form.levelColor"></el-color-picker>
         </el-form-item>
+        <el-form-item label="排序" prop="levelSort">
+          <el-input-number v-model="form.levelSort" :min="0" :max="999" ></el-input-number>
+        </el-form-item>
+        <div class="classify-name"><i>*</i>分类认定条件:</div>
+        <div class="classify">
+          <div class="classify-li" v-for="(item,index) in conditionList">
+            <div class="classify-li-l">{{item.bigClassName}}</div>
+            <div class="classify-li-r">
+              <p><el-checkbox v-model="item.checkAll" @change="handleCheckAllChange($event,item)">{{item.allName}}</el-checkbox></p>
+              <p>
+                <el-checkbox-group v-model="item.checkedCities" @change="handleCheckedCitiesChange($event,item)">
+                  <el-checkbox v-for="item2 in item.smallClassList" :label="item2.smallClassName" :key="item2.smallClassValue">{{item2.smallClassName}}</el-checkbox>
+                </el-checkbox-group>
+              </p>
+            </div>
+          </div>
+        </div>
       </el-form>
       <div slot="footer" class="dialog-footer dialog-footer-box">
         <p class="dialog-footer-button-null"></p>
@@ -77,13 +94,13 @@
 </template>
 
 <script>
-    import {
-        laboratoryClassLevelAdd,
-        laboratoryClassLevelDelete,
-        laboratoryClassLevelDetail,
-        laboratoryClassLevelList,
-        laboratoryClassLevelUpdate
-    } from "@/api/integratedManagement/index";
+import {
+  laboratoryClassLevelAdd,
+  laboratoryClassLevelDelete,
+  laboratoryClassLevelDetail,
+  laboratoryClassLevelList,
+  laboratoryClassLevelUpdate, laboratoryClassTypeGetClassCriteria
+} from '@/api/integratedManagement/index'
 
     export default {
   name: "Classified",
@@ -115,7 +132,10 @@
         levelName: null
       },
       // 表单参数
-      form: {},
+      form: {
+        levelSort:0,
+      },
+      conditionList:[],
       // 表单校验
       rules: {
         levelName: [
@@ -125,13 +145,45 @@
         levelColor: [
           { required: true, message: "请选择颜色", trigger: "blur" }
         ],
+        levelSort:[
+          { required: true, message: "请输入安全分类序号", trigger: "blur" },
+          { required: true, message: "请输入安全分类序号", validator: this.spaceJudgment, trigger: "blur" }
+        ],
       }
     };
   },
   created() {
+    this.laboratoryClassTypeGetClassCriteria();
     this.getList();
   },
   methods: {
+    //全选按钮
+    handleCheckAllChange(val,item) {
+      let name=[];
+      for (let i=0;i<item.smallClassList.length;i++){
+        name.push(item.smallClassList[i].smallClassName)
+      }
+      item.checkedCities = val ? name : [];
+    },
+    //单个选择按钮
+    handleCheckedCitiesChange(value,item) {
+      console.log(value)
+      console.log(item)
+      let checkedCount = value.length;
+      item.checkAll = checkedCount === item.smallClassList.length;
+    },
+    //分类认定条件
+    laboratoryClassTypeGetClassCriteria() {
+      laboratoryClassTypeGetClassCriteria().then( response => {
+        response.data.forEach(function(item){
+          item.allName='全选';
+          item.checkAll=false;
+          item.checkedCities=[];
+        })
+        this.$set(this,'conditionList',response.data)
+      });
+    },
+
     /** 查询安全分级列表 */
     getList() {
       this.loading = true;
@@ -152,6 +204,7 @@
         levelId: null,
         levelName: null,
         levelColor: null,
+        levelSort: 0,
       };
       this.resetForm("form");
     },
@@ -178,19 +231,42 @@
     },
     /** 新增按钮操作 */
     handleAdd() {
+      this.laboratoryClassTypeGetClassCriteria();
       this.reset();
       this.title = "新增安全分级";
       this.open = true;
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
+      let self=this;
       this.reset();
       laboratoryClassLevelDetail({id:row.levelId}).then( response => {
         this.$set(this,'form',{
           levelId:response.data.levelId,
           levelName:response.data.levelName,
           levelColor:response.data.levelColor,
+          levelSort:response.data.levelSort,
         });
+        //原数组
+        self.conditionList.forEach(function(item){
+          let list=[];
+          //详情返回的数组
+          response.data.classInfoList.forEach(function(item2) {
+            if (item.bigClassValue==item2.bigClassValue){
+              item.smallClassList.forEach(function(item3){
+                item2.smallClassValue.forEach(function(item4){
+                  if (item3.smallClassValue==item4){
+                    list.push(item3.smallClassName)
+                  }
+                })
+              })
+              if (item.smallClassList.length ==item2.smallClassValue.length){
+                item.checkAll=true;
+              }
+            }
+          })
+          item.checkedCities=list;
+        })
         this.title = "修改安全分级";
         this.open = true;
       });
@@ -199,6 +275,22 @@
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
+          //分类认定条件数据筛选
+          let list=[];
+          this.conditionList.forEach(function(item) {
+            let list2=[];
+            if (item.checkedCities.length>0){
+              item.smallClassList.forEach(function(item2) {
+                item.checkedCities.forEach(function(item3) {
+                  if (item3==item2.smallClassName){
+                    list2.push(item2.smallClassValue)
+                  }
+                })
+              })
+              list.push({bigClassValue:item.bigClassValue,bigClassName:item.bigClassName,smallClassValue:list2})
+            }
+          })
+          this.form.classLevelCriteria=JSON.stringify(list);
           if (this.form.levelId != null) {
             laboratoryClassLevelUpdate(this.form).then( response => {
               this.msgSuccess("修改成功");
@@ -247,4 +339,58 @@
     flex-direction: column;
     padding:20px!important;
   }
+  .classify-name{
+    margin-bottom: 20px;
+    margin-left: 34px;
+    >i{
+      color: #ff4949;
+      margin-right: 4px;
+    }
+    color: #333;
+    font-size: 14px;
+    font-weight: 500;
+  }
+  .classify{
+    width: 820px;
+    height: 236px;
+    overflow-y: auto;
+    margin-left: 38px;
+    .classify-li{
+      min-height: 80px;
+      display: flex;
+      justify-content: flex-start;
+      border: 1px solid #E0E0E0;
+      border-top: 0;
+      .classify-li-l{
+        width: 150px;
+        min-height: 80px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        border-right: 1px solid #E0E0E0;
+      }
+      .classify-li-r{
+        .el-checkbox{
+          margin:4px 30px 4px 0;
+        }
+        flex: 1;
+        >p{
+          display: flex;
+          align-items: center;
+          padding-left: 14px;
+          box-sizing: border-box;
+        }
+        >p:nth-of-type(1){
+          min-height: 40px;
+          border-bottom:1px solid #E0E0E0;
+        }
+        >p:nth-of-type(2){
+          min-height: 40px;
+        }
+      }
+    }
+    .classify-li:first-child{
+      border-top: 1px solid #E0E0E0;
+    }
+  }
 </style>

+ 166 - 16
src/views/integratedManagement/laboratoryManagement/classifiedGrading/classtype.vue

@@ -5,7 +5,7 @@
       <el-form-item label="" prop="typeName">
         <el-input
           v-model="queryParams.typeName"
-          placeholder="请输入分类名称"
+          placeholder="安全分类"
           clearable
           size="small"
         />
@@ -52,15 +52,29 @@
     />
 
     <!-- 添加或修改安全分级类型对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body
+    <el-dialog :title="title" :visible.sync="open" width="970px" append-to-body
                :close-on-click-modal="false">
       <el-form ref="form" :model="form" :rules="rules" label-width="110px">
-        <el-form-item label="安全类别名称" prop="typeName">
-          <el-input v-model="form.typeName" maxlength="10" placeholder="请输入安全类名称" />
+        <el-form-item label="安全类" prop="typeName">
+          <el-input v-model="form.typeName" maxlength="10" placeholder="请输入安全类名称"  style="width: 750px"/>
         </el-form-item>
-        <!--<el-form-item label="备注" prop="remark">-->
-          <!--<el-input v-model="form.remark" placeholder="请输入备注" />-->
-        <!--</el-form-item>-->
+        <el-form-item label="排序" prop="typeSort">
+          <el-input-number v-model="form.typeSort" :min="0" :max="999" ></el-input-number>
+        </el-form-item>
+        <div class="classify-name"><i>*</i>分类认定条件:</div>
+        <div class="classify">
+          <div class="classify-li" v-for="(item,index) in conditionList">
+            <div class="classify-li-l">{{item.bigClassName}}</div>
+            <div class="classify-li-r">
+              <p><el-checkbox v-model="item.checkAll" @change="handleCheckAllChange($event,item)">{{item.allName}}</el-checkbox></p>
+              <p>
+                <el-checkbox-group v-model="item.checkedCities" @change="handleCheckedCitiesChange($event,item)">
+                  <el-checkbox v-for="item2 in item.smallClassList" :label="item2.smallClassName" :key="item2.smallClassValue">{{item2.smallClassName}}</el-checkbox>
+                </el-checkbox-group>
+              </p>
+            </div>
+          </div>
+        </div>
       </el-form>
       <div slot="footer" class="dialog-footer dialog-footer-box">
         <p class="dialog-footer-button-null"></p>
@@ -73,18 +87,20 @@
 </template>
 
 <script>
-  import { laboratoryClassTypeList,
-    laboratoryClassTypeDetail,
-    laboratoryClassTypeDelete,
-    laboratoryClassTypeAdd,
-    laboratoryClassTypeUpdate
-  } from "@/api/integratedManagement/index";
+import {
+  laboratoryClassTypeList,
+  laboratoryClassTypeDetail,
+  laboratoryClassTypeDelete,
+  laboratoryClassTypeAdd,
+  laboratoryClassTypeUpdate, laboratoryClassTypeGetClassCriteria
+} from '@/api/integratedManagement/index'
 
 export default {
   name: "Classtype",
   data() {
     return {
       tableButtonType:this.hasPermiDom(['laboratory:classtype:query','laboratory:classtype:edit','laboratory:classtype:remove']),
+
       // 遮罩层
       loading: true,
       // 选中数组
@@ -110,20 +126,55 @@ export default {
         typeName: null,
       },
       // 表单参数
-      form: {},
+      form: {
+        typeSort:0,
+      },
+      conditionList:[],
       // 表单校验
       rules: {
         typeName: [
-          { required: true, message: "请输入安全类别名称", trigger: "blur" },
-          { required: true, message: "请输入安全类别名称", validator: this.spaceJudgment, trigger: "blur" }
+          { required: true, message: "请输入安全分类名称", trigger: "blur" },
+          { required: true, message: "请输入安全分类名称", validator: this.spaceJudgment, trigger: "blur" }
+        ],
+        typeSort:[
+          { required: true, message: "请输入安全分类序号", trigger: "blur" },
+          { required: true, message: "请输入安全分类序号", validator: this.spaceJudgment, trigger: "blur" }
         ],
       }
     };
   },
   created() {
+    this.laboratoryClassTypeGetClassCriteria();
     this.getList();
   },
   methods: {
+    //全选按钮
+    handleCheckAllChange(val,item) {
+      let name=[];
+      for (let i=0;i<item.smallClassList.length;i++){
+        name.push(item.smallClassList[i].smallClassName)
+      }
+      item.checkedCities = val ? name : [];
+    },
+    //单个选择按钮
+    handleCheckedCitiesChange(value,item) {
+      console.log(value)
+      console.log(item)
+      let checkedCount = value.length;
+      item.checkAll = checkedCount === item.smallClassList.length;
+    },
+    //分类认定条件
+    laboratoryClassTypeGetClassCriteria() {
+      laboratoryClassTypeGetClassCriteria().then( response => {
+        response.data.forEach(function(item){
+          item.allName='全选';
+          item.checkAll=false;
+          item.checkedCities=[];
+        })
+        this.$set(this,'conditionList',response.data)
+      });
+    },
+
     /** 查询安全分级类型列表 */
     getList() {
       this.loading = true;
@@ -143,6 +194,7 @@ export default {
       this.form = {
         typeId: null,
         typeName: null,
+        typeSort: 0,
       };
       this.resetForm("form");
     },
@@ -169,26 +221,70 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
+      this.laboratoryClassTypeGetClassCriteria();
       this.reset();
       this.open = true;
       this.title = "新增安全分类";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
+      let self=this;
       this.reset();
       laboratoryClassTypeDetail({id:row.typeId}).then( response => {
         this.$set(this,'form',{
           typeId:response.data.typeId,
           typeName:response.data.typeName,
+          typeSort:response.data.typeSort,
         });
+
+
+        //原数组
+        self.conditionList.forEach(function(item){
+          let list=[];
+          //详情返回的数组
+          response.data.classInfoList.forEach(function(item2) {
+            if (item.bigClassValue==item2.bigClassValue){
+              item.smallClassList.forEach(function(item3){
+                item2.smallClassValue.forEach(function(item4){
+                    if (item3.smallClassValue==item4){
+                      list.push(item3.smallClassName)
+                    }
+                })
+              })
+              if (item.smallClassList.length ==item2.smallClassValue.length){
+                item.checkAll=true;
+              }
+            }
+          })
+          item.checkedCities=list;
+        })
+
         this.open = true;
         this.title = "修改安全分类";
       });
     },
     /** 提交按钮 */
     submitForm() {
+      let self=this;
+
       this.$refs["form"].validate(valid => {
         if (valid) {
+          //分类认定条件数据筛选
+          let list=[];
+          this.conditionList.forEach(function(item) {
+            let list2=[];
+            if (item.checkedCities.length>0){
+              item.smallClassList.forEach(function(item2) {
+                item.checkedCities.forEach(function(item3) {
+                  if (item3==item2.smallClassName){
+                    list2.push(item2.smallClassValue)
+                  }
+                })
+              })
+              list.push({bigClassValue:item.bigClassValue,bigClassName:item.bigClassName,smallClassValue:list2})
+            }
+          })
+          this.form.classTypeCriteria=JSON.stringify(list);
           if (this.form.typeId != null) {
             laboratoryClassTypeUpdate(this.form).then( response => {
               this.msgSuccess("修改成功");
@@ -236,4 +332,58 @@ export default {
     flex-direction: column;
     padding:20px!important;
   }
+  .classify-name{
+    margin-bottom: 20px;
+    margin-left: 34px;
+    >i{
+      color: #ff4949;
+      margin-right: 4px;
+    }
+    color: #333;
+    font-size: 14px;
+    font-weight: 500;
+  }
+  .classify{
+    width: 820px;
+    height: 236px;
+    overflow-y: auto;
+    margin-left: 38px;
+    .classify-li{
+      min-height: 80px;
+      display: flex;
+      justify-content: flex-start;
+      border: 1px solid #E0E0E0;
+      border-top: 0;
+      .classify-li-l{
+        width: 150px;
+        min-height: 80px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        border-right: 1px solid #E0E0E0;
+      }
+      .classify-li-r{
+        .el-checkbox{
+          margin:4px 30px 4px 0;
+        }
+        flex: 1;
+        >p{
+          display: flex;
+          align-items: center;
+          padding-left: 14px;
+          box-sizing: border-box;
+        }
+        >p:nth-of-type(1){
+          min-height: 40px;
+          border-bottom:1px solid #E0E0E0;
+        }
+        >p:nth-of-type(2){
+          min-height: 40px;
+        }
+      }
+    }
+    .classify-li:first-child{
+      border-top: 1px solid #E0E0E0;
+    }
+  }
 </style>

+ 95 - 19
src/views/integratedManagement/laboratoryManagement/subject/addSubject.vue

@@ -20,7 +20,7 @@
             size="small"
           />
         </el-form-item>
-        <el-form-item label="类型"  prop="moldId" class="form-item">
+        <el-form-item label="实验室类型"  prop="moldId" class="form-item">
           <el-select v-model="form.moldId" placeholder="请选择类型" clearable style="width:320px;">
             <el-option
               v-for="dict in labMoldList"
@@ -30,14 +30,24 @@
             ></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="二级单位"   class="form-item">
+          <el-select v-model="form.deptId" placeholder="请选择类型" clearable style="width:320px;">
+            <el-option
+              v-for="item in deptOptions"
+              :key="item.deptId"
+              :label="item.deptName"
+              :value="item.deptId"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="安全分类"  prop="typeId" class="form-item">
-          <el-select v-model="form.typeId" placeholder="请选择安全分类" clearable style="width:320px;">
+          <el-select v-model="form.typeId" multiple placeholder="请选择安全分类"  style="width: 320px">
             <el-option
               v-for="dict in typeList"
               :key="dict.typeId"
               :label="dict.typeName"
-              :value="dict.typeId"
-            ></el-option>
+              :value="dict.typeId">
+            </el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="安全分级"  prop="levelId" class="form-item">
@@ -50,15 +60,21 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="学院" prop="deptId" class="form-item">
-          <el-select v-model="form.deptId" placeholder="请选择学院" style="width:320px;">
-            <el-option
-              v-for="dict in deptOptions"
-              :key="dict.deptId"
-              :label="dict.deptName"
-              :value="dict.deptId"
-            ></el-option>
-          </el-select>
+        <el-form-item label="动态评级" class="form-item">
+          <div class="tableListPaginationSwitch">
+            <el-switch
+              class="switch captcha-img"
+              @click.native="switchClick(form.dynamicLeveling)"
+              v-model="form.dynamicLeveling"
+              :active-value="1"
+              :inactive-value="0"
+              active-text="开"
+              inactive-text="关"
+              disabled>
+            </el-switch>
+            <i class="el-icon-warning tip-img"></i>
+            <i class="tip-content">如需人工评定,请关闭动态评级</i>
+          </div>
         </el-form-item>
         <el-form-item label="楼栋"  prop="buildId" class="form-item">
           <el-select v-model="form.buildId" placeholder="请选择楼栋"
@@ -271,8 +287,6 @@
 </template>
 
 <script>
-    import { onUselistLayoutByFloorId,onUselistLayoutByFloorIdTwo } from "@/apiDemo/laboratory/layout";
-    import { labMoldQueryOption } from "@/apiDemo/laboratory/subjectClass";
     //v3
     import { getDeptDropList,systemBuildingGetOptList,laboratoryClassMoldGetList,
       laboratoryClassLevelGetList,laboratoryClassTypeGetList,systemRoomInfoGetList,
@@ -309,6 +323,7 @@
           form:{
             details:"",
             hardwareType:0,
+            dynamicLeveling:0,
           },
           hardwareTypeTow:0,//临时存储准入设备状态
           // 表单校验
@@ -360,7 +375,7 @@
           this.$set(this.form,'subId',this.subjectData.subId)
           this.$set(this.form,'subName',this.subjectData.subName)
           this.$set(this.form,'moldId',this.subjectData.moldId)
-          this.$set(this.form,'typeId',this.subjectData.typeId)
+          this.$set(this.form,'typeId',this.subjectData.typeId.split(','))
           this.$set(this.form,'levelId',this.subjectData.levelId)
           this.$set(this.form,'deptId',this.subjectData.deptId)
           this.$set(this.form,'buildId',this.subjectData.buildId)
@@ -470,9 +485,22 @@
             this.$set(this,'extinguishingKeyPoints',response.data);
           });
         },
+        //switch点击事件
+        switchClick(item){
+          let self = this;
+          console.log(item)
+          //switch开关
+          this.$confirm('是否确认'+item==1?'关闭':'开启'+'?', "", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+            self.form.dynamicLeveling=self.form.dynamicLeveling==1?0:1;
+          }).then(() => {}).catch(() => {});
+        },
         //查询学院下拉列表
         getDeptDropList(){
-          getDeptDropList({deptName:'',level:2,deptType:1}).then(response => {
+          getDeptDropList({deptName:'',level:2,deptType:''}).then(response => {
             this.$set(this,'deptOptions',response.data);
           });
         },
@@ -528,6 +556,7 @@
           }
         },
         upData(){
+          console.log(this.form)
           let self = this;
           this.$set(this.form,'details',this.$refs.UEditor.text);
           this.$refs["form"].validate(valid => {
@@ -552,6 +581,9 @@
                 if(self.form.safeUserId) {
                   self.form.safeUserId = self.form.safeUserId.join() ;
                 }
+                if(self.form.typeId) {
+                  self.form.typeId = self.form.typeId.join() ;
+                }
                 //循环取安全信息牌信息
 
                 let list=[]
@@ -587,11 +619,11 @@
           this.form.details = escape(this.form.details);
           laboratorySubRelInfoUpdate(this.form).then(response => {
             this.msgSuccess("修改成功");
-            this.$parent.clickPage(1);
+            this.$parent.clickPage(1,'');
           });
         },
         backPage(){
-          this.$parent.clickPage(1);
+          this.$parent.clickPage(1,'');
         },
         /** 查询楼栋列表  */
         getBuildings(id) {
@@ -756,4 +788,48 @@
       }
     }
   }
+  ::v-deep .tableListPaginationSwitch{
+    height: 40px;
+    display: flex;
+    align-items: center;
+    .tableListPaginationSwitchL, .tableListPaginationSwitchR{
+      flex:1;
+    }
+    .tip-img{
+      color: #E6A23C;
+      margin: 0 9px 0 12px;
+    }
+    .tip-content{
+      font-style: normal;
+      font-weight: 400;
+      font-size: 14px;
+      color: #999999;
+    }
+    .switch .el-switch__label {
+      position: absolute;
+      display: none;
+      color: #fff !important;
+    }
+    .switch .el-switch__label--right {
+      z-index: 1;
+    }
+    .switch .el-switch__label--right span{
+      margin-left: 10px;
+    }
+    .switch .el-switch__label--left {
+      z-index: 1;
+    }
+    .switch .el-switch__label--left span{
+      margin-left: 24px;
+    }
+    .switch .el-switch__label.is-active {
+      display: block;
+      text-align: left!important;
+    }
+    .switch.el-switch .el-switch__core,
+    .el-switch .el-switch__label {
+      width: 64px !important;
+      margin: 0;
+    }
+  }
 </style>

+ 4 - 5
src/views/integratedManagement/laboratoryManagement/subject/index.vue

@@ -398,8 +398,6 @@ import mqtt from 'mqtt'
 import flvjs from 'flv.js'
 import { hardWareControl,alarmControl } from "@/apiDemo/laboratory/hardware";
 import {
-  authListSubject,
-  subjectInfo,
   updateSubject,
   mangerVoice,
   startUrl,
@@ -731,7 +729,7 @@ export default {
     subjectInfoTwo(row){
       let self = this;
       let type = 0; //硬件 //0全部
-      subjectInfo(row.id,type).then(response => {
+      laboratorySubRelInfoGetDetailInfo({infoId:row.infoId}).then(response => {
         this.$set(this,'newData',response.data);
         if(response.data.safeUserName){
           this.$set(this.newData,'safeUserName',response.data.safeUserName.split(','));
@@ -987,6 +985,7 @@ export default {
     },
     //选中实验室
     handleCurrentChange(val){
+      console.log(val)
       let self = this;
       if(this.versionField() == 'xiBeiNongLinDaXue'){
         return
@@ -1008,7 +1007,7 @@ export default {
     //获取实验室详情
     subjectInfo(id){
       let type = 1; //硬件 //0全部
-      subjectInfo(id,type).then(response => {
+      laboratorySubRelInfoGetDetailInfo({infoId:id}).then(response => {
         let obj = JSON.parse(JSON.stringify(response.data));
         obj.VOlist = [];
         if(response.data.labHardwareVOList){
@@ -1131,7 +1130,7 @@ export default {
         this.loading = false;
         if(response.data.records[0]){
           this.$refs.multipleTable.setCurrentRow(response.data.records[0]);
-          this.subjectInfo(response.data.records[0].id);
+          this.subjectInfo(response.data.records[0].infoId);
         }
         let idList = [];
         for(let i=0;i<response.data.records.length;i++){

+ 5 - 5
src/views/integratedManagement/messageNotice/warningNotice/forewarningConfig.vue

@@ -195,7 +195,7 @@
             <p class="page-submit-common-style-button"
                style="float: right;"
                @click="tableButton(1)"
-               v-hasPermiRouter="['demo:demo:add']"
+               v-hasPermiRouter="['warning:rule:add']"
             >新增</p>
           </el-form>
         </div>
@@ -232,11 +232,11 @@
                   <p class="table-button-null"></p>
                   <p class="table-button-p"
                      @click="tableButton(2,scope.row)"
-                     v-hasPermiRouter="['demo:demo:detail']"
+                     v-hasPermiRouter="['warning:rule:edit']"
                   >编辑</p>
                   <p class="table-button-p"
                      @click="tableButton(3,scope.row)"
-                     v-hasPermiRouter="['demo:demo:edit']"
+                     v-hasPermiRouter="['warning:rule:del']"
                   >删除</p>
                   <p class="table-button-null"></p>
                 </div>
@@ -581,7 +581,7 @@
         //升级规则列表
         dataList:[],
         total:10,
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        tableButtonType:this.hasPermiDom(['warning:rule:edit','warning:rule:del',]),
         //dialog配置
         dialogType:false,
         dialogForm:{
@@ -721,7 +721,7 @@
       },
       //返回按钮
       outButton(){
-        this.$parent.tableButton(4);
+        this.$parent.tableButton('out','');
       },
       //提交-危险源预警
       submitButton(){

+ 80 - 52
src/views/integratedManagement/messageNotice/warningNotice/index.vue

@@ -5,16 +5,16 @@
       <div class="page-form-title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
-          <el-form-item label="" prop="queryParamsData1">
+          <el-form-item label="" prop="searchValue">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
+              v-model="queryParams.searchValue"
               placeholder="实验室/房间号/预警事件/姓名/联系方式"
               style="width: 300px"
             />
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="请选择学院" style="width: 140px">
+          <el-form-item label="" prop="deptId">
+            <el-select v-model="queryParams.deptId" placeholder="请选择学院" style="width: 140px">
               <el-option
                 v-for="item in deptOptions"
                 :key="item.deptId"
@@ -23,16 +23,16 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData3">
-            <el-cascader style="width: 140px"
+          <el-form-item label="" prop="floorId">
+            <el-cascader
               placeholder="请选择楼栋楼层"
-              :props="{value: 'id', label: 'name',children:'buildFloorVoList'}"
-              v-model="queryParams.queryParamsData3"
+              :props="{value: 'id', label: 'name',children:'buildFloorVoList',checkStrictly: true}"
+              v-model="queryParams.buildIdAndfloorId"
               :options="buildFloorOptions">
             </el-cascader>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData4">
-            <el-select v-model="queryParams.queryParamsData4" placeholder="请选择预警类型" style="width: 140px">
+          <el-form-item label="" prop="warnType">
+            <el-select v-model="queryParams.warnType" placeholder="请选择预警类型" style="width: 140px">
               <el-option
                 v-for="dict in optionList"
                 :key="dict.value"
@@ -67,26 +67,40 @@
         <el-table class="table-box" v-loading="loading" border :data="dataList">
           <el-table-column label="报警时间" prop="createTime" width="180" fixed show-overflow-tooltip>
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.createTime) }}</span>
+              <span>{{ parseTime(scope.row.warnTime) }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="预警类型" prop="content" width="200" fixed show-overflow-tooltip/>
-          <el-table-column label="预警事件" prop="name" width="625" show-overflow-tooltip/>
-          <el-table-column label="学院" prop="content" width="200" show-overflow-tooltip/>
-          <el-table-column label="楼栋楼层" prop="content" width="200" show-overflow-tooltip/>
-          <el-table-column label="实验室" prop="content" width="200" show-overflow-tooltip/>
-          <el-table-column label="安全员" prop="content" width="200" show-overflow-tooltip/>
+          <el-table-column label="预警类型" prop="content" width="200" fixed show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.warnType==1?'化学品预警':(scope.row.warnType==2?'气瓶预警':'算法预警')}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="预警事件" prop="warnContent" width="625" show-overflow-tooltip/>
+          <el-table-column label="学院" prop="deptName" width="200" show-overflow-tooltip/>
+          <el-table-column label="楼栋楼层" prop="content" width="200" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.buildName}}-{{scope.row.floorName}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="实验室" prop="content" width="200" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.subName}}-{{scope.row.roomNum}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="安全员" prop="safeInfoStr" width="200" show-overflow-tooltip/>
           <el-table-column label="操作" width="100" show-overflow-tooltip v-if="tableButtonType">
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
                    @click="tableButton(2,scope.row)"
-                   v-hasPermiRouter="['demo:demo:detail']"
+                   v-if="scope.row.noticeStatus==0"
+                   v-hasPermiRouter="['warning:notice:edit']"
                 >处理</p>
                 <p class="table-button-p"
                    @click="tableButton(3,scope.row)"
-                   v-hasPermiRouter="['demo:demo:edit']"
+                   v-if="scope.row.noticeStatus!=0"
+                   v-hasPermiRouter="['warning:notice:detail']"
                 >详情</p>
                 <p class="table-button-null"></p>
               </div>
@@ -107,12 +121,15 @@
   </div>
 </template>
 <script>
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
   import infoPage from "./infoPage.vue";
   import forewarningConfig from "./forewarningConfig.vue"
   import { getDeptDropList,systemBuildingGetTreeList,} from "@/api/commonality/permission";
+  import {
+    chemicalUserecordDetail,
+    systemWarningNoticeDetail,
+    systemWarningNoticeList,
+    systemWarningNoticeWarningList
+  } from '@/api/chemicalManage'
   export default {
     name: 'index',
     components: {
@@ -138,15 +155,16 @@
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          searchValue:"",
+          deptId :null,
+          buildId :null,
+          warnType:'',
+          buildIdAndfloorId :[],
         },
         //时间数据
         dateRange:[],
         //列表数据
-        dataList:[
-          {},{}
-        ],
+        dataList:[],
         //数据数量
         total:0,
         //组件传参
@@ -159,11 +177,19 @@
     mounted () {
       this.getDeptDropList();
       this.systemBuildingGetTreeList();
-      //this.getList();
+      this.getList();
     },
     methods: {
       //查询按钮
       handleQuery(){
+        if (this.queryParams.buildIdAndfloorId[0]){
+          if (this.queryParams.buildIdAndfloorId.length ==1){
+            this.$set(this.queryParams,'buildId',this.queryParams.buildIdAndfloorId[0]);
+          }else if (this.queryParams.buildIdAndfloorId.length ==2){
+            this.$set(this.queryParams,'buildId',this.queryParams.buildIdAndfloorId[0]);
+            this.$set(this.queryParams,'floorId',this.queryParams.buildIdAndfloorId[1]);
+          }
+        }
         this.$set(this.queryParams,'page',1);
         this.getList();
       },
@@ -173,27 +199,31 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          searchValue:"",
+          warnType:'',
+          deptId :null,
+          buildId :null,
+          floorId :null,
+          buildIdAndfloorId :[],
         });
         this.getList();
       },
       //获取数据列表
       getList(){
-        // this.$set(this,'loading',true);
-        // let obj = JSON.parse(JSON.stringify(this.queryParams))
-        // if(this.dateRange[0]){
-        //   obj.startTime = this.dateRange[0]+'T00:00:00'
-        //   obj.endTime = this.dateRange[1]+'T23:59:59'
-        // }else{
-        //   obj.startTime = "";
-        //   obj.endTime = "";
-        // }
-        // getListFunction(obj).then(response => {
-        //   this.$set(this,'loading',false);
-        //   this.$set(this,'dataList',response.data.records);
-        //   this.$set(this,'total',response.data.total);
-        // });
+        this.$set(this,'loading',true);
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.startTime = this.dateRange[0]+'T00:00:00'
+          obj.endTime = this.dateRange[1]+'T23:59:59'
+        }else{
+          obj.startTime = "";
+          obj.endTime = "";
+        }
+        systemWarningNoticeWarningList(obj).then(response => {
+          this.$set(this,'loading',false);
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
       },
       //操作按钮
       tableButton(type,row){
@@ -201,15 +231,13 @@
         if(type == 1){
           //新增
           this.$set(this,'pageType',2);
-        }else if(type == 2){
+        }else if(type == 2 || type == 3){
           //详情
-          this.$set(this,'pageType',3);
-          this.$set(this,'propsData',row);
-        }else if(type == 3){
-          //处理
-          this.$set(this,'pageType',3);
-          this.$set(this,'propsData',row);
-        }else if(type == 4){
+          systemWarningNoticeDetail({id:row.noticeId}).then(response => {
+            this.$set(this,'propsData',JSON.parse(JSON.stringify(response.data)));
+            this.$set(this,'pageType',3);
+          });
+        }else if(type == 'out'){
           //返回并刷新
           this.$set(this,'pageType',1);
           this.getList();

+ 301 - 256
src/views/integratedManagement/messageNotice/warningNotice/infoPage.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="page-container earlyWarningEvent-infoPage">
     <div class="page-top-title-box">
-      <p class="page-top-title-name-p">{{infoData.infoType == 1?'处理':'详情'}}</p>
+      <p class="page-top-title-name-p">{{infoData.noticeStatus == 0?'处理':'详情'}}</p>
       <p class="page-top-title-out-p" @click="backPage">返回</p>
     </div>
     <div class="content-box scrollbar-box">
@@ -10,111 +10,187 @@
         <div class="text-max-box">
           <div class="text-left-box">
             <p>报警时间:</p>
-            <p>{{infoData.data1}}</p>
+            <p>{{infoData.warnTime}}</p>
           </div>
           <div class="text-center-box">
             <p>预警类型:</p>
-            <p>{{infoData.data2}}</p>
+            <p>{{infoData.warnType==1?'化学品预警':(infoData.warnType==2?'气瓶预警':'算法预警')}}</p>
           </div>
           <div class="text-right-box">
             <p>实验室负责人:</p>
-            <p>{{infoData.data3}}</p>
+            <p v-for="(item,index) in infoData.adminInfoList">{{item.userName}}-{{item.mobile}}</p>
           </div>
         </div>
         <div class="text-max-box">
           <div class="text-left-box">
             <p>学院:</p>
-            <p>{{infoData.data4}}</p>
+            <p>{{infoData.deptName}}</p>
           </div>
           <div class="text-center-box">
             <p>实验室:</p>
-            <p>{{infoData.data5}}</p>
+            <p>{{infoData.subName}}({{infoData.roomNum}})</p>
           </div>
           <div class="text-right-box">
             <p>安全员:</p>
-            <p>{{infoData.data6}}</p>
+            <p v-for="(item,index) in infoData.safeInfoList">{{item.userName}}-{{item.mobile}}</p>
           </div>
         </div>
         <div class="text-max-big-box">
           <div class="text-box">
             <p>预警事件:</p>
-            <p>{{infoData.data7}}</p>
+            <p>{{infoData.warnContent}}</p>
           </div>
         </div>
-        <p class="top-position-p" :class="infoData.infoType != 1?'position-type':''">{{infoData.infoType == 1?'待处理':'已处理'}}</p>
+        <p class="top-position-p" :class="infoData.noticeStatus != 0?'position-type':''">{{infoData.noticeStatus == 1?'已处理':'待处理'}}</p>
       </div>
-      <div class="bottom-max-big-box">
+      <!--化学品预警 -->
+      <div class="bottom-max-big-box" v-if="infoData.warnType==1">
         <p class="title-p">化学品信息</p>
-        <div class="text-max-box">
-          <div class="text-left-box">
-            <p style="width:96px;">化学品名称:</p>
-            <p>{{infoData.data8}}</p>
-          </div>
-          <div class="text-center-box">
-            <p>规格:</p>
-            <p>{{infoData.data9}}</p>
+        <!--列表 化学品1化学品违规带离。2超时未归还-->
+        <div v-if="infoData.chemicalWarnType==1 || infoData.chemicalWarnType==2">
+          <div class="text-max-box">
+            <div class="text-left-box">
+              <p style="width:96px;">化学品名称:</p>
+              <p>{{infoData.chemicalName}}</p>
+            </div>
+            <div class="text-center-box">
+              <p>规格:</p>
+              <p>{{infoData.normsNum}}</p>
+            </div>
+            <div class="text-right-box">
+              <p>存放位置:</p>
+              <p>{{infoData.position}}</p>
+            </div>
           </div>
-          <div class="text-right-box">
-            <p>存放位置:</p>
-            <p>{{infoData.data10}}</p>
+          <div class="text-max-box">
+            <div class="text-left-box">
+              <p style="width:96px;">余量:</p>
+              <p>{{infoData.surplus}}</p>
+            </div>
+            <div class="text-center-box">
+              <p>归属人:</p>
+              <p>{{infoData.belongName}}</p>
+            </div>
+            <div class="text-center-box" v-if="infoData.chemicalWarnType==2">
+              <p>领用人:</p>
+              <p>{{infoData.collectUserName}}</p>
+            </div>
           </div>
         </div>
-        <div class="text-max-box">
-          <div class="text-left-box">
-            <p style="width:96px;">余量:</p>
-            <p>{{infoData.data11}}</p>
+        <!--列表 化学品3化学品过期。4化学品即将过期-->
+        <div class="table-max-big-box" v-if="infoData.chemicalWarnType==3 || infoData.chemicalWarnType==4">
+          <el-table class="table-box" v-loading="loading" border :data="infoData.chemicalExpireList">
+            <el-table-column label="化学品名称" prop="chemicalName" fixed show-overflow-tooltip/>
+            <el-table-column label="规格" prop="normsNum" width="180" fixed show-overflow-tooltip/>
+            <el-table-column label="余量" prop="surplus" width="180" fixed show-overflow-tooltip/>
+            <el-table-column label="归属人" prop="belongName" width="220" fixed show-overflow-tooltip/>
+            <el-table-column label="过期时间" prop="expireTime" width="220" fixed show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{ parseTime(scope.row.expireTime) }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="存放位置" prop="position" width="220" show-overflow-tooltip/>
+          </el-table>
+        </div>
+        <!--列表 化学品3化学品过期。4化学品即将过期-->
+        <div class="table-max-big-box" v-if="infoData.chemicalWarnType==5">
+          <el-table class="table-box" v-loading="loading" border :data="infoData.chemicalOverdueStockList">
+            <el-table-column label="化学品名称" prop="chemicalName" fixed show-overflow-tooltip/>
+            <el-table-column label="CAS" prop="casNum" fixed show-overflow-tooltip/>
+            <el-table-column label="类别" prop="chemicalCategory" fixed show-overflow-tooltip/>
+            <el-table-column label="纯度" prop="chemicalPurity" fixed show-overflow-tooltip/>
+            <el-table-column label="规格" prop="normsNum"  fixed show-overflow-tooltip/>
+            <el-table-column label="数量" prop="applyNum"  fixed show-overflow-tooltip/>
+            <el-table-column label="归属人" prop="belongName"  fixed show-overflow-tooltip/>
+            <el-table-column label="学院" prop="deptName"  fixed show-overflow-tooltip/>
+            <el-table-column label="实验室" prop="subName"  fixed show-overflow-tooltip/>
+            <el-table-column label="类型" prop="source"  fixed show-overflow-tooltip/>
+            <el-table-column label="创建时间" prop="createTime"  fixed show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{ parseTime(scope.row.createTime) }}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <!--气瓶预警 -->
+      <div class="bottom-max-big-box" v-if="infoData.warnType==2">
+        <p class="title-p">气瓶信息</p>
+        <div>
+          <div class="text-max-box">
+            <div class="text-left-box">
+              <p style="width:96px;">气体名称:</p>
+              <p>{{infoData.airBottleName}}</p>
+            </div>
+            <div class="text-center-box">
+              <p>规格:</p>
+              <p>{{infoData.normsNum}}</p>
+            </div>
+            <div class="text-right-box">
+              <p>存放位置:</p>
+              <p>{{infoData.position}}</p>
+            </div>
           </div>
-          <div class="text-center-box">
-            <p>归属人:</p>
-            <p>{{infoData.data12}}</p>
+          <div class="text-max-box">
+            <div class="text-left-box">
+              <p style="width:96px;">余量:</p>
+              <p>{{infoData.surplus}}</p>
+            </div>
+            <div class="text-center-box">
+              <p>定位状态:</p>
+              <p>{{infoData.posiStatus}}</p>
+            </div>
           </div>
         </div>
+
+
       </div>
-      <div class="bottom-max-big-box">
+      <!--化学品报警抓拍 -->
+      <div class="bottom-max-big-box" v-if="(infoData.warnType==1&&infoData.noticeStatus==1) || infoData.warnType==2 ||infoData.warnType==3">
         <p class="title-p">报警抓拍</p>
         <div class="img-list-box">
-          <img v-for="(item,index) in infoData.data13" :key="index"
+          <img v-for="(item,index) in infoData.snapImg" :key="index"
                :src="item" @click="lookImg(index)">
         </div>
       </div>
       <div class="bottom-max-big-box ">
         <p class="title-p">通知记录</p>
         <div class="table-max-big-box">
-          <el-table class="table-box" v-loading="loading" border :data="infoData.data14">
+          <el-table class="table-box" v-loading="loading" border :data="infoData.warningNoticeLogVoList">
             <el-table-column label="通知时间" prop="createTime" width="200" fixed show-overflow-tooltip>
               <template slot-scope="scope">
-                <span>{{ parseTime(scope.row.createTime) }}</span>
+                <span>{{ parseTime(scope.row.noticeTime) }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="通知方式" prop="content" width="180" fixed show-overflow-tooltip/>
-            <el-table-column label="报警级别" prop="name" width="120" show-overflow-tooltip/>
-            <el-table-column label="通知人" prop="content" show-overflow-tooltip/>
+            <el-table-column label="通知方式" prop="noticeType" width="180" fixed show-overflow-tooltip/>
+            <el-table-column label="报警级别" prop="warningLevel" width="120" show-overflow-tooltip/>
+            <el-table-column label="通知人" prop="noticePreson" show-overflow-tooltip/>
           </el-table>
         </div>
       </div>
-      <div class="bottom-max-big-box">
+      <div class="bottom-max-big-box" v-if="infoData.warnType==1 || infoData.warnType==2">
         <p class="title-p">预警处理</p>
-        <div class="text-max-box" v-if="infoData.infoType != 1">
+        <div class="text-max-box" v-if="infoData.noticeStatus != 0">
           <div class="text-left-box">
-            <p>报警时间:</p>
-            <p>{{infoData.data15}}</p>
+            <p>处理方式:</p>
+            <p>{{infoData.handleType==1?'手动处理':(infoData.handleType==2?'归还操作':(infoData.handleType==3?'出库操作':(infoData.handleType==4?'入库操作':'')))}}</p>
           </div>
           <div class="text-center-box">
-            <p>预警类型:</p>
-            <p>{{infoData.data16}}</p>
+            <p>处理人:</p>
+            <p>{{infoData.handlePerson}}-{{infoData.handlePersonPhone}}</p>
           </div>
           <div class="text-right-box">
-            <p>实验室负责人:</p>
-            <p>{{infoData.data17}}</p>
+            <p>处理时间:</p>
+            <p>{{infoData.handleTime}}</p>
           </div>
         </div>
-        <div class="text-max-big-box" v-if="infoData.infoType != 1">
+        <div class="text-max-big-box" v-if="(infoData.warnType == 1 &&infoData.chemicalWarnType == 1) || infoData.warnType == 2">
           <div class="text-box">
             <p>处理备注:</p>
-            <p>{{infoData.data18}}</p>
+            <p>{{infoData.handleNotes}}</p>
           </div>
         </div>
-        <div class="form-max-box" v-if="infoData.infoType == 1">
+        <div class="form-max-box" v-if="infoData.noticeStatus == 0">
           <div class="text-max-box">
             <div class="text-left-box">
               <p>处理方式:</p>
@@ -124,7 +200,7 @@
           <el-form :model="infoDataForm" ref="form" label-width="0">
             <el-form-item label="" prop="name">
               <span style="font-size:16px;">处理备注:</span>
-              <el-input v-model="infoDataForm.name" placeholder="请输入名称" maxLength="70" style="width:1335px;"></el-input>
+              <el-input v-model="infoDataForm.handleNotes" placeholder="请输入名称" maxLength="70" style="width:1325px;"></el-input>
             </el-form-item>
           </el-form>
           <div class="button-bottom-box">
@@ -141,246 +217,215 @@
 </template>
 
 <script>
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
-  import fullScreenView from "@/components/fullScreenView/fullScreenView.vue";
-  export default {
-    name: 'infoPage',
-    components: {
-      fullScreenView,
+import fullScreenView from "@/components/fullScreenView/fullScreenView.vue";
+import {systemWarningNoticeHandleMessage } from '@/api/chemicalManage'
+export default {
+  name: 'infoPage',
+  components: {
+    fullScreenView,
+  },
+  props:{
+    propsData:{},
+  },
+  data(){
+    return{
+      loading:false,
+      showType:false,
+      infoData:{
+      },
+      infoDataForm:{
+        noticeId:'',
+        handleNotes:"",
+      },
+    }
+  },
+  created(){
+    this.initialize();
+  },
+  mounted(){
+    this.infoData=this.propsData;
+    this.$set(this.infoDataForm,'noticeId',this.propsData.noticeId);
+  },
+  methods:{
+    //初始化
+    initialize(){
     },
-    props:{
-      propsData:{},
+    // 返回按钮
+    backPage(){
+      this.$parent.tableButton('out');
     },
-    data(){
-      return{
-        showType:false,
-        infoData:{
-          infoType:1,
-          data1:'2023-05-27 14:46:18',
-          data2:'化学品',
-          data3:'李苗苗-13255668899、李苗苗-13255668899',
-          data4:'学员名称',
-          data5:'实验室名称(房间号)',
-          data6:'李苗苗-13255668899、李苗苗-13255668899',
-          data7:'【化学品预警】化学品名称(编码)-违规携带离开实验室名称(房间号),请尽快确认!',
-          data8:'2023-05-27 14:46:18',
-          data9:'500ml/瓶',
-          data10:'化学品柜-柜门-柜层',
-          data11:'300ml',
-          data12:'姓名-联系电话',
-          data13:[
-            'https://img1.baidu.com/it/u=1422064840,2936115861&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500',
-            'https://img1.baidu.com/it/u=716638254,3920932970&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
-            'https://img2.baidu.com/it/u=2537370952,3446004972&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500',
-            'https://img2.baidu.com/it/u=2312383180,3750420672&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800',
-          ],
-          data14:[],
-          data15:'归还操作',
-          data16:'姓名-联系电话',
-          data17:'2023-05-27 14:46:18',
-          data18:'手动处理输入的备注内容手动处理输入的备注内容手动处理输入的备注内容手动处理输入的备注内容手动处理输入的备注内容手动处理输入的备注内容手动处理输入的备注内容'
-        },
-        infoDataForm:{
-          remark:"",
-        },
-      }
+    /** 提交按钮 */
+    submitForm() {
+      let self=this;
+      systemWarningNoticeHandleMessage(self.infoDataForm).then( response => {
+        self.msgSuccess("成功")
+        self.$parent.tableButton('out');
+      });
     },
-    created(){
-      this.initialize();
+    // 照片预览
+    lookImg(index){
+      this.$refs['fullScreenView'].initialize(index);
     },
-    mounted(){
-
-    },
-    methods:{
-      //初始化
-      initialize(){
-        // this.$set(this,'showType',this.propsData.showType);
-        // if(this.propsData.id){
-        //   let obj = {
-        //     id:this.propsData.id,
-        //     name:this.propsData.name,
-        //   };
-        //   this.$set(this,'infoData',obj);
-        // }else{
-        //   this.$set(this,'infoData',{
-        //     name:"",
-        //   });
-        // }
-      },
-      // 返回按钮
-      backPage(){
-        this.$parent.tableButton(4);
-      },
-      /** 提交按钮 */
-      submitForm() {
-
-      },
-      // 照片预览
-      lookImg(index){
-        this.$refs['fullScreenView'].initialize(index);
-      },
-    },
-  }
+  },
+}
 </script>
 
 <style scoped lang="scss">
-  .earlyWarningEvent-infoPage{
-    .content-box{
-      flex:1;
-      display: flex;
-      flex-direction: column;
-      .top-max-big-box , .bottom-max-big-box{
-        padding:25px 80px;
-        .title-p{
-          line-height:48px;
-          font-size:16px;
-          font-weight: 700;
-          color:#333;
-        }
-        .text-max-box{
+.earlyWarningEvent-infoPage{
+  .content-box{
+    flex:1;
+    display: flex;
+    flex-direction: column;
+    .top-max-big-box , .bottom-max-big-box{
+      padding:25px 80px;
+      .title-p{
+        line-height:48px;
+        font-size:16px;
+        font-weight: 700;
+        color:#333;
+      }
+      .text-max-box{
+        display: flex;
+        .text-left-box{
+          width:390px;
           display: flex;
-          .text-left-box{
-            width:390px;
-            display: flex;
-            padding:16px 0;
-            p{
-              font-size:16px;
-              line-height:24px;
-              /*单行省略号*/
-              display:block;
-              overflow:hidden;
-              text-overflow:ellipsis;
-              white-space:nowrap;
-            }
-            p:nth-child(1){
-              width:80px;
-              text-align: right;
-            }
-            p:nth-child(2){
-              flex:1;
-            }
+          padding:16px 0;
+          p{
+            font-size:16px;
+            line-height:24px;
+            /*单行省略号*/
+            display:block;
+            overflow:hidden;
+            text-overflow:ellipsis;
+            white-space:nowrap;
           }
-          .text-center-box{
-            width:410px;
-            display: flex;
-            padding:16px 0;
-            p{
-              font-size:16px;
-              line-height:24px;
-              /*单行省略号*/
-              display:block;
-              overflow:hidden;
-              text-overflow:ellipsis;
-              white-space:nowrap;
-            }
-            p:nth-child(1){
-              width:90px;
-              text-align: right;
-            }
-            p:nth-child(2){
-              flex:1;
-            }
+          p:nth-child(1){
+            width:80px;
+            text-align: right;
           }
-          .text-right-box{
-            width:610px;
-            display: flex;
-            padding:16px 0;
-            p{
-              font-size:16px;
-              line-height:24px;
-              /*单行省略号*/
-              display:block;
-              overflow:hidden;
-              text-overflow:ellipsis;
-              white-space:nowrap;
-            }
-            p:nth-child(1){
-              width:120px;
-              text-align: right;
-            }
-            p:nth-child(2){
-              flex:1;
-            }
+          p:nth-child(2){
+            flex:1;
           }
         }
-        .text-max-big-box{
+        .text-center-box{
+          width:410px;
           display: flex;
-          .text-box{
-            flex: 1;
-            display: flex;
-            padding:16px 0;
-            p{
-              font-size:16px;
-              line-height:24px;
-              /*单行省略号*/
-              display:block;
-              overflow:hidden;
-              text-overflow:ellipsis;
-              white-space:nowrap;
-            }
-            p:nth-child(1){
-              width:80px;
-              text-align: right;
-            }
-            p:nth-child(2){
-              flex:1;
-            }
+          padding:16px 0;
+          p{
+            font-size:16px;
+            line-height:24px;
+            /*单行省略号*/
+            display:block;
+            overflow:hidden;
+            text-overflow:ellipsis;
+            white-space:nowrap;
           }
-        }
-        .img-list-box{
-          padding-top:12px;
-          img{
-            cursor: pointer;
-            display:inline-block;
-            width:130px;
-            height:130px;
-            margin-right:10px;
-            margin-bottom:10px;
+          p:nth-child(1){
+            width:90px;
+            text-align: right;
+          }
+          p:nth-child(2){
+            flex:1;
           }
         }
-        .table-max-big-box{
-          padding:12px 0;
-          height:260px!important;
+        .text-right-box{
+          width:610px;
           display: flex;
-          flex-direction: column;
+          padding:16px 0;
+          p{
+            font-size:16px;
+            line-height:24px;
+            /*单行省略号*/
+            display:block;
+            overflow:hidden;
+            text-overflow:ellipsis;
+            white-space:nowrap;
+          }
+          p:nth-child(1){
+            width:120px;
+            text-align: right;
+          }
+          p:nth-child(2){
+            flex:1;
+          }
         }
-        .button-bottom-box{
+      }
+      .text-max-big-box{
+        display: flex;
+        .text-box{
+          flex: 1;
           display: flex;
+          padding:16px 0;
+          p{
+            font-size:16px;
+            line-height:24px;
+            /*单行省略号*/
+            display:block;
+            overflow:hidden;
+            text-overflow:ellipsis;
+            white-space:nowrap;
+          }
           p:nth-child(1){
-            flex:1;
+            width:80px;
+            text-align: right;
           }
           p:nth-child(2){
-            width:100px;
-          }
-          p:nth-child(3){
             flex:1;
           }
         }
       }
-      .top-max-big-box{
-        position: relative;
-        .top-position-p{
-          position: absolute;
-          top:0;
-          right:0;
+      .img-list-box{
+        padding-top:12px;
+        img{
+          cursor: pointer;
+          display:inline-block;
+          width:130px;
+          height:130px;
+          margin-right:10px;
+          margin-bottom:10px;
+        }
+      }
+      .table-max-big-box{
+        padding:12px 0;
+        height:260px!important;
+        display: flex;
+        flex-direction: column;
+      }
+      .button-bottom-box{
+        display: flex;
+        p:nth-child(1){
+          flex:1;
+        }
+        p:nth-child(2){
           width:100px;
-          height:40px;
-          border-bottom-left-radius:20px;
-          background-color: #FFA200;
-          color:#fff;
-          font-size:16px;
-          text-align: center;
-          line-height:40px;
         }
-        .position-type{
-          background-color: #0183FA;
+        p:nth-child(3){
+          flex:1;
         }
       }
-      .bottom-max-big-box{
-        border-top:20px solid #F5F5F5;
+    }
+    .top-max-big-box{
+      position: relative;
+      .top-position-p{
+        position: absolute;
+        top:0;
+        right:0;
+        width:100px;
+        height:40px;
+        border-bottom-left-radius:20px;
+        background-color: #FFA200;
+        color:#fff;
+        font-size:16px;
+        text-align: center;
+        line-height:40px;
       }
+      .position-type{
+        background-color: #0183FA;
+      }
+    }
+    .bottom-max-big-box{
+      border-top:20px solid #F5F5F5;
     }
   }
+}
 </style>