Commit d8fce1e294c3b857e19a00524c3ff6d70b105543
1 parent
fa7a1f8d
页面onShow 加载
Showing
10 changed files
with
56 additions
and
52 deletions
pages/work/case/distribution.vue
1 | 1 | <template> |
2 | 2 | <view class="container"> |
3 | - <z-paging ref="paging" v-model="dataList" @query="queryList"> | |
3 | + <z-paging ref="paging" v-model="dataList" @query="queryList" :auto="false"> | |
4 | 4 | <view class="ul fs-p20"> |
5 | 5 | <view class="li fs-bg__white fs-p30 fs-size__h4 fs-radius__sm fs-mt20" v-for="(item, index) in dataList"> |
6 | 6 | <view @click="toDetails(item.problemNo)"> |
... | ... | @@ -61,6 +61,11 @@ export default { |
61 | 61 | onLoad() { |
62 | 62 | |
63 | 63 | }, |
64 | + onShow(){ | |
65 | + if (this.$refs.paging) { | |
66 | + this.$refs.paging.refresh() // 重置到第一页并触发query事件 | |
67 | + } | |
68 | + }, | |
64 | 69 | methods: { |
65 | 70 | // 获取记录列表 |
66 | 71 | queryList(pageNo, pageSize) { | ... | ... |
pages/work/case/maintain.vue
1 | 1 | <template> |
2 | 2 | <view class="container"> |
3 | - <z-paging ref="paging" v-model="dataList" @query="queryList"> | |
3 | + <z-paging ref="paging" v-model="dataList" @query="queryList" :auto="false"> | |
4 | 4 | <template #top> |
5 | 5 | <tui-tabs :tabs="tabsList" :currentTab="currentTab" :height="90" :padding="10" bold :scale="1.1" @change="change"></tui-tabs> |
6 | 6 | </template> |
... | ... | @@ -75,6 +75,11 @@ export default { |
75 | 75 | onLoad() { |
76 | 76 | |
77 | 77 | }, |
78 | + onShow(){ | |
79 | + if (this.$refs.paging) { | |
80 | + this.$refs.paging.refresh() // 重置到第一页并触发query事件 | |
81 | + } | |
82 | + }, | |
78 | 83 | methods: { |
79 | 84 | // 获取记录列表 |
80 | 85 | queryList(pageNo, pageSize) { | ... | ... |
pages/work/case/manage.vue
1 | 1 | <template> |
2 | 2 | <view class="container"> |
3 | - <z-paging ref="paging" v-model="dataList" @query="queryList"> | |
3 | + <z-paging ref="paging" v-model="dataList" @query="queryList" :auto="false"> | |
4 | 4 | <template #top> |
5 | 5 | <tui-tabs :tabs="tabsList" :currentTab="currentTab" :height="90" :padding="10" bold :scale="1.1" @change="change"></tui-tabs> |
6 | 6 | </template> |
... | ... | @@ -80,6 +80,11 @@ export default { |
80 | 80 | onLoad() { |
81 | 81 | |
82 | 82 | }, |
83 | + onShow(){ | |
84 | + if (this.$refs.paging) { | |
85 | + this.$refs.paging.refresh() // 重置到第一页并触发query事件 | |
86 | + } | |
87 | + }, | |
83 | 88 | methods: { |
84 | 89 | // 获取记录列表 |
85 | 90 | queryList(pageNo, pageSize) { | ... | ... |
pages/work/daily/history.vue
1 | 1 | <template> |
2 | 2 | <view class="container"> |
3 | - <z-paging ref="paging" v-model="dataList" @query="queryList"> | |
3 | + <z-paging ref="paging" v-model="dataList" @query="queryList" :auto="false"> | |
4 | 4 | <template #top> |
5 | 5 | <tui-tabs :tabs="tabsList" :currentTab="currentTab" :height="90" :padding="10" bold :scale="1.1" @change="change"></tui-tabs> |
6 | 6 | </template> |
... | ... | @@ -66,6 +66,11 @@ export default { |
66 | 66 | onLoad() { |
67 | 67 | |
68 | 68 | }, |
69 | + onShow(){ | |
70 | + if (this.$refs.paging) { | |
71 | + this.$refs.paging.refresh() // 重置到第一页并触发query事件 | |
72 | + } | |
73 | + }, | |
69 | 74 | methods: { |
70 | 75 | // 获取记录列表 |
71 | 76 | queryList(pageNo, pageSize) { | ... | ... |
pages/work/daily/inspection/details.vue
... | ... | @@ -38,7 +38,7 @@ |
38 | 38 | <tui-list-cell :hover="false" unlined> |
39 | 39 | <view class="fs-flex__between"><view>完成次数</view><view>{{info.planFinishNum}}</view></view> |
40 | 40 | </tui-list-cell> |
41 | - <view class="fs-mt60 fs-flex__center fs-safe__area"> | |
41 | + <view class="fs-mt60 fs-flex__center fs-safe__area" v-if="!info.planStatus"> | |
42 | 42 | <tui-button shape="circle" width="500rpx" height="80rpx" shadow @click="toAdd">添加巡检记录</tui-button> |
43 | 43 | </view> |
44 | 44 | </view> |
... | ... | @@ -49,16 +49,20 @@ import { apiInspectionDetail } from '@/api/work' |
49 | 49 | export default { |
50 | 50 | data() { |
51 | 51 | return { |
52 | - info: {} | |
52 | + info: {}, | |
53 | + planno:'' | |
53 | 54 | } |
54 | 55 | }, |
55 | 56 | onLoad(options) { |
56 | - this.getInspectionInfo(options.planno) | |
57 | + this.planno = options.planno | |
57 | 58 | }, |
59 | + onShow(){ | |
60 | + this.getInspectionInfo() | |
61 | + }, | |
58 | 62 | methods: { |
59 | 63 | // 获取巡检详情 |
60 | - getInspectionInfo(planno) { | |
61 | - apiInspectionDetail({data:{plan_no:planno}}).then(res => { | |
64 | + getInspectionInfo() { | |
65 | + apiInspectionDetail({data:{plan_no:this.planno}}).then(res => { | |
62 | 66 | this.info = res.data |
63 | 67 | }) |
64 | 68 | }, | ... | ... |
pages/work/daily/inspection/list.vue
1 | 1 | <template> |
2 | 2 | <view class="container"> |
3 | - <z-paging ref="paging" v-model="dataList" @query="queryList"> | |
3 | + <z-paging ref="paging" v-model="dataList" @query="queryList" :auto="false" > | |
4 | 4 | <template #top> |
5 | 5 | <tui-tabs :tabs="tabsList" :currentTab="currentTab" :height="90" :padding="10" bold :scale="1.1" @change="change"></tui-tabs> |
6 | 6 | </template> |
... | ... | @@ -51,6 +51,11 @@ export default { |
51 | 51 | onLoad() { |
52 | 52 | |
53 | 53 | }, |
54 | + onShow(){ | |
55 | + if (this.$refs.paging) { | |
56 | + this.$refs.paging.refresh() // 重置到第一页并触发query事件 | |
57 | + } | |
58 | + }, | |
54 | 59 | methods: { |
55 | 60 | // 获取巡检列表 |
56 | 61 | queryList(pageNo, pageSize) { | ... | ... |
pages/work/daily/maintain/details.vue
... | ... | @@ -46,16 +46,20 @@ import { apiInspectionDetail } from '@/api/work' |
46 | 46 | export default { |
47 | 47 | data() { |
48 | 48 | return { |
49 | - info: {} | |
49 | + info: {}, | |
50 | + planNo:'' | |
50 | 51 | } |
51 | 52 | }, |
52 | 53 | onLoad(options) { |
53 | - this.getInspectionInfo(options.planNo) | |
54 | + this.planNo = options.planNo | |
54 | 55 | }, |
56 | + onShow(){ | |
57 | + this.getInspectionInfo() | |
58 | + }, | |
55 | 59 | methods: { |
56 | 60 | // 获取养护详情 |
57 | - getInspectionInfo(planNo) { | |
58 | - apiInspectionDetail({data:{plan_no:planNo}}).then(res => { | |
61 | + getInspectionInfo() { | |
62 | + apiInspectionDetail({data:{plan_no: this.planNo}}).then(res => { | |
59 | 63 | this.info = res.data |
60 | 64 | }) |
61 | 65 | } | ... | ... |
pages/work/daily/maintain/list.vue
1 | 1 | <template> |
2 | 2 | <view class="container"> |
3 | - <z-paging ref="paging" v-model="dataList" @query="queryList"> | |
3 | + <z-paging ref="paging" v-model="dataList" @query="queryList" :auto="false"> | |
4 | 4 | <template #top> |
5 | 5 | <tui-tabs :tabs="tabsList" :currentTab="currentTab" :height="90" :padding="10" bold :scale="1.1" @change="change"></tui-tabs> |
6 | 6 | </template> |
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | <view class="fs-flex1">完成次数:{{item.planFinishNum}}</view> |
26 | 26 | </view> |
27 | 27 | </view> |
28 | - <view class="fs-mt20 fs-align__right"> | |
28 | + <view class="fs-mt20 fs-align__right" v-if="!item.planStatus"> | |
29 | 29 | <tui-tag type="primary" padding="12rpx 30rpx" shape="circle" plain @click="toSubList(item.planNo)">养护记录</tui-tag> |
30 | 30 | </view> |
31 | 31 | </view> |
... | ... | @@ -49,8 +49,13 @@ export default { |
49 | 49 | } |
50 | 50 | }, |
51 | 51 | onLoad() { |
52 | - | |
52 | + console.log('12312') | |
53 | 53 | }, |
54 | + onShow(){ | |
55 | + if (this.$refs.paging) { | |
56 | + this.$refs.paging.refresh() // 重置到第一页并触发query事件 | |
57 | + } | |
58 | + }, | |
54 | 59 | methods: { |
55 | 60 | // 获取养护列表 |
56 | 61 | queryList(pageNo, pageSize) { | ... | ... |
pages/work/index.vue
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | <image class="fs-mb10 icon" src="/static/images/work/itmeHome26.png"></image> |
16 | 16 | <text>养护计划</text> |
17 | 17 | </view> |
18 | - <view class="fs-flex__column fs-items__center item" @click="href('/pages/work/daily/reporting')"> | |
18 | + <view class="fs-flex__column fs-items__center item" v-if="inspectionRoles.includes(userInfo.postId)" @click="href('/pages/work/daily/reporting')"> | |
19 | 19 | <image class="fs-mb10 icon" src="/static/images/work/itmeHome10.png"></image> |
20 | 20 | <text>问题上报</text> |
21 | 21 | </view> | ... | ... |
subPackages/treePage/treeFiles.vue
... | ... | @@ -5,39 +5,10 @@ |
5 | 5 | <tui-input padding="0" :borderBottom="false" placeholder="请选择归属单位" disabled |
6 | 6 | backgroundColor="transparent" v-model="formData.companyId"></tui-input> |
7 | 7 | </tui-form-item> |
8 | -<!-- <tui-form-item prop="roadName" :bottom-border="false" label="道路名称">--> | |
9 | -<!--<!– <tui-input padding="0" :borderBottom="false" placeholder="请输入道路" maxlength="20" :clearable="true" :backgroundColor="#f5f5f5" :inputBorder="true" :radius="30"–>--> | |
10 | -<!--<!– v-model="formData.roadName" @confirm="searchChange" :left-icon="Search" >–>--> | |
11 | -<!--<!– <slot :name="left">123</slot>–>--> | |
12 | -<!--<!– </tui-input>–>--> | |
13 | - | |
14 | -<!-- <tui-input padding="0" :borderBottom="false" placeholder="请输入道路" maxlength="20" @confirm="searchChange"--> | |
15 | -<!-- v-model="formData.roadName">--> | |
16 | -<!--<!– <template v-slot:left>–>--> | |
17 | -<!--<!– <tui-icon name="search" :size="15" ></tui-icon>–>--> | |
18 | -<!--<!– </template>–>--> | |
19 | -<!-- </tui-input>--> | |
20 | -<!-- <template v-slot:right>--> | |
21 | -<!-- <tui-icon name="search" :size="20" @click="searchChange"></tui-icon>--> | |
22 | -<!--<!– <tui-form-button width="188rpx" height="64rpx" background="#f2f2f2" color="#5677fc" size="24"–>--> | |
23 | -<!--<!– bold radius="12rpx">获取验证码</tui-form-button>–>--> | |
24 | -<!-- </template>--> | |
25 | - | |
26 | -<!-- </tui-form-item>--> | |
27 | - | |
28 | - | |
29 | 8 | </tui-form> |
30 | 9 | |
31 | 10 | <tui-searchbar radius="40rpx" height="64rpx" placeholder="请输入道路名称" @search="getSeach" @clear="setSeach"></tui-searchbar> |
32 | 11 | |
33 | - <!-- <tui-row marginTop="10px" :gutter="5" class="full-height-row">--> | |
34 | - <!-- <tui-col :span="8" class="left-con full-height-col" >--> | |
35 | - <!-- <view class="full-height-col left-con">1</view>--> | |
36 | - <!-- </tui-col>--> | |
37 | - <!-- <tui-col :span="16" class="right-con full-height-col" >--> | |
38 | - <!-- <view class="full-height-col">2</view>--> | |
39 | - <!-- </tui-col>--> | |
40 | - <!-- </tui-row>--> | |
41 | 12 | |
42 | 13 | <view class="full-height-row"> |
43 | 14 | <view class="full-height-col left-con"> |
... | ... | @@ -133,10 +104,6 @@ export default { |
133 | 104 | console.log(treeCount) |
134 | 105 | uni.$tui.href(`/subPackages/treePage/treeRecord?roadId=${roadId}&count=${treeCount}`) |
135 | 106 | }, |
136 | - // 搜索 | |
137 | - searchChange() { | |
138 | - this.deptListQuery() | |
139 | - }, | |
140 | 107 | // 归属班组 |
141 | 108 | deptListQuery() { |
142 | 109 | deptListReq({data: {companyId: this.companyId, roadName: this.formData.roadName}}).then(res => { |
... | ... | @@ -164,7 +131,6 @@ export default { |
164 | 131 | this.show = false |
165 | 132 | }, |
166 | 133 | pickerChange(e) { |
167 | - | |
168 | 134 | this.formData.companyId = e.dictLabel |
169 | 135 | this.companyId = e.dictValue |
170 | 136 | console.log(this.companyId) | ... | ... |