2024年7月10日 新增debug按钮

This commit is contained in:
bai 2024-07-10 22:29:27 +08:00
parent 53106e2a5f
commit 3b77d8586a
2 changed files with 22 additions and 12 deletions

View File

@ -11,6 +11,7 @@ enum Api {
deleteBatch = '/blTeacherInfo/blTeacherInfo/deleteBatch', deleteBatch = '/blTeacherInfo/blTeacherInfo/deleteBatch',
importExcel = '/blTeacherAnswer/blTeacherAnswer/importExcel', importExcel = '/blTeacherAnswer/blTeacherAnswer/importExcel',
exportXls = '/blTeacherAnswer/blTeacherAnswer/exportXls', exportXls = '/blTeacherAnswer/blTeacherAnswer/exportXls',
reloadCreate = '/blTeacherAnswer/blTeacherAnswer/createWord',
} }
/** /**
@ -30,6 +31,8 @@ export const getImportUrl = Api.importExcel;
*/ */
export const list = (params) => defHttp.get({ url: Api.list, params }); export const list = (params) => defHttp.get({ url: Api.list, params });
export const reloadCreateFn = (params) => defHttp.get({ url: Api.reloadCreate, params });
/** /**
* *
* @param params * @param params

View File

@ -26,8 +26,9 @@
<template #tableTitle> <template #tableTitle>
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> --> <!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> -->
<a-button type="primary" @click="handleV2Add" preIcon="ant-design:plus-outlined"> 新增</a-button> <a-button type="primary" @click="handleV2Add" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 下载导入模板</a-button> <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 下载导入模板</a-button>
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> --> <!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
<a-switch hidden v-model:checked="reloadCreateBtn" checked-children="显示" un-checked-children="不显示"/>
</template> </template>
<!--操作栏--> <!--操作栏-->
<template #action="{ record }"> <template #action="{ record }">
@ -50,7 +51,7 @@
import { BasicTable, useTable, TableAction } from '/@/components/Table'; import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage'; import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './BlTeacherInfo.data'; import { columns, superQuerySchema } from './BlTeacherInfo.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './BlTeacherInfo.api'; import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, reloadCreateFn } from './BlTeacherInfo.api';
import { downloadFile } from '/@/utils/common/renderUtils'; import { downloadFile } from '/@/utils/common/renderUtils';
import BlTeacherInfoModal from './components/BlTeacherInfoModal.vue' import BlTeacherInfoModal from './components/BlTeacherInfoModal.vue'
import BlTeacherInfoV2Modal from './components/BlTeacherInfoV2Modal.vue' import BlTeacherInfoV2Modal from './components/BlTeacherInfoV2Modal.vue'
@ -66,6 +67,7 @@ const $message = useMessage();
const formRef = ref(); const formRef = ref();
const queryParam = reactive<any>({}); const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false); const toggleSearchStatus = ref<boolean>(false);
const reloadCreateBtn = ref<boolean>(false);
const registerModal = ref(); const registerModal = ref();
const registerV2Modal = ref(); const registerV2Modal = ref();
const userStore = useUserStore(); const userStore = useUserStore();
@ -132,7 +134,7 @@ const $message = useMessage();
registerV2Modal.value.disableSubmit = true; registerV2Modal.value.disableSubmit = true;
registerV2Modal.value.add(); registerV2Modal.value.add();
} }
/** /**
* 编辑事件 * 编辑事件
*/ */
@ -140,7 +142,7 @@ const $message = useMessage();
registerModal.value.disableSubmit = false; registerModal.value.disableSubmit = false;
registerModal.value.edit(record); registerModal.value.edit(record);
} }
/** /**
* 详情 * 详情
*/ */
@ -148,22 +150,22 @@ const $message = useMessage();
registerModal.value.disableSubmit = true; registerModal.value.disableSubmit = true;
registerModal.value.edit(record); registerModal.value.edit(record);
} }
/** /**
* 删除事件 * 删除事件
*/ */
async function handleDelete(record) { async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess); await deleteOne({ id: record.id }, handleSuccess);
} }
/** /**
* 成功回调 * 成功回调
*/ */
function handleSuccess() { function handleSuccess() {
(selectedRowKeys.value = []) && reload(); (selectedRowKeys.value = []) && reload();
} }
async function handleTjfx(record) { async function handleTjfx(record) {
let realUrl = "/blTeacherAnswer/blTeacherAnswer/createWordTjfx"; let realUrl = "/blTeacherAnswer/blTeacherAnswer/createWordTjfx";
let title = "11111"; let title = "11111";
@ -222,7 +224,12 @@ const $message = useMessage();
// { // {
// label: '', // label: '',
// onClick: handleDetail.bind(null, record), // onClick: handleDetail.bind(null, record),
// }, // },
{
ifShow: reloadCreateBtn.value,
label: '重新生成',
onClick: reloadCreateFn.bind(null, record),
},
{ {
label: '删除', label: '删除',
popConfirm: { popConfirm: {
@ -233,7 +240,7 @@ const $message = useMessage();
} }
]; ];
} }
/** /**
* 下拉操作栏 * 下拉操作栏
*/ */
@ -259,7 +266,7 @@ const $message = useMessage();
function searchQuery() { function searchQuery() {
reload(); reload();
} }
/** /**
* 重置 * 重置
*/ */
@ -269,7 +276,7 @@ const $message = useMessage();
// //
reload(); reload();
} }