Compare commits

...

14 Commits

Author SHA1 Message Date
chy
c5fdbd6a27 111111112 2026-03-06 22:45:55 +08:00
chy
ace17a95dd Merge branch 'main' of http://8.130.49.250:3000/admin/gr_bi_web
# Conflicts:
#	src/views/login.vue
2026-03-06 22:44:43 +08:00
chy
2125269c6c 1 2026-03-06 22:41:57 +08:00
DESKTOP-AD8UBUJ\ling
1373b56b94 单点修改1 2026-03-06 22:22:42 +08:00
DESKTOP-AD8UBUJ\ling
23f4390a9b 加阅读模式 2026-03-06 08:04:29 +08:00
DESKTOP-AD8UBUJ\ling
1f08afd8d3 下钻配置未清空上次配置问题修复 2026-03-05 15:27:35 +08:00
DESKTOP-AD8UBUJ\ling
c64012e4ea 补充 2026-03-02 21:35:40 +08:00
DESKTOP-AD8UBUJ\ling
cffdd0f7ba 大屏表格下钻 2026-03-02 21:34:56 +08:00
chy
1ba1186ee2 修改统一身份认证 2026-03-02 15:14:07 +08:00
chy
a869e62351 修改统一身份认证 2026-03-02 10:33:39 +08:00
chy
458ac46ca4 添加空字符 2026-02-28 08:46:34 +08:00
mll
8ec6582ffc bigscreen/viewer本页面路由跳转问题 2026-02-27 22:16:22 +08:00
mll
7110ba358c 大屏预览底部空白修复 2026-02-27 22:08:37 +08:00
b6fcf5c32b Merge pull request 'tab20260208' (#3) from tab20260208 into main
Reviewed-on: #3
2026-02-13 12:13:10 +08:00
12 changed files with 212 additions and 68 deletions

View File

@@ -4,6 +4,6 @@ const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, { module.exports = merge(prodEnv, {
NODE_ENV: '"development"', NODE_ENV: '"development"',
BASE_API: '"http://127.0.0.1:48090"' // BASE_API: '"http://127.0.0.1:48090"'
// BASE_API: '"http://192.168.1.241:8080/prod-api"' BASE_API: '"http://192.168.1.241:8080/prod-api"'
}) })

View File

@@ -8,6 +8,14 @@ export function login (data) {
}) })
} }
export function logincas (data) {
return request({
url: 'accessUser/logincas',
method: 'post',
data
})
}
export function logout () { export function logout () {
return request({ return request({
url: 'accessUser/logout', url: 'accessUser/logout',

View File

@@ -271,7 +271,6 @@ export default {
return { top: top, left: left } return { top: top, left: left }
}, },
objToOne(obj) { objToOne(obj) {
console.log(obj)
let tmpData = {} let tmpData = {}
for (let index in obj) { for (let index in obj) {
if (typeof obj[index] == 'object' && !this.isArrayFn(obj[index])) { if (typeof obj[index] == 'object' && !this.isArrayFn(obj[index])) {

View File

@@ -6,7 +6,6 @@ export default router
const whiteList = ['/login', '/aj/**', '/el/**', '/bigscreen/viewer', '/excelreport/viewer'] const whiteList = ['/login', '/aj/**', '/el/**', '/bigscreen/viewer', '/excelreport/viewer']
// 判断是否需要登录权限 以及是否登录 // 判断是否需要登录权限 以及是否登录
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start()
let token = getToken(); let token = getToken();
let lideeUser = getAccessUser(); let lideeUser = getAccessUser();
@@ -18,6 +17,7 @@ router.beforeEach((to, from, next) => {
next() next()
} }
}else { }else {
if (whiteList.includes(to.path)) { if (whiteList.includes(to.path)) {
next() next()
}else { }else {

View File

@@ -250,7 +250,8 @@ export const constantRouterMap = [
component: () => import('@/views/bigscreenDesigner/viewer'), component: () => import('@/views/bigscreenDesigner/viewer'),
hidden: true, hidden: true,
meta: { meta: {
requireAuth: true requireAuth: true,
keepAlive: true,
} }
}, },
{ {

View File

@@ -1,11 +1,12 @@
import axios from 'axios' import axios from 'axios'
import { Message, MessageBox } from 'element-ui' import { Message, MessageBox } from 'element-ui'
import router from '../router'
import store from '../store' import store from '../store'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
// 创建axios实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
baseURL: process.env.BASE_API, // api 的 base_url baseURL: process.env.BASE_API, // api 的 base_url
timeout: 20000 // 请求超时时间 timeout: 200000 // 请求超时时间
}) })
// request拦截器 // request拦截器
@@ -41,7 +42,13 @@ service.interceptors.response.use(
// sessionStorage.clear() // sessionStorage.clear()
// localStorage.clear() // localStorage.clear()
localStorage.removeItem('AJReportToken') localStorage.removeItem('AJReportToken')
window.location.href = "/"; router.push({
path: '/login',
query: {
redirect: location.hash.substring(1)
}
})
// window.location.href = "/index?redirect=" + location.hash.substring(1);
}) })
} }
else if (res.code !== '200') { else if (res.code !== '200') {

View File

@@ -259,7 +259,7 @@ export default {
}, },
// 列表查询 // 列表查询
async handleQueryPageList() { async handleQueryPageList() {
debugger
// 将特殊参数值urlcode处理 // 将特殊参数值urlcode处理
// 默认的排序 // 默认的排序
if ( if (

View File

@@ -538,7 +538,10 @@ export default {
}, },
handleCollapse(val){ handleCollapse(val){
this.dialogVisibleDrillDrown=true this.dialogVisibleDrillDrown=true
this.screenData=val.drill_drown_setting?val.drill_drown_setting:this.screenData this.screenData=val.drill_drown_setting?val.drill_drown_setting:{
dashboard: { },
widgets: []
}
}, },
// 获取图层数据 // 获取图层数据
getLayerData(val) { getLayerData(val) {

View File

@@ -66,6 +66,14 @@ export const widgetTable = {
placeholder: '', placeholder: '',
value: false value: false
}, },
{
type: 'el-switch',
label: '序号',
name: 'isIndex',
required: false,
placeholder: '',
value: false
},
{ {
type: 'el-input-number', type: 'el-input-number',
label: '边框宽度', label: '边框宽度',
@@ -314,8 +322,44 @@ export const widgetTable = {
value: 1 value: 1
}, },
] ]
} },
], ],
{
type: 'el-switch',
label: '开启下钻',
name: 'is_drill_drown',
required: false,
placeholder: '',
value: false,
},
{
type: 'el-collapse',
label: '下钻配置',
name: 'drill_drown_setting',
relactiveDom:'is_drill_drown',
relactiveDomValue:true,
required: false,
placeholder: '',
value:''
},
{
type: 'el-switch',
label: '阅读模式',
name: 'is_read_mode',
required: false,
placeholder: '',
value: false,
},
{
type: 'vue-color',
label: '阅读模式颜色',
name: 'read_color',
relactiveDom:'is_read_mode',
relactiveDomValue:true,
required: false,
placeholder: '',
value:''
},
{ {
type: 'dynamic-add-table', type: 'dynamic-add-table',
label: '', label: '',

View File

@@ -3,26 +3,43 @@
<superslide v-if="hackReset" :options="options" class="txtScroll-top" ref="superslide"> <superslide v-if="hackReset" :options="options" class="txtScroll-top" ref="superslide">
<!--表头--> <!--表头-->
<div class="title"> <div class="title">
<div
v-if="isIndex"
:style="[headerTableStyle, tableRowHeight()]">
序号
</div>
<div v-for="(item, index) in header" :key="index" <div v-for="(item, index) in header" :key="index"
:style="[headerTableStyle, tableFiledWidth(index), tableRowHeight()]"> :style="[headerTableStyle, tableFiledWidth(index), tableRowHeight()]">
{{ item.name }} {{ item.name }}
</div> </div>
</div> </div>
<!--数据--> <!--数据-->
<div class="bd"> <div class="bd" @click="handleClick">
<ul class="infoList"> <ul class="infoList">
<li v-for="(item, index) in list" :key="index" :style="tableRowHeight()"> <li v-for="(item, index) in list" :key="index" :style="tableRowHeight()">
<div v-for="(itemChild, idx) in header" <div
v-if="isIndex"
:style="[
bodyTableStyle,
bodyTable(index),
tableRowHeight()
]"
>
{{ index + 1 }}
</div>
<div @mouseenter="handleMouseSeen(index, idx)" @mouseleave="handleMouseLeave" v-for="(itemChild, idx) in header"
:key="idx" :key="idx"
:style="[ :style="[
bodyTableStyle, bodyTableStyle,
bodyTable(index), bodyTable(index),
tableFiledWidth(idx), tableFiledWidth(idx),
tableReadColor(index, idx),
tableRowHeight() tableRowHeight()
]" ]"
> >
{{ item[itemChild.key] }} {{ item[itemChild.key] }}
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>
@@ -98,10 +115,12 @@ export default {
}, },
header: [], header: [],
list: [], list: [],
hoverIndex: {},
optionsSetUp: {}, optionsSetUp: {},
optionsPosition: {}, optionsPosition: {},
optionsData: {}, optionsData: {},
flagInter: null, flagInter: null,
isIndex: false,
// 新增导出对话框相关数据 // 新增导出对话框相关数据
exportDialogVisible: false, exportDialogVisible: false,
exporting: false, exporting: false,
@@ -131,6 +150,7 @@ export default {
}, },
headerTableStyle() { headerTableStyle() {
const headStyle = this.optionsSetUp; const headStyle = this.optionsSetUp;
this.isIndex=headStyle.isIndex
return { return {
"text-align": headStyle.textAlignHeader, "text-align": headStyle.textAlignHeader,
"font-size": headStyle.fontSizeHeader + "px", "font-size": headStyle.fontSizeHeader + "px",
@@ -216,6 +236,7 @@ export default {
value: { value: {
handler(val) { handler(val) {
this.optionsSetUp = val.setup; this.optionsSetUp = val.setup;
this.optionsPosition = val.position; this.optionsPosition = val.position;
this.optionsData = val.data; this.optionsData = val.data;
this.initData(); this.initData();
@@ -238,6 +259,17 @@ export default {
window.removeEventListener('resize', this.handleResize); window.removeEventListener('resize', this.handleResize);
}, },
methods: { methods: {
handleMouseSeen(index, idx){
this.hoverIndex = {index, idx}
},
handleMouseLeave(){
this.hoverIndex = {}
},
handleClick(){
if(!!this.optionsSetUp.is_drill_drown){
this.$emit('oepnTheDrillView',this.optionsSetUp.drill_drown_setting)
}
},
initData() { initData() {
this.handlerRollFn(); this.handlerRollFn();
this.handlerHead(); this.handlerHead();
@@ -341,6 +373,13 @@ export default {
} }
return styleJson; return styleJson;
}, },
tableReadColor(index, idx){
let styleJson = {};
if (this.optionsSetUp.is_read_mode && (this.hoverIndex.index === index || this.hoverIndex.idx === idx)) {
styleJson["background-color"] = this.optionsSetUp.read_color;
}
return styleJson;
},
// 添加的方法 - 设备类型检测 // 添加的方法 - 设备类型检测
checkDeviceType() { checkDeviceType() {
this.screenWidth = window.innerWidth; this.screenWidth = window.innerWidth;

View File

@@ -20,8 +20,8 @@
<el-dialog <el-dialog
:title="''" :title="''"
class="dialogDrillDrown dialogDrillDrownView" :visible.sync="visiableDrillView"> class="dialogDrillDrown dialogDrillDrownView" :visible.sync="visiableDrillView">
<drill-drown-view :screenData="screenData"></drill-drown-view> <drill-drown-view :screenData="screenData"></drill-drown-view>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@@ -133,9 +133,9 @@ export default {
<style lang="scss"> <style lang="scss">
.layout { .layout {
width: 100%; width: 100%;
height: auto;
text-align: center; text-align: center;
overflow:hidden
} }
.dialogDrillDrownView .el-dialog{ .dialogDrillDrownView .el-dialog{
width:auto; width:auto;

View File

@@ -1,7 +1,5 @@
<template> <template>
<div class="login_container"> <div class="login_container">
<div class="login_contant"> <div class="login_contant">
<img src="@/assets/images/login.jpg" alt="image" class="login_img" /> <img src="@/assets/images/login.jpg" alt="image" class="login_img" />
<el-form <el-form
@@ -13,28 +11,25 @@
label-position="left" label-position="left"
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin"
> >
<div class="title_container"> <div class="title_container">国瑞药业驾驶舱平台</div>
智慧大屏 <div style="height: 30px"></div>
</div>
<div style="height: 30px;"></div>
<div class="form_fields"> <div class="form_fields">
<el-form-item prop="loginName">
<el-form-item prop="loginName"> <el-input
<el-input ref="loginName"
ref="loginName" v-model="loginForm.loginName"
v-model="loginForm.loginName" placeholder="用户名"
placeholder="用户名" name="loginName"
name="loginName" type="text"
type="text" tabindex="1"
tabindex="1" autocomplete="on"
autocomplete="on" @focus="setTop('0')"
@focus="setTop('0')" @change="getPsw"
@change="getPsw" />
/> </el-form-item>
</el-form-item>
<div> <div>
<div style="height: 20px;"></div> <div style="height: 20px"></div>
<input <input
name="password" name="password"
type="password" type="password"
@@ -62,7 +57,7 @@
@keyup.native="checkCapslock" @keyup.native="checkCapslock"
/> />
<span class="show_pwd" @click="showPwd"> <span class="show_pwd" @click="showPwd">
<div style="height: 10px;"></div> <div style="height: 10px"></div>
<i class="el-icon-view" /> <i class="el-icon-view" />
</span> </span>
</el-form-item> </el-form-item>
@@ -75,13 +70,13 @@
<p>记住密码</p> <p>记住密码</p>
</div> </div>
</div> </div>
<div style="height: 30px;"></div> <div style="height: 30px"></div>
<el-button <el-button
:loading="loading" :loading="loading"
type="primary" type="primary"
class="login_btn" class="login_btn"
@click.native.prevent="handleLogin" @click.native.prevent="handleLogin"
> </el-button > </el-button
> >
</el-form> </el-form>
</div> </div>
@@ -100,13 +95,14 @@
import Verify from "@/components/verifition/Verify"; import Verify from "@/components/verifition/Verify";
import cookies from "js-cookie"; import cookies from "js-cookie";
import { Decrypt, Encrypt } from "@/utils/index"; import { Decrypt, Encrypt } from "@/utils/index";
import { login } from "@/api/login"; import { login, logincas } from "@/api/login";
import { transPsw } from "@/utils/encrypted"; import { transPsw } from "@/utils/encrypted";
import { setToken, setAccessUser } from "@/utils/auth"; import { setToken, getToken, setAccessUser } from "@/utils/auth";
export default { export default {
name: "Login", name: "Login",
components: { components: {
Verify Verify,
}, },
data() { data() {
return { return {
@@ -115,11 +111,13 @@ export default {
loginForm: { loginForm: {
loginName: "", loginName: "",
password: "", password: "",
verifyCode: "" verifyCode: "",
}, },
loginRules: { loginRules: {
loginName: [{ required: true, message: "用户名必填", trigger: "blur" }], loginName: [{ required: true, message: "用户名必填", trigger: "blur" }],
password: [{ required: true, message: "用户密码必填", trigger: "blur" }] password: [
{ required: true, message: "用户密码必填", trigger: "blur" },
],
}, },
passwordType: "password", passwordType: "password",
capsTooltip: false, capsTooltip: false,
@@ -127,25 +125,43 @@ export default {
redirect: undefined, redirect: undefined,
otherQuery: {}, otherQuery: {},
needCaptcha: false, needCaptcha: false,
centerDialogVisible: false centerDialogVisible: false,
}; };
}, },
watch: { watch: {
$route: { $route: {
// 监听路由获取上个路由from的地址和参数 // 监听路由获取上个路由from的地址和参数
handler: function(route) { handler: function (route) {
const query = route.query; const query = route.query;
if (query) { if (query) {
this.redirect = query.redirect; this.redirect = query.redirect;
this.otherQuery = this.getOtherQuery(query); this.otherQuery = this.getOtherQuery(query);
} }
}, },
immediate: true immediate: true,
} },
}, },
mounted() { mounted() {
this.handleLoginFocus(); this.handleLoginFocus();
//获取url传参 ticket url
const ticket = this.$route.query.ticket;
let token = getToken();
if (ticket == undefined && token == null) {
//跳转统一身份认证
var isTs = true;
if (isTs) {
console.log(this.redirect);
window.location.href =
"http://192.168.1.241/login?redirect=/lig/oauth2/oauth2/application&appid=330b4ecb60c9a6802b957fe1e5a5ecd3&url=http%3A%2F%2F192.168.1.241%3A8080%2F%23" + this.redirect;
// window.location.href = 'http://localhost:8099/login?redirect=/lig/oauth2/oauth2/application&appid=330b4ecb60c9a6802b957fe1e5a5ecd3&url=http%3A%2F%2Flocalhost%3A9528%2F%23'+this.redirect;
}
} else if (ticket != undefined && token == null) {
//请求登录
this.logincasapi();
} else {
}
}, },
created() {},
methods: { methods: {
handleLoginFocus() { handleLoginFocus() {
if (this.loginForm.loginName === "") { if (this.loginForm.loginName === "") {
@@ -181,7 +197,7 @@ export default {
}, },
// 滑动验证码 // 滑动验证码
useVerify() { useVerify() {
this.$refs.loginForm.validate(valid => { this.$refs.loginForm.validate((valid) => {
if (valid) { if (valid) {
this.$refs.verify.show(); this.$refs.verify.show();
} else { } else {
@@ -198,7 +214,7 @@ export default {
}, },
// 登录操作 // 登录操作
handleLogin() { handleLogin() {
this.$refs.loginForm.validate(valid => { this.$refs.loginForm.validate((valid) => {
if (valid) { if (valid) {
this.loading = true; this.loading = true;
// 登录失败次数过多需要展示滑动验证码 // 登录失败次数过多需要展示滑动验证码
@@ -212,11 +228,40 @@ export default {
} }
}); });
}, },
async logincasapi() {
const ticket = this.$route.query.ticket;
const obj = {
loginName: ticket,
password: "demo",
verifyCode: "",
};
const { code, data } = await logincas(obj);
this.loading = false;
if (code != "200") return;
setToken(data.token);
setAccessUser(data);
// 选中记住密码时 把密码存到cookie里,时效15天
this.rememberPsw &&
cookies.set(
`u_${this.loginForm.loginName}`,
Encrypt(this.loginForm.password),
{ expires: 15 }
);
if (data && data.captcha) {
this.needCaptcha = true;
} else {
this.needCaptcha = false;
this.$router.push({
path: this.redirect || "/index",
query: this.otherQuery,
});
}
},
async loginApi() { async loginApi() {
const obj = { const obj = {
loginName: this.loginForm.loginName, loginName: this.loginForm.loginName,
password: transPsw(this.loginForm.password), password: transPsw(this.loginForm.password),
verifyCode: "" verifyCode: "",
}; };
const { code, data } = await login(obj); const { code, data } = await login(obj);
this.loading = false; this.loading = false;
@@ -236,7 +281,7 @@ export default {
this.needCaptcha = false; this.needCaptcha = false;
this.$router.push({ this.$router.push({
path: this.redirect || "/index", path: this.redirect || "/index",
query: this.otherQuery query: this.otherQuery,
}); });
} }
}, },
@@ -247,8 +292,8 @@ export default {
} }
return acc; return acc;
}, {}); }, {});
} },
} },
}; };
</script> </script>
@@ -260,15 +305,14 @@ export default {
opacity: 10; opacity: 10;
background: #fff; background: #fff;
} }
.delete { .delete {
color: #fff; color: #fff;
} }
.login_container { .login_container {
.el-input { .el-input {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
} }
.el-form-item { .el-form-item {
@@ -345,7 +389,7 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
//height: calc(100% - 60px); //height: calc(100% - 60px);
height: 100%; height: 100%;
.login_img { .login_img {
display: block; display: block;
width: 100%; width: 100%;
@@ -359,22 +403,21 @@ export default {
min-width: 460px; min-width: 460px;
width: 22%; width: 22%;
height: 400px; height: 400px;
background-color: #006DD9; background-color: #006dd9;
opacity: 0.6; opacity: 0.6;
padding: 30px; padding: 30px;
overflow: hidden; overflow: hidden;
.title_container { .title_container {
position: relative; position: relative;
font-size: 22px; font-size: 22px;
color: #fff; color: #fff;
text-align: center; text-align: center;
} }
.form_fields { .form_fields {
position: relative; position: relative;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
.show_pwd { .show_pwd {
position: absolute; position: absolute;
right: 10px; right: 10px;
@@ -427,7 +470,7 @@ export default {
.login_btn { .login_btn {
min-width: 400px; min-width: 400px;
height: 40px; height: 40px;
background: #0BA1F8; background: #0ba1f8;
border: none; border: none;
// border-radius: 10px; // border-radius: 10px;
font-size: 20px; font-size: 20px;