Browse Source

小修改

dong 2 months ago
parent
commit
bee53cf2e1

+ 6 - 64
src/views/module_tpm/equipmentRunStatis/history.vue

@@ -10,7 +10,7 @@
           </a-col>
           <a-col :xl="6" :lg="11" :md="12" :sm="24">
             <a-form-item label="查询日期">
-              <a-date-picker v-model="queryParams.date" placeholder="选择日期" style="width:100%;" @change="handleSearch" />
+              <a-date-picker v-model="queryParams.date" placeholder="选择日期" style="width:100%;" @change="handleQuery" />
             </a-form-item>
           </a-col>
           <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -35,7 +35,7 @@
         :scroll="{ x: true }"
         bordered
         rowKey="id"
-        :columns="columns2"
+        :columns="columns"
         :dataSource="dataSource"
         :pagination="ipagination"
         class="j-table-force-nowrap"
@@ -88,7 +88,7 @@ export default {
       },
       dataSource: [],
       url: {
-        list: '/emsStatistics/searchEquipmentDetail',
+        list: '/tpmParams/tpmParams/list',
       },
       // 表头
       columns: [
@@ -99,53 +99,6 @@ export default {
           width: 60,
           align: 'center',
           customRender: function (t, r, index) {
-            return parseInt(index) + 1
-          },
-        },
-        {
-          title: '设备名称',
-          align: 'center',
-          dataIndex: 'equipmentid_dictText',
-        },
-        {
-          title: '设备编号',
-          align: 'center',
-          dataIndex: 'equipmentcode',
-        },
-        {
-          title: '日期',
-          align: 'center',
-          dataIndex: 'day',
-        },
-        {
-          title: '总时长(分钟)',
-          align: 'center',
-          dataIndex: 'duration',
-        },
-        {
-          title: '运行时长(分钟)',
-          align: 'center',
-          dataIndex: 'onduration',
-        },
-        {
-          title: '待机时长(分钟)',
-          align: 'center',
-          dataIndex: 'pauseduration',
-        },
-        {
-          title: '关机时长(分钟)',
-          align: 'center',
-          dataIndex: 'offduration',
-        },
-      ],
-      columns2: [
-        {
-          title: '序号',
-          dataIndex: '',
-          key: 'rowIndex',
-          width: 60,
-          align: 'center',
-          customRender: function (t, r, index) {
             return parseInt(index) + 1;
           },
         },
@@ -175,8 +128,8 @@ export default {
     this.$nextTick(() => {
       var now = this.dateformat(new Date()).substring(0, 10)
       this.queryParams.date = now
-      // this.handleQuery()
-      this.getTest()
+      this.handleQuery()
+      // this.getTest()
     })
   },
   methods: {
@@ -224,18 +177,7 @@ export default {
       }
       _this.loading = true
       getAction(this.url.list, _this.queryParams).then((response) => {
-        _this.tpmequiponoffsectionList = response.result
-        // Generate mock data
-        _this.equipments = []
-        _this.onduration = []
-        _this.pauseduration = []
-        _this.offduration = []
-        _this.tpmequiponoffsectionList.forEach(function (equipment, key) {
-          _this.equipments.push(equipment.equipmentid_dictText + '[' + equipment.equipmentcode + ']')
-          _this.onduration.push(equipment.onduration)
-          _this.pauseduration.push(equipment.pauseduration)
-          _this.offduration.push(equipment.offduration)
-        })
+        _this.dataSource = response.result
 
         this.loading = false
       })

+ 1 - 4
src/views/module_tpm/equipmentRunStatis/realtime.vue

@@ -477,10 +477,7 @@ export default {
 
         paramscount++;
       })
-      console.log("grid", grid)
-      console.log("xAxis", xAxis)
-      console.log("yAxis", yAxis)
-      console.log("series1", series1)
+      
       var option = {
         title: {
           left: 'left',