Procházet zdrojové kódy

158分站显示全部,5.5首页风量监测修改-提交

lxh před 3 dny
rodič
revize
81ffd16fe1

+ 5 - 3
src/views/vent/home/colliery/components/wind-monitor.vue

@@ -54,7 +54,7 @@ function getOption() {
         containLabel: true,
         left: 30,
         right: 30,
-        bottom: 30,
+        bottom: echartData.xdata.length > 10 ? 30 : 15,
         top: 40,
       },
 
@@ -220,10 +220,12 @@ function getOption() {
           zlevel: -1,
         },
       ],
-      dataZoom: [{ // 这部分是关键
+      dataZoom: [{
+        // 这部分是关键
+        show: echartData.xdata.length > 10 ? true : false,
         type: 'slider', // 这里可以选择你需要的类型,例如 'inside'
         start: 0, // 数据窗口范围的起始百分比
-        end: 25, // 数据窗口范围的结束百分比
+        end: echartData.xdata.length > 10 && echartData.xdata.length < 20 ? 50 : echartData.xdata.length > 20 ? 25 : 100, // 数据窗口范围的结束百分比
         height: 10, // 设置缩放条高度
         left: 'center',
         bottom: 25,

+ 13 - 13
src/views/vent/safetyList/common/detail.vue

@@ -453,7 +453,7 @@ function onChangeTab(tab) {
     if (activeKey.value == 'device') {
         clearTimeout(timer1)
         getSubStationList()
-        getStationList1()
+        getStationList1({ subId: stationId.value, pageNo: pagination.current, pageSize: pagination.pageSize, })
     } else {
         getSubStationList()
         getStationList()
@@ -659,7 +659,7 @@ function cardClick(item, index) {
     stationStatus.value = item.linkstatus
     stationId.value = item.id
     isShow.value = true
-    getStationList1()
+    getStationList1({ subId: stationId.value, pageNo: pagination.current, pageSize: pagination.pageSize, })
 }
 //分站站点名称编辑
 function changeName(val) {
@@ -675,9 +675,9 @@ function changeStatus(val) {
     getChangeStation()
 }
 //获取详细信息列表
-async function getStationList1() {
-    // let res = await getList({ subId: stationId.value, pageNo: pagination.current, pageSize: pagination.pageSize, })
-    let res = await getList({ pageNo: pagination.current, pageSize: pagination.pageSize, })
+async function getStationList1(param) {
+    let res = await getList(param)
+    // let res = await getList({ pageNo: pagination.current, pageSize: pagination.pageSize, })
     res.forEach(el => {
         el.key = el.id
         el.linkIdC = el.linkId || ''
@@ -704,7 +704,7 @@ async function getStationList1() {
 function getAllShow(){
     pagination.current = 1
     stationId.value=''
-    getStationList1()
+    getStationList1({ pageNo: pagination.current, pageSize: pagination.pageSize,})
 }
 //启动新设备
 function handlerunDeviceMonitor(record, val) {
@@ -800,7 +800,7 @@ function debugClick(record) {
 async function stopDebug() {
     let res = await updateDebugStatus({ stationId: debugStationId.value, deviceId: debugDeviceId.value, debugFlag: '0' })
     if (res) {
-        getStationList1()
+        getStationList1({ subId: stationId.value, pageNo: pagination.current, pageSize: pagination.pageSize, })
     }
     // if (debugFlag.value == 'station') {
     //     let res = await updateDebugStatus({ stationId: debugStationId.value, debugFlag: '0' })
@@ -813,7 +813,7 @@ async function stopDebug() {
 async function handleOk() {
     let res = await runDeviceMonitor({ devId: devId.value, devName: startupData.address })
     visibleModal.value = false
-    getStationList1()
+    getStationList1({ subId: stationId.value, pageNo: pagination.current, pageSize: pagination.pageSize, })
 }
 function handleCancel() {
     visibleModal.value = false
@@ -825,12 +825,12 @@ async function handleOkEdit() {
         let res = await update158DevName({ subId: devId.value, devName: startupDataEdit.address })
         console.log(res, '设备名称编辑---')
         visibleModalEdit.value = false
-        getStationList1()
+        getStationList1({ subId: stationId.value, pageNo: pagination.current, pageSize: pagination.pageSize, })
     } else {
         let res = await update158DevName({ devId: devId.value, devName: startupDataEdit.address })
         console.log(res, '设备名称编辑---')
         visibleModalEdit.value = false
-        getStationList1()
+        getStationList1({ subId: stationId.value, pageNo: pagination.current, pageSize: pagination.pageSize, })
     }
 }
 //取消编辑
@@ -843,7 +843,7 @@ async function handleOkDebug() {
     let res = await updateDebugStatus({ stationId: debugStationId.value, deviceId: debugDeviceId.value, speed: startupDataDebug.speed, direction: startupDataDebug.direction, debugFlag: '1' })
     if (res) {
         visibleModalDebug.value = false
-        getStationList1()
+        getStationList1({ subId: stationId.value, pageNo: pagination.current, pageSize: pagination.pageSize, })
     }
     // if (debugFlag.value == 'station') {
     //     let res = await updateDebugStatus({ stationId: debugStationId.value, speed: startupDataDebug.speed, direction: startupDataDebug.direction, debugFlag: '1' })
@@ -873,12 +873,12 @@ function handleCancelDebug() {
 function pageChange(val) {
     pagination.current = val.current;
     pagination.pageSize = val.pageSize;
-    getStationList1()
+    getStationList1({ subId: stationId.value, pageNo: pagination.current, pageSize: pagination.pageSize, })
 }
 
 onMounted(() => {
     getSubStationList()
-    getStationList1()
+    getStationList1({ subId: stationId.value, pageNo: pagination.current, pageSize: pagination.pageSize, })
 })
 onUnmounted(() => {
     if (timer) {