提交 97f9827c 编写于 作者: tony001's avatar tony001

调整应用切换器、用户退出、导入导出功能

上级 486348cc
<template> <template>
<dropdown v-if="itemLevel === 0" :transfer="true" trigger='click'> <dropdown v-if="itemLevel === 0" :transfer="true" trigger='click'>
<i-button :disabled="item.disabled"> <i-button :disabled="item.disabled" type="text" style="padding: 0 6px;margin-right:10px;">
<i class='fa fa-file-excel-o'></i> <i class='fa fa-file-excel-o' style="margin-right: 6px;font-size: 14px;"></i>
<span class='caption'>{{caption}}</span> <span class='caption'>{{caption}}</span>
</i-button> </i-button>
<dropdown-menu slot='list'> <dropdown-menu slot='list'>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<template v-for="(item, index) of items"> <template v-for="(item, index) of items">
<el-timeline-item :key="index" :timestamp="item.name" placement="top"> <el-timeline-item :key="index" :timestamp="item.name" placement="top">
<template v-for="data of item.items"> <template v-for="data of item.items">
<div :key="data.srfkey" class="app-timeline-item-title" @click="onClick(data)"> <div :key="index+data.srfkey" class="app-timeline-item-title" @click="onClick(data)">
<card> <card>
<div>{{data.name}}</div> <div>{{data.name}}</div>
<div>{{data.actor || data.create_uid_text}}</div> <div>{{data.actor || data.create_uid_text}}</div>
...@@ -72,6 +72,7 @@ export default class AppTimeline extends Vue { ...@@ -72,6 +72,7 @@ export default class AppTimeline extends Vue {
*/ */
public prepareData(datas: any[] = []) { public prepareData(datas: any[] = []) {
let format: any = this.getFormat(); let format: any = this.getFormat();
this.items = [];
datas.forEach((data: any) => { datas.forEach((data: any) => {
let time = data.time || data.create_date; let time = data.time || data.create_date;
if(format.test(time)) { if(format.test(time)) {
......
...@@ -3,10 +3,11 @@ ...@@ -3,10 +3,11 @@
left: 201px !important; left: 201px !important;
} }
.ivu-drawer { .ivu-drawer {
top: 64px !important; top: 52px !important;
} }
.ivu-drawer-body { .ivu-drawer-body {
padding: 32px !important; padding: 32px !important;
background-color: #f7fafc;
.menuItems { .menuItems {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -48,9 +49,10 @@ ...@@ -48,9 +49,10 @@
} }
.ivu-drawer-body { .ivu-drawer-body {
padding: 0px !important; padding: 0px !important;
background-color: #f7fafc;
} }
.ivu-drawer { .ivu-drawer {
top: 64px !important; top: 52px !important;
} }
.context-menu-drag { .context-menu-drag {
display: flex; display: flex;
......
<template> <template>
<Drawer class-name="sider-drawer" placement="left" :closable="false" :mask="false" width="200" v-model="leftDrawerVisiable"> <Drawer class-name="sider-drawer" placement="left" :closable="false" :mask="false" width="240" v-model="leftDrawerVisiable">
<div class="context-menu-drag"> <div class="context-menu-drag">
<div class="menu-list"> <div class="menu-list">
<div class="menu-header" @mouseover="showMenuDrawer" @click="rightDrawerVisiable=!rightDrawerVisiable"> <div class="menu-header" @click="rightDrawerVisiable=!rightDrawerVisiable">
<div class="menuicon"> <div class="menuicon">
<Icon type="md-apps" /> <Icon type="md-apps" />
</div> </div>
<div class="content"> <div class="content">
<span>服务</span> <span>全部应用</span>
</div> </div>
<div class="forward"> <div class="forward">
<Icon type="ios-arrow-forward" /> <Icon type="ios-arrow-forward" />
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<div style="padding:8px 0px;" class="col-6"> <div style="padding:8px 0px;" class="col-6">
<draggable class="list-group" tag="ul" v-model="selectlist" v-bind="dragOptionsVal" @start="drag=true" @end="drag=false" :animation="250" handle=".handle" ghost-class="ghost"> <draggable class="list-group" tag="ul" v-model="selectlist" v-bind="dragOptionsVal" @start="drag=true" @end="drag=false" :animation="250" handle=".handle" ghost-class="ghost">
<transition-group type="transition" :name="!drag ? 'flip-list' : null"> <transition-group type="transition" :name="!drag ? 'flip-list' : null">
<li class="list-group-item" v-for="(item,index) in selectlist" :key="item.id"> <li @click="skipTo(item)" class="list-group-item" v-for="(item,index) in selectlist" :key="item.id">
<el-row> <el-row>
<el-col class="menuicon" :span="4"> <el-col class="menuicon" :span="4">
<span> <span>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<el-col :span="6"> <el-col :span="6">
<div class="bar"> <div class="bar">
<div> <div>
<Icon type="ios-close" @click="removeAt(index)" /> <Icon type="ios-close" @click.stop="removeAt(index)" />
</div> </div>
<div> <div>
<Icon type="ios-move handle" /> <Icon type="ios-move handle" />
...@@ -45,12 +45,12 @@ ...@@ -45,12 +45,12 @@
</div> </div>
<Drawer class-name="menu-drawer" width="60" :closable="true" :mask="false" placement="left" v-model="rightDrawerVisiable"> <Drawer class-name="menu-drawer" width="60" :closable="true" :mask="false" placement="left" v-model="rightDrawerVisiable">
<div class="menuItems"> <div class="menuItems">
<div class="item" v-for="(item) in list" :key="item.id"> <div @click="skipTo(item)" class="item" v-for="(item) in list" :key="item.id">
<span class="title">{{item.label}}</span> <span class="title">{{item.label}}</span>
<span v-if="isStar(item.id)" class="star" @click="outStar(item)"> <span v-if="isStar(item.id)" class="star" @click.stop="outStar(item)">
<Icon type="ios-star" /> <Icon type="ios-star" />
</span> </span>
<span v-else class="star" @click="onStar(item)"> <span v-else class="star" @click.stop="onStar(item)">
<Icon type="ios-star-outline" /> <Icon type="ios-star-outline" />
</span> </span>
</div> </div>
...@@ -73,6 +73,8 @@ import { Vue,Component,Provide,Watch,Prop,Model } from "vue-property-decorator"; ...@@ -73,6 +73,8 @@ import { Vue,Component,Provide,Watch,Prop,Model } from "vue-property-decorator";
}) })
export default class ContextMenuDrag extends Vue { export default class ContextMenuDrag extends Vue {
public panelShow: boolean = true;
/** /**
* 抽屉菜单状态 * 抽屉菜单状态
* *
...@@ -206,6 +208,23 @@ export default class ContextMenuDrag extends Vue { ...@@ -206,6 +208,23 @@ export default class ContextMenuDrag extends Vue {
return istar; return istar;
} }
/**
* 跳转到应用
*
* @returns
* @memberof ContextMenuDrag
*/
public skipTo(item: any){
if(item.addr){
let params: any = {};
params.model = this.selectlist;
const put: Promise<any> = this.entityService.updateChooseApp(null,params);
window.location.href = item.addr;
}else{
this.$message.info("未找到该应用");
}
}
/** /**
* 加入列表 * 加入列表
* *
......
...@@ -177,11 +177,11 @@ export class AppHeaderMenus extends Vue { ...@@ -177,11 +177,11 @@ export class AppHeaderMenus extends Vue {
* @memberof AppHeaderMenus * @memberof AppHeaderMenus
*/ */
@Emit('menu-click') @Emit('menu-click')
protected menuClick(item: any): any { protected menuClick(item: any,$event: any = null): any {
if (!item.tag) { if (!item.tag) {
item.tag = item.name item.tag = item.name
} }
return item; return [item, $event];
} }
/** /**
...@@ -216,7 +216,9 @@ export class AppHeaderMenus extends Vue { ...@@ -216,7 +216,9 @@ export class AppHeaderMenus extends Vue {
*/ */
protected renderMenuItem(item: any): any { protected renderMenuItem(item: any): any {
item.class = item.class ? item.class : ""; item.class = item.class ? item.class : "";
if (Object.is(this.mode, 'default')) { if(Object.is(item.uiaction.tag, 'ExportExcel')){
return <app-export-excel item={item} caption={item.caption} on-exportexcel={($event: any) => this.menuClick(item, $event)}></app-export-excel>;
} else if (Object.is(this.mode, 'default')) {
if (item.caption && !Object.is(item.caption, '')) { if (item.caption && !Object.is(item.caption, '')) {
return <div class={"app-header-menu-item text"+item.class} disabled={item.disabled} on-click={() => this.menuClick(item)}> return <div class={"app-header-menu-item text"+item.class} disabled={item.disabled} on-click={() => this.menuClick(item)}>
{this.renderIcon(item)} {this.renderIcon(item)}
......
...@@ -27,4 +27,11 @@ ...@@ -27,4 +27,11 @@
} }
} }
} }
}
.user-dropdownMenu{
margin-top: 8px;
background-color: #f7fafc;
.ivu-dropdown-item{
color: #303133;
}
} }
\ No newline at end of file
...@@ -79,7 +79,7 @@ export class AppUserInfo extends Vue { ...@@ -79,7 +79,7 @@ export class AppUserInfo extends Vue {
*/ */
public render(): any { public render(): any {
return <div class="crm-app-user-info"> return <div class="crm-app-user-info">
<dropdown on-on-click={this.userSelect} transfer={true}> <dropdown transfer-class-name="user-dropdownMenu" on-on-click={this.userSelect} transfer={true}>
<div class="user-head-sculpture"> <div class="user-head-sculpture">
{this.username} {this.username}
</div> </div>
...@@ -88,12 +88,11 @@ export class AppUserInfo extends Vue { ...@@ -88,12 +88,11 @@ export class AppUserInfo extends Vue {
</span> </span>
<dropdown-menu class='menu' slot='list' style='font-size: 15px !important;'> <dropdown-menu class='menu' slot='list' style='font-size: 15px !important;'>
<dropdown-item name='logout' style='font-size: 15px !important;'> <dropdown-item name='logout' style='font-size: 15px !important;'>
<span><i aria-hidden='true' class='fa fa-cogs' style='margin-right: 8px;'></i></span> <span><i aria-hidden='true' class='ivu-icon ivu-icon-md-power' style='margin-right: 8px;'></i></span>
<span>{this.$t('components.appUser.logout')}</span> <span>{this.$t('components.appUser.logout')}</span>
</dropdown-item> </dropdown-item>
</dropdown-menu> </dropdown-menu>
</dropdown> </dropdown>
</div>; </div>;
} }
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册