提交 2c76e221 编写于 作者: tony001's avatar tony001

Merge branch 'dev'

## v7.0.0-alpha.10 [2020-6-18]
### Bug修复
分页导航视图页面刷新bug
表单项更新,实体行为调用不到bug
关系界面子界面保存不触发父界面保存
表单样式调整
### 功能新增及优化
#### 模板
表格操作列只显示图标时显示tooltip
门户部件高度为0时自适应
面板和多数据部件数据流向
列表,数据视图保存功能
门户部件标题界面行为tooltip
新增面包屑、应用切换器组件
#### 基础文件
formitem样式调整,label适配位置
表格行编辑切换,app-picker不显示
文件上传下载参数格式处理
## v7.0.0-alpha.9 [2020-6-11]
### Bug修复
......
......@@ -73,8 +73,9 @@ import AppDepartmentSelect from './components/app-department-select/app-departme
import IBizGroupSelect from './components/ibiz-group-select/ibiz-group-select.vue'
import IBizGroupPicker from './components/ibiz-group-picker/ibiz-group-picker.vue'
import AppWFApproval from './components/app-wf-approval/app-wf-approval.vue'
import Breadcrumb from './components/app-breadcrumb/app-breadcrumb.vue';
import Breadcrumb from './components/app-breadcrumb/app-breadcrumb.vue'
import AppTransfer from './components/app-transfer/app-transfer.vue'
import ContextMenuDrag from './components/context-menu-drag/context-menu-drag.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
......@@ -162,5 +163,6 @@ export const AppComponents = {
v.component('app-wf-approval',AppWFApproval);
v.component('app-breadcrumb',Breadcrumb);
v.component('app-transfer',AppTransfer);
v.component('context-menu-drag',ContextMenuDrag);
},
};
\ No newline at end of file
......@@ -13,5 +13,12 @@
.no-redirect {
color: #97a8be;
cursor: text;
.curselected{
color: #2196F3;
font-weight: bold;
}
.app-breadcrumb-selected{
cursor: pointer;
}
}
}
\ No newline at end of file
<template>
<el-breadcrumb
class="app-breadcrumb"
separator="/"
>
<el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<el-breadcrumb-item
v-for="(item, index) in breadcrumbs"
:key="item.path"
>
<span
v-if="index === breadcrumbs.length-1"
class="no-redirect"
>{{ $t(item.meta.caption) }}</span>
<a
v-else
@click.prevent="handleLink(item)"
>{{ $t(item.meta.caption) }}</a>
<el-breadcrumb-item v-for="(item, index) in breadcrumbs" :key="item.id">
<span v-if="index === breadcrumbs.length-1" class="no-redirect">{{ item.title }}
<span v-if="item.isselected === true">
<dropdown trigger='click' @on-click="selectNavData($event,item)">
<span class="app-breadcrumb-selected">
<i class="el-icon-caret-bottom"></i>
</span>
<dropdown-menu slot='list'>
<dropdown-item v-for="(dataitem) in getPreNavData(item)" :name="dataitem.srfkey" :key="dataitem.srfkey">
<span :class="{'curselected':isCurSelected(item,dataitem)}">{{dataitem.srfmajortext}}</span>
</dropdown-item>
</dropdown-menu>
</dropdown>
</span>
</span>
<a v-else @click.prevent="handleLink(item)">{{ item.title }}</a>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>
......@@ -24,24 +25,43 @@
<script lang="ts">
import { Component, Vue, Watch, Prop } from 'vue-property-decorator'
import { RouteRecord, Route } from 'vue-router'
import { Environment } from "@/environments/environment";
import NavDataService from '@/service/app/navdata-service';
import {Subscription } from 'rxjs';
@Component({
})
export default class Breadcrumb extends Vue {
private breadcrumbs: RouteRecord[] = []; //面包屑列表
@Prop() public defPSAppView: any; //默认视图
/**
* 面包屑列表
*
* @memberof Breadcrumb
*/
private breadcrumbs: Array<any> = [];
/**
* 监听路由
* 导航服务
*
* @memberof Breadcrumb
*/
@Watch('$route')
private onRouteChange(route: Route) {
this.getBreadcrumb()
}
private navDataService = NavDataService.getInstance(this.$store);
/**
* 默认视图标识
*
* @memberof Breadcrumb
*/
@Prop() public indexViewTag!: string;
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Dev
*/
public serviceStateEvent: Subscription | undefined;
/**
* vue 生命周期
......@@ -49,7 +69,12 @@ export default class Breadcrumb extends Vue {
* @memberof Breadcrumb
*/
created() {
this.getBreadcrumb()
this.getBreadcrumb();
this.serviceStateEvent = this.navDataService.serviceState.subscribe(({ action,name, data }:{ action:string,name:any,data:any }) => {
if (Object.is(action, 'datarefresh')) {
this.getBreadcrumb();
}
});
}
/**
......@@ -58,24 +83,69 @@ export default class Breadcrumb extends Vue {
* @memberof Breadcrumb
*/
private getBreadcrumb() {
this.breadcrumbs = this.$route.matched.filter((item) => {
return item.meta && item.meta.caption
})
if(this.defPSAppView){
/**如果配置了默认视图,给面包屑第一级赋值默认视图为首页 */
}
this.breadcrumbs = this.navDataService.getNavData();
this.$forceUpdate();
}
/**
* 获取面包屑指定元素前一条数据
*
* @memberof Breadcrumb
*/
private getPreNavData(item:any){
let preNavData:any = this.navDataService.getPreNavDataById(item.id);
return preNavData.data;
}
/**
* 判断是否为当前选中项
*
* @memberof Breadcrumb
*/
private isCurSelected(item:any,singleItem:any){
return item.srfkey === singleItem.srfkey;
}
/**
* 单机面包屑
* 面包屑点击行为
*
* @memberof Breadcrumb
*/
private handleLink(item: any) {
this.$router.push(item).catch(err => {
console.warn(err);
});
// 首页
if(Object.is(item.id,this.indexViewTag)){
this.$router.push((window.sessionStorage.getItem(Environment.AppName))as string);
}else{
// 非首页
this.$router.push(item.path).catch(err => {
console.warn(err);
});
}
this.navDataService.removeNavData(item.id);
}
/**
* 切换导航行为
*
* @memberof Breadcrumb
*/
private selectNavData($event:any,item:any){
let preNavData:any = this.getPreNavData(item);
let curSrfkey:any = $event;
this.navDataService.serviceState.next({action:'viewrefresh',name:item.id, data:curSrfkey});
}
/**
* 组件销毁
*
* @memberof Breadcrumb
*/
public destroyed() {
if (this.serviceStateEvent) {
this.serviceStateEvent.unsubscribe();
}
}
}
</script>
......
......@@ -15,7 +15,7 @@
overflow: auto;
> .ivu-tabs-tabpane {
height: 100%;
overflow: auto;
overflow: initial;
}
}
}
......
......@@ -324,10 +324,10 @@ export default class AppPickerSelectView extends Vue {
this.items.push({ srfmajortext : item.srfmajortext, srfkey: item.srfkey });
}
});
let _viewparam = JSON.parse(this.viewparam);
_viewparam.selectedData = this.selectItems;
this.viewparam = JSON.stringify(_viewparam);
}
let _viewparam = JSON.parse(this.viewparam);
_viewparam.selectedData = this.selectItems;
this.viewparam = JSON.stringify(_viewparam);
}
this.$forceUpdate();
}
......
......@@ -242,7 +242,7 @@ export default class AppPicker extends Vue {
* @param {*} oldVal
* @memberof AppPicker
*/
@Watch('value')
@Watch('value',{immediate: true})
public onValueChange(newVal: any, oldVal: any) {
this.curvalue = newVal;
if (Object.is(this.editortype, 'dropdown') && this.valueitem) {
......
......@@ -148,11 +148,19 @@ export default class AppSpan extends Vue {
if(this.tag){
return; //代码表走codelist组件
}else if(this.editorType === "ADDRESSPICKUP"){
JSON.parse(this.value).forEach((item:any,index:number) => {
this.text += index === 0 ? item.srfmajortext : ","+item.srfmajortext;
});
if(this.$util.isEmpty(this.value)){
this.text = '';
}else{
JSON.parse(this.value).forEach((item:any,index:number) => {
this.text += index === 0 ? item.srfmajortext : ","+item.srfmajortext;
});
}
}else{
this.text = this.value;
if(this.$util.isEmpty(this.value)){
this.text = '';
}else{
this.text = this.value;
}
}
}
......
.menu-drawer {
.ivu-drawer-left {
left: 201px !important;
}
.ivu-drawer {
top: 64px !important;
}
.ivu-drawer-body {
padding: 32px !important;
.menuItems {
display: flex;
flex-wrap: wrap;
> .item {
margin: 0px 10px;
width: calc(33.333% - 20px);
padding: 0px 15px;
font-size: 13px;
transition: all 0.3s;
display: flex;
justify-content: space-between;
height: 32px;
align-items: center;
.star {
display: flex;
height: 100%;
width: 30px;
font-size: 15px;
align-items: center;
justify-content: center;
.ivu-icon-ios-star-outline{
display: none;
}
}
}
> .item:hover {
background-color: #eaeaea;
cursor: pointer;
.ivu-icon-ios-star-outline{
display: inline;
}
}
}
}
}
.sider-drawer {
.ivu-drawer {
background-color: #ffffff !important;
}
.ivu-drawer-body {
padding: 0px !important;
}
.ivu-drawer {
top: 64px !important;
}
.context-menu-drag {
display: flex;
.flip-list-move {
transition: transform 0.3s;
}
.menu-list {
width: 100%;
height: 100%;
.menu-header {
cursor: pointer;
border-bottom: 1px solid rgb(222, 222, 222);
height: 48px;
line-height: 48px;
display: flex;
align-items: center;
.menuicon {
display: inline-block;
width: 50px;
font-size: 16px;
text-align: center;
font-size: 22px;
}
.content {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1 1 0%;
overflow: hidden;
font-size: 13px;
}
.forward {
margin: 0px 8px 0px 4px;
color: rgb(222, 222, 222);
font-size: 15px;
}
}
.list-group-item {
transition: background 1s;
-webkit-transition: background 1s;
.menuicon {
text-align: center;
}
.el-row {
height: 100%;
display: flex;
align-items: center;
padding: 0px 5px;
}
height: 40px;
cursor: pointer;
position: relative;
display: block;
margin-bottom: -1px;
transition: background-color 0.5s;
transition-timing-function: ease-in-out;
.handle {
cursor: move;
}
.bar {
display: flex;
.ivu-icon-ios-close {
cursor: pointer;
font-size: 25px;
}
}
}
.list-group-item:hover {
background-color: #f5f5f5;
.ivu-icon-ios-star-outline{
display: inline;
}
}
}
}
}
\ No newline at end of file
<template>
<Drawer class-name="sider-drawer" placement="left" :closable="false" :mask="false" width="200" v-model="leftDrawerVisiable">
<div class="context-menu-drag">
<div class="menu-list">
<div class="menu-header" @mouseover="showMenuDrawer" @click="rightDrawerVisiable=!rightDrawerVisiable">
<div class="menuicon">
<Icon type="md-apps" />
</div>
<div class="content">
<span>服务</span>
</div>
<div class="forward">
<Icon type="ios-arrow-forward" />
</div>
</div>
<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">
<transition-group type="transition" :name="!drag ? 'flip-list' : null">
<li class="list-group-item" v-for="(item,index) in selectlist" :key="item.id">
<el-row>
<el-col class="menuicon" :span="4">
<span>
<Icon v-if="item.icon" :type="item.icon" />
<Icon v-else type="md-menu" />
</span>
</el-col>
<el-col :span="14">
<span>{{ item.label }}</span>
</el-col>
<el-col :span="6">
<div class="bar">
<div>
<Icon type="ios-close" @click="removeAt(index)" />
</div>
<div>
<Icon type="ios-move handle" />
</div>
</div>
</el-col>
</el-row>
</li>
</transition-group>
</draggable>
</div>
</div>
<Drawer class-name="menu-drawer" width="60" :closable="true" :mask="false" placement="left" v-model="rightDrawerVisiable">
<div class="menuItems">
<div class="item" v-for="(item) in list" :key="item.id">
<span class="title">{{item.label}}</span>
<span v-if="isStar(item.id)" class="star" @click="outStar(item)">
<Icon type="ios-star" />
</span>
<span v-else class="star" @click="onStar(item)">
<Icon type="ios-star-outline" />
</span>
</div>
</div>
</Drawer>
</div>
</Drawer>
</template>
<script lang="ts">
import draggable from "vuedraggable";
import EntityService from '@/service/entity-service';
import { Vue,Component,Provide,Watch,Prop,Model } from "vue-property-decorator";
// tslint:disable-next-line:max-classes-per-file
@Component({
components: {
draggable
}
})
export default class ContextMenuDrag extends Vue {
/**
* 抽屉菜单状态
*
* @returns
* @memberof ContextMenuDrag
*/
@Prop() public contextMenuDragVisiable?: boolean;
/**
* 拖拽列表配置对象
*
* @returns
* @memberof ContextMenuDrag
*/
@Model("change") public dragOptions: any;
/**
* 右侧飘窗状态
*
* @returns
* @memberof ContextMenuDrag
*/
public rightDrawerVisiable: boolean = false;
/**
* 左侧飘窗状态
*
* @returns
* @memberof ContextMenuDrag
*/
public leftDrawerVisiable: boolean = false;
/**
* 全部应用数据
*
* @returns
* @memberof ContextMenuDrag
*/
public list: Array<any> = [];
/**
* 已选择的应用数据
*
* @returns
* @memberof ContextMenuDrag
*/
public selectlist: Array<any> = [];
/**
* 拖拽列表
*
* @returns
* @memberof ContextMenuDrag
*/
public drag: boolean = false;
/**
* 拖拽列表配置项
*
* @returns
* @memberof ContextMenuDrag
*/
get dragOptionsVal() {
return {
animation: 200,
group: "description",
disabled: false,
ghostClass: "ghost"
};
}
/**
* 实体服务对象
*
* @protected
* @type {EntityService}
* @memberof ContextMenuDrag
*/
protected entityService: EntityService = new EntityService();
/**
* 监听抽屉菜单状态
*
* @returns
* @memberof ContextMenuDrag
*/
@Watch("contextMenuDragVisiable")
public onVisiableChange(newVal: any, oldVal: any) {
if (newVal) {
this.leftDrawerVisiable = newVal;
} else {
let that: any = this;
let params: any = {};
params.model = this.selectlist;
const put: Promise<any> = this.entityService.updateChooseApp(null,params);
this.rightDrawerVisiable = false;
setTimeout(() => {
that.leftDrawerVisiable = false;
}, 300);
}
}
/**
* 鼠标移入服务时显示右侧飘窗
*
* @returns
* @memberof ContextMenuDrag
*/
public showMenuDrawer() {
let that: any = this;
if(this.contextMenuDragVisiable){
setTimeout(() => {
that.rightDrawerVisiable = true;
}, 300);
}
}
/**
* 判断是否已选择该应用
*
* @returns
* @memberof ContextMenuDrag
*/
public isStar(id: any) {
let istar: boolean = false;
this.selectlist.forEach((item: any) => {
if (Object.is(item.id, id)) {
istar = true;
}
});
return istar;
}
/**
* 加入列表
*
* @returns
* @memberof ContextMenuDrag
*/
public onStar(item: any) {
item.visabled = 1;
this.selectlist.push(item);
}
/**
* 从列表中删除
*
* @returns
* @memberof ContextMenuDrag
*/
public outStar(item: any) {
item.visabled = 0;
let index: number = 0;
let that: any = this;
this.selectlist.forEach((select: any, index: number) => {
if (Object.is(item.id, select.id)) {
that.selectlist.splice(index,1);
}
});
}
/**
* 删除已选择应用
*
* @returns
* @memberof ContextMenuDrag
*/
removeAt(index: any) {
this.selectlist.splice(index, 1);
}
/**
* 拖拽列表排序
*/
sort() {
this.selectlist = this.selectlist.sort((a, b) => a.order - b.order);
}
/**
* 过滤已选择的应用
*
* @returns
* @memberof ContextMenuDrag
*/
listFilter() {
let that: any = this;
that.selectlist = [];
this.list.forEach((item: any) => {
if (item.visabled === 1) {
that.selectlist.push(item);
}
});
}
/**
* vue 生命周期
*
* @returns
* @memberof ContextMenuDrag
*/
mounted() {
let that: any = this;
const get: Promise<any> = this.entityService.getAllApp(null,{});
get
.then((response: any) => {
if (response) {
that.list = response.data.model;
that.listFilter();
}
});
}
}
</script>
<style lang='less'>
@import './context-menu-drag.less';
</style>
......@@ -6,6 +6,7 @@
:type="type"
v-model="CurrentVal"
:disabled="disabled ? true : false"
:autosize="autoSize"
@on-enter="enter"
></i-input>
<div class="unit-text">{{unit}}</div>
......@@ -62,6 +63,14 @@ export default class InputBox extends Vue {
*/
@Prop() public type?: string;
/**
* 多行文本行数
*
* @type {string}
* @memberof InputBox
*/
@Prop() public autoSize?: any;
/**
* 当前值
*
......
......@@ -247,12 +247,19 @@ export default class EditViewEngine extends ViewEngine {
*/
public setTabCaption(info: string): void {
let viewdata: any = this.view.model;
if (viewdata && info && !Object.is(info, '') && this.view.$tabPageExp && (viewdata.srfTitle.indexOf(" - ") === -1)) {
this.view.$tabPageExp.setCurPageCaption(viewdata.srfTitle, viewdata.srfTitle, info);
let index:number = viewdata.srfTitle.indexOf("-");
if (viewdata && info && !Object.is(info, '')) {
if(index !== -1){
viewdata.srfTitle = viewdata.srfTitle.substr(0,index);
}
if(this.view.$tabPageExp){
this.view.$tabPageExp.setCurPageCaption(viewdata.srfTitle, viewdata.srfTitle, info);
}
if(this.view.$route){
this.view.$route.meta.info = info;
}
this.view.model.srfTitle = `${this.view.$t(viewdata.srfTitle)} - ${viewdata.dataInfo}`;
this.view.model.srfTitle = `${this.view.$t(viewdata.srfTitle)}-${viewdata.dataInfo}`;
this.view.initNavData();
}
}
......
......@@ -367,6 +367,13 @@ export default class MDViewEngine extends ViewEngine {
* @memberof MDViewEngine
*/
public MDCtrlLoad(args: any[]) {
let cacheArray:Array<any> = [];
if(args.length >0){
args.forEach((item:any) =>{
cacheArray.push({srfkey:item.srfkey,srfmajortext:item.srfmajortext});
})
}
this.view.initNavData(cacheArray);
if (this.view) {
this.view.$emit('viewload', args);
}
......
......@@ -35,8 +35,49 @@ export interface NavDataElement {
*/
data:any;
/**
* 视图路径
*
* @memberof NavDataElement
*/
path:string;
/**
* 元素主键
*
* @memberof NavDataElement
*/
srfkey:string|null;
}
export interface ServiceState {
/**
* 行为
*
* @memberof ServiceState
*/
action: string;
/**
* 名称
*
* @memberof ServiceState
*/
name: any;
/**
* 数据
*
* @memberof ServiceState
*/
data: any;
}
import { Subject } from 'rxjs';
/**
* 导航数据服务
*
......@@ -45,6 +86,32 @@ export interface NavDataElement {
*/
export default class NavDataService {
/**
* 单例变量声明
*
* @private
* @static
* @type {NavDataService}
* @memberof NavDataService
*/
private static navDataService: NavDataService;
/**
* 缓存对象
*
* @private
* @type {(any)}
* @memberof NavDataService
*/
private static store: any;
/**
* 服务状态
*
* @memberof NavDataService
*/
public serviceState: Subject<ServiceState> = new Subject();
/**
* 导航数据栈
*
......@@ -69,6 +136,21 @@ export default class NavDataService {
this.initNavData();
}
/**
* 获取 NavDataService 单例对象
*
* @static
* @returns {NavDataService}
* @memberof NavDataService
*/
public static getInstance(store: any): NavDataService {
if (!NavDataService.navDataService) {
NavDataService.navDataService = new NavDataService();
}
this.store = store;
return this.navDataService;
}
/**
* 初始化基础导航数据
*
......@@ -102,6 +184,7 @@ export default class NavDataService {
this.sessionStore.setItem('srfnavdata',JSON.stringify(this.navDataStack));
return curNavData;
}
this.serviceState.next({action:'datarefresh',name:null,data:this.navDataStack});
}
/**
......@@ -123,7 +206,7 @@ export default class NavDataService {
}
/**
* 从导航数据栈中删除指定数据
* 从导航数据栈中删除指定数据上层数据
*
* @memberof NavDataService
*/
......@@ -132,7 +215,12 @@ export default class NavDataService {
let tempIndex:number = this.navDataStack.findIndex((element:NavDataElement) =>{
return Object.is(element.id,id);
})
let removeNavData = this.navDataStack.splice(tempIndex);
let removeNavData = this.navDataStack.splice(tempIndex+1);
if(removeNavData && removeNavData.length >0){
removeNavData.forEach((navData:any) =>{
NavDataService.store.commit("deletePage", navData.path);
})
}
this.sessionStore.setItem('srfnavdata',JSON.stringify(this.navDataStack));
return removeNavData;
}else{
......@@ -181,4 +269,22 @@ export default class NavDataService {
this.navDataStack = [];
this.sessionStore.setItem('srfnavdata',JSON.stringify(this.navDataStack));
}
/**
* 从导航数据栈中获取数据
*
* @memberof NavDataService
*/
public getNavData(){
if(this.navDataStack && this.navDataStack.length >0){
this.navDataStack.forEach((item:any,index) =>{
if(item && item.data && this.navDataStack[index+1]){
this.navDataStack[index+1] = Object.assign(this.navDataStack[index+1],{isselected:true});
}
})
return this.navDataStack;
}else{
return [];
}
}
}
\ No newline at end of file
......@@ -909,4 +909,26 @@ export default class EntityService {
return Http.getInstance().post(`/${this.APPDENAME}/${data[this.APPDEKEY]}/testuserexistworklist`,requestData,isloading);
}
/**
* 获取所有应用数据
*
* @param context
* @param data
* @param isloading
*/
public async getAllApp(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`uaa/access-center/app-switcher/default`,data,isloading);
}
/**
* 更新已选择的应用
*
* @param context
* @param data
* @param isloading
*/
public async updateChooseApp(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().put(`uaa/access-center/app-switcher/default`,data,isloading);
}
}
\ No newline at end of file
......@@ -62,10 +62,23 @@
border-top-color: #909399;
}
// tab分页模式首页布局
.index_tab_content{
.view-container {
height: calc(100% - 65px);
margin: 0px 12px;
}
}
// 面包屑模式首页布局
.index_route_content{
.view-container {
height: calc(100% - 36px);
margin: 12px;
}
}
.view-container {
height: calc(100% - 65px);
padding: 0 12px;
margin: 0px 12px;
background: white;
box-shadow: 0 2px 4px 0 rgba(0,0,0,.12), 0 0 6px 0 rgba(0,0,0,.04);
// flex-direction: column;
......@@ -237,12 +250,6 @@
}
}
// 清除看板里视图的阴影
.dashboard .portlet .view-container{
-webkit-box-shadow: none ;
box-shadow: none;
}
/*** END:多数据视图属性布局 ***/
// 看板视图,卡片模式
......
......@@ -4,29 +4,6 @@
.app-theme-icon {
color: #6ba1d1;
}
/* .el-menu.el-menu--horizontal {
> .el-menu-item, > .el-submenu > .el-submenu__title {
background: #2d5f8b;
color: #6ba1d1;
i {
color: #6ba1d1;
}
}
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
background-color: #4276a4;
color: #f1f1f1;
i {
color: #f1f1f1;
}
}
> .el-menu-item:hover, > .el-submenu:hover > .el-submenu__title {
background-color: #3c6c95;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
} */
}
> .ivu-layout {
......@@ -34,7 +11,12 @@
background-color: #4276a4;
.sider-top {
color: hsla(0,0%,100%,.8);
background: #2d5f8b;
background-color: #4276a4;
>.page-logo{
>.menuicon:hover{
background-color: #2d5f8b;
}
}
}
}
}
......
......@@ -3,30 +3,7 @@
> .ivu-layout-has-sider > .ivu-layout > header{
.app-theme-icon {
color: #606d80;
}/*
.el-menu.el-menu--horizontal {
> .el-menu-item, > .el-submenu > .el-submenu__title {
background: #20222A;
color: #606d80;
i {
color: #606d80;
}
}
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
background-color: #20222A;
color: #f1f1f1;
i {
color: #f1f1f1;
}
}
> .el-menu-item:hover, > .el-submenu:hover > .el-submenu__title {
background-color: #3e4b5c;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
} */
}
}
> .ivu-layout {
> .ivu-layout-sider {
......@@ -34,6 +11,11 @@
.sider-top {
color: hsla(0,0%,100%,.8);
background-color: #20222A;
>.page-logo{
>.menuicon:hover{
background-color:#060708;
}
}
}
}
}
......
......@@ -4,38 +4,18 @@
.app-theme-icon {
color: #aaaaaa;
}
/* .el-menu.el-menu--horizontal {
> .el-menu-item, > .el-submenu > .el-submenu__title {
background: #e1e1e1;
color: #aaaaaa;
i {
color: #aaaaaa;
}
}
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
background-color: #f6f6f6;
color: #666666;
i {
color: #666666;
}
}
> .el-menu-item:hover, > .el-submenu:hover > .el-submenu__title {
background-color: #e9e9e9;
color: #666666 !important;
i {
color: #666666;
}
}
} */
}
> .ivu-layout {
> .ivu-layout-sider {
background-color: #f6f6f6;
.sider-top {
background-color: #e8eaec;
.ivu-icon {
color: #aaaaaa;
}
background-color: #f6f6f6;
>.page-logo{
>.menuicon:hover{
background-color: #fff;
color:#000;
}
}
}
}
}
......
......@@ -99,15 +99,17 @@ export class ViewTool {
let routePath: string = '';
let [arg] = args;
arg = arg ? arg : {};
deResParameters.forEach(({ pathName, parameterName }: { pathName: string, parameterName: string }) => {
let value:any = null;
if (viewParam[parameterName] && !Object.is(viewParam[parameterName], '') && !Object.is(viewParam[parameterName], 'null')) {
value = viewParam[parameterName];
} else if (arg[parameterName] && !Object.is(arg[parameterName], '') && !Object.is(arg[parameterName], 'null')) {
value = arg[parameterName];
}
routePath = `${routePath}/${pathName}/${value}`;
});
if(deResParameters && deResParameters.length >0){
deResParameters.forEach(({ pathName, parameterName }: { pathName: string, parameterName: string }) => {
let value:any = null;
if (viewParam[parameterName] && !Object.is(viewParam[parameterName], '') && !Object.is(viewParam[parameterName], 'null')) {
value = viewParam[parameterName];
} else if (arg[parameterName] && !Object.is(arg[parameterName], '') && !Object.is(arg[parameterName], 'null')) {
value = arg[parameterName];
}
routePath = `${routePath}/${pathName}/${value}`;
});
}
return routePath;
}
......@@ -124,21 +126,23 @@ export class ViewTool {
public static getActiveRoutePath(parameters: any[], args: any[], data: any): string {
let routePath: string = '';
// 不存在应用实体
if (parameters.length === 1) {
const [{ pathName, parameterName }] = parameters;
routePath = `/${pathName}`;
if (Object.keys(data).length > 0) {
routePath = `${routePath}?${qs.stringify(data, { delimiter: ';' })}`;
}
} else if (parameters.length === 2) {
let [arg] = args;
arg = arg ? arg : {};
const [{ pathName: _pathName, parameterName: _parameterName }, { pathName: _pathName2, parameterName: _parameterName2 }] = parameters;
const _value: any = arg[_parameterName] && !Object.is(arg[_parameterName], '') ?
arg[_parameterName] : null;
routePath = `/${_pathName}/${_value}/${_pathName2}`;
if (Object.keys(data).length > 0) {
routePath = `${routePath}?${qs.stringify(data, { delimiter: ';' })}`;
if(parameters && parameters.length >0){
if (parameters.length === 1) {
const [{ pathName, parameterName }] = parameters;
routePath = `/${pathName}`;
if (Object.keys(data).length > 0) {
routePath = `${routePath}?${qs.stringify(data, { delimiter: ';' })}`;
}
} else if (parameters.length === 2) {
let [arg] = args;
arg = arg ? arg : {};
const [{ pathName: _pathName, parameterName: _parameterName }, { pathName: _pathName2, parameterName: _parameterName2 }] = parameters;
const _value: any = arg[_parameterName] && !Object.is(arg[_parameterName], '') ?
arg[_parameterName] : null;
routePath = `/${_pathName}/${_value}/${_pathName2}`;
if (Object.keys(data).length > 0) {
routePath = `${routePath}?${qs.stringify(data, { delimiter: ';' })}`;
}
}
}
return routePath;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册