feat:联系我们-在线报名受理功能追加

This commit is contained in:
xjh 2023-04-20 23:53:14 +08:00
parent 6f296f1a1a
commit 5b5e789234
2 changed files with 55 additions and 6 deletions

View File

@ -64,6 +64,9 @@
</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="handleStatusUpdate(selectionData)">
批量受理
</el-dropdown-item>
<el-dropdown-item @click="handleDelete(selectionData)">
批量删除
</el-dropdown-item>
@ -88,6 +91,9 @@
</template>
<template #chaoz="scope">
<el-space>
<el-button size="small" @click="handleStatusUpdate([scope.row])">
受理
</el-button>
<el-dropdown @command="handleCommand">
<el-button type="primary" size="small">
更多<el-icon class="el-icon--right"><arrow-down /></el-icon>
@ -114,7 +120,7 @@
import { ArrowDown } from '@element-plus/icons-vue';
import { ref, reactive, watch } from 'vue';
import { useLoginStore } from "~/store";
import { getSignupList, deleteSignup, getDictionary, exportExcel } from '~/service/signup';
import { getSignupList, deleteSignup, getDictionary, exportExcel, handleSignupStatus } from '~/service/signup';
import DetailSignupDialog from './components/DetailSignupDialog.vue';
import { getClassesList } from '~/service/classes';
@ -214,14 +220,16 @@ const column = [
{
label: '操作',
prop: 'chaoz',
width: '100',
width: '250',
fixed: 'right'
}
];
const handleCommand = ({ type, row }) => {
switch (type) {
case "handle_status":
handleStatusUpdate([row]);
break;
case "detail":
handleDetail(row);
break;
@ -231,6 +239,37 @@ const handleCommand = ({ type, row }) => {
}
};
//
let loadingHandle = null;
const HandleLoading = () => {
loadingHandle = ElLoading.service({
lock: true,
text: "正在受理中...",
background: "rgba(255, 255, 255, 0.7)",
});
};
const closeUploadLoading = () => loadingHandle.close();
const handleStatusUpdate = (data) => {
ElMessageBox.confirm(`您确定已对所选的在线报名处理了吗?`).then(async () => {
HandleLoading()
const { code, msg } = await handleSignupStatus({
signup_guid: data.map(v => v.signup_guid).join()
});
if (code == 0) {
ElMessageBox.alert(msg, "受理信息", {
dangerouslyUseHTMLString: true,
confirmButtonText: "确定",
callback: () => {
tableRef.value.reload();
},
});
} else {
ElMessage.error(msg);
}
closeUploadLoading();
});
};
//
const handleDelete = data => {
ElMessageBox.confirm(`您确定要删除该在线报名吗?`).then(async () => {
@ -250,9 +289,6 @@ function handleDetail(row) {
DetailSignupDialogRow.value = row
}
//
const graduation_type = ref([]);
async function get_graduation_type() {

View File

@ -43,4 +43,17 @@ export function deleteSignup(data) {
isShowSuccessMessage: true,
errorMessageText: '删除失败'
});
}
/**
* 受理在线报名
* @param {Object} data
* @return {Promise} api
*/
export function handleSignupStatus(data) {
return api.post('ContactUs.Signup/handleSignupStatus', data, {
// isTransformResponse: true,
// isShowSuccessMessage: true,
errorMessageText: '受理失败'
});
}