Merge remote-tracking branch 'origin/master'
21 files modified
1 files added
| | |
| | | VITE_BUILD_COMPRESS=gzip |
| | | |
| | | VITE_APP_TERRAIN_URL=https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_c_uas/ |
| | | |
| | | |
| | | #父系统 |
| | | VITE_APP_PARENT_SYSTEM=http://219.146.74.42:8015/drone-web |
| | |
| | | import request from '@/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | export const getList = (params) => { |
| | | return request({ |
| | | url: '/blade-system/role/list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | }, |
| | | params, |
| | | }); |
| | | }; |
| | | |
| | |
| | | //跨域请求,允许保存cookie |
| | | axios.defaults.withCredentials = true |
| | | |
| | | function logOutFun() { |
| | | store.dispatch('FedLogOut').then(() =>{ |
| | | const {VITE_APP_PARENT_SYSTEM,VITE_APP_ENV} = import.meta.env |
| | | const isDev = VITE_APP_ENV === 'development' |
| | | isDev |
| | | ? router.push({ path: '/login' }) |
| | | : window.location.replace(`${VITE_APP_PARENT_SYSTEM}/#/login`) |
| | | }) |
| | | } |
| | | |
| | | //http request拦截 |
| | | axios.interceptors.request.use( |
| | | config => { |
| | |
| | | removeRefreshToken() |
| | | const env = import.meta.env.VITE_APP_ENV |
| | | // 重定向到登录页 |
| | | store.dispatch('FedLogOut').then(() => router.push({ |
| | | path: '/login' |
| | | })) |
| | | |
| | | logOutFun() |
| | | return Promise.reject(new Error(message)) |
| | | }) |
| | | } |
| | |
| | | removeToken() |
| | | removeRefreshToken() |
| | | // 重定向到登录页 |
| | | store.dispatch('FedLogOut').then(() => router.push({ |
| | | path: '/login' |
| | | })) |
| | | |
| | | logOutFun() |
| | | return Promise.reject(new Error(message)) |
| | | } |
| | | // 如果请求为oauth2错误码则首次报错时提示 |
| | |
| | | <template> |
| | | <template> |
| | | <div class="map-shell"> |
| | | <CommonCesiumMap ref="mapRef" class="command-cesium map-container" :dom-id="props.containerId" :active="true" |
| | | :flat-mode="false" :terrain="true" :layer-mode="4" :contour="false" :boundary="false" |
| | |
| | | if (deviceRingOutlinePrimitives.length) { |
| | | deviceRingOutlinePrimitives.forEach(primitive => cockpitPrimitiveLayer.add(primitive)) |
| | | } |
| | | if (commandPostBillboardCollection) cockpitPrimitiveLayer.add(commandPostBillboardCollection) |
| | | if (deviceBillboardCollection) cockpitPrimitiveLayer.add(deviceBillboardCollection) |
| | | if (droneTrackPolylineCollection) cockpitPrimitiveLayer.add(droneTrackPolylineCollection) |
| | | if (droneTrackBillboardCollection) cockpitPrimitiveLayer.add(droneTrackBillboardCollection) |
| | | if (deviceBillboardCollection) cockpitPrimitiveLayer.add(deviceBillboardCollection) |
| | | if (commandPostBillboardCollection) cockpitPrimitiveLayer.add(commandPostBillboardCollection) |
| | | } |
| | | |
| | | const clearDeviceEntities = () => { |
| | |
| | | width: 40, |
| | | height: 56, |
| | | verticalOrigin: Cesium.VerticalOrigin.BOTTOM, |
| | | disableDepthTestDistance: Number.POSITIVE_INFINITY, |
| | | }) |
| | | }) |
| | | } |
| | |
| | | setDroneVisibility(!showCluster) |
| | | } |
| | | |
| | | const handleMapReady = ({ viewer: mapViewer, publicCesium: mapPublic }) => { |
| | | const handleMapReady = async ({ viewer: mapViewer, publicCesium: mapPublic }) => { |
| | | if (mapReadyHandled) return |
| | | mapReadyHandled = true |
| | | viewer = mapViewer |
| | |
| | | const height = viewer?.camera?.positionCartographic?.height |
| | | const stage = getStageByHeight(height) |
| | | updateStageDisplay(stage) |
| | | await loadCommandPosts() |
| | | renderDeviceEntities(props.allDevices) |
| | | loadPartitions() |
| | | loadAggregation() |
| | | loadCommandPosts() |
| | | renderSimulatedDroneTrack(props.alarmDrones) |
| | | initDeviceClickHandler() |
| | | } |
| | |
| | | cancelButtonClass: 'command-message-box-cancel', |
| | | }).then(() => { |
| | | this.$store.dispatch('LogOut').then(() => { |
| | | this.$router.push({ path: '/login' }) |
| | | const {VITE_APP_PARENT_SYSTEM,VITE_APP_ENV} = import.meta.env |
| | | const isDev = VITE_APP_ENV === 'development' |
| | | isDev |
| | | ? this.$router.push({ path: '/login' }) |
| | | : window.location.replace(`${VITE_APP_PARENT_SYSTEM}/#/login`) |
| | | }) |
| | | }) |
| | | }, |
| | |
| | | store |
| | | .dispatch('LoginByUsername', { |
| | | username: userName, |
| | | password: 'jadk@2026', |
| | | password: userName === 'admin' ? 'admin' :'jadk@2026', |
| | | tenantId: '000000', |
| | | type: 'account', |
| | | }) |
| | |
| | | <script> |
| | | import { mapGetters } from 'vuex'; |
| | | import { info } from '@/api/system/tenant'; |
| | | import { getCaptcha } from '@/api/user'; |
| | | import { getTopUrl } from '@/utils/util'; |
| | | |
| | | export default { |
| | |
| | | } else { |
| | | const systemToken = store.getters.token || urlParams?.token |
| | | if (systemToken === 0) { |
| | | store.dispatch('FedLogOut').then(() => { |
| | | next({ path: '/login' }) |
| | | }) |
| | | store.dispatch('FedLogOut').then(() =>{ |
| | | const {VITE_APP_PARENT_SYSTEM,VITE_APP_ENV} = import.meta.env |
| | | const isDev = VITE_APP_ENV === 'development' |
| | | isDev |
| | | ? router.push({ path: '/login' }) |
| | | : window.location.replace(`${VITE_APP_PARENT_SYSTEM}/#/login`) |
| | | }) |
| | | } else { |
| | | const meta = to.meta || {} |
| | | const query = to.query || {} |
| | |
| | | removeToken() |
| | | removeRefreshToken() |
| | | resolve() |
| | | localStorage.clear() |
| | | }) |
| | | .catch(error => { |
| | | reject(error) |
| | |
| | | removeRefreshToken() |
| | | removeToken() |
| | | resolve() |
| | | localStorage.clear() |
| | | }) |
| | | }, |
| | | GetTopMenu () { |
| | |
| | | } |
| | | } |
| | | |
| | | .placeholder-ele { |
| | | padding: 12px; |
| | | } |
| | | |
| | | .command-page-view-dialog { |
| | | margin: 0; |
| | | padding: 20px; |
| | |
| | | </div> |
| | | <div class="row"> |
| | | <span class="label">有效时间</span> |
| | | </div> |
| | | <div class="row"> |
| | | <span class="value">{{ formatTimeRange(item.effectiveDateStart, item.effectiveDateEnd) }}</span> |
| | | </div> |
| | | </div> |
| | |
| | | margin-top: 10px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 10px; |
| | | |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: 400; |
| | |
| | | text-transform: none; |
| | | |
| | | .row { |
| | | margin-top: 10px; |
| | | |
| | | line-height: 22px; |
| | | |
| | | .label { |
| | | margin-right: 10px; |
| | | color: #D4D5D7; |
| | | } |
| | | |
| | | &:first-child { |
| | | margin-top: 0; |
| | | } |
| | | |
| | | &:last-child { |
| | | margin-top: 0; |
| | | } |
| | | } |
| | | |
| | | .rows { |
| | | margin-top: 10px; |
| | | |
| | | display: flex; |
| | | |
| | | .col { |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | |
| | | <div class="command-table-pagination"> |
| | | <el-pagination |
| | | popper-class="command-select-popper" |
| | | v-model:current-page="searchParams.current" |
| | | v-model:page-size="searchParams.size" |
| | | layout="total, prev, pager, next, sizes" |
| | | :total="total" |
| | | @change="getList" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="placeholder-ele"></div> |
| | | |
| | | <FormDiaLog ref="dialogRef" @success="handleFormSuccess" v-model="visible" v-if="visible" /> |
| | | <ShareDiaLog ref="shareDialogRef" @success="getList" v-model="shareVisible" v-if="shareVisible" /> |
| | |
| | | const initSearchParams = () => ({ |
| | | deptName: '', |
| | | fullName: '', |
| | | current: 1, |
| | | size: 10, |
| | | }) |
| | | |
| | | const searchParams = ref(initSearchParams()) |
| | | const loading = ref(true) |
| | | const visible = ref(false) |
| | | const list = ref([]) |
| | | const total = ref(0) |
| | | const selectedIds = ref([]) |
| | | const selectedRows = ref([]) |
| | | const lastActionParentRow = ref(null) |
| | |
| | | try { |
| | | const res = await getLazyList(0, searchParams.value) |
| | | list.value = res?.data?.data ?? [] |
| | | total.value = list.value.length |
| | | } finally { |
| | | loading.value = false |
| | | } |
| | | } |
| | | |
| | | function handleSearch() { |
| | | searchParams.value.current = 1 |
| | | getList() |
| | | } |
| | | |
| | | function resetForm() { |
| | | queryParamsRef.value?.resetFields() |
| | | searchParams.value.current = 1 |
| | | getList() |
| | | } |
| | | |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | |
| | | <div class="command-table-pagination"> |
| | | <el-pagination |
| | | popper-class="command-select-popper" |
| | | v-model:current-page="searchParams.current" |
| | | v-model:page-size="searchParams.size" |
| | | layout="total, prev, pager, next, sizes" |
| | | :total="total" |
| | | @change="loadList" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="placeholder-ele"></div> |
| | | |
| | | <FormDiaLog ref="dialogRef" @success="loadList" /> |
| | | <RolePermissionDialog ref="roleDialogRef" @success="loadList" /> |
| | |
| | | const initSearchParams = () => ({ |
| | | roleName: '', |
| | | roleAlias: '', |
| | | current: 1, |
| | | size: 10, |
| | | }) |
| | | |
| | | const searchParams = ref(initSearchParams()) |
| | | const loading = ref(true) |
| | | const list = ref([]) |
| | | const total = ref(0) |
| | | const selectedIds = ref([]) |
| | | const selectedRows = ref([]) |
| | | const queryParamsRef = ref(null) |
| | |
| | | async function loadList() { |
| | | loading.value = true |
| | | try { |
| | | const res = await getRolePage(searchParams.value.current, searchParams.value.size, searchParams.value) |
| | | const records = res?.data?.data?.records ?? res?.data?.data ?? [] |
| | | const res = await getRolePage(searchParams.value) |
| | | const records = res?.data?.data ?? [] |
| | | list.value = records |
| | | total.value = res?.data?.data?.total ?? res?.data?.total ?? records.length |
| | | } finally { |
| | | loading.value = false |
| | | } |
| | | } |
| | | |
| | | function handleSearch() { |
| | | searchParams.value.current = 1 |
| | | loadList() |
| | | } |
| | | |
| | | function resetForm() { |
| | | queryParamsRef.value?.resetFields() |
| | | searchParams.value.current = 1 |
| | | loadList() |
| | | } |
| | | |
| | |
| | | |
| | | #地形服务地址 |
| | | VITE_APP_TERRAIN_URL=https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_c_uas/ |
| | | |
| | | #父系统 |
| | | VITE_APP_PARENT_SYSTEM=http://219.146.74.42:8015/drone-web/#/ |
| | |
| | | import { useStore } from 'vuex' |
| | | |
| | | const store = useStore() |
| | | const authToken = window.localStorage?.authToken |
| | | |
| | | function getXTToken() { |
| | | loginWithMiniProgramApi({ username: 'admin' }).then(res => { |
| | | store.commit('setXtToken', res.data.data.access_token) |
| | | }) |
| | | store.commit('setXtToken', authToken) |
| | | const { VITE_APP_ENV } = import.meta.env |
| | | |
| | | if (VITE_APP_ENV === 'development') { |
| | | function getXTToken() { |
| | | loginWithMiniProgramApi({ username: 'admin' }).then(res => { |
| | | store.commit('setXtToken', res.data.data.access_token) |
| | | }) |
| | | } |
| | | getXTToken() |
| | | setInterval(getXTToken, 600000) |
| | | } |
| | | getXTToken() |
| | | setInterval(getXTToken, 600000) |
| | | </script> |
| | | |
| | | <style> |
| | |
| | | import { Base64 } from 'js-base64' |
| | | import { baseUrl } from '@/config/env' |
| | | import crypto from '@/utils/crypto' |
| | | const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL |
| | | // 全局未授权错误提示状态,只提示一次 |
| | | let isErrorShown = false |
| | | |
| | |
| | | //跨域请求,允许保存cookie |
| | | withCredentials: true, |
| | | }) |
| | | |
| | | function logOutFun() { |
| | | store.dispatch('FedLogOut').then(() =>{ |
| | | const {VITE_APP_PARENT_SYSTEM,VITE_APP_ENV} = import.meta.env |
| | | const isDev = VITE_APP_ENV === 'development' |
| | | isDev |
| | | ? router.push({ path: '/login' }) |
| | | : window.location.replace(`${VITE_APP_PARENT_SYSTEM}/#/login`) |
| | | }) |
| | | } |
| | | |
| | | |
| | | //http request拦截 |
| | | service.interceptors.request.use( |
| | |
| | | removeRefreshToken() |
| | | const env = import.meta.env.VITE_APP_ENV |
| | | // 重定向到登录页 |
| | | store.dispatch('FedLogOut').then(() => router.push({ |
| | | path: '/login' |
| | | })); |
| | | // env === 'development' |
| | | // ? store.dispatch('FedLogOut').then(() => |
| | | // router.push({ |
| | | // path: '/login', |
| | | // }) |
| | | // ) |
| | | // : store.dispatch('FedLogOut').then(() => window.location.replace(`${adminUrl}#/login`)) |
| | | logOutFun() |
| | | return Promise.reject(new Error(message)) |
| | | }) |
| | | } |
| | |
| | | removeToken() |
| | | removeRefreshToken() |
| | | // 重定向到登录页 |
| | | // store.dispatch('FedLogOut').then(() => router.push({ |
| | | // path: '/login' |
| | | // })); |
| | | const env = import.meta.env.VITE_APP_ENV |
| | | env === 'development' |
| | | ? store.dispatch('FedLogOut').then(() => |
| | | router.push({ |
| | | path: '/login', |
| | | }) |
| | | ) |
| | | : store.dispatch('FedLogOut').then(() => window.location.replace(`${adminUrl}#/login`)) |
| | | logOutFun() |
| | | return Promise.reject(new Error(message)) |
| | | } |
| | | // 如果请求为oauth2错误码则首次报错时提示 |
| | |
| | | type: 'warning', |
| | | }).then(() => { |
| | | this.$store.dispatch('LogOut').then(() => { |
| | | const env = import.meta.env.VITE_APP_ENV |
| | | const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL |
| | | this.$router.push({ path: '/login' }) |
| | | // env === 'development' ? this.$router.push({ path: '/login' }):window.location.replace(`${adminUrl}#/login`) |
| | | const {VITE_APP_PARENT_SYSTEM,VITE_APP_ENV} = import.meta.env |
| | | const isDev = VITE_APP_ENV === 'development' |
| | | isDev |
| | | ? this.$router.push({ path: '/login' }) |
| | | : window.location.replace(`${VITE_APP_PARENT_SYSTEM}/#/login`) |
| | | }) |
| | | }) |
| | | }, |
| New file |
| | |
| | | <template> |
| | | <div style="width: 100%; height: 100%; background: #FFFFFF"></div> |
| | | </template> |
| | | <script setup> |
| | | import { useStore } from 'vuex' |
| | | import { ElLoading } from 'element-plus' |
| | | |
| | | const store = useStore() |
| | | const router = useRouter() |
| | | const userName = window.localStorage?.userName |
| | | const route = useRoute() |
| | | let loading = ElLoading.service({ background: 'rgba(0, 0, 0, 0.3)', text: '加载中...' }) |
| | | const tagWel = computed(() => store.state.tags.tagWel) |
| | | const redirect = route.query.redirect |
| | | store |
| | | .dispatch('LoginByUsername', { |
| | | username: userName, |
| | | password: userName === 'admin' ? 'admin' :'jadk@2026', |
| | | tenantId: '000000', |
| | | type: 'account', |
| | | }) |
| | | .then(() => { |
| | | loading.close() |
| | | router.push(redirect || tagWel.value) |
| | | }) |
| | | .catch(err => { |
| | | loading.close() |
| | | // 返回上一个路由 |
| | | window.history.go(-1) |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"></style> |
| | |
| | | :model="loginForm" |
| | | label-width="0" |
| | | > |
| | | <!-- <el-form-item v-if="tenantMode" prop="tenantId"> |
| | | <el-input |
| | | @keyup.enter="handleLogin" |
| | | v-model="loginForm.tenantId" |
| | | auto-complete="off" |
| | | :placeholder="$t('login.tenantId')" |
| | | > |
| | | <template #prefix> |
| | | <i class="icon-quanxian" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> --> |
| | | <el-form-item prop="username"> |
| | | <el-input |
| | | @keyup.enter="handleLogin" |
| | | v-model="loginForm.username" |
| | | auto-complete="off" |
| | | :placeholder="$t('login.username')" |
| | | placeholder="请输入账号" |
| | | > |
| | | <template #prefix> |
| | | <i class="icon-yonghu" /> |
| | |
| | | :type="passwordType" |
| | | v-model="loginForm.password" |
| | | auto-complete="off" |
| | | :placeholder="$t('login.password')" |
| | | placeholder="请输入密码" |
| | | > |
| | | <template #suffix> |
| | | <i class="el-icon-view el-input__icon" @click="showPassword" /> |
| | |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item v-if="this.website.captchaMode" prop="code"> |
| | | <el-row :span="24"> |
| | | <el-col :span="16"> |
| | | <el-input |
| | | @keyup.enter="handleLogin" |
| | | v-model="loginForm.code" |
| | | auto-complete="off" |
| | | :placeholder="$t('login.code')" |
| | | > |
| | | <template #prefix> |
| | | <i class="icon-yanzhengma" /> |
| | | </template> |
| | | </el-input> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <div class="login-code"> |
| | | <img :src="loginForm.image" class="login-code-img" @click="refreshCode" /> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> --> |
| | | <el-form-item> |
| | | <el-button |
| | | style="width: 100%;" |
| | | type="primary" |
| | | @click.prevent="handleLogin" |
| | | :class="this.registerMode ? 'login-submit' : 'btn-submit'" |
| | | >{{ $t('login.submit') }} |
| | | >登 录 |
| | | </el-button> |
| | | <!-- <el-button |
| | | v-if="this.registerMode" |
| | | type="danger" |
| | | @click.prevent="handleRegister" |
| | | class="register-submit" |
| | | >{{ $t('login.register') }} |
| | | </el-button> --> |
| | | </el-form-item> |
| | | <!-- <el-dialog title="用户信息选择" append-to-body v-model="userBox" width="350px"> |
| | | <avue-form :option="userOption" v-model="userForm" @submit="submitLogin" /> |
| | | </el-dialog> |
| | | <el-dialog title="用户信息注册" append-to-body v-model="registerBox" width="350px"> |
| | | <avue-form :option="registerOption" v-model="registerForm" @submit="submitRegister" /> |
| | | </el-dialog> --> |
| | | </el-form> |
| | | </template> |
| | | |
| | |
| | | this.$store |
| | | .dispatch('LoginByUsername', this.loginForm) |
| | | .then(() => { |
| | | if (this.website.switchMode) { |
| | | const deptId = this.userInfo.dept_id; |
| | | const roleId = this.userInfo.role_id; |
| | | if (deptId.includes(',') || roleId.includes(',')) { |
| | | this.loginForm.deptId = deptId; |
| | | this.loginForm.roleId = roleId; |
| | | this.userBox = true; |
| | | this.$store.dispatch('LogOut').then(() => { |
| | | loading.close(); |
| | | }); |
| | | return false; |
| | | } |
| | | } |
| | | loading.close(); |
| | | //加载工作流路由集 |
| | | this.loadFlowRoutes(); |
| | |
| | | .catch(err => { |
| | | console.log(err); |
| | | loading.close(); |
| | | this.refreshCode(); |
| | | }); |
| | | } |
| | | }); |
| | |
| | | } else { |
| | | const systemToken = store.getters.token || urlParams?.token |
| | | if (systemToken === 0) { |
| | | store.dispatch('FedLogOut').then(() => { |
| | | next({ path: '/login' }) |
| | | }) |
| | | // store.dispatch('FedLogOut').then(() => window.location.replace(`${adminUrl}#/login`)); |
| | | store.dispatch('FedLogOut').then(() =>{ |
| | | const {VITE_APP_PARENT_SYSTEM,VITE_APP_ENV} = import.meta.env |
| | | const isDev = VITE_APP_ENV === 'development' |
| | | isDev |
| | | ? router.push({ path: '/login' }) |
| | | : window.location.replace(`${VITE_APP_PARENT_SYSTEM}/#/login`) |
| | | }) |
| | | } else { |
| | | const meta = to.meta || {} |
| | | const query = to.query || {} |
| | |
| | | }, |
| | | }, |
| | | { |
| | | path: '/logInByUser', |
| | | name: '按用户登录', |
| | | component: () => import('@/page/login/loginByUser.vue'), |
| | | meta: { |
| | | keepAlive: false, |
| | | isTab: false, |
| | | isAuth: false, |
| | | }, |
| | | }, |
| | | { |
| | | path: '/oauth/redirect/:source', |
| | | name: '第三方登录', |
| | | component: () => (Store.getters.isMacOs ? import('@/mac/login.vue') : import('@/page/login/index.vue')), |
| | |
| | | removeToken() |
| | | removeRefreshToken() |
| | | resolve() |
| | | localStorage.clear() |
| | | }) |
| | | .catch(error => { |
| | | reject(error) |
| | |
| | | removeRefreshToken() |
| | | removeToken() |
| | | resolve() |
| | | localStorage.clear() |
| | | }) |
| | | }, |
| | | GetTopMenu() { |