Bläddra i källkod

1.历史数据单设备中转换阻力和定反分开展示时,定反的Y轴最小值为0;
2.设备管理3号测力片改为3号测力圈,优化切换无刷新的问题。

git-svn-id: https://202.107.226.68:8443/svn/Services/ResistanceMonitor@60 a05970a1-87b9-9d4f-9ee5-fa77e2ec115b

yinwei 1 år sedan
förälder
incheckning
e00f93632e
3 ändrade filer med 24 tillägg och 15 borttagningar
  1. 1 0
      2.Web/src/chart/force-curve.js
  2. 16 8
      2.Web/src/views/Equipment.vue
  3. 7 7
      2.Web/src/views/Force.vue

+ 1 - 0
2.Web/src/chart/force-curve.js

@@ -240,6 +240,7 @@ function forceOption({
     },
     min: val => {
      if (y_min == 0) return
+     if (coordinate_state) return 0
      if (val.min < y_min) return val.min
      else return y_min
     },

+ 16 - 8
2.Web/src/views/Equipment.vue

@@ -1,9 +1,13 @@
 <template>
  <div class="equipment_box">
   <div class="tool">
+   <el-button icon="el-icon-refresh" @click="get_equip_list('refresh')" size="small" type="primary"
+    >刷新</el-button
+   >
    <el-button
     v-if="$store.state.admin"
     icon="el-icon-plus"
+    style="margin:0 5px;"
     @click="handle_click_add"
     size="small"
     type="primary"
@@ -11,7 +15,6 @@
    >
    <!-- 导出按钮 -->
    <export-excel
-    style="margin:0 8px;"
     v-if="$store.state.admin"
     :exportTable="export_table"
     :excelName="excel_name"
@@ -182,7 +185,7 @@
       </template>
      </el-table-column>
     </el-table-column>
-    <el-table-column label="3号测力" align="center">
+    <el-table-column label="3号测力" align="center">
      <el-table-column prop="direct1" label="伸出位" align="center">
       <template slot-scope="scope">
        <span>{{ scope.row.direct1 || '-' }}</span>
@@ -771,27 +774,27 @@ export default {
     },
     {
      prop: 'direct1',
-     label: '3号测力/伸出位',
+     label: '3号测力/伸出位',
      isExport: true,
     },
     {
      prop: 'direct2',
-     label: '3号测力/缩进位',
+     label: '3号测力/缩进位',
      isExport: true,
     },
     {
      prop: 'zl_3_no',
-     label: '3号测力/编号',
+     label: '3号测力/编号',
      isExport: true,
     },
     {
      prop: 'p3',
-     label: '3号测力/状态',
+     label: '3号测力/状态',
      isExport: true,
     },
     {
      prop: 'd3',
-     label: '3号测力/晶振',
+     label: '3号测力/晶振',
      isExport: true,
     },
    ],
@@ -1005,7 +1008,7 @@ export default {
    return blob
   },
   // 获取设备列表
-  get_equip_list() {
+  get_equip_list(type) {
    equip_list()
     .then(res => {
      this.tableData = res
@@ -1025,6 +1028,7 @@ export default {
       item.idx += 1
      })
      this.export_table = _.cloneDeep(copy_res)
+     if (type == 'refresh') return this.$message.success('刷新成功!')
     })
     .catch(e => {
      console.log(e)
@@ -1330,6 +1334,10 @@ export default {
   this.get_equip_list()
   this.get_station_list()
  },
+ activated() {
+  this.get_equip_list()
+  this.get_station_list()
+ },
 }
 </script>
 

+ 7 - 7
2.Web/src/views/Force.vue

@@ -45,7 +45,7 @@
      :clearable="false"
      type="datetimerange"
      @change="get_curve_data('is_query')"
-     style="width:400px;"
+     style="width:300px;"
      value-format="timestamp"
      range-separator="至"
      format="yyyy-MM-dd HH:mm"
@@ -109,8 +109,8 @@
      <el-input
       size="small"
       v-model="threshold_val"
-      style="width:120px;"
-      placeholder="滤波阈值:30≤X≤500,且为整数"
+      style="width:95px;"
+      placeholder="30≤X≤500"
      ></el-input>
      <el-button size="small" @click="get_curve_data('all')" type="primary">所有数据</el-button>
     </div>
@@ -1897,7 +1897,7 @@ export default {
    //  this.times = [unix_time - 2 * 60 * 60 * 1000, unix_time]
    //  this.times = [1714764900000, 1714766100000] // 2024年5月4号有数据
    //  this.times = [1716307200000, 1716393600000] // 2024年5月22~23号有数据
-   this.times = [1715961600000, 1716048000000] // 2024年5月18~19号有数据
+   //  this.times = [1715961600000, 1716048000000] // 2024年5月18~19号有数据
    // this.times = [1715988120000, 1715988540000] // 2024年5月18~19号7点数据
   },
   // 发送浏览记录
@@ -1921,9 +1921,9 @@ export default {
  mounted() {
   this.get_conf_read()
   this.url_is_query()
-  setTimeout(() => {
-   this.search_data = '108'
-  }, 300)
+  // setTimeout(() => {
+  //  this.search_data = '108'
+  // }, 300)
  },
  beforeDestroy() {
   // this.myCharts.clear()