From ee42bf1badae06026efa79dc17d2a541297ab49b Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期三, 03 九月 2025 17:43:31 +0800 Subject: [PATCH] 采购管理整体样式优化,搜索条件修改 --- src/pages/equipmentManagement/repair/index.vue | 83 ++++++++++++++++++++--------------------- 1 files changed, 40 insertions(+), 43 deletions(-) diff --git a/src/pages/equipmentManagement/repair/index.vue b/src/pages/equipmentManagement/repair/index.vue index d4ce7be..c844d4b 100644 --- a/src/pages/equipmentManagement/repair/index.vue +++ b/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, @@ -186,6 +152,7 @@ // 鏌ヨ鍒楄〃 const getList = () => { + showLoadingToast('鍔犺浇涓�...') const params = { current: -1, size: -1, @@ -194,11 +161,26 @@ getRepairPage(params) .then((res) => { repairList.value = res.records || res.data?.records || [] + closeToast() }) .catch(() => { + closeToast() showToast('鑾峰彇鏁版嵁澶辫触') }) } + +// 鏄剧ず鍔犺浇鎻愮ず +const showLoadingToast = (message) => { + uni.showLoading({ + title: message, + mask: true + }); +}; + +// 鍏抽棴鎻愮ず +const closeToast = () => { + uni.hideLoading(); +}; // 鏂板缁翠慨 - 璺宠浆鍒扮淮淇〉闈� const addMaintain = (id) => { @@ -411,4 +393,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> \ No newline at end of file -- Gitblit v1.9.3