mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-22 12:58:55 +08:00
🐛 Fixing a bug. 表格全选后取消全显数据没有清空
This commit is contained in:
parent
0e695c6199
commit
475b075d23
@ -57,10 +57,10 @@
|
||||
"sass": "^1.58.3",
|
||||
"typescript": "^4.9.5",
|
||||
"unplugin-auto-import": "^0.13.0",
|
||||
"vite": "^4.1.4",
|
||||
"vite": "^4.3.3",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-style-import": "^2.0.0",
|
||||
"vite-plugin-top-level-await": "^1.2.4",
|
||||
"vite-plugin-top-level-await": "^1.3.0",
|
||||
"vite-plugin-vue-setup-extend": "^0.4.0",
|
||||
"vue-eslint-parser": "^9.1.0"
|
||||
},
|
||||
|
@ -112,8 +112,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -130,8 +130,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
||||
<el-button icon="delete" text type="primary" v-auth="'sys_file_del'" @click="handleDelete([scope.row.id])">{{
|
||||
$t('common.delBtn')
|
||||
}}</el-button>
|
||||
<el-button icon="download" type="primary" text @click="download(scope.row, scope.index)">{{ $t('common.download') }}</el-button>
|
||||
<el-button icon="download" type="primary" text @click="download(scope.row)">{{ $t('common.download') }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -102,8 +102,8 @@ const download = (row: any) => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -142,8 +142,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -128,8 +128,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -167,8 +167,8 @@ const handleRefreshCache = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.publicId));
|
||||
const handleSelectionChange = (objs: { publicId: string }[]) => {
|
||||
selectObjs.value = objs.map(({ publicId }) => publicId);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -118,8 +118,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.postId));
|
||||
const handleSelectionChange = (objs: { postId: string }[]) => {
|
||||
selectObjs.value = objs.map(({ postId }) => postId);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -168,8 +168,8 @@ const handleSelectable = (row: any) => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.roleId));
|
||||
const handleSelectionChange = (objs: { roleId: string }[]) => {
|
||||
selectObjs.value = objs.map(({ roleId }) => roleId);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -123,8 +123,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -166,8 +166,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -93,8 +93,8 @@ const resetQuery = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.accessToken));
|
||||
const handleSelectionChange = (objs: { accessToken: string }[]) => {
|
||||
selectObjs.value = objs.map(({ accessToken }) => accessToken);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -200,8 +200,8 @@ const handleSelectable = (row: any) => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.userId));
|
||||
const handleSelectionChange = (objs: { userId: string }[]) => {
|
||||
selectObjs.value = objs.map(({ userId }) => userId);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -104,8 +104,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const { getDataList, tableStyle } = useTable(state);
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -137,8 +137,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.roleId));
|
||||
const handleSelectionChange = (objs: { roleId: string }[]) => {
|
||||
selectObjs.value = objs.map(({ roleId }) => roleId);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -138,8 +138,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -143,8 +143,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.userId));
|
||||
const handleSelectionChange = (objs: { userId: string }[]) => {
|
||||
selectObjs.value = objs.map(({ userId }) => userId);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -173,7 +173,7 @@ const resetQuery = () => {
|
||||
};
|
||||
|
||||
/** 行选中事件 */
|
||||
const handleSelectionChange = (rows) => {
|
||||
const handleSelectionChange = (rows: any) => {
|
||||
selectedRows.value = rows;
|
||||
multiple.value = !rows.length;
|
||||
};
|
||||
|
@ -94,8 +94,8 @@ const openDialog = (id: string) => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.jobLogId));
|
||||
const handleSelectionChange = (objs: { jobLogId: string }[]) => {
|
||||
selectObjs.value = objs.map(({ jobLogId }) => jobLogId);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -104,8 +104,8 @@ const resetQuery = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -102,8 +102,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -119,8 +119,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -118,8 +118,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -130,8 +130,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -176,10 +176,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
objs.forEach((val: any) => {
|
||||
selectObjs.value.push(val.id);
|
||||
});
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -156,11 +156,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value = [];
|
||||
objs.forEach((val: any) => {
|
||||
selectObjs.value.push(val.id);
|
||||
});
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -19,9 +19,20 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button v-auth="'mp_wxaccount_add'" class="ml10" formDialogRef icon="folder-add" type="primary" @click="formDialogRef.openDialog()">
|
||||
<el-button v-auth="'mp_wxaccount_add'" class="ml10" icon="folder-add" type="primary" @click="formDialogRef.openDialog()">
|
||||
{{ $t('common.addBtn') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
plain
|
||||
v-auth="'mp_wxaccount_add'"
|
||||
class="ml10"
|
||||
icon="Delete"
|
||||
type="primary"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete(selectObjs)"
|
||||
>
|
||||
{{ $t('common.delBtn') }}
|
||||
</el-button>
|
||||
<right-toolbar
|
||||
:export="'app_social_details_del'"
|
||||
@exportExcel="exportExcel"
|
||||
@ -67,31 +78,25 @@
|
||||
</span>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item
|
||||
><el-button icon="edit-pen" v-auth="'mp_wxaccount_edit'" text type="primary" @click="formDialogRef.openDialog(scope.row.id)">{{
|
||||
$t('common.editBtn')
|
||||
}}</el-button></el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item>
|
||||
<el-button icon="delete" v-auth="'mp_wxaccount_del'" text type="primary" @click="handleDelete([scope.row.id])">{{
|
||||
$t('common.delBtn')
|
||||
}}</el-button></el-dropdown-item
|
||||
>
|
||||
<el-button icon="edit-pen" v-auth="'mp_wxaccount_edit'" text type="primary" @click="formDialogRef.openDialog(scope.row.id)"
|
||||
>{{ $t('common.editBtn') }}
|
||||
</el-button>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<el-button icon="DArrowRight" v-auth="'mp_wxaccount_del'" text type="primary" @click="access(scope.row)"
|
||||
>接入</el-button
|
||||
></el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item
|
||||
><el-button icon="Grid" v-auth="'mp_wxaccount_del'" text type="primary" @click="generate(scope.row)"
|
||||
>二维码</el-button
|
||||
></el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item
|
||||
><el-button icon="refresh" v-auth="'mp_wxaccount_del'" text type="primary" @click="quota(scope.row)"
|
||||
>quota</el-button
|
||||
></el-dropdown-item
|
||||
>
|
||||
<el-button icon="delete" v-auth="'mp_wxaccount_del'" text type="primary" @click="handleDelete([scope.row.id])"
|
||||
>{{ $t('common.delBtn') }}
|
||||
</el-button>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<el-button icon="DArrowRight" v-auth="'mp_wxaccount_del'" text type="primary" @click="access(scope.row)">接入 </el-button>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<el-button icon="Grid" v-auth="'mp_wxaccount_del'" text type="primary" @click="generate(scope.row)">二维码 </el-button>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<el-button icon="refresh" v-auth="'mp_wxaccount_del'" text type="primary" @click="quota(scope.row)">quota </el-button>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
@ -121,7 +126,7 @@ import { useMessage, useMessageBox } from '/@/hooks/message';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import commonFunction from '/@/utils/commonFunction';
|
||||
import other from '/@/utils/other';
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const { copyText } = commonFunction();
|
||||
// 引入组件
|
||||
const ImageUpload = defineAsyncComponent(() => import('/@/components/Upload/Image.vue'));
|
||||
@ -161,10 +166,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
objs.forEach((val: any) => {
|
||||
selectObjs.value.push(val.id);
|
||||
});
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -132,8 +132,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.leaveId));
|
||||
const handleSelectionChange = (objs: { leaveId: string }[]) => {
|
||||
selectObjs.value = objs.map(({ leaveId }) => leaveId);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -102,8 +102,8 @@ const resetQuery = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -114,8 +114,8 @@ const resetQuery = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.processonDefinitionId));
|
||||
const handleSelectionChange = (objs: { processonDefinitionId: string }[]) => {
|
||||
selectObjs.value = objs.map(({ processonDefinitionId }) => processonDefinitionId);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -54,8 +54,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const { getDataList, sortChangeHandle } = useTable(state);
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -127,8 +127,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.taskId));
|
||||
const handleSelectionChange = (objs: { taskId: string }[]) => {
|
||||
selectObjs.value = objs.map(({ taskId }) => taskId);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -137,8 +137,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -138,8 +138,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.goodsOrderId));
|
||||
const handleSelectionChange = (objs: { goodsOrderId: string }[]) => {
|
||||
selectObjs.value = objs.map(({ goodsOrderId }) => goodsOrderId);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -109,8 +109,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.id));
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -115,8 +115,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.refundOrderId));
|
||||
const handleSelectionChange = (objs: { refundOrderId: string }[]) => {
|
||||
selectObjs.value = objs.map(({ refundOrderId }) => refundOrderId);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
@ -163,8 +163,8 @@ const exportExcel = () => {
|
||||
};
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: any) => {
|
||||
selectObjs.value.push(...objs.map((val: any) => val.orderId));
|
||||
const handleSelectionChange = (objs: { orderId: string }[]) => {
|
||||
selectObjs.value = objs.map(({ orderId }) => orderId);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user