zhaobao преди 1 година
родител
ревизия
32297ad539

+ 1 - 1
src/views/iiot/equipment/alarm.vue

@@ -7,7 +7,7 @@
         </div>
       </el-col>
       <el-col :span="12" class="right">
-        <el-input v-model="conditions.goafSensorName" class="search-input m-right-15" placeholder="请输入设备名称">
+        <el-input v-model="conditions.goafSensorName" class="search-input m-right-15" placeholder="请输入传感器名称">
           <el-button slot="append" icon="el-icon-search" @click="getData()" />
         </el-input>
       </el-col>

+ 58 - 7
src/views/iiot/equipment/history.vue

@@ -1,12 +1,31 @@
 <template>
-  <div class="page-wrap">
+  <div class="page-wrap history">
     <el-row class="tool-bar">
-      <el-col :span="12" class="left">
+      <el-col :span="7" class="left">
         <div class="content-title">
-          实时数据
+          历史数据
         </div>
       </el-col>
-      <el-col :span="12" class="right">
+      <el-col :span="17" class="right">
+        <div class="block">
+          <span class="lable">开始时间</span>
+          <el-date-picker
+            v-model="conditions.startDate"
+            type="datetime"
+            :append-to-body="false"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            placeholder="选择开始时间"
+          />
+        </div>
+        <div class="block">
+          <span class="lable">结束时间</span>
+          <el-date-picker
+            v-model="conditions.endDate"
+            type="datetime"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            placeholder="选择结束时间"
+          />
+        </div>
         <el-input v-model="conditions.goafDevName" class="search-input m-right-15" placeholder="请输入设备名称">
           <el-button slot="append" icon="el-icon-search" @click="getData()" />
         </el-input>
@@ -194,7 +213,9 @@ export default {
       conditions: {
         page: 1,
         limit: 10,
-        goafDevName: ''
+        goafDevName: '',
+        startDate: '',
+        endDate: ''
       }
     }
   },
@@ -230,14 +251,32 @@ export default {
 }
 </script>
   <style lang="scss" scoped>
+  .tool-bar{
+    .right{
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+      .block{
+        color: #fff;
+        display: flex;
+        align-items: center;
+        padding-right: 10px;
+        .lable{
+          font-size: 14px;
+          padding-right: 10px;
+        }
+      }
+    }
+  }
   .page-wrap{
       min-height:90vh;
       padding: 15px;
       background-color: #071A29;
       ::v-deep {
+
         .el-table thead.is-group th.el-table__cell{
-        background-color: #132938;
-      }
+          background-color: #132938;
+        }
         .el-table__header-wrapper{
           border-bottom: 1px solid #5994bb;
         }
@@ -259,4 +298,16 @@ export default {
 
   }
   </style>
+  <style lang="scss">
+        .el-date-picker__time-header{
+            .el-date-picker__editor-wrap{
+              .el-input{
+                input{
+                  color: #606266;
+                  border: 1px solid #DCDFE6;
+                }
+              }
+            }
+          }
+</style>
 

+ 1 - 1
src/views/iiot/equipment/overview.vue

@@ -118,7 +118,7 @@ export default {
       this.dataList = items
     },
     getSensorOverview() {
-      getSensorOverview().then((resp) => {
+      getSensorOverview(this.conditions).then((resp) => {
         const { data } = resp
         let tableData = []
         for (let i = 0; i < data.length; i++) {

+ 3 - 3
src/views/iiot/sensor/index.vue

@@ -7,7 +7,7 @@
         </div>
       </el-col>
       <el-col :span="12" class="right">
-        <el-input v-model="conditions.goafDevName" class="search-input m-right-15" placeholder="请输入设备名称">
+        <el-input v-model="conditions.goafSensorName" class="search-input m-right-15" placeholder="请输入传感器名称">
           <el-button slot="append" icon="el-icon-search" @click="init()" />
         </el-input>
       </el-col>
@@ -97,7 +97,7 @@ export default {
       conditions: {
         page: 1,
         limit: 10,
-        goafDevName: ''
+        goafSensorName: ''
       }
     }
   },
@@ -108,7 +108,7 @@ export default {
     // fetch data
     NumConvertLM,
     init() {
-      getSensorOverview().then((resp) => {
+      getSensorOverview(this.conditions).then((resp) => {
         const { data } = resp
         let tableData = []
         for (let i = 0; i < data.length; i++) {

+ 2 - 2
src/views/iiot/sensor/manager.vue

@@ -7,7 +7,7 @@
         </div>
       </el-col>
       <el-col :span="12" class="right">
-        <el-input v-model="conditions.goafDevName" class="search-input m-right-15" placeholder="请输入设备名称">
+        <el-input v-model="conditions.goafSensorName" class="search-input m-right-15" placeholder="请输入传感器名称">
           <el-button slot="append" icon="el-icon-search" @click="getData()" />
         </el-input>
         <el-button type="primary" @click="handleAdd">新增</el-button>
@@ -336,7 +336,7 @@ export default {
       conditions: {
         page: 1,
         limit: 10,
-        goafDevName: ''
+        goafSensorName: ''
       }
     }
   },