新增成功
This commit is contained in:
@@ -25,6 +25,11 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="选举方式" prop="electionMethod">
|
||||
<el-tooltip class="item" effect="dark" content="差额选举:候选人数多于应选人数的选举方式;
|
||||
等额选举:候选人数与应选人数相等的选举方式。" placement="top">
|
||||
<i class="el-icon-info" style="margin-right: 8px"></i>
|
||||
</el-tooltip>
|
||||
|
||||
<el-radio v-model="form.electionMethod" label="1">等额</el-radio>
|
||||
<el-radio v-model="form.electionMethod" label="2">差额</el-radio>
|
||||
</el-form-item>
|
||||
@@ -37,7 +42,7 @@
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="投票日期" prop="votingDate">
|
||||
<el-date-picker v-model="form.votingDate" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" style="width:338px">
|
||||
<el-date-picker v-model="form.votingDate" value-format="yyyy-MM-dd HH:mm:ss" type="date" placeholder="选择日期" style="width:338px">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -135,6 +140,7 @@ export default {
|
||||
votingDate: '',
|
||||
candidateUsers: [],
|
||||
voteUsers: [],
|
||||
partyOrganizations: []
|
||||
},
|
||||
chooseUserList: [],
|
||||
formRules: {
|
||||
@@ -145,7 +151,9 @@ export default {
|
||||
votingDate: [{required: true, message: "请选择投票日期", trigger: "blur"}],
|
||||
candidateUsers: [{required: true,validator: validCandidate, trigger: "blur"}],
|
||||
voteUsers: [{required: true,validator: validVote, trigger: "blur"}],
|
||||
}
|
||||
},
|
||||
id: '',
|
||||
isEdit: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -163,11 +171,26 @@ export default {
|
||||
selectVote(e) {
|
||||
this.form.voteUsers = e
|
||||
},
|
||||
handlePartyOrgSelect() {},
|
||||
handlePartyOrgSelect(v) {
|
||||
if(v) {
|
||||
// console.log(v);
|
||||
this.form.organizationName = v[0].name
|
||||
this.form.partyOrganizations = [v[0]]
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
console.log(111);
|
||||
this.instance.post(`/app/appgeneralelectioninfo/addOrUpdate`,{
|
||||
...this.form
|
||||
}).then(res => {
|
||||
if(res.code == 0) {
|
||||
this.$message.success('新增成功')
|
||||
this.cancel(false)
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user