|
@ -121,6 +121,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script lang="ts"> |
|
|
<script lang="ts"> |
|
|
|
|
|
import { message } from 'ant-design-vue'; |
|
|
import type { TreeSelectProps, SelectProps } from 'ant-design-vue'; |
|
|
import type { TreeSelectProps, SelectProps } from 'ant-design-vue'; |
|
|
import { defineComponent, ref, onMounted, inject, onUnmounted } from 'vue'; |
|
|
import { defineComponent, ref, onMounted, inject, onUnmounted } from 'vue'; |
|
|
import dayjs, { Dayjs } from 'dayjs'; |
|
|
import dayjs, { Dayjs } from 'dayjs'; |
|
@ -276,9 +277,24 @@ |
|
|
keyV = key; |
|
|
keyV = key; |
|
|
} |
|
|
} |
|
|
if (activeKey.value == '1') { |
|
|
if (activeKey.value == '1') { |
|
|
getSelectGraph(keyV); |
|
|
if (checkedKeys.value.length == 0) { |
|
|
|
|
|
message.warning(mode.value == '0' ? '请先选择设备!' : '请先选择节点!'); |
|
|
|
|
|
pageData.graphTableList = []; |
|
|
|
|
|
pageData.graphTableColumns = []; |
|
|
|
|
|
pageData.graphGraphList = []; |
|
|
|
|
|
return; |
|
|
|
|
|
} else { |
|
|
|
|
|
getSelectGraph(keyV); |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
getSelectAnalyse(keyV); |
|
|
if (checkedKeys.value.length == 0) { |
|
|
|
|
|
message.warning(mode.value == '0' ? '请先选择设备!' : '请先选择节点!'); |
|
|
|
|
|
pageData.analysisTableList = []; |
|
|
|
|
|
pageData.analysisGraphList = []; |
|
|
|
|
|
return; |
|
|
|
|
|
} else { |
|
|
|
|
|
getSelectAnalyse(keyV); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
@ -293,7 +309,12 @@ |
|
|
// return; |
|
|
// return; |
|
|
// } |
|
|
// } |
|
|
} |
|
|
} |
|
|
|
|
|
if (checkedKeys.value.length == 0) { |
|
|
|
|
|
pageData.graphTableList = []; |
|
|
|
|
|
pageData.graphTableColumns = []; |
|
|
|
|
|
pageData.graphGraphList = []; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
let startTime = ''; |
|
|
let startTime = ''; |
|
|
let endTime = ''; |
|
|
let endTime = ''; |
|
|
if (startDate.value && endDate.value) { |
|
|
if (startDate.value && endDate.value) { |
|
@ -369,6 +390,11 @@ |
|
|
// return; |
|
|
// return; |
|
|
// } |
|
|
// } |
|
|
} |
|
|
} |
|
|
|
|
|
if (checkedKeys.value.length == 0) { |
|
|
|
|
|
pageData.analysisTableList = []; |
|
|
|
|
|
pageData.analysisGraphList = []; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
let startTime = ''; |
|
|
let startTime = ''; |
|
|
let endTime = ''; |
|
|
let endTime = ''; |
|
|
if (startDateAnalyse.value != endDateAnalyse.value) { |
|
|
if (startDateAnalyse.value != endDateAnalyse.value) { |
|
@ -460,8 +486,8 @@ |
|
|
let a: TreeSelectProps['treeData'] = [{ title: label, key: val, children: records }]; |
|
|
let a: TreeSelectProps['treeData'] = [{ title: label, key: val, children: records }]; |
|
|
treeData2.value = a; |
|
|
treeData2.value = a; |
|
|
expandedKeys.value = [val]; |
|
|
expandedKeys.value = [val]; |
|
|
checkedKeys.value.push(records[0].deviceCode, records[1].deviceCode); |
|
|
// checkedKeys.value.push(records[0].deviceCode, records[1].deviceCode); |
|
|
getSelect(null); |
|
|
// getSelect(null); |
|
|
}) |
|
|
}) |
|
|
.finally(() => { |
|
|
.finally(() => { |
|
|
treeLoading.value = false; |
|
|
treeLoading.value = false; |
|
@ -478,10 +504,11 @@ |
|
|
treeData2.value = formatTreeData(res.data); |
|
|
treeData2.value = formatTreeData(res.data); |
|
|
|
|
|
|
|
|
expandedKeys.value = getAllKeys(treeData2.value); |
|
|
expandedKeys.value = getAllKeys(treeData2.value); |
|
|
if (treeData2.value?.length >= 2) { |
|
|
// if (treeData2.value?.length >= 2) { |
|
|
checkedKeys.value.push(treeData2.value[0].key, treeData2.value[1].key); |
|
|
// checkedKeys.value.push(treeData2.value[0].key, treeData2.value[1].key); |
|
|
getSelect(null); |
|
|
// getSelect(null); |
|
|
} |
|
|
// } |
|
|
|
|
|
// getSelect(null); |
|
|
}) |
|
|
}) |
|
|
.finally(() => { |
|
|
.finally(() => { |
|
|
treeLoading.value = false; |
|
|
treeLoading.value = false; |
|
|