|
|
@ -3,7 +3,7 @@ |
|
|
|
<div class="mod-news__voterregistration}"> |
|
|
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> |
|
|
|
<el-form-item label="所属选区"> |
|
|
|
<el-select style="width: 150px" v-model="dataForm.constituencyCode" placeholder="请选择" clearable> |
|
|
|
<el-select @change="getGroupList($event)" style="width: 150px" v-model="dataForm.constituencyCode" placeholder="请选择" clearable> |
|
|
|
<el-option |
|
|
|
v-for="item in constituencyList" |
|
|
|
:key="item.configCode" |
|
|
@ -150,20 +150,30 @@ export default { |
|
|
|
}, |
|
|
|
created () { |
|
|
|
this.getConstituencyList() |
|
|
|
this.getGroupList() |
|
|
|
this.groupList = [] |
|
|
|
this.getParticipationPrincipleList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getConstituencyList () { |
|
|
|
this.$http.get(`/custom/voterregistrationconfig/getConfigByType/0`).then(({ data: res }) => { |
|
|
|
this.$http.get(`/custom/voterregistrationconfig/getConfigByType`, { params: { configType: '0', pid: '' } }).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.constituencyList = res.data |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
getGroupList () { |
|
|
|
this.$http.get(`/custom/voterregistrationconfig/getConfigByType/1`).then(({ data: res }) => { |
|
|
|
getGroupList (code) { |
|
|
|
let pid = '' |
|
|
|
this.constituencyList.find((item) => { |
|
|
|
if (item.configCode === code) { |
|
|
|
pid = item.id |
|
|
|
} |
|
|
|
}) |
|
|
|
if (pid === '') { |
|
|
|
this.groupList = [] |
|
|
|
return |
|
|
|
} |
|
|
|
this.$http.get(`/custom/voterregistrationconfig/getConfigByType`, { params: { configType: '', pid: pid } }).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
@ -171,7 +181,7 @@ export default { |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
getParticipationPrincipleList () { |
|
|
|
this.$http.get(`/custom/voterregistrationconfig/getConfigByType/2`).then(({ data: res }) => { |
|
|
|
this.$http.get(`/custom/voterregistrationconfig/getConfigByType`, { params: { configType: '2', pid: '' } }).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|