| | |
| | | :xs="24" |
| | | :sm="12" |
| | | :md="12" |
| | | :lg="6" |
| | | :xl="6" |
| | | :lg="4" |
| | | :xl="4" |
| | | v-for="(v, k) in homeOne" |
| | | :key="k" |
| | | :class="{ 'home-media home-media-lg': k > 1, 'home-media-sm': k === 1 }" |
| | | > |
| | | <div class="home-card-item flex" > |
| | | <el-button @click="renderMenu">{{v.name}}</el-button> |
| | | <el-button @click="renderMenu(v.id)">{{v.name}}</el-button> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="15" class="home-card-two mb15"> |
| | | <el-col :xs="24" :sm="14" :md="14" :lg="16" :xl="16"> |
| | | <div class="home-card-item"> |
| | | <div style="height: 100%"></div> |
| | | <div style="height: 100%"> |
| | | <el-button @click="renderMenu('6')">{{'应急管理系统'}}</el-button> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="8" class="home-media"> |
| | | <div class="home-card-item"> |
| | | <div style="height: 100%"></div> |
| | | <div style="height: 100%"> |
| | | <el-button @click="renderMenu('7')">{{'目标责任管理系统'}}</el-button> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="15" class="home-card-three"> |
| | | <el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="8"> |
| | | <div class="home-card-item"> |
| | | <el-button @click="renderMenu('8')">{{'事故管理系统'}}</el-button> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="14" :md="14" :lg="16" :xl="16" class="home-media"> |
| | | <div class="home-card-item"> |
| | | <div style="height: 100%"></div> |
| | | <div style="height: 100%"> |
| | | <el-button @click="renderMenu('9')">{{'设备综合管控系统'}}</el-button> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { toRefs, reactive, defineComponent, onMounted, ref, watch, nextTick, onActivated } from 'vue'; |
| | | import * as echarts from 'echarts'; |
| | | import { toRefs, reactive, defineComponent, } from 'vue'; |
| | | import { storeToRefs } from 'pinia'; |
| | | import { useThemeConfig } from '/@/stores/themeConfig'; |
| | | import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes'; |
| | | import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | | import {Session} from "/@/utils/storage"; |
| | | |
| | | import {useUserInfo} from "/@/stores/userInfo"; |
| | | import { Session } from '/@/utils/storage'; |
| | | let global: any = { |
| | | homeChartOne: null, |
| | | homeChartTwo: null, |
| | |
| | | }; |
| | | |
| | | interface stateType { |
| | | projectId:string, |
| | | homeOne: Array <type> |
| | | } |
| | | interface type { |
| | |
| | | export default defineComponent({ |
| | | name: 'home', |
| | | setup() { |
| | | const homeLineRef = ref(); |
| | | const homePieRef = ref(); |
| | | const homeBarRef = ref(); |
| | | const storesTagsViewRoutes = useTagsViewRoutes(); |
| | | const storesThemeConfig = useThemeConfig(); |
| | | const { themeConfig } = storeToRefs(storesThemeConfig); |
| | | const { isTagsViewCurrenFull } = storeToRefs(storesTagsViewRoutes); |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({ |
| | | projectId:'', |
| | | homeOne:[{id:1,name:'系统1'},{id:2,name:'系统2'},{id:3,name:'系统4'},{id:4,name:'系统4'}], |
| | | homeOne:[{id:1,name:'基础数据权限管理系统'},{id:2,name:'双重预防系统'},{id:3,name:'系统2'},{id:4,name:'系统3'},{id:5,name:'系统4'}], |
| | | }); |
| | | // 折线图 |
| | | const renderMenu = async() => { |
| | | state.projectId = '1' |
| | | Session.set('projectId','1') |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |
| | | userInfos.value.projectId = value |
| | | await initBackEndControlRoutes(); |
| | | }; |
| | | return { |