Browse Source

Merge remote-tracking branch 'origin/master'

zhangcl 1 week ago
parent
commit
a521dfe4c7

+ 8 - 1
src/views/pms/device/monitor/TdDeviceInfo.vue

@@ -184,7 +184,14 @@ const renderChart = async () => {
     xAxis: {
       type: 'category',
       data: result.value.map(d => dayjs(d.timestamp).format('YYYY-MM-DD HH:mm:ss')),
-      axisLabel: { rotate: 45 },
+      axisLabel: { rotate: 45,
+        interval: function(index, value) {
+          // 将时间字符串转换为分钟数,每60分钟显示一个刻度(1小时)
+          const minutes = dayjs(value).minute();
+          // 只显示整点的刻度(分钟为0)
+          return minutes === 0;
+        }
+      },
       inverse: true,
     },
     yAxis: {

+ 1 - 1
src/views/pms/inspect/order/WriteOrder.vue

@@ -256,7 +256,7 @@ const submitForm = (tabIndex, current, type) => {
     if (type === 'finish') {
       message.success(t('common.createSuccess'))
       delView(unref(currentRoute))
-      push({ name: 'IotInspectOrder', params: {} })
+      //push({ name: 'IotInspectOrder', params: {} })
     }
   } catch (error) {
     ElMessage.error('提交失败,请检查数据')