fix : 修复确认按钮防抖
This commit is contained in:
@@ -310,7 +310,7 @@
|
||||
import {ElLoading, ElMessage} from "element-plus";
|
||||
import {getEquipmentList, editEquipment, getTunnelDetail} from "@/api/tunnelManage";
|
||||
import TunnelTitle from "@/components/tunnelTitle/index.vue";
|
||||
|
||||
import { debounce } from 'lodash'
|
||||
const router = useRouter()
|
||||
const tunnelId = reactive(router.currentRoute.value.params.tunnelId)
|
||||
const userId = reactive(router.currentRoute.value.params.userId)
|
||||
@@ -373,7 +373,7 @@ const changeData = (item) => {
|
||||
state: item.state,
|
||||
}
|
||||
}
|
||||
const editEquip = () => {
|
||||
const editEquip = debounce(() => {
|
||||
let newFrequency = [{
|
||||
acquisitionPeriod: fanFrequency.value * 1000,
|
||||
tunnelId: parseInt(tunnelId),
|
||||
@@ -393,7 +393,7 @@ const editEquip = () => {
|
||||
fanData.value.forEach(item => {
|
||||
let obj = {
|
||||
equipmentId: item.equipmentId,
|
||||
ratedPower:parseInt(item.ratedPower),
|
||||
ratedPower: parseInt(item.ratedPower),
|
||||
acurrentValue: parseInt(item.acurrentValue),
|
||||
bcurrentValue: parseInt(item.bcurrentValue),
|
||||
ccurrentValue: parseInt(item.ccurrentValue),
|
||||
@@ -423,7 +423,7 @@ const editEquip = () => {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
|
||||
const handleChangeMenu = (e) => {
|
||||
changeIndex.value = e
|
||||
|
||||
Reference in New Issue
Block a user