结束投票&bug
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="electionAdd">
|
<section class="electionAdd">
|
||||||
<ai-detail class="add" v-if="id && !isEdit">
|
<ai-detail class="add" v-show="id && !isEdit">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<ai-title title="换届选举详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
|
<ai-title title="换届选举详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
|
||||||
</template>
|
</template>
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<ai-card :title="info.title">
|
<ai-card :title="info.title">
|
||||||
<template #right>
|
<template #right>
|
||||||
<span style="color:#2266FF;cursor: pointer;font-size: 12px;" class="iconfont iconEdit" v-if="isEdit==false" @click="isEdit = true">修改</span>
|
<span style="color:#2266FF;cursor: pointer;font-size: 12px;" class="iconfont iconEdit" v-if="isEdit==false && info.status==0" @click="update">修改</span>
|
||||||
</template>
|
</template>
|
||||||
<template #content v-if="isEdit == false">
|
<template #content v-if="isEdit == false">
|
||||||
<ai-wrapper>
|
<ai-wrapper>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
</ai-card>
|
</ai-card>
|
||||||
</template>
|
</template>
|
||||||
</ai-detail>
|
</ai-detail>
|
||||||
<ai-detail v-if="!id || isEdit">
|
<ai-detail v-show="!id || isEdit==true">
|
||||||
<ai-title slot="title" :title="id? '编辑换届选举':'添加换届选举'" isShowBottomBorder isShowBack @onBackClick="cancel(true)"/>
|
<ai-title slot="title" :title="id? '编辑换届选举':'添加换届选举'" isShowBottomBorder isShowBack @onBackClick="cancel(true)"/>
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<ai-card title="基本信息">
|
<ai-card title="基本信息">
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
</template>
|
</template>
|
||||||
<template slot="footer">
|
<template #footer>
|
||||||
<el-button class="delete-btn footer-btn" @click="cancel(false)">取消</el-button>
|
<el-button class="delete-btn footer-btn" @click="cancel(false)">取消</el-button>
|
||||||
<el-button class="footer-btn" type="primary" @click="confirm()">保存</el-button>
|
<el-button class="footer-btn" type="primary" @click="confirm()">保存</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -183,12 +183,9 @@ export default {
|
|||||||
chooseVoteList: [],
|
chooseVoteList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
},
|
|
||||||
created() {
|
created() {
|
||||||
if(this.params && this.params.id) {
|
if(this.params && this.params.id) {
|
||||||
this.id = this.params.id
|
this.id = this.params.id
|
||||||
this.isEdit = this.params.isEdit
|
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -199,6 +196,10 @@ export default {
|
|||||||
isRefresh: !!isRefresh
|
isRefresh: !!isRefresh
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
update() {
|
||||||
|
this.isEdit = true
|
||||||
|
this.getDetail()
|
||||||
|
},
|
||||||
getDetail() {
|
getDetail() {
|
||||||
this.instance.post(`/app/appgeneralelectioninfo/queryDetailById`,null, {
|
this.instance.post(`/app/appgeneralelectioninfo/queryDetailById`,null, {
|
||||||
params: {id:this.id}
|
params: {id:this.id}
|
||||||
|
|||||||
@@ -17,8 +17,10 @@
|
|||||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" @getList="getList" :col-configs="colConfigs" :dict="dict">
|
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" @getList="getList" :col-configs="colConfigs" :dict="dict">
|
||||||
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<el-button type="text" @click.native="toAdd(row.id, true)">编辑</el-button>
|
<!-- <el-button v-show="row.status==0" type="text" @click.native="toAdd(row.id, true)">编辑</el-button> -->
|
||||||
<el-button type="text" @click.native="toAdd(row.id, false)">详情</el-button>
|
<el-button type="text" @click.native="toAdd(row.id, false)">详情</el-button>
|
||||||
|
<el-button type="text" :disabled="row.status==2" @click.native="startEnd(row.id, false)">结束</el-button>
|
||||||
|
<el-button type="text" @click.native="toStatistics">统计</el-button>
|
||||||
<el-button type="text" @click.native="handleDelete(row.id)">删除</el-button>
|
<el-button type="text" @click.native="handleDelete(row.id)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -106,6 +108,19 @@ export default {
|
|||||||
}
|
}
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
// 开始结束
|
||||||
|
startEnd(id, status) {
|
||||||
|
this.$confirm('投票正在进行中,确定要提前结束吗?').then(() => {
|
||||||
|
this.instance.post(`/app/appgeneralelectioninfo/start-end?id=${id}&start=${status}`).then(res=>{
|
||||||
|
if(res.code == 0) {
|
||||||
|
this.$message.success('结束成功')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 统计
|
||||||
|
toStatistics() {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user