78 lines
1.7 KiB
Python
78 lines
1.7 KiB
Python
<template>
|
|
<view class="wrap">
|
|
<u-card v-for="(item, index) in myinspecttaskList" v-bind:key="index" :title="item.name" margin="6rpx"
|
|
:border="false" :foot-border-top="false" border-radius="2rpx" :head-style="headstyle"
|
|
@body-click="taskClick" :index="item.id">
|
|
<view class="" slot="body">
|
|
<view class="u-body-item-title">
|
|
<span style="color:#2979FF;font-weight: bold;margin-right: 8rpx;">{{item.state}}</span>
|
|
{{item.name}}
|
|
</view>
|
|
<view class="u-body-item">
|
|
所属任务:
|
|
<span>{{item.inspecttask_.name}}</span>
|
|
</view>
|
|
<view class="u-body-item">
|
|
检查期限:
|
|
<span>{{item.inspecttask_.start_date}}</span>至
|
|
<span>{{item.inspecttask_.end_date}}</span>
|
|
</view>
|
|
<view class="u-body-item">
|
|
涉及单位:
|
|
<span style="color:blue;">{{item.depts_count}}</span>家
|
|
巡查组:
|
|
<span style="color:blue;">{{item.members.length}}</span>人
|
|
</view>
|
|
</view>
|
|
</u-card>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
myinspecttaskList: [],
|
|
headstyle: {
|
|
"padding-top": "12rpx",
|
|
"padding-bottom": "12rpx"
|
|
}
|
|
}
|
|
},
|
|
onShow() {
|
|
this.getMyInspectTaskList();
|
|
},
|
|
methods: {
|
|
getMyInspectTaskList() {
|
|
this.$u.api.getMyInspectTaskList({}).then(res => {
|
|
this.myinspecttaskList = res.data
|
|
}).catch(e => {})
|
|
},
|
|
taskClick(index) {
|
|
uni.navigateTo({
|
|
url:"/pages/subtask/subtaskdetail?id="+index
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
<style>
|
|
page{
|
|
background-color: #ededed;
|
|
}
|
|
</style>
|
|
<style lang="scss" scoped>
|
|
.u-body-item-title {
|
|
font-size: 32rpx;
|
|
color: #333;
|
|
}
|
|
|
|
.u-body-item {
|
|
margin-top: 4rpx;
|
|
span {
|
|
color: #333;
|
|
}
|
|
}
|
|
</style>
|
|
|