| | |
| | | <el-skeleton :loading="loading" animated> |
| | | <div id="app"> |
| | | <div class="card" v-for="(item, index) in appList" :key="`dynamics-${index}`"> |
| | | <div @click="gotoApp(item)"> |
| | | <div> |
| | | <img class="card-left" :src="item.icon"/> |
| | | <div class="card-right"> |
| | | <div class="app-title"> |
| | | {{ item.appName }} |
| | | </div> |
| | | <div class="goto-app"> |
| | | <div>进入系统</div> |
| | | <div class="goto-app" @click="gotoApp(item)"> |
| | | <div>进入应用</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | import * as AppApi from '@/api/system/app' |
| | | import {Apps} from "@/views/Home/types"; |
| | | import {CACHE_KEY, useCache} from "@/hooks/web/useCache"; |
| | | import {CACHE_KEY, useCache, useSessionCache} from "@/hooks/web/useCache"; |
| | | |
| | | |
| | | defineOptions({name: 'Home'}) |
| | | |
| | | const {wsCache} = useCache() |
| | | const {wsSessionCache} = useSessionCache() |
| | | |
| | | const loading = ref(true) |
| | | |
| | |
| | | const getAppMenuList = async (id, appCode) => { |
| | | const data = await AppApi.getAppMenuList(id) |
| | | let userInfo = wsCache.get(CACHE_KEY.USER) |
| | | userInfo.menus = data |
| | | // userInfo.menus = data |
| | | wsCache.set(CACHE_KEY.USER, userInfo) |
| | | wsCache.set(CACHE_KEY.ROLE_ROUTERS, data) |
| | | window.location.href = '/plat/index' |
| | | wsSessionCache.set(CACHE_KEY.ROLE_ROUTERS, data) |
| | | window.location.href = import.meta.env.VITE_BASE_PATH + 'index' |
| | | } |
| | | |
| | | const getAllApi = async () => { |
| | |
| | | const gotoApp = async (item) => { |
| | | let path = window.location.pathname |
| | | let appName = path.split("/")[0] |
| | | console.log(appName) |
| | | let id = item.id |
| | | let type = item.type |
| | | let appCode = item.appCode |
| | |
| | | // let userInfo = wsCache.get(CACHE_KEY.USER) |
| | | // userInfo.menus = data |
| | | // wsCache.set(CACHE_KEY.USER, userInfo) |
| | | // wsCache.set(CACHE_KEY.ROLE_ROUTERS, data) |
| | | // wsSessionCache.set(CACHE_KEY.ROLE_ROUTERS, data) |
| | | localStorage.setItem(appCode, id) |
| | | window.open(item.appDomain + '/index', '_blank') |
| | | // window.open('/plat/shasteel', '_blank') |
| | | // window.location.href = '/plat/shasteel' |
| | |
| | | font-size: 40px; |
| | | color: #282F3D; |
| | | } |
| | | |
| | | #app { |
| | | margin: 0 96px; |
| | | width: 100%; |
| | | } |
| | | |
| | | .card { |
| | | width: 354px; |
| | | height: 200px; |
| | | margin: 0 24px 24px 0; |
| | | background: linear-gradient( 180deg, #E9F0FA 0%, #FFFFFF 100%); |
| | | background: linear-gradient(180deg, #E9F0FA 0%, #FFFFFF 100%); |
| | | border-radius: 12px 12px 12px 12px; |
| | | border: 2px solid; |
| | | border-image: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 1)) 2 2; |
| | | display: inline-block; |
| | | } |
| | | .card > div{ |
| | | display: inline-block; |
| | | } |
| | | .card-left{ |
| | | |
| | | .card-left { |
| | | height: 100px; |
| | | width: 100px; |
| | | float: left; |
| | | margin: 50px 30px; |
| | | } |
| | | |
| | | .card-right { |
| | | float: right; |
| | | margin: 61px 10px; |
| | | } |
| | | |
| | | .app-title { |
| | | width: 162px; |
| | | height: 32px; |
| | | font-family: Microsoft YaHei, Microsoft YaHei; |
| | | font-weight: bold; |
| | | font-size: 24px; |
| | | color: #282F3D; |
| | | } |
| | | |
| | | .goto-app { |
| | | width: 96px; |
| | | height: 35px; |
| | | margin-top: 5px; |
| | | background: #3A99FD; |
| | | border-radius: 80px 80px 80px 80px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .goto-app > div { |
| | | padding: 6px; |
| | | margin-left: 5px; |