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() {
return {
isHh: Setting.isHh,
avatar:'',
};
},
computed: {
@ -32,7 +33,7 @@ export default {
])
},
mounted(){
this.avatar = sessionStorage.getItem('userAvatars')
},
methods: {
...mapActions('user', [

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

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

@ -228,7 +228,7 @@ export default {
'form.month': function(val){
if(val){
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{
this.date = []
}
@ -263,6 +263,16 @@ export default {
})
},
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() {
let data = {
type: this.form.type,
@ -282,10 +292,27 @@ export default {
}).catch(res => {});
},
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.page = 1
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(){
this.$router.push('add')
},

@ -2,7 +2,7 @@
<div class="wrap">
<!-- 头像部分 -->
<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;">
<el-upload
class="upload-demo"
@ -505,7 +505,8 @@ export default {
emailOpener: '',
phoneOpener: '',
originAccount: '',
accountReapeat: false
accountReapeat: false,
avatar:'',
};
},
computed: {
@ -514,6 +515,7 @@ export default {
]),
},
mounted() {
this.avatar = sessionStorage.getItem('userAvatars')
this.getdata();
this.getProvince()
this.getSchoolData()

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

Loading…
Cancel
Save