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

Merge branch 'dev'

上级 4f36c24a
## v7.0.0-alpha.7 [2020-6-11]
### Bug修复
数值代码表多语言
树右键菜单滚动条样式bug
列表面板界面行为bug
多选视图界面逻辑修复
图表刷新bug修复
日历部件选中抛出数据逻辑调整
编辑视图,app-span显示0时不显示
树视图右键界面行为刷新bug
快捷菜单控制台报错bug
门户加载自定义模型错误时,正常显示默认看板
修复雷达图显示异常问题
修复编辑类、分页导航视图带数据标题问题
修复饼图、漏斗图 获取序列参数错误问题
多选视图高度异常bug
### 功能新增及优化
#### 模板
看板和门户布局模板调整,支持门户部件标题栏界面行为组
支持数据选择、地址框、自动完成、下拉列表、标签、选项框列表、单选列表等编辑器导航参数调整
支持树导航栏、表格导航栏、列表导航栏、卡片导航栏、日历导航栏、表单关系界面、数据选择面板、分页导航面板、数据关系栏、界面行为、新建逻辑、编辑逻辑导航参数调整
支持图表无数据时显示暂无数据
支持表格新建默认值
支持日历部件右键菜单
支持表格列触发界面行为
面板布局调整
添加头部菜单
#### 基础文件
门户部件视图的样式
数据选择,地址框,自动完成,下拉列表,标签,选项框列表,单选列表等编辑器导航参数调整
表单项label位置
调整登录页面
穿梭框编辑器支持
添加头部菜单
## v7.0.0-alpha.6 [2020-6-5]
### Bug修复
......@@ -233,6 +301,9 @@ uaa菜单权限
代码表多选控件分割符从分号转化为逗号
支持表格列最小宽度和操作列样式支持
支持列表项、面板代码表转化
#### 基础文件
......
......@@ -61,7 +61,7 @@ import AppOrgSector from './components/app-orgsector/app-orgsector.vue'
import AppBuild from './components/app-build/app-build.vue'
import AppStudioAction from './components/app-studioaction/app-studioaction.vue'
import AppDebugActions from './components/app-debug-actions/app-debug-actions.vue'
import AppHeaderMenus from './components/app-header-menus/app-header-menus.vue'
import AppTopMenus from './components/app-top-menus/app-top-menus.vue'
import AppColumnLink from './components/app-column-link/app-column-link.vue'
import AppDataUploadView from './components/app-data-upload/app-data-upload.vue'
import DropDownListDynamic from './components/dropdown-list-dynamic/dropdown-list-dynamic.vue'
......@@ -77,6 +77,7 @@ import IBizGroupSelect from './components/ibiz-group-select/ibiz-group-select.vu
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 AppTransfer from './components/app-transfer/app-transfer.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
......@@ -147,7 +148,7 @@ export const AppComponents = {
v.component('app-build', AppBuild);
v.component('app-studioaction', AppStudioAction);
v.component('app-debug-actions', AppDebugActions);
v.component('app-header-menus', AppHeaderMenus);
v.component('app-top-menus', AppTopMenus);
v.component('app-column-link', AppColumnLink);
v.component('app-data-upload', AppDataUploadView);
v.component('dropdown-list-dynamic', DropDownListDynamic);
......@@ -163,5 +164,6 @@ export const AppComponents = {
v.component('ibiz-group-picker',IBizGroupPicker);
v.component('app-wf-approval',AppWFApproval);
v.component('app-breadcrumb',Breadcrumb);
v.component('app-transfer',AppTransfer);
},
};
\ No newline at end of file
......@@ -100,12 +100,20 @@ export default class AppAutocomplete extends Vue {
@Prop() public name!: string;
/**
* 编辑器参数
*
* @type {string}
* 局部上下文导航参数
*
* @type {any}
* @memberof AppAutocomplete
*/
@Prop() public itemParam?: any;
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppAutocomplete
*/
@Prop() public localParam!:any;
/**
* 值项名称
......@@ -119,7 +127,7 @@ export default class AppAutocomplete extends Vue {
* 值
*
* @type {*}
* @memberof AppPicker
* @memberof AppAutocomplete
*/
@Model('change') public value?: any;
......@@ -127,7 +135,7 @@ export default class AppAutocomplete extends Vue {
* 当前值
*
* @type {string}
* @memberof AppPicker
* @memberof AppAutocomplete
*/
public curvalue: string = '';
......@@ -160,7 +168,7 @@ export default class AppAutocomplete extends Vue {
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppPicker
* @memberof AppAutocomplete
*/
@Watch('value')
public onValueChange(newVal: any, oldVal: any) {
......@@ -277,19 +285,19 @@ export default class AppAutocomplete extends Vue {
*/
public handlePublicParams(arg: any): boolean {
if (!this.data) {
this.$Notice.error({ title: (this.$t('components.appPicker.error') as any), desc: (this.$t('components.appPicker.formdataException') as any) });
this.$Notice.error({ title: (this.$t('components.AppAutocomplete.error') as any), desc: (this.$t('components.AppAutocomplete.formdataException') as any) });
return false;
}
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.itemParam && this.itemParam.context) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.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.itemParam && this.itemParam.param) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
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;
......
......@@ -9,7 +9,7 @@
:key="item.path"
>
<span
v-if="item.redirect === 'noredirect' || index === breadcrumbs.length-1"
v-if="index === breadcrumbs.length-1"
class="no-redirect"
>{{ $t(item.meta.caption) }}</span>
<a
......@@ -22,64 +22,57 @@
</template>
<script lang="ts">
import { compile } from 'path-to-regexp'
import { Component, Vue, Watch, Prop } from 'vue-property-decorator'
import { RouteRecord, Route } from 'vue-router'
@Component({
name: 'Breadcrumb'
})
export default class extends Vue {
private breadcrumbs: RouteRecord[] = []
export default class Breadcrumb extends Vue {
private breadcrumbs: RouteRecord[] = []; //面包屑列表
@Prop() public defPSAppView?: any;
@Prop() public defPSAppView: any; //默认视图
/**
* 监听路由
*
* @memberof Breadcrumb
*/
@Watch('$route')
private onRouteChange(route: Route) {
// if you go to the redirect page, do not update the breadcrumbs
if (route.path.startsWith('/redirect/')) {
return
}
this.getBreadcrumb()
}
/**
* vue 生命周期
*
* @memberof Breadcrumb
*/
created() {
this.getBreadcrumb()
}
/**
* 获取面包屑数据
*
* @memberof Breadcrumb
*/
private getBreadcrumb() {
let matched = this.$route.matched.filter((item) => item.meta && item.meta.caption)
const first = matched[0]
if (!this.isDashboard(first)) {
matched = [{ path: "/index/:index?", meta: {
caption: 'app.views.index.caption',
viewType: 'APPINDEX',
parameters: [
{ pathName: 'index', parameterName: 'index' },
],
requireAuth: true, } } as RouteRecord].concat(matched)
}
this.breadcrumbs = matched.filter((item) => {
return item.meta && item.meta.caption && item.meta.breadcrumb !== false
})
}
private isDashboard(route: RouteRecord) {
const name = route && route.meta.parameters[0].pathName;
if (!name) {
return false
this.breadcrumbs = this.$route.matched.filter((item) => {
return item.meta && item.meta.caption
})
if(this.defPSAppView){
/**如果配置了默认视图,给面包屑第一级赋值默认视图为首页 */
}
return name.trim().toLocaleLowerCase() === 'index'.toLocaleLowerCase()
}
private pathCompile(item: any) {
const { params, path, query } = item;
return { params, path, query };
}
/**
* 单机面包屑
*
* @memberof Breadcrumb
*/
private handleLink(item: any) {
this.$router.push(this.pathCompile(item)).catch(err => {
this.$router.push(item).catch(err => {
console.warn(err);
});
}
......
......@@ -57,23 +57,31 @@ export default class AppCheckBox extends Vue {
* 传入表单数据
*
* @type {*}
* @memberof DropDownList
* @memberof AppCheckBox
*/
@Prop() public data?: any;
/**
* 传入额外参数
*
* @type {*}
* @memberof DropDownList
* 局部上下文导航参数
*
* @type {any}
* @memberof AppCheckBox
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppCheckBox
*/
@Prop() public itemParam?: any;
@Prop() public localParam!:any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
* @memberof AppCheckBox
*/
@Prop() public context!: any;
......@@ -81,7 +89,7 @@ export default class AppCheckBox extends Vue {
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
* @memberof AppCheckBox
*/
@Prop() public viewparams!: any;
......@@ -203,19 +211,19 @@ export default class AppCheckBox extends Vue {
*
* @param {*} arg
* @returns
* @memberof DropDownList
* @memberof AppCheckBox
*/
public handlePublicParams(arg: any) {
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.itemParam && this.itemParam.context) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.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.itemParam && this.itemParam.param) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
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);
}
}
......@@ -253,7 +261,7 @@ export default class AppCheckBox extends Vue {
/**
* 监听表单数据变化
*
* @memberof AppOrgSelect
* @memberof AppCheckBox
*/
@Watch('data',{immediate:true,deep:true})
onDataChange(newVal: any, oldVal: any) {
......
......@@ -78,8 +78,8 @@ export default class AppDashboardDesignService {
const groups = this.prepareGroup(datas);
resolve({data: datas, result: list.reverse(), groups: groups});
}
}).catch((error: any) => {
console.log(error);
}).catch((response: any) => {
console.log(response);
});
});
}
......
......@@ -62,7 +62,7 @@ export default class AppEmbedPicker extends Vue {
* 表单数据
*
* @type {*}
* @memberof AppPicker
* @memberof AppEmbedPicker
*/
@Prop() public data!: any;
......@@ -95,7 +95,7 @@ export default class AppEmbedPicker extends Vue {
* 值项名称
*
* @type {string}
* @memberof AppPicker
* @memberof AppEmbedPicker
*/
@Prop() public valueItem?: string;
......@@ -103,7 +103,7 @@ export default class AppEmbedPicker extends Vue {
* 关联视图名称
*
* @type {string}
* @memberof AppPicker
* @memberof AppEmbedPicker
*/
@Prop() public refviewname?: string;
......@@ -127,17 +127,25 @@ export default class AppEmbedPicker extends Vue {
* 属性项名称
*
* @type {string}
* @memberof AppPicker
* @memberof AppEmbedPicker
*/
@Prop() public name!: string;
/**
* 关联视图参数
*
* @type {*}
* 局部上下文导航参数
*
* @type {any}
* @memberof AppEmbedPicker
*/
@Prop() public itemParam: any;
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppEmbedPicker
*/
@Prop() public localParam!:any;
/**
* 是否忽略之变化
......@@ -160,8 +168,8 @@ export default class AppEmbedPicker extends Vue {
*
* @memberof AppEmbedPicker
*/
public setViewParam(activeData: any) {
if (!this.itemParam || !activeData) {
public setViewParam() {
if (!this.data) {
return;
}
let arg: any = {};
......@@ -169,17 +177,13 @@ export default class AppEmbedPicker extends Vue {
let param: any = JSON.parse(JSON.stringify(this.viewparams));
let context: any = JSON.parse(JSON.stringify(this.context));
// 附加参数处理
if (this.itemParam.context) {
let _context = this.$util.formatData(activeData,context,this.itemParam.context);
Object.assign(context,_context);
}
if (this.itemParam.param) {
let _param = this.$util.formatData(activeData,param,this.itemParam.param);
Object.assign(param,_param);
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.itemParam.parentdata) {
let _parentdata = this.$util.formatData(activeData,param,this.itemParam.parentdata);
Object.assign(param,_parentdata);
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);
}
this.viewdata = JSON.stringify(context);
this.viewparam = JSON.stringify(param);
......@@ -196,7 +200,7 @@ export default class AppEmbedPicker extends Vue {
onActivedataChange(newVal: any, oldVal: any) {
const newFormData: any = JSON.parse(newVal);
const oldDormData: any = JSON.parse(oldVal);
this.setViewParam(newFormData);
this.setViewParam();
if (!this.refreshitems || this.ignorefieldvaluechange) {
return;
}
......@@ -215,7 +219,7 @@ export default class AppEmbedPicker extends Vue {
if(this.formState) {
this.formStateEvent = this.formState.subscribe(({ tag, action, data }) => {
if (Object.is('load', action)) {
this.setViewParam(JSON.parse(this.data));
this.setViewParam();
}
});
}
......
......@@ -3,7 +3,8 @@
<component
:is="viewname"
class="viewcontainer2"
:viewdata ="viewdata"
:viewdata ="viewdata"
:viewparam="viewparam"
:viewDefaultUsage="false"
:formDruipart="formDruipart"
:isformDruipart="true"
......@@ -119,6 +120,22 @@ export default class AppFormDRUIPart extends Vue {
*/
@Prop() public viewparams!: any;
/**
* 局部上下文
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public localContext!:any;
/**
* 局部参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public localParam!:any;
/**
* 应用实体参数名称
*
......@@ -240,21 +257,32 @@ export default class AppFormDRUIPart extends Vue {
}
const formData: any = data?data:JSON.parse(this.data);
const _paramitem = formData[this.paramItem];
let viewdata = {};
Object.assign(viewdata, this.$viewTool.getIndexViewParam());
let tempContext:any = {};
let tempParam:any = {};
Object.assign(tempContext, this.$viewTool.getIndexViewParam());
const _parameters: any[] = [...this.$viewTool.getIndexParameters(), ...this.parameters];
_parameters.forEach((parameter: any) => {
const { pathName, parameterName }: { pathName: string, parameterName: string } = parameter;
if (formData[parameterName] && !Object.is(formData[parameterName], '')) {
Object.assign(viewdata, { [parameterName]: formData[parameterName] });
Object.assign(tempContext, { [parameterName]: formData[parameterName] });
}
});
Object.assign(viewdata, { [this.paramItem]: _paramitem });
Object.assign(tempContext, { [this.paramItem]: _paramitem });
//设置顶层视图唯一标识
Object.assign(viewdata,this.context);
Object.assign(viewdata,{srfparentdename:this.parentName,srfparentkey:_paramitem});
this.viewdata = JSON.stringify(viewdata);
this.viewparam = JSON.stringify(this.viewparams);
Object.assign(tempContext,this.context);
Object.assign(tempContext,{srfparentdename:this.parentName,srfparentkey:_paramitem});
// 设置局部上下文
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData(formData,tempContext,this.viewparams,this.localContext);
Object.assign(tempContext,_context);
}
this.viewdata = JSON.stringify(tempContext);
// 设置局部参数
if(this.localParam && Object.keys(this.localParam).length >0){
let _param:any = this.$util.computedNavData(formData,tempContext,this.viewparams,this.localParam);
Object.assign(tempParam,_param);
}
this.viewparam = JSON.stringify(tempParam);
if (this.isRelationalData) {
if (!_paramitem || _paramitem == null || Object.is(_paramitem, '')) {
this.blockUIStart();
......
......@@ -16,4 +16,31 @@
display: inline-block;
padding: 0 0 10px;
}
}
.app-form-item-label-left{
.app-form-item-label{
float: left;
text-align: right;
padding-right: 12px;
}
}
.app-form-item-label-right{
.app-form-item-label{
float: right;
text-align: left;
padding-left: 12px;
}
}
.app-form-item-label-top{
.app-form-item-label{
display: block;
padding-bottom: 10px;
}
}
.app-form-item-label-bottom{
.app-form-item-label{
display: block;
padding-top: 10px;
}
}
\ No newline at end of file
......@@ -21,12 +21,16 @@
:error="error"
:required="required"
:rules="rules"
:class="classes"
:label-width="this.isShowCaption ? !Object.is(this.labelPos, 'TOP') ? this.labelWidth : null : 0">
<span slot='label' v-if="this.isShowCaption && this.labelWidth > 0" :class="labelclasses">
{{this.isEmptyCaption ? '' : this.caption}}
</span>
:class="classes">
<div v-if="Object.is(this.labelPos,'BOTTOM') || Object.is(this.labelPos,'NONE') || !this.labelPos" class="slot-editor" :style="slotstyle">
<slot></slot>
</div>
<span v-if="!Object.is(this.labelPos,'NONE') && this.isShowCaption && this.labelWidth > 0" :style="labelstyle" :class="labelclasses">
{{this.isEmptyCaption ? '' : this.caption}}
</span>
<div v-if="Object.is(this.labelPos,'TOP') || Object.is(this.labelPos,'LEFT') || Object.is(this.labelPos,'RIGHT')" class="slot-editor" :style="slotstyle">
<slot></slot>
</div>
</form-item>
</div>
</div>
......@@ -167,9 +171,27 @@ export default class AppFormItem extends Vue {
* @memberof AppFormItem
*/
get classes(): string[] {
let posClass = '';
switch (this.labelPos) {
case 'TOP':
posClass = 'app-form-item-label-top';
break;
case 'LEFT':
posClass = 'app-form-item-label-left';
break;
case 'BOTTOM':
posClass = 'app-form-item-label-bottom';
break;
case 'RIGHT':
posClass = 'app-form-item-label-right';
break;
case 'NONE':
posClass = 'app-form-item-label-none';
break;
}
return [
'app-form-item',
Object.is(this.labelPos, 'TOP') ? 'app-form-item-label-top' : ''
posClass
];
}
......@@ -181,7 +203,33 @@ export default class AppFormItem extends Vue {
* @memberof AppFormItem
*/
get labelclasses():string{
return this.labelStyle?this.labelStyle:'';
return this.labelStyle?this.labelStyle+' app-form-item-label':'app-form-item-label';
}
/**
* label行内样式
*
* @readonly
* @type {string}
* @memberof AppFormItem
*/
get labelstyle():any{
return {width:this.labelWidth+'px'};
}
/**
* slot行内样式
*
* @readonly
* @type {string}
* @memberof AppFormItem
*/
get slotstyle():any{
if(Object.is(this.labelPos,'LEFT')){
return {marginLeft:this.labelWidth+'px'};
}else if(Object.is(this.labelPos,'RIGHT')){
return {marginRight:this.labelWidth+'px'};
}
}
/**
......
......@@ -45,12 +45,20 @@ export default class AppMpicker extends Vue {
@Prop() curvalue?: any;
/**
* 表单项参数
* 局部上下文导航参数
*
* @type {any}
* @memberof AppPicker
* @memberof AppMpicker
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppMpicker
*/
@Prop() public itemParam: any;
@Prop() public localParam!:any;
/**
* 表单项名称
......@@ -61,7 +69,7 @@ export default class AppMpicker extends Vue {
* 视图上下文
*
* @type {*}
* @memberof AppFormDRUIPart
* @memberof AppMpicker
*/
@Prop() public context!: any;
......@@ -69,7 +77,7 @@ export default class AppMpicker extends Vue {
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
* @memberof AppMpicker
*/
@Prop() public viewparams!: any;
......@@ -77,7 +85,7 @@ export default class AppMpicker extends Vue {
* AC参数
*
* @type {*}
* @memberof AppFormDRUIPart
* @memberof AppMpicker
*/
@Prop({default: () => {}}) public acParams?: any;
......@@ -85,7 +93,7 @@ export default class AppMpicker extends Vue {
* 应用实体主信息属性名称
*
* @type {string}
* @memberof AppAutocomplete
* @memberof AppMpicker
*/
@Prop({default: 'srfmajortext'}) public deMajorField!: string;
......@@ -93,7 +101,7 @@ export default class AppMpicker extends Vue {
* 应用实体主键属性名称
*
* @type {string}
* @memberof AppAutocomplete
* @memberof AppMpicker
*/
@Prop({default: 'srfkey'}) public deKeyField!: string;
......@@ -101,7 +109,7 @@ export default class AppMpicker extends Vue {
* 表单服务
*
* @type {*}
* @memberof AppFormDRUIPart
* @memberof AppMpicker
*/
@Prop() public service?: any;
......@@ -242,19 +250,19 @@ export default class AppMpicker extends Vue {
*/
public handlePublicParams(arg: any): boolean {
if (!this.activeData) {
this.$Notice.error({ title: (this.$t('components.appPicker.error') as any), desc: (this.$t('components.appPicker.formdataException') as any) });
this.$Notice.error({ title: (this.$t('components.AppMpicker.error') as any), desc: (this.$t('components.AppMpicker.formdataException') as any) });
return false;
}
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.itemParam && this.itemParam.context) {
let _context = this.$util.formatData(this.activeData,arg.context,this.itemParam.context);
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.activeData,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.itemParam && this.itemParam.param) {
let _param = this.$util.formatData(this.activeData,arg.param,this.itemParam.param);
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.activeData,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
return true;
......
......@@ -153,12 +153,20 @@ export default class AppPicker extends Vue {
@Prop() public linkview?: any;
/**
* 表单项参数
* 局部上下文导航参数
*
* @type {any}
* @memberof AppPicker
*/
@Prop() public itemParam: any;
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppPicker
*/
@Prop() public localParam!:any;
/**
* 值项名称
......@@ -639,9 +647,6 @@ export default class AppPicker extends Vue {
* @memberof AppPicker
*/
public handlePublicParams(arg: any): boolean {
if (!this.itemParam) {
return true;
}
if (!this.data) {
this.$Notice.error({ title: (this.$t('components.appPicker.error') as any), desc: (this.$t('components.appPicker.formdataException') as any) });
return false;
......@@ -650,12 +655,12 @@ export default class AppPicker extends Vue {
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.itemParam && this.itemParam.context) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.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.itemParam && this.itemParam.param) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
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;
......
......@@ -65,14 +65,14 @@ export default class AppRadioGroup extends Vue {
* 传入表单数据
*
* @type {*}
* @memberof DropDownList
* @memberof AppRadioGroup
*/
@Prop() public data?: any;
/**
* 监听表单数据变化
*
* @memberof AppOrgSelect
* @memberof AppRadioGroup
*/
@Watch('data',{immediate:true,deep:true})
onDataChange(newVal: any, oldVal: any) {
......@@ -103,18 +103,26 @@ export default class AppRadioGroup extends Vue {
@Prop() public disabled?: boolean;
/**
* 传入额外参数
*
* @type {*}
* @memberof DropDownList
* 局部上下文导航参数
*
* @type {any}
* @memberof AppRadioGroup
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppRadioGroup
*/
@Prop() public itemParam?: any;
@Prop() public localParam!:any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
* @memberof AppRadioGroup
*/
@Prop() public context!: any;
......@@ -122,7 +130,7 @@ export default class AppRadioGroup extends Vue {
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
* @memberof AppRadioGroup
*/
@Prop() public viewparams!: any;
......@@ -161,19 +169,19 @@ export default class AppRadioGroup extends Vue {
*
* @param {*} arg
* @returns
* @memberof DropDownList
* @memberof AppRadioGroup
*/
public handlePublicParams(arg: any) {
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.itemParam && this.itemParam.context) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.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.itemParam && this.itemParam.param) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
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);
}
}
......
<template>
<codelist v-if="tag" :tag="tag" :value="value" :codelistType="codelistType" :renderMode="renderMode" :valueSeparator="valueSeparator" :textSeparator="textSeparator" :data="data" :itemParam="itemParam" :context="context" :viewparams="viewparams"></codelist>
<codelist v-if="tag" :tag="tag" :value="value" :codelistType="codelistType" :renderMode="renderMode" :valueSeparator="valueSeparator" :textSeparator="textSeparator" :data="data" :localContext="localContext" :localParam="localParam" :context="context" :viewparams="viewparams"></codelist>
<app-upload-file-info v-else-if="Object.is(this.editorType,'PICTURE') || Object.is(this.editorType,'PICTURE_ONE') || Object.is(this.editorType,'FILEUPLOADER')" :value="value" :name="name"></app-upload-file-info>
<span class="app-span" v-else >{{text}}</span>
</template>
......@@ -72,12 +72,20 @@ export default class AppSpan extends Vue {
@Prop() public data?: any;
/**
* 传入额外参数
*
* @type {*}
* 局部上下文导航参数
*
* @type {any}
* @memberof AppSpan
*/
@Prop() public itemParam?: any;
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppSpan
*/
@Prop() public localParam!:any;
/**
* 视图上下文
......@@ -137,9 +145,8 @@ export default class AppSpan extends Vue {
* @memberof AppSpan
*/
public load(){
if(!this.value || this.tag){
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;
......
.app-header-menus {
.app-top-menus {
display: flex;
align-items: center;
height: 100%;
line-height: 20px;
>.app-header-menu-item{
>.app-top-menu-item{
height: 24px;
display: flex;
align-items: center;
......@@ -13,13 +13,13 @@
cursor: pointer;
}
>.app-header-menu-item.icon {
>.app-top-menu-item.icon {
>.app-header-menu-item-icon {
>.app-top-menu-item-icon {
font-size: 20px;
}
>.app-header-menu-item-img {
>.app-top-menu-item-img {
height: 20px;
width: 20px;
......@@ -30,19 +30,19 @@
}
}
>.app-header-menu-item.icon:hover{
>.app-top-menu-item.icon:hover{
color: #68758e;
text-decoration: none;
}
>.app-header-menu-item.text {
>.app-top-menu-item.text {
border-radius: 4px;
border: 1px solid #8893a7;
text-align: center;
font-size: 12px;
padding: 2px 4px;
>.app-header-menu-item-icon {
>.app-top-menu-item-icon {
width: 20px;
height: 20px;
overflow: hidden;
......@@ -51,7 +51,7 @@
margin-top: -3px;
}
>.app-header-menu-item-img {
>.app-top-menu-item-img {
height: 16px;
width: 16px;
margin-right: 3px;
......@@ -63,11 +63,11 @@
}
}
>.app-header-menu-item.text:hover {
>.app-top-menu-item.text:hover {
color: #107fff;
border: 1px solid #107fff;
}
}
.app-header-menus:hover {
.app-top-menus:hover {
background: none !important;
}
\ No newline at end of file
<template>
<div class="app-header-menus">
<div v-for="(menu,index) in menus" :key="index" class="app-header-menu-item text" @click="openWindow(menu)">
<div class="app-header-menu-item-icon">
<div class="app-top-menus">
<div v-for="(menu,index) in menus" :key="index" class="app-top-menu-item text" @click="openWindow(menu)">
<div class="app-top-menu-item-icon">
<i :class="menu.iconcls" :aria-hidden="true" />
</div>
<div class="app-header-menu-item-text">{{$t(menu.title)}}</div>
<div class="app-top-menu-item-text">{{$t(menu.title)}}</div>
</div>
</div>
......@@ -17,13 +17,13 @@ import { Environment } from '@/environments/environment';
@Component({
})
export default class AppHeaderMenus extends Vue {
export default class AppTopMenus extends Vue {
/**
* 菜单数据
*
* @type {any}
* @memberof AppHeaderMenus
* @memberof AppTopMenus
*/
public menus:any = [
{
......@@ -55,7 +55,7 @@ export default class AppHeaderMenus extends Vue {
/**
* 触发界面行为
*
* @memberof AppHeaderMenus
* @memberof AppTopMenus
*/
public openWindow(menu:any){
window.open(menu.url, '_blank');
......@@ -66,5 +66,5 @@ export default class AppHeaderMenus extends Vue {
</script>
<style lang='less'>
@import "./app-header-menus.less";
@import "./app-top-menus.less";
</style>
\ No newline at end of file
.ivu-select-dropdown {
padding: 0px;
.hidden {
display: none;
}
}
\ No newline at end of file
<template>
<Select
@on-open-change="transferRefresh"
@on-change="dataChange"
v-model="dataRight"
:style="{width:width===undefined?'586px':width}"
multiple
>
<Option class="hidden" :value="item" v-for="(item,i) in dataRight" :key="i">{{findLabel(item)}}</Option>
<el-transfer v-model="dataRight" :data="dataLeft" @change="dataChange" :titles="['未选择', '已选择']"></el-transfer>
</Select>
</template>
<script lang="ts">
import { Vue, Component, Watch, Prop, Model } from "vue-property-decorator";
import CodeListService from "@service/app/codelist-service";
import { ElSelect } from "element-ui/types/select";
@Component({})
export default class AppTransfer extends Vue {
/**
* 左侧框数据
*/
public dataLeft: any[] = [];
/**
* 右侧框数据
*/
public dataRight: any[] = [];
/**
* 穿梭框宽度
*/
@Prop() public width: any;
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof AppTransfer
*/
public codeListService: CodeListService = new CodeListService({
$store: this.$store
});
/**
* 查询参数
* @type {*}
* @memberof AppTransfer
*/
public queryParam: any;
/**
* 表单传入字符串值分隔符
*/
@Prop() public valueSeparator!: string;
/**
* 当前选中值
* @type {any}
* @memberof AppTransfer
*/
@Model("change") public itemValue!: any;
/**
* 代码表标识
*
* @type {string}
* @memberof AppTransfer
*/
@Prop() public tag?: string;
/**
* 代码表类型
*
* @type {string}
* @memberof AppTransfer
*/
@Prop() public codelistType?: string;
/**
* 局部上下文导航参数
*
* @type {*}
* @memberof AppTransfer
*/
@Prop() public localContext!: any;
/**
* 局部导航参数
*
* @type {*}
* @memberof AppTransfer
*/
@Prop() public localParam!: any;
/**
* 组件change事件,右侧框数据变化时
* @memberof AppTransfer
*/
dataChange(e: any) {
let _valueSeparator: any;
_valueSeparator = this.initValueSeparator(_valueSeparator);
let newVal: any;
newVal = e.join(`${_valueSeparator}`);
if (newVal) {
this.$emit("change", newVal);
} else {
this.$emit("change", null);
}
}
/**
* 初始化valueSeparator
*/
public initValueSeparator(_valueSeparator: any) {
if (this.valueSeparator === undefined) {
return ",";
} else {
return this.valueSeparator;
}
}
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
/**
* 是否禁用
* @type {any}
* @memberof AppTransfer
*
*/
@Prop() public disabled?: any;
/**
* 是否支持过滤
* @type {boolean}
* @memberof AppTransfer
*/
@Prop() public filterable?: boolean;
/**
* 下拉选提示内容
* @type {string}
* @memberof AppTransfer
*/
@Prop() public placeholder?: string;
/**
* vue 生命周期
*
* @memberof AppTransfer
*/
public created() {
this.dataHandle();
}
/**
* 数据处理
*/
public dataHandle() {
if (this.tag && Object.is(this.codelistType, "STATIC")) {
const codelist = this.$store.getters.getCodeList(this.tag);
if (codelist) {
this.dataLeft = [...JSON.parse(JSON.stringify(codelist.items))];
this.initLeft();
this.initRight();
} else {
console.log(`----${this.tag}----代码表不存在`);
}
} else if (this.tag && Object.is(this.codelistType, "DYNAMIC")) {
// 处理公共参数
let data: any = {};
this.handlePublicParams(data);
// 参数处理
let _context = data.context;
let _param = data.param;
this.codeListService
.getItems(this.tag, _context, _param)
.then((res: any) => {
this.dataLeft = res;
this.initLeft();
this.initRight();
})
.catch((error: any) => {
console.log(`----${this.tag}----代码表不存在`);
});
}
}
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof AppTransfer
*/
public handlePublicParams(arg: any) {
// 合并表单参数
arg.param = this.viewparams
? JSON.parse(JSON.stringify(this.viewparams))
: {};
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.itemValue,
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.itemValue,
arg.context,
arg.param,
this.localParam
);
Object.assign(arg.param, _param);
}
}
/**
* 初始化左侧框数据
*/
public initLeft() {
let left: any[] = [];
Object.assign(left, this.dataLeft);
this.dataLeft = [];
left.forEach((elem: any, i: any) => {
this.dataLeft.push({
key: elem.id,
value: elem.value,
label: elem.text,
disabled: elem.disabled
});
});
}
/**
* 初始化右侧框数据
*/
public initRight() {
let _valueSeparator: any;
_valueSeparator = this.initValueSeparator(_valueSeparator);
let _data: any = this.itemValue;
if (_data) {
let _dataRight: any = [];
let newData: any[] = _data.split(`${_valueSeparator}`);
this.dataLeft.forEach((elem: any) => {
newData.forEach((item: any) => {
if (item === elem.value) {
_dataRight.push(elem.key);
}
});
});
this.dataRight = _dataRight;
}
}
/**
* 穿梭框打开时刷新数据
*/
public transferRefresh(e: any) {
if (e && this.codelistType === "DYNAMIC") {
this.dataLeft = [];
this.dataHandle();
}
}
/**
* 找到dataLeft中key与dataRight中item相等的元素,返回label
*/
public findLabel(item: any) {
for (const elem of this.dataLeft) {
if (elem.key === item) return elem.label;
}
}
}
</script>
<style lang='less'>
@import "./app-transfer.less";
</style>
\ No newline at end of file
......@@ -36,7 +36,7 @@ export default class AppTreePicker extends Vue {
* 视图上下文
*
* @type {*}
* @memberof AppFormDRUIPart
* @memberof AppTreePicker
*/
@Prop() public context!: any;
......@@ -44,7 +44,7 @@ export default class AppTreePicker extends Vue {
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
* @memberof AppTreePicker
*/
@Prop() public viewparams!: any;
......@@ -52,7 +52,7 @@ export default class AppTreePicker extends Vue {
* 表单数据
*
* @type {*}
* @memberof AppPicker
* @memberof AppTreePicker
*/
@Prop() public data!: any;
......@@ -68,7 +68,7 @@ export default class AppTreePicker extends Vue {
* 是否启用
*
* @type {boolean}
* @memberof AppPicker
* @memberof AppTreePicker
*/
@Prop({default: false}) public disabled!: boolean;
......@@ -101,7 +101,7 @@ export default class AppTreePicker extends Vue {
* 值项名称
*
* @type {string}
* @memberof AppPicker
* @memberof AppTreePicker
*/
@Prop() public valueItem?: string;
......@@ -109,7 +109,7 @@ export default class AppTreePicker extends Vue {
* 关联视图名称
*
* @type {string}
* @memberof AppPicker
* @memberof AppTreePicker
*/
@Prop() public refviewname?: string;
......@@ -125,17 +125,25 @@ export default class AppTreePicker extends Vue {
* 属性项名称
*
* @type {string}
* @memberof AppPicker
* @memberof AppTreePicker
*/
@Prop() public name!: string;
/**
* 关联视图参数
*
* @type {*}
* 局部上下文导航参数
*
* @type {any}
* @memberof AppTreePicker
*/
@Prop() public itemParam: any;
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppTreePicker
*/
@Prop() public localParam!:any;
/**
* 是否忽略之变化
......@@ -210,8 +218,8 @@ export default class AppTreePicker extends Vue {
*
* @memberof AppTreePicker
*/
public setViewParam(activeData: any) {
if (!this.itemParam || !activeData) {
public setViewParam() {
if (!this.data) {
return;
}
let arg: any = {};
......@@ -219,17 +227,13 @@ export default class AppTreePicker extends Vue {
let param: any = JSON.parse(JSON.stringify(this.viewparams));
let context: any = JSON.parse(JSON.stringify(this.context));
// 附加参数处理
if (this.itemParam.context) {
let _context = this.$util.formatData(activeData,context,this.itemParam.context);
Object.assign(context,_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.itemParam.param) {
let _param = this.$util.formatData(activeData,param,this.itemParam.param);
Object.assign(param,_param);
}
if (this.itemParam.parentdata) {
let _parentdata = this.$util.formatData(activeData,param,this.itemParam.parentdata);
Object.assign(param,_parentdata);
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);
}
this.viewdata = JSON.stringify(context);
this.viewparam = JSON.stringify(param);
......@@ -240,13 +244,13 @@ export default class AppTreePicker extends Vue {
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppFormDRUIPart
* @memberof AppTreePicker
*/
@Watch('data')
onActivedataChange(newVal: any, oldVal: any) {
const newFormData: any = JSON.parse(newVal);
const oldDormData: any = JSON.parse(oldVal);
this.setViewParam(newFormData);
this.setViewParam();
if (!this.refreshitems || this.ignorefieldvaluechange) {
return;
}
......@@ -261,7 +265,7 @@ export default class AppTreePicker extends Vue {
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppPicker
* @memberof AppTreePicker
*/
@Watch('value')
public onValueChange(newVal: any, oldVal: any) {
......@@ -277,7 +281,7 @@ export default class AppTreePicker extends Vue {
if(this.formState) {
this.formStateEvent = this.formState.subscribe(({ tag, action, data }) => {
if (Object.is('load', action)) {
this.setViewParam(JSON.parse(this.data));
this.setViewParam();
}
});
}
......@@ -286,7 +290,7 @@ export default class AppTreePicker extends Vue {
/**
* vue 生命周期
*
* @memberof SelectType
* @memberof AppTreePicker
*/
public destroyed() {
if (this.formStateEvent) {
......
......@@ -86,6 +86,9 @@ export default class AppUser extends Vue {
if (response && response.status === 200) {
localStorage.removeItem('user');
localStorage.removeItem('token');
let leftTime = new Date();
leftTime.setTime(leftTime.getSeconds() - 1);
document.cookie = "ibzuaa-token=;expires=" + leftTime.toUTCString();
this.$router.push({ name: 'login' });
}
}).catch((error: any) =>{
......
......@@ -79,12 +79,20 @@ export default class CodeList extends Vue {
@Prop() public data?: any;
/**
* 传入额外参数
*
* @type {*}
* 局部上下文导航参数
*
* @type {any}
* @memberof CodeList
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof CodeList
*/
@Prop() public itemParam?: any;
@Prop() public localParam!:any;
/**
* 视图上下文
......@@ -270,12 +278,12 @@ export default class CodeList extends Vue {
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.itemParam && this.itemParam.context) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.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.itemParam && this.itemParam.param) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
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);
}
}
......
......@@ -12,6 +12,11 @@
position: absolute;
background: #FFF;
// border: 1px solid #e3e3e3;
.tree-right-menu{
.ivu-select-dropdown{
overflow: auto;
}
}
.ivu-divider{
width: 100%;
}
......
......@@ -86,12 +86,20 @@ export default class DropDownListDynamic extends Vue {
}
/**
* 传入额外参数
* 局部上下文导航参数
*
* @type {*}
* @memberof DropDownListDynamic
* @memberof DropDownList
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {*}
* @memberof DropDownList
*/
@Prop() public itemParam?: any;
@Prop() public localParam!:any;
/**
* 是否禁用
......@@ -172,12 +180,12 @@ export default class DropDownListDynamic extends Vue {
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.itemParam.context) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.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.itemParam.param) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.context,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
}
......
......@@ -85,12 +85,20 @@ export default class DropDownListMpicker extends Vue {
@Prop() public placeholder?: string;
/**
* 传入额外参数
*
* @type {*}
* 局部上下文导航参数
*
* @type {any}
* @memberof DropDownListMpicker
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof DropDownListMpicker
*/
@Prop() public itemParam?: any;
@Prop() public localParam!:any;
/**
* 视图上下文
......@@ -157,12 +165,12 @@ export default class DropDownListMpicker extends Vue {
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.itemParam.context) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.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.itemParam.param) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
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);
}
}
......
......@@ -86,12 +86,20 @@ export default class DropDownList extends Vue {
}
/**
* 传入额外参数
* 局部上下文导航参数
*
* @type {*}
* @memberof DropDownList
*/
@Prop() public itemParam?: any;
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {*}
* @memberof DropDownList
*/
@Prop() public localParam!:any;
/**
* 视图上下文
......@@ -108,7 +116,7 @@ export default class DropDownList extends Vue {
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
/**
* 是否禁用
* @type {any}
......@@ -172,12 +180,12 @@ export default class DropDownList extends Vue {
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.itemParam && this.itemParam.context) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.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.itemParam && this.itemParam.param) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.context,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
}
......
......@@ -10,6 +10,7 @@
<div class='form-con'>
<i-form ref='loginForm' :rules="rules" :model="form">
<form-item prop='loginname'>
<p>用户名</p>
<i-input
size='large'
prefix='ios-contact'
......@@ -19,6 +20,7 @@
</i-input>
</form-item>
<form-item prop='password'>
<p>密码</p>
<i-input
size='large'
prefix='ios-key'
......@@ -270,5 +272,5 @@ export default class Login extends Vue {
</script>
<style lang='less'>
@import './login.less';
@import './login.less';
</style>
\ No newline at end of file
// .ibiz-page-tag {
// position: relative;
// box-sizing: border-box;
// // width: calc(100% + 30px);
// height: 38px;
// padding: 0 60px 0 30px;
// background: #f6f6f6;
// .tags-body {
// position: relative;
// width: 100%;
// height: 100%;
// overflow: hidden;
// .tags-container {
// position: absolute;
// overflow: visible;
// white-space: nowrap;
// transition: left .3s ease;
// .ivu-tag {
// margin: 0;
// height: 38px;
// line-height: 38px;
// border: 0;
// border-radius: 0;
// border-right: 1px solid #ddd;
// font-size: 14px;
// .text-icon {
// height: 16px;
// margin-bottom: -3px;
// }
// .ivu-icon-ios-close {
// visibility: hidden;
// }
// .tag-text {
// display: table-cell;
// .ivu-tooltip {
// display: block;
// .ivu-tooltip-rel {
// display: block;
// max-width: 200px;
// overflow: hidden;
// text-overflow: ellipsis;
// }
// }
// }
// }
// .ivu-tag.tag-is-active {
// background: #fff;
// }
// .ivu-tag:hover,.ivu-tag.tag-is-active {
// .ivu-icon-ios-close {
// visibility: initial;
// }
// }
// }
// }
// .move-btn {
// font-size: 18px;
// width: 30px;
// height: 38px;
// line-height: 38px;
// border-left: 1px solid #ddd;
// border-right: 1px solid #ddd;
// text-align: center;
// cursor: pointer;
// }
// .move-btn:hover {
// background: #efefef;
// }
// .move-left, .move-right, .ivu-dropdown{
// position: absolute;
// top: 0;
// }
// .move-left {
// left: 0;
// }
// .move-right {
// right: 30px;
// }
// .ivu-dropdown {
// right: 0;
// }
// }
// .tags-transition-move {
// transition: transform .3s;
// }
// .tags-transition-enter,.tags-transition-leave-to{
// opacity: 0;
// }
.ibiz-page-tag {
position: relative;
box-sizing: border-box;
// width: calc(100% + 30px);
height: 38px;
padding: 0 60px 0 30px;
background: #f6f6f6;
.tags-body {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
.tags-container {
position: absolute;
overflow: visible;
white-space: nowrap;
transition: left .3s ease;
.ivu-tag {
margin: 0;
height: 38px;
line-height: 38px;
border: 0;
border-radius: 0;
border-right: 1px solid #ddd;
font-size: 14px;
.text-icon {
height: 16px;
margin-bottom: -3px;
}
.ivu-icon-ios-close {
visibility: hidden;
}
.tag-text {
display: table-cell;
.ivu-tooltip {
display: block;
.ivu-tooltip-rel {
display: block;
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
}
}
.left{
.el-tabs__header{
padding-right:120px;
}
}
.right{
position: absolute;
right:0px;
top:0px;
width:120px;
margin:5px 0px;
display: flex;
justify-content: center;
}
>.tag-tabs{
background-color: #F0F0F0 !important;
.el-tabs{
.el-tabs__nav{
padding:0px 10px;
border:none;
}
.el-tabs__active-bar{
background-color: transparent !important;
}
.el-tabs__item{
height: 32px;
line-height: 32px;
border: 1px solid #e8eaec!important;
color: #515a6e!important;
background: #fff!important;
padding: 0 12px;
display: inline-block;
margin: 4px 4px 4px 0;
border-radius: 3px;
font-size: 12px;
vertical-align: middle;
opacity: 1;
overflow: hidden;
.ivu-tag-dot-inner{
display: inline-block;
width: 12px;
height: 12px;
margin-right: 8px;
border-radius: 50%;
background: #e8eaec;
position: relative;
top: 1px;
}
}
.ivu-tag.tag-is-active {
background: #fff;
.el-tabs__item:hover{
color:#409eff;
}
.ivu-tag:hover,.ivu-tag.tag-is-active {
.ivu-icon-ios-close {
visibility: initial;
.is-active{
color:#409eff;
.ivu-tag-dot-inner{
background-color:#409eff !important;
}
border-bottom:2px solid transparent !important;
}
.el-tabs__header{
margin:0 0 1 0;
}
}
}
.move-btn {
font-size: 18px;
width: 30px;
height: 38px;
line-height: 38px;
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
text-align: center;
cursor: pointer;
}
.move-btn:hover {
background: #efefef;
}
.move-left, .move-right, .ivu-dropdown{
position: absolute;
top: 0;
}
.move-left {
left: 0;
}
.move-right {
right: 30px;
}
.ivu-dropdown {
right: 0;
}
}
.tags-transition-move {
transition: transform .3s;
}
.tags-transition-enter,.tags-transition-leave-to{
opacity: 0;
}
\ No newline at end of file
......@@ -101,7 +101,7 @@ export default class EditViewEngine extends ViewEngine {
* @memberof EditViewEngine
*/
public onFormLoad(arg: any): void {
this.view.model.dataInfo = Object.is(arg.srfuf, '1') ? arg.srfmajortext : '新建';
this.view.model.dataInfo = Object.is(arg.srfuf, '1') ? (this.majorPSDEField?arg[this.majorPSDEField]:arg.srfmajortext) : this.view.$t('app.local.new');
this.setTabCaption(this.view.model.dataInfo);
const newdata: boolean = !Object.is(arg.srfuf, '1');
......@@ -115,7 +115,7 @@ export default class EditViewEngine extends ViewEngine {
* @memberof EditViewEngine
*/
public onFormSave(arg: any): void {
this.view.model.dataInfo = Object.is(arg.srfuf, '1') ? arg.srfmajortext : '新建';
this.view.model.dataInfo = Object.is(arg.srfuf, '1') ? (this.majorPSDEField?arg[this.majorPSDEField]:arg.srfmajortext) : this.view.$t('app.local.new');
this.setTabCaption(this.view.model.dataInfo);
const newdata: boolean = !Object.is(arg.srfuf, '1');
......@@ -248,7 +248,10 @@ 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.srfCaption, viewdata.srfTitle, info);
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}`;
}
}
......
......@@ -89,6 +89,7 @@ export default class EditView2Engine extends EditViewEngine {
*/
public onFormLoad(arg: any = {}): void {
super.onFormLoad(arg);
this.view.formData = arg;
if (this.getDRBar()) {
const tag = this.getDRBar().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.vieparams });
......@@ -103,6 +104,7 @@ export default class EditView2Engine extends EditViewEngine {
*/
public onFormSave(arg: any = {}): void {
super.onFormSave(arg);
this.view.formData = arg;
if (this.getDRBar()) {
const tag = this.getDRBar().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.viewparams });
......
......@@ -89,6 +89,7 @@ export default class EditView3Engine extends EditViewEngine {
*/
public onFormLoad(arg: any = {}): void {
super.onFormLoad(arg);
this.view.formData = arg;
if (this.getDrTab()) {
const tag = this.getDrTab().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.viewparams });
......@@ -103,6 +104,7 @@ export default class EditView3Engine extends EditViewEngine {
*/
public onFormSave(arg: any = {}): void {
super.onFormSave(arg);
this.view.formData = arg;
if (this.getDrTab()) {
const tag = this.getDrTab().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.viewparams });
......
import DataViewEngine from './data-view-engine';
/**
* 视图引擎基础
*
* @export
* @class DataViewEngine
* @extends {MDViewEngine}
*/
export default class KanBanViewEngine extends DataViewEngine {
/**
* 表格部件
*
* @type {*}
* @memberof DataViewEngine
*/
protected kanban: any;
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof DataViewEngine
*/
public init(options: any = {}): void {
this.kanban = options.kanban;
super.init(options);
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof DataViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'kanban')) {
this.MDCtrlEvent(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof DataViewEngine
*/
public getMDCtrl(): any {
return this.kanban;
}
}
\ No newline at end of file
......@@ -9,4 +9,5 @@ declare module '@fullcalendar/list';
declare module '@fullcalendar/interaction';
declare module '@fullcalendar/core/locales-all';
declare module 'vue-grid-layout';
declare module 'vue-print-nb';
\ No newline at end of file
declare module 'vue-print-nb';
declare module 'vuedraggable';
\ No newline at end of file
/*** BRGIN:默认蓝色主题 ***/
.app_theme_blue {
> header {
background-color: #2d5f8b;
color: #6ba1d1;
> .ivu-layout-has-sider > .ivu-layout > header{
.app-theme-icon {
color: #6ba1d1;
}
.page-logo {
color: #fff;
}
.header-right {
> div:hover {
background: #3774aa;
}
}
.el-menu.el-menu--horizontal {
/* .el-menu.el-menu--horizontal {
> .el-menu-item, > .el-submenu > .el-submenu__title {
background: #2d5f8b;
color: #6ba1d1;
......@@ -36,40 +26,41 @@
color: #f1f1f1;
}
}
}
} */
}
> .ivu-layout {
> .ivu-layout-sider {
background-color: #4276a4;
.sider-top {
.ivu-icon {
background: #2d5f8b;
color: #6ba1d1;
}
}
.app-menu {
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
border-left: 4px solid #d64635;
}
}
> .ivu-layout-sider {
background-color: #4276a4;
.sider-top {
color: hsla(0,0%,100%,.8);
background: #2d5f8b;
}
}
}
> .el-menu , > .ivu-layout > .ivu-layout-sider .app-app-menu > .app-menu {
background: #4276a4;
.el-menu-item:hover, .el-menu-item.is-active {
.el-menu-item:hover, .el-menu-item:hover {
background: #3c6c95 !important;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
.el-submenu_title:hover{
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
.el-menu-item.is-active{
border-left: 4px solid #d64635;
background: #3c6c95 !important;
}
.el-submenu.is-opened, .el-submenu:hover, .el-submenu.is-active {
> .el-submenu__title {
background: #3c6c95 !important;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
background: #4276a4;
}
}
.el-submenu__title, .el-menu-item {
......@@ -78,9 +69,16 @@
color: #c9dff5;
}
}
.el-submenu__title:hover{
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
.el-menu-item {
border-top: 1px solid #4276a4;
background: #4276a4;
border-left: 4px solid transparent;
}
.el-submenu {
border-top: 1px solid #4276a4;
......@@ -97,5 +95,11 @@
.ivu-menu-submenu-title{
color: #f5f5f5;
}
.sider-top{
color:#fff;
}
div.ivu-divider{
background-color: #c9dff5;
}
}
/*** END:默认蓝色主题 ***/
\ No newline at end of file
/*** BRGIN:默认Dark Blue主题 ***/
.app_theme_darkblue {
> header {
background-color: #2b3643;
color: #606d80;
.app-theme-icon {
color: #606d80;
}
.page-logo {
color: #fff;
}
.header-right {
> div:hover {
background: #3b4a5c;
}
}
.el-menu.el-menu--horizontal {
> .el-menu-item, > .el-submenu > .el-submenu__title {
background: #2b3643;
color: #606d80;
i {
color: #606d80;
}
}
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
background-color: #364150;
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-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 {
background-color: #20222A;
.sider-top {
color: hsla(0,0%,100%,.8);
background-color: #20222A;
}
}
}
> .el-menu , > .ivu-layout > .ivu-layout-sider .app-app-menu > .app-menu {
background: #20222A;
.el-menu-item:hover, .el-menu-item:hover {
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
.el-submenu__title:hover{
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
.el-menu-item.is-active{
border-left: 4px solid #409EFF;
background: #060708 !important;
color:white;
}
.el-submenu.is-opened, .el-submenu:hover, .el-submenu.is-active {
> .el-submenu__title {
background: #20222A;
}
}
.el-submenu__title, .el-menu-item {
color: #b4bcc8;
i {
color: #b4bcc8;
}
}
.el-menu-item {
border-top: 1px solid #20222A;
background: #20222A;
border-left: 4px solid transparent;
}
.el-submenu {
border-top: 1px solid #20222A;
background: #20222A;
> .el-menu {
border-top: 1px solid #20222A;
background: #20222A;
}
}
}
.ivu-menu-light{
background: #20222A;
}
.ivu-menu-submenu-title{
color: #fff;
}
.sider-top{
color:#fff;
}
div.ivu-divider{
background-color: #b4bcc8;
}
}
> .ivu-layout {
> .ivu-layout-sider {
background-color: #364150;
.sider-top {
.ivu-icon {
background: #2b3643;
color: #606d80;
}
}
.app-menu {
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
border-left: 4px solid #1caf9a;
}
}
}
}
> .el-menu , > .ivu-layout > .ivu-layout-sider .app-app-menu > .app-menu {
background: #364150;
.el-menu-item:hover, .el-menu-item.is-active {
background: #3e4b5c !important;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
.el-submenu.is-opened, .el-submenu:hover, .el-submenu.is-active {
> .el-submenu__title {
background: #3e4b5c !important;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
}
.el-submenu__title, .el-menu-item {
color: #b4bcc8;
i {
color: #b4bcc8;
}
}
.el-menu-item {
border-top: 1px solid #364150;
background: #364150;
}
.el-submenu {
border-top: 1px solid #364150;
background: #364150;
> .el-menu {
border-top: 1px solid #364150;
background: #364150;
}
}
}
.ivu-menu-light{
background: #364150;
}
.ivu-menu-submenu-title{
color: #fff;
}
}
/*** END:默认Dark Blue主题 ***/
\ No newline at end of file
/*** END:默认Dark Blue主题 ***/
\ No newline at end of file
/*** BRGIN:默认亮色主题 ***/
.app-default-theme {
> header {
background-color: #e8eaec;
color: #aaaaaa;
.app-theme-icon {
color: #aaaaaa;
}
.page-logo {
color: #535c70;
}
.header-right {
> div:hover {
background: #d4d4d4;
}
}
.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 {
.ivu-icon {
background: #f6f6f6;
color: #aaaaaa;
}
}
.app-menu {
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
border-left: 4px solid #1890ff;
}
}
}
}
> .el-menu , > .ivu-layout > .ivu-layout-sider .app-app-menu > .app-menu {
background: #f6f6f6;
.el-menu-item:hover, .el-menu-item.is-active {
> .ivu-layout-has-sider > .ivu-layout > header {
.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;
}
}
}
}
> .el-menu , > .ivu-layout > .ivu-layout-sider .app-app-menu > .app-menu {
background: #f6f6f6;
.el-menu-item:hover, .el-menu-item:hover,.el-menu-item.is-active {
background: #fff !important;
color: #1890ff !important;
i {
color: #1890ff;
}
}
.el-submenu__title:hover{
color: #1890ff !important;
i {
color: #1890ff;
}
}
.el-menu-item.is-active{
border-left: 4px solid #1890ff;
background: #fff !important;
color: #1890ff !important;
i {
color: #1890ff;
}
}
.el-submenu.is-opened, .el-submenu:hover, .el-submenu.is-active {
> .el-submenu__title {
background: #fff !important;
color: #1890ff !important;
i {
color: #1890ff;
}
}
}
.el-submenu__title, .el-menu-item {
color: #666666;
i {
color: #666666;
}
}
.el-menu-item {
border-top: 1px solid #f6f6f6;
background: #f6f6f6;
}
.el-submenu {
border-top: 1px solid #f6f6f6;
background: #f6f6f6;
> .el-menu {
border-top: 1px solid #f6f6f6;
background: #f6f6f6;
}
}
}
.ivu-menu-light{
background: #f6f6f6;
}
.ivu-menu-submenu-title{
color: #000;
}
.el-submenu.is-opened, .el-submenu:hover{
> .el-submenu__title {
background: #f6f6f6;
}
}
.el-submenu__title, .el-menu-item {
color: #666666;
i {
color: #666666;
}
}
.el-menu-item {
border-top: 1px solid #f6f6f6;
background: #f6f6f6;
border-left: 4px solid transparent;
}
.el-submenu {
border-top: 1px solid #f6f6f6;
background: #f6f6f6;
> .el-menu {
border-top: 1px solid #f6f6f6;
background: #f6f6f6;
}
}
}
.ivu-menu-light{
background: #f6f6f6;
}
.ivu-menu-submenu-title{
color: #000;
}
.sider-top{
color:#000;
}
div.ivu-divider{
background-color: #b3b3b3;
}
}
}
/*** END:默认亮色主题 ***/
\ No newline at end of file
/*** END:默认亮色主题 ***/
\ No newline at end of file
......@@ -7,24 +7,28 @@ import Vue, { VNode, CreateElement } from "vue";
* @interface UIActionTool
*/
export declare interface UIActionTool {
/**
* 处理应用上下文参数
*
* @param actionTarget 数据目标
* @param args 传入数据对象
* @param parentContext 父上下文
* @param parentParams 父参数
* @param param 传入应用上下数据参数
*/
handleContextParam(actionTarget:any,args:any,context:any):any;
handleContextParam(actionTarget: any, args: any,parentContext:any,parentParams:any, context: any):any;
/**
* 处理界面行为参数
*
* @param actionTarget 数据目标
* @param args 传入数据对象
* @param parentContext 父上下文
* @param parentParams 父参数
* @param param 传入界面行为附加参数
*/
handleActionParam(actionTarget:any,args:any,params:any):any;
handleActionParam(actionTarget: any, args: any,parentContext:any,parentParams:any, params: any):any;
}
declare module "vue/types/vue" {
......
......@@ -130,6 +130,20 @@ export declare interface Util {
*/
formatData(arg: any,parent:any, params: any): any ;
/**
* 计算导航数据
* 先从当前数据目标计算,然后再从当前上下文计算,最后从当前视图参数计算,没有则为null
*
* @static
* @param {any} data 表单数据
* @param {any} parentContext 外层context
* @param {any} parentParam 外层param
* @param {any} params 附加参数
* @returns {any}
* @memberof Util
*/
computedNavData(data:any,parentContext:any,parentParam:any,params:any):any;
/**
* 日期格式化
*
......
......@@ -8,10 +8,12 @@ export class UIActionTool {
*
* @param actionTarget 数据目标
* @param args 传入数据对象
* @param parentContext 父上下文
* @param parentParams 父参数
* @param param 传入应用上下数据参数
*/
public static handleContextParam(actionTarget: any, args: any, context: any) {
return this.formatData(actionTarget, args, context);
public static handleContextParam(actionTarget: any, args: any,parentContext:any,parentParams:any, context: any) {
return this.formatData(actionTarget, args,parentContext,parentParams,context);
}
/**
......@@ -19,10 +21,12 @@ export class UIActionTool {
*
* @param actionTarget 数据目标
* @param args 传入数据对象
* @param parentContext 父上下文
* @param parentParams 父参数
* @param param 传入界面行为附加参数
*/
public static handleActionParam(actionTarget: any, args: any, params: any) {
return this.formatData(actionTarget, args, params);
public static handleActionParam(actionTarget: any, args: any,parentContext:any,parentParams:any, params: any) {
return this.formatData(actionTarget, args,parentContext,parentParams,params);
}
/**
......@@ -32,13 +36,15 @@ export class UIActionTool {
* @static
* @param {*} actionTarget
* @param {*} args
* @param parentContext
* @param parentParams
* @param {*} _params
* @returns {*}
* @memberof UIActionTool
*/
private static formatData(actionTarget: any, args: any, _params: any): any {
private static formatData(actionTarget: any, args: any,parentContext:any,parentParams:any, _params: any): any {
let _data: any = {};
if (Object.is(actionTarget, 'SINGLEKEY')) {
if (Object.is(actionTarget, 'SINGLEKEY') || Object.is(actionTarget, 'NONE')) {
let [arg] = args;
Object.keys(_params).forEach((name: string) => {
let hasProperty = true;
......@@ -50,12 +56,16 @@ export class UIActionTool {
const key = value.substring(1, value.length - 1);
if (arg && arg.hasOwnProperty(key)) {
value = (arg[key] !== null && arg[key] !== undefined) ? arg[key] : null;
} else {
} else if(parentContext && parentContext.hasOwnProperty(key)){
value = (parentContext[key] !== null && parentContext[key] !== undefined) ? parentContext[key] : null;
}else if(parentParams && parentParams.hasOwnProperty(key)){
value = (parentParams[key] !== null && parentParams[key] !== undefined) ? parentParams[key] : null;
}else {
hasProperty = false;
}
}
if(hasProperty){
Object.assign(_data, { [name]: value });
Object.assign(_data, { [name.toLowerCase()]: value });
}
});
} else if (Object.is(actionTarget, 'MULTIKEY')) {
......@@ -71,7 +81,11 @@ export class UIActionTool {
args.forEach((arg: any) => {
if (arg && arg.hasOwnProperty(key)) {
value = (arg[key] !== null && arg[key] !== undefined) ? arg[key] : null;
} else {
}else if(parentContext && parentContext.hasOwnProperty(key)){
value = (parentContext[key] !== null && parentContext[key] !== undefined) ? parentContext[key] : null;
}else if(parentParams && parentParams.hasOwnProperty(key)){
value = (parentParams[key] !== null && parentParams[key] !== undefined) ? parentParams[key] : null;
}else {
value = null;
noPropertyNum++;
}
......@@ -79,7 +93,7 @@ export class UIActionTool {
});
}
if(values.length !== noPropertyNum){
Object.assign(_data, { [name]: values.length > 0 ? values.join(',') : value });
Object.assign(_data, { [name.toLowerCase()]: values.length > 0 ? values.join(',') : value });
}
});
}
......
......@@ -324,6 +324,44 @@ export class Util {
return _data;
}
/**
* 计算导航数据
* 先从当前数据目标计算,然后再从当前上下文计算,最后从当前视图参数计算,没有则为null
*
* @static
* @param {any} data 表单数据
* @param {any} parentContext 外层context
* @param {any} parentParam 外层param
* @param {any} params 附加参数
* @returns {any}
* @memberof Util
*/
public static computedNavData(data:any,parentContext:any,parentParam:any,params:any):any{
let _data: any = {};
if(params && Object.keys(params).length >0){
Object.keys(params).forEach((name: string) => {
if (!name) {
return;
}
let value: string | null = params[name];
if (value && value.startsWith('%') && value.endsWith('%')) {
const key = value.substring(1, value.length - 1).toLowerCase();
if (data && data.hasOwnProperty(key)) {
value = data[key];
}else if(parentContext && parentContext[key]){
value = parentContext[key];
}else if(parentParam && parentParam[key]){
value = parentParam[key];
} else {
value = null;
}
}
Object.assign(_data, { [name.toLowerCase()]: value });
});
}
return _data;
}
/**
* 日期格式化
*
......
......@@ -128,7 +128,7 @@ export class ViewTool {
const [{ pathName, parameterName }] = parameters;
routePath = `/${pathName}`;
if (Object.keys(data).length > 0) {
routePath = `${routePath}/${qs.stringify(data, { delimiter: ';' })}`;
routePath = `${routePath}?${qs.stringify(data, { delimiter: ';' })}`;
}
} else if (parameters.length === 2) {
let [arg] = args;
......@@ -138,7 +138,7 @@ export class ViewTool {
arg[_parameterName] : null;
routePath = `/${_pathName}/${_value}/${_pathName2}`;
if (Object.keys(data).length > 0) {
routePath = `${routePath}/${qs.stringify(data, { delimiter: ';' })}`;
routePath = `${routePath}?${qs.stringify(data, { delimiter: ';' })}`;
}
}
return routePath;
......
......@@ -5181,10 +5181,10 @@ human-signals@^1.1.1:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
ibiz-gantt-elastic@^1.0.15:
version "1.0.15"
resolved "https://registry.yarnpkg.com/ibiz-gantt-elastic/-/ibiz-gantt-elastic-1.0.15.tgz#e57736254aaf5baea28225bce2d29d8bd8adcc2d"
integrity sha512-V3uLoN3BN32BagpV1kLm4nFSs4neJ/Cnykd7OIyLv11rjqTWFAENHBpZekioPFF4k2iCyAdRr5smzZbGJdSQxg==
ibiz-gantt-elastic@^1.0.16:
version "1.0.16"
resolved "https://registry.npm.taobao.org/ibiz-gantt-elastic/download/ibiz-gantt-elastic-1.0.16.tgz#e2de7e8d4bdb3c292cfbc97c4f970c8ecfe6c43b"
integrity sha1-4t5+jUvbPCks+8l8T5cMjs/mxDs=
dependencies:
dayjs "^1.8.16"
resize-observer-polyfill "^1.5.1"
......@@ -5192,10 +5192,10 @@ ibiz-gantt-elastic@^1.0.15:
vue-slider-component "^3.0.40"
vue-switches "^2.0.1"
ibiz-vue-lib@^0.1.9:
version "0.1.9"
resolved "https://registry.yarnpkg.com/ibiz-vue-lib/-/ibiz-vue-lib-0.1.9.tgz#d7088deb5577af3095887ca897c1710bae174682"
integrity sha512-CotV3xIB04+QUUeMlfsVj5BseVPQ+IHyKdwU+MXGh+2e91Nt7N/z/LElakhAiGkSpaaKoMdlKCOdhD0qqJ3wNQ==
ibiz-vue-lib@^0.1.10:
version "0.1.10"
resolved "https://registry.npm.taobao.org/ibiz-vue-lib/download/ibiz-vue-lib-0.1.10.tgz#660f6f7fb73b5c63e3daa0921faf13c0cdc96de5"
integrity sha1-Zg9vf7c7XGPj2qCSH68TwM3JbeU=
dependencies:
axios "^0.19.2"
core-js "^3.6.4"
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册