left menu 修正
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
</q-header>
|
</q-header>
|
||||||
|
|
||||||
<q-drawer
|
<q-drawer
|
||||||
v-model="leftDrawerOpen"
|
:model-value="authStore.toggleLeftDrawer"
|
||||||
:show-if-above="false"
|
:show-if-above="false"
|
||||||
bordered
|
bordered
|
||||||
>
|
>
|
||||||
@@ -151,11 +151,10 @@ const essentialLinks: EssentialLinkProps[] = [
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const leftDrawerOpen = ref(false)
|
|
||||||
const version = process.env.version;
|
const version = process.env.version;
|
||||||
const productName = process.env.productName;
|
const productName = process.env.productName;
|
||||||
|
|
||||||
function toggleLeftDrawer() {
|
function toggleLeftDrawer() {
|
||||||
leftDrawerOpen.value = !leftDrawerOpen.value
|
authStore.toggleLeftMenu();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ import {ref,reactive,computed,onMounted} from 'vue';
|
|||||||
import {IActionNode, ActionNode, IActionFlow, ActionFlow,RootAction, IActionProperty } from 'src/types/ActionTypes';
|
import {IActionNode, ActionNode, IActionFlow, ActionFlow,RootAction, IActionProperty } from 'src/types/ActionTypes';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useFlowEditorStore } from 'stores/flowEditor';
|
import { useFlowEditorStore } from 'stores/flowEditor';
|
||||||
|
import { authStore, useAuthStore } from 'stores/useAuthStore';
|
||||||
|
|
||||||
import NodeItem from 'src/components/main/NodeItem.vue';
|
import NodeItem from 'src/components/main/NodeItem.vue';
|
||||||
import ShowDialog from 'components/ShowDialog.vue';
|
import ShowDialog from 'components/ShowDialog.vue';
|
||||||
import ActionSelect from 'components/ActionSelect.vue';
|
import ActionSelect from 'components/ActionSelect.vue';
|
||||||
@@ -67,10 +69,10 @@ import {FlowCtrl } from '../control/flowctrl';
|
|||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
const deployLoading = ref(false);
|
const deployLoading = ref(false);
|
||||||
const saveLoading = ref(false);
|
const saveLoading = ref(false);
|
||||||
|
|
||||||
const drawerLeft = ref(false);
|
const drawerLeft = ref(false);
|
||||||
const $q=useQuasar();
|
const $q=useQuasar();
|
||||||
const store = useFlowEditorStore();
|
const store = useFlowEditorStore();
|
||||||
|
const authStore =useAuthStore();
|
||||||
// ref関数を使ってtemplateとバインド
|
// ref関数を使ってtemplateとバインド
|
||||||
const state=reactive({
|
const state=reactive({
|
||||||
activeNode:{
|
activeNode:{
|
||||||
@@ -222,6 +224,7 @@ const fetchData = async ()=>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
authStore.toggleLeftMenu();
|
||||||
fetchData();
|
fetchData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -5,7 +5,13 @@ const routes: RouteRecordRaw[] = [
|
|||||||
path: '/login',
|
path: '/login',
|
||||||
component: () => import('pages/LoginPage.vue')
|
component: () => import('pages/LoginPage.vue')
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path:'/FlowChart',
|
||||||
|
component:()=>import('layouts/MainLayout.vue'),
|
||||||
|
children:[
|
||||||
|
{path:'',component:()=>import('pages/FlowChart.vue')}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
component: () => import('layouts/MainLayout.vue'),
|
component: () => import('layouts/MainLayout.vue'),
|
||||||
@@ -16,7 +22,7 @@ const routes: RouteRecordRaw[] = [
|
|||||||
{ path: 'flow', component: () => import('pages/testFlow.vue') },
|
{ path: 'flow', component: () => import('pages/testFlow.vue') },
|
||||||
{ path: 'FlowChartTest', component: () => import('pages/FlowChartTest.vue') },
|
{ path: 'FlowChartTest', component: () => import('pages/FlowChartTest.vue') },
|
||||||
{ path: 'flowEditor', component: () => import('pages/FlowEditorPage.vue') },
|
{ path: 'flowEditor', component: () => import('pages/FlowEditorPage.vue') },
|
||||||
{ path: 'FlowChart', component: () => import('pages/FlowChart.vue') },
|
// { path: 'FlowChart', component: () => import('pages/FlowChart.vue') },
|
||||||
{ path: 'right', component: () => import('pages/testRight.vue') },
|
{ path: 'right', component: () => import('pages/testRight.vue') },
|
||||||
{ 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')},
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export interface IUserState{
|
|||||||
token?:string;
|
token?:string;
|
||||||
returnUrl:string;
|
returnUrl:string;
|
||||||
currentDomain:IDomainInfo;
|
currentDomain:IDomainInfo;
|
||||||
|
LeftDrawer:boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useAuthStore = defineStore({
|
export const useAuthStore = defineStore({
|
||||||
@@ -20,10 +21,19 @@ export const useAuthStore = defineStore({
|
|||||||
return {
|
return {
|
||||||
token,
|
token,
|
||||||
returnUrl: '',
|
returnUrl: '',
|
||||||
|
LeftDrawer:false,
|
||||||
currentDomain: JSON.parse(localStorage.getItem('currentDomain')||"{}")
|
currentDomain: JSON.parse(localStorage.getItem('currentDomain')||"{}")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getters:{
|
||||||
|
toggleLeftDrawer():boolean{
|
||||||
|
return this.LeftDrawer;
|
||||||
|
}
|
||||||
|
},
|
||||||
actions: {
|
actions: {
|
||||||
|
toggleLeftMenu(){
|
||||||
|
this.LeftDrawer=!this.LeftDrawer;
|
||||||
|
},
|
||||||
async login(username:string, password:string) {
|
async login(username:string, password:string) {
|
||||||
const params = new URLSearchParams();
|
const params = new URLSearchParams();
|
||||||
params.append('username', username);
|
params.append('username', username);
|
||||||
|
|||||||
Reference in New Issue
Block a user