联调承载能力评估 绘制 谐波普测管理
This commit is contained in:
@@ -1,23 +1,26 @@
|
||||
<template>
|
||||
<div class="point-tree">
|
||||
<el-input
|
||||
v-model="input"
|
||||
style="width: 240px"
|
||||
placeholder="请输入电站数"
|
||||
class="mr10"
|
||||
@input="handleEdit"
|
||||
></el-input>
|
||||
<el-button type="primary" :disabled="!input.length > 0" icon="el-icon-Operation" @click="Tick">
|
||||
按配置勾选
|
||||
</el-button>
|
||||
<div v-if="defaultProps.disabled != 'flag'">
|
||||
<el-input
|
||||
v-model="input"
|
||||
style="width: 240px"
|
||||
clearable
|
||||
placeholder="请输入电站数"
|
||||
class="mr10"
|
||||
@input="handleEdit"
|
||||
></el-input>
|
||||
<el-button type="primary" :disabled="!input.length > 0" icon="el-icon-Operation" @click="Tick">
|
||||
按配置勾选
|
||||
</el-button>
|
||||
</div>
|
||||
<el-tree
|
||||
:disabled="disabled"
|
||||
style="height: 550px; overflow-y: auto; overflow-x: hidden"
|
||||
:data="tree"
|
||||
ref="treeRef"
|
||||
show-checkbox
|
||||
default-expand-all
|
||||
node-key="id"
|
||||
:default-expanded-keys="[2, 3]"
|
||||
:default-checked-keys="[5]"
|
||||
:props="defaultProps"
|
||||
/>
|
||||
</div>
|
||||
@@ -26,35 +29,46 @@
|
||||
<script lang="ts" setup>
|
||||
import { nextTick, onMounted, ref, useAttrs } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { initDetpStataionTree } from '@/api/process-boot/generalTest'
|
||||
|
||||
import { useConfig } from '@/stores/config'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { initDetpStataionTree, querySubStatation, addPlan } from '@/api/process-boot/generalTest'
|
||||
|
||||
const emit = defineEmits(['tactics'])
|
||||
const attrs = useAttrs()
|
||||
const defaultProps = {
|
||||
const defaultProps = ref({
|
||||
label: 'name',
|
||||
value: 'id'
|
||||
}
|
||||
value: 'id',
|
||||
disabled: 'disabled'
|
||||
})
|
||||
const dictData = useDictData()
|
||||
const config = useConfig()
|
||||
const disabled = ref(false)
|
||||
const tree = ref()
|
||||
const treeRef = ref()
|
||||
const input: any = ref('')
|
||||
|
||||
const loadData = () => {
|
||||
let nodeKey = ''
|
||||
|
||||
initDetpStataionTree({ orgId: dictData.state.area[0].id }).then(res => {
|
||||
tree.value = res.data
|
||||
})
|
||||
}
|
||||
const handleEdit = () => {}
|
||||
// 配置
|
||||
const Tick = () => {}
|
||||
const tactics = (deptId, grade) => {
|
||||
emit('tactics', deptId, grade)
|
||||
const Tick = () => {
|
||||
querySubStatation({ statetionNum: input.value }).then(res => {
|
||||
setKey(res.data.subIds)
|
||||
ElMessage.success('配置成功')
|
||||
})
|
||||
}
|
||||
// 设置多选
|
||||
const setKey = (key: any, text?: string) => {
|
||||
treeRef.value!.setCheckedKeys(key, false)
|
||||
if (text == '查看计划' || text == '计划审核') {
|
||||
defaultProps.value.disabled = 'flag'
|
||||
} else {
|
||||
defaultProps.value.disabled = 'disabled'
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ treeRef, setKey, loadData })
|
||||
loadData()
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user