gaoluyang
2 天以前 025e46e11cb2962fd7692adfa401333758cc779b
src/pages/equipmentManagement/repair/index.vue
@@ -33,38 +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>
              <!-- 操作按钮 -->
              <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>
            </view>
          </view>
          <up-divider></up-divider>
@@ -102,15 +72,15 @@
          
          <!-- 按钮区域 -->
          <view class="action-buttons">
            <van-button
            <u-button
              type="primary"
              size="small"
              class="action-btn"
              @click="edit(item.id)"
            >
              编辑
            </van-button>
            <van-button
            </u-button>
            <u-button
              type="warning"
              size="small"
              class="action-btn"
@@ -118,16 +88,16 @@
              @click="addMaintain(item.id)"
            >
              新增维修
            </van-button>
            <van-button
              type="danger"
            </u-button>
            <u-button
              type="error"
              size="small"
              plain
              class="action-btn"
              @click="delRepairByIds(item.id)"
            >
              删除
            </van-button>
            </u-button>
          </view>
        </view>
      </view>
@@ -136,9 +106,8 @@
    <view v-else class="no-data">
      <text>暂无设备报修数据</text>
    </view>
    <!-- 浮动气泡按钮 -->
    <view class="fab-button" @click="addRepair">
    <!-- 浮动操作按钮 -->
      <view class="fab-button" @click="addRepair">
         <up-icon name="plus" size="24" color="#ffffff"></up-icon>
      </view>
  </view>
@@ -150,10 +119,7 @@
import PageHeader from '@/components/PageHeader.vue'
import { getRepairPage, delRepair } from '@/api/equipmentManagement/repair'
import useUserStore from "@/store/modules/user"
// 替换 Vant 的 toast
// import { showToast } from 'vant';
// 替换 toast 方法
const showToast = (message) => {
  uni.showToast({
    title: message,
@@ -411,4 +377,19 @@
.action-btn {
  flex: 1;
}
.fab-button {
   position: fixed;
   bottom: calc(30px + env(safe-area-inset-bottom));
   right: 30px;
   width: 56px;
   height: 56px;
   background: #2979ff;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   box-shadow: 0 4px 16px rgba(41, 121, 255, 0.3);
   z-index: 1000;
   /* 确保浮动按钮不被底部安全区域遮挡 */
}
</style>