74 lines
2.5 KiB
Vue
74 lines
2.5 KiB
Vue
<template>
|
||
<view>
|
||
<view v-if="list.length > 0">
|
||
<view v-for="(item, index) in list" :key="index">
|
||
<view class="item">
|
||
<view class="item-top">
|
||
<view>任务编号:{{ item.task_no }}</view>
|
||
<view> 任务类型:{{ item.task_type }}</view>
|
||
</view>
|
||
<view class="item-content">
|
||
<view class="item-content-left">
|
||
<view>任务名称:{{ item.task_name }}</view>
|
||
<view>路线编号:{{ item.task_name }}</view>
|
||
<view>路线名称:{{ item.task_name }}</view>
|
||
<view>任务开始时间:{{ item.task_name }}</view>
|
||
<view>任务结束时间:{{ item.task_name }}</view>
|
||
<view>巡检人:{{ item.task_name }}</view>
|
||
<view>任务描述:{{ item.task_name }}</view>
|
||
</view>
|
||
<view class="item-content-right">
|
||
<button class="Btn" @click="goInspection(item)">去巡检</button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view v-else>
|
||
<view class="empty">
|
||
<image
|
||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_nearbyList_empty.png"
|
||
mode="aspectFill"></image>
|
||
暂无数据
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
<script>
|
||
import {
|
||
request,
|
||
picUrl,
|
||
uniqueByField,
|
||
menuButtonInfo,
|
||
NavgateTo,
|
||
} from "../../../utils";
|
||
|
||
import { apiArr } from "../../../api/community";
|
||
|
||
export default {
|
||
data() {
|
||
return {
|
||
list: []
|
||
}
|
||
},
|
||
onLoad(options) {
|
||
this.communityId = JSON.parse(options.communityId);
|
||
},
|
||
methods: {
|
||
async getList() {
|
||
const res = await request(apiArr.routingInspectionList, "POST", {
|
||
user_id: uni.getStorageSync('userId'),
|
||
community_id: this.communityId,
|
||
});
|
||
this.list = res.rows;
|
||
},
|
||
goInspection(item) {
|
||
NavgateTo('/packages/workOrderDashboard/addRoutingInspection/index?item=' + JSON.stringify(item),)
|
||
}
|
||
},
|
||
}
|
||
</script>
|
||
|
||
<style>
|
||
@import url("./index.css");
|
||
</style> |