|
|
|
@ -108,7 +108,7 @@
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="区域" align="center" prop="areaId">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ $filterTown(scope.row.areaId) }}
|
|
|
|
|
{{ scope.row.areaId | filterTown }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="部门名称" align="center" prop="depName" />
|
|
|
|
@ -187,18 +187,12 @@
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="区域" prop="areaId">
|
|
|
|
|
<el-select
|
|
|
|
|
<el-cascader
|
|
|
|
|
v-model="form.areaId"
|
|
|
|
|
placeholder="请选择区域"
|
|
|
|
|
filterable
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in townList"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="parseInt(dict.value)"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
:options="townList"
|
|
|
|
|
:props="treeProps"
|
|
|
|
|
clearable
|
|
|
|
|
></el-cascader>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
@ -396,6 +390,18 @@ export default {
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
filters: {
|
|
|
|
|
filterTown(target) {
|
|
|
|
|
if (target) {
|
|
|
|
|
target = JSON.parse(target);
|
|
|
|
|
if (target.length > 0 && Array.isArray(target)) {
|
|
|
|
|
return target.join("、");
|
|
|
|
|
} else {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/** 查询通报列表 */
|
|
|
|
|
getList() {
|
|
|
|
@ -468,6 +474,15 @@ export default {
|
|
|
|
|
this.reset();
|
|
|
|
|
const id = row.id || this.ids;
|
|
|
|
|
getTb(id).then((response) => {
|
|
|
|
|
response.data.areaId = JSON.parse(response.data.areaId);
|
|
|
|
|
if (
|
|
|
|
|
response.data.areaId.length > 0 &&
|
|
|
|
|
Array.isArray(response.data.areaId)
|
|
|
|
|
) {
|
|
|
|
|
response.data.areaId = response.data.areaId.join("、");
|
|
|
|
|
} else {
|
|
|
|
|
response.data.areaId = "";
|
|
|
|
|
}
|
|
|
|
|
this.filterFile(2, response.data.fileName, response.data.fileUrl);
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
this.infoOpen = true;
|
|
|
|
@ -485,6 +500,7 @@ export default {
|
|
|
|
|
this.reset();
|
|
|
|
|
const id = row.id || this.ids;
|
|
|
|
|
getTb(id).then((response) => {
|
|
|
|
|
response.data.areaId = JSON.parse(response.data.areaId);
|
|
|
|
|
this.filterFile(2, response.data.fileName, response.data.fileUrl);
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
this.open = true;
|
|
|
|
@ -526,6 +542,7 @@ export default {
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.form.areaId = JSON.stringify(this.form.areaId);
|
|
|
|
|
this.filterFile(1);
|
|
|
|
|
if (this.form.id != null) {
|
|
|
|
|
updateTb(this.form).then((response) => {
|
|
|
|
|