修复界面:清理最终交付界面技术字段与品牌文案
This commit is contained in:
1 parent
118a55b04e
commit
42f6822964
12 files changed
+177
-266
No files matched your search
@@ -2,13 +2,13 @@
|
||||
<div class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
|
||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
|
||||
<breadcrumb v-if="!topNav" id="breadcrumb-container" class="breadcrumb-container" />
|
||||
<top-nav v-if="topNav" id="topmenu-container" class="topmenu-container" />
|
||||
|
||||
<div class="right-menu">
|
||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||
<div class="avatar-wrapper">
|
||||
<img :src="avatar" class="user-avatar">
|
||||
<img :src="avatarSrc" class="user-avatar" @error="handleAvatarError">
|
||||
<i class="el-icon-caret-bottom" />
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
@@ -32,22 +32,18 @@ import { mapGetters } from 'vuex'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import TopNav from '@/components/TopNav'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
import Screenfull from '@/components/Screenfull'
|
||||
import SizeSelect from '@/components/SizeSelect'
|
||||
import Search from '@/components/HeaderSearch'
|
||||
import RuoYiGit from '@/components/RuoYi/Git'
|
||||
import RuoYiDoc from '@/components/RuoYi/Doc'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Breadcrumb,
|
||||
TopNav,
|
||||
Hamburger,
|
||||
Screenfull,
|
||||
SizeSelect,
|
||||
Search,
|
||||
RuoYiGit,
|
||||
RuoYiDoc
|
||||
Hamburger
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
defaultAvatar: require('@/assets/images/profile.jpg'),
|
||||
avatarLoadFailed: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
@@ -55,6 +51,12 @@ export default {
|
||||
'avatar',
|
||||
'device'
|
||||
]),
|
||||
avatarSrc() {
|
||||
if (this.avatarLoadFailed || !this.avatar) {
|
||||
return this.defaultAvatar
|
||||
}
|
||||
return this.avatar
|
||||
},
|
||||
setting: {
|
||||
get() {
|
||||
return this.$store.state.settings.showSettings
|
||||
@@ -72,7 +74,15 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
avatar() {
|
||||
this.avatarLoadFailed = false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleAvatarError() {
|
||||
this.avatarLoadFailed = true
|
||||
},
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
},
|
||||
@@ -83,9 +93,9 @@ export default {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.href = '/index';
|
||||
location.href = '/index'
|
||||
})
|
||||
}).catch(() => {});
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+15
-110
@@ -1,116 +1,21 @@
|
||||
<template>
|
||||
<div class="app-container home">
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :sm="24" :lg="24">
|
||||
<blockquote class="text-warning" style="font-size: 14px">
|
||||
领取阿里云通用云产品1888优惠券
|
||||
<br />
|
||||
<el-link
|
||||
href="https://www.aliyun.com/minisite/goods?userCode=brki8iof"
|
||||
type="primary"
|
||||
target="_blank"
|
||||
>https://www.aliyun.com/minisite/goods?userCode=brki8iof</el-link
|
||||
>
|
||||
<br />
|
||||
领取腾讯云通用云产品2860优惠券
|
||||
<br />
|
||||
<el-link
|
||||
href="https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console"
|
||||
type="primary"
|
||||
target="_blank"
|
||||
>https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console</el-link
|
||||
>
|
||||
<br />
|
||||
阿里云服务器折扣区
|
||||
<el-link href="http://aly.ruoyi.vip" type="primary" target="_blank"
|
||||
>>☛☛点我进入☚☚</el-link
|
||||
>
|
||||
腾讯云服务器秒杀区
|
||||
<el-link href="http://txy.ruoyi.vip" type="primary" target="_blank"
|
||||
>>☛☛点我进入☚☚</el-link
|
||||
><br />
|
||||
<h4 class="text-danger">
|
||||
云产品通用红包,可叠加官网常规优惠使用。(仅限新用户)
|
||||
</h4>
|
||||
</blockquote>
|
||||
|
||||
<hr />
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
<el-row :gutter="20">
|
||||
<el-col :sm="24" :lg="12" style="padding-left: 20px;">
|
||||
<el-col :sm="24" :lg="14" style="padding-left: 20px;">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>基地学员管理平台</span>
|
||||
<span style="font-weight: bold; font-size: 16px;">智慧培训管理平台</span>
|
||||
</div>
|
||||
<div class="text item" style="margin-bottom: 16px; font-size: 14px; color: #606266; line-height: 1.8;">
|
||||
<p>欢迎使用智慧培训管理平台。本平台提供培训计划编排、学员主档与参训管理、智能排课排程、电子班牌联动、教学设施与实训场地调度,以及全流程多维学习数据分析等核心功能。</p>
|
||||
</div>
|
||||
<div class="text item" style="margin-bottom: 20px; text-align: center">
|
||||
版本 V1.0
|
||||
<img src="@/assets/images/version.png" alt="系统架构" style="max-width: 100%; border-radius: 4px;">
|
||||
</div>
|
||||
<div class="text item" style="margin-bottom: 20px; text-align: center">
|
||||
<img src="@/assets/images/version.png">
|
||||
</div>
|
||||
<div class="text item" style="margin-bottom: 20px; text-align: center">
|
||||
版权所有:中国科学院沈阳计算技术研究所有限公司
|
||||
<el-divider style="margin: 15px 0;" />
|
||||
<div class="text item" style="display: flex; justify-content: space-between; color: #909399; font-size: 13px;">
|
||||
<span>系统版本:V1.0</span>
|
||||
<span>版权所有:中国科学院沈阳计算技术研究所有限公司</span>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!-- <p>
|
||||
<b>当前版本:</b> <span>v{{ version }}</span>
|
||||
</p>
|
||||
<p>
|
||||
<el-tag type="danger">¥免费开源</el-tag>
|
||||
</p>
|
||||
<p>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-cloudy"
|
||||
plain
|
||||
@click="goTarget('https://gitee.com/y_project/RuoYi-Vue')"
|
||||
>访问码云</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-s-home"
|
||||
plain
|
||||
@click="goTarget('http://ruoyi.vip')"
|
||||
>访问主页</el-button
|
||||
>
|
||||
</p>-->
|
||||
</el-col>
|
||||
|
||||
<el-col :sm="24" :lg="12" style="padding-left: 50px;" v-show="false">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<h2>技术选型</h2>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<h4>后端技术</h4>
|
||||
<ul>
|
||||
<li>SpringBoot</li>
|
||||
<li>Spring Security</li>
|
||||
<li>JWT</li>
|
||||
<li>MyBatis</li>
|
||||
<li>Druid</li>
|
||||
<li>Fastjson</li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<h4>前端技术</h4>
|
||||
<ul>
|
||||
<li>Vue</li>
|
||||
<li>Vuex</li>
|
||||
<li>Element-ui</li>
|
||||
<li>Axios</li>
|
||||
<li>Sass</li>
|
||||
<li>Quill</li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider />
|
||||
@@ -119,19 +24,19 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Index",
|
||||
name: 'Index',
|
||||
data() {
|
||||
return {
|
||||
// 版本号
|
||||
version: "3.8.5"
|
||||
};
|
||||
version: '3.8.5'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goTarget(href) {
|
||||
window.open(href, "_blank");
|
||||
window.open(href, '_blank')
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<h3 class="title">基地学员管理平台V1.0</h3>
|
||||
<h3 class="title">智慧培训管理平台</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input
|
||||
v-model="loginForm.username"
|
||||
@@ -23,7 +23,7 @@
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="code" v-if="captchaEnabled">
|
||||
<!-- <el-form-item prop="code" v-if="captchaEnabled">
|
||||
<el-input
|
||||
v-model="loginForm.code"
|
||||
auto-complete="off"
|
||||
@@ -49,7 +49,7 @@
|
||||
<span v-if="!loading">登 录</span>
|
||||
<span v-else>登 录 中...</span>
|
||||
</el-button>
|
||||
<div style="float: right;" v-if="register">
|
||||
<div v-if="register" style="float: right;">
|
||||
<router-link class="link-type" :to="'/register'">立即注册</router-link>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@@ -62,30 +62,29 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCodeImg } from "@/api/login";
|
||||
import Cookies from "js-cookie";
|
||||
import { getCodeImg } from '@/api/login'
|
||||
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
||||
|
||||
export default {
|
||||
name: "Login",
|
||||
name: 'Login',
|
||||
data() {
|
||||
return {
|
||||
codeUrl: "",
|
||||
codeUrl: '',
|
||||
loginForm: {
|
||||
username: "admin",
|
||||
password: "admin123",
|
||||
username: 'admin',
|
||||
password: 'admin123',
|
||||
rememberMe: false,
|
||||
code: "",
|
||||
uuid: ""
|
||||
code: '',
|
||||
uuid: ''
|
||||
},
|
||||
loginRules: {
|
||||
username: [
|
||||
{ required: true, trigger: "blur", message: "请输入您的账号" }
|
||||
{ required: true, trigger: 'blur', message: '请输入您的账号' }
|
||||
],
|
||||
password: [
|
||||
{ required: true, trigger: "blur", message: "请输入您的密码" }
|
||||
],
|
||||
/*code: [{ required: true, trigger: "change", message: "请输入验证码" }]*/
|
||||
{ required: true, trigger: 'blur', message: '请输入您的密码' }
|
||||
]
|
||||
/* code: [{ required: true, trigger: "change", message: "请输入验证码" }]*/
|
||||
},
|
||||
loading: false,
|
||||
// 验证码开关
|
||||
@@ -93,66 +92,66 @@ export default {
|
||||
// 注册开关
|
||||
register: true,
|
||||
redirect: undefined
|
||||
};
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function(route) {
|
||||
this.redirect = route.query && route.query.redirect;
|
||||
this.redirect = route.query && route.query.redirect
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getCode();
|
||||
this.getCookie();
|
||||
this.getCode()
|
||||
this.getCookie()
|
||||
},
|
||||
methods: {
|
||||
getCode() {
|
||||
getCodeImg().then(res => {
|
||||
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
||||
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
|
||||
if (this.captchaEnabled) {
|
||||
this.codeUrl = "data:image/gif;base64," + res.img;
|
||||
this.loginForm.uuid = res.uuid;
|
||||
this.codeUrl = 'data:image/gif;base64,' + res.img
|
||||
this.loginForm.uuid = res.uuid
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
getCookie() {
|
||||
const username = localStorage.getItem("username");
|
||||
const password = localStorage.getItem("password");
|
||||
const username = localStorage.getItem('username')
|
||||
const password = localStorage.getItem('password')
|
||||
const rememberMe = localStorage.getItem('rememberMe')
|
||||
this.loginForm = {
|
||||
username: username === undefined ? this.loginForm.username : username,
|
||||
password: password === undefined ? this.loginForm.password : decrypt(password),
|
||||
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
||||
};
|
||||
}
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
this.loading = true
|
||||
if (this.loginForm.rememberMe) {
|
||||
localStorage.setItem("username", this.loginForm.username, { expires: 30 });
|
||||
localStorage.setItem("password", encrypt(this.loginForm.password), { expires: 30 });
|
||||
localStorage.setItem('rememberMe', this.loginForm.rememberMe, { expires: 30 });
|
||||
localStorage.setItem('username', this.loginForm.username, { expires: 30 })
|
||||
localStorage.setItem('password', encrypt(this.loginForm.password), { expires: 30 })
|
||||
localStorage.setItem('rememberMe', this.loginForm.rememberMe, { expires: 30 })
|
||||
} else {
|
||||
localStorage.removeItem("username");
|
||||
localStorage.removeItem("password");
|
||||
localStorage.removeItem('rememberMe');
|
||||
localStorage.removeItem('username')
|
||||
localStorage.removeItem('password')
|
||||
localStorage.removeItem('rememberMe')
|
||||
}
|
||||
this.$store.dispatch("Login", this.loginForm).then(() => {
|
||||
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
||||
this.$store.dispatch('Login', this.loginForm).then(() => {
|
||||
this.$router.push({ path: this.redirect || '/' }).catch(() => {})
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.loading = false
|
||||
if (this.captchaEnabled) {
|
||||
this.getCode();
|
||||
this.getCode()
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="register">
|
||||
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
||||
<h3 class="title">基地学员管理平台</h3>
|
||||
<h3 class="title">智慧培训管理平台</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
@@ -29,7 +29,7 @@
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code" v-if="captchaEnabled">
|
||||
<el-form-item v-if="captchaEnabled" prop="code">
|
||||
<el-input
|
||||
v-model="registerForm.code"
|
||||
auto-complete="off"
|
||||
@@ -40,7 +40,7 @@
|
||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
<div class="register-code">
|
||||
<img :src="codeUrl" @click="getCode" class="register-code-img"/>
|
||||
<img :src="codeUrl" class="register-code-img" @click="getCode">
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item style="width:100%;">
|
||||
@@ -67,82 +67,82 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCodeImg, register } from "@/api/login";
|
||||
import { getCodeImg, register } from '@/api/login'
|
||||
|
||||
export default {
|
||||
name: "Register",
|
||||
name: 'Register',
|
||||
data() {
|
||||
const equalToPassword = (rule, value, callback) => {
|
||||
if (this.registerForm.password !== value) {
|
||||
callback(new Error("两次输入的密码不一致"));
|
||||
callback(new Error('两次输入的密码不一致'))
|
||||
} else {
|
||||
callback();
|
||||
callback()
|
||||
}
|
||||
};
|
||||
}
|
||||
return {
|
||||
codeUrl: "",
|
||||
codeUrl: '',
|
||||
registerForm: {
|
||||
username: "",
|
||||
password: "",
|
||||
confirmPassword: "",
|
||||
code: "",
|
||||
uuid: ""
|
||||
username: '',
|
||||
password: '',
|
||||
confirmPassword: '',
|
||||
code: '',
|
||||
uuid: ''
|
||||
},
|
||||
registerRules: {
|
||||
username: [
|
||||
{ required: true, trigger: "blur", message: "请输入您的账号" },
|
||||
{ required: true, trigger: 'blur', message: '请输入您的账号' },
|
||||
{ min: 2, max: 20, message: '用户账号长度必须介于 2 和 20 之间', trigger: 'blur' }
|
||||
],
|
||||
password: [
|
||||
{ required: true, trigger: "blur", message: "请输入您的密码" },
|
||||
{ required: true, trigger: 'blur', message: '请输入您的密码' },
|
||||
{ min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' }
|
||||
],
|
||||
confirmPassword: [
|
||||
{ required: true, trigger: "blur", message: "请再次输入您的密码" },
|
||||
{ required: true, validator: equalToPassword, trigger: "blur" }
|
||||
{ required: true, trigger: 'blur', message: '请再次输入您的密码' },
|
||||
{ required: true, validator: equalToPassword, trigger: 'blur' }
|
||||
],
|
||||
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
||||
code: [{ required: true, trigger: 'change', message: '请输入验证码' }]
|
||||
},
|
||||
loading: false,
|
||||
captchaEnabled: true
|
||||
};
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getCode();
|
||||
this.getCode()
|
||||
},
|
||||
methods: {
|
||||
getCode() {
|
||||
getCodeImg().then(res => {
|
||||
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
||||
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
|
||||
if (this.captchaEnabled) {
|
||||
this.codeUrl = "data:image/gif;base64," + res.img;
|
||||
this.registerForm.uuid = res.uuid;
|
||||
this.codeUrl = 'data:image/gif;base64,' + res.img
|
||||
this.registerForm.uuid = res.uuid
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
handleRegister() {
|
||||
this.$refs.registerForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
this.loading = true
|
||||
register(this.registerForm).then(res => {
|
||||
const username = this.registerForm.username;
|
||||
this.$alert("<font color='red'>恭喜你,您的账号 " + username + " 注册成功!</font>", '系统提示', {
|
||||
const username = this.registerForm.username
|
||||
this.$alert("<font color='red'>恭喜你,您的账号 " + username + ' 注册成功!</font>', '系统提示', {
|
||||
dangerouslyUseHTMLString: true,
|
||||
type: 'success'
|
||||
}).then(() => {
|
||||
this.$router.push("/login");
|
||||
}).catch(() => {});
|
||||
this.$router.push('/login')
|
||||
}).catch(() => {})
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.loading = false
|
||||
if (this.captchaEnabled) {
|
||||
this.getCode();
|
||||
this.getCode()
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="user-info-head" @click="editCropper()"><img v-bind:src="options.img" title="点击上传头像" class="img-circle img-lg" /></div>
|
||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog">
|
||||
<div class="user-info-head" @click="editCropper()"><img :src="options.img" title="点击上传头像" class="img-circle img-lg" @error="handleAvatarError"></div>
|
||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog">
|
||||
<el-row>
|
||||
<el-col :xs="24" :md="12" :style="{height: '350px'}">
|
||||
<vue-cropper
|
||||
v-if="visible"
|
||||
ref="cropper"
|
||||
:img="options.img"
|
||||
:info="true"
|
||||
:autoCrop="options.autoCrop"
|
||||
:autoCropWidth="options.autoCropWidth"
|
||||
:autoCropHeight="options.autoCropHeight"
|
||||
:fixedBox="options.fixedBox"
|
||||
:outputType="options.outputType"
|
||||
:auto-crop="options.autoCrop"
|
||||
:auto-crop-width="options.autoCropWidth"
|
||||
:auto-crop-height="options.autoCropHeight"
|
||||
:fixed-box="options.fixedBox"
|
||||
:output-type="options.outputType"
|
||||
@realTime="realTime"
|
||||
v-if="visible"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :xs="24" :md="12" :style="{height: '350px'}">
|
||||
<div class="avatar-upload-preview">
|
||||
<img :src="previews.url" :style="previews.img" />
|
||||
<img :src="previews.url" :style="previews.img">
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<br />
|
||||
<br>
|
||||
<el-row>
|
||||
<el-col :lg="2" :sm="3" :xs="3">
|
||||
<el-upload action="#" :http-request="requestUpload" :show-file-list="false" :before-upload="beforeUpload">
|
||||
<el-button size="small">
|
||||
选择
|
||||
<i class="el-icon-upload el-icon--right"></i>
|
||||
<i class="el-icon-upload el-icon--right" />
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</el-col>
|
||||
<el-col :lg="{span: 1, offset: 2}" :sm="2" :xs="2">
|
||||
<el-button icon="el-icon-plus" size="small" @click="changeScale(1)"></el-button>
|
||||
<el-button icon="el-icon-plus" size="small" @click="changeScale(1)" />
|
||||
</el-col>
|
||||
<el-col :lg="{span: 1, offset: 1}" :sm="2" :xs="2">
|
||||
<el-button icon="el-icon-minus" size="small" @click="changeScale(-1)"></el-button>
|
||||
<el-button icon="el-icon-minus" size="small" @click="changeScale(-1)" />
|
||||
</el-col>
|
||||
<el-col :lg="{span: 1, offset: 1}" :sm="2" :xs="2">
|
||||
<el-button icon="el-icon-refresh-left" size="small" @click="rotateLeft()"></el-button>
|
||||
<el-button icon="el-icon-refresh-left" size="small" @click="rotateLeft()" />
|
||||
</el-col>
|
||||
<el-col :lg="{span: 1, offset: 1}" :sm="2" :xs="2">
|
||||
<el-button icon="el-icon-refresh-right" size="small" @click="rotateRight()"></el-button>
|
||||
<el-button icon="el-icon-refresh-right" size="small" @click="rotateRight()" />
|
||||
</el-col>
|
||||
<el-col :lg="{span: 2, offset: 6}" :sm="2" :xs="2">
|
||||
<el-button type="primary" size="small" @click="uploadImg()">提 交</el-button>
|
||||
@@ -54,9 +54,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import store from "@/store";
|
||||
import { VueCropper } from "vue-cropper";
|
||||
import { uploadAvatar } from "@/api/system/user";
|
||||
import store from '@/store'
|
||||
import { VueCropper } from 'vue-cropper'
|
||||
import { uploadAvatar } from '@/api/system/user'
|
||||
import { debounce } from '@/utils'
|
||||
|
||||
export default {
|
||||
@@ -73,92 +73,95 @@ export default {
|
||||
// 是否显示cropper
|
||||
visible: false,
|
||||
// 弹出层标题
|
||||
title: "修改头像",
|
||||
title: '修改头像',
|
||||
options: {
|
||||
img: store.getters.avatar, //裁剪图片的地址
|
||||
img: store.getters.avatar, // 裁剪图片的地址
|
||||
autoCrop: true, // 是否默认生成截图框
|
||||
autoCropWidth: 200, // 默认生成截图框宽度
|
||||
autoCropHeight: 200, // 默认生成截图框高度
|
||||
fixedBox: true, // 固定截图框大小 不允许改变
|
||||
outputType:"png" // 默认生成截图为PNG格式
|
||||
outputType: 'png' // 默认生成截图为PNG格式
|
||||
},
|
||||
previews: {},
|
||||
resizeHandler: null
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleAvatarError() {
|
||||
this.options.img = require('@/assets/images/profile.jpg')
|
||||
},
|
||||
// 编辑头像
|
||||
editCropper() {
|
||||
this.open = true;
|
||||
this.open = true
|
||||
},
|
||||
// 打开弹出层结束时的回调
|
||||
modalOpened() {
|
||||
this.visible = true;
|
||||
this.visible = true
|
||||
if (!this.resizeHandler) {
|
||||
this.resizeHandler = debounce(() => {
|
||||
this.refresh()
|
||||
}, 100)
|
||||
}
|
||||
window.addEventListener("resize", this.resizeHandler)
|
||||
window.addEventListener('resize', this.resizeHandler)
|
||||
},
|
||||
// 刷新组件
|
||||
refresh() {
|
||||
this.$refs.cropper.refresh();
|
||||
this.$refs.cropper.refresh()
|
||||
},
|
||||
// 覆盖默认的上传行为
|
||||
requestUpload() {
|
||||
},
|
||||
// 向左旋转
|
||||
rotateLeft() {
|
||||
this.$refs.cropper.rotateLeft();
|
||||
this.$refs.cropper.rotateLeft()
|
||||
},
|
||||
// 向右旋转
|
||||
rotateRight() {
|
||||
this.$refs.cropper.rotateRight();
|
||||
this.$refs.cropper.rotateRight()
|
||||
},
|
||||
// 图片缩放
|
||||
changeScale(num) {
|
||||
num = num || 1;
|
||||
this.$refs.cropper.changeScale(num);
|
||||
num = num || 1
|
||||
this.$refs.cropper.changeScale(num)
|
||||
},
|
||||
// 上传预处理
|
||||
beforeUpload(file) {
|
||||
if (file.type.indexOf("image/") == -1) {
|
||||
this.$modal.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。");
|
||||
if (file.type.indexOf('image/') === -1) {
|
||||
this.$modal.msgError('文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。')
|
||||
} else {
|
||||
const reader = new FileReader();
|
||||
reader.readAsDataURL(file);
|
||||
const reader = new FileReader()
|
||||
reader.readAsDataURL(file)
|
||||
reader.onload = () => {
|
||||
this.options.img = reader.result;
|
||||
};
|
||||
this.options.img = reader.result
|
||||
}
|
||||
}
|
||||
},
|
||||
// 上传图片
|
||||
uploadImg() {
|
||||
this.$refs.cropper.getCropBlob(data => {
|
||||
let formData = new FormData();
|
||||
formData.append("avatarfile", data);
|
||||
const formData = new FormData()
|
||||
formData.append('avatarfile', data)
|
||||
uploadAvatar(formData).then(response => {
|
||||
this.open = false;
|
||||
this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
|
||||
store.commit('SET_AVATAR', this.options.img);
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.visible = false;
|
||||
});
|
||||
});
|
||||
this.open = false
|
||||
this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl
|
||||
store.commit('SET_AVATAR', this.options.img)
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
this.visible = false
|
||||
})
|
||||
})
|
||||
},
|
||||
// 实时预览
|
||||
realTime(data) {
|
||||
this.previews = data;
|
||||
this.previews = data
|
||||
},
|
||||
// 关闭窗口
|
||||
closeDialog() {
|
||||
this.options.img = store.getters.avatar
|
||||
this.visible = false;
|
||||
window.removeEventListener("resize", this.resizeHandler)
|
||||
this.visible = false
|
||||
window.removeEventListener('resize', this.resizeHandler)
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.user-info-head {
|
||||
|
||||
@@ -57,8 +57,7 @@
|
||||
|
||||
<el-table v-loading="loading" :data="classroomList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="教室ID" align="center" prop="classRoomId" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="教室名称" align="center" prop="roomName" />
|
||||
<el-table-column label="教室名称" align="center" prop="roomName" min-width="120" />
|
||||
<el-table-column label="教室位置" align="center" prop="roomLocation" />
|
||||
<el-table-column label="核定容纳人数" align="center" prop="capacity">
|
||||
<template slot-scope="scope">
|
||||
|
||||
@@ -61,9 +61,8 @@
|
||||
|
||||
<!-- 参训学员列表 -->
|
||||
<el-table v-loading="loading" :data="enrollmentList" border style="width: 100%">
|
||||
<el-table-column label="参训编号" align="center" prop="enrollmentId" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column label="学员编号" align="center" prop="studentId" min-width="110" show-overflow-tooltip />
|
||||
<el-table-column label="姓名" align="center" prop="studentName" min-width="95" show-overflow-tooltip />
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column label="姓名" align="center" prop="studentName" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column label="性别" align="center" prop="gender" width="65">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.gender || '-' }}</span>
|
||||
@@ -174,7 +173,6 @@
|
||||
<el-radio v-model="addDialog.selectedStudentId" :label="scope.row.sId" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="学号" prop="sId" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column label="姓名" prop="studentName" min-width="100" />
|
||||
<el-table-column label="性别" prop="gender" width="65" align="center" />
|
||||
<el-table-column label="身份证号" prop="idCardMasked" min-width="170" show-overflow-tooltip />
|
||||
@@ -185,7 +183,7 @@
|
||||
<el-form ref="addForm" :model="addForm" :rules="addRules" label-width="110px" size="small">
|
||||
<el-form-item label="选中学员" prop="studentId">
|
||||
<el-input
|
||||
:value="addDialog.selectedStudent ? `${addDialog.selectedStudent.studentName} (${addDialog.selectedStudent.sId})` : ''"
|
||||
:value="addDialog.selectedStudent ? (addDialog.selectedStudent.studentName + (addDialog.selectedStudent.orgName ? ' - ' + addDialog.selectedStudent.orgName : '')) : ''"
|
||||
readonly
|
||||
placeholder="请在上方列表点击选择学员"
|
||||
/>
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<!-- 视图二:平面明细表格视图 -->
|
||||
<div v-else v-loading="loading">
|
||||
<el-table :data="allLessons" border style="width: 100%">
|
||||
<el-table-column label="课次ID" prop="lessonId" width="90" align="center" />
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column label="课程名称" prop="courseName" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column label="授课教师" prop="teacherName" width="100" align="center" />
|
||||
<el-table-column label="开始时间" prop="startTime" width="165" align="center" />
|
||||
@@ -203,7 +203,7 @@
|
||||
<el-option
|
||||
v-for="t in teacherOptions"
|
||||
:key="t.tId"
|
||||
:label="`${t.name || t.tName} (${t.tId}) - ${t.workDept || t.orgName || '基地'}`"
|
||||
:label="`${t.name || t.tName} - ${t.workDept || t.orgName || '基地'}`"
|
||||
:value="t.tId"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
@@ -48,8 +48,7 @@
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="planList">
|
||||
<el-table-column label="计划编号" align="center" prop="planId" min-width="220" show-overflow-tooltip />
|
||||
<el-table-column label="培训班名称" align="left" prop="planName" min-width="230" show-overflow-tooltip />
|
||||
<el-table-column label="培训班名称" align="left" prop="planName" min-width="240" show-overflow-tooltip />
|
||||
<el-table-column label="状态" align="center" prop="planStatus" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="statusTagType(scope.row.planStatus)">{{ statusLabel(scope.row.planStatus) }}</el-tag>
|
||||
|
||||
@@ -56,8 +56,7 @@
|
||||
|
||||
<el-table v-loading="loading" :data="siteList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="场地ID" align="center" prop="siteId" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="实训场地名称" align="center" prop="siteName" />
|
||||
<el-table-column label="实训场地名称" align="center" prop="siteName" min-width="140" />
|
||||
<el-table-column label="场地位置" align="center" prop="siteLocation" />
|
||||
<el-table-column label="最大容纳人数" align="center" prop="capacity">
|
||||
<template slot-scope="scope">
|
||||
|
||||
@@ -59,8 +59,7 @@
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="studentList">
|
||||
<el-table-column label="学员编号" align="center" prop="sId" min-width="160" />
|
||||
<el-table-column label="学员姓名" align="center" prop="sName" min-width="100" />
|
||||
<el-table-column label="学员姓名" align="center" prop="sName" min-width="110" />
|
||||
<el-table-column label="性别" align="center" prop="sGender" width="70" />
|
||||
<el-table-column label="出生日期" align="center" prop="sBirth" width="110">
|
||||
<template slot-scope="scope">
|
||||
@@ -158,6 +157,7 @@
|
||||
<el-dialog title="学员主档详情" :visible.sync="detailOpen" width="560px" append-to-body>
|
||||
<el-form :model="detail" label-width="90px" class="student-detail">
|
||||
<el-form-item label="学员姓名"><span>{{ detail.sName || '-' }}</span></el-form-item>
|
||||
<el-form-item label="系统编号"><span>{{ detail.sId || '-' }}</span></el-form-item>
|
||||
<el-form-item label="所属单位"><span>{{ detail.orgName || '-' }}</span></el-form-item>
|
||||
<el-form-item label="联系电话"><span>{{ detail.sPhone || '-' }}</span></el-form-item>
|
||||
<el-form-item label="邮箱"><span>{{ detail.sEmail || '-' }}</span></el-form-item>
|
||||
|
||||
@@ -72,8 +72,7 @@
|
||||
|
||||
<el-table v-loading="loading" :data="teacherList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="教师工号" align="center" prop="tId" />
|
||||
<el-table-column label="教师姓名" align="center" prop="tName" />
|
||||
<el-table-column label="教师姓名" align="center" prop="tName" min-width="120" />
|
||||
<el-table-column label="性别" align="center" prop="tGender" width="80" />
|
||||
<el-table-column label="出生日期" align="center" prop="tBirth" width="120">
|
||||
<template slot-scope="scope">
|
||||
|
||||
Reference in new issue
Block a user