换届选举

This commit is contained in:
shijingjing
2022-10-24 14:47:23 +08:00
parent e78cdbe81d
commit 9209ac9fae
2 changed files with 28 additions and 8 deletions

View File

@@ -234,6 +234,15 @@ export default {
confirm() {
this.$refs.form.validate((valid) => {
if (valid) {
if(this.form.electionMethod == 0) {
if(this.form.chooseNumber != this.form.candidateUsers.length) {
return this.$message.error('候选人数与应选人数应相等')
}
} else if(this.form.electionMethod == 1) {
if(this.form.chooseNumber >= this.form.candidateUsers.length) {
return this.$message.error('候选人数应多于应选人数')
}
}
this.instance.post(`/app/appgeneralelectioninfo/addOrUpdate`,{
...this.form
}).then(res => {