Compare commits

...

3 Commits

Author SHA1 Message Date
lcw
2d40736a96 lcw 2025-09-15 12:24:21 +08:00
lcw
64c1e28f71 lcw 2025-09-15 12:18:30 +08:00
lcw
97a8dd26e2 lcw 2025-09-15 11:49:47 +08:00
29 changed files with 91 additions and 54 deletions

View File

@ -2,13 +2,17 @@
<template>
<router-view v-slot="{ Component }" v-if="isRouterAlive">
<keep-alive :include="store.getters.keepLiiveRoute">
<Watermark :text="content" :color="'rgba(0, 0, 0, .15)'">
<Component :is="Component"></Component>
</Watermark>
</keep-alive>
</router-view>
</template>
<script setup>
import { ref, nextTick, provide, onMounted } from "vue";
import { useStore } from "vuex";
import Watermark from "@/components/Watermark.vue";
import { timeValidate } from "@/utils/tools.js";
import { getItem } from "@/utils/storage";
import { qcckPost, qcckGet, qcckPut, qcckDelete } from "@/api/qcckApi.js";
import { generateNewStyle, writeNewStyle } from "@/utils/theme";
@ -26,9 +30,16 @@ const reload = () => {
provide("reload", reload);
onMounted(() => {
let dept = getItem("deptId");
frashJs()
document.title = "林芝";
});
const content=ref([])
const frashJs = () => {
const sfzh= getItem("idEntityCard")
const userName= getItem("USERNAME")
const time = timeValidate()
content.value=[userName,sfzh,time,"林芝市环林卡口综合管理","禁止泄露公民个人信息和警务工作秘密"]
}
</script>
<style lang="scss">
@import "./styles/index.scss";

View File

@ -17,7 +17,6 @@ let onRun = true;
router.beforeEach(async (to, from, next) => {
// 存在 token ,进入主页
console.log(store.getters.token, '===store.getters.token');
// if (store.state.user.token) {
// 快捷访问
if (store.getters.token) {
@ -47,12 +46,12 @@ router.beforeEach(async (to, from, next) => {
if (whiteList.indexOf(to.path) > -1) {
next()
} else {
next('/oatuh_login')
// if (isOatuh) {
// next('/oatuh_login')
// } else {
// next('/login')
// }
if (isOatuh) {
const idEntityCard = getItem('idEntityCard')
next(`/oatuh_login?token=${Base64.encode(idEntityCard)}`)
} else {
next('/login')
}
}
}
})

View File

@ -21,6 +21,11 @@ export const privateRoutes = [];
* 公开路由表
*/
export const publicRoutes = [
{
path: "/oatuh_login",
name: "oatuh_login",
component: () => import("@/views/login/oatuh_login")
},
{
path: "/oatuh_login",
name: "oatuh_login",
@ -421,6 +426,7 @@ export const publicRoutes = [
{
path: "/checkpoint",
name: "checkpoint",
redirect: "/checkpoint",
meta: {
title: "环林卡口管理",
icon: "article"
@ -441,6 +447,7 @@ export const publicRoutes = [
{
path: "/forewarning",
name: "forewarning",
redirect: "/forewarning",
meta: {
title: "预警管理",
icon: "article"

View File

@ -132,23 +132,16 @@ export default {
*单点登录
*/
oatuhLogin(ctx, userInfo) {
const {
token,
systemId,
} = userInfo;
const { token, systemId, } = userInfo;
return new Promise((resolve, reject) => {
unifiedLogin({
token,
systemId,
})
.then((data) => {
debugger
unifiedLogin({ token, systemId }).then((data) => {
if (data.deptList.length === 1) {
this.commit("user/setToken", data.jwtToken);
this.commit("user/setDeptId", data.deptList);
this.commit("user/setUserName", data.userName);
setItem("USERNAME", data.userName);
setItem('fzUserId', data.fzUserId)
setItem("SFRH", data.sfrh);
setItem("USERID", data.userId);
setItem("PermissionsInfo", data.permissionsInfo);

View File

@ -139,7 +139,6 @@ const pageData = reactive({
const Auth = ref(true)
onMounted(() => {
Auth.value = isAuth()
tabHeightFn();
});

View File

@ -26,7 +26,7 @@ const handleLogin = (e) => {
store.dispatch("user/oatuhLogin", e).then((res) => {
// 登录后操作
if (res.deptList.length === 1) {
// window.location.hash = "/";
window.location.hash = "/";
} else {
deptList.value = [...res.deptList];
loginDialog.value = true;

View File

@ -4,8 +4,8 @@ function resolve(dir) {
return path.join(__dirname, dir);
}
// const serverHost = "http://192.192.8.9:8006";
const serverHost = "http://192.168.1.32:8066"
const serverHost = "http://192.168.8.15:8006"
// const serverHost = "http://192.168.1.32:8066"
// const serverHost = "http://127.0.0.1:8006"
module.exports = {
publicPath: "./",

9
ylth/index.html Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22bd3e"],{f141:function(t,e,n){"use strict";n.r(e);var o=n("7a23"),c=n("5502"),a=n("5d2d"),u={__name:"oatuh_login",setup(t){const e=Object(o["ref"])(!1),n=Object(o["ref"])([]),u=Object(c["b"])();function i(){let t=location.hash.slice(20)||null;null!=t?(t=t.replace(/\ +/g,""),Object(a["c"])("SSOTOKEN",t),l({token:t})):window.location.href="http://155.240.22.102:40992"}const l=t=>{u.dispatch("user/oatuhLogin",t).then(t=>{1===t.deptList.length?window.location.hash="/":(n.value=[...t.deptList],e.value=!0,authorization.value=t.jwtToken)})};return Object(o["onMounted"])(()=>{i()}),(t,e)=>null}};const i=u;e["default"]=i}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

BIN
ylth/ylth.zip Normal file

Binary file not shown.