Compare commits

..

7 Commits

Author SHA1 Message Date
Gjm
7a81a41c78 Merge branch 'dev_2026-03-27' 2026-03-30 11:20:40 +08:00
Gjm
feb1b2e8e9 fix(login): 切换回生产环境的统一身份认证地址
- 在 login.vue 中将认证地址从本地开发地址切换回生产地址
- 在 Navbar.vue 中将登出跳转地址从本地开发地址切换回生产地址
- 移除本地测试配置,启用正确的认证服务器地址
- 确保单点登录功能在生产环境中正常工作

(cherry picked from commit 281c6d71b2)
2026-03-30 11:13:46 +08:00
Gjm
281c6d71b2 fix(login): 切换回生产环境的统一身份认证地址
- 在 login.vue 中将认证地址从本地开发地址切换回生产地址
- 在 Navbar.vue 中将登出跳转地址从本地开发地址切换回生产地址
- 移除本地测试配置,启用正确的认证服务器地址
- 确保单点登录功能在生产环境中正常工作
2026-03-30 11:13:17 +08:00
Gjm
adc41d5918 style(scada): 格式化代码并优化布局结构
- 标准化缩进和代码格式
- 修复表格结构中的缩进问题
- 调整CSS样式以改善响应式布局
- 优化组件模板结构提升可读性
- 统一代码风格提高维护性
- 改进HTML标签嵌套结构
2026-03-27 16:53:06 +08:00
NewName
3c0b29333c feat(app): 添加全局加载组件和CAS单点登录功能
- 在App.vue中引入GlobalLoading组件并挂载到全局
- 新增src/components/GlobalLoading/index.vue组件文件
- 在auth.js中添加AccessUserKey常量和相关存储方法
- 在login.js中添加logincas和outlogcas接口函数
- 在main.js中注册GlobalLoading全局组件
- 修改Navbar.vue实现CAS登出逻辑和跳转处理
- 增加sessionStorage和localStorage清理机制

Signed-off-by: NewName <1048783178@qq.com>
2026-03-27 16:25:31 +08:00
NewName
7c1f4911d2 chore: 添加封面图片资源 2026-03-25 12:48:31 +08:00
NewName
87d1d88c74 fix(scada): 移除图片路径中的baseApi前缀,使用本地资源
图片路径改为直接使用本地资源文件,避免依赖baseApi前缀
2026-03-25 12:48:12 +08:00
10 changed files with 2624 additions and 2114 deletions

View File

@@ -1,19 +1,22 @@
<template>
<div id="app" style="background-color:#0e2e87" v-if="$route.meta.bigScreen">
<router-view />
<global-loading ref="globalLoading" />
</div>
<div id="app" v-else>
<router-view :key="language"/>
<theme-picker />
<global-loading ref="globalLoading" />
</div>
</template>
<script>
import ThemePicker from "@/components/ThemePicker";
import GlobalLoading from '@/components/GlobalLoading'
export default {
name: "App",
components: { ThemePicker },
components: { ThemePicker, GlobalLoading },
metaInfo() {
return {
title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
@@ -26,9 +29,14 @@ export default {
language(){
return this.$store.state.settings.language
}
},
mounted() {
// 将loading方法挂载到全局方便在任何组件中调用
this.$root.$loading = this.$refs.globalLoading
}
};
</script>
<style scoped>
#app .theme-picker {
display: none;

View File

@@ -186,3 +186,24 @@ export function changeLanguage(lang) {
},
});
}
export function logincas (data) {
return request({
url: '/logincas',
headers: {
isToken: false,
},
method: 'post',
data
})
}
export function outlogcas (data) {
return request({
url: '/outlogcas',
headers: {
isToken: false,
},
method: 'post',
data
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@@ -0,0 +1,83 @@
<template>
<div v-if="visible" class="global-loading">
<div class="loading-mask">
<div class="loading-content">
<div class="loading-spinner"></div>
<p class="loading-text">{{ text }}</p>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'GlobalLoading',
data() {
return {
visible: false,
text: '加载中...'
}
},
methods: {
show(text = '加载中...') {
this.text = text
this.visible = true
},
hide() {
this.visible = false
}
}
}
</script>
<style scoped>
.global-loading {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9999;
}
.loading-mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
}
.loading-content {
background: white;
padding: 20px 30px;
border-radius: 8px;
text-align: center;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.loading-spinner {
width: 40px;
height: 40px;
margin: 0 auto 10px;
border: 3px solid #f3f3f3;
border-top: 3px solid #0f73ee;
border-radius: 50%;
animation: spin 1s linear infinite;
}
.loading-text {
margin: 0;
font-size: 14px;
color: #666;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>

View File

@@ -39,6 +39,7 @@ import TopNav from '@/components/TopNav';
import Hamburger from '@/components/Hamburger';
import SizeSelect from '@/components/SizeSelect';
import langSelect from '@/layout/components/langSelect';
import {outlogcas} from "@/api/login";
export default {
components: {
@@ -71,19 +72,44 @@ export default {
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar');
},
async logout() {
this.$confirm(this.$t('login.989807-31'), this.$t('login.989807-32'), {
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
type: 'warning',
})
.then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/index';
});
})
.catch(() => {});
},
async logout() {
try {
await this.$confirm(this.$t('login.989807-31'), this.$t('login.989807-32'), {
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
type: 'warning',
});
// 先调用 CAS 退出接口
await this.outlogincasapi();
// 再执行 Store 退出
await this.$store.dispatch('LogOut');
// 清理本地存储
sessionStorage.clear();
localStorage.clear();
localStorage.setItem('is_logging_out', 'true');
// 跳转
// location.href = '/index';
window.location.href = 'http://192.168.1.241/login?redirect=/lig/oauth2/oauth2/application&appid=330b4ecb60c9a6802b957fe1e5a5ecd3&url=http%3A%2F%2F192.168.1.241%3A9000%2Flogin'+(this.redirect?'&ssUrl='+this.redirect:'');
// window.location.href = 'http://localhost:81/login?redirect=/lig/oauth2/oauth2/application&appid=330b4ecb60c9a6802b957fe1e5a5ecd3&url=http%3A%2F%2Flocalhost%3A80%2Flogin'+(this.redirect?'&ssUrl='+this.redirect:'');
} catch (error) {
// 用户取消或出错时的处理
console.log('退出取消或失败', error);
}
},
async outlogincasapi() {
const obj = {
loginName: "admin",
password: "demo",
verifyCode: "",
};
const { code, data } = await outlogcas(obj);
},
},
};
</script>

View File

@@ -47,6 +47,7 @@ import 'video.js/dist/video-js.css';
import BaiduMap from 'vue-baidu-map'; // 百度地图
import Contextmenu from 'vue-contextmenujs';
import GlobalLoading from '@/components/GlobalLoading';
Vue.use(Contextmenu);
import ItemWrap from './views/bigScreen/components/item-wrap/item-wrap.vue';
@@ -98,6 +99,7 @@ Vue.component('ImageUpload', ImageUpload);
Vue.component('ImagePreview', ImagePreview);
Vue.component('DictTag', DictTag);
Vue.component('MonacoEditor', MonacoEditor);
Vue.component('GlobalLoading', GlobalLoading);
Vue.use(plugins);
Vue.use(directive);
Vue.use(VueMeta);

View File

@@ -2,7 +2,7 @@ import Cookies from 'js-cookie'
const TokenKey = 'Admin-Token'
const UserId = 'userId'
const AccessUserKey = 'AJReportUser'
export function getToken() {
return Cookies.get(TokenKey)
}
@@ -26,3 +26,16 @@ export function setUserId(userId) {
export function removeUserId() {
return Cookies.remove(UserId)
}
export function setAccessUser(accessUser) {
if(typeof(accessUser) == "undefined" || accessUser== null){
return;
}
let val = accessUser;
if(typeof(accessUser) == "object"){
val = JSON.stringify(accessUser);
}
return localStorage.setItem(AccessUserKey, val)
}

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,7 @@
<el-card class="card-wrap" :body-style="{ padding: '10px' }">
<div class="img-wrap" @click="goToDetail(item)">
<el-image style="width: 100%; height: 100%; border-radius: 5px" lazy
:src="baseApi + item.pageImage" fit="cover"></el-image>
:src="item.pageImage" fit="cover"></el-image>
</div>
<div class="tag-wrap">
<span>{{ item.pageResolution ? item.pageResolution : '未知' }}</span>
@@ -51,7 +51,7 @@ export default {
"isShare": null,
"shareUrl": null,
"sharePass": null,
"pageImage": "/profile/upload/2026/03/23/11冻干3_1 (1)_20260323173148A001.png",
"pageImage": require("../../../assets/picture/fengmian.png"),
"tenantId": null,
"tenantName": null,
"delFlag": 0,

File diff suppressed because it is too large Load Diff