|
@@ -1,12 +1,14 @@
|
|
|
<template>
|
|
|
<view class="taskBoardAddress">
|
|
|
<u-navbar :bgStatusImage="backPic0" :bgImage="backPic" :title="gasTitle" :safeAreaInsetTop="true"
|
|
|
- leftIcon="arrow-left" @leftClick="handlerToggle"> </u-navbar>
|
|
|
- <u-list :height="708" v-if="isShow">
|
|
|
+ leftIcon="arrow-left" @leftClick="handlerToggle"> </u-navbar>
|
|
|
+ <u-list :height="666" :scrollTop="topH"
|
|
|
+ v-if="isShow">
|
|
|
<u-list-item v-for="(item, index) in indexList" :key="index">
|
|
|
- <u-cell icon="share" @click="getBoradAddress(item)">
|
|
|
+ <u-cell icon="share" @click="getBoradAddress(item, index)">
|
|
|
<view slot="title" class="u-slot-title">
|
|
|
- <text class="u-cell-text">{{`${ item.deviceName} (${item.checkNum=='1' ? '第一次' : item.checkNum=='2' ? '第二次' : ''})` }}</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>
|
|
@@ -17,7 +19,8 @@
|
|
|
</u-list-item>
|
|
|
</u-list>
|
|
|
<component :is="toComponent" :Ids="Ids" :checkNum="checkNum" :classType="classType" :isSensor="isSensor"
|
|
|
- :deviceID="deviceID" :deviceName="deviceName" :checkState="checkState" @getBackAddress="getBackAddress" ></component>
|
|
|
+ :deviceID="deviceID" :deviceName="deviceName" :checkState="checkState" @getBackAddress="getBackAddress">
|
|
|
+ </component>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -37,13 +40,15 @@ export default {
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
+ topH:0,
|
|
|
+ activeIndex:0,
|
|
|
Ids: '',
|
|
|
checkNum: '',//巡检次数
|
|
|
classType: '',
|
|
|
isSensor: '',
|
|
|
deviceID: '',
|
|
|
deviceName: '',
|
|
|
- checkState:'',
|
|
|
+ checkState: '',
|
|
|
isShow: true,
|
|
|
toComponent: '',
|
|
|
indexList: [],
|
|
@@ -62,24 +67,26 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
//点击返回上一级
|
|
|
- handlerToggle(){
|
|
|
+ handlerToggle() {
|
|
|
this.$emit('getBackBoard')
|
|
|
},
|
|
|
- getBoradAddress(item) {
|
|
|
+
|
|
|
+ getBoradAddress(item, index) {
|
|
|
let that = this
|
|
|
+ that.activeIndex=index
|
|
|
if (item.checkState == '0') {
|
|
|
that.isShow = false
|
|
|
that.Ids = item.id
|
|
|
that.checkNum = item.checkNum
|
|
|
that.classType = item.classType_dictText
|
|
|
- that.checkState=item.checkState
|
|
|
+ that.checkState = item.checkState
|
|
|
that.isSensor = item.isSensor
|
|
|
that.deviceID = item.deviceId
|
|
|
that.deviceName = item.deviceName
|
|
|
that.toComponent = 'gasImgIdentify'
|
|
|
} else {
|
|
|
that.isShow = false
|
|
|
- that.checkState=item.checkState
|
|
|
+ that.checkState = item.checkState
|
|
|
that.checkNum = item.checkNum
|
|
|
that.deviceID = item.deviceId
|
|
|
that.classType = item.classType_dictText
|
|
@@ -90,18 +97,51 @@ export default {
|
|
|
getBackAddress() {
|
|
|
this.isShow = true
|
|
|
this.toComponent = ''
|
|
|
+ this.topH = 39*this.activeIndex
|
|
|
this.taskDetailsLists()
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
taskDetailsLists() {
|
|
|
let that = this
|
|
|
new Promise((resolve, reject) => {
|
|
|
api
|
|
|
- .taskDetailsList({ pageNo: 1, pageSize: 100, taskId: that.taskId,taskTime:that.searchTime })
|
|
|
+ .taskDetailsList({ pageNo: 1, pageSize: 100, taskId: that.taskId, taskTime: that.searchTime })
|
|
|
.then((response) => {
|
|
|
if (response.data.code == 200) {
|
|
|
console.log(response, '地点列表---')
|
|
|
that.indexList = response.data.result.records || []
|
|
|
+ // that.indexList = [
|
|
|
+ // { deviceName: '测试地址1' },
|
|
|
+ // { deviceName: '测试地址2' },
|
|
|
+ // { deviceName: '测试地址3' },
|
|
|
+ // { deviceName: '测试地址4' },
|
|
|
+ // { deviceName: '测试地址5' },
|
|
|
+ // { deviceName: '测试地址6' },
|
|
|
+ // { deviceName: '测试地址7' },
|
|
|
+ // { deviceName: '测试地址8' },
|
|
|
+ // { deviceName: '测试地址9' },
|
|
|
+ // { deviceName: '测试地址10' },
|
|
|
+ // { deviceName: '测试地址11' },
|
|
|
+ // { deviceName: '测试地址12' },
|
|
|
+ // { deviceName: '测试地址13' },
|
|
|
+ // { deviceName: '测试地址14' },
|
|
|
+ // { deviceName: '测试地址15' },
|
|
|
+ // { deviceName: '测试地址16' },
|
|
|
+ // { deviceName: '测试地址17' },
|
|
|
+ // { deviceName: '测试地址18' },
|
|
|
+ // { deviceName: '测试地址19' },
|
|
|
+ // { deviceName: '测试地址20' },
|
|
|
+ // { deviceName: '测试地址21' },
|
|
|
+ // { deviceName: '测试地址22' },
|
|
|
+ // { deviceName: '测试地址23' },
|
|
|
+ // { deviceName: '测试地址24' },
|
|
|
+ // { deviceName: '测试地址25' },
|
|
|
+ // { deviceName: '测试地址26' },
|
|
|
+ // { deviceName: '测试地址27' },
|
|
|
+ // { deviceName: '测试地址28' },
|
|
|
+ // { deviceName: '测试地址29' },
|
|
|
+ // { deviceName: '测试地址30' },
|
|
|
+ // ]
|
|
|
} else {
|
|
|
reject(response);
|
|
|
}
|