| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <template>
- <view>
- <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="检查详情" @clickLeft="back"></uni-nav-bar>
- <view class="check-content">
- <view class="title">
- <text>{{ equiName }}</text>
- <text>{{ equiCode }}</text>
- </view>
- <view class="check-list">
- <CheckCard v-for="(item, index) in equipList" :item="item" class="mb20" :index="index" type="view">
- </CheckCard>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- getDeviceInfo,
- mattersChecked
- } from '@/api/myTicket/index.js'
- import {
- post
- } from '@/utils/api.js'
- import CheckCard from './components/CheckCard.vue'
- export default {
- components: {
- CheckCard
- },
- data() {
- return {
- id: '',
- pageId: '',
- page: 1,
- equipList: [],
- isEnd: false,
- equiName: '',
- equiCode: '',
- workOrderId: ''
- }
- },
- onLoad(options) {
- this.id = options.id
- // this.equiName = options.equiName
- // this.equiCode = options.equiCode
- // this.workOrderId = +options.workOrderId
- this.getList()
- },
- onReachBottom() {
- if (this.isEnd) return
- this.page++
- this.getList()
- },
- methods: {
- getList() {
- getDeviceInfo({
- id: this.id
- }).then(data => {
- this.equiName = data.name
- this.equiCode = data.code
- this.equipList = data.workItems.map(item => {
- return {
- ...item,
- id: data.id,
- executeStatus: 1
- }
- })
- })
- // const { page } = this
- // post(
- // this.apiUrl +
- // `/workOrder/getEquipmentItemsListApp?size=10&page=${page}`,
- // { planEquiId: +this.pageId, workOrderId: this.workOrderId },
- // true
- // ).then(res => {
- // if (res?.success) {
- // if (page === 1) {
- // this.equipList = res.data.records
- // } else {
- // this.equipList.push(...res.data.records)
- // }
- // this.isEnd = this.equipList.length >= res.data.total
- // }
- // })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .check-content {
- box-sizing: border-box;
- // height: calc(100vh - 88rpx);
- display: flex;
- flex-direction: column;
- .title {
- line-height: 80rpx;
- display: flex;
- justify-content: space-between;
- padding: 0 30rpx;
- font-size: 28rpx;
- }
- .check-list {
- flex: 1;
- overflow: auto;
- padding: 0 30rpx 30rpx;
- }
- .footer {
- height: 100rpx;
- display: flex;
- border: 1rpx solid $j-primary-border-green;
- .btn {
- display: flex;
- flex: 1;
- justify-content: center;
- align-items: center;
- border-radius: 0;
- &.primary {
- background-color: $j-primary-border-green;
- color: #fff;
- }
- }
- }
- .mb20 {
- margin-bottom: 20rpx;
- }
- }
- </style>
|