Compare commits
7 Commits
cfb5cd079f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a81a41c78 | ||
|
|
feb1b2e8e9 | ||
|
|
281c6d71b2 | ||
|
|
adc41d5918 | ||
|
|
3c0b29333c | ||
|
|
7c1f4911d2 | ||
|
|
87d1d88c74 |
10
src/App.vue
10
src/App.vue
@@ -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;
|
||||
|
||||
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
BIN
src/assets/picture/fengmian.png
Normal file
BIN
src/assets/picture/fengmian.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
83
src/components/GlobalLoading/index.vue
Normal file
83
src/components/GlobalLoading/index.vue
Normal 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>
|
||||
@@ -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: {
|
||||
@@ -72,18 +73,43 @@ export default {
|
||||
this.$store.dispatch('app/toggleSideBar');
|
||||
},
|
||||
async logout() {
|
||||
this.$confirm(this.$t('login.989807-31'), this.$t('login.989807-32'), {
|
||||
try {
|
||||
await 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(() => {});
|
||||
|
||||
// 先调用 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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<!-- 路由跳转 Loading 遮罩,解决闪屏 -->
|
||||
<div class="login">
|
||||
<div class="main">
|
||||
<div v-if="acountLogin" class="container a-container" :class="{ 'is-txl': isATxl }">
|
||||
@@ -32,14 +33,16 @@
|
||||
<el-form-item prop="username">
|
||||
<div class="username">
|
||||
<i class="el-icon-user icon"></i>
|
||||
<input class="form__input" v-model="loginForm.username" auto-complete="off" type="text" :placeholder="$t('login.989807-4')" />
|
||||
<input class="form__input" v-model="loginForm.username" auto-complete="off" type="text"
|
||||
:placeholder="$t('login.989807-4')"/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="password" :class="{ 'is-null': isacount }">
|
||||
<div class="password">
|
||||
<svg-icon icon-class="password" class="icon left"/>
|
||||
<input class="form__input" v-model="loginForm.password" auto-complete="off" :type="pwdtype" :placeholder="$t('login.989807-5')" @keyup.enter="handleLogin" />
|
||||
<input class="form__input" v-model="loginForm.password" auto-complete="off" :type="pwdtype"
|
||||
:placeholder="$t('login.989807-5')" @keyup.enter="handleLogin"/>
|
||||
<span class="el-icon-view icon right" @click="changetype()"></span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@@ -47,7 +50,8 @@
|
||||
<el-form-item v-if="captchaOnOff" prop="code" :class="{ 'is-null': ispwd }">
|
||||
<div style="width: 350px" class="check">
|
||||
<svg-icon icon-class="auth-code" class="icon"/>
|
||||
<input v-model="loginForm.code" auto-complete="off" class="form__input__code" type="text" :placeholder="$t('login.989807-6')" />
|
||||
<input v-model="loginForm.code" auto-complete="off" class="form__input__code" type="text"
|
||||
:placeholder="$t('login.989807-6')"/>
|
||||
<div class="login-code">
|
||||
<img :src="codeUrl" @click="getCode" style="float: right"/>
|
||||
</div>
|
||||
@@ -63,7 +67,8 @@
|
||||
</el-form-item>
|
||||
|
||||
<!-- <button class="form__button button submit">登录</button> -->
|
||||
<el-button class="form__button button submit" v-if="!bindAccount" :loading="loading" type="primary" @click.native.prevent="handleLogin">
|
||||
<el-button class="form__button button submit" v-if="!bindAccount" :loading="loading" type="primary"
|
||||
@click.native.prevent="handleLogin">
|
||||
<span v-if="!loading">{{ $t('login.989807-3') }}</span>
|
||||
<span v-else>{{ $t('login.989807-13') }}</span>
|
||||
</el-button>
|
||||
@@ -82,7 +87,8 @@
|
||||
<el-form-item prop="phonenumber">
|
||||
<div class="telphone" style="width: 350px">
|
||||
<svg-icon icon-class="phone" class="icon"/>
|
||||
<input v-model="smsLoginForm.phonenumber" class="form__input__code" type="text" auto-complete="off" :placeholder="$t('login.989807-8')" @input="validatePhoneNumber" />
|
||||
<input v-model="smsLoginForm.phonenumber" class="form__input__code" type="text" auto-complete="off"
|
||||
:placeholder="$t('login.989807-8')" @input="validatePhoneNumber"/>
|
||||
<div class="sendcode">
|
||||
<el-button
|
||||
slot="append"
|
||||
@@ -101,25 +107,32 @@
|
||||
<el-form-item prop="smsCode">
|
||||
<div class="smscode" :class="{ 'is-null': isphone }">
|
||||
<svg-icon icon-class="password" class="icon"/>
|
||||
<input class="form__input" type="password" v-model="smsLoginForm.smsCode" auto-complete="off" :placeholder="$t('login.989807-9')" />
|
||||
<input class="form__input" type="password" v-model="smsLoginForm.smsCode" auto-complete="off"
|
||||
:placeholder="$t('login.989807-9')"/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<div class="other_login">
|
||||
<div class="wechat-login">
|
||||
<el-button v-if="loginForm.bindId == null" type="text" :wxloading="loading" @click.native.prevent="weChatLogin">
|
||||
<el-button v-if="loginForm.bindId == null" type="text" :wxloading="loading"
|
||||
@click.native.prevent="weChatLogin">
|
||||
<svg-icon icon-class="wechat" style="color: #07c160"/>
|
||||
{{ $t('login.989807-34') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="other-opt">
|
||||
<router-link v-if="!bindAccount" style="font-size: 14px" :to="{ path: '/register', query: this.$route.query }">{{ $t('login.989807-35') }}</router-link>
|
||||
<router-link v-else style="font-size: 14px" :to="{ path: '/register', query: this.$route.query }">{{ $t('login.989807-36') }}</router-link>
|
||||
<router-link v-if="!bindAccount" style="font-size: 14px"
|
||||
:to="{ path: '/register', query: this.$route.query }">{{ $t('login.989807-35') }}
|
||||
</router-link>
|
||||
<router-link v-else style="font-size: 14px" :to="{ path: '/register', query: this.$route.query }">
|
||||
{{ $t('login.989807-36') }}
|
||||
</router-link>
|
||||
<langSelect style="margin-left: 12px"></langSelect>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-button class="form__button button submit" type="primary" :smsLoading="loading" @click.native.prevent="handleSmsLogin">
|
||||
<el-button class="form__button button submit" type="primary" :smsLoading="loading"
|
||||
@click.native.prevent="handleSmsLogin">
|
||||
<span v-if="!loading">{{ $t('login.989807-3') }}</span>
|
||||
<span v-else>{{ $t('login.989807-13') }}</span>
|
||||
</el-button>
|
||||
@@ -143,12 +156,22 @@
|
||||
<script>
|
||||
import 'element-ui/lib/theme-chalk/display.css';
|
||||
import logo from '@/assets/logo/logo.gif';
|
||||
import { getCodeImg, checkBindId, getErrorMsg, socialLogin, bindLogin, getSmsLoginCaptcha, smsLogin } from '@/api/login';
|
||||
import {
|
||||
getCodeImg,
|
||||
checkBindId,
|
||||
getErrorMsg,
|
||||
socialLogin,
|
||||
bindLogin,
|
||||
getSmsLoginCaptcha,
|
||||
smsLogin,
|
||||
logincas
|
||||
} from '@/api/login';
|
||||
import Cookies from 'js-cookie';
|
||||
import {encrypt, decrypt} from '@/utils/jsencrypt';
|
||||
import { setToken } from '@/utils/auth';
|
||||
import {setToken, getToken, setAccessUser} from '@/utils/auth';
|
||||
import langSelect from '@/layout/components/langSelect';
|
||||
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
components: {langSelect},
|
||||
@@ -156,7 +179,7 @@ export default {
|
||||
return {
|
||||
windowWidth: window.innerWidth,
|
||||
acountLogin: true,
|
||||
phoneLogin: true,
|
||||
phoneLogin: false,
|
||||
//控制密码可见
|
||||
pwdtype: 'password',
|
||||
isGx: false,
|
||||
@@ -203,19 +226,6 @@ export default {
|
||||
],
|
||||
password: [
|
||||
{required: true, message: this.$t('login.989807-21'), trigger: 'blur'},
|
||||
// { min: 5, max: 20, message: this.$t('user.index.098976-35'), trigger: 'blur' },
|
||||
// {
|
||||
// trigger: 'blur',
|
||||
// validator: (rule, value, callback) => {
|
||||
// // 两种及以上
|
||||
// var passwordreg = /(?![A-Z]*$)(?![a-z]*$)(?![0-9]*$)(?![^a-zA-Z0-9]*$)/;
|
||||
// if (!passwordreg.test(value)) {
|
||||
// callback(new Error(this.$t('system.dept.780956-30')));
|
||||
// } else {
|
||||
// callback();
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
],
|
||||
code: [
|
||||
{
|
||||
@@ -242,13 +252,15 @@ export default {
|
||||
},
|
||||
],
|
||||
},
|
||||
loading: false,
|
||||
// 验证码开关
|
||||
captchaOnOff: true,
|
||||
bindAccount: false,
|
||||
// 注册开关
|
||||
register: true,
|
||||
redirect: undefined,
|
||||
rememberPsw: false,
|
||||
otherQuery: {},
|
||||
loading: false, // 控制系统loading框
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -262,6 +274,7 @@ export default {
|
||||
created() {
|
||||
const loginId = this.$route.query.loginId;
|
||||
if (loginId === undefined || loginId === null) {
|
||||
// 延迟执行这些方法,确保loading先显示
|
||||
this.checkBind();
|
||||
this.getCode();
|
||||
this.checkErrorMsg();
|
||||
@@ -271,14 +284,100 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 优化:延迟执行登录相关逻辑,避免阻塞页面渲染
|
||||
this.handleLoginFocus();
|
||||
this.handleCASLogin();
|
||||
this.checkDevice(); // 组件加载时检查设备
|
||||
window.addEventListener('resize', this.checkDevice); // 添加resize事件监听
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.checkDevice); // 清除事件监听
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 优化:提取CAS登录逻辑到单独方法
|
||||
handleCASLogin() {
|
||||
const ticket = this.$route.query.ticket;
|
||||
const isLoggingOut = localStorage.getItem('is_logging_out') === 'true';
|
||||
const token = getToken();
|
||||
|
||||
if (!ticket && !token) {
|
||||
// 如果是登出后返回,清除标记并停止
|
||||
if (isLoggingOut) {
|
||||
localStorage.removeItem('is_logging_out');
|
||||
return;
|
||||
}
|
||||
// 没有ticket且没有token,跳转统一身份认证
|
||||
const isTs = true;
|
||||
if (isTs) {
|
||||
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 : '');
|
||||
}
|
||||
} else if (ticket && !token) {
|
||||
// 有ticket但没有token,请求登录
|
||||
this.logincasapi();
|
||||
} else {
|
||||
|
||||
}
|
||||
},
|
||||
handleLoginFocus() {
|
||||
if (this.loginForm.loginName === "") {
|
||||
if (this.$refs.loginName) {
|
||||
this.$refs.loginName.focus();
|
||||
}
|
||||
} else if (this.loginForm.password === "") {
|
||||
if (this.$refs.password) {
|
||||
this.$refs.password.focus();
|
||||
}
|
||||
}
|
||||
},
|
||||
// 优化:CAS登录方法
|
||||
async logincasapi() {
|
||||
const ticket = this.$route.query.ticket;
|
||||
if (!ticket) {
|
||||
return;
|
||||
}
|
||||
|
||||
const obj = {
|
||||
loginName: ticket,
|
||||
password: "demo",
|
||||
verifyCode: "",
|
||||
};
|
||||
|
||||
try {
|
||||
const {code, data, token} = await logincas(obj);
|
||||
|
||||
if (code !== 200) {
|
||||
this.$message.error('CAS登录失败: ' + (data?.msg || '未知错误'));
|
||||
// 清除ticket参数,避免循环跳转
|
||||
this.$router.push({
|
||||
path: '/login',
|
||||
query: {redirect: this.redirect}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
setToken(token || data.token);
|
||||
setAccessUser(data);
|
||||
|
||||
// 跳转到目标页面,清除ticket参数
|
||||
const targetPath = this.redirect || "/";
|
||||
this.$router.push({
|
||||
path: targetPath,
|
||||
query: this.otherQuery,
|
||||
});
|
||||
} catch (error) {
|
||||
// 优化:移除不必要的console.error
|
||||
/* console.error('CAS登录错误:', error);
|
||||
console.error('错误详情:', error.response || error.message); */
|
||||
this.$message.error('CAS登录失败,请检查后端CAS配置');
|
||||
// 清除ticket参数,避免循环跳转
|
||||
this.$router.push({
|
||||
path: '/login',
|
||||
query: {redirect: this.redirect}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
changesmsForm() {
|
||||
this.acountLogin = !this.acountLogin;
|
||||
this.phoneLogin = !this.phoneLogin;
|
||||
@@ -331,7 +430,8 @@ export default {
|
||||
.push({
|
||||
path: this.redirect || '/',
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => {
|
||||
});
|
||||
if (this.captchaOnOff) {
|
||||
this.getCode();
|
||||
this.loading = false;
|
||||
@@ -362,7 +462,8 @@ export default {
|
||||
const errorId = this.$route.query.errorId;
|
||||
if (errorId !== undefined && errorId !== null) {
|
||||
getErrorMsg(errorId)
|
||||
.then((res) => {})
|
||||
.then((res) => {
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$router.push({query: {}});
|
||||
console.log(err);
|
||||
@@ -453,7 +554,8 @@ export default {
|
||||
.push({
|
||||
path: '/',
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => {
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -486,7 +588,8 @@ export default {
|
||||
.push({
|
||||
path: '/',
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => {
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
@@ -541,7 +644,8 @@ export default {
|
||||
.push({
|
||||
path: this.redirect || '/',
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => {
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
@@ -1192,4 +1296,6 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 路由跳转 Loading 样式 */
|
||||
</style>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -247,49 +247,289 @@ export default {
|
||||
maintenanceItemsPerPage: 5,
|
||||
maintenanceData: [
|
||||
// 维修完成情况数据(20条)
|
||||
{ workOrderId: 'GZ20241106001', workOrderName: '片剂生产', deviceName: '压片机', priority: '高', status: 'running' },
|
||||
{ workOrderId: 'GZ20241106002', workOrderName: '胶囊填充', deviceName: '胶囊充填机', priority: '中', status: 'warning' },
|
||||
{ workOrderId: 'GZ20241106003', workOrderName: '药品包装', deviceName: '包装机', priority: '高', status: 'running' },
|
||||
{ workOrderId: 'GZ20241106004', workOrderName: '原料灭菌', deviceName: '灭菌器', priority: '高', status: 'running' },
|
||||
{ workOrderId: 'GZ20241106005', workOrderName: '冻干处理', deviceName: '冻干机', priority: '高', status: 'running' },
|
||||
{ workOrderId: 'GZ20241106006', workOrderName: '配料准备', deviceName: '配料系统', priority: '中', status: 'running' },
|
||||
{ workOrderId: 'GZ20241106007', workOrderName: '贴标处理', deviceName: '贴标机', priority: '低', status: 'running' },
|
||||
{ workOrderId: 'GZ20241106008', workOrderName: '烘干处理', deviceName: '灭菌烘箱', priority: '高', status: 'error' },
|
||||
{ workOrderId: 'GZ20241106009', workOrderName: '颗粒包装', deviceName: '颗粒包装机', priority: '高', status: 'running' },
|
||||
{ workOrderId: 'GZ20241106010', workOrderName: '粉末包装', deviceName: '粉末包装机', priority: '中', status: 'running' },
|
||||
{ workOrderId: 'GZ20241106011', workOrderName: '液体灌装', deviceName: '液体灌装机', priority: '高', status: 'running' },
|
||||
{ workOrderId: 'GZ20241106012', workOrderName: '西林瓶灌装', deviceName: '西林瓶灌装机', priority: '中', status: 'warning' },
|
||||
{ workOrderId: 'GZ20241106013', workOrderName: '安瓿瓶灌装', deviceName: '安瓿瓶灌装机', priority: '高', status: 'running' },
|
||||
{ workOrderId: 'GZ20241106014', workOrderName: '口服液灌装', deviceName: '口服液灌装机', priority: '高', status: 'running' },
|
||||
{ workOrderId: 'GZ20241106015', workOrderName: '软膏灌装', deviceName: '软膏灌装机', priority: '高', status: 'error' },
|
||||
{ workOrderId: 'GZ20241106016', workOrderName: '栓剂成型', deviceName: '栓剂成型机', priority: '中', status: 'running' },
|
||||
{ workOrderId: 'GZ20241106017', workOrderName: '软胶囊生产', deviceName: '软胶囊机', priority: '高', status: 'running' },
|
||||
{ workOrderId: 'GZ20241106018', workOrderName: '硬胶囊生产', deviceName: '硬胶囊机', priority: '中', status: 'warning' },
|
||||
{ workOrderId: 'GZ20241106019', workOrderName: '丸剂成型', deviceName: '丸剂成型机', priority: '高', status: 'running' },
|
||||
{ workOrderId: 'GZ20241106020', workOrderName: '片剂包衣', deviceName: '片剂包衣机', priority: '高', status: 'running' }
|
||||
{
|
||||
workOrderId: 'GZ20241106001',
|
||||
workOrderName: '片剂生产',
|
||||
deviceName: '压片机',
|
||||
priority: '高',
|
||||
status: 'running'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106002',
|
||||
workOrderName: '胶囊填充',
|
||||
deviceName: '胶囊充填机',
|
||||
priority: '中',
|
||||
status: 'warning'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106003',
|
||||
workOrderName: '药品包装',
|
||||
deviceName: '包装机',
|
||||
priority: '高',
|
||||
status: 'running'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106004',
|
||||
workOrderName: '原料灭菌',
|
||||
deviceName: '灭菌器',
|
||||
priority: '高',
|
||||
status: 'running'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106005',
|
||||
workOrderName: '冻干处理',
|
||||
deviceName: '冻干机',
|
||||
priority: '高',
|
||||
status: 'running'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106006',
|
||||
workOrderName: '配料准备',
|
||||
deviceName: '配料系统',
|
||||
priority: '中',
|
||||
status: 'running'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106007',
|
||||
workOrderName: '贴标处理',
|
||||
deviceName: '贴标机',
|
||||
priority: '低',
|
||||
status: 'running'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106008',
|
||||
workOrderName: '烘干处理',
|
||||
deviceName: '灭菌烘箱',
|
||||
priority: '高',
|
||||
status: 'error'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106009',
|
||||
workOrderName: '颗粒包装',
|
||||
deviceName: '颗粒包装机',
|
||||
priority: '高',
|
||||
status: 'running'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106010',
|
||||
workOrderName: '粉末包装',
|
||||
deviceName: '粉末包装机',
|
||||
priority: '中',
|
||||
status: 'running'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106011',
|
||||
workOrderName: '液体灌装',
|
||||
deviceName: '液体灌装机',
|
||||
priority: '高',
|
||||
status: 'running'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106012',
|
||||
workOrderName: '西林瓶灌装',
|
||||
deviceName: '西林瓶灌装机',
|
||||
priority: '中',
|
||||
status: 'warning'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106013',
|
||||
workOrderName: '安瓿瓶灌装',
|
||||
deviceName: '安瓿瓶灌装机',
|
||||
priority: '高',
|
||||
status: 'running'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106014',
|
||||
workOrderName: '口服液灌装',
|
||||
deviceName: '口服液灌装机',
|
||||
priority: '高',
|
||||
status: 'running'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106015',
|
||||
workOrderName: '软膏灌装',
|
||||
deviceName: '软膏灌装机',
|
||||
priority: '高',
|
||||
status: 'error'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106016',
|
||||
workOrderName: '栓剂成型',
|
||||
deviceName: '栓剂成型机',
|
||||
priority: '中',
|
||||
status: 'running'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106017',
|
||||
workOrderName: '软胶囊生产',
|
||||
deviceName: '软胶囊机',
|
||||
priority: '高',
|
||||
status: 'running'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106018',
|
||||
workOrderName: '硬胶囊生产',
|
||||
deviceName: '硬胶囊机',
|
||||
priority: '中',
|
||||
status: 'warning'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106019',
|
||||
workOrderName: '丸剂成型',
|
||||
deviceName: '丸剂成型机',
|
||||
priority: '高',
|
||||
status: 'running'
|
||||
},
|
||||
{
|
||||
workOrderId: 'GZ20241106020',
|
||||
workOrderName: '片剂包衣',
|
||||
deviceName: '片剂包衣机',
|
||||
priority: '高',
|
||||
status: 'running'
|
||||
}
|
||||
],
|
||||
maintenanceStats: [
|
||||
// 保养统计数据(20条)
|
||||
{ maintenanceId: 'BY20241106001', maintenanceName: '季度保养', deviceName: '压片机', maintenanceCycle: '3个月', status: '已完成' },
|
||||
{ maintenanceId: 'BY20241106002', maintenanceName: '月度保养', deviceName: '胶囊充填机', maintenanceCycle: '1个月', status: '待开始' },
|
||||
{ maintenanceId: 'BY20241106003', maintenanceName: '年度保养', deviceName: '包装机', maintenanceCycle: '12个月', status: '已完成' },
|
||||
{ maintenanceId: 'BY20241106004', maintenanceName: '季度保养', deviceName: '灭菌器', maintenanceCycle: '3个月', status: '已完成' },
|
||||
{ maintenanceId: 'BY20241106005', maintenanceName: '月度保养', deviceName: '冻干机', maintenanceCycle: '1个月', status: '已完成' },
|
||||
{ maintenanceId: 'BY20241106006', maintenanceName: '季度保养', deviceName: '配料系统', maintenanceCycle: '3个月', status: '已完成' },
|
||||
{ maintenanceId: 'BY20241106007', maintenanceName: '月度保养', deviceName: '贴标机', maintenanceCycle: '1个月', status: '已完成' },
|
||||
{ maintenanceId: 'BY20241106008', maintenanceName: '年度保养', deviceName: '灭菌烘箱', maintenanceCycle: '12个月', status: '故障' },
|
||||
{ maintenanceId: 'BY20241106009', maintenanceName: '季度保养', deviceName: '颗粒包装机', maintenanceCycle: '3个月', status: '已完成' },
|
||||
{ maintenanceId: 'BY20241106010', maintenanceName: '月度保养', deviceName: '粉末包装机', maintenanceCycle: '1个月', status: '待开始' },
|
||||
{ maintenanceId: 'BY20241106011', maintenanceName: '年度保养', deviceName: '液体灌装机', maintenanceCycle: '12个月', status: '已完成' },
|
||||
{ maintenanceId: 'BY20241106012', maintenanceName: '季度保养', deviceName: '西林瓶灌装机', maintenanceCycle: '3个月', status: '待开始' },
|
||||
{ maintenanceId: 'BY20241106013', maintenanceName: '月度保养', deviceName: '安瓿瓶灌装机', maintenanceCycle: '1个月', status: '已完成' },
|
||||
{ maintenanceId: 'BY20241106014', maintenanceName: '年度保养', deviceName: '口服液灌装机', maintenanceCycle: '12个月', status: '已完成' },
|
||||
{ maintenanceId: 'BY20241106015', maintenanceName: '季度保养', deviceName: '软膏灌装机', maintenanceCycle: '3个月', status: '故障' },
|
||||
{ maintenanceId: 'BY20241106016', maintenanceName: '月度保养', deviceName: '栓剂成型机', maintenanceCycle: '1个月', status: '已完成' },
|
||||
{ maintenanceId: 'BY20241106017', maintenanceName: '年度保养', deviceName: '软胶囊机', maintenanceCycle: '12个月', status: '已完成' },
|
||||
{ maintenanceId: 'BY20241106018', maintenanceName: '季度保养', deviceName: '硬胶囊机', maintenanceCycle: '3个月', status: '待开始' },
|
||||
{ maintenanceId: 'BY20241106019', maintenanceName: '月度保养', deviceName: '丸剂成型机', maintenanceCycle: '1个月', status: '已完成' },
|
||||
{ maintenanceId: 'BY20241106020', maintenanceName: '年度保养', deviceName: '片剂包衣机', maintenanceCycle: '12个月', status: '已完成' }
|
||||
{
|
||||
maintenanceId: 'BY20241106001',
|
||||
maintenanceName: '季度保养',
|
||||
deviceName: '压片机',
|
||||
maintenanceCycle: '3个月',
|
||||
status: '已完成'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106002',
|
||||
maintenanceName: '月度保养',
|
||||
deviceName: '胶囊充填机',
|
||||
maintenanceCycle: '1个月',
|
||||
status: '待开始'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106003',
|
||||
maintenanceName: '年度保养',
|
||||
deviceName: '包装机',
|
||||
maintenanceCycle: '12个月',
|
||||
status: '已完成'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106004',
|
||||
maintenanceName: '季度保养',
|
||||
deviceName: '灭菌器',
|
||||
maintenanceCycle: '3个月',
|
||||
status: '已完成'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106005',
|
||||
maintenanceName: '月度保养',
|
||||
deviceName: '冻干机',
|
||||
maintenanceCycle: '1个月',
|
||||
status: '已完成'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106006',
|
||||
maintenanceName: '季度保养',
|
||||
deviceName: '配料系统',
|
||||
maintenanceCycle: '3个月',
|
||||
status: '已完成'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106007',
|
||||
maintenanceName: '月度保养',
|
||||
deviceName: '贴标机',
|
||||
maintenanceCycle: '1个月',
|
||||
status: '已完成'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106008',
|
||||
maintenanceName: '年度保养',
|
||||
deviceName: '灭菌烘箱',
|
||||
maintenanceCycle: '12个月',
|
||||
status: '故障'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106009',
|
||||
maintenanceName: '季度保养',
|
||||
deviceName: '颗粒包装机',
|
||||
maintenanceCycle: '3个月',
|
||||
status: '已完成'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106010',
|
||||
maintenanceName: '月度保养',
|
||||
deviceName: '粉末包装机',
|
||||
maintenanceCycle: '1个月',
|
||||
status: '待开始'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106011',
|
||||
maintenanceName: '年度保养',
|
||||
deviceName: '液体灌装机',
|
||||
maintenanceCycle: '12个月',
|
||||
status: '已完成'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106012',
|
||||
maintenanceName: '季度保养',
|
||||
deviceName: '西林瓶灌装机',
|
||||
maintenanceCycle: '3个月',
|
||||
status: '待开始'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106013',
|
||||
maintenanceName: '月度保养',
|
||||
deviceName: '安瓿瓶灌装机',
|
||||
maintenanceCycle: '1个月',
|
||||
status: '已完成'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106014',
|
||||
maintenanceName: '年度保养',
|
||||
deviceName: '口服液灌装机',
|
||||
maintenanceCycle: '12个月',
|
||||
status: '已完成'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106015',
|
||||
maintenanceName: '季度保养',
|
||||
deviceName: '软膏灌装机',
|
||||
maintenanceCycle: '3个月',
|
||||
status: '故障'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106016',
|
||||
maintenanceName: '月度保养',
|
||||
deviceName: '栓剂成型机',
|
||||
maintenanceCycle: '1个月',
|
||||
status: '已完成'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106017',
|
||||
maintenanceName: '年度保养',
|
||||
deviceName: '软胶囊机',
|
||||
maintenanceCycle: '12个月',
|
||||
status: '已完成'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106018',
|
||||
maintenanceName: '季度保养',
|
||||
deviceName: '硬胶囊机',
|
||||
maintenanceCycle: '3个月',
|
||||
status: '待开始'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106019',
|
||||
maintenanceName: '月度保养',
|
||||
deviceName: '丸剂成型机',
|
||||
maintenanceCycle: '1个月',
|
||||
status: '已完成'
|
||||
},
|
||||
{
|
||||
maintenanceId: 'BY20241106020',
|
||||
maintenanceName: '年度保养',
|
||||
deviceName: '片剂包衣机',
|
||||
maintenanceCycle: '12个月',
|
||||
status: '已完成'
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
@@ -323,18 +563,26 @@ export default {
|
||||
},
|
||||
getStatusClass(status) {
|
||||
switch (status) {
|
||||
case 'running': return 'status-running';
|
||||
case 'warning': return 'status-warning';
|
||||
case 'error': return 'status-error';
|
||||
default: return '';
|
||||
case 'running':
|
||||
return 'status-running';
|
||||
case 'warning':
|
||||
return 'status-warning';
|
||||
case 'error':
|
||||
return 'status-error';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
},
|
||||
getStatusText(status) {
|
||||
switch (status) {
|
||||
case 'running': return '运行中';
|
||||
case 'warning': return '预警';
|
||||
case 'error': return '故障';
|
||||
default: return '未知';
|
||||
case 'running':
|
||||
return '运行中';
|
||||
case 'warning':
|
||||
return '预警';
|
||||
case 'error':
|
||||
return '故障';
|
||||
default:
|
||||
return '未知';
|
||||
}
|
||||
},
|
||||
goToPreviousPage() {
|
||||
@@ -772,6 +1020,7 @@ export default {
|
||||
/* top: 10vh;
|
||||
left: 64vw; */
|
||||
}
|
||||
|
||||
.marker-15 {
|
||||
transform: scale(1.5);
|
||||
top: 55%; /* 相对于父元素高度的百分比 */
|
||||
@@ -856,6 +1105,7 @@ export default {
|
||||
/* top: 10vh;
|
||||
left: 64vw; */
|
||||
}
|
||||
|
||||
.marker-17 {
|
||||
transform: scale(1.5);
|
||||
top: 68%; /* 相对于父元素高度的百分比 */
|
||||
@@ -873,6 +1123,7 @@ export default {
|
||||
left: 64vw; */
|
||||
|
||||
}
|
||||
|
||||
.chart-container {
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user