修正部分Bug
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
<template>
|
||||
<div class="login-container">
|
||||
<div class="login-form">
|
||||
|
||||
<div class="title-container">
|
||||
<h3 class="title">
|
||||
供应商验证
|
||||
</h3>
|
||||
<h3 class="title">供应商验证</h3>
|
||||
<div class="desc"> </div>
|
||||
</div>
|
||||
|
||||
@@ -16,24 +13,20 @@
|
||||
<!-- <span class="svg-container">
|
||||
<i class="el-icon-edit"></i>
|
||||
</span> -->
|
||||
<el-input ref="Username" v-model="loginForm.Username" placeholder="供应商名称" name="Username" type="text"
|
||||
tabindex="2" autocomplete="on" style="width: 85%" />
|
||||
<el-input ref="Username" v-model="loginForm.Username" placeholder="供应商名称" name="Username" type="text" tabindex="2" autocomplete="on" style="width: 85%" />
|
||||
</el-form-item>
|
||||
<el-tooltip content="Caps lock is On" placement="right" manual>
|
||||
<el-form-item prop="Password">
|
||||
<!-- <span class="svg-container">
|
||||
<i class="el-icon-edit"></i>ss
|
||||
</span> -->
|
||||
<el-input key="passwordType" ref="Password" v-model="loginForm.Password" placeholder="供应商编码"
|
||||
name="Password" tabindex="3" autocomplete="on" style="width: 85%" />
|
||||
<el-input key="passwordType" ref="Password" v-model="loginForm.Password" placeholder="供应商编码" name="Password" tabindex="3" autocomplete="on" style="width: 85%" />
|
||||
</el-form-item>
|
||||
</el-tooltip>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<div>
|
||||
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:50px;" @click="loginSubmit()">
|
||||
登录
|
||||
</el-button>
|
||||
<el-button :loading="loading" type="primary" style="width: 100%; margin-bottom: 50px" @click="loginSubmit()"> 登录 </el-button>
|
||||
</div>
|
||||
</el-tabs>
|
||||
|
||||
@@ -50,22 +43,21 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { login } from "@/api/login";
|
||||
import { loginls } from "@/api/login";
|
||||
import * as auth from "@/utils/auth.js";
|
||||
import { getToken } from "@/utils/auth.js";
|
||||
import axios from "axios";
|
||||
|
||||
import { login } from "@/api/login";
|
||||
import { loginls } from "@/api/login";
|
||||
import * as auth from "@/utils/auth.js"
|
||||
import { getToken } from "@/utils/auth.js";
|
||||
import axios from "axios";
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
export default {
|
||||
name: "Login",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
activeName: 'first',
|
||||
activeName: "first",
|
||||
loginType: false,
|
||||
FBILLNO: '',
|
||||
LS: '',
|
||||
FBILLNO: "",
|
||||
LS: "",
|
||||
loginForm: {
|
||||
Username: "",
|
||||
Password: "",
|
||||
@@ -80,52 +72,48 @@ export default {
|
||||
OrderString: "",
|
||||
TopRowCount: "0",
|
||||
StartRow: "0",
|
||||
Limit: 100
|
||||
}
|
||||
}
|
||||
Limit: 100,
|
||||
},
|
||||
watch: {
|
||||
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
created() {
|
||||
this.FBILLNO = this.$route.query.FBILLNO
|
||||
this.LS = this.$route.query.LS
|
||||
this.FBILLNO = this.$route.query.FBILLNO;
|
||||
this.LS = this.$route.query.LS;
|
||||
if (this.$route.query.FBILLNO !== undefined) {
|
||||
this.loginType = true;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
},
|
||||
mounted() {},
|
||||
destroyed() {},
|
||||
methods: {
|
||||
handleWarning(response) {
|
||||
this.$message({
|
||||
message: response.message || response,
|
||||
type: 'warning',
|
||||
duration: 2000
|
||||
})
|
||||
type: "warning",
|
||||
duration: 2000,
|
||||
});
|
||||
},
|
||||
|
||||
handleSuccess(response) {
|
||||
this.$message({
|
||||
message: response.message || response,
|
||||
type: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
type: "success",
|
||||
duration: 2000,
|
||||
});
|
||||
},
|
||||
loginSubmit() {
|
||||
if(!this.loginType) return
|
||||
let this_ = this
|
||||
if (this.LS === '0') {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (!this.loginType) return;
|
||||
console.log(this.loginType);
|
||||
console.log(this.LS);
|
||||
|
||||
let this_ = this;
|
||||
if (this.LS === "0") {
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
if (valid) {
|
||||
let FilterString = "FBILLNO like'%" + this.FBILLNO + "'";
|
||||
this.data.FilterString = FilterString;
|
||||
let query = {}
|
||||
let query = {};
|
||||
query.FBILLNO = this.FBILLNO;
|
||||
query.Username = this.loginForm.Username;
|
||||
loginls(query).then((response) => {
|
||||
@@ -134,19 +122,18 @@ export default {
|
||||
path: "/master?FBILLNO=" + this_.FBILLNO + "&username=" + this_.loginForm.Username + "&password=" + this_.loginForm.Password,
|
||||
});
|
||||
} else {
|
||||
this.handleWarning("登录失败,请联系管理员")
|
||||
this.handleWarning("登录失败,请联系管理员");
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
if (this.LS === '1') {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (this.LS === "1") {
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
if (valid) {
|
||||
let FilterString = "FBILLNO like'%" + this.FBILLNO + "'";
|
||||
this.data.FilterString = FilterString;
|
||||
let query = {}
|
||||
let query = {};
|
||||
query.FBILLNO = this.FBILLNO;
|
||||
query.Username = this.loginForm.Username;
|
||||
query.Password = this.loginForm.Password;
|
||||
@@ -156,32 +143,30 @@ export default {
|
||||
path: "/master?FBILLNO=" + this_.FBILLNO + "&username=" + this_.loginForm.Username + "&password=" + this_.loginForm.Password,
|
||||
});
|
||||
} else {
|
||||
this.handleWarning("登录失败,请联系管理员")
|
||||
this.handleWarning("登录失败,请联系管理员");
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
$bg: #283443;
|
||||
$light_gray: #fff;
|
||||
$cursor: #fff;
|
||||
$bg: #283443;
|
||||
$light_gray: #fff;
|
||||
$cursor: #fff;
|
||||
|
||||
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
|
||||
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
|
||||
.login-container .el-input input {
|
||||
color: $cursor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* reset element-ui css */
|
||||
.login-container {
|
||||
/* reset element-ui css */
|
||||
.login-container {
|
||||
.el-input {
|
||||
display: inline-block;
|
||||
height: 47px;
|
||||
@@ -210,23 +195,23 @@ $cursor: #fff;
|
||||
border-radius: 5px;
|
||||
color: #454545;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$bg: #2d3a4b;
|
||||
$dark_gray: #889aa4;
|
||||
$light_gray: #eee;
|
||||
$bg: #2d3a4b;
|
||||
$dark_gray: #889aa4;
|
||||
$light_gray: #eee;
|
||||
|
||||
::v-deep .el-tabs__item {
|
||||
::v-deep .el-tabs__item {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-tabs__item.is-active {
|
||||
::v-deep .el-tabs__item.is-active {
|
||||
color: #1890ff;
|
||||
}
|
||||
}
|
||||
|
||||
.login-container {
|
||||
.login-container {
|
||||
min-height: 100%;
|
||||
width: 100%;
|
||||
background-color: $bg;
|
||||
@@ -298,9 +283,9 @@ $light_gray: #eee;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.globalFooter {
|
||||
.globalFooter {
|
||||
margin: 48px 0 24px 0;
|
||||
padding: 0 16px;
|
||||
text-align: center;
|
||||
@@ -313,9 +298,9 @@ $light_gray: #eee;
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.forgotregister {
|
||||
.forgotregister {
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
color: white;
|
||||
@@ -323,5 +308,5 @@ $light_gray: #eee;
|
||||
.register {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,13 +2,13 @@ const { defineConfig } = require("@vue/cli-service");
|
||||
module.exports = defineConfig({
|
||||
transpileDependencies: true,
|
||||
});
|
||||
const port=1573;
|
||||
const port = 1573;
|
||||
module.exports = {
|
||||
devServer: {
|
||||
port:port,
|
||||
port: port,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:10002', // 后端接口的地址
|
||||
target: 'http://127.0.0.1:10002', // 后端接口的地址
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/api': '', // 如果您的后端API路径不包含'/api',可以删除这一行
|
||||
|
||||
Reference in New Issue
Block a user