详情
This commit is contained in:
@@ -1,7 +1,41 @@
|
||||
<template>
|
||||
<section class="electionAdd">
|
||||
<ai-detail>
|
||||
<ai-title slot="title" title="添加换届选举" isShowBottomBorder isShowBack @onBackClick="cancel(true)"/>
|
||||
<ai-detail class="add" v-if="id && !isEdit">
|
||||
<template slot="title">
|
||||
<ai-title title="换届选举详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-card title="基本信息">
|
||||
<template #right>
|
||||
<span style="color:#2266FF;cursor: pointer;font-size: 12px;" class="iconfont iconEdit" v-if="isEdit==false" @click="edit">修改</span>
|
||||
</template>
|
||||
<template #content v-if="isEdit == false">
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="标题" :value="info.title"></ai-info-item>
|
||||
<ai-info-item label="投票说明" :value="info.votingInstructions"></ai-info-item>
|
||||
<ai-info-item label="单位名称" :value="info.organizationName"></ai-info-item>
|
||||
<ai-info-item label="选举方式" :value="info.electionMethod"></ai-info-item>
|
||||
<ai-info-item label="应选人数" :value="info.candidatesNumber"></ai-info-item>
|
||||
<ai-info-item label="投票日期" :value="info.votingDate"></ai-info-item>
|
||||
<ai-info-item label="候选人" isLine>
|
||||
<span v-for="(item,index) in candidateUsersList" :key="index">
|
||||
{{ item }}
|
||||
<span v-if="index < candidateUsersList.length - 1">,</span>
|
||||
</span>
|
||||
</ai-info-item>
|
||||
<ai-info-item label="投票人" isLine :value="info.voteUsers">
|
||||
<span v-for="(item,index) in voteUsersList" :key="index">
|
||||
{{ item }}
|
||||
<span v-if="index < voteUsersList.length - 1">,</span>
|
||||
</span>
|
||||
</ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
</ai-detail>
|
||||
<ai-detail v-else>
|
||||
<ai-title slot="title" :title="id? '编辑换届选举':'添加换届选举'" isShowBottomBorder isShowBack @onBackClick="cancel(true)"/>
|
||||
<template slot="content">
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
@@ -80,31 +114,7 @@
|
||||
<el-button class="footer-btn" type="primary" @click="confirm()">保存</el-button>
|
||||
</template>
|
||||
</ai-detail>
|
||||
<!-- <ai-detail class="add" v-if="id && !isEdit">
|
||||
<template slot="title">
|
||||
<ai-title title="行政许可信息详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-card title="基本信息">
|
||||
<template #right>
|
||||
<span style="color:#2266FF;cursor: pointer;font-size: 12px;" class="iconfont iconEdit" v-if="isEdit==false" @click="edit">修改</span>
|
||||
</template>
|
||||
<template #content v-if="isEdit == false">
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="许可文书名称" :value="data.licenseName"></ai-info-item>
|
||||
<ai-info-item label="许可文书号" :value="data.licenseCode"></ai-info-item>
|
||||
<ai-info-item label="许可决定日期" :value="data.decisionDate"></ai-info-item>
|
||||
<ai-info-item label="许可有效期自" :value="data.startDate"></ai-info-item>
|
||||
<ai-info-item label="许可有效期至" :value="data.endDate"></ai-info-item>
|
||||
<ai-info-item label="许可机关" isLine :value="data.licenseOrganization"></ai-info-item>
|
||||
<ai-info-item label="经营主体" isLine :value="data.enterpriseName"></ai-info-item>
|
||||
<ai-info-item label="统一信用代码" isLine :value="data.unifiedCode"></ai-info-item>
|
||||
<ai-info-item label="许可内容" isLine :value="data.licenseContent"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
</ai-detail> -->
|
||||
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -114,7 +124,9 @@ export default {
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object,
|
||||
},
|
||||
|
||||
data() {
|
||||
let validCandidate = (rule, value, callback) => {
|
||||
if (!value.length) {
|
||||
@@ -154,10 +166,20 @@ export default {
|
||||
},
|
||||
id: '',
|
||||
isEdit: false,
|
||||
info: {},
|
||||
candidateUsersList: '',
|
||||
voteUsersList: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
created() {
|
||||
if(this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
this.isEdit = this.params.isEdit
|
||||
this.getDetail()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
@@ -165,6 +187,20 @@ export default {
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
},
|
||||
getDetail() {
|
||||
this.instance.post(`/app/appgeneralelectioninfo/queryDetailById`,null, {
|
||||
params: {id:this.id}
|
||||
}).then((res) => {
|
||||
if(res?.data) {
|
||||
// console.log(res.data);
|
||||
this.form = res.data,
|
||||
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
|
||||
},
|
||||
@@ -173,9 +209,11 @@ export default {
|
||||
},
|
||||
handlePartyOrgSelect(v) {
|
||||
if(v) {
|
||||
// console.log(v);
|
||||
this.form.organizationName = v[0].name
|
||||
this.form.partyOrganizations = [v[0]]
|
||||
} else {
|
||||
this.form.organizationName = this.chooseUserList[0].name
|
||||
this.form.partyOrganizations = this.chooseUserList
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
@@ -185,7 +223,11 @@ export default {
|
||||
...this.form
|
||||
}).then(res => {
|
||||
if(res.code == 0) {
|
||||
this.$message.success('新增成功')
|
||||
if(this.id) {
|
||||
this.$message.success('编辑成功')
|
||||
} else {
|
||||
this.$message.success('新增成功')
|
||||
}
|
||||
this.cancel(false)
|
||||
}
|
||||
}).catch((err) => {
|
||||
|
||||
Reference in New Issue
Block a user