diff --git a/src/assets/images/v01.png b/src/assets/images/v01.png new file mode 100644 index 00000000..4049cdae Binary files /dev/null and b/src/assets/images/v01.png differ diff --git a/src/assets/images/v02.png b/src/assets/images/v02.png new file mode 100644 index 00000000..86cf6646 Binary files /dev/null and b/src/assets/images/v02.png differ diff --git a/src/assets/images/v03.png b/src/assets/images/v03.png new file mode 100644 index 00000000..9566cb44 Binary files /dev/null and b/src/assets/images/v03.png differ diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index fafa8771..38561f29 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -86,22 +86,23 @@ export const useUserStore = defineStore({ params: LoginParams & { goHome?: boolean mode?: ErrorMessageMode + homeRouter?: string }, ): Promise { try { - const { goHome = true, mode, ...loginParams } = params + const { goHome = true, mode, homeRouter, ...loginParams } = params const data = await loginApi(loginParams, mode) const { token } = data this.setToken(token) - return this.afterLoginAction(goHome) + return this.afterLoginAction(goHome, homeRouter) } catch (error) { console.log(error) return Promise.reject(error) } }, - async afterLoginAction(goHome?: boolean): Promise { + async afterLoginAction(goHome?: boolean, homeRouter?: string): Promise { if (!this.getToken) return null const userInfo = await this.getUserInfoAction() @@ -118,7 +119,7 @@ export const useUserStore = defineStore({ router.addRoute(PAGE_NOT_FOUND_ROUTE as unknown as RouteRecordRaw) permissionStore.setDynamicAddedRoute(true) } - goHome && (await router.replace(PageEnum.BASE_HOME)) + goHome && (await router.replace(homeRouter ?? PageEnum.BASE_HOME)) } return userInfo }, diff --git a/src/views/sys/login/LoginForm.vue b/src/views/sys/login/LoginForm.vue index 2a2b368f..6e9b4762 100644 --- a/src/views/sys/login/LoginForm.vue +++ b/src/views/sys/login/LoginForm.vue @@ -46,7 +46,10 @@ + + @@ -57,6 +64,9 @@ import { getAgriculturalDeviceBasic, getDevices } from '/@/api/sys/other' import Box from './Box.vue' import VideoFlv from './VideoFlv.vue' + import v01 from '../../../assets/images/v01.png' + import v02 from '../../../assets/images/v02.png' + import v03 from '../../../assets/images/v03.png' export default defineComponent({ components: { Box, @@ -103,13 +113,13 @@ type: 1, status: 1, }) - Data.list = resData.map((e) => { - // const { username, passage, ip, port, rtsp_url } = e.extends - // const url = `rtsp://${username}:${passage}@${ip}:${port}${rtsp_url}` - const url = - 'rtsp://admin:admin12345@183.222.79.115:9007/cam/realmonitor?channel=1&subtype=0' + Data.list = resData.map((e, index) => { + const { username, passage, ip, port, rtsp_url } = e.extends + const url = `rtsp://${username}:${passage}@${ip}:${port}${rtsp_url}` + // const url = 'rtsp://admin:admin12345@183.222.79.115:9007/cam/realmonitor?channel=1&subtype=0' return { ...e, + img: index == 0 ? v01 : index == 1 ? v02 : index == 2 ? v03 : v01, url: `ws://127.0.0.1:8100/rtsp?url=${window.btoa(url)}`, } }) diff --git a/src/views/visualization/components/NCZQS.vue b/src/views/visualization/components/NCZQS.vue index 1c946ea1..53f0d143 100644 --- a/src/views/visualization/components/NCZQS.vue +++ b/src/views/visualization/components/NCZQS.vue @@ -25,11 +25,14 @@ const { rootEmitter } = useVContext() - const { setOptions } = useECharts(chartRef as Ref) + const { setOptions, getInstance } = useECharts(chartRef as Ref) const visualizationStore = useVisualizationStore() + let legendData = [] as any + function chatInit() { + legendData = Data.list setOptions({ grid: { left: '2%', right: '2%', top: '10%', bottom: '2%', containLabel: true }, tooltip: { @@ -97,6 +100,34 @@ }, ], }) + + chartAmi() + } + + let timer: any = null + function chartAmi() { + let index = 0 + timer && clearInterval(timer) + timer = setInterval(() => { + const currentIndex = index % legendData.length + // getInstance()?.dispatchAction({ + // type: 'legendUnSelect', + // name: legendData[currentIndex], + // }) + + // getInstance()?.dispatchAction({ + // type: 'legendSelect', + // name: legendData[currentIndex], + // }) + + getInstance()?.dispatchAction({ + type: 'showTip', + seriesIndex: 0, + dataIndex: currentIndex, + }) + + index++ + }, 3000) } async function getData() { diff --git a/src/views/visualization/components/NYQK.vue b/src/views/visualization/components/NYQK.vue index 52cf01c9..c946e4c9 100644 --- a/src/views/visualization/components/NYQK.vue +++ b/src/views/visualization/components/NYQK.vue @@ -321,4 +321,16 @@ .aim-spin { animation: spin 2s linear infinite; } + + @keyframes spin { + from { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + to { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } + } diff --git a/src/views/visualization/index.vue b/src/views/visualization/index.vue index 1f28578b..a0d83256 100644 --- a/src/views/visualization/index.vue +++ b/src/views/visualization/index.vue @@ -18,7 +18,7 @@ -
+