用户管理,等级配置,任务审核
This commit is contained in:
@@ -5,34 +5,34 @@
|
|||||||
<ai-title title="等级配置" :isShowBottomBorder="false" :isShowArea="false"></ai-title>
|
<ai-title title="等级配置" :isShowBottomBorder="false" :isShowArea="false"></ai-title>
|
||||||
</template>
|
</template>
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<ai-search-bar>
|
|
||||||
<template slot="left">
|
|
||||||
<el-button type="primary" icon="iconfont iconAdd" size="small" @click="add({}, '添加')">添加</el-button>
|
|
||||||
</template>
|
|
||||||
</ai-search-bar>
|
|
||||||
<ai-table :tableData="tableData" :colConfigs="colConfigs" :total="page.total" :current.sync="page.current"
|
<ai-table :tableData="tableData" :colConfigs="colConfigs" :total="page.total" :current.sync="page.current"
|
||||||
:size.sync="page.size" @getList="getList" class="ai-table">
|
:size.sync="page.size" @getList="getList" class="ai-table">
|
||||||
<el-table-column label="操作" align="center" width="250" slot="option">
|
<el-table-column slot="beginIntegral" label="积分范围" align="center">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row}">
|
||||||
<el-button type="text" @click="top(row)" v-if="row.showIndex > 1">上移</el-button>
|
<span>{{row.beginIntegral}}-{{row.endIntegral}}</span>
|
||||||
<el-button type="text" @click="next(row)" v-if="row.showIndex < tableData.length">下移</el-button>
|
</template>
|
||||||
<el-button type="text" @click="addMiniApp(row, false, row.$index)">编辑</el-button>
|
</el-table-column>
|
||||||
<el-button type="text" @click="removeMiniApp(row)">删除</el-button>
|
<el-table-column slot="option" label="操作" align="center" width="250">
|
||||||
|
<template slot-scope="{ row}">
|
||||||
|
<el-button type="text" @click="add(row)">编辑</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</ai-table>
|
</ai-table>
|
||||||
</template>
|
</template>
|
||||||
</ai-list>
|
</ai-list>
|
||||||
<ai-dialog :title="dialog.title" :visible.sync="visible" @onCancel="visible = false" @onConfirm="addConfirm" width="800px">
|
<ai-dialog title="等级修改" :visible.sync="visible" @onCancel="visible = false; dialogInfo = {}" @onConfirm="addConfirm" width="800px">
|
||||||
<el-form ref="ruleForm" :model="dialogInfo" :rules="formRules" size="small" label-width="120px">
|
<el-form ref="ruleForm" :model="dialogInfo" :rules="formRules" size="small" label-width="120px">
|
||||||
<el-form-item label="等级名称" prop="title">
|
<el-form-item label="等级名称" prop="levelTitle">
|
||||||
<el-input placeholder="请输入等级名称" :maxlength="10" show-word-limit v-model="dialogInfo.title"></el-input>
|
<el-input placeholder="请输入等级名称" :maxlength="20" show-word-limit v-model="dialogInfo.levelTitle"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="积分范围" prop="title">
|
<el-form-item label="积分范围" prop="beginIntegral" style="display:inline-block;">
|
||||||
<el-input placeholder="积分" :maxlength="10" v-model="dialogInfo.title" style="width:100px;"></el-input>
|
<el-input placeholder="积分" :maxlength="4" v-model="dialogInfo.beginIntegral" style="width:100px;"></el-input>
|
||||||
<span style="margin:0 16px;">-</span>
|
<el-form-item prop="endIntegral" style="display:inline-block;" class="endIntegral">
|
||||||
<el-input placeholder="积分" :maxlength="10" v-model="dialogInfo.title" style="width:100px;"></el-input>
|
<span style="margin: 0 16px;">-</span>
|
||||||
|
<el-input placeholder="积分" :maxlength="4" v-model="dialogInfo.endIntegral" style="width:100px;"></el-input>
|
||||||
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,9 +51,6 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
search: {
|
|
||||||
title: '',
|
|
||||||
},
|
|
||||||
tableData: [],
|
tableData: [],
|
||||||
page: {
|
page: {
|
||||||
size: 10,
|
size: 10,
|
||||||
@@ -61,35 +58,20 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
dialog: {
|
|
||||||
title: '',
|
|
||||||
},
|
|
||||||
dialogInfo: {},
|
dialogInfo: {},
|
||||||
formRules: {
|
formRules: {
|
||||||
banner: [{required: true, message: '请添加banner封面', trigger: 'blur'}],
|
levelTitle: [{required: true, message: '请输入等级名称', trigger: 'blur'}],
|
||||||
title: [{required: true, message: '请输入主页名称', trigger: 'blur'}],
|
beginIntegral: [{required: true, message: '请输入积分范围', trigger: 'blur' },
|
||||||
|
{pattern: /^([1-9]\d*|0)(\.\d{1,2})?$/, message: '请输入正数且最多只能保留两位小数'}],
|
||||||
|
endIntegral: [{required: true, message: '请输入积分范围', trigger: 'blur' },
|
||||||
|
{pattern: /^([1-9]\d*|0)(\.\d{1,2})?$/, message: '请输入正数且最多只能保留两位小数'}],
|
||||||
},
|
},
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
{prop: 'showIndex', label: '等级', width: 120, align: 'center'},
|
{prop: 'level', label: '等级', width: 120, align: 'center'},
|
||||||
{prop: 'title', label: '等级名称', width: 150, align: 'center'},
|
{prop: 'levelTitle', label: '等级名称', align: 'center'},
|
||||||
{prop: 'title', label: '积分范围', align: 'center'},
|
{slot: 'beginIntegral'},
|
||||||
{slot: 'option', label: '操作', width: 200, align: 'center'},
|
{slot: 'option'},
|
||||||
],
|
],
|
||||||
miniAppColConfigs: [
|
|
||||||
{prop: 'showIndex', label: '序号', width: 80, align: 'center'},
|
|
||||||
{prop: 'icon', label: 'icon图片', slot: 'icon', align: 'center'},
|
|
||||||
{prop: 'title', label: '积分范围',},
|
|
||||||
{slot: 'option', label: '操作', align: 'center'},
|
|
||||||
],
|
|
||||||
miniAppFormRules: {
|
|
||||||
icon: [{required: true, message: '请添加icon图片', trigger: 'blur'}],
|
|
||||||
title: [{required: true, message: '请输入应用名称', trigger: 'blur'}],
|
|
||||||
accessPath: [{ required: true, message: '请输入页面路径', trigger: 'blur' }]
|
|
||||||
},
|
|
||||||
miniAppDialog: false,
|
|
||||||
miniAppInfo: {},
|
|
||||||
isAddMiniApp: false,
|
|
||||||
editMiniIndex: '',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -101,28 +83,19 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add(row, title) {
|
add(row) {
|
||||||
this.dialog.title = title
|
|
||||||
this.visible = true
|
this.visible = true
|
||||||
if(row && row.id) {
|
this.dialogInfo = {...row}
|
||||||
this.instance.post(`/app/appwxapplication/queryDetailById?id=${row.id}`).then(res => {
|
|
||||||
if (res?.code == 0) {
|
|
||||||
this.dialogInfo = res.data
|
|
||||||
this.dialogInfo.bannerList = [{url: this.dialogInfo.banner}]
|
|
||||||
this.dialogInfo.wxApplicationList = this.dialogInfo.wxApplicationList || []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else {
|
|
||||||
this.dialogInfo = {}
|
|
||||||
this.dialogInfo.wxApplicationList = []
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
addConfirm() {
|
addConfirm() {
|
||||||
this.$refs.ruleForm.validate((valid) => {
|
this.$refs.ruleForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.instance.post(`/app/appwxapplication/addOrUpdate`, {...this.dialogInfo}).then(res => {
|
if(Number(this.dialogInfo.beginIntegral) >= Number(this.dialogInfo.endIntegral)) {
|
||||||
|
return this.$message.error('请输入正确的积分范围')
|
||||||
|
}
|
||||||
|
this.instance.post(`/appintegrallevel/addOrUpdate`, {...this.dialogInfo}).then(res => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
this.$message.success('新增成功')
|
this.$message.success('等级修改成功')
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
}
|
||||||
@@ -130,101 +103,14 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
remove(id) {
|
|
||||||
this.$confirm('删除后不可恢复,是否要删除该配置?', {
|
|
||||||
type: 'error',
|
|
||||||
}).then(() => {
|
|
||||||
this.instance.post(`/app/appwxapplication/delete?ids=${id}`).then((res) => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.$message.success('删除成功!')
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
addMiniApp(row, isAddMiniApp, index) {
|
|
||||||
this.miniAppInfo = row || {}
|
|
||||||
if(this.miniAppInfo.icon) {
|
|
||||||
this.miniAppInfo.iconList = [{url: this.miniAppInfo.icon}]
|
|
||||||
this.editMiniIndex = index
|
|
||||||
}
|
|
||||||
this.miniAppDialog = true
|
|
||||||
this.isAddMiniApp = isAddMiniApp
|
|
||||||
},
|
|
||||||
removeMiniApp(row) {
|
|
||||||
this.$confirm('删除后不可恢复,是否要删除该应用?', {
|
|
||||||
type: 'error',
|
|
||||||
}).then(() => {
|
|
||||||
var showIndex = row.showIndex
|
|
||||||
this.dialogInfo.wxApplicationList.map((item) => {
|
|
||||||
if(item.showIndex > showIndex) {
|
|
||||||
item.showIndex = item.showIndex - 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.dialogInfo.wxApplicationList.splice(row.showIndex-1, 1)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
addMiniAppConfirm() {
|
|
||||||
this.$refs.miniApppRuleForm.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
if(this.isAddMiniApp) { //新增
|
|
||||||
this.miniAppInfo.showIndex = this.dialogInfo.wxApplicationList.length + 1
|
|
||||||
this.dialogInfo.wxApplicationList.push(this.miniAppInfo)
|
|
||||||
}else {
|
|
||||||
this.dialogInfo.wxApplicationList[this.editMiniIndex] = this.miniAppInfo
|
|
||||||
}
|
|
||||||
this.miniAppDialog = false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
top(row) {
|
|
||||||
var list = JSON.parse(JSON.stringify(this.dialogInfo.wxApplicationList))
|
|
||||||
var oldRow = list[row.showIndex - 2]
|
|
||||||
oldRow.showIndex ++
|
|
||||||
row.showIndex --
|
|
||||||
list[row.showIndex - 1] = row
|
|
||||||
list[row.showIndex] = oldRow
|
|
||||||
this.$set(this.dialogInfo, 'wxApplicationList', list)
|
|
||||||
},
|
|
||||||
next(row) {
|
|
||||||
var list = JSON.parse(JSON.stringify(this.dialogInfo.wxApplicationList))
|
|
||||||
var oldRow = list[row.showIndex]
|
|
||||||
oldRow.showIndex --
|
|
||||||
row.showIndex ++
|
|
||||||
list[row.showIndex-1] = row
|
|
||||||
list[oldRow.showIndex-1] = oldRow
|
|
||||||
this.$set(this.dialogInfo, 'wxApplicationList', list)
|
|
||||||
},
|
|
||||||
changeBanner(e) {
|
|
||||||
this.dialogInfo.bannerList = e
|
|
||||||
this.dialogInfo.banner = e[0].url
|
|
||||||
},
|
|
||||||
changeIcon(e) {
|
|
||||||
this.miniAppInfo.iconList = e
|
|
||||||
this.miniAppInfo.icon = e[0].url
|
|
||||||
},
|
|
||||||
getList() {
|
getList() {
|
||||||
this.instance.post(`/app/appwxapplication/list`, null, {
|
this.instance.post(`/appintegrallevel/list`, null, {
|
||||||
params: {
|
params: {
|
||||||
...this.search,
|
|
||||||
...this.page,
|
...this.page,
|
||||||
},
|
},
|
||||||
})
|
}).then((res) => {
|
||||||
.then((res) => {
|
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
res.data.records.map((item) => {
|
|
||||||
item.appNames = ''
|
|
||||||
item.wxApplicationList.map((app, index) => {
|
|
||||||
if(index == 0) {
|
|
||||||
item.appNames = app.title
|
|
||||||
}
|
|
||||||
if(index > 0) {
|
|
||||||
item.appNames = item.appNames + `,${app.title}`
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
this.tableData = res.data.records
|
this.tableData = res.data.records
|
||||||
|
|
||||||
this.page.total = res.data.total
|
this.page.total = res.data.total
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -235,26 +121,15 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
.AppLevelList {
|
.AppLevelList {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
// padding: 15px 10px;
|
::v-deep .endIntegral .el-form-item__content {
|
||||||
.banner-img {
|
margin-left: 0!important;
|
||||||
width: 50px;
|
|
||||||
height: 50px;
|
|
||||||
}
|
}
|
||||||
.dialog-title-flex{
|
::v-deep .endIntegral .el-form-item__error{
|
||||||
display: flex;
|
left: 40px !important;
|
||||||
justify-content: space-between;
|
top: 50px !important;
|
||||||
margin-bottom: 8px;
|
|
||||||
h3{
|
|
||||||
font-size: 16px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
span{
|
|
||||||
color: #26f;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -3,22 +3,21 @@
|
|||||||
<ai-list>
|
<ai-list>
|
||||||
<ai-title slot="title" title="任务审核" isShowBottomBorder />
|
<ai-title slot="title" title="任务审核" isShowBottomBorder />
|
||||||
<template #content>
|
<template #content>
|
||||||
<ai-search-bar>
|
<!-- <ai-search-bar>
|
||||||
<template #right>
|
<template #right>
|
||||||
<el-input v-model="search.title" class="search-input" size="small" v-throttle="() => {(page.current = 1), getList()} " placeholder="请输入手机号" clearable @change="getList" @clear="page.current = 1, (search.title = ''), getList()" suffix-icon="iconfont iconSearch">
|
<el-input v-model="search.title" class="search-input" size="small" v-throttle="() => {(page.current = 1), getList()} " placeholder="请输入手机号" clearable @change="getList" @clear="page.current = 1, (search.title = ''), getList()" suffix-icon="iconfont iconSearch">
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar> -->
|
||||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" @getList="getList" :col-configs="colConfigs"
|
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" @getList="getList" :col-configs="colConfigs"
|
||||||
:dict="dict" @sort-change="sortChange">
|
:dict="dict" @sort-change="sortChange">
|
||||||
<el-table-column slot="title" label="凭证内容" align="left">
|
<el-table-column slot="accessUrl" label="凭证内容" align="left">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<el-image class="row-img" src="https://cdn.cunwuyun.cn/dvcp/h5/defaultAvatar.png"
|
<el-image class="row-img" :src="row.accessUrl" :preview-src-list="[row.accessUrl]"/>
|
||||||
:preview-src-list="['https://cdn.cunwuyun.cn/dvcp/h5/defaultAvatar.png']"/>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<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 }" v-if="!row.status">
|
||||||
<el-button type="text" @click="pass(row)">通过</el-button>
|
<el-button type="text" @click="pass(row)">通过</el-button>
|
||||||
<el-button type="text" @click="refuse(row)">拒绝</el-button>
|
<el-button type="text" @click="refuse(row)">拒绝</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -75,18 +74,17 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
colConfigs() {
|
colConfigs() {
|
||||||
return [
|
return [
|
||||||
{slot: "title", align: "left"},
|
{slot: "accessUrl", align: "left"},
|
||||||
{prop: "organizationName", label: "上传人", align: "center"},
|
{prop: "userName", label: "上传人", align: "center"},
|
||||||
{prop: "electionMethod", label: "任务分类", align: "center",dict:"electionMethod"},
|
{prop: "type", label: "任务分类", align: "center",dict:"electionMethod"},
|
||||||
{prop: "chooseNumber", label: "上传时间", align: "center"},
|
{prop: "createTime", label: "上传时间", align: "center"},
|
||||||
{prop: "chooseNumber", label: "状态", align: "center"},
|
{prop: "status", label: "状态", align: "center"},
|
||||||
{prop: "chooseNumber", label: "处理人", align: "center"},
|
{prop: "auditUserName", label: "处理人", align: "center"},
|
||||||
{slot: "options", },
|
{slot: "options", },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
rules() {
|
rules() {
|
||||||
return {
|
return {
|
||||||
integralCalcType: [{required: true, message: '请选择类型', trigger: 'change'}],
|
|
||||||
integral: [{required: true, message: '请输入积分', trigger: 'blur' },
|
integral: [{required: true, message: '请输入积分', trigger: 'blur' },
|
||||||
{pattern: /^([1-9]\d*|0)(\.\d{1,2})?$/, message: '请输入正数且最多只能保留两位小数'}],
|
{pattern: /^([1-9]\d*|0)(\.\d{1,2})?$/, message: '请输入正数且最多只能保留两位小数'}],
|
||||||
}
|
}
|
||||||
@@ -97,13 +95,7 @@ export default {
|
|||||||
this.$refs.form.validate((valid)=> {
|
this.$refs.form.validate((valid)=> {
|
||||||
if(valid) {
|
if(valid) {
|
||||||
this.flag = true
|
this.flag = true
|
||||||
this.instance.post(`/app/appintegraluser/changeIntegral`,{
|
this.instance.post(`/appwechatescalation/examine?id=${this.form.id}&pass=1&integral=${this.integral}`).then(res => {
|
||||||
ids: this.form.ids,
|
|
||||||
eventDesc: this.form.eventDesc,
|
|
||||||
enclosure: this.form.enclosure, // 附件
|
|
||||||
integralCalcType: this.form.integralCalcType,
|
|
||||||
integral: this.form.integral,
|
|
||||||
}).then(res => {
|
|
||||||
if(res?.code == 0) {
|
if(res?.code == 0) {
|
||||||
this.$message.success('审核成功')
|
this.$message.success('审核成功')
|
||||||
setTimeout(() =>{
|
setTimeout(() =>{
|
||||||
@@ -125,16 +117,16 @@ export default {
|
|||||||
},
|
},
|
||||||
refuse(row) {
|
refuse(row) {
|
||||||
this.$confirm('确定拒绝该任务?').then(() => {
|
this.$confirm('确定拒绝该任务?').then(() => {
|
||||||
// this.instance.post(`/app/appvillagepicturealbum/delete?ids=${row.id}`).then(res => {
|
this.instance.post(`/appwechatescalation/examine?id=${row.id}&pass=0`).then(res => {
|
||||||
// if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
// this.$message.success('审核成功')
|
this.$message.success('审核成功')
|
||||||
// this.getList()
|
this.getList()
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.instance.post(`/app/appgeneralelectioninfo/list`,null,{
|
this.instance.post(`/appwechatescalation/list`,null,{
|
||||||
params: {
|
params: {
|
||||||
...this.page,
|
...this.page,
|
||||||
...this.search,
|
...this.search,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<template #content>
|
<template #content>
|
||||||
<ai-search-bar>
|
<ai-search-bar>
|
||||||
<template #right>
|
<template #right>
|
||||||
<el-input v-model="search.title" class="search-input" size="small" v-throttle="() => {(page.current = 1), getList()} " placeholder="请输入手机号" clearable @change="getList" @clear="page.current = 1, (search.title = ''), getList()" suffix-icon="iconfont iconSearch">
|
<el-input v-model="search.realName" class="search-input" size="small" placeholder="请输入姓名" clearable @change="getList" @clear="page.current = 1, (search.realName = ''), getList()" suffix-icon="iconfont iconSearch">
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
@@ -51,7 +51,7 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
search: {
|
search: {
|
||||||
title: '',
|
realName: '',
|
||||||
},
|
},
|
||||||
page: {
|
page: {
|
||||||
current: 1,
|
current: 1,
|
||||||
@@ -78,7 +78,7 @@ export default {
|
|||||||
{prop: "organizationName", label: "手机号", align: "center"},
|
{prop: "organizationName", label: "手机号", align: "center"},
|
||||||
{prop: "electionMethod", label: "等级", align: "center",dict:"electionMethod"},
|
{prop: "electionMethod", label: "等级", align: "center",dict:"electionMethod"},
|
||||||
{prop: "chooseNumber", label: "积分数量", align: "center", sortable: "custom"},
|
{prop: "chooseNumber", label: "积分数量", align: "center", sortable: "custom"},
|
||||||
{slot: "options", },
|
{slot: "options"},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
rules() {
|
rules() {
|
||||||
@@ -133,7 +133,7 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.instance.post(`/app/appgeneralelectioninfo/list`,null,{
|
this.instance.post(`/appwechatuser/list`,null,{
|
||||||
params: {
|
params: {
|
||||||
...this.page,
|
...this.page,
|
||||||
...this.search,
|
...this.search,
|
||||||
@@ -145,63 +145,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toAdd(id) {
|
|
||||||
this.$emit('change', {
|
|
||||||
type: 'electionAdd',
|
|
||||||
params: {
|
|
||||||
id: id || '',
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
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()
|
|
||||||
},
|
|
||||||
// 开启、结束
|
|
||||||
startEnd(id, status) {
|
|
||||||
let title = ''
|
|
||||||
let bool = null
|
|
||||||
let tips = ''
|
|
||||||
if(status == 0) {
|
|
||||||
title = '未到投票开始时间,确定要提前开始吗?'
|
|
||||||
bool = true
|
|
||||||
tips = '开启成功'
|
|
||||||
} else if(status == 1) {
|
|
||||||
title = '投票正在进行中,确定要提前结束吗?'
|
|
||||||
bool = false
|
|
||||||
tips = '结束成功'
|
|
||||||
}
|
|
||||||
this.$confirm(title).then(() => {
|
|
||||||
this.instance.post(`/app/appgeneralelectioninfo/start-end?id=${id}&start=${bool}`).then(res=>{
|
|
||||||
if(res.code == 0) {
|
|
||||||
this.$message.success(tips)
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 统计
|
|
||||||
toStatistics(id) {
|
|
||||||
this.$emit('change', {
|
|
||||||
type: 'Statistics',
|
|
||||||
params: {
|
|
||||||
id: id || '',
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user