2024年7月10日 新增debug按钮
This commit is contained in:
parent
53106e2a5f
commit
3b77d8586a
|
@ -11,6 +11,7 @@ enum Api {
|
|||
deleteBatch = '/blTeacherInfo/blTeacherInfo/deleteBatch',
|
||||
importExcel = '/blTeacherAnswer/blTeacherAnswer/importExcel',
|
||||
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 reloadCreateFn = (params) => defHttp.get({ url: Api.reloadCreate, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
|
|
|
@ -26,8 +26,9 @@
|
|||
<template #tableTitle>
|
||||
<!-- <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" 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> -->
|
||||
<a-switch hidden v-model:checked="reloadCreateBtn" checked-children="显示" un-checked-children="不显示"/>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
|
@ -50,7 +51,7 @@
|
|||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
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 BlTeacherInfoModal from './components/BlTeacherInfoModal.vue'
|
||||
import BlTeacherInfoV2Modal from './components/BlTeacherInfoV2Modal.vue'
|
||||
|
@ -66,6 +67,7 @@ const $message = useMessage();
|
|||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const reloadCreateBtn = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const registerV2Modal = ref();
|
||||
const userStore = useUserStore();
|
||||
|
@ -132,7 +134,7 @@ const $message = useMessage();
|
|||
registerV2Modal.value.disableSubmit = true;
|
||||
registerV2Modal.value.add();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
|
@ -140,7 +142,7 @@ const $message = useMessage();
|
|||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
|
@ -148,22 +150,22 @@ const $message = useMessage();
|
|||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
|
||||
async function handleTjfx(record) {
|
||||
let realUrl = "/blTeacherAnswer/blTeacherAnswer/createWordTjfx";
|
||||
let title = "11111";
|
||||
|
@ -222,7 +224,12 @@ const $message = useMessage();
|
|||
// {
|
||||
// label: '详情',
|
||||
// onClick: handleDetail.bind(null, record),
|
||||
// },
|
||||
// },
|
||||
{
|
||||
ifShow: reloadCreateBtn.value,
|
||||
label: '重新生成',
|
||||
onClick: reloadCreateFn.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
|
@ -233,7 +240,7 @@ const $message = useMessage();
|
|||
}
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
|
@ -259,7 +266,7 @@ const $message = useMessage();
|
|||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
|
@ -269,7 +276,7 @@ const $message = useMessage();
|
|||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue