commit
This commit is contained in:
@@ -75,25 +75,44 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作" width="500px">
|
||||
label="操作" width="100px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" :loading="row.loading" @click="openView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" :loading="row.loading" type="primary"
|
||||
@click="openEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button size="mini" :loading="row.loading" type="danger"
|
||||
@click="doDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button plain size="mini" @click="sendMsg(row)" type="primary">
|
||||
通知
|
||||
</el-button>
|
||||
<el-button plain size="mini" @click="openCode(row.id)" type="primary">
|
||||
二维码
|
||||
</el-button>
|
||||
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="row.isWithinChoiceTime && !row.isHasUserList"
|
||||
:command="{type:'create',data:row}">
|
||||
生成名单
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="row.isWithinChoiceTime && row.isHasUserList"
|
||||
:command="{type:'renew',data:row}">
|
||||
更新名单
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="row.isWithinChoiceTime"
|
||||
:command="{type:'reset',data:row}">
|
||||
重置名单
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'edit',data:row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',data:row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'send',data:row}">
|
||||
通知
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'code',data:row}">
|
||||
二维码
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -354,7 +373,7 @@ layout("/layouts/platform.html"){
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
choiceTime: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activityGroupId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
cover: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
// cover: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
healthCheckupType: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
healthCheckupProjectSubjects: [{
|
||||
required: true,
|
||||
@@ -371,7 +390,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
{label: '出生日期', value: 'birthday', type: "date"},
|
||||
],
|
||||
deleteRowIds: []
|
||||
deleteRowIds: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -381,6 +400,95 @@ layout("/layouts/platform.html"){
|
||||
'condition': httpVueLoader('/components/plugins/ConditionStructure.vue?v=1.0.0'),
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type === 'view') {
|
||||
this.openView(data)
|
||||
} else if (type === 'created') {
|
||||
this.createUserList(data)
|
||||
} else if (type === 'renew') {
|
||||
this.renewUserList(data)
|
||||
} else if (type === 'reset') {
|
||||
this.resetUserList(data)
|
||||
} else if (type === 'edit') {
|
||||
this.openEdit(data)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(data.id)
|
||||
} else if (type === 'send') {
|
||||
this.sendMsg(data)
|
||||
} else if (type === 'code') {
|
||||
this.openCode(data.id)
|
||||
}
|
||||
},
|
||||
async createUserList(row) {
|
||||
const msg = '您确定要生成【' + row.name + '】体检名单吗?(该名单生成是按照创建时选择的可报名人员范围来生成)'
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ('confirm' !== confirm) return
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据更新中,请稍后...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
const resp = await $.post(loc() + '/createUserList', row)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$message.success('操作成功')
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
async renewUserList(row) {
|
||||
const msg = '您确定要更新【' + row.name + '】的体检名单吗?(如可报名人员范围发生变化会删除已选择的人员信息)'
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ('confirm' !== confirm) return
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据更新中,请稍后...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
const resp = await $.post(loc() + '/renewUserList', row)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$message.success('操作成功')
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
async resetUserList(row) {
|
||||
const msg = '您确定要重置【' + row.name + '】的体检名单吗?(该操作会将所有已选择的人员清空后,在进行生成)'
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ('confirm' !== confirm) return
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据更新中,请稍后...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
const resp = await $.post(loc() + '/resetUserList', row)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$message.success('操作成功')
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
openCode(id) {
|
||||
this.$refs.openQRCode.openCode("/childrenActivities?id=" + id)
|
||||
},
|
||||
@@ -543,4 +651,4 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
Reference in New Issue
Block a user