Browse Source

bug#472

feature
mk 2 years ago
parent
commit
0a6c1de4b7
  1. 3
      src/views/modules/communityService/policy/addPolicy.vue
  2. 48
      src/views/modules/communityService/policy/policyList.vue

3
src/views/modules/communityService/policy/addPolicy.vue

@ -529,6 +529,9 @@ export default {
data.assignInfo.serviceScopeList[i].objectId data.assignInfo.serviceScopeList[i].objectId
); );
} }
if(data.assignInfo.noticeApproches==null){
data.assignInfo.noticeApproches = []
}
} else { } else {
this.newFormData = { this.newFormData = {
noticeApproches: [], noticeApproches: [],

48
src/views/modules/communityService/policy/policyList.vue

@ -159,20 +159,14 @@
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="policyLevelName" prop="policyLevel"
label="政策级别" label="政策级别"
width="100" width="100"
align="center" align="center"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
<template slot-scope="scope"> <template slot-scope="scope" v-if="policyLevelName(scope.row)">
{{ {{policyLevelName(scope.row.policyLevel)}}
scope.row.policyLevel == 0
? "市级"
: scope.row.policyLevel == 1
? "区级"
: "街道级"
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -226,7 +220,7 @@
<el-table-column fixed="right" label="操作" align="center" width="220"> <el-table-column fixed="right" label="操作" align="center" width="220">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="handleDetail(scope.row)" type="text" size="small" <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 @click="handleEdit(scope.row)" type="text" size="small"
>编辑</el-button >编辑</el-button
@ -318,11 +312,7 @@ export default {
tableLoading: false, tableLoading: false,
user: {}, user: {},
agencyId: "", agencyId: "",
policyLevelArray: [ policyLevelArray: [], //
{ value: 0, label: "市级" },
{ value: 1, label: "区级" },
{ value: 2, label: "街道级" },
], //
tableData: [], tableData: [],
statusArray: [ statusArray: [
@ -379,6 +369,7 @@ export default {
this.user = this.$store.state.user; this.user = this.$store.state.user;
this.agencyId = this.user.agencyId; this.agencyId = this.user.agencyId;
this.getTableData(); this.getTableData();
this.getPolicyLevelArray()
}, },
methods: { methods: {
onDeleteBatch() { onDeleteBatch() {
@ -398,7 +389,32 @@ export default {
this.$message.warning("请先选择要删除的政策"); 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) { handleSearch(val) {
console.log(this.formData); console.log(this.formData);
this.pageNo = 1; this.pageNo = 1;

Loading…
Cancel
Save