Commit efb102d7 authored by zhengke's avatar zhengke

优化首页

parent aa7046b6
...@@ -41,6 +41,7 @@ const isModelStore = useScreenStore() ...@@ -41,6 +41,7 @@ const isModelStore = useScreenStore()
const TempIdStore = useScreenStore() const TempIdStore = useScreenStore()
const { databaseId } = storeToRefs(mainStore) const { databaseId } = storeToRefs(mainStore)
const { screening, market, model, ConfigId } = storeToRefs(useScreenStore()) const { screening, market, model, ConfigId } = storeToRefs(useScreenStore())
const { userInfo } = storeToRefs(userStore())
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
window.onbeforeunload = () => false window.onbeforeunload = () => false
...@@ -48,18 +49,20 @@ if (process.env.NODE_ENV === 'production') { ...@@ -48,18 +49,20 @@ if (process.env.NODE_ENV === 'production') {
const userLoginHandler = async ()=>{ const userLoginHandler = async ()=>{
let param = query() let param = query()
let userId = 1 let userId = 1
let ConfigId = 9117 // 9117 let ConfigId = 0 // 9117
let model = 1 let model = 1
if(param.uid) userId=parseInt(param.uid) if(param.uid) userId=parseInt(param.uid)
if(param.ConfigId) ConfigId=parseInt(param.ConfigId) if(param.ConfigId) ConfigId=parseInt(param.ConfigId)
if(param.model) model=parseInt(param.model) if(param.model) model=parseInt(param.model)
ConfigIdStore.setConfigId(ConfigId) ConfigIdStore.setConfigId(ConfigId)
modelStore.setModel(model) modelStore.setModel(model)
try { if(!userInfo.value.EmployeeId){
await userStore().setUserLoginAsync(userId,ConfigId) try {
if(ConfigId) await GetTripConfig(ConfigId) await userStore().setUserLoginAsync(userId,ConfigId)
} catch (error) { if(ConfigId) await GetTripConfig(ConfigId)
} catch (error) {}
}else{
if(ConfigId) await GetTripConfig(ConfigId)
} }
isFinish.value=true isFinish.value=true
if(!ConfigId&&!model) ElMessageBox.confirm( if(!ConfigId&&!model) ElMessageBox.confirm(
......
<template> <template>
<div style="background: #f3f6fb;height:100vh;"> <div style="background: #f3f6fb;height:100vh;overflow: auto;">
<div style="padding: 30px; max-width:1440px; margin:0 auto;"> <div style="padding: 30px; max-width:1440px; margin:0 auto;">
<el-row justify="space-between"> <el-row justify="space-between">
<el-col :span="6"> <el-col :span="6">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment