add app management page
This commit is contained in:
@@ -47,11 +47,18 @@ const essentialLinks: EssentialLinkProps[] = [
|
|||||||
link: '/',
|
link: '/',
|
||||||
target: '_self'
|
target: '_self'
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// title: 'フローエディター',
|
||||||
|
// caption: 'イベントを設定する',
|
||||||
|
// icon: 'account_tree',
|
||||||
|
// link: '/#/FlowChart',
|
||||||
|
// target: '_self'
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
title: 'フローエディター',
|
title: 'アプリ管理',
|
||||||
caption: 'イベントを設定する',
|
caption: 'アプリを管理する',
|
||||||
icon: 'account_tree',
|
icon: 'widgets',
|
||||||
link: '/#/FlowChart',
|
link: '/#/app',
|
||||||
target: '_self'
|
target: '_self'
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
|
|||||||
93
frontend/src/pages/AppManagement.vue
Normal file
93
frontend/src/pages/AppManagement.vue
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<template>
|
||||||
|
<div class="q-pa-md">
|
||||||
|
<div class="q-gutter-sm row items-start">
|
||||||
|
<q-breadcrumbs>
|
||||||
|
<q-breadcrumbs-el icon="widgets" label="アプリ管理" />
|
||||||
|
</q-breadcrumbs>
|
||||||
|
</div>
|
||||||
|
<q-table title="Treats" :rows="rows" :columns="columns" row-key="id" :filter="filter" :loading="loading" :pagination="pagination">
|
||||||
|
|
||||||
|
<template v-slot:top>
|
||||||
|
<q-btn disabled color="primary" :disable="loading" label="新規" @click="addRow" />
|
||||||
|
<q-space />
|
||||||
|
<q-input borderless dense filled debounce="300" v-model="filter" placeholder="検索">
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:body-cell-actions="p">
|
||||||
|
<q-td :props="p">
|
||||||
|
<q-btn-group flat>
|
||||||
|
<q-btn flat color="primary" padding="xs" size="1em" icon="edit_note" @click="editFlow(p.row)" />
|
||||||
|
<q-btn disabled flat color="primary" padding="xs" size="1em" icon="history" @click="showHistory(p.row)" />
|
||||||
|
<q-btn disabled flat color="negative" padding="xs" size="1em" icon="delete_outline" @click="removeRow(p.row)" />
|
||||||
|
</q-btn-group>
|
||||||
|
</q-td>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</q-table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted, reactive } from 'vue';
|
||||||
|
import { api } from 'boot/axios';
|
||||||
|
import { useAuthStore } from 'stores/useAuthStore';
|
||||||
|
import { useFlowEditorStore } from 'stores/flowEditor';
|
||||||
|
import { router } from 'src/router';
|
||||||
|
|
||||||
|
const authStore = useAuthStore();
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{ name: 'id', label: 'アプリID', field: 'id', align: 'left', sortable: true },
|
||||||
|
{ name: 'name', label: 'アプリ名', field: 'name', align: 'left', sortable: true },
|
||||||
|
{ name: 'url', label: 'URL', field: 'url', align: 'left', sortable: true },
|
||||||
|
{ name: 'user', label: 'ログイン名', field: 'user', align: 'left', },
|
||||||
|
{ name: 'version', label: 'バージョン', field: 'version', align: 'left', },
|
||||||
|
{ name: 'actions', label: '操作', field: 'actions' }
|
||||||
|
];
|
||||||
|
|
||||||
|
const pagination = ref({ sortBy: 'id', descending: true, rowsPerPage: 20 });
|
||||||
|
const loading = ref(false);
|
||||||
|
const filter = ref('');
|
||||||
|
const rows = ref([]);
|
||||||
|
const store = useFlowEditorStore();
|
||||||
|
|
||||||
|
const tenantid = ref(authStore.currentDomain.id);
|
||||||
|
|
||||||
|
const getApps = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
const result = await api.get('api/apps');
|
||||||
|
rows.value = result.data.map((item) => {
|
||||||
|
return { id: item.appid, name: item.appname, url: item.domainurl, user: item.user.email, version: item.version }
|
||||||
|
});
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await getApps();
|
||||||
|
})
|
||||||
|
|
||||||
|
const addRow = () => {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const removeRow = (row) => {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const showHistory = (row) => {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const editFlow = (row) => {
|
||||||
|
store.setApp({
|
||||||
|
appId: row.id,
|
||||||
|
name: row.name
|
||||||
|
});
|
||||||
|
router.push('/FlowChart');
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -27,6 +27,7 @@ const routes: RouteRecordRaw[] = [
|
|||||||
{ path: 'domain', component: () => import('pages/TenantDomain.vue') },
|
{ path: 'domain', component: () => import('pages/TenantDomain.vue') },
|
||||||
{ path: 'userdomain', component: () => import('pages/UserDomain.vue')},
|
{ path: 'userdomain', component: () => import('pages/UserDomain.vue')},
|
||||||
{ path: 'user', component: () => import('pages/UserManagement.vue')},
|
{ path: 'user', component: () => import('pages/UserManagement.vue')},
|
||||||
|
{ path: 'app', component: () => import('pages/AppManagement.vue')},
|
||||||
{ path: 'condition', component: () => import('pages/conditionPage.vue') }
|
{ path: 'condition', component: () => import('pages/conditionPage.vue') }
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user