dedsudiyu 1 年之前
父節點
當前提交
852d959071

+ 9 - 16
src/views/integratedManagement/laboratoryManagement/safetyInfoCategory/safetyInfoConfig.vue

@@ -32,7 +32,7 @@
           >新增</p>
         </div>
         <el-table class="table-box" border v-loading="loading" :data="tableData">
-          <el-table-column label="" align="left" class-name="small-padding fixed-width" width="120">
+          <el-table-column label="排序" align="left" class-name="small-padding fixed-width" width="80">
             <template slot-scope="scope">
               <el-input
                 onkeyup="value=value.replace(/[^\d]/g,'')"
@@ -489,23 +489,16 @@ export default {
       }
     }
 
-
-  }
-
-</style>
-<style lang="scss">
-  .safetyInfoConfig{
-    .el-table{
-      .el-input--medium .el-input__inner{
-        height:30px;
-        line-height:30px;
-        width:55px;
+    .table-box{
+      ::v-deep .el-input--medium .el-input__inner {
+        height: 26px;
+        line-height: 26px;
+        width: 55px;
         text-align: center;
-        padding:0 10px;
+        padding: 0 10px;
       }
     }
-    .pagination-container{
-      height: 45px;
-    }
+
   }
+
 </style>

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

@@ -154,9 +154,9 @@
                 <el-select v-model="form.safeSigns" multiple  placeholder="请选择安全警示标识" style="width:500px;">
                   <el-option
                     v-for="dict in safetyWarning"
-                    :key="dict.itemId"
+                    :key="dict.value"
                     :label="dict.label"
-                    :value="dict.itemId"
+                    :value="dict.value"
                   ></el-option>
                 </el-select>
               </el-form-item>
@@ -164,15 +164,15 @@
                 <el-select v-model="form.riskMeasure" multiple  placeholder="请选择风险防控措施" style="width:500px;">
                   <el-option
                     v-for="dict in riskMeasure"
-                    :key="dict.itemId"
+                    :key="dict.value"
                     :label="dict.label"
-                    :value="dict.itemId"
+                    :value="dict.value"
                   ></el-option>
                 </el-select>
               </el-form-item>
             </div>
             <div class="right-form-box">
-              <el-form-item label="安全责任人" prop="safeUserId" class="form-item" label-width="150px">
+              <el-form-item label="安全" prop="safeUserId" class="form-item" label-width="150px">
                 <el-select
                   style="width:500px;"
                   v-model="form.safeUserId"
@@ -197,9 +197,9 @@
                 <el-select v-model="form.hazardCategory" multiple  placeholder="请选择主要危险类别" style="width:500px;">
                   <el-option
                     v-for="dict in hazardCategory"
-                    :key="dict.itemId"
+                    :key="dict.value"
                     :label="dict.label"
-                    :value="dict.itemId"
+                    :value="dict.value"
                   ></el-option>
                 </el-select>
               </el-form-item>
@@ -207,9 +207,9 @@
                 <el-select v-model="form.outFire" multiple  placeholder="请选择灭火要点" style="width:500px;">
                   <el-option
                     v-for="dict in extinguishingKeyPoints"
-                    :key="dict.itemId"
+                    :key="dict.value"
                     :label="dict.label"
-                    :value="dict.itemId"
+                    :value="dict.value"
                   ></el-option>
                 </el-select>
               </el-form-item>
@@ -260,7 +260,8 @@
               </el-form-item>
             </div>
             <div class="bottom-form-box">
-              <el-form-item v-if="item.publicList.length>0" :label="item.brandName" prop="safeSigns" class="form-item" v-for="(item,index) in  safetyInfoList" label-width="150px">
+              <el-form-item v-if="item.publicList.length>0" :label="item.brandName" prop="safeSigns" class="form-item"
+                            v-for="(item,index) in  safetyInfoList" label-width="150px">
                 <el-select v-if="item.publicList.length>0" v-model="item.privateList" multiple  placeholder="请选择" style="width:500px;">
                   <el-option
                     v-for="dict in item.publicList"
@@ -415,28 +416,18 @@
             this.$set(this.form,'adminId',this.subjectData.adminId)
             this.userSelectList(this.subjectData.adminName);
           }
-          //实验室安全责任人
-          if(this.subjectData.safeUserId){
+          //实验室安全
+          if(this.subjectData.safeUserList[0]){
             let list = [];
-            let safeUserIdList = [];
-            let nameList = "";
-            if(this.subjectData.safeUserNames){
-              nameList = this.subjectData.safeUserNames.split(",");
-            }
-            let idList = "";
-            if(this.subjectData.safeUserId){
-              idList = this.subjectData.safeUserId.split(",");
-            }
-            for(let i=0;i<nameList.length;i++){
-              safeUserIdList.push(parseInt(idList[i]))
+            this.subjectData.safeUserList.forEach((item)=>{
               let obj = {
-                userName:nameList[i],
-                userId:parseInt(idList[i]),
+                userName:item.safeUserName,
+                userId:item.safeUserId,
               };
               list.push(obj)
-            }
-            this.optionsUserOne = list;
-            this.$set(this.form, 'safeUserId', safeUserIdList);
+            })
+            this.$set(this.form, 'safeUserId', this.subjectData.safeUserId);
+            this.$set(this, 'optionsUserOne', list);
           }
           //安全信息牌
           if(this.subjectData.labInfoBrandModels){

+ 17 - 0
src/views/integratedManagement/laboratoryManagement/subject/index.vue

@@ -267,6 +267,23 @@
       //获取实验室详情 type:1.详情 2.编辑
       getSubInfo(row,type){
         laboratorySubRelInfoGetDetailInfo({ infoId: row.infoId }).then(response => {
+
+
+
+          let classifyList = [];
+          for(let i=0;i<response.data.labInfoBrandModels.length;i++){
+            console.log(response.data.labInfoBrandModels[i])
+            if(response.data.labInfoBrandModels[i].privateList.length>0 && (response.data.labInfoBrandModels[i].brandType==1||response.data.labInfoBrandModels[i].brandType==2)){
+              classifyList.push(response.data.labInfoBrandModels[i]);
+            }
+          }
+          response.data.classifyList = classifyList;
+          if(response.data.safeUserList[0]){
+            response.data.safeUserId = [];
+            response.data.safeUserList.forEach((item)=>{
+              response.data.safeUserId.push(item.safeUserId);
+            })
+          }
           this.$set(this, 'subjectData', response.data)
           if(type == 1){
             //详情

+ 93 - 85
src/views/integratedManagement/laboratoryManagement/subject/infoPage.vue

@@ -1,20 +1,20 @@
 <template>
     <div class="infoPage" v-if="subjectData.infoId">
+      <!--左侧数据展示-->
       <div class="left-max-box">
         <div class="all-title-box">
           <p></p>
           <p style="flex:1;">实验室安全信息牌</p>
-          <div v-if="versionField() == 'xiBeiNongLinDaXue'" class="reset-button-one" style="margin-top:-5px;width:80px!important;height:30px!important;line-height:30px!important;" @click="backPage">返回</div>
         </div>
         <div class="left-top-title-box">
           <div class="left-box">
             <div class="lv-name-box">
-              <p :style="'color:'+subjectData.fiedColor+';border:1px solid '+subjectData.fiedColor+';'">{{subjectData.levelName}}</p>
-              <p>{{subjectData.name}}</p>
+              <p :style="'color:'+subjectData.levelColor+';border:1px solid '+subjectData.levelColor+';'">{{subjectData.levelName}}</p>
+              <p>{{subjectData.subName}}</p>
             </div>
             <div class="type-address-box">
-              <p>{{subjectData.typeName}}</p>
-              <p v-if="subjectData.subAddrr">{{subjectData.subAddrr.buildName}}{{subjectData.subAddrr.floorName}}</p>
+              <p class="type-p" v-for="(item,index) in subjectData.labClassTypeList">{{item.typeName}}</p>
+              <p class="address-p">{{subjectData.buildName}}{{subjectData.floorName}}</p>
             </div>
           </div>
           <div class="right-code-img" @click="clickCode">
@@ -29,25 +29,60 @@
             <p>联系方式:<span>{{subjectData.adminPhone}}</span></p>
           </div>
           <div class="right-box">
-            <div v-for="(item,index) in subjectData.safeUserName" :key="index">
-              <p>安全责任人:<span>{{subjectData.safeUserName[index]}}</span></p>
-              <p>联系方式:<span>{{subjectData.safeUserPhone[index]?subjectData.safeUserPhone[index]:'未填写'}}</span></p>
+            <div v-for="(item,index) in subjectData.safeUserList" :key="index">
+              <p>安全员:<span>{{item.safeUserName}}</span></p>
+              <p>联系方式:<span>{{item.safeUserPhone}}</span></p>
             </div>
           </div>
         </div>
+        <p class="info-max-title-p">管控一体机信息</p>
         <div class="info-max-box">
-          <div class="for-text-box" v-if="item.privateList.length>0 && item.classifyType==1" v-for="(item,index) in  subjectData.classifyList">
-            <p class="info-title">{{item.classifyName}}:</p>
+          <div class="left-box">
+            <div class="for-text-box">
+              <p class="info-title">主要危险类别:{{!subjectData.hazardCategory?'未配置':''}}</p>
+              <div class="for-box" v-for="(item,index1) in subjectData.hazardCategory" :key="index1">
+                <p class="for-info-p" v-for="(minItem,index2) in hazardCategory" :key="index2" v-if="minItem.value == item">● {{minItem.label}}</p>
+              </div>
+            </div>
+            <div class="for-text-box">
+              <p class="info-title">灭火要点:{{!subjectData.outfire?'未配置':''}}</p>
+              <div class="for-box" v-for="(item,index1) in subjectData.outfire" :key="index1">
+                <p class="for-info-p" v-for="(minItem,index2) in extinguishingKeyPoints" :key="index2" v-if="minItem.value == item">● {{minItem.label}}</p>
+              </div>
+            </div>
+          </div>
+          <div class="right-box">
+            <div class="for-text-box">
+              <p class="info-title">风险防控措施:{{!subjectData.riskMeasure?'未配置':''}}</p>
+              <div class="for-box" v-for="(item,index1) in subjectData.riskMeasure" :key="index1">
+                <p class="for-info-p" v-for="(minItem,index2) in riskMeasure" :key="index2" v-if="minItem.value == item">● {{minItem.label}}</p>
+              </div>
+            </div>
+            <div class="for-img-box">
+              <p class="info-title" style="margin-bottom:7px;">安全警示标识:{{!subjectData.safeSigns?'未配置':''}}</p>
+              <img src="@/assets/ZDimages/integratedManagement/icon_aqxxp_jzxy.png" v-if="item == 'xiyan'" v-for="(item,index) in subjectData.safeSigns" :key="index">
+              <img src="@/assets/ZDimages/integratedManagement/icon_aqxxp_jzys.png" v-if="item == 'yinshi'" v-for="(item,index) in subjectData.safeSigns" :key="index">
+              <img src="@/assets/ZDimages/integratedManagement/icon_aqxxp_dxaq.png" v-if="item == 'anquan'" v-for="(item,index) in subjectData.safeSigns" :key="index">
+              <img src="@/assets/ZDimages/integratedManagement/icon_aqxxp_gzf.png" v-if="item == 'gongzuofu'" v-for="(item,index) in subjectData.safeSigns" :key="index">
+              <img src="@/assets/ZDimages/integratedManagement/icon_aqxxp_gbmc.png" v-if="item == 'menchuang'" v-for="(item,index) in subjectData.safeSigns" :key="index">
+              <img src="@/assets/ZDimages/integratedManagement/icon_aqxxp_gbsd.png" v-if="item == 'shuidian'" v-for="(item,index) in subjectData.safeSigns" :key="index">
+            </div>
+          </div>
+        </div>
+        <div class="info-max-box">
+          <div class="for-text-box" v-if="item.privateList.length>0 && item.brandType==1" v-for="(item,index) in  subjectData.classifyList">
+            <p class="info-title">{{item.brandName}}:</p>
             <div class="for-box" v-for="(item2,index2) in item.privateList" :key="index2">
               <p class="for-info-p">● {{item2.infoName}}</p>
             </div>
           </div>
-          <div class="for-img-box" v-if="item.privateList.length>0 && item.classifyType==2" v-for="(item,index) in  subjectData.classifyList">
-            <p class="info-title" style="margin-bottom:7px;">{{item.classifyName}}:</p>
+          <div class="for-img-box" v-if="item.privateList.length>0 && item.brandType==2" v-for="(item,index) in  subjectData.classifyList">
+            <p class="info-title" style="margin-bottom:7px;">{{item.brandName}}:</p>
             <img :src="item2.infoContent" v-for="(item2,index2) in item.privateList" :key="index2">
           </div>
         </div>
       </div>
+      <!--右侧数据展示-->
       <div class="right-max-box scrollbar-box">
         <div class="all-title-box" style="height:40px;">
           <p></p>
@@ -231,18 +266,8 @@
         }
       },
       created() {
-        //主要危险类别
-        this.getDicts("sys_hazard_category").then(response => {
-          this.hazardCategory = response.data;
-        });
-        //风险防控措施
-        this.getDicts("sys_risk_measure").then(response => {
-          this.riskMeasure = response.data;
-        });
-        //灭火要点
-        this.getDicts("sys_extinguishing_key_points").then(response => {
-          this.extinguishingKeyPoints = response.data;
-        });
+        // 初始化
+        this.initialize();
       },
       mounted(){
         let self = this;
@@ -253,58 +278,34 @@
 
       },
       methods:{
-        //视频方法
-        videoFunction(){
-          let self = this;
-          self.videoList = [];
-          for(let i=0;i<self.subjectData.videoData.length;i++){
-            let obj = {
-              player :{},
-              flvPlayer:{}
-            };
-            obj.player = document.getElementById(self.subjectData.videoData[i].divId);
-            obj.flvPlayer = flvjs.createPlayer(
-              {
-                // isLive: true, //=> 是否为直播流
-                // hasAudio: false, //=> 是否开启声音
-                type: self.subjectData.videoData[i].videoType, //媒体类型 flv 或 mp4
-                url: self.subjectData.videoData[i].url //视频流地址
-              },
-              {
-                enableStashBuffer: true,//启用 IO 存储缓冲区。 如果您需要实时流播放(最小延迟),请设置为 false,但如果存在网络抖动,则可能会停止。
-                stashInitialSize: 128,//IO 存储缓冲区初始大小。 默认值为 384KB。 指示合适的大小可以改善视频加载/搜索时间。
-                isLive: true,//是否是直播
-                lazyLoadRecoverDuration: 30,//指示以秒为单位的lazyLoad 恢复时间边界。
-                autoCleanupSourceBuffer: true,//进行自动清理
-                autoCleanupMaxBackwardDuration: 3 * 60,//3 * 60 当向后缓冲持续时间超过这个值(以秒为单位)时,对 SourceBuffer 进行自动清理
-                autoCleanupMinBackwardDuration: 2 * 60,//2 * 60 指示在执行自动清理时为后向缓冲区保留的持续时间(以秒为单位)。
-              }
-            );
-            self.videoList.push(obj);
+        initialize(){
+          //主要危险类别
+          this.getDicts("sys_hazard_category").then(response => {
+            this.hazardCategory = response.data;
+          });
+          //风险防控措施
+          this.getDicts("sys_risk_measure").then(response => {
+            this.riskMeasure = response.data;
+          });
+          //灭火要点
+          this.getDicts("sys_extinguishing_key_points").then(response => {
+            this.extinguishingKeyPoints = response.data;
+          });
+          //安全警示标识
+          if(this.subjectData.safeSigns){
+            this.subjectData.safeSigns = this.subjectData.safeSigns.split(',')
           }
-
-          for(let i=0;i<self.videoList.length;i++){
-            self.videoList[i].flvPlayer.attachMediaElement(self.videoList[i].player);
-            self.videoList[i].flvPlayer.load(); //加载
-            self.videoList[i].flvPlayer.play(); //加载
+          //风控防控措施
+          if(this.subjectData.riskMeasure){
+            this.subjectData.riskMeasure = this.subjectData.riskMeasure.split(',')
           }
-        },
-        //视屏全屏方法
-        videoFullScreen(index){
-          this.$refs.videoRef[index].webkitRequestFullScreen();
-        },
-        //数据中心视频关闭
-        videoOff(){
-          let self = this;
-          if(self.videoList[0]){
-            for(let i=0;i<self.videoList.length;i++){
-              self.videoList[i].flvPlayer.pause();
-              self.videoList[i].flvPlayer.unload();
-              self.videoList[i].flvPlayer.detachMediaElement();
-              self.videoList[i].flvPlayer.destroy();
-              self.videoList[i].flvPlayer = null;
-            }
-            self.videoList = [];
+          //主要危险类别
+          if(this.subjectData.hazardCategory){
+            this.subjectData.hazardCategory = this.subjectData.hazardCategory.split(',')
+          }
+          //灭火要点
+          if(this.subjectData.outFire){
+            this.subjectData.outFire = this.subjectData.outFire.split(',')
           }
         },
         //播放文字
@@ -375,11 +376,6 @@
           this.$parent.clickPage(1);
         },
       },
-      beforeDestroy() {
-        //清除定时器
-        let self = this;
-        self.videoOff();
-      },
     }
 </script>
 
@@ -399,7 +395,6 @@
       margin:5px 10px 20px 10px;
       .left-top-title-box{
         margin-top:13px;
-        height:74px;
         display: flex;
         border-bottom:1px dashed #999999;
         .left-box{
@@ -424,15 +419,19 @@
             }
           }
           .type-address-box{
-            display: flex;
+            padding:5px 0 10px 0;
             p{
+              display: inline-block;
               font-size:14px;
-              height:40px;
-              line-height:40px;
+              height:20px;
+              line-height:20px;
               color:#999;
             }
-            p:nth-child(1){
-              margin-right:40px;
+            .type-p{
+              margin-right:10px;
+            }
+            .type-address{
+              margin-left:10px;
             }
           }
         }
@@ -476,6 +475,15 @@
           }
         }
       }
+      .info-max-title-p{
+        line-height:20px;
+        font-size:16px;
+        color:#333;
+        font-weight:700;
+        border-top:1px dashed #999999;
+        padding-top:20px;
+        margin-top:10px;
+      }
       .info-max-box{
         margin-top:7px;
         display: flex;