12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <template>
- <view class="">
- <view class="cu-list menu-avatar">
- <view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in this.getData"
- :key="index" :data-target="'move-box-' + index" @tap="goDetail(item)">
- <view class="content" style="left:0;width:80%">
- <view class="pro-title">
- <view class="cut">计划:{{item.plan_name}}</view>
- </view>
- <view class="pro-des ">
- <view class="text-cut">
- 点位:{{item.spot_name}}
- </view>
- </view>
- <view class="pro-date ">{{item.wc_time}}</view>
- </view>
- <view class="nav-right num margin-right-sm">
- <view class="text-grey">
- <button class="cu-btn radius bg-green sm" v-if="item.spot_abnormal==0">正常</button>
- <button class="cu-btn radius bg-orange sm" v-if="item.spot_abnormal==1">异常</button>
- <button class="cu-btn radius bg-red sm" v-if="item.spot_abnormal==2">故障</button>
- <button class="cu-btn radius bg-orange sm" v-if="item.spot_abnormal==3">其他</button>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import json from '../../../data/json.js';
- export default {
- data() {
- return {
- modalName: null,
- getData:[]
- };
- },
-
- onLoad:function(option){
- this.goRecordList({'company_code':uni.getStorageSync('selectedCode')})
- },
- onNavigationBarButtonTap(e) {
- console.log(e)
- uni.navigateTo({
- url: '/pages/export/export',
-
- });
- },
- methods: {
-
- // 巡检记录列表数据请求
- async goRecordList(params = {}) {
- const res = await this.$myRequest({
- url: 'Inspection/getInspectionRecordList',
- data:params,
- showLoading: true
- })
- this.getData=res.data.data;
- console.log(this.getData);
- },
-
- // 页面跳转
- goDetail(item) {
- uni.navigateTo({
- url: '/pages/xunJian/recordDetail/recordDetail?id='+item.id,
- });
- },
- }
- }
- </script>
- <style lang="scss">
- .cu-item{
- height:180rpx!important
- }
- </style>
|