10 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 |
| | |
| | | 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 { |
| | |
| | | removeToken() |
| | | removeRefreshToken() |
| | | resolve() |
| | | localStorage.clear() |
| | | }) |
| | | .catch(error => { |
| | | reject(error) |
| | |
| | | |
| | | #地形服务地址 |
| | | 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> |
| | |
| | | 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(); |
| | | }); |
| | | } |
| | | }); |
| | |
| | | }, |
| | | }, |
| | | { |
| | | 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')), |