|
@@ -8,7 +8,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="危害物质名称" prop="matterName">
|
|
|
<el-input v-model="queryParams.matterName" placeholder="请输入危害物质名称" clearable size="small"
|
|
|
- @keyup.enter.native="handleQuery" />
|
|
|
+ @keyup.enter.native="handleQuery"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
@@ -56,12 +56,12 @@
|
|
|
|
|
|
<el-table v-loading="loading" :data="matterList" @selection-change="handleSelectionChange" :height="clientHeight"
|
|
|
border>
|
|
|
- <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="remarks" :show-overflow-tooltip="true" />
|
|
|
+ <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="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">
|
|
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
|
@@ -75,13 +75,13 @@
|
|
|
</el-table>
|
|
|
|
|
|
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
|
|
- @pagination="getList" />
|
|
|
+ @pagination="getList"/>
|
|
|
|
|
|
<!-- 添加或修改危害物质数据关联对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-form-item label="危害物质名称" prop="matterName">
|
|
|
- <el-input v-model="form.matterName" placeholder="请输入危害物质名称" style="width: 200px;" />
|
|
|
+ <el-input v-model="form.matterName" placeholder="请输入危害物质名称" style="width: 200px;"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="请选择相关危害">
|
|
|
<table>
|
|
@@ -127,31 +127,31 @@
|
|
|
</tr>
|
|
|
<tr style="text-align: center;">
|
|
|
<td style="width: 50px;">毒性<br>
|
|
|
- <el-checkbox v-model="cIsToxic" true-label="1" false-label="0" />
|
|
|
+ <el-checkbox v-model="cIsToxic" true-label="1" false-label="0"/>
|
|
|
</td>
|
|
|
<td style="width: 50px;">易燃性<br>
|
|
|
- <el-checkbox v-model="cIsFlammable" true-label="1" false-label="0" />
|
|
|
+ <el-checkbox v-model="cIsFlammable" true-label="1" false-label="0"/>
|
|
|
</td>
|
|
|
<td style="width: 50px;">氧化性<br>
|
|
|
- <el-checkbox v-model="cIsOxidizing" true-label="1" false-label="0" />
|
|
|
+ <el-checkbox v-model="cIsOxidizing" true-label="1" false-label="0"/>
|
|
|
</td>
|
|
|
<td style="width: 50px;">爆炸性<br>
|
|
|
- <el-checkbox v-model="cIsExplosive" true-label="1" false-label="0" />
|
|
|
+ <el-checkbox v-model="cIsExplosive" true-label="1" false-label="0"/>
|
|
|
</td>
|
|
|
<td style="width: 50px;">腐蚀性<br>
|
|
|
- <el-checkbox v-model="cIsCorrosive" true-label="1" false-label="0" />
|
|
|
+ <el-checkbox v-model="cIsCorrosive" true-label="1" false-label="0"/>
|
|
|
</td>
|
|
|
<td style="width: 120px;">刺激性/致敏性/毒性<br>
|
|
|
- <el-checkbox v-model="cIsIrritantToxic" true-label="1" false-label="0" />
|
|
|
+ <el-checkbox v-model="cIsIrritantToxic" true-label="1" false-label="0"/>
|
|
|
</td>
|
|
|
<td style="width: 70px;">健康危害<br>
|
|
|
- <el-checkbox v-model="cIsHealthHazard" true-label="1" false-label="0" />
|
|
|
+ <el-checkbox v-model="cIsHealthHazard" true-label="1" false-label="0"/>
|
|
|
</td>
|
|
|
<td style="width: 70px;">压力下气体<br>
|
|
|
- <el-checkbox v-model="cIsCompressedGas" true-label="1" false-label="0" />
|
|
|
+ <el-checkbox v-model="cIsCompressedGas" true-label="1" false-label="0"/>
|
|
|
</td>
|
|
|
<td style="width: 90px;">危害水生环境<br>
|
|
|
- <el-checkbox v-model="cIsEnvironmentalHazard" true-label="1" false-label="0" />
|
|
|
+ <el-checkbox v-model="cIsEnvironmentalHazard" true-label="1" false-label="0"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
@@ -227,7 +227,7 @@
|
|
|
<el-input v-model="form.matterProtects" placeholder="请输入相关防护措施集合" />
|
|
|
</el-form-item> -->
|
|
|
<el-form-item label="备注" prop="remarks">
|
|
|
- <el-input v-model="form.remarks" placeholder="请输入备注" style="width: 500px;" />
|
|
|
+ <el-input v-model="form.remarks" placeholder="请输入备注" style="width: 500px;"/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -246,7 +246,7 @@
|
|
|
<em>点击上传</em>
|
|
|
</div>
|
|
|
<div class="el-upload__tip" slot="tip">
|
|
|
- <el-checkbox v-model="upload.updateSupport" />
|
|
|
+ <el-checkbox v-model="upload.updateSupport"/>
|
|
|
是否更新已经存在的用户数据
|
|
|
<el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
|
|
|
</div>
|
|
@@ -294,22 +294,22 @@ export default {
|
|
|
protectType: '2',
|
|
|
},
|
|
|
protectGloves: [], //防护眼镜
|
|
|
- safeGoggle:null,
|
|
|
+ safeGoggle: null,
|
|
|
safeGogglesParams: {
|
|
|
protectType: '1',
|
|
|
},
|
|
|
safeGoggles: [], //防护手套
|
|
|
- resProtect:null,
|
|
|
+ resProtect: null,
|
|
|
resProtectsParams: {
|
|
|
protectType: '3',
|
|
|
},
|
|
|
resProtects: [], //防护面罩
|
|
|
- rubberBoot:null,
|
|
|
+ rubberBoot: null,
|
|
|
rubberBootsParams: {
|
|
|
protectType: '4',
|
|
|
},
|
|
|
rubberBoots: [], //防护靴
|
|
|
- protectSuit:null,
|
|
|
+ protectSuit: null,
|
|
|
protectSuitsParams: {
|
|
|
protectType: '5',
|
|
|
},
|
|
@@ -323,6 +323,8 @@ export default {
|
|
|
cIsHealthHazard: null,
|
|
|
cIsCompressedGas: null,
|
|
|
cIsEnvironmentalHazard: null,
|
|
|
+ matterFeatures: [],
|
|
|
+ matterProtects: [],
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
@@ -438,6 +440,15 @@ export default {
|
|
|
},
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
+ this.cIsToxic = null;
|
|
|
+ this.cIsFlammable = null;
|
|
|
+ this.cIsOxidizing = null;
|
|
|
+ this.cIsExplosive = null;
|
|
|
+ this.cIsCorrosive = null;
|
|
|
+ this.cIsIrritantToxic = null;
|
|
|
+ this.cIsHealthHazard = null;
|
|
|
+ this.cIsCompressedGas = null;
|
|
|
+ this.cIsEnvironmentalHazard = null;
|
|
|
this.form = {
|
|
|
id: null,
|
|
|
delFlag: null,
|
|
@@ -478,10 +489,111 @@ export default {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.title = "修改危害物质数据关联";
|
|
|
+
|
|
|
+ if (this.form.matterFeatures != null) {
|
|
|
+ var mf = this.form.matterFeatures.split(",");
|
|
|
+ mf.forEach(t => {
|
|
|
+ if (t == 1) {
|
|
|
+ this.cIsToxic = "1";
|
|
|
+ }
|
|
|
+ if (t == 2) {
|
|
|
+ this.cIsFlammable = "1";
|
|
|
+ }
|
|
|
+ if (t == 3) {
|
|
|
+ this.cIsOxidizing = "1";
|
|
|
+ }
|
|
|
+ if (t == 4) {
|
|
|
+ this.cIsExplosive = "1";
|
|
|
+ }
|
|
|
+ if (t == 5) {
|
|
|
+ this.cIsCorrosive = "1";
|
|
|
+ }
|
|
|
+ if (t == 6) {
|
|
|
+ this.cIsIrritantToxic = "1";
|
|
|
+ }
|
|
|
+ if (t == 7) {
|
|
|
+ this.cIsHealthHazard = "1";
|
|
|
+ }
|
|
|
+ if (t == 8) {
|
|
|
+ this.cIsCompressedGas = "1";
|
|
|
+ }
|
|
|
+ if (t == 9) {
|
|
|
+ this.cIsEnvironmentalHazard = "1";
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
+ //处理选择框
|
|
|
+ handleCheck() {
|
|
|
+ var a = 0;
|
|
|
+ for (let i = 0; i < 9; i++) {
|
|
|
+ if (i == 0 && this.cIsToxic != null) {
|
|
|
+ this.matterFeatures[a] = "1";
|
|
|
+ a++;
|
|
|
+ }
|
|
|
+ if (i == 1 && this.cIsFlammable != null) {
|
|
|
+ this.matterFeatures[a] = "2";
|
|
|
+ a++;
|
|
|
+ }
|
|
|
+ if (i == 2 && this.cIsOxidizing != null) {
|
|
|
+ this.matterFeatures[a] = "3";
|
|
|
+ a++;
|
|
|
+ }
|
|
|
+ if (i == 3 && this.cIsExplosive != null) {
|
|
|
+ this.matterFeatures[a] = "4";
|
|
|
+ a++;
|
|
|
+ }
|
|
|
+ if (i == 4 && this.cIsCorrosive != null) {
|
|
|
+ this.matterFeatures[a] = "5";
|
|
|
+ a++;
|
|
|
+ }
|
|
|
+ if (i == 5 && this.cIsIrritantToxic != null) {
|
|
|
+ this.matterFeatures[a] = "6";
|
|
|
+ a++;
|
|
|
+ }
|
|
|
+ if (i == 6 && this.cIsHealthHazard != null) {
|
|
|
+ this.matterFeatures[a] = "7";
|
|
|
+ a++;
|
|
|
+ }
|
|
|
+ if (i == 7 && this.cIsCompressedGas != null) {
|
|
|
+ this.matterFeatures[a] = "8";
|
|
|
+ a++;
|
|
|
+ }
|
|
|
+ if (i == 8 && this.cIsEnvironmentalHazard != null) {
|
|
|
+ this.matterFeatures[a] = "9";
|
|
|
+ a++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var b = 0;
|
|
|
+ for (let i = 0; i < 5; i++) {
|
|
|
+ if (i == 0 && this.protectGlove != null) {
|
|
|
+ this.matterProtects[b] = this.protectGlove;
|
|
|
+ b++;
|
|
|
+ }
|
|
|
+ if (i == 1 && this.safeGoggle != null) {
|
|
|
+ this.matterProtects[b] = this.safeGoggle;
|
|
|
+ b++;
|
|
|
+ }
|
|
|
+ if (i == 2 && this.resProtect != null) {
|
|
|
+ this.matterProtects[b] = this.resProtect;
|
|
|
+ b++;
|
|
|
+ }
|
|
|
+ if (i == 3 && this.rubberBoot != null) {
|
|
|
+ this.matterProtects[b] = this.rubberBoot;
|
|
|
+ b++;
|
|
|
+ }
|
|
|
+ if (i == 4 && this.protectSuit != null) {
|
|
|
+ this.matterProtects[b] = this.protectSuit;
|
|
|
+ b++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
+ this.handleCheck();
|
|
|
+ this.form.matterFeatures = this.matterFeatures.join(",");
|
|
|
+ this.form.matterProtects = this.matterProtects.join(",");
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
@@ -507,7 +619,7 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
- }).then(function() {
|
|
|
+ }).then(function () {
|
|
|
return delMatter(ids);
|
|
|
}).then(() => {
|
|
|
this.getList();
|
|
@@ -521,7 +633,7 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
- }).then(function() {
|
|
|
+ }).then(function () {
|
|
|
return exportMatter(queryParams);
|
|
|
}).then(response => {
|
|
|
this.download(response.msg);
|