Browse Source

fix: 时间清空问题

main
betaqi 1 month ago
parent
commit
43a3f8fdd0
  1. 15
      src/views/stationData/topology/components/detailDrawer.vue
  2. 1
      src/views/stationData/transfer/components/deviceDrawer.vue

15
src/views/stationData/topology/components/detailDrawer.vue

@ -128,6 +128,7 @@ async function open(device: IDevice & { @@ -128,6 +128,7 @@ async function open(device: IDevice & {
}
const selectValue = ref()
function onchangeSelect(value: string) {
PointCheckboxRef.value?.clearCheck()
}
@ -216,25 +217,26 @@ async function loadChardData() { @@ -216,25 +217,26 @@ async function loadChardData() {
clearData()
const limit = chartLimit.value
const offset = chartOffset.value
const options = {
const options: any = {
columns: columParams.value,
isLocal: !curDevice.value?.isonLine,
host: curDevice.value?.isonLine ? (curDevice.value as IOnlineDevice).clientIp : '',
name: selectValue.value as string,
name: currentGroup.value?.customNode ? selectValue.value : currentGroup.value?.name as string,
startTime: time.value[0],
endTime: time.value[1],
}
if (env.VITE_APP_ENV !== 'local' || !curDevice.value?.isonLine) {
options.site_id = curDevice.value!.siteName || ''
options.device_id = curDevice.value?.sn || ''
}
const params: IGetDeviceDataParams = {
...options,
limit,
offset
}
if (env.VITE_APP_ENV !== 'local' || !curDevice.value?.isonLine) {
params.site_id = curDevice.value!.siteName || ''
params.device_id = curDevice.value?.sn || ''
}
loadingChart.value = true
isShowChart.value = false
@ -325,6 +327,7 @@ function handleBeforeClose(done: () => void) { @@ -325,6 +327,7 @@ function handleBeforeClose(done: () => void) {
}
function clearData() {
time.value = undefined
chartLimit.value = 1000
chartOffset.value = 0
chartAllTotal.value = 0

1
src/views/stationData/transfer/components/deviceDrawer.vue

@ -294,6 +294,7 @@ function handleBeforeClose(done: () => void) { @@ -294,6 +294,7 @@ function handleBeforeClose(done: () => void) {
}
function clearData() {
time.value = undefined
chartLimit.value = 1000
chartOffset.value = 0
chartAllTotal.value = 0

Loading…
Cancel
Save