| | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { toRefs, reactive, defineComponent, } from 'vue'; |
| | | import { toRefs, reactive, defineComponent, onMounted } from 'vue'; |
| | | import { storeToRefs } from 'pinia'; |
| | | import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | | import {useUserInfo} from "/@/stores/userInfo"; |
| | | import { useUserInfo } from '/@/stores/userInfo'; |
| | | import { Session } from '/@/utils/storage'; |
| | | import { NextLoading } from '/@/utils/loading'; |
| | | let global: any = { |
| | | homeChartOne: null, |
| | | homeChartTwo: null, |
| | | homeCharThree: null, |
| | | dispose: [null, '', undefined], |
| | | dispose: [null, '', undefined] |
| | | }; |
| | | |
| | | interface stateType { |
| | | homeOne: Array <type> |
| | | homeOne: Array<type>; |
| | | } |
| | | interface type { |
| | | id:number, |
| | | name: string |
| | | id: number; |
| | | name: string; |
| | | } |
| | | export default defineComponent({ |
| | | name: 'home', |
| | | setup() { |
| | | const userInfo = useUserInfo() |
| | | const userInfo = useUserInfo(); |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({ |
| | | homeOne:[{id:1,name:'基础数据权限管理系统'},{id:2,name:'双重预防系统'},{id:3,name:'系统2'},{id:4,name:'系统3'},{id:5,name:'系统4'}], |
| | | homeOne: [ |
| | | { id: 1, name: '基础数据权限管理系统' }, |
| | | { id: 2, name: '双重预防系统' }, |
| | | { id: 3, name: '系统2' }, |
| | | { id: 4, name: '系统3' }, |
| | | { id: 5, name: '系统4' } |
| | | ] |
| | | }); |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |
| | | userInfos.value.projectId = value |
| | | Session.set('projectId', value); |
| | | userInfos.value.projectId = value; |
| | | await initBackEndControlRoutes(); |
| | | }; |
| | | onMounted(() => { |
| | | // loginBg(); |
| | | // loginApp() |
| | | }); |
| | | return { |
| | | renderMenu, |
| | | ...toRefs(state), |
| | | ...toRefs(state) |
| | | }; |
| | | }, |
| | | } |
| | | }); |
| | | </script> |
| | | |