fix(operator): fix operator edit issue
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m25s

This commit is contained in:
sexygoat
2026-04-10 15:06:28 +08:00
parent 2b3119c549
commit 8b30341d50
8 changed files with 320 additions and 86 deletions

View File

@@ -39,7 +39,6 @@ export function useAssetOperations(cardInfo: Ref<any>, refreshAssetFn?: () => Pr
} catch (error: any) {
if (error !== 'cancel') {
console.error('启用失败:', error)
ElMessage.error(error?.message || '启用失败')
}
} finally {
enableCardLoading.value = false
@@ -66,7 +65,6 @@ export function useAssetOperations(cardInfo: Ref<any>, refreshAssetFn?: () => Pr
} catch (error: any) {
if (error !== 'cancel') {
console.error('停用失败:', error)
ElMessage.error(error?.message || '停用失败')
}
} finally {
disableCardLoading.value = false
@@ -128,7 +126,6 @@ export function useAssetOperations(cardInfo: Ref<any>, refreshAssetFn?: () => Pr
} catch (error: any) {
if (error !== 'cancel') {
console.error('重启失败:', error)
ElMessage.error(error?.message || '重启失败')
}
} finally {
rebootDeviceLoading.value = false
@@ -157,7 +154,6 @@ export function useAssetOperations(cardInfo: Ref<any>, refreshAssetFn?: () => Pr
} catch (error: any) {
if (error !== 'cancel') {
console.error('恢复出厂失败:', error)
ElMessage.error(error?.message || '恢复出厂失败')
}
} finally {
resetDeviceLoading.value = false
@@ -224,10 +220,16 @@ export function useAssetOperations(cardInfo: Ref<any>, refreshAssetFn?: () => Pr
/**
* Configure WiFi settings
*/
const setWiFi = async (form: { enabled: number; ssid: string; password: string }) => {
const setWiFi = async (form: {
card_no: string
enabled: number
ssid: string
password: string
}) => {
try {
setWiFiLoading.value = true
const res = await DeviceService.setWiFi(cardInfo.value.imei, {
card_no: form.card_no,
enabled: form.enabled,
ssid: form.ssid,
password: form.password