终端入网检测选择所属供电公司数据接口更换

This commit is contained in:
zhujiyan
2024-05-21 14:29:18 +08:00
parent f2c90cd134
commit 520b39719f
2 changed files with 9 additions and 2 deletions

View File

@@ -15,6 +15,13 @@ export function getAreaList() {
method: 'POST'
})
}
//获取去所有区域列表
export function getAllDeptList() {
return createAxios({
url: '/user-boot/dept/orgTreeSelector',
method: 'GET'
})
}
// 获取省市区下拉框
export function areaSelect() {
return createAxios({

View File

@@ -822,7 +822,7 @@ import { queryByAllCode } from '@/api/system-boot/dictTree'
import { useAdminInfo } from '@/stores/adminInfo'
import { uploadFile } from '@/api/system-boot/file'
import { addTerminalFormData, getSubstationVoltageLevel } from '@/api/supervision-boot/terminal/index'
import { getAreaList } from '@/api/common'
import { getAllDeptList } from '@/api/common'
const emits = defineEmits(['onSubmit'])
const dictData = useDictData()
const dialogFormVisible = ref(false)
@@ -931,7 +931,7 @@ const adminInfo = useAdminInfo()
const powerCompanyList = ref([])
//获取所属供电公司,区域列表第三层数据
const getPowerCompanyList = async () => {
getAreaList().then(res => {
getAllDeptList().then(res => {
powerCompanyList.value = res.data[0].children[0].children
form.value.powerCompany = powerCompanyList.value[0]?.id
})