| | |
| | | backgroundImage: `url(${backgroundImage})`, |
| | | backgroundRepeat: 'no-repeat', |
| | | backgroundPosition: 'center center', |
| | | backgroundSize: 'cover' |
| | | backgroundSize: 'cover', |
| | | }" |
| | | > |
| | | <!--头部--> |
| | | <app-header class="absolute z-[100] top-0 left-0 right-0" :selected-id="currentProjectId" @onHomeClick="switchView" /> |
| | | |
| | | |
| | | <app-header class="absolute z-[100] top-0 left-0 right-0" :selected-id="currentProjectId" @onHomeClick="switchView" @onSelectChange="onSelectChange" /> |
| | | |
| | | <!--页面内容--> |
| | | <div class="content-wrapper px-[22px] py-[10px] absolute inset-0 top-[80px] flex gap-[20px]"> |
| | |
| | | <div class="flex-1 min-w-0"> |
| | | <!-- 中间模块 --> |
| | | <div class="w-full h-full"> |
| | | <equipment-view v-if="isReady"/> |
| | | <equipment-view :selected-id="selectedId" v-if="isReady" /> |
| | | </div> |
| | | </div> |
| | | <div class="w-[1080px]"> |
| | |
| | | |
| | | <!--multiverse渲染容器 |
| | | <div id="renderDom" class="absolute z-[40] top-0 bottom-0 left-0 right-0 w-full h-full"></div>--> |
| | | |
| | | |
| | | </main> |
| | | </template> |
| | | |
| | |
| | | name: "Dashboard", |
| | | components: { |
| | | "app-header": Header, |
| | | "Home": Home, |
| | | Home: Home, |
| | | "project-view": ProjectView, |
| | | "equipment-view": EquipmentView |
| | | "equipment-view": EquipmentView, |
| | | }, |
| | | data() { |
| | | return { |
| | | backgroundImage: new URL('@/assets/images/backgrounds/screen.png', import.meta.url).href, |
| | | currentProjectId: '1c179617-a7d9-4243-b813-84fa55a17ce7', |
| | | backgroundImage: new URL("@/assets/images/backgrounds/screen.png", import.meta.url).href, |
| | | currentProjectId: "1c179617-a7d9-4243-b813-84fa55a17ce7", |
| | | isReady: false, |
| | | clickTab:'home', |
| | | iframeSrc: window.ProjectConfig.xieTongIframeSrc |
| | | clickTab: "home", |
| | | iframeSrc: window.ProjectConfig.xieTongIframeSrc, |
| | | selectedId: "", |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters("common", []) |
| | | ...mapGetters("common", []), |
| | | }, |
| | | watch: { |
| | | }, |
| | | watch: {}, |
| | | mounted() { |
| | | this.getLoginInfo(); |
| | | }, |
| | |
| | | this.resetEngineRelated(); |
| | | }, |
| | | methods: { |
| | | onSelectChange(val) { |
| | | this.selectedId = val; |
| | | console.log("onSelectChange", val); |
| | | }, |
| | | /** |
| | | * 切换视图 |
| | | * @param val |
| | | */ |
| | | switchView(val){ |
| | | switch (val){ |
| | | case 'xietong': |
| | | window.open(window.ProjectConfig.xieTongIframeSrc, '_blank'); |
| | | case "xietong": |
| | | window.open(window.ProjectConfig.xieTongIframeSrc, "_blank"); |
| | | break; |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | getLoginInfo() { |
| | | this.isReady = true |
| | | this.isReady = true; |
| | | const data = { |
| | | "UserName": "JSC", |
| | | "Password": "JSC@jsc123", |
| | | "IfSingleLogin": "", |
| | | } |
| | | HomeAPI.WhLogin(data).then(res => { |
| | | UserName: "JSC", |
| | | Password: "JSC@jsc123", |
| | | IfSingleLogin: "", |
| | | }; |
| | | HomeAPI.WhLogin(data).then((res) => { |
| | | console.log(res); |
| | | if(res.Ret === 1) { |
| | | const result = res.Data |
| | | window.localStorage.setItem("token", result.token) |
| | | const result = res.Data; |
| | | window.localStorage.setItem("token", result.token); |
| | | console.log(result); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | |