diff --git a/project/pingchang/apps/AppGeneralElection/components/electionAdd.vue b/project/pingchang/apps/AppGeneralElection/components/electionAdd.vue
index b9503ecb..5ff34564 100644
--- a/project/pingchang/apps/AppGeneralElection/components/electionAdd.vue
+++ b/project/pingchang/apps/AppGeneralElection/components/electionAdd.vue
@@ -7,26 +7,28 @@
- 修改
+ 修改
-
+
+ {{ info.electionMethod==0? '等额':'差额'}}
+
{{ item }}
- ,
+ 、
{{ item }}
- ,
+ 、
@@ -34,7 +36,7 @@
-
+
@@ -64,14 +66,14 @@
- 等额
- 差额
+ 等额
+ 差额
-
-
+
+
@@ -89,7 +91,7 @@
{{ item.name }}
{{ item.phone }}
-
+ {{ item}}
@@ -148,7 +150,7 @@ export default {
votingInstructions: '',
organizationName: '',
electionMethod: '',
- candidatesNumber: '',
+ chooseNumber: '',
votingDate: '',
candidateUsers: [],
voteUsers: [],
@@ -159,7 +161,7 @@ export default {
title: [{required: true, message: "请输入标题", trigger: "blur"}],
organizationName: [{required: true, message: "请选择党组织", trigger: "blur"}],
electionMethod: [{required: true, message: "请选择选举方式", trigger: "blur"}],
- candidatesNumber: [{required: true, message: "请输入应选人数", trigger: "blur"}],
+ chooseNumber: [{required: true, message: "请输入应选人数", trigger: "blur"}],
votingDate: [{required: true, message: "请选择投票日期", trigger: "blur"}],
candidateUsers: [{required: true,validator: validCandidate, trigger: "blur"}],
voteUsers: [{required: true,validator: validVote, trigger: "blur"}],
@@ -192,15 +194,15 @@ export default {
params: {id:this.id}
}).then((res) => {
if(res?.data) {
- // console.log(res.data);
- this.form = res.data,
+ console.log(res.data,'getDetail');
+ this.form = res.data
+ this.form.organizationName = res.data.partyOrganizations[0].name
this.info = res.data
this.candidateUsersList = res.data.candidateUsers.map(v=> v.name)
this.voteUsersList = res.data.voteUsers.map(v=> v.name)
}
})
},
- edit() {},
selectCandidate(v) {
this.form.candidateUsers = v
},
@@ -223,12 +225,8 @@ export default {
...this.form
}).then(res => {
if(res.code == 0) {
- if(this.id) {
- this.$message.success('编辑成功')
- } else {
- this.$message.success('新增成功')
- }
- this.cancel(false)
+ this.$message.success(this.id ? '编辑成功' : '新增成功')
+ this.cancel(true)
}
}).catch((err) => {
console.log(err);
diff --git a/project/pingchang/apps/AppGeneralElection/components/electionList.vue b/project/pingchang/apps/AppGeneralElection/components/electionList.vue
index 42441eeb..7a9502f2 100644
--- a/project/pingchang/apps/AppGeneralElection/components/electionList.vue
+++ b/project/pingchang/apps/AppGeneralElection/components/electionList.vue
@@ -6,10 +6,10 @@
添加
-
+
-
+
重置
@@ -17,7 +17,6 @@
-
编辑
详情
删除
@@ -51,15 +50,16 @@ export default {
}
},
created () {
- this.dict.load('yesOrNo', 'partyFourLinkageStatus')
- this.getList()
+ this.$dict.load('electionStatus', 'partyFourLinkageStatus').then(()=> {
+ this.getList()
+ })
},
computed: {
colConfigs() {
return [
{prop: "title", label: "标题", align: "left", showOverflowTooltip: true},
{prop: "organizationName", label: "所属支部", align: "center"},
- {prop: "electionMethod", label: "选举方式", align: "center"},
+ {prop: "electionMethod", label: "选举方式", align: "center",formart: v => v==0? '等额':'差额'},
{prop: "chooseNumber", label: "应选人数", align: "center"},
{prop: "status", label: "状态", align: "center",width: "180px"},
{ slot: "options", },
@@ -76,7 +76,7 @@ export default {
}).then(res=> {
if(res?.data) {
this.tableData = res.data.records
- this.total.total = res.data.total
+ this.page.total = res.data.total
}
})
},
@@ -89,7 +89,23 @@ export default {
}
})
},
- reset() {},
+ handleDelete(id) {
+ this.$confirm('确定删除该数据?').then(() => {
+ this.instance.post(`/app/appgeneralelectioninfo/delete?ids=${id}`).then(res=>{
+ if(res.code == 0) {
+ this.$message.success('删除成功!')
+ this.getList()
+ }
+ })
+ })
+ },
+ reset() {
+ this.search = {
+ status: '',
+ title: '',
+ }
+ this.getList()
+ },
}
}