This commit is contained in:
2026-07-14 18:05:53 +08:00
parent cbc0dcf67d
commit fb25ad45a8
17 changed files with 660 additions and 45 deletions
@@ -210,10 +210,10 @@ layout("/layouts/platform_h5.html"){
is-link
readonly
name="typeName"
label="提案类别"
placeholder="请选择提案类别"
label="提案类型"
placeholder="请选择提案类型"
@click="showTypePicker = true"
:rules="[{ required: true, message: '请选择提案类别' }]"
:rules="[{ required: true, message: '请选择提案类型' }]"
required
></van-field>
<van-popup v-model="showTypePicker" position="bottom">
@@ -411,7 +411,7 @@ layout("/layouts/platform_h5.html"){
},
onTypeConfirm(value) {
this.formData.typeId = value.value;
this.$set(this.formData, 'typeId', value.value);
this.$set(this.formData, 'typeName', value.text);
this.showTypePicker = false;
},
@@ -589,9 +589,15 @@ layout("/layouts/platform_h5.html"){
}
},
// 获取提案类别
// 根据当前教代会届次获取允许撰写的提案类型
listProposalType() {
this.$axios.post("/platform/proposal/common/listProposalType").then((res) => {
if (!this.formData.sessionId) {
this.typeOptions = [];
return Promise.resolve();
}
return this.$axios.post("/platform/proposal/write/listSessionProposalTypes", {
sessionId: this.formData.sessionId
}).then((res) => {
if (res.code === 0) {
this.typeOptions = res.data;
}
@@ -609,6 +615,11 @@ layout("/layouts/platform_h5.html"){
//教代会change
async meetingChange(val) {
// 切换届次后清空旧值,并加载新届次允许选择的提案类型
this.$set(this.formData, "typeId", null);
this.$set(this.formData, "typeName", "");
this.typeOptions = [];
this.listProposalType();
this.formData.delegationId = null;
this.formData.committeeId = null;
this.formData.delegationName = '';
@@ -646,6 +657,7 @@ layout("/layouts/platform_h5.html"){
if (!isModify && this.sessionOptions && this.sessionOptions.length > 0) {
this.$set(this.formData, "sessionId", this.sessionOptions[0].id);
this.$set(this.formData, "sessionName", this.sessionOptions[0].fullName);
this.listProposalType();
await this.listDelegation();
await this.listSource();
// 获取代表团
@@ -655,7 +667,9 @@ layout("/layouts/platform_h5.html"){
} else {
await this.listDelegation();
await this.listSource();
this.echoPicker()
this.listProposalType().then(() => {
this.echoPicker();
});
}
}
});
@@ -742,7 +756,6 @@ layout("/layouts/platform_h5.html"){
created() {
this.init();
this.listSuggestUnit();
this.listProposalType();
this.getProposalConfig();
},
watch: {