workOrder.vue
3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<template>
<view class="container">
<z-paging ref="paging" v-model="dataList" @query="queryList" :auto="false" >
<view class="ul fs-p20">
<view class="li fs-bg__white fs-p30 fs-size__h4 fs-radius__sm fs-mt20" v-for="(item, index) in dataList">
<view @click="toDetails(item.planNo)">
<view class="fs-flex__between">
<view class="fs-weight__bold fs-flex1 fs-ellipsis">{{item.planName}}</view>
<tui-text v-if="item.planStatus" text="已完成" type="success"></tui-text>
<tui-text v-else text="未完成" type="danger"></tui-text>
</view>
<view class="fs-flex fs-mt20">
<view class="fs-flex1">编码:{{item.hotlinenumber}}</view>
<view class="fs-flex1">周期:{{item.levelValue}}{{item.cycleName}}</view>
</view>
<view class="fs-flex fs-mt20">
<view class="fs-flex1">养护类型:{{item.maintainTypeName}}</view>
<view class="fs-flex1">养护等级:{{item.curingLevelName}}</view>
</view>
<view class="fs-flex__between fs-mt20">
<view class="fs-flex1">计划次数:{{item.planNum}}</view>
<view class="fs-flex1">完成次数:{{item.planFinishNum}}</view>
</view>
</view>
</view>
</view>
</z-paging>
</view>
</template>
<script>
// const QQMapWX = require('./utils/qqmap-wx-jssdk.js')
// 实例化API核心类
// let qqMap = new QQMapWX({
// key: 'H77BZ-RVOKL-UOXPH-EXMFC-5XSGT-YDFIC'
// });
import { hotlinecaseList } from '@/api/work'
import { useCounterStore } from '@/stores/counter'
export default {
data() {
return {
dataList: [],
qqmapsdk:null
}
},
onLoad() {
// this.qqmapsdk = new QQMapWX({
// key: 'H77BZ-RVOKL-UOXPH-EXMFC-5XSGT-YDFIC'
// })
},
onShow(){
if (this.$refs.paging) {
this.$refs.paging.refresh() // 重置到第一页并触发query事件
}
const address = '北京市海淀区中关村大街'
// this.qqmapsdk.geocoder({
// address: address,
// success: (res) => {
// if (res.status === 0) {
// this.location = res.result.location
// console.log('解析成功:', res.result.location)
// } else {
// console.error('解析失败:', res.message)
// }
// },
// fail: (err) => {
// console.error('接口调用失败:', err)
// }
// })
},
methods: {
// 获取巡检列表
queryList() {
const useCounter = useCounterStore()
console.log(useCounter.userInfo.userId)
const params = {
dispperson:useCounter.userInfo.userId,
taskstate:'gdtype02'
}
hotlinecaseList({data:params}).then(res => {
this.$refs.paging.complete(res.rows)
})
},
// 跳转详情
toDetails(planno) {
uni.$tui.href(`/pages/work/daily/inspection/details?planno=${planno}`)
},
// 跳转记录
toRecord(planno) {
uni.$tui.href(`/pages/work/daily/inspection/record?planno=${planno}`)
}
}
}
</script>
<style lang="scss" scoped>
.ul .li:first-child {
margin-top: 0;
}
</style>