绘制并联调icd文件管理页面
绘制并联调终端型号管理页面
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
v-bind="defaultAttribute"
|
||||
:data="treeData"
|
||||
show-overflow
|
||||
:tree-config="{ transform: true, parentField: 'uPid',rowField:'uId' }"
|
||||
:tree-config="{ transform: true, parentField: 'uPid', rowField: 'uId' }"
|
||||
:scroll-y="{ enabled: true }"
|
||||
>
|
||||
<vxe-column field="name" align="left" title="电网拓扑" min-width="200" tree-node></vxe-column>
|
||||
@@ -182,8 +182,9 @@ import TableStore from '@/utils/tableStore'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { getTerminalUpLog } from '@/api/device-boot/Business.ts'
|
||||
import { getTerminalUpLog } from '@/api/device-boot/Business'
|
||||
import XEUtils from 'xe-utils'
|
||||
import { getDevTypeList } from '@/api/device-boot/modelManage'
|
||||
import { debounce } from 'lodash-es'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
defineOptions({
|
||||
@@ -193,7 +194,7 @@ defineOptions({
|
||||
const pageHeight = mainHeight(83)
|
||||
const dialogHeight = mainHeight(300)
|
||||
const dictData = useDictData()
|
||||
const teriminaloption: any = dictData.getBasicData('Dev_Type')
|
||||
const teriminaloption: any = ref([])
|
||||
const teriminalstatusoption = ref([
|
||||
{ name: '全部', id: '' },
|
||||
{ name: '投运', id: 0 },
|
||||
@@ -256,16 +257,14 @@ tableStore.table.params.searchEvent = ''
|
||||
tableStore.table.params.filterName = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
|
||||
|
||||
const tree2List = (list: any, id: any) => {
|
||||
//存储结果的数组
|
||||
let arr: any = []
|
||||
// 遍历 tree 数组
|
||||
list.forEach((item: any) => {
|
||||
item.uPid = id
|
||||
item.uId = (Math.random() * 1000)
|
||||
|
||||
item.uId = Math.random() * 1000
|
||||
|
||||
// 判断item是否存在children
|
||||
if (!item.children) return arr.push(item)
|
||||
// 函数递归,对children数组进行tree2List的转换
|
||||
@@ -280,10 +279,12 @@ const tree2List = (list: any, id: any) => {
|
||||
return arr
|
||||
}
|
||||
|
||||
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.searchState = 0
|
||||
onMounted(() => {
|
||||
getDevTypeList().then(res => {
|
||||
teriminaloption.value = res.data
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
const add = () => {}
|
||||
@@ -316,7 +317,7 @@ const format = (percentage: any) => {
|
||||
const formFilter = (row: any) => {
|
||||
let title = '/'
|
||||
if (row.cellValue != null) {
|
||||
teriminaloption.forEach((item: any) => {
|
||||
teriminaloption.value.forEach((item: any) => {
|
||||
if (item.id == row.cellValue) {
|
||||
title = item.name
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user