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