多监测点修改
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
<div style="flex: 1; overflow: hidden">
|
||||
<Tree ref="c" :data="tree" style="width: 100%; height: 100%" :canExpand="false" v-bind="$attrs" />
|
||||
<Tree ref="treeRef" :data="tree" style="width: 100%; height: 100%" :canExpand="false" v-bind="$attrs" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -37,7 +37,7 @@ const dictData = useDictData()
|
||||
const config = useConfig()
|
||||
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
|
||||
const tree = ref()
|
||||
const treRef = ref()
|
||||
const treeRef = ref()
|
||||
const formData = ref({
|
||||
deptIndex: adminInfo.$state.deptIndex,
|
||||
monitorFlag: 2,
|
||||
@@ -48,10 +48,10 @@ const formData = ref({
|
||||
statisticalType: classificationData[2].id,
|
||||
scale: null
|
||||
})
|
||||
const loadData = (val: string) => {
|
||||
const loadData = () => {
|
||||
let obj = classificationData.find(function (i) {
|
||||
return i.id === formData.value.statisticalType
|
||||
})
|
||||
}) || { code: '' }
|
||||
let form = JSON.parse(JSON.stringify(formData.value))
|
||||
form.statisticalType = classificationData.find((item: any) => item.id == form.statisticalType)
|
||||
let nodeKey = ''
|
||||
@@ -84,6 +84,7 @@ const loadData = (val: string) => {
|
||||
nodeKey = item5.id
|
||||
emit('init', item5)
|
||||
}
|
||||
item5.alias = `${item.name}>${item2.name}>${item3.name}>${item4.name}>${item5.name}`
|
||||
item5.icon = 'fa-solid fa-location-dot'
|
||||
item5.color = config.getColorVal('elementUiPrimary')
|
||||
if (item5.comFlag === 0) {
|
||||
@@ -101,8 +102,8 @@ const loadData = (val: string) => {
|
||||
tree.value = res.data
|
||||
if (nodeKey) {
|
||||
nextTick(() => {
|
||||
treRef.value.treeRef.setCurrentKey(nodeKey)
|
||||
treRef.value.treeRef.setExpandedKeys(nodeKey)
|
||||
treeRef.value.treeRef.setCurrentKey(nodeKey)
|
||||
treeRef.value.treeRef.setExpandedKeys(nodeKey)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user