监测点代码优化
This commit is contained in:
@@ -16,7 +16,8 @@ const props = defineProps(['options'])
|
||||
let chart: echarts.ECharts | any = null
|
||||
const resizeHandler = () => {
|
||||
// 不在视野中的时候不进行resize
|
||||
if(chartRef.value!.offsetHeight == 0) return
|
||||
if (!chartRef.value) return
|
||||
if (chartRef.value.offsetHeight == 0) return
|
||||
chart.getZr().painter.getViewportRoot().style.display = 'none'
|
||||
requestAnimationFrame(() => {
|
||||
chart.resize()
|
||||
|
||||
@@ -103,7 +103,7 @@ const loadData = () => {
|
||||
if (nodeKey) {
|
||||
nextTick(() => {
|
||||
treeRef.value.treeRef.setCurrentKey(nodeKey)
|
||||
treeRef.value.treeRef.setExpandedKeys(nodeKey)
|
||||
// treeRef.value.treeRef.setExpandedKeys(nodeKey)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<Shishishuju />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="monitoring-point" v-if="!monitoringPoint.state.showCheckBox">
|
||||
<div class="monitoring-point" v-if="!monitoringPoint.state.showCheckBox && monitoringPoint.state.lineName">
|
||||
当前位置:{{ monitoringPoint.state.lineName }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -72,7 +72,7 @@ const pointTree = ref()
|
||||
const size = ref(0)
|
||||
const isReload = ref(false)
|
||||
const height = mainHeight(40)
|
||||
const activeName = ref('3')
|
||||
const activeName = ref('1')
|
||||
onMounted(() => {
|
||||
const dom = document.getElementById('navigation-splitpanes')
|
||||
if (dom) {
|
||||
|
||||
@@ -41,6 +41,9 @@ const grade = gradeColor5.map((item, index) => {
|
||||
|
||||
const init = () => {
|
||||
loading.value = true
|
||||
if (!monitoringPoint.state.lineId) {
|
||||
return
|
||||
}
|
||||
formData.id = monitoringPoint.state.lineId
|
||||
formData.searchBeginTime = datePickerRef.value.timeValue[0]
|
||||
formData.searchEndTime = datePickerRef.value.timeValue[1]
|
||||
|
||||
@@ -11,7 +11,7 @@ export default defineConfig({
|
||||
host: '0.0.0.0',
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://192.168.1.81:10215', //数据中心
|
||||
target: 'http://192.168.1.31:10215', //数据中心
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/api/, '') //路径重写,把'/api'替换为''
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user