123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <template>
- <view>
- <view style="height:30rpx"></view>
- <view class="bg-white plan-sec text-center" style="margin:0rpx 30rpx 30rpx 30rpx">
- <view class="plan-tit padding-top-lg">{{getData.plan_name}}</view>
- <br>
- <chart2 :bindData="this.getData" v-if=" JSON.stringify(getData) != '{}'"></chart2>
- </view>
- <view class="margin bg-white plan-sec">
- <view class="info-tit margin-left-xs">
- <text class="cuIcon-titles margin-right-xs"></text>
- 维保详情
- </view>
- <view class="cu-list menu-avatar">
- <view class="cu-item deviceTypeItem" v-for="(item,index) in planList" :key="index"
- @tap="goDetailPage(item)">
- <view class="content" style="left:0!important;width:80%">
- <view class="title">{{item.spot_name}}</view>
- </view>
- <view class="nav-right num">
- <view class="text-grey">
- <span class="online" v-if="item.data3==2">已执行</span>
- <span class="error" v-if="item.data3==1">未执行</span>
- <text class="icon iconfont margin-right-xs "></text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import chart from './components/chart.vue';
- import chart2 from './components/chart2.vue';
- import json from '../../../data/json.js';
- export default {
- components: {
- chart,chart2
- },
- data() {
- return {
- inspectList: json.weiBaoPlan,
- getData:{},
- planList:[]
- };
- },
- onBackPress(event) {
- uni.reLaunch({
- url: "/"
- })
- return true;
- },
- onLoad:function(option){
- this.getPlanList({'company_code':uni.getStorageSync('selectedCode'),"id":option.id})
- },
- methods: {
-
- // 维保计划列表数据请求
- async getPlanList(params = {}) {
- const res = await this.$myRequest({
- url: 'Maintenance/getMaintenanceDetails',
- data:params,
- showLoading: true
- })
- this.getData=res.data.data[0];
- this.planList=this.getData.point;
- console.log(this.planList)
- },
-
- goDetailPage(item) {
- if (item.data3==2) {
- uni.navigateTo({
- url: "/pages/weiBao/planDetailDone/planDetailDone?id="+item.id+'&zb_id='+this.getData.id,
- })
-
- } else {
- uni.navigateTo({
- url: "/pages/weiBao/planDetail/planDetail?id="+item.id+'&zb_id='+this.getData.id,
- })
- }
- }
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #F4F5F7;
- }
- </style>
|