| | |
| | | </view> |
| | | <view class="text-color-gray text-xs mt-2 flex"> |
| | | <text>状态:</text> |
| | | <template v-if="item.status=== '1'"> |
| | | <template v-if="item.status === '1'"> |
| | | <wd-icon class="icon-color-success" name="check-outline" size="34rpx"></wd-icon> |
| | | <text class="ml-1">已完成</text> |
| | | </template> |
| | |
| | | <text class="ml-1">进行中</text> |
| | | </template> |
| | | </view> |
| | | <view class="text-color-gray text-xs mt-2 flex"> |
| | | 创建时间: {{item.createTime}} |
| | | </view> |
| | | <view class="text-color-gray text-xs mt-2 flex">创建时间: {{ item.createTime }}</view> |
| | | </view> |
| | | <wd-button size="small" icon="edit-outline" @click.stop="itemClick(item)">明细</wd-button> |
| | | </view> |
| | |
| | | import { ref } from 'vue' |
| | | import { getMaintStList } from '@/service/maint' |
| | | |
| | | /** |
| | | * 其他页面传过来的数据 |
| | | * assetNo: 资产编号 |
| | | * from: 是否是扫码进来的,如果是扫码进来,只能查询固定设备的数据 |
| | | */ |
| | | interface PageParams { |
| | | assetNo?: string |
| | | from?: string |
| | | } |
| | | |
| | | interface QueryParams { |
| | | pageNum: number |
| | | pageSize: number |
| | | assetNo?: string |
| | | equName?: string |
| | | status?: string |
| | | } |
| | | |
| | | // 页面参数,上个页面传递过来的参数 |
| | | const option = reactive<PageParams>({ |
| | | assetNo: '', |
| | | from: '', |
| | | }) |
| | | const status = ref<string>('-1') |
| | | const equName = ref<string>('-1') |
| | | |
| | |
| | | if (status.value === '-1') { |
| | | delete params.status |
| | | } |
| | | // 如果是从扫码页面过来,只能查询固定设备的数据 |
| | | if (option?.from === 'scan') { |
| | | params.assetNo = option.assetNo |
| | | } |
| | | |
| | | getMaintStList(params) |
| | | .then((res: any) => { |
| | |
| | | function reloadData() { |
| | | paging.value.reload() |
| | | } |
| | | onLoad(() => { |
| | | onLoad((options) => { |
| | | Object.assign(option, options) |
| | | uni.$on('maint-st-refresh', reloadData) |
| | | }) |
| | | onUnload(() => { |