yxk-20260622-把把脉增加勾选几条数据后导出功能和批量删除功能
This commit is contained in:
@@ -52,12 +52,25 @@
|
|||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<!--引用表格-->
|
<!--引用表格-->
|
||||||
<BasicTable @register="registerTable" :expandedRowKeys="expandedRowKeys" @expand="handleExpand">
|
<BasicTable @register="registerTable" :rowSelection="rowSelection" :expandedRowKeys="expandedRowKeys" @expand="handleExpand">
|
||||||
<!--插槽:table标题-->
|
<!--插槽:table标题-->
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<a-button type="primary" v-auth="'bqtakepulse:bg_takepulse:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
<a-button type="primary" v-auth="'bqtakepulse:bg_takepulse:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||||
<a-button type="primary" v-auth="'bqtakepulse:bg_takepulse:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
<a-button type="primary" v-auth="'bqtakepulse:bg_takepulse:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||||
<!-- <j-upload-button type="primary" v-auth="'bqtakepulse:bg_takepulse:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>-->
|
<!-- <j-upload-button type="primary" v-auth="'bqtakepulse:bg_takepulse:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>-->
|
||||||
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
|
<template #overlay>
|
||||||
|
<a-menu>
|
||||||
|
<a-menu-item key="1" @click="batchHandleDelete">
|
||||||
|
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||||
|
删除
|
||||||
|
</a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
</template>
|
||||||
|
<a-button v-auth="'bqtakepulse:bg_takepulse:deleteBatch'">批量操作
|
||||||
|
<Icon icon="mdi:chevron-down"></Icon>
|
||||||
|
</a-button>
|
||||||
|
</a-dropdown>
|
||||||
<!-- 高级查询 -->
|
<!-- 高级查询 -->
|
||||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||||
</template>
|
</template>
|
||||||
@@ -139,6 +152,7 @@
|
|||||||
import FlowScheduleStartModalForBG from '/src/components/semri/process/FlowScheduleStartModalForBG.vue';
|
import FlowScheduleStartModalForBG from '/src/components/semri/process/FlowScheduleStartModalForBG.vue';
|
||||||
import BusinessProcessListModal from '/src/components/semri/process/BusinessProcessListModal.vue';
|
import BusinessProcessListModal from '/src/components/semri/process/BusinessProcessListModal.vue';
|
||||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||||
|
import {batchDelete} from "@/views/bg/bqtakepulse/BgTakepulse.api";
|
||||||
|
|
||||||
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
|
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
|
||||||
const FLOW_CODE = 'dev_task_task_001';
|
const FLOW_CODE = 'dev_task_task_001';
|
||||||
@@ -164,6 +178,8 @@
|
|||||||
canResize:false,
|
canResize:false,
|
||||||
useSearchForm: false,
|
useSearchForm: false,
|
||||||
expandRowByClick: true,
|
expandRowByClick: true,
|
||||||
|
clickToRowSelect: false,
|
||||||
|
rowSelection: { type: 'checkbox' },
|
||||||
actionColumn: {
|
actionColumn: {
|
||||||
width: 120,
|
width: 120,
|
||||||
fixed:'right'
|
fixed:'right'
|
||||||
@@ -188,7 +204,7 @@
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const [registerTable, {reload}] = tableContext
|
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext
|
||||||
|
|
||||||
interface DeptOption {
|
interface DeptOption {
|
||||||
label: string;
|
label: string;
|
||||||
@@ -290,6 +306,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function searchQuery() {
|
function searchQuery() {
|
||||||
|
selectedRowKeys.value = [];
|
||||||
resetFeedbackExpand();
|
resetFeedbackExpand();
|
||||||
reload({ page: 1 });
|
reload({ page: 1 });
|
||||||
}
|
}
|
||||||
@@ -329,10 +346,17 @@
|
|||||||
async function handleDelete(record) {
|
async function handleDelete(record) {
|
||||||
await deleteOne({id: record.id}, handleSuccess);
|
await deleteOne({id: record.id}, handleSuccess);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 批量删除事件
|
||||||
|
*/
|
||||||
|
async function batchHandleDelete() {
|
||||||
|
await batchDelete({ids: selectedRowKeys.value},handleSuccess);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 成功回调
|
* 成功回调
|
||||||
*/
|
*/
|
||||||
function handleSuccess() {
|
function handleSuccess() {
|
||||||
|
selectedRowKeys.value = [];
|
||||||
resetFeedbackExpand();
|
resetFeedbackExpand();
|
||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
@@ -545,6 +569,7 @@
|
|||||||
*/
|
*/
|
||||||
function searchReset() {
|
function searchReset() {
|
||||||
formRef.value.resetFields();
|
formRef.value.resetFields();
|
||||||
|
selectedRowKeys.value = [];
|
||||||
resetFeedbackExpand();
|
resetFeedbackExpand();
|
||||||
//刷新数据
|
//刷新数据
|
||||||
reload({ page: 1 });
|
reload({ page: 1 });
|
||||||
|
|||||||
Reference in New Issue
Block a user