V2アプリ一覧バッグ修正
This commit is contained in:
@@ -16,7 +16,13 @@
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
|
||||
<template v-slot:body-cell-url="prop">
|
||||
<q-td :props="prop">
|
||||
<a :href="prop.row.url" target="_blank" :title="prop.row.name" >
|
||||
{{ prop.row.url }}
|
||||
</a>
|
||||
</q-td>
|
||||
</template>
|
||||
<template v-slot:body-cell-actions="p">
|
||||
<q-td :props="p">
|
||||
<q-btn-group flat>
|
||||
@@ -39,21 +45,47 @@ import { useAuthStore } from 'stores/useAuthStore';
|
||||
import { useFlowEditorStore } from 'stores/flowEditor';
|
||||
import { router } from 'src/router';
|
||||
|
||||
interface IUser{
|
||||
first_name:string;
|
||||
last_name:string;
|
||||
email:string;
|
||||
}
|
||||
|
||||
interface IManagedApp{
|
||||
appid:string;
|
||||
appname:string;
|
||||
domainurl:string;
|
||||
version:string;
|
||||
user:IUser;
|
||||
update_time:string;
|
||||
}
|
||||
|
||||
interface IAppDisplay{
|
||||
id:string;
|
||||
name:string;
|
||||
url:string;
|
||||
user:string;
|
||||
version:string;
|
||||
updatetime:string;
|
||||
}
|
||||
|
||||
|
||||
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: 'user', label: '最後更新者', field: 'user', align: 'left', sortable: true},
|
||||
{ name: 'updatetime', label: '最後更新日', field: 'updatetime', align: 'left', sortable: true},
|
||||
{ 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 rows = ref<IAppDisplay[]>([]);
|
||||
const store = useFlowEditorStore();
|
||||
|
||||
const tenantid = ref(authStore.currentDomain.id);
|
||||
@@ -61,32 +93,39 @@ 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 }
|
||||
rows.value = result.data.map((item:IManagedApp) => {
|
||||
return {
|
||||
id: item.appid,
|
||||
name: item.appname,
|
||||
url: `${item.domainurl}/k/${item.appid}`,
|
||||
user: `${item.user.first_name} ${item.user.last_name}` ,
|
||||
updatetime:item.update_time,
|
||||
version: item.version }
|
||||
});
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
authStore.setLeftMenu(false);
|
||||
await getApps();
|
||||
})
|
||||
});
|
||||
|
||||
const addRow = () => {
|
||||
return
|
||||
}
|
||||
|
||||
const removeRow = (row) => {
|
||||
const removeRow = (app:IAppDisplay) => {
|
||||
return
|
||||
}
|
||||
|
||||
const showHistory = (row) => {
|
||||
const showHistory = (app:IAppDisplay) => {
|
||||
return
|
||||
}
|
||||
|
||||
const editFlow = (row) => {
|
||||
const editFlow = (app:IAppDisplay) => {
|
||||
store.setApp({
|
||||
appId: row.id,
|
||||
name: row.name
|
||||
appId: app.id,
|
||||
name: app.name
|
||||
});
|
||||
router.push('/FlowChart');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user