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 & {
} }
const selectValue = ref() const selectValue = ref()
function onchangeSelect(value: string) { function onchangeSelect(value: string) {
PointCheckboxRef.value?.clearCheck() PointCheckboxRef.value?.clearCheck()
} }
@ -216,25 +217,26 @@ async function loadChardData() {
clearData() clearData()
const limit = chartLimit.value const limit = chartLimit.value
const offset = chartOffset.value const offset = chartOffset.value
const options = { const options: any = {
columns: columParams.value, columns: columParams.value,
isLocal: !curDevice.value?.isonLine, isLocal: !curDevice.value?.isonLine,
host: curDevice.value?.isonLine ? (curDevice.value as IOnlineDevice).clientIp : '', 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], startTime: time.value[0],
endTime: time.value[1], 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 = { const params: IGetDeviceDataParams = {
...options, ...options,
limit, limit,
offset 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 loadingChart.value = true
isShowChart.value = false isShowChart.value = false
@ -325,6 +327,7 @@ function handleBeforeClose(done: () => void) {
} }
function clearData() { function clearData() {
time.value = undefined
chartLimit.value = 1000 chartLimit.value = 1000
chartOffset.value = 0 chartOffset.value = 0
chartAllTotal.value = 0 chartAllTotal.value = 0

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

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

Loading…
Cancel
Save