Blame view

pages/work/daily/step.vue 1.04 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
  <template>
  	<view class="fs-p48">
  		<tui-steps :type="2" bold :activeSteps="activeStep" direction="column" :items="list" titleField="stepRemark"></tui-steps>
  	</view>
  </template>
  
  <script>
  import { apiTaskStep } from '@/api/work'
  export default {
  	data() {
  		return {
  			activeStep: 0,
  			list: []
  		}
  	},
  	onLoad(options) {
  		this.getTaskStep(options.problem_no)
  	},
  	methods: {
  		// 获取问题进度
  		getTaskStep(problem_no) {
  			apiTaskStep({data:{problem_no}}).then(res => {
  				this.activeStep = res.data.list.length - 1
  				res.data.list.forEach(item => {
  					if (item.commitDate) {
  						item.descr = item.commitDate + ' ' + item.userName + ' ' + item.eventStatus 
  						if (item.taskRejectRemark) {
  							item.desct =  '拒绝原因:' + item.taskRejectRemark 
  						}
  						if (item.staffRejectRemark) {
  							item.desct =  '拒绝原因:' + item.staffRejectRemark 
  						}
  					} else {
  						item.descr = '--'
  					}
  				})
  				this.list = res.data.list
  			})
  		}
  	}
  }
  </script>
  
  <style lang="scss">
  page {
  	background-color: #FFF;
  }
  </style>