| | |
| | | <template> |
| | | <view class="card_box"> |
| | | <z-paging ref="pagingRef" v-model="list" :fixed="false" :auto-show-back-to-top="true" @query="getList"> |
| | | <ProductCard v-for="(item, index) in list" :key="index" :data="item" :map="map" |
| | | @click="toDetail(item.id, item.deviceType)" /> |
| | | <z-paging |
| | | ref="pagingRef" |
| | | v-model="list" |
| | | :fixed="false" |
| | | :auto-show-back-to-top="true" |
| | | @query="getList" |
| | | > |
| | | <ProductCard |
| | | v-for="(item, index) in list" |
| | | :key="index" |
| | | :data="item" |
| | | :map="map" |
| | | @click="toDetail(item.id, item.deviceType)" |
| | | /> |
| | | </z-paging> |
| | | <wd-toast /> |
| | | </view> |
| | |
| | | outputNumber: "outputNumber", |
| | | inspectPerson: "inspectPerson", |
| | | status: "status", |
| | | productType: "productType", |
| | | recordPosition: "recordPosition", |
| | | rejectList: [ |
| | | { |
| | | rejectPerson: "rejectPerson", |
| | | rejectTime: "rejectTime", |
| | | rejectReason: { |
| | | reason: "reason" |
| | | reason: "reason", |
| | | }, |
| | | }, |
| | | ], // 改为对象,包含所需的嵌套属性 |
| | |
| | | const list = ref<any[]>([]); |
| | | |
| | | const toDetail = (id: number, deviceType: number) => { |
| | | console.log('点击卡片', id, deviceType); |
| | | console.log("点击卡片", id, deviceType); |
| | | if (deviceType == 1) { |
| | | // 绞线 |
| | | uni.navigateTo({ |
| | |
| | | } |
| | | }; |
| | | |
| | | const getList = async () => { |
| | | const getList = async (pageNo = 1, pageSize = 10) => { |
| | | const { code, data } = await props.api({ |
| | | deviceModel: props.ProList.deviceModel, |
| | | status: "0", |
| | | deviceType: props.ProList.deviceType, |
| | | teamName: props.ProList.teamName || "", // 班组名称搜索 |
| | | current: pageNo, |
| | | size: pageSize, |
| | | }); |
| | | if (code == 200) { |
| | | map.deviceModel = "deviceModel"; |
| | |
| | | map.poleNumber = "poleNumber"; |
| | | map.outputNumber = "outputNumber"; |
| | | map.inspectPerson = "inspectPerson"; |
| | | map.productType = "productType"; |
| | | map.recordPosition = "recordPosition"; |
| | | map.rejectList = [ |
| | | { |
| | | rejectPerson: "rejectPerson", |
| | | rejectTime: "rejectTime", |
| | | rejectReason: { |
| | | reason: "reason" |
| | | reason: "reason", |
| | | }, |
| | | }, |
| | | ]; |
| | |
| | | if (data.total == 0) { |
| | | pagingRef.value.complete(true); |
| | | } else { |
| | | console.log('data.records', data.records); |
| | | console.log("data.records", data.records); |
| | | pagingRef.value.complete(data.records); |
| | | } |
| | | } |