车间能级提升-智能设备管理系统
zhuguifei
2025-05-13 14681dfe7052cb76eefcc0c17d0a0d708e1ac9dd
eims-ui-mobile/src/pages/maint/maint-st.vue
@@ -52,7 +52,7 @@
            </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>
@@ -61,9 +61,7 @@
                <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>
@@ -76,13 +74,29 @@
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')
@@ -117,6 +131,10 @@
  if (status.value === '-1') {
    delete params.status
  }
  // 如果是从扫码页面过来,只能查询固定设备的数据
  if (option?.from === 'scan') {
    params.assetNo = option.assetNo
  }
  getMaintStList(params)
    .then((res: any) => {
@@ -140,7 +158,8 @@
function reloadData() {
  paging.value.reload()
}
onLoad(() => {
onLoad((options) => {
  Object.assign(option, options)
  uni.$on('maint-st-refresh', reloadData)
})
onUnload(() => {