修正部分Bug
This commit is contained in:
parent
f41444f3f6
commit
aab2bc1074
@ -11,12 +11,12 @@ import axios from "axios";
|
||||
Vue.prototype.$axios = axios;
|
||||
Vue.config.productionTip = false;
|
||||
Vue.use(Element, {
|
||||
size: Cookies.get("size") || "small", // set element-ui default size
|
||||
size: Cookies.get("size") || "small", // set element-ui default size
|
||||
});
|
||||
Element.Dialog.props.closeOnClickModal.default = false; // 全局关闭,点击遮罩层关闭弹窗
|
||||
|
||||
new Vue({
|
||||
router,
|
||||
store,
|
||||
render: (h) => h(App),
|
||||
router,
|
||||
store,
|
||||
render: (h) => h(App),
|
||||
}).$mount("#app");
|
||||
|
||||
@ -1,327 +1,312 @@
|
||||
<template>
|
||||
<div class="login-container">
|
||||
<div class="login-form">
|
||||
<div class="login-container">
|
||||
<div class="login-form">
|
||||
<div class="title-container">
|
||||
<h3 class="title">供应商验证</h3>
|
||||
<div class="desc"> </div>
|
||||
</div>
|
||||
|
||||
<div class="title-container">
|
||||
<h3 class="title">
|
||||
供应商验证
|
||||
</h3>
|
||||
<div class="desc"> </div>
|
||||
</div>
|
||||
|
||||
<el-tabs v-model="activeName" stretch>
|
||||
<el-tab-pane label="供应商登录" name="first">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" autocomplete="on" label-position="left">
|
||||
<el-form-item prop="Username">
|
||||
<!-- <span class="svg-container">
|
||||
<el-tabs v-model="activeName" stretch>
|
||||
<el-tab-pane label="供应商登录" name="first">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" autocomplete="on" label-position="left">
|
||||
<el-form-item prop="Username">
|
||||
<!-- <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-form-item>
|
||||
<el-tooltip content="Caps lock is On" placement="right" manual>
|
||||
<el-form-item prop="Password">
|
||||
<!-- <span class="svg-container">
|
||||
<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-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>
|
||||
</div>
|
||||
</el-tabs>
|
||||
<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>
|
||||
</div>
|
||||
</el-tabs>
|
||||
|
||||
<!-- <div class="forgotregister">
|
||||
<!-- <div class="forgotregister">
|
||||
<router-link :to="{path: '/forgotpassword', query: { } }">
|
||||
<span style="float: left">{{ $t('login.forgotPassword') }}</span>
|
||||
</router-link>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="globalFooter">
|
||||
<div class="copyright">Copyright ©2022 珠海格致软件有限公司</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="globalFooter">
|
||||
<div class="copyright">Copyright ©2022 珠海格致软件有限公司</div>
|
||||
</div>
|
||||
</div>
|
||||
</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",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
activeName: "first",
|
||||
loginType: false,
|
||||
FBILLNO: "",
|
||||
LS: "",
|
||||
loginForm: {
|
||||
Username: "",
|
||||
Password: "",
|
||||
},
|
||||
loginRules: {
|
||||
Username: [{ required: true, message: "请输入用户名", trigger: "blur" }],
|
||||
},
|
||||
data: {
|
||||
FormId: "kafe2f22a0498441f9109c31cf5586da5",
|
||||
FieldKeys: "FBILLNO,FSupplierId.FName",
|
||||
FilterString: "",
|
||||
OrderString: "",
|
||||
TopRowCount: "0",
|
||||
StartRow: "0",
|
||||
Limit: 100,
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
created() {
|
||||
this.FBILLNO = this.$route.query.FBILLNO;
|
||||
this.LS = this.$route.query.LS;
|
||||
if (this.$route.query.FBILLNO !== undefined) {
|
||||
this.loginType = true;
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
destroyed() {},
|
||||
methods: {
|
||||
handleWarning(response) {
|
||||
this.$message({
|
||||
message: response.message || response,
|
||||
type: "warning",
|
||||
duration: 2000,
|
||||
});
|
||||
},
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
activeName: 'first',
|
||||
loginType: false,
|
||||
FBILLNO: '',
|
||||
LS: '',
|
||||
loginForm: {
|
||||
Username: "",
|
||||
Password: "",
|
||||
},
|
||||
loginRules: {
|
||||
Username: [{ required: true, message: "请输入用户名", trigger: "blur" }],
|
||||
},
|
||||
data: {
|
||||
FormId: "kafe2f22a0498441f9109c31cf5586da5",
|
||||
FieldKeys: "FBILLNO,FSupplierId.FName",
|
||||
FilterString: "",
|
||||
OrderString: "",
|
||||
TopRowCount: "0",
|
||||
StartRow: "0",
|
||||
Limit: 100
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
created() {
|
||||
this.FBILLNO = this.$route.query.FBILLNO
|
||||
this.LS = this.$route.query.LS
|
||||
if (this.$route.query.FBILLNO !== undefined) {
|
||||
this.loginType = true;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleWarning(response) {
|
||||
this.$message({
|
||||
message: response.message || response,
|
||||
type: 'warning',
|
||||
duration: 2000
|
||||
})
|
||||
},
|
||||
|
||||
handleSuccess(response) {
|
||||
this.$message({
|
||||
message: response.message || response,
|
||||
type: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
},
|
||||
loginSubmit() {
|
||||
if(!this.loginType) return
|
||||
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 = {}
|
||||
query.FBILLNO = this.FBILLNO;
|
||||
query.Username = this.loginForm.Username;
|
||||
loginls(query).then((response) => {
|
||||
if (response.status === 200) {
|
||||
this.$router.push({
|
||||
path: "/master?FBILLNO=" + this_.FBILLNO + "&username=" + this_.loginForm.Username + "&password=" + this_.loginForm.Password,
|
||||
});
|
||||
} else {
|
||||
this.handleWarning("登录失败,请联系管理员")
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
if (this.LS === '1') {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
let FilterString = "FBILLNO like'%" + this.FBILLNO + "'";
|
||||
this.data.FilterString = FilterString;
|
||||
let query = {}
|
||||
query.FBILLNO = this.FBILLNO;
|
||||
query.Username = this.loginForm.Username;
|
||||
query.Password = this.loginForm.Password;
|
||||
login(query).then((response) => {
|
||||
if (response.status === 200) {
|
||||
this.$router.push({
|
||||
path: "/master?FBILLNO=" + this_.FBILLNO + "&username=" + this_.loginForm.Username + "&password=" + this_.loginForm.Password,
|
||||
});
|
||||
} else {
|
||||
this.handleWarning("登录失败,请联系管理员")
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
handleSuccess(response) {
|
||||
this.$message({
|
||||
message: response.message || response,
|
||||
type: "success",
|
||||
duration: 2000,
|
||||
});
|
||||
},
|
||||
loginSubmit() {
|
||||
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 = {};
|
||||
query.FBILLNO = this.FBILLNO;
|
||||
query.Username = this.loginForm.Username;
|
||||
loginls(query).then((response) => {
|
||||
if (response.status === 200) {
|
||||
this.$router.push({
|
||||
path: "/master?FBILLNO=" + this_.FBILLNO + "&username=" + this_.loginForm.Username + "&password=" + this_.loginForm.Password,
|
||||
});
|
||||
} else {
|
||||
this.handleWarning("登录失败,请联系管理员");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
if (this.LS === "1") {
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
if (valid) {
|
||||
let FilterString = "FBILLNO like'%" + this.FBILLNO + "'";
|
||||
this.data.FilterString = FilterString;
|
||||
let query = {};
|
||||
query.FBILLNO = this.FBILLNO;
|
||||
query.Username = this.loginForm.Username;
|
||||
query.Password = this.loginForm.Password;
|
||||
login(query).then((response) => {
|
||||
if (response.status === 200) {
|
||||
this.$router.push({
|
||||
path: "/master?FBILLNO=" + this_.FBILLNO + "&username=" + this_.loginForm.Username + "&password=" + this_.loginForm.Password,
|
||||
});
|
||||
} else {
|
||||
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)) {
|
||||
.login-container .el-input input {
|
||||
color: $cursor;
|
||||
}
|
||||
}
|
||||
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
|
||||
.login-container .el-input input {
|
||||
color: $cursor;
|
||||
}
|
||||
}
|
||||
|
||||
/* reset element-ui css */
|
||||
.login-container {
|
||||
.el-input {
|
||||
display: inline-block;
|
||||
height: 47px;
|
||||
// width: 85%;
|
||||
/* reset element-ui css */
|
||||
.login-container {
|
||||
.el-input {
|
||||
display: inline-block;
|
||||
height: 47px;
|
||||
// width: 85%;
|
||||
|
||||
input {
|
||||
background: transparent;
|
||||
border: 0px;
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0px;
|
||||
padding: 12px 5px 12px 15px;
|
||||
color: $light_gray;
|
||||
height: 47px;
|
||||
caret-color: $cursor;
|
||||
input {
|
||||
background: transparent;
|
||||
border: 0px;
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0px;
|
||||
padding: 12px 5px 12px 15px;
|
||||
color: $light_gray;
|
||||
height: 47px;
|
||||
caret-color: $cursor;
|
||||
|
||||
&:-webkit-autofill {
|
||||
box-shadow: 0 0 0px 1000px $bg inset !important;
|
||||
-webkit-text-fill-color: $cursor !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:-webkit-autofill {
|
||||
box-shadow: 0 0 0px 1000px $bg inset !important;
|
||||
-webkit-text-fill-color: $cursor !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 5px;
|
||||
color: #454545;
|
||||
}
|
||||
}
|
||||
.el-form-item {
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
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 {
|
||||
color: white;
|
||||
}
|
||||
::v-deep .el-tabs__item {
|
||||
color: white;
|
||||
}
|
||||
|
||||
::v-deep .el-tabs__item.is-active {
|
||||
color: #1890ff;
|
||||
}
|
||||
::v-deep .el-tabs__item.is-active {
|
||||
color: #1890ff;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
min-height: 100%;
|
||||
width: 100%;
|
||||
background-color: $bg;
|
||||
overflow: hidden;
|
||||
.login-container {
|
||||
min-height: 100%;
|
||||
width: 100%;
|
||||
background-color: $bg;
|
||||
overflow: hidden;
|
||||
|
||||
.login-form {
|
||||
position: relative;
|
||||
width: 520px;
|
||||
max-width: 100%;
|
||||
padding: 160px 35px 0;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
.login-form {
|
||||
position: relative;
|
||||
width: 520px;
|
||||
max-width: 100%;
|
||||
padding: 160px 35px 0;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
margin-bottom: 10px;
|
||||
.tips {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
margin-bottom: 10px;
|
||||
|
||||
span {
|
||||
&:first-of-type {
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
span {
|
||||
&:first-of-type {
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.svg-container {
|
||||
padding: 6px 5px 6px 15px;
|
||||
color: $dark_gray;
|
||||
vertical-align: middle;
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
}
|
||||
.svg-container {
|
||||
padding: 6px 5px 6px 15px;
|
||||
color: $dark_gray;
|
||||
vertical-align: middle;
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.title-container {
|
||||
position: relative;
|
||||
.title-container {
|
||||
position: relative;
|
||||
|
||||
.title {
|
||||
font-size: 26px;
|
||||
color: $light_gray;
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
.title {
|
||||
font-size: 26px;
|
||||
color: $light_gray;
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.desc {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 20px;
|
||||
color: white;
|
||||
font-size: 14px;
|
||||
}
|
||||
.desc {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 20px;
|
||||
color: white;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.set-language {
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
font-size: 18px;
|
||||
right: 0px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.set-language {
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
font-size: 18px;
|
||||
right: 0px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.show-pwd {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 7px;
|
||||
font-size: 16px;
|
||||
color: $dark_gray;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
.show-pwd {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 7px;
|
||||
font-size: 16px;
|
||||
color: $dark_gray;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
.globalFooter {
|
||||
margin: 48px 0 24px 0;
|
||||
padding: 0 16px;
|
||||
text-align: center;
|
||||
.globalFooter {
|
||||
margin: 48px 0 24px 0;
|
||||
padding: 0 16px;
|
||||
text-align: center;
|
||||
|
||||
.links {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.links {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.copyright {
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.forgotregister {
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
color: white;
|
||||
.forgotregister {
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
color: white;
|
||||
|
||||
.register {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.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',可以删除这一行
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user