|
|
@ -135,8 +135,8 @@ |
|
|
|
<el-table-column |
|
|
|
label="堤防名称" |
|
|
|
align="center" |
|
|
|
prop="dikeId" |
|
|
|
:formatter="dikeIdFormat" |
|
|
|
prop="dikeCode" |
|
|
|
:formatter="dikeCodeFormat" |
|
|
|
min-width="120" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
@ -238,9 +238,9 @@ |
|
|
|
</div> |
|
|
|
<el-row :gutter="15"> |
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="96px"> |
|
|
|
<el-form-item label="堤防名称" prop="dikeId"> |
|
|
|
<el-form-item label="堤防名称" prop="dikeCode"> |
|
|
|
<el-select |
|
|
|
v-model="form.dikeId" |
|
|
|
v-model="form.dikeCode" |
|
|
|
placeholder="请选择堤防名称" |
|
|
|
style="width: 100%" |
|
|
|
> |
|
|
@ -248,7 +248,7 @@ |
|
|
|
v-for="dict in dikeNameOptions" |
|
|
|
:key="dict.id" |
|
|
|
:label="dict.dikeName" |
|
|
|
:value="dict.id" |
|
|
|
:value="dict.dikeCode" |
|
|
|
></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
@ -443,7 +443,7 @@ export default { |
|
|
|
form: {}, |
|
|
|
// 表单校验 |
|
|
|
rules: { |
|
|
|
dikeId: [ |
|
|
|
dikeCode: [ |
|
|
|
{ required: true, message: "请选择堤防名称", trigger: "blur" }, |
|
|
|
], |
|
|
|
organizationName: [ |
|
|
@ -524,21 +524,21 @@ export default { |
|
|
|
typeFormat(row, column) { |
|
|
|
return this.selectDictLabel(this.typeOptions, row.chargePersonType); |
|
|
|
}, |
|
|
|
dikeIdFormat(row) { |
|
|
|
const id = row.dikeId; |
|
|
|
dikeCodeFormat(row) { |
|
|
|
const dikeCode = row.dikeCode; |
|
|
|
// const name = await new Promise(function (resolve, reject) { |
|
|
|
// getJbxx(id).then((res) => { |
|
|
|
// // console.log(111, res); |
|
|
|
// resolve(res.data.dikeName); |
|
|
|
// }); |
|
|
|
// }); |
|
|
|
let data = this.dikeNameOptions.find((res) => res.id == id); |
|
|
|
let data = this.dikeNameOptions.find((res) => res.dikeCode == dikeCode); |
|
|
|
if (data) return data.dikeName; |
|
|
|
}, |
|
|
|
/** 查询防汛组织列表 */ |
|
|
|
getList() { |
|
|
|
this.loading = true; |
|
|
|
// this.queryParams.data.dikeId = this.$route.query.baseDataId; |
|
|
|
// this.queryParams.data.dikeCode = this.$route.query.baseDataId; |
|
|
|
listFxzz(this.queryParams).then((response) => { |
|
|
|
this.fxzzList = response.records; |
|
|
|
this.total = response.total; |
|
|
@ -686,7 +686,7 @@ export default { |
|
|
|
if (this.delIdList.length > 0) delFxzzcy(this.delIdList); |
|
|
|
} else { |
|
|
|
this.form.cy = C0; |
|
|
|
// this.form.dikeId = this.$route.query.baseDataId; |
|
|
|
// this.form.dikeCode = this.$route.query.baseDataId; |
|
|
|
addFxzz(this.form).then((response) => { |
|
|
|
if (response.code === 200) { |
|
|
|
this.msgSuccess("新增成功"); |
|
|
|