优化导出等报错问题
This commit is contained in:
parent
74a9eb5e31
commit
489085c3a8
|
|
@ -3,7 +3,10 @@
|
||||||
<div class="login-bar">
|
<div class="login-bar">
|
||||||
<div class="form-bar">
|
<div class="form-bar">
|
||||||
<h3 class="title">智慧仓储管理平台</h3>
|
<h3 class="title">智慧仓储管理平台</h3>
|
||||||
<el-tabs v-model="activeName" style="width: 400px; padding: 25px 25px 5px 25px">
|
<el-tabs
|
||||||
|
v-model="activeName"
|
||||||
|
style="width: 400px; padding: 25px 25px 5px 25px"
|
||||||
|
>
|
||||||
<el-tab-pane label="账号登录" name="account">
|
<el-tab-pane label="账号登录" name="account">
|
||||||
<!-- 账户密码登录 -->
|
<!-- 账户密码登录 -->
|
||||||
<el-form
|
<el-form
|
||||||
|
|
@ -14,8 +17,17 @@
|
||||||
v-if="activeName === 'account'"
|
v-if="activeName === 'account'"
|
||||||
>
|
>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
<el-input
|
||||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
v-model="loginForm.username"
|
||||||
|
type="text"
|
||||||
|
auto-complete="off"
|
||||||
|
placeholder="账号"
|
||||||
|
>
|
||||||
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="user"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
|
|
@ -27,30 +39,56 @@
|
||||||
show-password
|
show-password
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="password"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- 5.29 新增双因子验证 -->
|
<!-- 5.29 新增双因子验证 -->
|
||||||
<el-form-item prop="textCode" class="code-container" v-if="loginForm.username === 'adminBns'">
|
<el-form-item
|
||||||
<el-input v-model="loginForm.textCode" placeholder="短信验证码" style="width: 67%">
|
prop="textCode"
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
class="code-container"
|
||||||
|
v-if="loginForm.username === 'adminBns'"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="loginForm.textCode"
|
||||||
|
placeholder="短信验证码"
|
||||||
|
style="width: 67%"
|
||||||
|
>
|
||||||
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="validCode"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="login-code">
|
<div class="login-code">
|
||||||
<div
|
<div
|
||||||
class="login-code-img"
|
class="login-code-img"
|
||||||
style="border: 1px solid rgb(220, 223, 230)"
|
style="
|
||||||
|
border: 1px solid rgb(220, 223, 230);
|
||||||
|
"
|
||||||
v-if="showNew === 1"
|
v-if="showNew === 1"
|
||||||
@click="getTextCodeNew"
|
@click="getTextCodeNew"
|
||||||
>
|
>
|
||||||
获取验证码
|
获取验证码
|
||||||
</div>
|
</div>
|
||||||
<div class="login-code-img" style="border: 1px solid rgb(220, 223, 230)" v-show="showNew === 2">
|
<div
|
||||||
|
class="login-code-img"
|
||||||
|
style="
|
||||||
|
border: 1px solid rgb(220, 223, 230);
|
||||||
|
"
|
||||||
|
v-show="showNew === 2"
|
||||||
|
>
|
||||||
{{ countNew }} s
|
{{ countNew }} s
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="login-code-img"
|
class="login-code-img"
|
||||||
style="border: 1px solid rgb(220, 223, 230)"
|
style="
|
||||||
|
border: 1px solid rgb(220, 223, 230);
|
||||||
|
"
|
||||||
v-if="showNew === 3"
|
v-if="showNew === 3"
|
||||||
@click="getTextCodeNew"
|
@click="getTextCodeNew"
|
||||||
>
|
>
|
||||||
|
|
@ -58,17 +96,29 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="code" v-if="captchaEnabled" class="code-container">
|
<el-form-item
|
||||||
|
prop="code"
|
||||||
|
v-if="captchaEnabled"
|
||||||
|
class="code-container"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.code"
|
v-model="loginForm.code"
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="图形验证码"
|
placeholder="图形验证码"
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="validCode"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="login-code">
|
<div class="login-code">
|
||||||
<img :src="codeUrl" @click="getCode(1)" class="login-code-img" />
|
<img
|
||||||
|
:src="codeUrl"
|
||||||
|
@click="getCode(1)"
|
||||||
|
class="login-code-img"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="width: 100%">
|
<el-form-item style="width: 100%">
|
||||||
|
|
@ -84,7 +134,9 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
<div style="float: right" v-if="register">
|
<div style="float: right" v-if="register">
|
||||||
<!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>-->
|
<!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>-->
|
||||||
<router-link class="link-type" :to="'/ '">立即注册</router-link>
|
<router-link class="link-type" :to="'/ '"
|
||||||
|
>立即注册</router-link
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -105,10 +157,17 @@
|
||||||
@focus="handleInputClick"
|
@focus="handleInputClick"
|
||||||
placeholder="手机号"
|
placeholder="手机号"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="phone" class="el-input__icon input-icon" />
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="phone"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="textCode" class="code-container">
|
<el-form-item
|
||||||
|
prop="textCode"
|
||||||
|
class="code-container"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="phoneLoginParams.textCode"
|
v-model="phoneLoginParams.textCode"
|
||||||
placeholder="短信验证码"
|
placeholder="短信验证码"
|
||||||
|
|
@ -116,24 +175,38 @@
|
||||||
@focus="handleInputClick"
|
@focus="handleInputClick"
|
||||||
@input="inputChangeTextCode"
|
@input="inputChangeTextCode"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="validCode"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="login-code">
|
<div class="login-code">
|
||||||
<!-- <div class="login-code-img" style="border: 1px solid rgb(220, 223, 230);" @click="getTextCode">获取验证码</div> -->
|
<!-- <div class="login-code-img" style="border: 1px solid rgb(220, 223, 230);" @click="getTextCode">获取验证码</div> -->
|
||||||
<div
|
<div
|
||||||
class="login-code-img"
|
class="login-code-img"
|
||||||
style="border: 1px solid rgb(220, 223, 230)"
|
style="
|
||||||
|
border: 1px solid rgb(220, 223, 230);
|
||||||
|
"
|
||||||
v-show="show === 1"
|
v-show="show === 1"
|
||||||
@click.prevent="getTextCode"
|
@click.prevent="getTextCode"
|
||||||
>
|
>
|
||||||
获取验证码
|
获取验证码
|
||||||
</div>
|
</div>
|
||||||
<div class="login-code-img" style="border: 1px solid rgb(220, 223, 230)" v-if="show === 2">
|
<div
|
||||||
|
class="login-code-img"
|
||||||
|
style="
|
||||||
|
border: 1px solid rgb(220, 223, 230);
|
||||||
|
"
|
||||||
|
v-if="show === 2"
|
||||||
|
>
|
||||||
{{ count }} s
|
{{ count }} s
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="login-code-img"
|
class="login-code-img"
|
||||||
style="border: 1px solid rgb(220, 223, 230)"
|
style="
|
||||||
|
border: 1px solid rgb(220, 223, 230);
|
||||||
|
"
|
||||||
v-if="show === 3"
|
v-if="show === 3"
|
||||||
@click.prevent="getTextCode"
|
@click.prevent="getTextCode"
|
||||||
>
|
>
|
||||||
|
|
@ -175,8 +248,16 @@
|
||||||
width="30%"
|
width="30%"
|
||||||
:before-close="handleClose"
|
:before-close="handleClose"
|
||||||
>
|
>
|
||||||
<el-form ref="phoneLoginCodeFormRef" :model="phoneLoginParams" :rules="phoneLoginCodeRules">
|
<el-form
|
||||||
<el-form-item prop="code" v-if="captchaEnabled" class="code-container">
|
ref="phoneLoginCodeFormRef"
|
||||||
|
:model="phoneLoginParams"
|
||||||
|
:rules="phoneLoginCodeRules"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
prop="code"
|
||||||
|
v-if="captchaEnabled"
|
||||||
|
class="code-container"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="phoneLoginParams.code"
|
v-model="phoneLoginParams.code"
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
|
|
@ -184,15 +265,26 @@
|
||||||
@keyup.enter.native="textLogin"
|
@keyup.enter.native="textLogin"
|
||||||
style="width: 70%"
|
style="width: 70%"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="validCode"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="login-code">
|
<div class="login-code">
|
||||||
<img :src="phoneCodeUrl" @click="getCode(2)" class="login-code-img" style="width: 100%" />
|
<img
|
||||||
|
:src="phoneCodeUrl"
|
||||||
|
@click="getCode(2)"
|
||||||
|
class="login-code-img"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitSendCode()">确 定</el-button>
|
<el-button type="primary" @click="submitSendCode()"
|
||||||
|
>确 定</el-button
|
||||||
|
>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
@ -204,8 +296,16 @@
|
||||||
width="30%"
|
width="30%"
|
||||||
:before-close="handleCloseNew"
|
:before-close="handleCloseNew"
|
||||||
>
|
>
|
||||||
<el-form ref="phoneLoginCodeFormNewRef" :model="phoneLoginParamsNew" :rules="phoneLoginCodeNewRules">
|
<el-form
|
||||||
<el-form-item prop="code" v-if="captchaEnabled" class="code-container">
|
ref="phoneLoginCodeFormNewRef"
|
||||||
|
:model="phoneLoginParamsNew"
|
||||||
|
:rules="phoneLoginCodeNewRules"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
prop="code"
|
||||||
|
v-if="captchaEnabled"
|
||||||
|
class="code-container"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="phoneLoginParamsNew.code"
|
v-model="phoneLoginParamsNew.code"
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
|
|
@ -213,15 +313,26 @@
|
||||||
@keyup.enter.native="textLogin"
|
@keyup.enter.native="textLogin"
|
||||||
style="width: 70%"
|
style="width: 70%"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="validCode"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="login-code">
|
<div class="login-code">
|
||||||
<img :src="phoneCodeUrlNew" @click="getCode(3)" class="login-code-img" style="width: 100%" />
|
<img
|
||||||
|
:src="phoneCodeUrlNew"
|
||||||
|
@click="getCode(3)"
|
||||||
|
class="login-code-img"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitSendCodeNew()">确 定</el-button>
|
<el-button type="primary" @click="submitSendCodeNew()"
|
||||||
|
>确 定</el-button
|
||||||
|
>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -357,7 +468,11 @@ export default {
|
||||||
// this.$refs['phoneLoginFormRef'].clearValidate()
|
// this.$refs['phoneLoginFormRef'].clearValidate()
|
||||||
|
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
console.log(this.phoneLoginParams.phone, ' this.phoneLoginParams.phone ', this.phoneLoginParams.textCode)
|
console.log(
|
||||||
|
this.phoneLoginParams.phone,
|
||||||
|
' this.phoneLoginParams.phone ',
|
||||||
|
this.phoneLoginParams.textCode,
|
||||||
|
)
|
||||||
this.phoneLoginParams.phone = ''
|
this.phoneLoginParams.phone = ''
|
||||||
this.phoneLoginParams.textCode = ''
|
this.phoneLoginParams.textCode = ''
|
||||||
this.loginForm.username = ''
|
this.loginForm.username = ''
|
||||||
|
|
@ -380,9 +495,15 @@ export default {
|
||||||
// console.log(this.$route.query.redirect.split("?"))
|
// console.log(this.$route.query.redirect.split("?"))
|
||||||
// console.log(this.$route.query.redirect.split("?")[1].split("&"))
|
// console.log(this.$route.query.redirect.split("?")[1].split("&"))
|
||||||
if (this.$route.query.redirect.split('?').length > 1) {
|
if (this.$route.query.redirect.split('?').length > 1) {
|
||||||
let arr = this.$route.query.redirect.split('?')[1].split('&') || []
|
let arr =
|
||||||
|
this.$route.query.redirect.split('?')[1].split('&') ||
|
||||||
|
[]
|
||||||
arr.forEach((item, index) => {
|
arr.forEach((item, index) => {
|
||||||
this.$set(this.loginParams, item.split('=')[0] + '', item.split('=')[1])
|
this.$set(
|
||||||
|
this.loginParams,
|
||||||
|
item.split('=')[0] + '',
|
||||||
|
item.split('=')[1],
|
||||||
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -404,9 +525,10 @@ export default {
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
getCode(type) {
|
getCode(type) {
|
||||||
getCodeImg().then(res => {
|
getCodeImg().then((res) => {
|
||||||
/* 根据 type 判断当前获取的图形验证码如何赋值 1 账号登录 2 手机验证码登录 */
|
/* 根据 type 判断当前获取的图形验证码如何赋值 1 账号登录 2 手机验证码登录 */
|
||||||
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
|
this.captchaEnabled =
|
||||||
|
res.captchaEnabled === undefined ? true : res.captchaEnabled
|
||||||
if (this.captchaEnabled) {
|
if (this.captchaEnabled) {
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
this.codeUrl = 'data:image/gif;base64,' + res.img
|
this.codeUrl = 'data:image/gif;base64,' + res.img
|
||||||
|
|
@ -415,7 +537,8 @@ export default {
|
||||||
this.phoneCodeUrl = 'data:image/gif;base64,' + res.img
|
this.phoneCodeUrl = 'data:image/gif;base64,' + res.img
|
||||||
this.phoneLoginParams.uuid = res.uuid
|
this.phoneLoginParams.uuid = res.uuid
|
||||||
} else {
|
} else {
|
||||||
this.phoneCodeUrlNew = 'data:image/gif;base64,' + res.img
|
this.phoneCodeUrlNew =
|
||||||
|
'data:image/gif;base64,' + res.img
|
||||||
this.phoneLoginParamsNew.uuid = res.uuid
|
this.phoneLoginParamsNew.uuid = res.uuid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -427,7 +550,7 @@ export default {
|
||||||
},
|
},
|
||||||
//获取短信验证码
|
//获取短信验证码
|
||||||
getTextCode() {
|
getTextCode() {
|
||||||
this.$refs.phoneLoginFormRef.validateField(['phone'], valid => {
|
this.$refs.phoneLoginFormRef.validateField(['phone'], (valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
this.getCode(2)
|
this.getCode(2)
|
||||||
this.dialogCodeVisible = true
|
this.dialogCodeVisible = true
|
||||||
|
|
@ -441,7 +564,7 @@ export default {
|
||||||
// this.dialogCodeVisibleNew = true
|
// this.dialogCodeVisibleNew = true
|
||||||
this.phoneLoginParamsNew.username = this.loginForm.username
|
this.phoneLoginParamsNew.username = this.loginForm.username
|
||||||
sendCode(this.phoneLoginParamsNew)
|
sendCode(this.phoneLoginParamsNew)
|
||||||
.then(res => {
|
.then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$modal.msgSuccess('发送成功')
|
this.$modal.msgSuccess('发送成功')
|
||||||
const TIME_COUNT = 60
|
const TIME_COUNT = 60
|
||||||
|
|
@ -449,7 +572,10 @@ export default {
|
||||||
this.countNew = TIME_COUNT
|
this.countNew = TIME_COUNT
|
||||||
this.showNew = 2
|
this.showNew = 2
|
||||||
this.timerNew = setInterval(() => {
|
this.timerNew = setInterval(() => {
|
||||||
if (this.countNew > 0 && this.countNew <= TIME_COUNT) {
|
if (
|
||||||
|
this.countNew > 0 &&
|
||||||
|
this.countNew <= TIME_COUNT
|
||||||
|
) {
|
||||||
this.countNew--
|
this.countNew--
|
||||||
} else {
|
} else {
|
||||||
this.showNew = 3
|
this.showNew = 3
|
||||||
|
|
@ -461,7 +587,7 @@ export default {
|
||||||
this.dialogCodeVisibleNew = false
|
this.dialogCodeVisibleNew = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch((err) => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -500,7 +626,7 @@ export default {
|
||||||
|
|
||||||
/* 图形验证码弹框中确定按钮 */
|
/* 图形验证码弹框中确定按钮 */
|
||||||
submitSendCode() {
|
submitSendCode() {
|
||||||
this.$refs.phoneLoginCodeFormRef.validate(valid => {
|
this.$refs.phoneLoginCodeFormRef.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const sendParams = {
|
const sendParams = {
|
||||||
phone: this.phoneLoginParams.phone,
|
phone: this.phoneLoginParams.phone,
|
||||||
|
|
@ -508,7 +634,7 @@ export default {
|
||||||
uuid: this.phoneLoginParams.uuid,
|
uuid: this.phoneLoginParams.uuid,
|
||||||
}
|
}
|
||||||
sendCode(sendParams)
|
sendCode(sendParams)
|
||||||
.then(res => {
|
.then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$modal.msgSuccess('发送成功')
|
this.$modal.msgSuccess('发送成功')
|
||||||
const TIME_COUNT = 60
|
const TIME_COUNT = 60
|
||||||
|
|
@ -516,7 +642,10 @@ export default {
|
||||||
this.count = TIME_COUNT
|
this.count = TIME_COUNT
|
||||||
this.show = 2
|
this.show = 2
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
if (this.count > 0 && this.count <= TIME_COUNT) {
|
if (
|
||||||
|
this.count > 0 &&
|
||||||
|
this.count <= TIME_COUNT
|
||||||
|
) {
|
||||||
this.count--
|
this.count--
|
||||||
} else {
|
} else {
|
||||||
this.show = 3
|
this.show = 3
|
||||||
|
|
@ -552,25 +681,34 @@ export default {
|
||||||
const password = Cookies.get('password')
|
const password = Cookies.get('password')
|
||||||
const rememberMe = Cookies.get('rememberMe')
|
const rememberMe = Cookies.get('rememberMe')
|
||||||
this.loginForm = {
|
this.loginForm = {
|
||||||
username: username === undefined ? this.loginForm.username : username,
|
username:
|
||||||
password: password === undefined ? this.loginForm.password : decrypt(password),
|
username === undefined ? this.loginForm.username : username,
|
||||||
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
|
password:
|
||||||
|
password === undefined
|
||||||
|
? this.loginForm.password
|
||||||
|
: decrypt(password),
|
||||||
|
rememberMe:
|
||||||
|
rememberMe === undefined ? false : Boolean(rememberMe),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 账户密码登录-------------------------------------------------------------
|
// 账户密码登录-------------------------------------------------------------
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
console.log(this.loginForm, '参数-----')
|
console.log(this.loginForm, '参数-----')
|
||||||
this.$refs.loginForm.validate(valid => {
|
this.$refs.loginForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
if (this.loginForm.rememberMe) {
|
if (this.loginForm.rememberMe) {
|
||||||
Cookies.set('username', this.loginForm.username, {
|
Cookies.set('username', this.loginForm.username, {
|
||||||
expires: 30,
|
expires: 30,
|
||||||
})
|
})
|
||||||
Cookies.set('password', encrypt(this.loginForm.password), {
|
Cookies.set(
|
||||||
|
'password',
|
||||||
|
encrypt(this.loginForm.password),
|
||||||
|
{
|
||||||
expires: 30,
|
expires: 30,
|
||||||
})
|
},
|
||||||
|
)
|
||||||
Cookies.set('rememberMe', this.loginForm.rememberMe, {
|
Cookies.set('rememberMe', this.loginForm.rememberMe, {
|
||||||
expires: 30,
|
expires: 30,
|
||||||
})
|
})
|
||||||
|
|
@ -583,7 +721,9 @@ export default {
|
||||||
.dispatch('Login', this.loginForm)
|
.dispatch('Login', this.loginForm)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (localStorage.getItem('isCode') == 1) {
|
if (localStorage.getItem('isCode') == 1) {
|
||||||
this.$router.push({ path: '/resetPassword' }).catch(() => {})
|
this.$router
|
||||||
|
.push({ path: '/resetPassword' })
|
||||||
|
.catch(() => {})
|
||||||
} else {
|
} else {
|
||||||
this.$router.push({ path: '/' }).catch(() => {})
|
this.$router.push({ path: '/' }).catch(() => {})
|
||||||
}
|
}
|
||||||
|
|
@ -600,7 +740,7 @@ export default {
|
||||||
// 短信验证码登录-----------------------------------------------------------
|
// 短信验证码登录-----------------------------------------------------------
|
||||||
textLogin() {
|
textLogin() {
|
||||||
console.log(this.loginForm)
|
console.log(this.loginForm)
|
||||||
this.$refs.phoneLoginFormRef.validate(valid => {
|
this.$refs.phoneLoginFormRef.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
// if (this.loginForm.rememberMe) {
|
// if (this.loginForm.rememberMe) {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.unitId"
|
v-model="queryParams.unitId"
|
||||||
clearable
|
clearable
|
||||||
@change="GetProData"
|
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
|
|
@ -39,7 +38,6 @@
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.proId"
|
v-model="queryParams.proId"
|
||||||
clearable
|
clearable
|
||||||
@change="GetUnitData"
|
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -331,7 +331,7 @@ export default {
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download(
|
this.download(
|
||||||
'material/backRecord/export',
|
'material/storageStatus/export',
|
||||||
{
|
{
|
||||||
...this.queryParams,
|
...this.queryParams,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.unitId"
|
v-model="queryParams.unitId"
|
||||||
clearable
|
clearable
|
||||||
@change="GetProData"
|
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
|
|
@ -39,7 +38,6 @@
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.proId"
|
v-model="queryParams.proId"
|
||||||
clearable
|
clearable
|
||||||
@change="GetUnitData"
|
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@ module.exports = {
|
||||||
|
|
||||||
// target: `http://192.168.2.76:28080`, //超
|
// target: `http://192.168.2.76:28080`, //超
|
||||||
// target: `http://10.40.92.81:8080`, //韩/
|
// target: `http://10.40.92.81:8080`, //韩/
|
||||||
target: `http://192.168.2.76:28080`,//旭/
|
// target: `http://192.168.2.76:28080`,//旭/
|
||||||
//target: `http://192.168.2.248:28080`, //帅
|
target: `http://192.168.2.248:28080`, //帅
|
||||||
// target: `http://10.40.92.253:28080`, //福
|
// target: `http://10.40.92.253:28080`, //福
|
||||||
|
|
||||||
//******** 注意事项 ********* */
|
//******** 注意事项 ********* */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue