Blame view

pages/work/daily/maintain/record.vue 1.76 KB
46b6767c   刘淇   init 提交到库
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
  <template>
  	<view class="container">
  		<z-paging ref="paging" v-model="dataList" @query="queryList">
  		<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.id)">
  					<view class="fs-flex fs-mt20">
  						<view class="fs-flex1">编码:{{item.maintainNo}}</view>
  						<view class="fs-flex1">植物类型:{{item.plantTypeName}}</view>
  					</view>
  					<view class="fs-flex fs-mt20">
  						<view class="fs-flex1">操作人:{{item.userName}}</view>
  						<view class="fs-flex1">完成比例:{{item.currentFinishPercent}}%</view>
  					</view>
  					<view class="fs-flex fs-mt20">
  						<view class="fs-flex1">提交时间:{{item.commitDate}}</view>
  					</view>
  				</view>
  			</view>
  		</view>
  		</z-paging>
  	</view>
  </template>
  
  <script>
  import { apiMaintainRecord } from '@/api/work'
  export default {
  	data() {
  		return {
  			maintainNo: '',
  			currentPlanNum: 0,
  			maintainTypeId: 0,
  			dataList: []
  		}
  	},
  	onLoad(options) {
  		this.maintainNo = options.plan_no
  		this.currentPlanNum = options.current_plan_num
  		this.maintainTypeId = options.maintainTypeId
  	},
  	methods: {
  		// 获取养护记录
  		queryList(pageNo, pageSize) {
  			const params = {
  				pageReq: {isAsc: 'desc', orderByColumn: 'id', pageNum: pageNo, pageSize: pageSize},
  				maintainNo: this.maintainNo,
  				currentPlanNum: this.currentPlanNum,
  				// maintainTypeId: this.maintainTypeId,
  				sourceType: 1
  			}
  			apiMaintainRecord({data:params}).then(res => {
  				this.$refs.paging.complete(res.rows)
  			})
  		},
  		// 跳转详情
  		toDetails(id) {
  			uni.$tui.href(`/pages/work/daily/maintain/recordDetails?id=${id}`)
  		}
  	}
  }
  </script>
  
  <style lang="scss" scoped>
  .ul .li:first-child {
  	margin-top: 0;
  }
  </style>