Commit 8d9b7f3d authored by zhangjianqian's avatar zhangjianqian

3.风险信息的事故类型,改为多选(目前为单选)

parent 7e620c09
......@@ -20,16 +20,16 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="事故类型" prop="riskType">
<el-select v-model="queryParams.riskType" placeholder="请选择事故类型" clearable size="small">
<el-option
v-for="dict in riskTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
<!--<el-form-item label="事故类型" prop="riskType">-->
<!--<el-select v-model="queryParams.riskType" placeholder="请选择事故类型" clearable size="small">-->
<!--<el-option-->
<!--v-for="dict in riskTypeOptions"-->
<!--:key="dict.dictValue"-->
<!--:label="dict.dictLabel"-->
<!--:value="dict.dictValue"-->
<!--&gt;</el-option>-->
<!--</el-select>-->
<!--</el-form-item>-->
<el-form-item label="责任部门" prop="riskDept">
<el-select
......@@ -162,7 +162,7 @@
</el-select>
</el-form-item>
<el-form-item label="事故类型" prop="riskType">
<el-select v-model="form.riskType" placeholder="请选择事故类型">
<el-select v-model="form.riskType" multiple placeholder="请选择事故类型">
<el-option
v-for="dict in riskTypeOptions"
:key="dict.dictValue"
......@@ -268,7 +268,16 @@ export default {
});
},
riskTypeFormat(row,colum){
return this.selectDictLabel(this.riskTypeOptions, row.riskType);
var str =""
if(row.riskType==null){
return str;
}
for(var item of row.riskType.split(",")){
str += this.selectDictLabel(this.riskTypeOptions,item)+",";
}
return str.substr(0,str.length-1);
//return this.selectDictLabel(this.riskTypeOptions,item);
},
riskLevelFormat(row,colum){
return this.selectDictLabel(this.riskLevelOptions, row.riskLevel);
......@@ -352,6 +361,7 @@ export default {
const id = row.id || this.ids
getManager(id).then(response => {
this.form = response.data;
this.form.riskType = this.form.riskType.split(",");
this.open = true;
this.title = "修改【风险信息】";
});
......@@ -360,6 +370,8 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.riskType = (this.form.riskType).join(",");
console.log(this.form)
if (this.form.id != null) {
updateManager(this.form).then(response => {
this.msgSuccess("修改成功");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment