feat: 新增移动端适配详情

This commit is contained in:
wenhua
2024-06-27 23:35:05 +08:00
parent 8684132fc7
commit a943687afe
13 changed files with 1106 additions and 79 deletions

View File

@@ -16,6 +16,7 @@ import { useTagsView } from '@/stores/tagsview.js'
import { useAuthStore } from '@/stores/userstore.js'
import { useCacheStore } from "@/stores/cache.js";
import { getDeptOpt, getSubCompOpt, getRolesOpt, getJobOpt, getUserDetail } from '@/api/user/user.js'
import { onBeforeMount } from 'vue';
const tagsViewStore = useTagsView()
const authStore = useAuthStore()
@@ -183,22 +184,17 @@ const getInstance = (e) => {
}
const init = async () => {
const { data } = await getDeptOpt()
localData.departmentIdOpt = data
const res = await getSubCompOpt()
localData.subCompanyIdOpt = res.data
const roleRes = await getRolesOpt()
localData.roleOpt = roleRes.data
const jobRes = await getJobOpt()
localData.jobOpt = jobRes.data
// const reqList = [
// getDeptOpt(),
// getSubCompOpt(),
// getRolesOpt(),
// getJobOpt()
// ]
// const resAll = await Promise.all(reqList)
// console.log("🚀 ~ init ~ resAll:", resAll)
const reqList = [
getDeptOpt(),
getSubCompOpt(),
getRolesOpt(),
getJobOpt()
]
const resAll = await Promise.all(reqList)
localData.departmentIdOpt = resAll[0].data
localData.subCompanyIdOpt = resAll[1].data
localData.roleOpt = resAll[2].data
localData.jobOpt = resAll[3].data
}
const getInfo = async () => {
@@ -209,7 +205,9 @@ const getInfo = async () => {
const res = await getDeptOpt({subCompanyId: data.subCompanyId})
localData.departmentIdOpt = res.data
}
form.value.setValues(data)
nextTick(()=>{
form.value.setValues(data)
})
}