|
@@ -59,8 +59,8 @@
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
<el-table-column label="编号" align="center" prop="id" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="危害物质名称" align="center" prop="matterName" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="相关危害集合" align="center" prop="matterFeatures" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="相关防护措施集合" align="center" prop="matterProtects" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="相关危害集合" align="center" prop="matterFeaturesName" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="相关防护措施集合" align="center" prop="matterProtectsName" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
@@ -279,7 +279,7 @@ import {
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import {
|
|
|
- getForType
|
|
|
+ getForType, getProtect
|
|
|
} from "@/api/configuration/protect";
|
|
|
|
|
|
export default {
|
|
@@ -425,6 +425,16 @@ export default {
|
|
|
this.matterList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
+ this.matterList.forEach(ml => {
|
|
|
+ ml.matterFeaturesName = '';
|
|
|
+ ml.matterFeatures.split(',').forEach(mf => {
|
|
|
+ ml.matterFeaturesName += this.getMatterFeatureName(parseInt(mf)) + '、';
|
|
|
+ })
|
|
|
+ if (ml.matterFeaturesName != '') {
|
|
|
+ ml.matterFeaturesName = ml.matterFeaturesName.substring(0, ml.matterFeaturesName.length - 1)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(this.matterList)
|
|
|
});
|
|
|
},
|
|
|
/** 查询部门下拉树结构 */
|
|
@@ -449,6 +459,11 @@ export default {
|
|
|
this.cIsHealthHazard = null;
|
|
|
this.cIsCompressedGas = null;
|
|
|
this.cIsEnvironmentalHazard = null;
|
|
|
+ this.protectGlove=null;
|
|
|
+ this.rubberBoot=null;
|
|
|
+ this.protectSuit=null;
|
|
|
+ this.resProtect=null;
|
|
|
+ this.safeGoggle=null;
|
|
|
this.form = {
|
|
|
id: null,
|
|
|
delFlag: null,
|
|
@@ -522,6 +537,35 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ if(this.form.matterProtects!=null){
|
|
|
+ this.form.matterProtects.split(',').forEach(mp=>{
|
|
|
+ this.protectGloves.forEach(item=>{
|
|
|
+ if (mp==item.id){
|
|
|
+ this.protectGlove=item.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.safeGoggles.forEach(item=>{
|
|
|
+ if (mp==item.id){
|
|
|
+ this.safeGoggle=item.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.resProtects.forEach(item=>{
|
|
|
+ if (mp==item.id){
|
|
|
+ this.resProtect=item.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.rubberBoots.forEach(item=>{
|
|
|
+ if (mp==item.id){
|
|
|
+ this.rubberBoot=item.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.protectSuits.forEach(item=>{
|
|
|
+ if (mp==item.id){
|
|
|
+ this.protectSuit=item.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
//处理选择框
|
|
@@ -667,6 +711,28 @@ export default {
|
|
|
// 提交上传文件
|
|
|
submitFileForm() {
|
|
|
this.$refs.upload.submit();
|
|
|
+ },
|
|
|
+ getMatterFeatureName(index) {
|
|
|
+ switch (index) {
|
|
|
+ case 1:
|
|
|
+ return '毒性';
|
|
|
+ case 2:
|
|
|
+ return '易燃性';
|
|
|
+ case 3:
|
|
|
+ return '氧化性';
|
|
|
+ case 4:
|
|
|
+ return '爆炸性';
|
|
|
+ case 5:
|
|
|
+ return '腐蚀性';
|
|
|
+ case 6:
|
|
|
+ return '刺激性/致敏性/毒性';
|
|
|
+ case 7:
|
|
|
+ return '健康危害';
|
|
|
+ case 8:
|
|
|
+ return '压力下气体';
|
|
|
+ case 9:
|
|
|
+ return '危害水生环境';
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|