mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-08 18:36:43 +08:00
提交
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import ajax from '@/utils/xajax.js'
|
||||
// import ajax from '@/utils/xajax.js'
|
||||
import ajax from '../cesource/index.js'
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,17 +44,17 @@
|
||||
</div>
|
||||
<div class="learning-border" ></div>
|
||||
<div class="learning-info" style="margin-left:22px">
|
||||
<div class="learning-qus">当月学习时长</div>
|
||||
<div class="learning-qus">当月学习天数</div>
|
||||
<div class="learning-an"><span>12.7</span>小时</div>
|
||||
</div>
|
||||
<div class="learning-info">
|
||||
<div class="learning-qus">累计学习时长</div>
|
||||
<div class="learning-an"><span>120.7.7</span>小时</div>
|
||||
<div class="learning-qus">累计学习天数</div>
|
||||
<div class="learning-an"><span>120.7.7</span>天</div>
|
||||
</div>
|
||||
<div class="learning-border" ></div>
|
||||
<div class="learning-info" style="margin-left:22px">
|
||||
<div class="learning-qus">我的U币(累计)</div>
|
||||
<div class="learning-an"><span>120.7.7</span>小时</div>
|
||||
<div class="learning-an"><span>120.7.7</span>天</div>
|
||||
</div>
|
||||
<div class="list">
|
||||
BOE 排行榜 >>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
|
||||
handleClick() {
|
||||
|
||||
}
|
||||
|
||||
@@ -15,17 +15,17 @@
|
||||
<el-input v-model="form.name" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别">
|
||||
<el-radio-group v-model="form.gender">
|
||||
<el-radio-button label="男" :value="1"></el-radio-button>
|
||||
<el-radio-button label="女" :value="2"></el-radio-button>
|
||||
<el-radio-group v-model="form.gender" disabled>
|
||||
<el-radio-button :label="1">男</el-radio-button>
|
||||
<el-radio-button :label="2">女</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属部门">
|
||||
<span class="depart">BOE/企划中心/数据资产部</span>
|
||||
<span class="depart">{{form.departName}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="生日">
|
||||
<el-date-picker
|
||||
v-model="form.birthday"
|
||||
v-model="form.birthday" disabled
|
||||
type="date"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
@@ -37,7 +37,7 @@
|
||||
<el-input v-model="form.account.email" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="我的签名">
|
||||
<el-input type="textarea" :rows="2" disabled></el-input>
|
||||
<el-input type="textarea" :rows="2"></el-input>
|
||||
</el-form-item>
|
||||
<div class="dynamic-range">
|
||||
<span>动态可见范围</span>
|
||||
@@ -46,24 +46,18 @@
|
||||
<el-radio v-model="radio" label="3">最近三个月动态</el-radio>
|
||||
</div>
|
||||
<h4>兴趣爱好</h4>
|
||||
<div class="interest">
|
||||
<span style="float:left;">领导力</span>
|
||||
<el-checkbox-group v-model="checkboxGroup1" style="float:left;">
|
||||
<el-checkbox-button size="medium" v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox-button>
|
||||
<div class="interest" v-for="(sys,index) in sysTypeListMap" :key="sys.id">
|
||||
<span>{{sys.name}}</span>
|
||||
<el-checkbox-group v-model="checkboxGroup" v-if="sys.children.length > 0" @change="handleClick($event)">
|
||||
<el-checkbox-button size="medium" v-for="ch in sys.children" :label="ch.id" :key="ch.id">{{ch.name}}</el-checkbox-button>
|
||||
</el-checkbox-group>
|
||||
<!-- <ul class="interest-index">
|
||||
<li v-for="ch in sys.children" :label="ch.id" :key="ch.id">{{ch.name}}</li>
|
||||
</ul> -->
|
||||
</div>
|
||||
<div style="text-align: center;margin-top:56px">
|
||||
<el-button type="primary" @click="saveHobby()">更改</el-button>
|
||||
</div>
|
||||
<!-- <div class="interest">
|
||||
<span style="float:left;">专业力</span>
|
||||
<el-checkbox-group v-model="checkboxGroup1" style="float:left;">
|
||||
<el-checkbox-button size="medium" v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox-button>
|
||||
</el-checkbox-group>
|
||||
</div> -->
|
||||
<!-- <div class="interest">
|
||||
<span style="float:left;">兴趣爱好</span>
|
||||
<el-checkbox-group v-model="checkboxGroup1" style="float:left;">
|
||||
<el-checkbox-button size="medium" v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox-button>
|
||||
</el-checkbox-group>
|
||||
</div> -->
|
||||
</div>
|
||||
</el-form>
|
||||
<el-dialog
|
||||
@@ -114,11 +108,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { mapGetters, mapActions } from 'vuex';
|
||||
import userApi from "@/api/system/user";
|
||||
import accountApi from "@/api/account";
|
||||
import apiPassword from '@/api/boe/login.js'
|
||||
import imageUpload from '@/components/ImageUpload/index.vue';
|
||||
import apiUserhobby from "@/api/modules/userhobby.js"
|
||||
const cityOptions = ['上海', '北京', '广州', '深圳'];
|
||||
export default{
|
||||
components:{imageUpload},
|
||||
@@ -161,7 +156,7 @@
|
||||
};
|
||||
return {
|
||||
cities: cityOptions,
|
||||
checkboxGroup1: ['上海'],
|
||||
checkboxGroup: [],
|
||||
radio: '1',
|
||||
form:{
|
||||
account:{}
|
||||
@@ -177,13 +172,14 @@
|
||||
confirmPass: [
|
||||
{ validator: validatePass3, trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
},
|
||||
sysTypeListMap:[]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
...mapGetters(['userInfo']),
|
||||
avatar(){
|
||||
console.log(this.userInfo,'this.userInfo')
|
||||
if(this.userInfo.avatar){
|
||||
if(this.userInfo.avatar.indexOf('http')==-1){
|
||||
return this.baseUrl+this.userInfo.avatar
|
||||
@@ -213,8 +209,50 @@
|
||||
this.avatarUrl = this.avatar;
|
||||
}
|
||||
this.load();
|
||||
this.getInfo();
|
||||
this.getSysTypeTree().then(rs => {
|
||||
this.sysTypeListMap = rs;
|
||||
console.log(this.sysTypeListMap,'sysTypeListMap');
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
getInfo() { //获取用户兴趣关联的id
|
||||
apiUserhobby.info().then(res=>{
|
||||
if(res.status == 200) {
|
||||
let data = res.result.map(item => item.refId);
|
||||
this.checkboxGroup = data;
|
||||
}
|
||||
console.log(res,'res');
|
||||
})
|
||||
},
|
||||
handleClick(e){
|
||||
},
|
||||
saveHobby(){
|
||||
let data = []
|
||||
if(this.checkboxGroup.length == 0) {
|
||||
this.$message.error('请选择爱好!')
|
||||
return
|
||||
}
|
||||
this.checkboxGroup.forEach(item=>{
|
||||
data.push({
|
||||
type:1,
|
||||
refId:item
|
||||
})
|
||||
})
|
||||
apiUserhobby.update(data).then(res=>{
|
||||
if(res.status == 200) {
|
||||
this.$message.success('更改成功!')
|
||||
} else {
|
||||
this.$message.error("更改失败!")
|
||||
}
|
||||
})
|
||||
},
|
||||
...mapActions({
|
||||
getResOwnerTree: 'resOwner/getResOwnerTree',
|
||||
loadResOwners: 'resOwner/loadResOwners',
|
||||
getSysTypeTree: 'sysType/getSysTypeTree',
|
||||
loadSysTypes: 'sysType/loadSysTypes'
|
||||
}),
|
||||
load(){
|
||||
userApi.detail(this.userInfo.aid).then(res=>{
|
||||
//console.log(res)
|
||||
@@ -275,30 +313,67 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-checkbox-button.is-focus .el-checkbox-button__inner{
|
||||
border-color:rgba(151,151,151,0.3) !important;
|
||||
}
|
||||
|
||||
::v-deep .el-checkbox-button--medium .el-checkbox-button__inner{
|
||||
padding: 10px 50px !important;
|
||||
// padding: 10px 40px !important;
|
||||
width: 146px;
|
||||
height: 44px;
|
||||
line-height: 24px;
|
||||
}
|
||||
::v-deep .el-checkbox-button.is-checked .el-checkbox-button__inner {
|
||||
background-color: rgba(0,0,0,0) !important;
|
||||
color: #387DF8 !important;
|
||||
}
|
||||
::v-deep .el-checkbox-button.is-focus .el-checkbox-button__inner{
|
||||
// border-color:#fff !important;
|
||||
outline: none;
|
||||
}
|
||||
// ::v-deep .el-checkbox-button.is-focus{
|
||||
// border-color:none !important;
|
||||
// outline: none !important;
|
||||
// }
|
||||
::v-deep .el-checkbox-button:first-child .el-checkbox-button__inner{
|
||||
border-left:none;
|
||||
}
|
||||
.el-checkbox-button, .el-checkbox-button__inner {
|
||||
margin-right: 40px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 4px;
|
||||
box-shadow: none;
|
||||
border-left: 1px solid rgba(151,151,151,0.3);
|
||||
|
||||
box-shadow: 1px 0 0 0 #fff;
|
||||
}
|
||||
.interest{
|
||||
display: flex;
|
||||
padding-left: 20px;
|
||||
.interest-index{
|
||||
flex: 84%;
|
||||
display: flex;
|
||||
li{
|
||||
width: 146px;
|
||||
height: 44px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 4px;
|
||||
border: 1px solid rgba(151,151,151,0.3);
|
||||
margin-bottom: 20px;
|
||||
line-height: 44px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
span{
|
||||
// width: 80px;
|
||||
// flex: 1;
|
||||
margin-right: 17px;
|
||||
color: #333333;
|
||||
font-size: 14px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-checkbox-group{
|
||||
flex: 84%;
|
||||
.el-checkbox-button{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.dynamic-range{
|
||||
@@ -319,6 +394,16 @@
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 60px 0px 0px 205px;
|
||||
::v-deep .el-radio-button__inner{
|
||||
background: #F4F4F4 !important;
|
||||
border-radius: 4px !important;
|
||||
}
|
||||
::v-deep .el-radio-button__orig-radio:checked+.el-radio-button__inner{
|
||||
color: #FFF;
|
||||
background-color: #387DF7 !important;
|
||||
border-color: #387DF7;
|
||||
box-shadow: -1px 0 0 0 #387DF7;
|
||||
}
|
||||
.informationItem{
|
||||
// &:first-of-type{
|
||||
// margin-top: 10px;
|
||||
|
||||
Reference in New Issue
Block a user