gaoluyang
6 天以前 7a0ffb0048adeda9ebfbca1d0b525eb224c173e3
src/pages/equipmentManagement/upkeep/index.vue
@@ -33,46 +33,8 @@
              <text class="item-id">设备名称:{{ item.deviceName }}</text>
            </view>
            <view class="status-tag">
              <!-- 替换标签和按钮 -->
              <!-- 状态标签 -->
              <u-tag v-if="item.status === 1" type="success">完结</u-tag>
              <u-tag v-if="item.status === 0" type="error">待保养</u-tag>
              <!-- 保养结果标签 -->
              <u-tag v-if="item.maintenanceResult === 1" type="success">
                完好
              </u-tag>
              <u-tag v-if="item.maintenanceResult === 0" type="error">
                维修
              </u-tag>
              <!-- 操作按钮 -->
              <view class="action-buttons">
                <u-button
                  type="primary"
                  size="small"
                  class="action-btn"
                  @click="openForm('add')"
                >
                  新增保养
                </u-button>
                <u-button
                  type="warning"
                  size="small"
                  class="action-btn"
                  @click="openForm('edit', item)"
                >
                  编辑
                </u-button>
                <u-button
                  type="success"
                  size="small"
                  class="action-btn"
                  @click="maintain(item)"
                >
                  保养
                </u-button>
              </view>
              <van-tag v-if="item.status === 1" type="success">完结</van-tag>
              <van-tag v-if="item.status === 0" type="danger">待保养</van-tag>
            </view>
          </view>
          <up-divider></up-divider>
@@ -152,10 +114,13 @@
    <view v-else class="no-data">
      <text>暂无设备保养数据</text>
    </view>
    <view class="fab-button" @click="addPlan">
         <up-icon name="plus" size="24" color="#ffffff"></up-icon>
      </view>
    <!-- 浮动气泡按钮 -->
    <van-floating-bubble
      axis="xy"
      icon="plus"
      @click="addPlan"
    />
  </view>
</template>
@@ -165,15 +130,7 @@
import PageHeader from '@/components/PageHeader.vue'
import { getUpkeepPage, delUpkeep } from '@/api/equipmentManagement/upkeep'
import useUserStore from "@/store/modules/user"
// 替换 Vant 的 toast
// import { showToast } from 'vant';
// 替换 toast 方法
const showToast = (message) => {
  uni.showToast({
    title: message,
    icon: 'none'
  })
}
import { showToast } from 'vant';
import dayjs from "dayjs"
const userStore = useUserStore()