Compare commits
13 Commits
tab2026020
...
ace17a95dd
| Author | SHA1 | Date | |
|---|---|---|---|
| ace17a95dd | |||
| 2125269c6c | |||
|
|
1373b56b94 | ||
|
|
23f4390a9b | ||
|
|
1f08afd8d3 | ||
|
|
c64012e4ea | ||
|
|
cffdd0f7ba | ||
| 1ba1186ee2 | |||
| a869e62351 | |||
| 458ac46ca4 | |||
|
|
8ec6582ffc | ||
|
|
7110ba358c | ||
| b6fcf5c32b |
@@ -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"'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
@@ -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])) {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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') {
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 列表查询
|
// 列表查询
|
||||||
async handleQueryPageList() {
|
async handleQueryPageList() {
|
||||||
debugger
|
|
||||||
// 将特殊参数值urlcode处理
|
// 将特殊参数值urlcode处理
|
||||||
// 默认的排序
|
// 默认的排序
|
||||||
if (
|
if (
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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: '',
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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,12 +11,9 @@
|
|||||||
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"
|
||||||
@@ -33,7 +28,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div>
|
<div>
|
||||||
<div style="height: 20px;"></div>
|
<div style="height: 20px"></div>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
name="password"
|
name="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,7 +70,7 @@
|
|||||||
<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"
|
||||||
@@ -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,45 @@ 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 +199,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 +216,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 +230,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 +283,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 +294,8 @@ export default {
|
|||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -260,15 +307,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 {
|
||||||
@@ -359,7 +405,7 @@ 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;
|
||||||
@@ -374,7 +420,6 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
|
||||||
.show_pwd {
|
.show_pwd {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
@@ -427,7 +472,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;
|
||||||
|
|||||||
Reference in New Issue
Block a user