master
e 3 years ago
parent 41d8d51226
commit 855fc276e1
  1. 3
      src/layouts/header/index.vue
  2. 8
      src/pages/account/login/index.vue
  3. 2
      src/pages/assessment/add/index.vue
  4. 29
      src/pages/assessment/list/index.vue
  5. 6
      src/pages/setting/person/index.vue
  6. 1
      src/store/modules/user.js

@ -21,6 +21,7 @@ export default {
data() { data() {
return { return {
isHh: Setting.isHh, isHh: Setting.isHh,
avatar:'',
}; };
}, },
computed: { computed: {
@ -32,7 +33,7 @@ export default {
]) ])
}, },
mounted(){ mounted(){
this.avatar = sessionStorage.getItem('userAvatars')
}, },
methods: { methods: {
...mapActions('user', [ ...mapActions('user', [

@ -1,9 +1,9 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<div class="header"> <!-- <div class="header">-->
<img class="logo hh" v-if="isHh" src="@/assets/img/logo-hh.png" /> <!-- <img class="logo hh" v-if="isHh" src="@/assets/img/logo-hh.png" />-->
<img class="logo" v-else src="@/assets/img/logo.png" /> <!--&lt;!&ndash; <img class="logo" v-else src="@/assets/img/logo.png" />&ndash;&gt;-->
</div> <!-- </div>-->
<div class="main"> <div class="main">
<div class="box"> <div class="box">

@ -160,7 +160,7 @@ export default {
return { return {
id: '', id: '',
roleStatus: util.getRoleName, roleStatus: util.getRoleName,
systemId: Setting.systemId, systemId: 8,
systemList: Setting.systemList, systemList: Setting.systemList,
isDetail: true, isDetail: true,
duration: { duration: {

@ -228,7 +228,7 @@ export default {
'form.month': function(val){ 'form.month': function(val){
if(val){ if(val){
let unit = 24 * 60 * 60 * 1000 let unit = 24 * 60 * 60 * 1000
this.date = [this.formatDate('yyyy-MM-dd',new Date(new Date().getTime() - unit * 30 * val)),this.formatDate('yyyy-MM-dd',new Date(new Date().getTime() + unit))] this.date = [this.timestampToTimes(new Date(new Date().getTime() - unit * 30 * val)),this.timestampToTimes(new Date(new Date().getTime() + unit))]
}else{ }else{
this.date = [] this.date = []
} }
@ -263,6 +263,16 @@ export default {
}) })
}, },
methods: { methods: {
timestampToTimes(timestamp) {
var chinaStandard= timestamp;
var date = new Date(chinaStandard);
var y = date.getFullYear();
var m = date.getMonth() + 1;
m = m < 10 ? ('0' + m) : m;
var d = date.getDate();
d = d < 10 ? ('0' + d) : d;
return y + '-' + m + '-' + d
},
getData() { getData() {
let data = { let data = {
type: this.form.type, type: this.form.type,
@ -282,10 +292,27 @@ export default {
}).catch(res => {}); }).catch(res => {});
}, },
initData(){ initData(){
if (this.form.month >0){
let num = this.form.month*30
let lastDay = this.getTimeByDay(num) //30
let lastTime = this.formatTime(lastDay)
let time = new Date()
this.date = [this.timestampToTimes(time),lastTime]
}else{
this.date = []
}
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
this.page = 1 this.page = 1
this.getData() this.getData()
}, },
getTimeByDay(num) {
let today = new Date().getTime()
return today + 60 * 60 * 1000 * 24 * num;
},
formatTime(time) {
//new Date(time).toISOString() => 2019-02-23T08:40:35.825Z
return new Date(time).toISOString().split('T')[0];
},
add(){ add(){
this.$router.push('add') this.$router.push('add')
}, },

@ -2,7 +2,7 @@
<div class="wrap"> <div class="wrap">
<!-- 头像部分 --> <!-- 头像部分 -->
<div class="header"> <div class="header">
<el-avatar :size="80" :src="this.avatar" class="Headtop"></el-avatar> <el-avatar :size="80" :src="avatar" class="Headtop"></el-avatar>
<div style="color:#9278FF;font-size:14px;font-family:MicrosoftYaHei;margin-top:5px;"> <div style="color:#9278FF;font-size:14px;font-family:MicrosoftYaHei;margin-top:5px;">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
@ -505,7 +505,8 @@ export default {
emailOpener: '', emailOpener: '',
phoneOpener: '', phoneOpener: '',
originAccount: '', originAccount: '',
accountReapeat: false accountReapeat: false,
avatar:'',
}; };
}, },
computed: { computed: {
@ -514,6 +515,7 @@ export default {
]), ]),
}, },
mounted() { mounted() {
this.avatar = sessionStorage.getItem('userAvatars')
this.getdata(); this.getdata();
this.getProvince() this.getProvince()
this.getSchoolData() this.getSchoolData()

@ -49,6 +49,7 @@ export default {
util.local.set(Setting.tokenKey,data.token,Setting.tokenExpires) util.local.set(Setting.tokenKey,data.token,Setting.tokenExpires)
util.successMsg('登录成功') util.successMsg('登录成功')
console.log(data,'登录保存的数据'); console.log(data,'登录保存的数据');
sessionStorage.setItem('userAvatars', data.userAvatars)
commit('SET_INFO',data) commit('SET_INFO',data)
resolve() resolve()
}else{ }else{

Loading…
Cancel
Save