Merge pull request !8 from 打豆豆/master
This commit is contained in:
打豆豆 2023-11-17 10:26:23 +00:00 committed by Gitee
commit 654abd6908
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
18 changed files with 903 additions and 186 deletions

View File

@ -1,5 +1,5 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 智能工厂MES系统 VUE_APP_TITLE = 机加大师
# 开发环境配置 # 开发环境配置
ENV = 'development' ENV = 'development'

View File

@ -1,5 +1,5 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 智能工厂MES系统 VUE_APP_TITLE = 机加大师
# 生产环境配置 # 生产环境配置
ENV = 'production' ENV = 'production'

View File

@ -1,5 +1,5 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 智能工厂MES系统 VUE_APP_TITLE = 机加大师
NODE_ENV = production NODE_ENV = production

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title> <title><%= webpackConfig.name %></title>
<title>智能工厂MES系统</title> <title>机加大师</title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]--> <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<style> <style>
html, html,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -0,0 +1,316 @@
<template>
<!--导航栏页-->
<div class="footer">
<div class="footer_right">
<a class="it" href="https://beian.miit.gov.cn" target="_blank"
>苏ICP备2021009988号-6
</a>
</div>
<!-- -->
</div>
</template>
<script>
export default {
name: "Nav",
data() {
return {
// isCollapse:true
};
},
methods: {},
};
</script>
<style scoped lang="scss">
.footer {
background: rgba(0, 0, 0, 0.6);
position: fixed;
height: 5%;
bottom: 0;
width: 100%;
margin-bottom: 0px;
justify-content: space-between;
.foot_content {
padding-left: 11.5%;
padding-right: 11.5%;
height: 360px;
color: #fff;
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
width: 77%;
// div {
// height: 200px;
// width: 30%;
// }
.about_us {
height: 200px;
width: 30%;
.title {
height: 0.8rem;
font-size: 0.327rem;
}
.border {
height: 2px;
display: flex;
justify-content: flex-start;
.red {
border-bottom: 2px solid #00a0dc;
width: 64px;
height: 100%;
}
.gray {
border-bottom: 1px solid #707070;
// width: 308px;
flex: 1;
height: 100%;
}
}
.info {
margin-top: 0.39rem;
opacity: 0.7;
font-size: 0.218rem;
line-height: 0.51rem;
padding-left: 0.2rem;
padding-right: 0.2rem;
}
}
.customer_service {
height: 200px;
width: 30%;
.title {
height: 0.8rem;
font-size: 0.327rem;
}
.border {
height: 2px;
display: flex;
justify-content: flex-start;
.red {
border-bottom: 2px solid #00a0dc;
width: 64px;
height: 100%;
}
.gray {
border-bottom: 1px solid #707070;
flex: 1;
height: 100%;
}
}
.list {
padding-left: 0.2rem;
padding-right: 0.2rem;
opacity: 0.7;
font-size: 0.188rem;
height: 80px;
line-height: 0.5rem;
border-bottom: 1px solid #707070;
display: flex;
align-items: center;
justify-content: space-between;
div {
height: auto;
width: auto;
}
div:hover {
cursor: pointer; //
}
}
}
.follow_us {
height: 200px;
width: 30%;
.title {
height: 0.8rem;
font-size: 0.327rem;
}
.border {
height: 2px;
display: flex;
justify-content: flex-start;
.red {
border-bottom: 2px solid #00a0dc;
width: 64px;
height: 100%;
}
.gray {
border-bottom: 1px solid #707070;
flex: 1;
height: 100%;
}
}
.secCode {
width: 100%;
margin: 20px;
display: flex;
div {
text-align: center;
padding: 5px;
width: 40%;
p {
padding: 3px;
opacity: 0.7;
font-size: 0.188rem;
}
}
}
}
.contact_us {
height: 200px;
width: 30%;
.title {
height: 0.8rem;
font-size: 0.327rem;
}
.border {
height: 2px;
display: flex;
justify-content: flex-start;
.red {
border-bottom: 2px solid #00a0dc;
width: 64px;
height: 100%;
}
.gray {
border-bottom: 1px solid #707070;
flex: 1;
height: 100%;
}
}
.address {
opacity: 0.7;
font-size: 0.188rem;
line-height: 0.36rem;
height: 50px;
padding-left: 0.2rem;
padding-right: 0.2rem;
}
.tel {
margin-top: 0.22rem;
opacity: 0.7;
font-size: 0.188rem;
line-height: 0.36rem;
height: 35px;
padding-left: 0.2rem;
padding-right: 0.2rem;
}
.qq {
opacity: 0.7;
font-size: 0.188rem;
line-height: 0.36rem;
height: 35px;
padding-left: 0.2rem;
padding-right: 0.2rem;
}
.email {
opacity: 0.7;
font-size: 0.188rem;
line-height: 0.36rem;
height: 35px;
padding-left: 0.2rem;
padding-right: 0.2rem;
}
}
}
.footer_right {
position: relative;
left: 0;
bottom: 0;
width: 100%;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
color: #000;
// opacity: 0.7;
font-size: 14px;
a {
text-decoration: none;
color: #fff;
cursor: pointer;
display: inline-block;
}
.it {
}
.aggrement {
display: inline-block;
}
}
}
@media (max-width: 768px) {
.footer {
flex-direction: column;
padding-top: 50px !important;
height: auto !important;
.foot_content {
flex-direction: column !important;
height: auto !important;
.contact_us,
.customer_service,
.follow_us {
font-size: 14px !important;
width: 100% !important;
.address {
line-height: 20px !important;
}
}
.contact_us {
.title {
margin-bottom: 10px !important;
font-size: 16px !important;
}
.tel {
margin-top: 20px !important;
}
.tel,
.qq,
.email,
.address {
font-size: 14px !important;
}
}
.customer_service {
.title {
margin-top: 15px !important;
margin-bottom: 10px !important;
font-size: 16px !important;
}
.list {
div {
font-size: 14px !important;
}
}
}
.follow_us {
margin-top: 20px !important;
.title {
margin-bottom: 10px !important;
font-size: 16px !important;
}
.secCode p {
font-size: 14px !important;
}
}
}
.footer_right {
position: relative;
flex-direction: column;
padding-bottom: 20px !important;
}
.it {
text-align: center !important;
font-size: 14px !important;
}
.aggrement {
font-size: 14px !important;
}
.privacyPolicy {
font-size: 14px !important;
}
}
}
</style>

View File

@ -1,22 +1,17 @@
<template> <template>
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"> <div class="sidebar-logo-container" :class="{'collapse':collapse}">
<transition name="sidebarLogoFade"> <transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/"> <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" /> <img src="../../../assets/images/logo-b.png" class="sidebar-logo-small">
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
</router-link> </router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/"> <router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" /> <img src="../../../assets/images/logo-small.png" class="sidebar-logo">
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
</router-link> </router-link>
</transition> </transition>
</div> </div>
</template> </template>
<script> <script>
import logoImg from '@/assets/logo/favicon.png'
import variables from '@/assets/styles/variables.scss'
export default { export default {
name: 'SidebarLogo', name: 'SidebarLogo',
props: { props: {
@ -25,18 +20,10 @@ export default {
required: true required: true
} }
}, },
computed: {
variables() {
return variables;
},
sideTheme() {
return this.$store.state.settings.sideTheme
}
},
data() { data() {
return { return {
title: '智能工厂MES系统', title: 'Vue Element Admin',
logo: logoImg logo: 'https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png'
} }
} }
} }
@ -54,10 +41,11 @@ export default {
.sidebar-logo-container { .sidebar-logo-container {
position: relative; position: relative;
width: 100%; width: 85%;
height: 50px; margin-left: 5px;
line-height: 50px; height: 62px;
background: #2b2f3a; line-height: 62px;
background: #FFFFFF;
text-align: center; text-align: center;
overflow: hidden; overflow: hidden;
@ -66,12 +54,19 @@ export default {
width: 100%; width: 100%;
& .sidebar-logo { & .sidebar-logo {
width: 32px; width: 100%;
height: 32px; height: 100%;
vertical-align: middle; vertical-align: middle;
margin-right: 12px; margin-right: 12px;
} }
& .sidebar-logo-small{
width: 100%;
height: 70%;
vertical-align: middle;
margin-right: 0px;
}
& .sidebar-title { & .sidebar-title {
display: inline-block; display: inline-block;
margin: 0; margin: 0;

View File

@ -1,119 +1,264 @@
<template> <template>
<div class="login"> <div class="login-container ng-scope">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <div class="login-wrap">
<h3 class="title">智能工厂MES系统</h3> <div class="bg-opacity">
<el-form-item prop="username"> <div class="logo" />
<el-input <div class="title" />
v-model="loginForm.username" </div>
type="text" <el-card class="card-container">
auto-complete="off" <el-tabs type="card" :tab-position="tabPosition" style="height: 350px">
placeholder="账号" <el-tab-pane>
> <span slot="label" style="width: 248px"
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" /> ><i class="el-icon-user" /> 账号登录</span
</el-input> >
</el-form-item> <el-form
<el-form-item prop="password"> ref="loginForm"
<el-input :model="loginForm"
v-model="loginForm.password" :rules="loginRules"
type="password" class="login-form"
auto-complete="off" autocomplete="on"
placeholder="密码" label-position="left"
@keyup.enter.native="handleLogin" >
> <div class="title-container">
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" /> <h1 class="title">登录</h1>
</el-input> </div>
</el-form-item> <el-form-item prop="username">
<el-form-item prop="code" v-if="captchaOnOff"> <span class="svg-container">
<el-input <svg-icon icon-class="user" />
v-model="loginForm.code" </span>
auto-complete="off" <el-input
placeholder="验证码" ref="username"
style="width: 63%" v-model="loginForm.username"
@keyup.enter.native="handleLogin" placeholder="请输入账号"
> name="username"
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" /> type="text"
</el-input> tabindex="1"
<div class="login-code"> auto-complete="on"
<img :src="codeUrl" @click="getCode" class="login-code-img"/> />
</div> </el-form-item>
</el-form-item> <el-tooltip
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> v-model="capsTooltip"
<el-form-item style="width:100%;"> content="密码明文查看"
<el-button placement="right"
:loading="loading" manual
size="medium" >
type="primary" <el-form-item prop="password">
style="width:100%;" <span class="svg-container">
@click.native.prevent="handleLogin" <svg-icon icon-class="password" />
> </span>
<span v-if="!loading"> </span> <el-input
<span v-else> 中...</span> :key="passwordType"
</el-button> ref="password"
<div style="float: right;" v-if="register"> v-model="loginForm.password"
<router-link class="link-type" :to="'/register'">立即注册</router-link> :type="passwordType"
</div> placeholder="请填写密码"
</el-form-item> name="password"
</el-form> tabindex="2"
<!-- 底部 --> autocomplete="on"
<div class="el-login-footer"> @keyup.native="checkCapslock"
<span @click="toIPC">苏ICP备2021009988号-6</span> @blur="capsTooltip = false"
/>
<span class="show-pwd" @click="showPwd">
<svg-icon
:icon-class="
passwordType === 'password' ? 'eye' : 'eye-open'
"
/>
</span>
</el-form-item>
</el-tooltip>
<el-checkbox
v-model="loginForm.rememberMe"
style="margin: 0px 76px 0px -155px"
>记住密码</el-checkbox
>
<el-button type="primary" @click.native.prevent="handleLogin"
> </el-button
>
<!-- <span style="font-size:13px;cursor:pointer;color:#9b9ea0;text-decoration:none;position: absolute;right:20px;padding-top:20px;" @click="forgetPwd">忘记密码</span> -->
<!-- <el-row>
<el-col :span="24" style="text-align:right;margin-top:-20px"><span style="font-size:13px;cursor:pointer;color:#9b9ea0;text-decoration:none" @click="forgetPwd">忘记密码</span></el-col>
</el-row> -->
</el-form>
</el-tab-pane>
<el-tab-pane>
<span slot="label" style="width: 249px"
><i class="el-icon-phone" /> 手机号登录</span
>
<el-form
ref="loginForm"
:model="loginForm"
:rules="loginPhoneRules"
class="login-form"
autocomplete="on"
label-position="left"
>
<div class="title-container">
<h1 class="title">登录</h1>
</div>
<el-form-item prop="username">
<span class="svg-container">
<img
src="@/assets/images/shoujitianchong.png"
class="svgImg"
/>
</span>
<el-input
ref="phone"
v-model="loginForm.username"
placeholder="请输入手机号码"
name="phone"
type="text"
tabindex="1"
auto-complete="on"
/>
</el-form-item>
<el-tooltip
v-model="capsTooltip"
content="密码明文查看"
placement="right"
manual
>
<el-form-item prop="password">
<span class="svg-container">
<svg-icon icon-class="password" />
</span>
<el-input
:key="passwordType"
ref="password"
v-model="loginForm.password"
:type="passwordType"
placeholder="请填写密码"
name="password"
tabindex="2"
autocomplete="on"
@keyup.native="checkCapslock"
@blur="capsTooltip = false"
/>
<span class="show-pwd" @click="showPwd">
<svg-icon
:icon-class="
passwordType === 'password' ? 'eye' : 'eye-open'
"
/>
</span>
</el-form-item>
</el-tooltip>
<el-checkbox
v-model="loginForm.rememberMe"
style="margin: 0px 76px 0px -155px"
>记住密码</el-checkbox
>
<el-button type="primary" @click.native.prevent="handleLogin"
> </el-button
>
<!-- <span style="font-size:13px;cursor:pointer;color:#9b9ea0;text-decoration:none;position: absolute;right:20px;padding-top:20px;" @click="forgetPwd">忘记密码</span> -->
<!-- <el-row>
<el-col :span="24" style="text-align:right;margin-top:-20px">
<span style="font-size:13px;cursor:pointer;color:#9b9ea0;text-decoration:none" @click="forgetPwd">忘记密码</span></el-col>
</el-row> -->
</el-form>
</el-tab-pane>
</el-tabs>
</el-card>
</div> </div>
<el-dialog
title="忘记密码"
:visible.sync="dialogVisible"
width="30%"
append-to-body
center
>
<p>机构员工遗失密码请联系本机构管理员进行密码重置</p>
<p>
机构管理员遗失密码请联系平台客服QQ2546125360并提供相关身份证明材料
</p>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"
> </el-button
>
</span>
</el-dialog>
<Footer />
</div> </div>
</template> </template>
<script> <script>
import Footer from "@/components/Footer";
import { getCodeImg } from "@/api/login"; import { getCodeImg } from "@/api/login";
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import { encrypt, decrypt } from '@/utils/jsencrypt' import { encrypt, decrypt } from "@/utils/jsencrypt";
export default { export default {
components: { Footer },
name: "Login", name: "Login",
data() { data() {
return { return {
codeUrl: "",
loginForm: { loginForm: {
username: "admin", username: "",
password: "admin123", password: "",
rememberMe: false, rememberMe: false,
code: "", code: "",
uuid: "" uuid: "",
}, },
loginPhoneForm: {
phone: "",
password: "",
},
tabPosition: "",
loginRules: { loginRules: {
username: [ username: [
{ required: true, trigger: "blur", message: "请输入您的账号" } { required: true, trigger: "blur", message: "请输入用户名称" },
], ],
password: [ password: [{ required: true, trigger: "blur", message: "请录入密码" }],
{ required: true, trigger: "blur", message: "请输入您的密码" }
],
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
}, },
loginPhoneRules: {
phone: [{ required: true, trigger: "blur", message: "请输入手机号码" }],
password: [{ required: true, trigger: "blur", message: "请录入密码" }],
},
passwordType: "password",
capsTooltip: false,
loading: false, loading: false,
// redirect: undefined,
captchaOnOff: false, otherQuery: {},
// dialogVisible: false,
register: false,
redirect: undefined
}; };
}, },
watch: { watch: {
$route: { $route: {
handler: function(route) { handler: function (route) {
this.redirect = route.query && route.query.redirect; this.redirect = route.query && route.query.redirect;
}, },
immediate: true immediate: true,
} },
}, },
created() { created() {
this.getCode(); this.getCode();
this.getCookie(); this.getCookie();
}, },
mounted() {
if (this.loginForm.username === "") {
this.$refs.username.focus();
} else if (this.loginForm.password === "") {
this.$refs.password.focus();
}
window.addEventListener("keydown", this.keyDown); //
},
destroyed() {
window.removeEventListener("keydown", this.keyDown, false); //
},
methods: { methods: {
toIPC(){ toIPC() {
window.open("https://beian.miit.gov.cn/","_blank"); window.open("https://beian.miit.gov.cn/", "_blank");
}, },
getCode() { getCode() {
getCodeImg().then(res => { getCodeImg().then((res) => {
this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff; this.captchaOnOff =
res.captchaOnOff === undefined ? true : res.captchaOnOff;
if (this.captchaOnOff) { if (this.captchaOnOff) {
this.codeUrl = "data:image/gif;base64," + res.img; this.codeUrl = "data:image/gif;base64," + res.img;
this.loginForm.uuid = res.uuid; this.loginForm.uuid = res.uuid;
@ -123,100 +268,344 @@ export default {
getCookie() { getCookie() {
const username = Cookies.get("username"); const username = Cookies.get("username");
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: username === undefined ? this.loginForm.username : username,
password: password === undefined ? this.loginForm.password : decrypt(password), password:
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe) password === undefined ? this.loginForm.password : decrypt(password),
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
}; };
}, },
checkCapslock(e) {
const { key } = e;
this.capsTooltip = key && key.length === 1 && key >= "A" && key <= "Z";
},
showPwd() {
if (this.passwordType === "password") {
this.passwordType = "";
} else {
this.passwordType = "password";
}
this.$nextTick(() => {
this.$refs.password.focus();
});
},
handleLogin() { handleLogin() {
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, { expires: 30 }); Cookies.set("username", this.loginForm.username, { expires: 30 });
Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 }); Cookies.set("password", encrypt(this.loginForm.password), {
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 }); expires: 30,
});
Cookies.set("rememberMe", this.loginForm.rememberMe, {
expires: 30,
});
} else { } else {
Cookies.remove("username"); Cookies.remove("username");
Cookies.remove("password"); Cookies.remove("password");
Cookies.remove('rememberMe'); Cookies.remove("rememberMe");
} }
this.$store.dispatch("Login", this.loginForm).then(() => { this.$store
this.$router.push({ path: this.redirect || "/" }).catch(()=>{}); .dispatch("Login", this.loginForm)
}).catch(() => { .then(() => {
this.loading = false; this.$router.push({ path: this.redirect || "/" }).catch(() => {});
if (this.captchaOnOff) { })
this.getCode(); .catch(() => {
} this.loading = false;
}); if (this.captchaOnOff) {
this.getCode();
}
});
} }
}); });
} },
} phoneLogin() {
// this.$refs.loginPhoneForm.validate((valid) => {
// if (valid) {
// this.loading = true;
// this.$store
// .dispatch("user/phoneLogin", this.loginPhoneForm)
// .then(() => {
// debugger;
// this.$router.push({ path: "/", query: this.otherQuery });
// this.loading = false;
// })
// .catch(() => {
// this.loading = false;
// });
// } else {
// console.log("error submit!!");
// return false;
// }
// });
},
},
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss"> <style lang="scss">
.login { $bg: #fff;
display: flex; $light_gray: #000;
justify-content: center; $cursor: #858585;
align-items: center;
height: 100%; @supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
background-image: url("../assets/images/login-background.jpg"); .login-container .el-input input {
background-size: cover; color: $cursor;
} line-height: 44px;
.title { }
margin: 0px auto 30px auto;
text-align: center;
color: #707070;
} }
.login-form { /* reset element-ui css */
border-radius: 6px; .login-container {
background: #ffffff;
width: 400px;
padding: 25px 25px 5px 25px;
.el-input { .el-input {
height: 38px; display: inline-block;
height: 44px;
width: 85%;
input { input {
height: 38px; background: transparent;
border: 0px;
-webkit-appearance: none;
border-radius: 0px;
padding: 6px 5px 12px 15px;
border-bottom: 1px solid #e0e0e0;
color: $light_gray;
height: 44px;
caret-color: $cursor;
&:-webkit-autofill {
box-shadow: 0 0 0px 1000px $bg inset !important;
-webkit-text-fill-color: $cursor !important;
}
} }
} }
.input-icon {
height: 39px; .el-form-item {
width: 14px; border: 1px solid rgba(255, 255, 255, 0.1);
margin-left: 2px; // background: rgba(0, 0, 0, 0.1);
border-radius: 5px;
color: #454545;
}
}
</style>
<style lang="scss" scoped>
$bg: #2d3a4b;
$dark_gray: rgb(29, 27, 27);
$light_gray: #eee;
.login-container {
height: 65%;
width: 100%;
position: absolute;
top: 0;
left: 0;
background: url("../../src/assets/images/login_bg.jpg") no-repeat center;
background-size: 100%;
content: "";
z-index: 0;
.bg-opacity {
padding-bottom: 10px;
background-color: rgba(0, 0, 0, 0.3);
}
.logo {
position: relative;
width: 25%;
height: 140px;
margin: 0 auto 20px;
background: url("../../src/assets/images/logo_white.png") no-repeat center;
background-size: 100% 100%;
}
.logo:after {
position: absolute;
content: "";
left: -15%;
bottom: 0;
height: 1px;
width: 129%;
border-bottom: 1px solid #fff;
}
.logo + .title {
width: 666px;
height: 44px;
margin: 0 auto;
background: url("../../src/assets/images/login_title.png") no-repeat center;
background-size: 100% 100%;
color: white;
// font-size: 24px;
// letter-spacing: 4px
}
.login-content {
overflow: hidden;
height: 100%;
}
.card-container {
width: 500px;
margin: 0 auto;
padding: 0 auto;
}
.el-card {
// padding: 5px 10px 0px 0px;
padding: 0px;
}
::v-deep .el-card__body {
padding: 0px !important;
.el-tabs__item {
width: 250px;
}
}
.login-form {
display: block;
position: relative;
width: 520px;
max-width: 100%;
padding: 0px 15px;
margin: 0 auto;
overflow: hidden;
}
.tips {
font-size: 14px;
color: #fff;
margin-bottom: 10px;
span {
&:first-of-type {
margin-right: 16px;
}
}
}
.svg-container {
padding: 0px 0px 6px 5px;
margin-bottom: -10px;
color: $dark_gray;
vertical-align: middle;
width: 30px;
display: inline-block;
.svgImg {
width: 1em;
height: 1em;
vertical-align: -0.16em;
fill: currentColor;
overflow: hidden;
}
}
.title-container {
.title {
color: #7e7e7e;
text-align: center;
letter-spacing: -0.05em;
line-height: 20px;
font-weight: 500;
font-family: "Helvetica Neue", Helvetica, "PingFang SC",
"Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
margin-bottom: 10px;
}
h1.title:before,
h1.title:after {
content: "";
height: 1px;
position: absolute;
top: 37px;
width: 35%;
}
h1.title:before {
background: rgb(126, 126, 126);
background: -moz-linear-gradient(
to left,
rgba(126, 126, 126, 1) 0%,
rgba(255, 255, 255, 1) 100%
);
background: -webkit-linear-gradient(
to left,
rgba(126, 126, 126, 1) 0%,
rgba(255, 255, 255, 1) 100%
);
background: -moz-linear-gradient(
to left,
rgba(126, 126, 126, 1) 0%,
rgba(255, 255, 255, 1) 100%
);
background: -ms-linear-gradient(
to left,
rgba(126, 126, 126, 1) 0%,
rgba(255, 255, 255, 1) 100%
);
background: linear-gradient(
to left,
rgba(126, 126, 126, 1) 0%,
rgba(255, 255, 255, 1) 100%
);
left: 0px;
}
h1.title:after {
background: rgb(126, 126, 126);
background: -moz-linear-gradient(
to right,
rgba(126, 126, 126, 1) 0%,
rgba(255, 255, 255, 1) 100%
);
background: -webkit-linear-gradient(
to right,
rgba(126, 126, 126, 1) 0%,
rgba(255, 255, 255, 1) 100%
);
background: -moz-linear-gradient(
to right,
rgba(126, 126, 126, 1) 0%,
rgba(255, 255, 255, 1) 100%
);
background: -ms-linear-gradient(
to right,
rgba(126, 126, 126, 1) 0%,
rgba(255, 255, 255, 1) 100%
);
background: linear-gradient(
to right,
rgba(126, 126, 126, 1) 0%,
rgba(255, 255, 255, 1) 100%
);
right: 0px;
}
}
.show-pwd {
position: absolute;
right: 10px;
top: 3px;
font-size: 16px;
color: $dark_gray;
cursor: pointer;
user-select: none;
}
.thirdparty-button {
position: absolute;
right: 0;
bottom: 6px;
}
@media only screen and (max-width: 470px) {
.thirdparty-button {
display: none;
}
}
.login-wrap {
position: absolute;
top: 70%;
left: 0;
right: 0;
width: 100%;
height: 418px;
text-align: center;
transform: translate(0, -50%);
} }
} }
.login-tip {
font-size: 13px;
text-align: center;
color: #bfbfbf;
}
.login-code {
width: 33%;
height: 38px;
float: right;
img {
cursor: pointer;
vertical-align: middle;
}
}
.el-login-footer {
height: 40px;
line-height: 40px;
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
color: #fff;
font-family: Arial;
font-size: 12px;
letter-spacing: 1px;
}
.login-code-img {
height: 38px;
}
</style> </style>

View File

@ -192,8 +192,16 @@
icon="el-icon-plus" icon="el-icon-plus"
v-if="scope.row.status =='CONFIRMED' && scope.row.workorderType =='SELF'" v-if="scope.row.status =='CONFIRMED' && scope.row.workorderType =='SELF'"
@click="handleAdd(scope.row)" @click="handleAdd(scope.row)"
v-hasPermi="['mes:pro:workorder:add']" v-hasPermi="['mes:pro:workorder:update']"
>新增</el-button> >新增</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-circle-check"
v-if="scope.row.status =='CONFIRMED'"
@click="handleFinish(scope.row)"
v-hasPermi="['mes:pro:workorder:update']"
>完成</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -399,7 +407,7 @@
</template> </template>
<script> <script>
import { listWorkorder, getWorkorder, delWorkorder, addWorkorder, updateWorkorder } from "@/api/mes/pro/workorder"; import { listWorkorder, getWorkorder, delWorkorder, addWorkorder, updateWorkorder ,dofinish} from "@/api/mes/pro/workorder";
import Workorderbom from "./bom/bom.vue"; import Workorderbom from "./bom/bom.vue";
import WorkorderItemList from "./items/item.vue"; import WorkorderItemList from "./items/item.vue";
import ItemSelect from "@/components/itemSelect/single.vue"; import ItemSelect from "@/components/itemSelect/single.vue";
@ -478,9 +486,9 @@ export default {
workorderName: [ workorderName: [
{ required: true, message: "工单名称不能为空", trigger: "blur" } { required: true, message: "工单名称不能为空", trigger: "blur" }
], ],
workorderType: [ // workorderType: [
{ required: true, message: "请选择生产工单类型", trigger: "blur" } // { required: true, message: "", trigger: "blur" }
], // ],
orderSource: [ orderSource: [
{ required: true, message: "来源类型不能为空", trigger: "blur" } { required: true, message: "来源类型不能为空", trigger: "blur" }
], ],
@ -690,13 +698,22 @@ export default {
...this.queryParams ...this.queryParams
}, `workorder_${new Date().getTime()}.xlsx`) }, `workorder_${new Date().getTime()}.xlsx`)
}, },
handleFinish(){ handleConfirm(){
let that = this; let that = this;
this.$modal.confirm('是否完成工单编制?【完成后将不能更改】').then(function(){ this.$modal.confirm('是确认完成工单编制?【确认后将不能更改】').then(function(){
that.form.status = 'CONFIRMED'; that.form.status = 'CONFIRMED';
that.submitForm(); that.submitForm();
}); });
}, },
handleFinish(row){
const workorderIds = row.workorderId || this.ids;
this.$modal.confirm('确认完成工单?一旦完成,此工单将无法继续报工').then(function() {
return dofinish(workorderIds) //
}).then(() => {
this.getList();
this.$modal.msgSuccess("更改成功");
}).catch(() => {});
},
// //
onItemSelected(obj){ onItemSelected(obj){
if(obj != undefined && obj != null){ if(obj != undefined && obj != null){

View File

@ -7,7 +7,7 @@ function resolve(dir) {
const CompressionPlugin = require("compression-webpack-plugin"); const CompressionPlugin = require("compression-webpack-plugin");
const name = "智能工厂MES系统"; // 网页标题 const name = "机加大师"; // 网页标题
const port = process.env.port || process.env.npm_config_port || 80; // 端口 const port = process.env.port || process.env.npm_config_port || 80; // 端口