|
@@ -56,6 +56,9 @@ import TimeLine from './components/TimeLine/index.vue'
|
|
import { dialogFn, isWap } from '@/utils'
|
|
import { dialogFn, isWap } from '@/utils'
|
|
import PartBox from './components/PartBox.vue'
|
|
import PartBox from './components/PartBox.vue'
|
|
import { useRatio } from '@/hooks/useRatio.js'
|
|
import { useRatio } from '@/hooks/useRatio.js'
|
|
|
|
+import { useOutsideSystemStore } from '@/stores/modules/system.js'
|
|
|
|
+
|
|
|
|
+const useSystem = useOutsideSystemStore()
|
|
|
|
|
|
const { API_NVR_MONTH_GET, API_NVR_DAY_GET, API_LY_RELOGIN_POST } = useRequest()
|
|
const { API_NVR_MONTH_GET, API_NVR_DAY_GET, API_LY_RELOGIN_POST } = useRequest()
|
|
const date = ref(+new Date())
|
|
const date = ref(+new Date())
|
|
@@ -107,7 +110,7 @@ let switchDay = ref(false)
|
|
const TimeLineRef = ref(null)
|
|
const TimeLineRef = ref(null)
|
|
const formatT = (t) => dayjs(t).format('YYYY-MM-DD HH:mm:ss')
|
|
const formatT = (t) => dayjs(t).format('YYYY-MM-DD HH:mm:ss')
|
|
|
|
|
|
-const calendarChange = (v) => {
|
|
|
|
|
|
+const calendarChange = async (v) => {
|
|
if (v.isDisabled || currentDay?.day === v.day) return
|
|
if (v.isDisabled || currentDay?.day === v.day) return
|
|
if (timer) {
|
|
if (timer) {
|
|
dialogFn(
|
|
dialogFn(
|
|
@@ -147,11 +150,15 @@ const calendarChange = (v) => {
|
|
break
|
|
break
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ await useSystem.getNvrId()
|
|
params.forEach((p) => {
|
|
params.forEach((p) => {
|
|
const pF = p.split('-')
|
|
const pF = p.split('-')
|
|
promises.push(
|
|
promises.push(
|
|
new Promise((resolve) => {
|
|
new Promise((resolve) => {
|
|
- API_NVR_DAY_GET({ year: pF[0], month: pF[1], day: pF[2] }).then((res) => {
|
|
|
|
|
|
+ API_NVR_DAY_GET(
|
|
|
|
+ { Year: +pF[0], Month: +pF[1], Day: +pF[2] },
|
|
|
|
+ { NvrId: useSystem.nvrId }
|
|
|
|
+ ).then((res) => {
|
|
resolve(res)
|
|
resolve(res)
|
|
})
|
|
})
|
|
})
|
|
})
|
|
@@ -181,14 +188,10 @@ const calendarChange = (v) => {
|
|
clearInterval(timer)
|
|
clearInterval(timer)
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- .catch((err) => {
|
|
|
|
- timeSegments.value = []
|
|
|
|
- reconnect(err)
|
|
|
|
- })
|
|
|
|
}
|
|
}
|
|
|
|
|
|
const updateView = (v) => {
|
|
const updateView = (v) => {
|
|
- API_NVR_MONTH_GET({ year: v[0].year, month: v[0].month })
|
|
|
|
|
|
+ API_NVR_MONTH_GET({ Year: v[0].year, Month: v[0].month }, { NvrId: useSystem.nvrId })
|
|
.then((res) => {
|
|
.then((res) => {
|
|
let temp = []
|
|
let temp = []
|
|
v[0].days.forEach((item) => {
|
|
v[0].days.forEach((item) => {
|
|
@@ -206,9 +209,10 @@ const updateView = (v) => {
|
|
|
|
|
|
// 初始化日历
|
|
// 初始化日历
|
|
let flag = 0
|
|
let flag = 0
|
|
-const tempUpdateView = (v) => {
|
|
|
|
|
|
+const tempUpdateView = async (v) => {
|
|
monthDays = v[0].days
|
|
monthDays = v[0].days
|
|
if (flag) return
|
|
if (flag) return
|
|
|
|
+ await useSystem.getNvrId()
|
|
updateView(v)
|
|
updateView(v)
|
|
flag = 1
|
|
flag = 1
|
|
}
|
|
}
|
|
@@ -282,7 +286,6 @@ const successOpen = () => {
|
|
clearInterval(timer)
|
|
clearInterval(timer)
|
|
// 启动定时器
|
|
// 启动定时器
|
|
timer = setInterval(incrementTime, interval)
|
|
timer = setInterval(incrementTime, interval)
|
|
- useRatio('.rpb-video')
|
|
|
|
}
|
|
}
|
|
|
|
|
|
// 硬盘录重连
|
|
// 硬盘录重连
|
|
@@ -330,6 +333,7 @@ onMounted(() => {
|
|
day: date.getDate(),
|
|
day: date.getDate(),
|
|
isDisabled: false
|
|
isDisabled: false
|
|
})
|
|
})
|
|
|
|
+ useRatio('.rpb-video')
|
|
})
|
|
})
|
|
|
|
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|