|
|
@ -159,20 +159,14 @@ |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
></el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="policyLevelName" |
|
|
|
prop="policyLevel" |
|
|
|
label="政策级别" |
|
|
|
width="100" |
|
|
|
align="center" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ |
|
|
|
scope.row.policyLevel == 0 |
|
|
|
? "市级" |
|
|
|
: scope.row.policyLevel == 1 |
|
|
|
? "区级" |
|
|
|
: "街道级" |
|
|
|
}} |
|
|
|
<template slot-scope="scope" v-if="policyLevelName(scope.row)"> |
|
|
|
{{policyLevelName(scope.row.policyLevel)}} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
@ -226,7 +220,7 @@ |
|
|
|
<el-table-column fixed="right" label="操作" align="center" width="220"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button @click="handleDetail(scope.row)" type="text" size="small" |
|
|
|
>详情</el-button |
|
|
|
>查看</el-button |
|
|
|
> |
|
|
|
<el-button @click="handleEdit(scope.row)" type="text" size="small" |
|
|
|
>编辑</el-button |
|
|
@ -318,11 +312,7 @@ export default { |
|
|
|
tableLoading: false, |
|
|
|
user: {}, |
|
|
|
agencyId: "", |
|
|
|
policyLevelArray: [ |
|
|
|
{ value: 0, label: "市级" }, |
|
|
|
{ value: 1, label: "区级" }, |
|
|
|
{ value: 2, label: "街道级" }, |
|
|
|
], //政策级别下拉 |
|
|
|
policyLevelArray: [], //政策级别下拉 |
|
|
|
tableData: [], |
|
|
|
|
|
|
|
statusArray: [ |
|
|
@ -379,6 +369,7 @@ export default { |
|
|
|
this.user = this.$store.state.user; |
|
|
|
this.agencyId = this.user.agencyId; |
|
|
|
this.getTableData(); |
|
|
|
this.getPolicyLevelArray() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
onDeleteBatch() { |
|
|
@ -398,7 +389,32 @@ export default { |
|
|
|
this.$message.warning("请先选择要删除的政策"); |
|
|
|
} |
|
|
|
}, |
|
|
|
async getPolicyLevelArray(){ |
|
|
|
this.$http |
|
|
|
.post("/sys/dict/data/dictlist", { |
|
|
|
dictType: "policy_level", |
|
|
|
}) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} else { |
|
|
|
this.policyLevelArray = res.data || []; |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
return this.$message.error("网络错误"); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
policyLevelName (value) { |
|
|
|
let label = '' |
|
|
|
this.policyLevelArray.forEach(item => { |
|
|
|
if (item.value == value) { |
|
|
|
label = item.label |
|
|
|
} |
|
|
|
}) |
|
|
|
return label || "--" |
|
|
|
}, |
|
|
|
handleSearch(val) { |
|
|
|
console.log(this.formData); |
|
|
|
this.pageNo = 1; |
|
|
|