Browse Source

用户信息页面调整

master
xiejiahao 4 years ago
parent
commit
862476d36a
  1. 17
      src/components/ModulesMenu/allMenus.vue
  2. 61
      src/components/ModulesMenu/modulesOfRouter.js
  3. 15
      src/views/layout/components/Navbar.vue
  4. 271
      src/views/layout/components/UserInfo.vue
  5. 2
      src/views/order/enterprise.vue

17
src/components/ModulesMenu/allMenus.vue

@ -5,7 +5,6 @@
:visible.sync="visible" :visible.sync="visible"
width="60%" width="60%"
append-to-body> append-to-body>
<div slot="title" class="dialog-title"> <div slot="title" class="dialog-title">
<p>全部应用</p> <p>全部应用</p>
<el-divider style="margin: 0 !important;"></el-divider> <el-divider style="margin: 0 !important;"></el-divider>
@ -64,6 +63,7 @@ export default {
} }
} }
}, },
watch: { watch: {
'value': { 'value': {
handler(nval, oval) { handler(nval, oval) {
@ -74,6 +74,7 @@ export default {
}, },
'keyWords': 'filterModule' 'keyWords': 'filterModule'
}, },
data() { data() {
return { return {
menuLoading: false, menuLoading: false,
@ -86,7 +87,6 @@ export default {
}, },
methods: { methods: {
searchMenu(val) { searchMenu(val) {
this.keyWords = val; this.keyWords = val;
}, },
@ -119,21 +119,25 @@ export default {
selectItem(item) { selectItem(item) {
if(item.isBuy) { if(item.isBuy) {
// //
console.log(modulesOfRouter, "modulesOfRouter");
let name = ""; let name = "";
modulesOfRouter.forEach(e => { modulesOfRouter.forEach(e => {
if(e.id == item.id) { if(e.id == item.id) {
name = e.path; name = e.path;
item.type = e.type;
} }
}) })
if(name != "") { if(name != "") {
if(item.type == "link") {
window.open(name);
}else {
this.$router.push({path: name}) this.$router.push({path: name})
} }
}
this.visible = false; this.visible = false;
} }
}, },
goBuy(item) { goBuy(item) {
this.visible = false; this.visible = false;
// //
@ -149,9 +153,10 @@ export default {
let branchModules = res2.data.data; let branchModules = res2.data.data;
tempData.forEach(k => { tempData.forEach(k => {
branchModules.forEach(element => { branchModules.forEach(element => {
if(k.id == element.moduleId) {
// if(k.id == element.moduleId) {
// k.isBuy = true;
// }
k.isBuy = true; k.isBuy = true;
}
}); });
modulesOfIcon.forEach(element => { modulesOfIcon.forEach(element => {

61
src/components/ModulesMenu/modulesOfRouter.js

@ -1,75 +1,92 @@
export const modulesOfRouter = [ export const modulesOfRouter = [
{ {
id: 'mall', id: 'mall',
path: ''
path: 'https://www.qingqinkj.com/mallm/m1/#/dashboard',
type: 'link'
}, },
{ {
id: 'mall-marketing', id: 'mall-marketing',
path: ''
path: 'https://www.qingqinkj.com/mk/m1/#/dashboard',
type: 'link'
}, },
{ {
id: 'mdp-arc', id: 'mdp-arc',
path: ''
path: 'https://www.qingqinkj.com/arc/m1/#/dashboard',
type: 'link'
}, },
{ {
id: 'mdp-sys', id: 'mdp-sys',
path: ''
path: 'https://www.qingqinkj.com/sys/m1/#/mdp/sys/dept/DeptMng',
type: 'link'
}, },
{ {
id: 'oa-asset', id: 'oa-asset',
path: ''
path: 'https://www.qingqinkj.com/oa/m1/#/oa/erp/ass/assetDetail/AssetDetailMng',
type: 'link'
}, },
{ {
id: 'oa-attendance', id: 'oa-attendance',
path: ''
path: 'https://www.qingqinkj.com/oa/m1/#/oa/kq/attendance/AttendanceMonth',
type: 'link'
}, },
{ {
id: 'oa-car', id: 'oa-car',
path: '',
path: 'https://www.qingqinkj.com/oa/m1/#/oa/car/components/watch',
type: 'link'
}, },
{ {
id: 'oa-contract', id: 'oa-contract',
path: ''
path: 'https://www.qingqinkj.com/oa/m1/#/oa/ht/contractCard/ContractCardMng',
type: 'link'
}, },
{ {
id: 'oa-customer', id: 'oa-customer',
path: ''
path: 'https://www.qingqinkj.com/oa/m1/#/oa/crm/customer/CustomerIndex',
type: 'link'
}, },
{ {
id: 'oa-file', id: 'oa-file',
path: ''
path: 'https://www.qingqinkj.com/oa/m1/#/oa/hr/user/employeeInfo',
type: 'link'
}, },
{ {
id: 'oa-finance', id: 'oa-finance',
path: ''
path: 'https://www.qingqinkj.com/ac/m1/#/dashboard',
type: 'link'
}, },
{ {
id: 'oa-meeting', id: 'oa-meeting',
path: ''
path: 'https://www.qingqinkj.com/oa/m1/#/oa/meet/meetMeeting/MeetMeetingMng',
type: 'link'
}, },
{ {
id: 'oa-office', id: 'oa-office',
path: ''
path: 'https://www.qingqinkj.com/oa/m1/#/oa/om/omAppliance/OmApplianceMng',
type: 'link'
}, },
{ {
id: 'oa-performance', id: 'oa-performance',
path: ''
path: 'https://www.qingqinkj.com/oa/m1/#/oa/jx/AssesssSatistical',
type: 'link'
}, },
{ {
id: 'oa-schedule', id: 'oa-schedule',
path: ''
path: 'https://www.qingqinkj.com/oa/m1/#/oa/rc/rcSchedule/RcScheduleMng',
type: 'link'
}, },
{ {
id: 'oa-seal', id: 'oa-seal',
path: '',
path: 'https://www.qingqinkj.com/oa/m1/#/oa/sig/sigSignet/SigSignetMng',
type: 'link'
}, },
{ {
id: 'oa-supervision', id: 'oa-supervision',
path: ''
path: 'https://www.qingqinkj.com/oa/m1/#/oa/duban/dubanItem/DutyDubanItem',
type: 'link'
}, },
{ {
id: 'xm-analysis', id: 'xm-analysis',
path: 'reportIndex',
path: 'xm/rpt/reportIndex',
}, },
{ {
id: 'xm-development', id: 'xm-development',
@ -85,18 +102,18 @@ export const modulesOfRouter = [
}, },
{ {
id: 'xm-project', id: 'xm-project',
path: 'xmProjectAllMng'
path: '/xm/core/xmProject/XmProjectAllMng'
}, },
{ {
id: 'xm-test', id: 'xm-test',
path: 'XmQuestionAdd'
path: '/xm/core/xmQuestion/XmQuestionAdd'
}, },
{ {
id: 'xm-workload', id: 'xm-workload',
path: 'XmTaskWorkloadInfoMy',
path: '/xm/core/xmTaskWorkload/XmTaskWorkloadInfoMy',
}, },
{ {
id: 'xm-crowd', id: 'xm-crowd',
path: '',
path: '/xm/core/crowd/XmTaskCrowdMng',
} }
] ]

15
src/views/layout/components/Navbar.vue

@ -27,7 +27,10 @@
<theme-picker class="theme-switch right-menu-item"></theme-picker> <theme-picker class="theme-switch right-menu-item"></theme-picker>
</el-tooltip> </el-tooltip>
<el-dropdown class="avatar-container right-menu-item hidden-sm-and-down" trigger="hover" @command="handleCommand">
<UserInfo />
<!-- <el-dropdown class="avatar-container right-menu-item hidden-sm-and-down" trigger="hover" @command="handleCommand">
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<img v-if="userInfo && userInfo.headimgurl && userInfo.headimgurl!=null && userInfo.headimgurl!=='' " class="user-avatar" :src="userInfo.headimgurl"> <img v-if="userInfo && userInfo.headimgurl && userInfo.headimgurl!=null && userInfo.headimgurl!=='' " class="user-avatar" :src="userInfo.headimgurl">
<img v-else class="user-avatar" src="../../../assets/image/user_img.gif"> <img v-else class="user-avatar" src="../../../assets/image/user_img.gif">
@ -59,7 +62,6 @@
</div> </div>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item v-if="false" divided> <el-dropdown-item v-if="false" divided>
<div style=" overflow-x:auto; height:250px;"> <div style=" overflow-x:auto; height:250px;">
商户及门店 <el-form> 商户及门店 <el-form>
@ -84,7 +86,9 @@
</div> </div>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown>
</el-dropdown> -->
<!-- <div class="notice"> <!-- <div class="notice">
<i class="el-icon-bell"></i> <i class="el-icon-bell"></i>
@ -117,8 +121,10 @@ import Hamburger from '@/components/Hamburger'
import ErrorLog from '@/components/ErrorLog' import ErrorLog from '@/components/ErrorLog'
import Screenfull from '@/components/Screenfull' import Screenfull from '@/components/Screenfull'
import LangSelect from '@/components/LangSelect' import LangSelect from '@/components/LangSelect'
import ThemePicker from '@/components/ThemePicker';
import ThemePicker from '@/components/ThemePicker'
import NoticeMsgBar from '@/components/NoticeMsgBar' import NoticeMsgBar from '@/components/NoticeMsgBar'
import UserInfo from './UserInfo'
import dayjs from 'dayjs' import dayjs from 'dayjs'
//import selectShopLocationBySysDept from '@/views/mdp/app/selectShopLocationBySysDept/selectShopLocationBySysDept'; //import selectShopLocationBySysDept from '@/views/mdp/app/selectShopLocationBySysDept/selectShopLocationBySysDept';
@ -132,6 +138,7 @@ export default {
ThemePicker, ThemePicker,
TopModules, TopModules,
NoticeMsgBar, NoticeMsgBar,
UserInfo
}, },
data:function(){ data:function(){
return { return {

271
src/views/layout/components/UserInfo.vue

@ -0,0 +1,271 @@
<template>
<div>
<el-dropdown class="avatar-container right-menu-item hidden-sm-and-down" trigger="click" @command="handleCommand">
<div class="avatar-wrapper">
<img v-if="userInfo && userInfo.headimgurl && userInfo.headimgurl!=null && userInfo.headimgurl!=='' " class="user-avatar" :src="userInfo.headimgurl">
<img v-else class="user-avatar" src="../../../assets/image/user_img.gif">
<span class="username">{{getTimeStatus}}<b>{{userInfo.username}}</b></span>
<i class="el-icon-caret-bottom"></i>
</div>
<el-dropdown-menu slot="dropdown" style="width:360px;">
<div class="dropdown">
<div class="topBox">
<div class="topBox_logo">
<img src="../../../assets/image/qqlogo_yuan.png" alt="">
</div>
<div class="topBox_desc">
<p class="topBox_branch">{{userInfo.branchName}}</p>
<div class="topBox_version">
<span>当前版本 / <b class="version">免费基础版</b></span>
<span class="level">
<i></i>
升级
</span>
</div>
<div class="topBox_num">
<span>账号数量1 / 25</span>
</div>
</div>
</div>
<div class="middleBox">
<p class="middleBox_username">我的用户名<b>{{userInfo.username}}</b> </p>
<div class="middleBox_role">
<span>我的角色</span>
<span class="middleBox_role_name" v-for="role in roles" :key="role.roleid">
<a v-if="role.roleid.indexOf('SCOPE')< 0 "> {{role.rolename}} , </a>
</span>
</div>
</div>
<div class="bottomBox2">
<p>团队管理</p>
<p @click="logout">退出登录</p>
</div>
</div>
<!-- <el-dropdown-item divided>
<div style="height:250px;">
<el-row v-for="(item ,index) in deptPostsTree" :label="item.deptName" :key="index">
部门{{item.deptName}}
<br>
岗位
<div v-if="item.children!=null && item.children.length>0" style="padding-left:40px;">
<el-row v-for="(post,idx) in item.children" :key="idx">
{{post.postName}}
</el-row>
</div>
</el-row>
</div>
</el-dropdown-item> -->
<!-- <el-dropdown-item v-if="false" divided>
<div style=" overflow-x:auto; height:250px;">
商户及门店 <el-form>
<el-form-item label-width="300" v-for="item in shopLocationsTree" :label="item.shopName" :key="item.shopId">
<el-row v-for="location in item.locations" :key="location.locationId">
<el-col :span="24"><el-tag>{{location.locationName}}</el-tag><i v-if="location.locationId==userInfo.locationId" class="el-icon-check"></i>
</el-col>
</el-row>
<el-row v-if="item.locations==null || item.locations.length<=0">
<el-col :span="24"><el-tag> 无门店或者我不是该商户的门店管理员</el-tag> </el-col>
</el-row>
</el-form-item>
</el-form>
</div>
</el-dropdown-item> -->
<!-- <el-dropdown-item divided>
<div style=" overflow-x:auto; height:150px;">
我拥有的角色
<el-row style="padding-left:40px;" v-for="role in roles" :key="role.roleid">
<span v-if="role.roleid.indexOf('SCOPE')<0">{{role.rolename}}</span>
</el-row>
</div>
</el-dropdown-item> -->
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import dayjs from 'dayjs'
export default {
data() {
return {
}
},
computed: {
...mapGetters([
'userInfo',
'roles',
]),
getTimeStatus() {
let hour = dayjs().hour();
let msg = '早上好';
if(hour >= 13 || hour <= 18) {
msg = '下午好';
}else if (hour >= 19 || hour <= 24){
msg = '晚上好';
}
return msg;
}
},
methods: {
handleCommand(command){
if(command=='updateUserInfo'){
this.$router.push({path:'/updateUserInfo'})
}
},
logout() {
this.$store.dispatch('LogOut').then(() => {
location.replace('/'+process.env.CONTEXT+'/'+process.env.VERSION+'/');
})
},
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
.avatar-container {
height: 50px;
display: flex;
align-items: center;
.avatar-wrapper {
cursor: pointer;
display: flex;
flex-direction: row;
align-items: center;
.user-avatar {
height: 34px;
width: 34px;
border-radius: 50%;
margin-right: 12px;
}
.username{
color: #7D7D7D;
font-size: 18px;
margin-right: 2px;
}
.el-icon-caret-bottom {
font-size: 22px;
}
}
}
.dropdown {
padding: 0 20px 0 20px;
.topBox {
height: 100px;
display: flex;
flex-direction: row;
border-bottom: 1px solid #f6f6f6;
.topBox_logo {
display: flex;
justify-content: center;
align-items: center;
img {
width: 52px;
height: 52px;
}
}
.topBox_desc {
display: flex;
flex-direction: column;
margin-left: 20px;
width: 100%;
justify-content: center;
.topBox_branch {
font-size: 18px;
margin-bottom: 8px;
}
.topBox_version {
display: flex;
flex-direction: row;
margin-bottom: 8px;
font-size: 14px;
.version {
display: inline-block;
font-weight: normal;
color: rgb(69, 196, 186);
margin-top: 4px;
}
.level {
background: rgb(64, 158, 255);
margin-left: 10px;
padding: 4px 11px 4px 8px;
border-radius: 2px;
color: #fff;
cursor: pointer;
}
}
.topBox_num {
font-size: 14px;
}
}
}
.middleBox {
min-height: 60px;
border-bottom: 1px solid #f6f6f6;
padding: 12px 0;
.middleBox_username {
margin-bottom: 6px;
b {
font-weight: normal;
color: #606060;
}
}
.middleBox_role {
display: flex;
flex-direction: row;
flex-wrap: wrap;
line-height: 28px;
.middleBox_role_name {
color: #606060;
}
}
}
.bottomBox2 {
height: 120px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
p {
display: flex;
cursor: pointer;
width: 100%;
height: 40px;
text-align: left;
align-items: center;
}
p:hover {
background: rgb(243, 243, 243);
}
}
}
</style>

2
src/views/order/enterprise.vue

@ -235,7 +235,7 @@ export default {
let oa = this.menus.oa.filter(res => {return res.isChecked == true;}) let oa = this.menus.oa.filter(res => {return res.isChecked == true;})
let mall = this.menus.mall.filter(res => {return res.isChecked == true;}) let mall = this.menus.mall.filter(res => {return res.isChecked == true;})
tempData = Array.concat(xm).concat(oa).concat(mall); tempData = Array.concat(xm).concat(oa).concat(mall);
if(tempData.length == 0) return 0;
if(tempData.length == 0) return;
let yearAmount = new Decimal(0); let yearAmount = new Decimal(0);
let halfYearAmount = new Decimal(0); let halfYearAmount = new Decimal(0);
let quarter = new Decimal(0); let quarter = new Decimal(0);

Loading…
Cancel
Save