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

Merge branch 'dev'

上级 8ffa8311
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<div class="app-actionbar"> <div class="app-actionbar">
<div class="app-actionbar-item" v-for="(item,index) in items" :key="index"> <div class="app-actionbar-item" v-for="(item,index) in items" :key="index">
<Badge v-if="item.counterService&&item.counterService.counterData" v-show="item.visabled" :count="item.counterService.counterData[item.counterId]" type="primary"> <Badge v-if="item.counterService&&item.counterService.counterData" v-show="item.visabled" :count="item.counterService.counterData[item.counterId]" type="primary">
<i-button :style="{'pointer-events':item.disabled?'none':'auto'}" @click="handleClick(item.viewlogicname)"><i v-if="item.icon" style="margin-right: 5px;" :class="item.icon"></i>{{item.actionName}}</i-button> <i-button :style="{'pointer-events':item.disabled?'none':'auto'}" @click="handleClick(item, $event)"><i v-if="item.icon" style="margin-right: 5px;" :class="item.icon"></i>{{item.actionName}}</i-button>
</Badge> </Badge>
<i-button v-show="item.visabled" :style="{'pointer-events':item.disabled?'none':'auto'}" v-else @click="handleClick(item.viewlogicname)">{{item.actionName}}</i-button> <i-button v-show="item.visabled" :style="{'pointer-events':item.disabled?'none':'auto'}" v-else @click="handleClick(item, $event)">{{item.actionName}}</i-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -49,6 +49,14 @@ export default class AppActionBar extends Vue { ...@@ -49,6 +49,14 @@ export default class AppActionBar extends Vue {
*/ */
public viewStateEvent: Subscription | undefined; public viewStateEvent: Subscription | undefined;
/**
* 部件数据
*
* @type {*}
* @memberof AppActionBar
*/
public data: any;
/** /**
* 组件初始化 * 组件初始化
* *
...@@ -61,6 +69,7 @@ export default class AppActionBar extends Vue { ...@@ -61,6 +69,7 @@ export default class AppActionBar extends Vue {
return; return;
} }
if(Object.is(action,'loadmodel')){ if(Object.is(action,'loadmodel')){
this.data = data;
this.calcActionItemAuthState(data,this.items,this.uiService); this.calcActionItemAuthState(data,this.items,this.uiService);
} }
}); });
...@@ -72,8 +81,13 @@ export default class AppActionBar extends Vue { ...@@ -72,8 +81,13 @@ export default class AppActionBar extends Vue {
* *
* @memberof AppActionBar * @memberof AppActionBar
*/ */
public handleClick($event:any){ public handleClick(item: any, $event:any){
this.$emit('itemClick',$event); let _data = {
tag : item.viewlogicname,
params : this.data,
event : $event
};
this.$emit('itemClick',_data);
} }
/** /**
......
...@@ -30,6 +30,22 @@ export default class AppColumnLink extends Vue { ...@@ -30,6 +30,22 @@ export default class AppColumnLink extends Vue {
*/ */
@Prop() public linkview?: any; @Prop() public linkview?: any;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof AppColumnLink
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppColumnLink
*/
@Prop() public localParam!:any;
/** /**
* 值项名称 * 值项名称
* *
...@@ -281,6 +297,15 @@ export default class AppColumnLink extends Vue { ...@@ -281,6 +297,15 @@ export default class AppColumnLink extends Vue {
// 合并表单参数 // 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {}; arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {}; arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
return true; return true;
} }
......
...@@ -6,12 +6,16 @@ ...@@ -6,12 +6,16 @@
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
:viewDefaultUsage="false" :viewDefaultUsage="false"
@viewdataschange="setValue(args)" @viewdataschange="setValue($event)"
style="height:100%;"> style="height:100%;">
</component> </component>
</div> </div>
<template v-if="placeholder"> <template v-if="placeholder">
<div v-if="value" class="app-embed-value">{{value}}</div> <div v-if="value" class="app-embed-value">
<span v-for="(item,index) in value" :key="index">
{{item}}
</span>
</div>
<div v-else class="app-embed-placeholder">{{placeholder}}</div> <div v-else class="app-embed-placeholder">{{placeholder}}</div>
</template> </template>
</div> </div>
...@@ -174,8 +178,8 @@ export default class AppEmbedPicker extends Vue { ...@@ -174,8 +178,8 @@ export default class AppEmbedPicker extends Vue {
} }
let arg: any = {}; let arg: any = {};
// 合并视图上下文参数和视图参数 // 合并视图上下文参数和视图参数
let param: any = JSON.parse(JSON.stringify(this.viewparams)); arg.param = JSON.parse(JSON.stringify(this.viewparams));
let context: any = JSON.parse(JSON.stringify(this.context)); arg.context = JSON.parse(JSON.stringify(this.context));
// 附加参数处理 // 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) { if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext); let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
...@@ -185,8 +189,8 @@ export default class AppEmbedPicker extends Vue { ...@@ -185,8 +189,8 @@ export default class AppEmbedPicker extends Vue {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam); let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param); Object.assign(arg.param,_param);
} }
this.viewdata = JSON.stringify(context); this.viewdata = JSON.stringify(arg.context);
this.viewparam = JSON.stringify(param); this.viewparam = JSON.stringify(arg.param);
} }
/** /**
...@@ -243,11 +247,21 @@ export default class AppEmbedPicker extends Vue { ...@@ -243,11 +247,21 @@ export default class AppEmbedPicker extends Vue {
* @memberof AppEmbedPicker * @memberof AppEmbedPicker
*/ */
public setValue(item: any) { public setValue(item: any) {
if (this.valueItem) { let selectsrfkey: Array<any> = [];
this.$emit('formitemvaluechange', { name: this.valueItem, value: item[0].srfkey }); let selectsrfmajortext: Array<any> = [];
} if(item && Array.isArray(item)){
if (this.name) { item.forEach((select: any)=>{
this.$emit('formitemvaluechange', { name: this.name, value: item[0].srfmajortext }); selectsrfkey.push(select.srfkey);
selectsrfmajortext.push(select.srfmajortext);
})
if (this.valueItem) {
let value = selectsrfkey.length > 0 ? selectsrfkey : '';
this.$emit('formitemvaluechange', { name: this.valueItem, value: value });
}
if (this.name) {
let value = selectsrfmajortext.length > 0 ? selectsrfmajortext : '';
this.$emit('formitemvaluechange', { name: this.name, value: value });
}
} }
} }
......
...@@ -291,6 +291,7 @@ export default class AppFormDRUIPart extends Vue { ...@@ -291,6 +291,7 @@ export default class AppFormDRUIPart extends Vue {
let _param:any = this.$util.computedNavData(formData,tempContext,this.viewparams,this.localParam); let _param:any = this.$util.computedNavData(formData,tempContext,this.viewparams,this.localParam);
Object.assign(tempParam,_param); Object.assign(tempParam,_param);
} }
if(this.viewparams.hasOwnProperty('copymode')) Object.assign(tempParam,{copymode:this.viewparams.copymode});
this.viewparam = JSON.stringify(tempParam); this.viewparam = JSON.stringify(tempParam);
if (this.isRelationalData) { if (this.isRelationalData) {
// 从数据模式无遮罩层 // 从数据模式无遮罩层
......
<template> <template>
<dropdown trigger='click' @on-click="selectLang"> <dropdown v-if="localList.length > 1" trigger='click' @on-click="selectLang">
<span> <span>
{{title}} {{title}}
<icon size='18' type='md-arrow-dropdown'></icon> <icon size='18' type='md-arrow-dropdown'></icon>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-menu-item"> <div class="app-menu-item">
<template v-for="item in menus"> <template v-for="item in menus">
<template v-if="item.items && Array.isArray(item.items) && item.items.length > 0"> <template v-if="item.items && Array.isArray(item.items) && item.items.length > 0">
<el-submenu :class="{'isCollpase' : appMenuCollapseFlag}" v-show="!item.hidden" :index="item.name" :popper-class="popperClass" :key="item.id"> <el-submenu :class="[{'isCollpase' : appMenuCollapseFlag},item.textcls]" v-show="!item.hidden" :index="item.name" :popper-class="popperClass" :key="item.id">
<template slot='title'> <template slot='title'>
<template v-if="item.icon && item.icon != ''"> <template v-if="item.icon && item.icon != ''">
<img :src="item.icon" class='app-menu-icon' /> <img :src="item.icon" class='app-menu-icon' />
...@@ -20,21 +20,21 @@ ...@@ -20,21 +20,21 @@
</template> </template>
<template v-else> <template v-else>
<template v-if="item.type =='MENUITEM'"> <template v-if="item.type =='MENUITEM'">
<el-menu-item :class="{'isFirst' : isFirst}" v-show="!item.hidden" :index="item.name" :key="item.id"> <el-menu-item :class="[{'isFirst' : isFirst},item.textcls]" v-show="!item.hidden" :index="item.name" :key="item.id">
<template v-if="item.icon && item.icon != ''"> <template v-if="item.icon && item.icon != ''">
<img :src="item.icon" class='app-menu-icon' /> <img :src="item.icon" class='app-menu-icon' />
<span v-if="isCollapse" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> <span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
</template> </template>
<template v-else-if="item.iconcls && item.iconcls != ''"> <template v-else-if="item.iconcls && item.iconcls != ''">
<i :class="[item.iconcls, 'app-menu-icon']"></i> <i :class="[item.iconcls, 'app-menu-icon']"></i>
<span v-if="isCollapse" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> <span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
</template> </template>
<template v-else> <template v-else>
<i v-if="isFirst" class='fa fa-cogs app-menu-icon'></i> <i v-if="isFirst" class='fa fa-cogs app-menu-icon'></i>
<span v-if="isCollapse" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> <span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
</template> </template>
<template slot="title"> <template slot="title">
<span ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> <span :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
<template v-if="counterdata && counterdata[item.counterid] && counterdata[item.counterid] > 0"> <template v-if="counterdata && counterdata[item.counterid] && counterdata[item.counterid] > 0">
<span class="pull-right"> <span class="pull-right">
<badge :count="counterdata[item.counterid]" :overflow-count="9999"></badge> <badge :count="counterdata[item.counterid]" :overflow-count="9999"></badge>
......
...@@ -65,14 +65,36 @@ export default class AppOrgSector extends Vue { ...@@ -65,14 +65,36 @@ export default class AppOrgSector extends Vue {
* @memberof AppOrgSector * @memberof AppOrgSector
*/ */
public mounted() { public mounted() {
this.getData();
}
/**
* 获取数据
*
* @memberof AppOrgSector
*/
public getData(){
if (this.$store.getters.getAppData()) { if (this.$store.getters.getAppData()) {
if (this.$store.getters.getAppData().context && this.$store.getters.getAppData().context.srforgsectorid && this.$store.getters.getAppData().context.srforgsectorname) { let _context = this.$store.getters.getAppData().context;
let _srforgname = this.$store.getters.getAppData().context.srforgname;
let _srforgsectorname = this.$store.getters.getAppData().context.srforgsectorname;
if (_context && this.$store.getters.getAppData().context.srforgsectorid ){
this.selectedOrgId = this.$store.getters.getAppData().context.srforgsectorid; this.selectedOrgId = this.$store.getters.getAppData().context.srforgsectorid;
this.selectedOrgName = this.$store.getters.getAppData().context.srforgsectorname; } else {
return false;
}
if(_context && _srforgname && _srforgsectorname){
this.selectedOrgName = _srforgname + '-' + _srforgsectorname;
} else if (_context && _srforgname) {
this.selectedOrgName = _srforgname;
} else if (_context && _srforgsectorname) {
this.selectedOrgName = _srforgsectorname;
} }
if (this.$store.getters.getAppData().srforgsections) { if (this.$store.getters.getAppData().srforgsections) {
this.selectedOrgArray = this.$store.getters.getAppData().srforgsections; this.selectedOrgArray = this.$store.getters.getAppData().srforgsections;
} }
} }
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
width: 100%; width: 100%;
} }
.ivu-input-number-input{ .ivu-input-number-input{
text-align: right; text-align: left;
} }
.ivu-input-number-input:hover{ .ivu-input-number-input:hover{
padding-right:22px; padding-right:22px;
......
...@@ -203,6 +203,7 @@ export default class EntityService { ...@@ -203,6 +203,7 @@ export default class EntityService {
if(context.srfsessionkey && !Object.is(this.tempStorage.getItem(context.srfsessionkey+'_'+this.APPDENAME),'undefined')){ if(context.srfsessionkey && !Object.is(this.tempStorage.getItem(context.srfsessionkey+'_'+this.APPDENAME),'undefined')){
let tempData:any = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_'+this.APPDENAME) as any); let tempData:any = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_'+this.APPDENAME) as any);
data.srffrontuf = "0"; data.srffrontuf = "0";
data[this.APPDEKEY] = null;
tempData.push(data); tempData.push(data);
this.tempStorage.setItem(context.srfsessionkey+'_'+this.APPDENAME,JSON.stringify(tempData)); this.tempStorage.setItem(context.srfsessionkey+'_'+this.APPDENAME,JSON.stringify(tempData));
return {"status":200,"data":data}; return {"status":200,"data":data};
......
...@@ -52,7 +52,7 @@ export class UIActionTool { ...@@ -52,7 +52,7 @@ export class UIActionTool {
return; return;
} }
let value: string | null = _params[name]; let value: string | null = _params[name];
if (value && value.startsWith('%') && value.endsWith('%')) { if (value && typeof(value) === 'string' && value.startsWith('%') && value.endsWith('%')) {
const key = value.substring(1, value.length - 1); const key = value.substring(1, value.length - 1);
if (arg && arg.hasOwnProperty(key)) { if (arg && arg.hasOwnProperty(key)) {
value = (arg[key] !== null && arg[key] !== undefined) ? arg[key] : null; value = (arg[key] !== null && arg[key] !== undefined) ? arg[key] : null;
...@@ -76,7 +76,7 @@ export class UIActionTool { ...@@ -76,7 +76,7 @@ export class UIActionTool {
} }
let value: string | null = _params[name]; let value: string | null = _params[name];
let values: any[] = []; let values: any[] = [];
if (value && value.startsWith('%') && value.endsWith('%')) { if (value && typeof(value) === 'string' && value.startsWith('%') && value.endsWith('%')) {
const key = value.substring(1, value.length - 1); const key = value.substring(1, value.length - 1);
args.forEach((arg: any) => { args.forEach((arg: any) => {
if (arg && arg.hasOwnProperty(key)) { if (arg && arg.hasOwnProperty(key)) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册