完成承载能力评估联调
This commit is contained in:
@@ -2,16 +2,17 @@
|
||||
<div>
|
||||
<splitpanes :style="{ height: height }" class="default-theme" id="navigation-splitpanes">
|
||||
<pane :size="size">
|
||||
<PointTree
|
||||
<bearingTree
|
||||
ref="TreeRef"
|
||||
:default-expand-all="false"
|
||||
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
||||
:current-node-key="monitoringPoint.state.lineId"
|
||||
@node-click="handleNodeClick"
|
||||
@init="handleNodeClick"
|
||||
></PointTree>
|
||||
></bearingTree>
|
||||
</pane>
|
||||
<pane style="background: #fff">
|
||||
<el-form :inline="true">
|
||||
<el-form :inline="true" v-show="props.rowList.id == undefined">
|
||||
<el-form-item label="日期">
|
||||
<DatePicker ref="datePickerRef"></DatePicker>
|
||||
</el-form-item>
|
||||
@@ -33,6 +34,7 @@
|
||||
placeholder="请选择待评估用户"
|
||||
size="small"
|
||||
filterable
|
||||
:disabled="props.rowList.id != undefined"
|
||||
style="width: 240px"
|
||||
value-key="id"
|
||||
@change="userChange"
|
||||
@@ -118,7 +120,12 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-button type="primary" icon="el-icon-Document" @click="assess" v-show="showBtn">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-Document"
|
||||
@click="assess"
|
||||
v-show="showBtn && props.rowList.id == undefined"
|
||||
>
|
||||
承载能力评估
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -127,11 +134,12 @@
|
||||
</splitpanes>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, provide } from 'vue'
|
||||
import 'splitpanes/dist/splitpanes.css'
|
||||
import { Splitpanes, Pane } from 'splitpanes'
|
||||
import PointTree from '@/components/tree/pqs/loadBearingTree.vue'
|
||||
import bearingTree from '@/components/tree/pqs/bearingTree.vue'
|
||||
import DatePicker from '@/components/form/datePicker/index.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||
@@ -151,8 +159,9 @@ import {
|
||||
getLineDetailData
|
||||
} from '@/api/advance-boot/bearingCapacity'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const props = defineProps(['rowList'])
|
||||
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const size = ref(0)
|
||||
const dictData = useDictData()
|
||||
const datePickerRef = ref()
|
||||
@@ -189,11 +198,12 @@ const tableData = ref([
|
||||
level4: '/'
|
||||
}
|
||||
])
|
||||
const TreeRef = ref()
|
||||
const voltageList: any = ref([])
|
||||
const showAssess = ref(false)
|
||||
const showBtn = ref(false)
|
||||
const flag = ref(true)
|
||||
const loading = ref(true)
|
||||
const loading = ref(false)
|
||||
const user = ref('')
|
||||
const userList: any = ref([])
|
||||
const lineList: any = ref([])
|
||||
@@ -245,9 +255,9 @@ const onSubmit = async () => {
|
||||
loading.value = true
|
||||
|
||||
let form = {
|
||||
endTime: datePickerRef.value.timeValue[1],
|
||||
lineId: dotList.value.id,
|
||||
startTime: datePickerRef.value.timeValue[0],
|
||||
endTime: props.rowList.endTime || datePickerRef.value.timeValue[1],
|
||||
lineId: props.rowList.lineId || dotList.value.id,
|
||||
startTime: props.rowList.startTime || datePickerRef.value.timeValue[0],
|
||||
userId: dictData.state.area[0].id
|
||||
}
|
||||
options1.value = {}
|
||||
@@ -276,13 +286,17 @@ const onSubmit = async () => {
|
||||
setEChart(3, res[2].data.data)
|
||||
showBtn.value = true
|
||||
loading.value = false
|
||||
// props.rowList.id != undefined
|
||||
if (props.rowList.id != undefined) {
|
||||
rendering(props.rowList)
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
// 用户变化
|
||||
const userChange = e => {
|
||||
const userChange = (e: any) => {
|
||||
userData.value = e
|
||||
}
|
||||
|
||||
@@ -351,6 +365,24 @@ const assess = () => {
|
||||
if (dotList.value.level != 6) {
|
||||
return ElMessage.warning('请选择线路')
|
||||
}
|
||||
|
||||
carryCapacityCal({
|
||||
endTime: datePickerRef.value.timeValue[1],
|
||||
lineId: dotList.value.id,
|
||||
startTime: datePickerRef.value.timeValue[0],
|
||||
userId: userData.value.userId, //dictData.state.area[0].id,
|
||||
i_βmax: i_βmax.value,
|
||||
p_βminMap: p_βminMap.value,
|
||||
q_βminMap: q_βminMap.value,
|
||||
s_T: lineList.value.standardCapacity,
|
||||
s_pv: userData.value.protocolCapacity,
|
||||
scale: userData.value.voltage,
|
||||
stringMap: stringMap.value
|
||||
}).then((res: any) => {
|
||||
rendering(res.data)
|
||||
})
|
||||
}
|
||||
const rendering = (data: any) => {
|
||||
let ChartsList = [
|
||||
{
|
||||
name: '安全',
|
||||
@@ -373,27 +405,12 @@ const assess = () => {
|
||||
value: 0
|
||||
}
|
||||
]
|
||||
carryCapacityCal({
|
||||
endTime: datePickerRef.value.timeValue[1],
|
||||
lineId: dotList.value.id,
|
||||
startTime: datePickerRef.value.timeValue[0],
|
||||
userId: userData.value.userId, //dictData.state.area[0].id,
|
||||
i_βmax: i_βmax.value,
|
||||
p_βminMap: p_βminMap.value,
|
||||
q_βminMap: q_βminMap.value,
|
||||
s_T: lineList.value.standardCapacity,
|
||||
s_pv: userData.value.protocolCapacity,
|
||||
scale: userData.value.voltage,
|
||||
stringMap: stringMap.value
|
||||
}).then(res => {
|
||||
tableData.value[0][`level` + res.data.utlevel] = 1
|
||||
tableData.value[1][`level` + res.data.pfTLevel] = 1
|
||||
tableData.value[2][`level` + res.data.btlevel] = 1
|
||||
tableData.value[3][`level` + res.data.ilevel] = 1
|
||||
ChartsList[res.data.reslutLevel - 1].value = 1
|
||||
showAssess.value = true
|
||||
})
|
||||
|
||||
tableData.value[0][`level` + data.utlevel] = 1
|
||||
tableData.value[1][`level` + data.pfTLevel] = 1
|
||||
tableData.value[2][`level` + data.btlevel] = 1
|
||||
tableData.value[3][`level` + data.ilevel] = 1
|
||||
ChartsList[data.reslutLevel - 1].value = 1
|
||||
showAssess.value = true
|
||||
pieCharts.value = {
|
||||
title: {
|
||||
text: '承载能力评估结果',
|
||||
@@ -435,7 +452,7 @@ const assess = () => {
|
||||
}
|
||||
// 下载模版
|
||||
const exportTemplate = () => {
|
||||
getExcelTemplate().then(res => {
|
||||
getExcelTemplate().then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||
})
|
||||
@@ -474,9 +491,14 @@ const handleNodeClick = (data: any, node: any) => {
|
||||
lineList.value = res.data
|
||||
})
|
||||
}
|
||||
if (flag.value) {
|
||||
// if (flag.value) {
|
||||
// onSubmit()
|
||||
// flag.value = false
|
||||
// }
|
||||
|
||||
if (props.rowList.userId != undefined) {
|
||||
TreeRef.value.setKey(props.rowList.lineId)
|
||||
onSubmit()
|
||||
flag.value = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user