gaoluyang
17 小时以前 ee42bf1badae06026efa79dc17d2a541297ab49b
src/pages/equipmentManagement/upkeep/index.vue
@@ -168,6 +168,7 @@
// 查询列表
const getList = () => {
  showLoadingToast('加载中...')
  const params = {
    current: -1,
    size: -1,
@@ -177,12 +178,27 @@
    .then((res) => {
      // 如果res.data不是数组,设置为空数组
      upkeepList.value = res.records || res.data?.records || []
      closeToast()
    })
    .catch(() => {
      closeToast()
      showToast('获取数据失败')
    })
}
// 显示加载提示
const showLoadingToast = (message) => {
  uni.showLoading({
    title: message,
    mask: true
  });
};
// 关闭提示
const closeToast = () => {
  uni.hideLoading();
};
// 切换选择状态
const toggleSelection = (item) => {
  const index = multipleList.value.findIndex(selected => selected.id === item.id)