新增前端vue

This commit is contained in:
2025-11-27 18:09:08 +08:00
parent ee5b38babc
commit 40243abb84
22 changed files with 1331 additions and 261 deletions

View File

@@ -48,6 +48,7 @@
<ATable
ref="tableRef"
v-bind="getBindValues"
:bordered=false
:rowClassName="getRowClassName"
v-show="getEmptyDataIsShowTable"
@change="handleTableChange"

View File

@@ -35,24 +35,33 @@
setup() {
const { prefixCls } = useDesign('header-notify');
const { createMessage } = useMessage();
const listData = ref<TabItem[]>([]);
onMounted(async () => {
const response = await tabListDataAll();
listData.value = response;
});
const count = computed(() => {
let count = 0;
for (let i = 0; i < listData.value.length; i++) {
count += listData.value[i].list.length;
const listData = ref<TabItem[]>([]);
const getDataList = async () => {
try {
const result = await tabListDataAll();
listData.value = result || [];
} catch (error) {
listData.value = []; // 异常时置空列表,显示空状态
}
return count;
}
const count = computed(() => {
let count = 0;
for (let i = 0; i < listData.value.length; i++) {
count += listData.value[i].list.length;
}
return count;
});
function onNoticeClick(record: BizListItem) {
createMessage.success('你点击了通知ID=' + record.id);
createMessage.success('你点击了' + record.title);
getDataList()
}
onMounted(() => {
getDataList()
});
return {
prefixCls,

View File

@@ -215,16 +215,15 @@ export const useUserStore = defineStore('app-user', {
* @description: Confirm before logging out
*/
async confirmLoginOut() {
// const { createConfirm } = useMessage();
// const { t } = useI18n();
// createConfirm({
// iconType: 'warning',
// title: () => h('span', t('sys.app.logoutTip')),
// content: () => h('span', t('sys.app.logoutMessage')),
// onOk: async () => {
await this.logout(true);
// },
// });
const { createConfirm } = useMessage();
createConfirm({
iconType: 'warning',
title: '温馨提示',
content: '确认要退出系统吗?',
onOk: async () => {
await this.logout(true);
},
});
},
},
});