ui fix for add column
This commit is contained in:
@@ -30,14 +30,20 @@
|
||||
</template>
|
||||
<template v-slot:body-cell-version="p">
|
||||
<q-td :props="p">
|
||||
<div class="flex justify-between">
|
||||
<span>{{ p.row.version }}</span>
|
||||
<div class="flex justify-between full-width" >
|
||||
<span class="ellipsis" :title="p.row.versionName">{{ p.row.versionName || '未命名' }}</span>
|
||||
<q-badge v-if="isVersionEditing(p.row)" color="orange-7">変更あり</q-badge>
|
||||
</div>
|
||||
</q-td>
|
||||
</template>
|
||||
<template v-slot:body-cell-updateUser="p">
|
||||
<q-td auto-width :props="p">
|
||||
<q-badge v-if="p.row.updateUser.id == Number(authStore.userId)" color="purple">自分</q-badge>
|
||||
<span v-else>{{ p.row.updateUser.fullName }}</span>
|
||||
</q-td>
|
||||
</template>
|
||||
<template v-slot:body-cell-actions="p">
|
||||
<q-td :props="p">
|
||||
<q-td auto-width :props="p">
|
||||
<table-action-menu :row="p.row" minWidth="180px" max-width="200px" :actions="actionList" />
|
||||
</q-td>
|
||||
</template>
|
||||
@@ -73,6 +79,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, computed } from 'vue';
|
||||
import { useAppStore } from 'stores/useAppStore';
|
||||
import { useAuthStore } from 'stores/useAuthStore';
|
||||
import { useFlowEditorStore } from 'stores/flowEditor';
|
||||
import { router } from 'src/router';
|
||||
import { IAppDisplay } from 'src/types/AppTypes';
|
||||
@@ -81,15 +88,16 @@ import AppSelectBox from 'src/components/AppSelectBox.vue';
|
||||
import TableActionMenu from 'components/TableActionMenu.vue';
|
||||
|
||||
const appStore = useAppStore();
|
||||
const authStore = useAuthStore();
|
||||
const numberStringSorting = (a: string, b: string) => parseInt(a, 10) - parseInt(b, 10);
|
||||
|
||||
const columns = [
|
||||
{ name: 'id', label: 'アプリID', field: 'id', align: 'left', sortable: true, sort: numberStringSorting },
|
||||
{ name: 'name', label: 'アプリ名', field: 'name', align: 'left', sortable: true },
|
||||
{ name: 'url', label: 'URL', field: 'url', align: 'left', sortable: true },
|
||||
{ name: 'updateUser', label: '最後更新者', field: (row: IAppDisplay) => row.updateUser.fullName, align: 'left', sortable: true},
|
||||
{ name: 'updateUser', label: '最後更新者', field: '', align: 'left', sortable: true},
|
||||
{ name: 'updateTime', label: '最後更新日', field: 'updateTime', align: 'left', sortable: true},
|
||||
{ name: 'version', label: 'バージョン', field: 'version', align: 'left', sortable: true, sort: numberStringSorting },
|
||||
{ name: 'version', label: 'バージョン', field: '', align: 'left', sortable: true, style: 'max-width: 200px;',sort: numberStringSorting },
|
||||
{ name: 'actions', label: '', field: 'actions' }
|
||||
];
|
||||
|
||||
@@ -164,7 +172,9 @@ const deleteApp = async () => {
|
||||
}
|
||||
|
||||
async function toVersionHistoryPage(app:IAppDisplay) {
|
||||
await router.push('/app/version/' + app.id);
|
||||
await router.push('/app/version/' + app.id).catch(err => {
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
async function toEditFlowPage(app:IAppDisplay) {
|
||||
@@ -173,6 +183,8 @@ async function toEditFlowPage(app:IAppDisplay) {
|
||||
name: app.name
|
||||
});
|
||||
store.selectFlow(undefined);
|
||||
await router.push('/FlowChart/' + app.id);
|
||||
await router.push('/FlowChart/' + app.id).catch(err => {
|
||||
console.error(err);
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -40,11 +40,17 @@
|
||||
</template>
|
||||
<template v-slot:body-cell-comment="p">
|
||||
<q-td :props="p">
|
||||
<q-scroll-area class="description-cell">
|
||||
<q-scroll-area class="multiline-cell">
|
||||
<div v-html="p.row['comment']"></div>
|
||||
</q-scroll-area>
|
||||
</q-td>
|
||||
</template>
|
||||
<template v-slot:body-cell-creator="p">
|
||||
<q-td auto-width :props="p">
|
||||
<q-badge v-if="p.row.creator.id == Number(authStore.userId)" color="purple">自分</q-badge>
|
||||
<span v-else>{{ p.row.creator.fullName }}</span>
|
||||
</q-td>
|
||||
</template>
|
||||
<template v-slot:body-cell-actions="p">
|
||||
<q-td :props="p">
|
||||
<table-action-menu :row="p.row" minWidth="140px" :actions="actionList" />
|
||||
@@ -83,12 +89,14 @@
|
||||
import { useQuasar } from 'quasar';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { useAppStore } from 'stores/useAppStore';
|
||||
import { useAuthStore } from 'stores/useAuthStore';
|
||||
import { useFlowEditorStore } from 'stores/flowEditor';
|
||||
import { router } from 'src/router';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { IAppDisplay, IAppVersionDisplay } from 'src/types/AppTypes';
|
||||
import TableActionMenu from 'components/TableActionMenu.vue';
|
||||
|
||||
const authStore = useAuthStore();
|
||||
const appStore = useAppStore();
|
||||
const route = useRoute()
|
||||
|
||||
@@ -101,8 +109,8 @@ const columns = [
|
||||
{ name: 'id', label: 'バージョン番号', field: 'version', align: 'left', sortable: true },
|
||||
{ name: 'name', label: 'バージョン名', field: 'name', align: 'left', sortable: true },
|
||||
{ name: 'comment', label: 'コメント', field: 'comment', align: 'left', sortable: true },
|
||||
// { name: 'creator', label: '作成者', field: (row: IVersionDisplay) => row.creator.fullName, align: 'left', sortable: true },
|
||||
// { name: 'createTime', label: '作成日時', field: 'createTime', align: 'left', sortable: true },
|
||||
{ name: 'creator', label: '作成者', field: '', align: 'left', sortable: true },
|
||||
{ name: 'createTime', label: '作成日時', field: 'createTime', align: 'left', sortable: true },
|
||||
// { name: 'updater', label: '更新者', field: (row: IVersionDisplay) => row.updater.fullName, align: 'left', sortable: true },
|
||||
// { name: 'updateTime', label: '更新日時', field: 'updateTime', align: 'left', sortable: true },
|
||||
{ name: 'actions', label: '', field: 'actions' }
|
||||
@@ -149,6 +157,7 @@ function isVersionEditing() {
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
versionLoading.value = true;
|
||||
let isSuccess = getAppById();
|
||||
if (!isSuccess) {
|
||||
await getApps();
|
||||
@@ -201,10 +210,10 @@ async function toEditFlowPage() {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.description-cell {
|
||||
height: 30px;
|
||||
.multiline-cell {
|
||||
height: 45px;
|
||||
min-width: 300px;
|
||||
max-height: 30px;
|
||||
max-height: 45px;
|
||||
white-space: break-spaces;
|
||||
|
||||
.q-scrollarea__content {
|
||||
|
||||
Reference in New Issue
Block a user