This commit is contained in:
xue jiahao
2024-12-06 11:45:27 +08:00
parent e616f0c142
commit c8bb551ed1
5 changed files with 103 additions and 77 deletions

View File

@@ -30,31 +30,7 @@
</template>
<template v-slot:body-cell-actions="p">
<q-td :props="p">
<q-btn flat padding="xs" round size="1em" icon="more_vert">
<q-menu >
<q-list dense style="min-width: 100px">
<q-item clickable v-close-popup @click="toEditFlowPage(p.row)">
<q-item-section>
<q-icon size="1.2em" name="account_tree" />
</q-item-section>
<q-item-section>設定</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="showHistory(p.row)">
<q-item-section>
<q-icon size="1.2em" name="history" />
</q-item-section>
<q-item-section>履歴</q-item-section>
</q-item>
<q-separator />
<q-item class="text-red" clickable v-close-popup @click="removeRow(p.row)">
<q-item-section>
<q-icon size="1.2em" name="delete_outline" />
</q-item-section>
<q-item-section>削除</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
<table-action-menu :row="p.row" :actions="actionList" />
</q-td>
</template>
</q-table>
@@ -83,6 +59,7 @@ import { date } from 'quasar'
import { IManagedApp } from 'src/types/AppTypes';
import ShowDialog from 'src/components/ShowDialog.vue';
import AppSelectBox from 'src/components/AppSelectBox.vue';
import TableActionMenu from 'components/TableActionMenu.vue';
interface IAppDisplay{
id:string;
@@ -119,6 +96,13 @@ const appDialog = ref();
const showSelectApp=ref(false);
const isAdding = ref(false);
const actionList = [
{ label: '設定', icon: 'account_tree', action: toEditFlowPage },
{ label: '履歴', icon: 'history', action: showHistory },
{ separator: true },
{ label: '削除', icon: 'delete_outline', class: 'text-red', action: removeRow },
];
const getApps = async () => {
loading.value = true;
rowIds.clear();
@@ -140,7 +124,6 @@ const getApps = async () => {
}
onMounted(async () => {
authStore.setLeftMenu(false);
await getApps();
});
@@ -166,11 +149,11 @@ const closeSelectAppDialog = async (val: 'OK'|'Cancel') => {
isAdding.value = false;
}
const removeRow = (app:IAppDisplay) => {
function removeRow(app:IAppDisplay) {
return
}
const showHistory = (app:IAppDisplay) => {
function showHistory(app:IAppDisplay) {
return
}
@@ -186,7 +169,7 @@ const appToAppDisplay = (app: IManagedApp) => {
}
}
const toEditFlowPage = (app:IAppDisplay) => {
function toEditFlowPage(app:IAppDisplay) {
store.setApp({
appId: app.id,
name: app.name