فهرست منبع

Merge branch 'master' of http://182.92.126.35:3000/msx/Vent-App

hongrunxia 1 هفته پیش
والد
کامیت
c78ec08388

+ 1 - 1
api/api.js

@@ -147,7 +147,7 @@ const apiService = {
     return http.get(url);
   },
   getDeviceHistory2(params) {
-    const url = buildURL("/monitor/history/getHistoryData", params);
+    const url = buildURL("/modelreq/monitor/history/getHistoryData", params);
     return http.get(url);
   },
   //获取操作历史

+ 4 - 4
common/service/config.service.js

@@ -7,20 +7,20 @@ if (process.env.NODE_ENV == "development") {
   // BASE_URL = "http://10.248.135.10:9999"; // 大柳塔进
   // BASE_URL = "http://10.248.135.121:9999"; // 活鸡兔井
   // BASE_URL = "http://10.246.63.125:9999"; // 寸草塔二矿
-  BASE_URL = "http://10.246.183.35:9999"; // 乌兰木伦
+  // BASE_URL = "http://10.246.183.35:9999"; // 乌兰木伦
   // BASE_URL = "http://10.120.120.164:9999"; // 察哈素
   // BASE_URL = "http://182.92.126.35:9999"; // 生产环境
   // BASE_URL = "http://172.16.53.16:9999"; //
   // BASE_URL = "http://10.246.167.205:9999"; //上湾
   // BASE_URL = "http://172.30.157.9:9999"; //元子沟
-  // BASE_URL = "http://10.246.167.205:9999"; //上湾
-  // BASE_URL = "http://10.248.135.121:9999"; //活鸡兔井
+  BASE_URL = "http://10.246.167.205:9999"; //上湾
 }
 let staticDomainURL = BASE_URL + "/sys/common/static";
 
 const configService = {
   apiUrl: BASE_URL,
-  apiUrlP: "http://10.246.167.205:6006",
+  apiUrlP: 'http://10.246.167.205:6006',
+  // apiUrlP: 'http://182.92.126.35:6006',
   staticDomainURL: staticDomainURL,
 };
 

+ 105 - 89
pages/gasreport/components/gasImgIdentify.vue

@@ -12,7 +12,7 @@
                     <image v-if="imageSrc" style="width:300px;" :src="imageSrc" mode="aspectFit" @click="getPreview">
                     </image>
                 </view>
-                <view>
+                <!-- <view>
                     <u-modal :show="imgPreShow" @confirm="closePreImg">
                         <view class="slot-content">
                             <image @touchmove="touchEvent" @touchend="touchEnd" @dblclick="dblclickEvent"
@@ -20,7 +20,7 @@
                                 :src="imageSrc" mode="aspectFit"></image>
                         </view>
                     </u-modal>
-                </view>
+                </view> -->
                 <view style="width:100%;display: flex;justify-content: space-between;margin: 2px 0px;">
                     <u-button icon="eye" type="primary" size="small" :loading="loading" loadingText="识别中"
                         style="width:49%;margin:0" @click="getGasIdentify">识别</u-button>
@@ -269,6 +269,7 @@ import api from "@/api/api";
 import moment from 'moment'
 import configService from '@/common/service/config.service.js'
 // import stringSimilarity from 'string-similarity'
+
 export default {
     name: 'gasFill',
     props: {
@@ -306,6 +307,7 @@ export default {
 
     data() {
         return {
+            tempFilePaths: [],
             gasTitle: '数据采集',//标题
             backPic0: "url(/static/topnavbar0.png)",
             backPic: "url(../../static/topnavbar.png)",
@@ -328,7 +330,7 @@ export default {
             },
             isFirst: true, // 是否是第一次缩放
             loading: false,
-            imgPreShow: false,
+            // imgPreShow: false,
             paramData: {},
             statusShow: '',
             editData: {},
@@ -372,7 +374,7 @@ export default {
                 count: '第一次',
                 jcdd: '',
                 jcy: '',
-                time: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
+                time: '',
                 ch4: '',
                 co2: '',
                 co: '',
@@ -380,7 +382,7 @@ export default {
                 jw: '',
                 gw: '',
                 bxy: '',
-                tbrq: moment(new Date()).format('YYYY-MM-DD'),
+                tbrq: '',
                 temp: '',
                 // mcgzm: '',
             },
@@ -390,6 +392,7 @@ export default {
         username: function () {
             return uni.getStorageSync('login_user_info')['realname']
         },
+      
     },
     watch: {
         checkState: {
@@ -436,79 +439,84 @@ export default {
         handlerToggle() {
             this.$emit('getBackAddress')
         },
-        touchEvent(e) {
-            let that = this
-            // 双指缩放
-            if (e.touches.length === 2) {
-                that.fingers = true
-                // 需要动画可以自行设置时间,个人觉得不需要动画更丝滑,所以设置为0
-                that.animationTime = 0
-                let touch1 = e.touches[0]
-                let touch2 = e.touches[1]
-                let distance = Math.floor(Math.sqrt(Math.pow(touch1.clientX - touch2.clientX, 2) + Math.pow(touch1.clientY - touch2.clientY, 2)))
-                if (that.isFirst) {
-                    // 首次缩放 给予初始值
-                    that.lastDistance = distance
-                    that.isFirst = false
-                } else {
-                    // 非首次缩放 计算缩放比例
-                    let scale = distance / that.lastDistance
-                    if (scale > 1) {
-                        if (that.scaleImg < 3) that.scaleImg = that.scaleImg + 0.05
-                    } else {
-                        if (that.scaleImg > 0.5) that.scaleImg = that.scaleImg - 0.05
-                    }
-                }
-            }
-            // 单指移动  fingers(解决双指缩放,手指松开时会导致图片乱移动问题)
-            if (e.touches.length === 1 && that.fingers === false) {
-                that.animationTime = 0
-                const touch = e.touches[0]
-                if (that.isFirst) {
-                    // 记录初始位置
-                    that.move.x = touch.clientX
-                    that.move.y = touch.clientY
-                    that.isFirst = false
-                } else {
-                    //计算偏移量 (当前位置 - 上一次位置)
-                    that.offset.x = touch.clientX - that.move.x
-                    that.offset.y = touch.clientY - that.move.y
-                    that.move.x = touch.clientX
-                    that.move.y = touch.clientY
-                    // 通过偏移量设置图片位置
-                    that.imgLocation.x = that.imgLocation.x + that.offset.x
-                    that.imgLocation.y = that.imgLocation.y + that.offset.y
-                }
-            }
-        },
-        touchEnd(e) {
-            let that = this
-            // 手指离开时重置
-            if (e.touches.length == 0) {
-                that.isFirst = true
-                that.fingers = false
-            }
-        },
-        dblclickEvent() {
-            let that = this
-            that.animationTime = 1
-            if (that.scaleImg > 1) {
-                that.scaleImg = 1
-                that.imgLocation.x = 0
-                that.imgLocation.y = 0
-            } else {
-                that.scaleImg = 2
-                that.imgLocation.x = 0
-                that.imgLocation.y = 0
-            }
-        },
-        //图片点击
+        // touchEvent(e) {
+        //     let that = this
+        //     // 双指缩放
+        //     if (e.touches.length === 2) {
+        //         that.fingers = true
+        //         // 需要动画可以自行设置时间,个人觉得不需要动画更丝滑,所以设置为0
+        //         that.animationTime = 0
+        //         let touch1 = e.touches[0]
+        //         let touch2 = e.touches[1]
+        //         let distance = Math.floor(Math.sqrt(Math.pow(touch1.clientX - touch2.clientX, 2) + Math.pow(touch1.clientY - touch2.clientY, 2)))
+        //         if (that.isFirst) {
+        //             // 首次缩放 给予初始值
+        //             that.lastDistance = distance
+        //             that.isFirst = false
+        //         } else {
+        //             // 非首次缩放 计算缩放比例
+        //             let scale = distance / that.lastDistance
+        //             if (scale > 1) {
+        //                 if (that.scaleImg < 3) that.scaleImg = that.scaleImg + 0.05
+        //             } else {
+        //                 if (that.scaleImg > 0.5) that.scaleImg = that.scaleImg - 0.05
+        //             }
+        //         }
+        //     }
+        //     // 单指移动  fingers(解决双指缩放,手指松开时会导致图片乱移动问题)
+        //     if (e.touches.length === 1 && that.fingers === false) {
+        //         that.animationTime = 0
+        //         const touch = e.touches[0]
+        //         if (that.isFirst) {
+        //             // 记录初始位置
+        //             that.move.x = touch.clientX
+        //             that.move.y = touch.clientY
+        //             that.isFirst = false
+        //         } else {
+        //             //计算偏移量 (当前位置 - 上一次位置)
+        //             that.offset.x = touch.clientX - that.move.x
+        //             that.offset.y = touch.clientY - that.move.y
+        //             that.move.x = touch.clientX
+        //             that.move.y = touch.clientY
+        //             // 通过偏移量设置图片位置
+        //             that.imgLocation.x = that.imgLocation.x + that.offset.x
+        //             that.imgLocation.y = that.imgLocation.y + that.offset.y
+        //         }
+        //     }
+        // },
+        // touchEnd(e) {
+        //     let that = this
+        //     // 手指离开时重置
+        //     if (e.touches.length == 0) {
+        //         that.isFirst = true
+        //         that.fingers = false
+        //     }
+        // },
+        // dblclickEvent() {
+        //     let that = this
+        //     that.animationTime = 1
+        //     if (that.scaleImg > 1) {
+        //         that.scaleImg = 1
+        //         that.imgLocation.x = 0
+        //         that.imgLocation.y = 0
+        //     } else {
+        //         that.scaleImg = 2
+        //         that.imgLocation.x = 0
+        //         that.imgLocation.y = 0
+        //     }
+        // },
+        //图片点击预览
         getPreview() {
-            this.imgPreShow = true
-        },
-        closePreImg() {
-            this.imgPreShow = false
+            // this.imgPreShow = true
+            // 预览图片
+            uni.previewImage({
+                urls: this.tempFilePaths,
+                current: 0
+            });
         },
+        // closePreImg() {
+        //     // this.imgPreShow = false
+        // },
         //获取图片识别数据
         getGasIdentify() {
             let that = this
@@ -539,21 +547,20 @@ export default {
                             that.deviceId = that.deviceID
                             that.formState = {
                                 id: '',
-                                bc: that.classType,
+                                bc: that.classType || '',
                                 count: that.checkNum == '1' ? '第一次' : that.checkNum == '2' ? '第二次' : '',
-                                jcdd: that.deviceName,
-                                jcy: that.indexParam['检查人'],
-                                time: that.indexParam['检查时间'],
-                                ch4: that.indexParam['CH4%'],
-                                co2: that.indexParam['CO2%'],
-                                co: that.indexParam['CO(ppm)'],
-                                o2: that.indexParam['O2%'],
+                                jcdd: that.deviceName || '',
+                                jcy: that.indexParam && that.indexParam['检查人'] ? that.indexParam['检查人'] : that.username,
+                                time:that.indexParam && that.indexParam['检查时间'] ?  that.indexParam['检查时间'] : '',
+                                ch4: that.indexParam && that.indexParam['CH4%'] ? that.indexParam['CH4%'] : '',
+                                co2: that.indexParam && that.indexParam['CO2%'] ? that.indexParam['CO2%'] : '',
+                                co: that.indexParam && that.indexParam['CO(ppm)'] ? that.indexParam['CO(ppm)'] : '',
+                                o2: that.indexParam && that.indexParam['O2%'] ? that.indexParam['O2%'] : '',
                                 jw: that.isSensor == '1' ? '0' : '-',
-                                gw: that.indexParam['CH4%'],
+                                gw: that.indexParam && that.indexParam['CH4%'] ? that.indexParam['CH4%'] : '',
                                 bxy: '0',
-                                tbrq: that.indexParam['检查时间'].substring(0, that.indexParam['检查时间'].indexOf(' ')),
-                                temp: that.indexParam['温度(℃)'],
-                                // mcgzm: '',
+                                tbrq: that.indexParam && that.indexParam['检查时间'] ? that.indexParam['检查时间'].substring(0,  that.indexParam['检查时间'].indexOf(' ')) : '',
+                                temp: that.indexParam && that.indexParam['温度(℃)'] ? that.indexParam['温度(℃)'] : '',
                             }
 
                             new Promise((resolve, reject) => {
@@ -798,7 +805,7 @@ export default {
                         }
 
                     },
-                    fail: (errpr) => {
+                    fail: (error) => {
                         uni.showToast({
                             title: '识别失败!',
                             icon: 'none' // 可选图标,'success', 'loading', 'none'
@@ -823,6 +830,7 @@ export default {
                     console.log(res, 'res===')
                     // 获取选中的图片路径,这里我们只取第一张图进行预览
                     this.imageSrc = res.tempFilePaths[0];
+                    this.tempFilePaths = res.tempFilePaths
                     this.imageSrcList = res.tempFiles
                 },
                 fail: (err) => {
@@ -2234,11 +2242,19 @@ export default {
                             that.$emit('getBackAddress')
                         } else {
                             reject(response);
+                            uni.showToast({
+                                title: response.data,
+                                icon: 'none' // 可选图标,'success', 'loading', 'none'
+                            });
                         }
                     })
                     .catch((error) => {
                         console.log("catch===>response", response);
                         reject(error);
+                        uni.showToast({
+                            title: '保存失败!',
+                            icon: 'none' // 可选图标,'success', 'loading', 'none'
+                        });
                     });
             });
 

+ 81 - 9
pages/gasreport/components/taskBoard.vue

@@ -1,12 +1,15 @@
 <template>
     <view class="taskBoard">
-        <u-navbar :bgStatusImage="backPic0" :bgImage="backPic" :title="gasTitle" :safeAreaInsetTop="true"
-            leftIcon="" @leftClick="handlerToggle"> </u-navbar>
+        <u-navbar :bgStatusImage="backPic0" :bgImage="backPic" :title="gasTitle" :safeAreaInsetTop="true" leftIcon=""
+            @leftClick="handlerToggle"> </u-navbar>
         <u-list :height="708" v-if="isShow">
             <u-list-item v-for="(item, index) in indexList" :key="index">
                 <u-cell icon="share" @click="getBorad(item)">
                     <view slot="title" class="u-slot-title">
-                        <text class="u-cell-text">{{ item.name }}</text>
+                        <text class="u-cell-text">
+                            <text>{{ item.name }}</text>
+                            <text style="margin-left:10px">{{  item.checkPerson ? `(${item.checkPerson})` : '' }}</text>
+                        </text>
                     </view>
                     <view slot="value" class="u-slot-title">
                         <u-tag :text="item.classType_dictText" plain size="mini"
@@ -16,6 +19,18 @@
                 </u-cell>
             </u-list-item>
         </u-list>
+        <!-- 填报日期弹窗 -->
+        <u-modal v-if="isShow" showCancelButton showConfirmButton confirmText="确定" cancelText="取消" :show="showTime"
+            :title="titleTime" @confirm="confirmTime" @cancel="cancelTime">
+            <view class="dialog-item" @click="getChangeTime">
+                <text class="dialog-label">任务日期:</text>
+                <u--input v-model="searchTime" placeholder="请选择任务日期" inputAlign="center"
+                    suffixIcon="arrow-right"></u--input>
+                <u-calendar :show="showCalendar" v-model="timeRan" mode="single" closeOnClickOverlay
+                    @confirm="changeTime" @cancel="showCalendar = false"
+                   ></u-calendar>
+            </view>
+        </u-modal>
         <component v-else :is="loadComponent" :taskId="taskId" @getBackBoard="getBackBoard"></component>
     </view>
 </template>
@@ -23,7 +38,7 @@
 <script>
 import api from "@/api/api";
 import taskBoardAddress from './taskBoardAddress.vue'
-
+import moment from 'moment'
 export default {
     name: 'taskBoard',
     components: {
@@ -33,6 +48,11 @@ export default {
 
     data() {
         return {
+            showTime: false,//是否显示填报日期弹窗
+            titleTime: '',
+            searchTime: '',//检测时间
+            showCalendar: false,//控制日期选型下拉开启
+            timeRan: Number(new Date()),
             isShow: true,
             loadComponent: '',
             taskId: '',
@@ -42,30 +62,58 @@ export default {
             backPic: "url(../../static/topnavbar.png)",
         }
     },
-    computed: {},
+    computed: {
+        teamCode: function () {
+            return uni.getStorageSync('login_user_info')['districtTeam']
+        },
+    },
     mounted() {
         this.getTimeList()
     },
     methods: {
+        //点击弹出日期下拉选项
+        getChangeTime() {
+            this.showCalendar = true
+        },
+        changeTime(e) {
+            let that = this
+            that.searchTime = moment(e.value).format('YYYY-MM-DD')
+            uni.setStorageSync("searchTime", that.searchTime);
+            that.showCalendar=false
+        },
         //点击返回上一级
         getBackBoard() {
-            let that=this
+            let that = this
             that.isShow = true
             that.loadComponent = ''
         },
         //点击跳转到识别看板
         getBorad(item) {
             let that = this
-            that.isShow = false
             that.taskId = item.id
-            that.loadComponent = 'taskBoardAddress'
+            that.showTime = true
+        },
+        //选择检测时间-确定
+        confirmTime() {
+            let that = this
+            if (that.searchTime) {
+                that.isShow = false
+                that.showTime=false
+                that.loadComponent = 'taskBoardAddress'
+            }
+        },
+        //选择检测时间-取消
+        cancelTime() {
+            let that=this
+            that.isShow = true
+            that.showTime=false
         },
         //获取任务管理列表数据
         getTimeList() {
             let that = this
             new Promise((resolve, reject) => {
                 api
-                    .teamList({ pageNo: 1, pageSize: 100 })
+                    .teamList({ pageNo: 1, pageSize: 100,teamCode:that.teamCode })
                     .then((response) => {
                         if (response.data.code == 200) {
                             that.indexList = response.data.result.records
@@ -93,6 +141,30 @@ export default {
 
 }
 
+.dialog-item {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+
+    .dialog-label {
+        width: 70px;
+        text-align: center;
+    }
+}
+
+::v-deep .u-input {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    justify-content: space-between;
+    padding: 3px 9px !important;
+    width: 180px;
+}
+
+::v-deep .u-popup {
+    flex: 0
+}
+
 ::v-deep .u-slot-title {
     display: flex;
 }

+ 8 - 4
pages/gasreport/components/taskBoardAddress.vue

@@ -6,7 +6,7 @@
             <u-list-item v-for="(item, index) in indexList" :key="index">
                 <u-cell icon="share" @click="getBoradAddress(item)">
                     <view slot="title" class="u-slot-title">
-                        <text class="u-cell-text">{{ item.deviceName }}</text>
+                        <text class="u-cell-text">{{`${ item.deviceName} (${item.checkNum=='1' ? '第一次' : item.checkNum=='2' ? '第二次' : ''})` }}</text>
                         <!-- <u-tag text="查看" plain size="mini" type="warning">
                         </u-tag> -->
                     </view>
@@ -32,7 +32,7 @@ export default {
         taskId: {
             type: String,
             default: ''
-        }
+        },
     },
 
     data() {
@@ -52,7 +52,11 @@ export default {
             backPic: "url(../../static/topnavbar.png)",
         }
     },
-    computed: {},
+    computed: {
+        searchTime: function () {
+            return uni.getStorageSync('searchTime')
+        }
+    },
     mounted() {
         this.taskDetailsLists()
     },
@@ -93,7 +97,7 @@ export default {
             let that = this
             new Promise((resolve, reject) => {
                 api
-                    .taskDetailsList({ pageNo: 1, pageSize: 100, taskId: that.taskId })
+                    .taskDetailsList({ pageNo: 1, pageSize: 100, taskId: that.taskId,taskTime:that.searchTime })
                     .then((response) => {
                         if (response.data.code == 200) {
                             console.log(response, '地点列表---')

+ 94 - 69
pages/history/history.vue

@@ -122,78 +122,94 @@
                 </u-col>
               </u-row>
               <view
-                class="datacard"
-                v-for="(showitem, index) in deviceShowList"
-                :key="index"
-                v-show="showitem.appShow == 1"
+                style="
+                  display: flex;
+                  flex-wrap: wrap;
+                  justify-content: space-between;
+                "
               >
                 <view
-                  :class="TabCur"
-                  style="
-                    padding-top: 10rpx;
-                    padding-bottom: 10rpx;
-                    display: flex;
-                    flex-direction: column;
-                    align-items: center;
-                    height: 100%;
-                  "
+                  class="datacard"
+                  v-for="(showitem, index) in deviceShowList"
+                  :key="index"
+                  v-show="showitem.appShow == 1"
                 >
                   <view
-                    v-if="
-                      showitem.datatype == 1 &&
-                      showitem.monitorcode == 'doorUse'
-                    "
-                    class="demo-layout bg-purple-light"
-                    style="
-                      margin-top: 10rpx;
-                      color: #3787fe;
-                      font-size: 30rpx;
-                      margin-top: 20rpx;
-                    "
-                  >
-                    {{
-                      item[showitem.monitorcode] == "2"
-                        ? "行人"
-                        : item[showitem.monitorcode] == "1"
-                        ? "行车"
-                        : "-"
-                    }}
-                  </view>
-                  <view
-                    v-else-if="showitem.datatype == 1"
-                    class="demo-layout bg-purple-light"
+                    :class="TabCur"
                     style="
-                      margin-top: 10rpx;
-                      color: #3787fe;
-                      font-size: 30rpx;
-                      margin-top: 20rpx;
+                      padding-top: 10rpx;
+                      padding-bottom: 10rpx;
+                      display: flex;
+                      flex-direction: column;
+                      align-items: center;
+                      height: 100%;
                     "
                   >
-                    {{
-                      item[showitem.monitorcode] == null ||
-                      item[showitem.monitorcode] == ""
-                        ? "-"
-                        : item[showitem.monitorcode]
-                    }}
-                  </view>
-                  <view
-                    v-else-if="showitem.datatype == 2"
-                    class="demo-layout bg-purple-light"
-                    style="color: #3787fe; font-size: 30rpx; margin-top: 20rpx"
-                  >
-                    {{
-                      item[showitem.monitorcode] == null ||
-                      item[showitem.monitorcode] == ""
-                        ? "-"
-                        : item[showitem.monitorcode]
-                    }}
-                  </view>
+                    <view
+                      v-if="
+                        showitem.datatype == 1 &&
+                        showitem.monitorcode == 'doorUse'
+                      "
+                      class="demo-layout bg-purple-light"
+                      style="
+                        margin-top: 10rpx;
+                        color: #3787fe;
+                        font-size: 30rpx;
+                        margin-top: 20rpx;
+                      "
+                    >
+                      {{
+                        item[showitem.monitorcode] == "2"
+                          ? "行人"
+                          : item[showitem.monitorcode] == "1"
+                          ? "行车"
+                          : "-"
+                      }}
+                    </view>
+                    <view
+                      v-else-if="showitem.datatype == 1"
+                      class="demo-layout bg-purple-light"
+                      style="
+                        margin-top: 10rpx;
+                        color: #3787fe;
+                        font-size: 30rpx;
+                        margin-top: 20rpx;
+                      "
+                    >
+                      {{
+                        item[showitem.monitorcode] == null ||
+                        item[showitem.monitorcode] == ""
+                          ? "-"
+                          : item[showitem.monitorcode]
+                      }}
+                    </view>
+                    <view
+                      v-else-if="showitem.datatype == 2"
+                      class="demo-layout bg-purple-light"
+                      style="
+                        color: #3787fe;
+                        font-size: 30rpx;
+                        margin-top: 20rpx;
+                      "
+                    >
+                      {{
+                        item[showitem.monitorcode] == null ||
+                        item[showitem.monitorcode] == ""
+                          ? "-"
+                          : item[showitem.monitorcode]
+                      }}
+                    </view>
 
-                  <view
-                    class="demo-layout bg-purple-light"
-                    style="margin-top: 20rpx; color: #677799; margin-top: 20rpx"
-                  >
-                    {{ showitem.des }}
+                    <view
+                      class="demo-layout bg-purple-light"
+                      style="
+                        margin-top: 20rpx;
+                        color: #677799;
+                        margin-top: 20rpx;
+                      "
+                    >
+                      {{ showitem.des }}
+                    </view>
                   </view>
                 </view>
               </view>
@@ -252,40 +268,49 @@ export default {
           {
             label: "1秒",
             value: "1",
+            value1: "1s",
           },
           {
             label: "5秒",
             value: "2",
+            value1: "5s",
           },
           {
             label: "10秒",
             value: "3",
+            value1: "10s",
           },
           {
             label: "30秒",
             value: "4",
+            value1: "30s",
           },
           {
             label: "1分钟",
             value: "5",
+            value1: "1m",
           },
           {
             label: "10分钟",
             value: "6",
+            value1: "10m",
           },
           {
             label: "30分钟",
             value: "7",
+            value1: "30m",
           },
           {
             label: "1小时",
             value: "8",
+            value1: "1h",
           },
         ],
       ],
       deviceID: "", //设备ID
       //deviceType: "", //设备类型
       skip: 8, //时间间隔
+      interval: "1h", //时间间隔
       dataTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
       historyData: [], //历史数据
       deviceShowList: [],
@@ -401,19 +426,21 @@ export default {
     //选择间隔时间
     selectSkipTime(e) {
       this.skip = e.value[0].value;
+      this.interval = e.value[0].value1;
       this.lable = e.value[0].label;
       this.show = false;
     },
     //查询历史数据 getDeviceHistory
     checkHistory() {
       if (this.stationType !== "redis") {
+        console.log(this.stationType, "stationType");
         this.getHistoryData();
       } else {
         this.getHistoryData2();
       }
     },
     // 查询历史数据
-    async getHistoryData() {
+    getHistoryData() {
       const params = {
         ttime_begin: this.StartTime,
         ttime_end: this.EndTime,
@@ -427,7 +454,6 @@ export default {
         api
           .getDeviceHistory(params)
           .then((response) => {
-            debugger;
             if (response.data.code == 200) {
               const infolist = response.data.result;
               this.historyData = infolist.datalist.records;
@@ -458,12 +484,12 @@ export default {
           });
       });
     },
-    async getHistoryData2() {
+    getHistoryData2() {
       const params = {
         startTime: this.StartTime,
         endTIme: this.EndTime,
         deviceId: this.deviceID,
-        interval: this.skip,
+        interval: this.interval,
         isEmployee: true,
         pageSize: 10,
         strtype: this.TabCur,
@@ -472,7 +498,6 @@ export default {
         api
           .getDeviceHistory2(params)
           .then((response) => {
-            debugger;
             if (response.data.code == 200) {
               const infolist = response.data.result;
               this.historyData = infolist.records;

+ 2 - 34
pages/home/detail/autodoor/autodoor.vue

@@ -220,38 +220,6 @@
                     {{ item.des }}
                   </view>
                 </div>
-                <!-- <div
-                  class="right-content"
-                  :style="{
-                    backgroundImage:
-                      item.monitorcode === 'frontRearDP' ||
-                      item.monitorcode === 'frontRearDifference'
-                        ? 'url(\'../../../../static/model/Pa.png\')'
-                        : item.monitorcode === 'sourcePressure'
-                        ? 'url(\'../../../../static/model/MPa.png\')'
-                        : item.monitorcode === 'frontGateOpen'
-                        ? 'url(\'../../../../static/model/doorNet.png\')'
-                        : item.monitorcode === 'rearGateOpen'
-                        ? 'url(\'../../../../static/model/doorNet.png\')'
-                        : item.monitorcode === 'midGateOpen'
-                        ? 'url(\'../../../../static/model/doorNet.png\')'
-                        : item.monitorcode === 'warnFlag'
-                        ? 'url(\'../../../../static/model/9432.png\')'
-                        : item.monitorcode === 'netStatus'
-                        ? 'url(\'../../../../static/model/9431.png\')'
-                        : item.monitorcode === 'm3'
-                        ? 'url(\'../../../../static/model/windM3.png\')'
-                        : item.monitorcode === 'fsectarea'
-                        ? 'url(\'../../../../static/model/duanArea.png\')'
-                        : item.monitorcode === 'incipientWindSpeed1' ||
-                          item.monitorcode === 'incipientWindSpeed2' ||
-                          item.monitorcode === 'incipientWindSpeed3' ||
-                          item.monitorcode === 'va'
-                        ? 'url(\'../../../../static/model/fengsu.png\')'
-                        : 'url(\'\')',
-                    backgroundSize: '100% 100%',
-                  }"
-                ></div> -->
               </div>
             </div>
           </div>
@@ -433,7 +401,7 @@
             <div>主机</div>
             <div
               class="itemback"
-              v-for="(item, index) in showColum[TabCur + '_monitor_left']"
+              v-for="(item, index) in showColum[TabCur + '_monitor_right']"
               :key="index"
               v-show="item.appShow == 1"
             >
@@ -519,7 +487,7 @@
             <div>备机</div>
             <div
               class="itemback"
-              v-for="(item, index) in showColum[TabCur + '_monitor_left']"
+              v-for="(item, index) in showColum[TabCur + '_monitor_right']"
               :key="index"
               v-show="item.appShow == 1"
             >