提交 efaed01f 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码

上级 190e80c9
...@@ -77,6 +77,7 @@ import IBizGroupSelect from './components/ibiz-group-select/ibiz-group-select.vu ...@@ -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 IBizGroupPicker from './components/ibiz-group-picker/ibiz-group-picker.vue'
import AppWFApproval from './components/app-wf-approval/app-wf-approval.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'
// 全局挂载UI实体服务注册中心 // 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister; window['uiServiceRegister'] = uiServiceRegister;
...@@ -163,5 +164,6 @@ export const AppComponents = { ...@@ -163,5 +164,6 @@ export const AppComponents = {
v.component('ibiz-group-picker',IBizGroupPicker); v.component('ibiz-group-picker',IBizGroupPicker);
v.component('app-wf-approval',AppWFApproval); v.component('app-wf-approval',AppWFApproval);
v.component('app-breadcrumb',Breadcrumb); 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 { ...@@ -100,12 +100,20 @@ export default class AppAutocomplete extends Vue {
@Prop() public name!: string; @Prop() public name!: string;
/** /**
* 编辑器参数 * 局部上下文导航参数
* *
* @type {string} * @type {any}
* @memberof AppAutocomplete * @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 { ...@@ -119,7 +127,7 @@ export default class AppAutocomplete extends Vue {
* 值 * 值
* *
* @type {*} * @type {*}
* @memberof AppPicker * @memberof AppAutocomplete
*/ */
@Model('change') public value?: any; @Model('change') public value?: any;
...@@ -127,7 +135,7 @@ export default class AppAutocomplete extends Vue { ...@@ -127,7 +135,7 @@ export default class AppAutocomplete extends Vue {
* 当前值 * 当前值
* *
* @type {string} * @type {string}
* @memberof AppPicker * @memberof AppAutocomplete
*/ */
public curvalue: string = ''; public curvalue: string = '';
...@@ -160,7 +168,7 @@ export default class AppAutocomplete extends Vue { ...@@ -160,7 +168,7 @@ export default class AppAutocomplete extends Vue {
* *
* @param {*} newVal * @param {*} newVal
* @param {*} oldVal * @param {*} oldVal
* @memberof AppPicker * @memberof AppAutocomplete
*/ */
@Watch('value') @Watch('value')
public onValueChange(newVal: any, oldVal: any) { public onValueChange(newVal: any, oldVal: any) {
...@@ -277,19 +285,19 @@ export default class AppAutocomplete extends Vue { ...@@ -277,19 +285,19 @@ export default class AppAutocomplete extends Vue {
*/ */
public handlePublicParams(arg: any): boolean { public handlePublicParams(arg: any): boolean {
if (!this.data) { 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; return false;
} }
// 合并表单参数 // 合并表单参数
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.itemParam && this.itemParam.context) { if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context); let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context); Object.assign(arg.context,_context);
} }
if (this.itemParam && this.itemParam.param) { if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param); let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param); Object.assign(arg.param,_param);
} }
return true; return true;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
:key="item.path" :key="item.path"
> >
<span <span
v-if="item.redirect === 'noredirect' || index === breadcrumbs.length-1" v-if="index === breadcrumbs.length-1"
class="no-redirect" class="no-redirect"
>{{ $t(item.meta.caption) }}</span> >{{ $t(item.meta.caption) }}</span>
<a <a
...@@ -22,64 +22,57 @@ ...@@ -22,64 +22,57 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { compile } from 'path-to-regexp'
import { Component, Vue, Watch, Prop } from 'vue-property-decorator' import { Component, Vue, Watch, Prop } from 'vue-property-decorator'
import { RouteRecord, Route } from 'vue-router' import { RouteRecord, Route } from 'vue-router'
@Component({ @Component({
name: 'Breadcrumb'
}) })
export default class extends Vue { export default class Breadcrumb extends Vue {
private breadcrumbs: RouteRecord[] = []
private breadcrumbs: RouteRecord[] = []; //面包屑列表
@Prop() public defPSAppView?: any; @Prop() public defPSAppView: any; //默认视图
/**
* 监听路由
*
* @memberof Breadcrumb
*/
@Watch('$route') @Watch('$route')
private onRouteChange(route: 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() this.getBreadcrumb()
} }
/**
* vue 生命周期
*
* @memberof Breadcrumb
*/
created() { created() {
this.getBreadcrumb() this.getBreadcrumb()
} }
/**
* 获取面包屑数据
*
* @memberof Breadcrumb
*/
private getBreadcrumb() { private getBreadcrumb() {
let matched = this.$route.matched.filter((item) => item.meta && item.meta.caption) this.breadcrumbs = this.$route.matched.filter((item) => {
const first = matched[0] return item.meta && item.meta.caption
if (!this.isDashboard(first)) { })
matched = [{ path: "/index/:index?", meta: { if(this.defPSAppView){
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
} }
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) { private handleLink(item: any) {
this.$router.push(this.pathCompile(item)).catch(err => { this.$router.push(item).catch(err => {
console.warn(err); console.warn(err);
}); });
} }
......
...@@ -57,23 +57,31 @@ export default class AppCheckBox extends Vue { ...@@ -57,23 +57,31 @@ export default class AppCheckBox extends Vue {
* 传入表单数据 * 传入表单数据
* *
* @type {*} * @type {*}
* @memberof DropDownList * @memberof AppCheckBox
*/ */
@Prop() public data?: any; @Prop() public data?: any;
/** /**
* 传入额外参数 * 局部上下文导航参数
* *
* @type {*} * @type {any}
* @memberof DropDownList * @memberof AppCheckBox
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppCheckBox
*/ */
@Prop() public itemParam?: any; @Prop() public localParam!:any;
/** /**
* 视图上下文 * 视图上下文
* *
* @type {*} * @type {*}
* @memberof AppAutocomplete * @memberof AppCheckBox
*/ */
@Prop() public context!: any; @Prop() public context!: any;
...@@ -81,7 +89,7 @@ export default class AppCheckBox extends Vue { ...@@ -81,7 +89,7 @@ export default class AppCheckBox extends Vue {
* 视图参数 * 视图参数
* *
* @type {*} * @type {*}
* @memberof AppFormDRUIPart * @memberof AppCheckBox
*/ */
@Prop() public viewparams!: any; @Prop() public viewparams!: any;
...@@ -203,19 +211,19 @@ export default class AppCheckBox extends Vue { ...@@ -203,19 +211,19 @@ export default class AppCheckBox extends Vue {
* *
* @param {*} arg * @param {*} arg
* @returns * @returns
* @memberof DropDownList * @memberof AppCheckBox
*/ */
public handlePublicParams(arg: any) { public handlePublicParams(arg: any) {
// 合并表单参数 // 合并表单参数
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.itemParam && this.itemParam.context) { if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context); let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context); Object.assign(arg.context,_context);
} }
if (this.itemParam && this.itemParam.param) { if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param); let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param); Object.assign(arg.param,_param);
} }
} }
...@@ -253,7 +261,7 @@ export default class AppCheckBox extends Vue { ...@@ -253,7 +261,7 @@ export default class AppCheckBox extends Vue {
/** /**
* 监听表单数据变化 * 监听表单数据变化
* *
* @memberof AppOrgSelect * @memberof AppCheckBox
*/ */
@Watch('data',{immediate:true,deep:true}) @Watch('data',{immediate:true,deep:true})
onDataChange(newVal: any, oldVal: any) { onDataChange(newVal: any, oldVal: any) {
......
...@@ -65,14 +65,21 @@ export default class AppDashboardDesignService { ...@@ -65,14 +65,21 @@ export default class AppDashboardDesignService {
public loadPortletList(context: any, viewparams: any): Promise<any> { public loadPortletList(context: any, viewparams: any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
Http.getInstance().get('./assets/json/portlet-data.json').then((response: any) => { Http.getInstance().get('./assets/json/portlet-data.json').then((response: any) => {
if (response && response.status === 200 && response.data && Array.isArray(response.data)) { if (response && response.status === 200 && response.data) {
const datas: any[] = this.filterData(response.data, viewparams.appdeName); let result:Array<any> = [];
if(typeof(response.data)=='string'){
const index:number = response.data.lastIndexOf(",");
result = JSON.parse((response.data).slice(0,index)+']');
}else{
result = response.data;
}
const datas: any[] = this.filterData(result, viewparams.appdeName);
const list = this.prepareList(datas); const list = this.prepareList(datas);
const groups = this.prepareGroup(datas); const groups = this.prepareGroup(datas);
resolve({data: datas, result: list.reverse(), groups: groups}); resolve({data: datas, result: list.reverse(), groups: groups});
} }
}).catch((response: any) => { }).catch((response: any) => {
console.log(response.status); console.log(response);
}); });
}); });
} }
......
...@@ -62,7 +62,7 @@ export default class AppEmbedPicker extends Vue { ...@@ -62,7 +62,7 @@ export default class AppEmbedPicker extends Vue {
* 表单数据 * 表单数据
* *
* @type {*} * @type {*}
* @memberof AppPicker * @memberof AppEmbedPicker
*/ */
@Prop() public data!: any; @Prop() public data!: any;
...@@ -95,7 +95,7 @@ export default class AppEmbedPicker extends Vue { ...@@ -95,7 +95,7 @@ export default class AppEmbedPicker extends Vue {
* 值项名称 * 值项名称
* *
* @type {string} * @type {string}
* @memberof AppPicker * @memberof AppEmbedPicker
*/ */
@Prop() public valueItem?: string; @Prop() public valueItem?: string;
...@@ -103,7 +103,7 @@ export default class AppEmbedPicker extends Vue { ...@@ -103,7 +103,7 @@ export default class AppEmbedPicker extends Vue {
* 关联视图名称 * 关联视图名称
* *
* @type {string} * @type {string}
* @memberof AppPicker * @memberof AppEmbedPicker
*/ */
@Prop() public refviewname?: string; @Prop() public refviewname?: string;
...@@ -127,17 +127,25 @@ export default class AppEmbedPicker extends Vue { ...@@ -127,17 +127,25 @@ export default class AppEmbedPicker extends Vue {
* 属性项名称 * 属性项名称
* *
* @type {string} * @type {string}
* @memberof AppPicker * @memberof AppEmbedPicker
*/ */
@Prop() public name!: string; @Prop() public name!: string;
/** /**
* 关联视图参数 * 局部上下文导航参数
* *
* @type {*} * @type {any}
* @memberof AppEmbedPicker * @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 { ...@@ -160,8 +168,8 @@ export default class AppEmbedPicker extends Vue {
* *
* @memberof AppEmbedPicker * @memberof AppEmbedPicker
*/ */
public setViewParam(activeData: any) { public setViewParam() {
if (!this.itemParam || !activeData) { if (!this.data) {
return; return;
} }
let arg: any = {}; let arg: any = {};
...@@ -169,17 +177,13 @@ export default class AppEmbedPicker extends Vue { ...@@ -169,17 +177,13 @@ export default class AppEmbedPicker extends Vue {
let param: any = JSON.parse(JSON.stringify(this.viewparams)); let param: any = JSON.parse(JSON.stringify(this.viewparams));
let context: any = JSON.parse(JSON.stringify(this.context)); let context: any = JSON.parse(JSON.stringify(this.context));
// 附加参数处理 // 附加参数处理
if (this.itemParam.context) { if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.formatData(activeData,context,this.itemParam.context); let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(context,_context); 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) { if (this.localParam && Object.keys(this.localParam).length >0) {
let _parentdata = this.$util.formatData(activeData,param,this.itemParam.parentdata); let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(param,_parentdata); Object.assign(arg.param,_param);
} }
this.viewdata = JSON.stringify(context); this.viewdata = JSON.stringify(context);
this.viewparam = JSON.stringify(param); this.viewparam = JSON.stringify(param);
...@@ -196,7 +200,7 @@ export default class AppEmbedPicker extends Vue { ...@@ -196,7 +200,7 @@ export default class AppEmbedPicker extends Vue {
onActivedataChange(newVal: any, oldVal: any) { onActivedataChange(newVal: any, oldVal: any) {
const newFormData: any = JSON.parse(newVal); const newFormData: any = JSON.parse(newVal);
const oldDormData: any = JSON.parse(oldVal); const oldDormData: any = JSON.parse(oldVal);
this.setViewParam(newFormData); this.setViewParam();
if (!this.refreshitems || this.ignorefieldvaluechange) { if (!this.refreshitems || this.ignorefieldvaluechange) {
return; return;
} }
...@@ -215,7 +219,7 @@ export default class AppEmbedPicker extends Vue { ...@@ -215,7 +219,7 @@ export default class AppEmbedPicker extends Vue {
if(this.formState) { if(this.formState) {
this.formStateEvent = this.formState.subscribe(({ tag, action, data }) => { this.formStateEvent = this.formState.subscribe(({ tag, action, data }) => {
if (Object.is('load', action)) { if (Object.is('load', action)) {
this.setViewParam(JSON.parse(this.data)); this.setViewParam();
} }
}); });
} }
......
...@@ -45,12 +45,20 @@ export default class AppMpicker extends Vue { ...@@ -45,12 +45,20 @@ export default class AppMpicker extends Vue {
@Prop() curvalue?: any; @Prop() curvalue?: any;
/** /**
* 表单项参数 * 局部上下文导航参数
* *
* @type {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 { ...@@ -61,7 +69,7 @@ export default class AppMpicker extends Vue {
* 视图上下文 * 视图上下文
* *
* @type {*} * @type {*}
* @memberof AppFormDRUIPart * @memberof AppMpicker
*/ */
@Prop() public context!: any; @Prop() public context!: any;
...@@ -69,7 +77,7 @@ export default class AppMpicker extends Vue { ...@@ -69,7 +77,7 @@ export default class AppMpicker extends Vue {
* 视图参数 * 视图参数
* *
* @type {*} * @type {*}
* @memberof AppFormDRUIPart * @memberof AppMpicker
*/ */
@Prop() public viewparams!: any; @Prop() public viewparams!: any;
...@@ -77,7 +85,7 @@ export default class AppMpicker extends Vue { ...@@ -77,7 +85,7 @@ export default class AppMpicker extends Vue {
* AC参数 * AC参数
* *
* @type {*} * @type {*}
* @memberof AppFormDRUIPart * @memberof AppMpicker
*/ */
@Prop({default: () => {}}) public acParams?: any; @Prop({default: () => {}}) public acParams?: any;
...@@ -85,7 +93,7 @@ export default class AppMpicker extends Vue { ...@@ -85,7 +93,7 @@ export default class AppMpicker extends Vue {
* 应用实体主信息属性名称 * 应用实体主信息属性名称
* *
* @type {string} * @type {string}
* @memberof AppAutocomplete * @memberof AppMpicker
*/ */
@Prop({default: 'srfmajortext'}) public deMajorField!: string; @Prop({default: 'srfmajortext'}) public deMajorField!: string;
...@@ -93,7 +101,7 @@ export default class AppMpicker extends Vue { ...@@ -93,7 +101,7 @@ export default class AppMpicker extends Vue {
* 应用实体主键属性名称 * 应用实体主键属性名称
* *
* @type {string} * @type {string}
* @memberof AppAutocomplete * @memberof AppMpicker
*/ */
@Prop({default: 'srfkey'}) public deKeyField!: string; @Prop({default: 'srfkey'}) public deKeyField!: string;
...@@ -101,7 +109,7 @@ export default class AppMpicker extends Vue { ...@@ -101,7 +109,7 @@ export default class AppMpicker extends Vue {
* 表单服务 * 表单服务
* *
* @type {*} * @type {*}
* @memberof AppFormDRUIPart * @memberof AppMpicker
*/ */
@Prop() public service?: any; @Prop() public service?: any;
...@@ -242,19 +250,19 @@ export default class AppMpicker extends Vue { ...@@ -242,19 +250,19 @@ export default class AppMpicker extends Vue {
*/ */
public handlePublicParams(arg: any): boolean { public handlePublicParams(arg: any): boolean {
if (!this.activeData) { 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; return false;
} }
// 合并表单参数 // 合并表单参数
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.itemParam && this.itemParam.context) { if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.formatData(this.activeData,arg.context,this.itemParam.context); let _context = this.$util.computedNavData(this.activeData,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context); Object.assign(arg.context,_context);
} }
if (this.itemParam && this.itemParam.param) { if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.formatData(this.activeData,arg.param,this.itemParam.param); let _param = this.$util.computedNavData(this.activeData,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param); Object.assign(arg.param,_param);
} }
return true; return true;
......
...@@ -153,12 +153,20 @@ export default class AppPicker extends Vue { ...@@ -153,12 +153,20 @@ export default class AppPicker extends Vue {
@Prop() public linkview?: any; @Prop() public linkview?: any;
/** /**
* 表单项参数 * 局部上下文导航参数
* *
* @type {any} * @type {any}
* @memberof AppPicker * @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 { ...@@ -639,9 +647,6 @@ export default class AppPicker extends Vue {
* @memberof AppPicker * @memberof AppPicker
*/ */
public handlePublicParams(arg: any): boolean { public handlePublicParams(arg: any): boolean {
if (!this.itemParam) {
return true;
}
if (!this.data) { 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.appPicker.error') as any), desc: (this.$t('components.appPicker.formdataException') as any) });
return false; return false;
...@@ -650,12 +655,12 @@ export default class AppPicker extends Vue { ...@@ -650,12 +655,12 @@ export default class AppPicker 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.itemParam && this.itemParam.context) { if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context); let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context); Object.assign(arg.context,_context);
} }
if (this.itemParam && this.itemParam.param) { if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param); let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param); Object.assign(arg.param,_param);
} }
return true; return true;
......
...@@ -65,14 +65,14 @@ export default class AppRadioGroup extends Vue { ...@@ -65,14 +65,14 @@ export default class AppRadioGroup extends Vue {
* 传入表单数据 * 传入表单数据
* *
* @type {*} * @type {*}
* @memberof DropDownList * @memberof AppRadioGroup
*/ */
@Prop() public data?: any; @Prop() public data?: any;
/** /**
* 监听表单数据变化 * 监听表单数据变化
* *
* @memberof AppOrgSelect * @memberof AppRadioGroup
*/ */
@Watch('data',{immediate:true,deep:true}) @Watch('data',{immediate:true,deep:true})
onDataChange(newVal: any, oldVal: any) { onDataChange(newVal: any, oldVal: any) {
...@@ -103,18 +103,26 @@ export default class AppRadioGroup extends Vue { ...@@ -103,18 +103,26 @@ export default class AppRadioGroup extends Vue {
@Prop() public disabled?: boolean; @Prop() public disabled?: boolean;
/** /**
* 传入额外参数 * 局部上下文导航参数
* *
* @type {*} * @type {any}
* @memberof DropDownList * @memberof AppRadioGroup
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppRadioGroup
*/ */
@Prop() public itemParam?: any; @Prop() public localParam!:any;
/** /**
* 视图上下文 * 视图上下文
* *
* @type {*} * @type {*}
* @memberof AppAutocomplete * @memberof AppRadioGroup
*/ */
@Prop() public context!: any; @Prop() public context!: any;
...@@ -122,7 +130,7 @@ export default class AppRadioGroup extends Vue { ...@@ -122,7 +130,7 @@ export default class AppRadioGroup extends Vue {
* 视图参数 * 视图参数
* *
* @type {*} * @type {*}
* @memberof AppFormDRUIPart * @memberof AppRadioGroup
*/ */
@Prop() public viewparams!: any; @Prop() public viewparams!: any;
...@@ -161,19 +169,19 @@ export default class AppRadioGroup extends Vue { ...@@ -161,19 +169,19 @@ export default class AppRadioGroup extends Vue {
* *
* @param {*} arg * @param {*} arg
* @returns * @returns
* @memberof DropDownList * @memberof AppRadioGroup
*/ */
public handlePublicParams(arg: any) { public handlePublicParams(arg: any) {
// 合并表单参数 // 合并表单参数
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.itemParam && this.itemParam.context) { if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context); let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context); Object.assign(arg.context,_context);
} }
if (this.itemParam && this.itemParam.param) { if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param); let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param); Object.assign(arg.param,_param);
} }
} }
......
...@@ -72,12 +72,20 @@ export default class AppSpan extends Vue { ...@@ -72,12 +72,20 @@ export default class AppSpan extends Vue {
@Prop() public data?: any; @Prop() public data?: any;
/** /**
* 传入额外参数 * 局部上下文导航参数
* *
* @type {*} * @type {any}
* @memberof AppSpan
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppSpan * @memberof AppSpan
*/ */
@Prop() public itemParam?: any; @Prop() public localParam!:any;
/** /**
* 视图上下文 * 视图上下文
......
.ivu-select-dropdown {
padding: 0px;
.hidden {
display: none;
}
}
\ No newline at end of file
<template>
<Select v-model="dataRight" style="width:586px" multiple>
<Option
class="hidden"
:value="item"
v-for="(item,i) in dataRight"
:key="i"
>{{dataLeft[item-1].label}}</Option>
<el-transfer v-model="dataRight" :data="dataLeft" @change=dataChange></el-transfer>
</Select>
</template>
<script lang="ts">
import { Vue, Component, Watch, Prop, Model } from "vue-property-decorator";
import CodeListService from "@service/app/codelist-service";
@Component({})
export default class FromTransfer extends Vue {
/**
* 表单传递右侧框中的数据
*/
@Prop() public data: any;
/**
* 左侧框数据
*/
public dataLeft: any[] = [];
/**
* 右侧框数据
*/
public dataRight: any[] = [];
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof FromTransfer
*/
public codeListService: CodeListService = new CodeListService({
$store: this.$store
});
/**
* 额外参数
*
* @type {*}
* @memberof FromTransfer
*/
public otherParam: any;
/**
* 查询参数
* @type {*}
* @memberof FromTransfer
*/
public queryParam: any;
/**
* 当前选中值
* @type {any}
* @memberof Drop
*/
@Model("change") readonly itemValue!: any;
/**
* 代码表标识
*
* @type {string}
* @memberof FromTransfer
*/
@Prop() public tag?: string;
/**
* 代码表类型
*
* @type {string}
* @memberof FromTransfer
*/
@Prop() public codelistType?: string;
/**
* 监听表单数据
*
* @memberof FromTransfer
*/
@Watch("data", { deep: true })
onDataChange(newVal: any, val: any) {
if (newVal) {
}
}
/**
* 组件change事件,右侧框数据变化时
* @memberof FromTransfer
*/
dataChange(e:any){
console.log(e);
let val:any[]=[];
let newVal:any;
this.dataLeft.forEach((elem: any) => {
e.forEach((item: any) => {
if (elem.key === item) val.push(elem.value);
});
});
newVal=val.join(',');
console.log(newVal);
this.$emit("change", newVal);
}
/**
* 传入额外参数
*
* @type {*}
* @memberof FromTransfer
*/
@Prop() public itemParam?: any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
/**
* 是否禁用
* @type {any}
* @memberof FromTransfer
*
*/
@Prop() public disabled?: any;
/**
* 是否支持过滤
* @type {boolean}
* @memberof FromTransfer
*/
@Prop() public filterable?: boolean;
/**
* 下拉选提示内容
* @type {string}
* @memberof FromTransfer
*/
@Prop() public placeholder?: string;
/**
* 计算属性(当前值)
* @type {any}
* @memberof FromTransfer
*/
set currentVal(val: any) {
// const type: string = this.$util.typeOf(val);
// val =
// Object.is(type, "null") || Object.is(type, "undefined") ? undefined : val;
// this.dataLeft.forEach((elem: any) => {
// this.dataRight.forEach((item: any) => {
// if (elem.key === item) val.push(elem.value);
// });
// });
// val=val.join(',');
// this.$emit("change", val);
}
/**
* 获取值对象
*
* @memberof FromTransfer
*/
// get currentVal() {
// return this.itemValue;
// }
get currentVal() {
return this.itemValue;
}
/**
* 代码表
*
* @type {any[]}
* @memberof FromTransfer
*/
// public items: any[] = [];
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof FromTransfer
*/
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
);
Object.assign(arg.context, _context);
}
if (this.itemParam && this.itemParam.param) {
let _param = this.$util.formatData(
this.data,
arg.param,
this.itemParam.param
);
Object.assign(arg.param, _param);
}
}
/**
* vue 生命周期
*
* @memberof FromTransfer
*/
public created() {
this.dataHandle();
this.initRight();
}
/**
* 数据处理
*/
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();
console.log(this.dataLeft);
} 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;
console.log(this.dataLeft);
this.initLeft();
})
.catch((error: any) => {
console.log(`----${this.tag}----代码表不存在`);
});
}
}
/**
* 初始化左侧框数据
*/
public initLeft() {
let left: any[] = [];
Object.assign(left, this.dataLeft);
this.dataLeft = [];
left.forEach((elem: any, i: any) => {
this.dataLeft.push({
key: i + 1,
id: elem.id,
value: elem.value,
label: elem.label,
disabled: elem.disabled
});
});
}
/**
* 初始化右侧框数据
*/
public initRight() {
if (this.data) {
this.data.forEach((elem: any) => {
this.dataRight.push(elem);
});
}
}
}
</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 { ...@@ -36,7 +36,7 @@ export default class AppTreePicker extends Vue {
* 视图上下文 * 视图上下文
* *
* @type {*} * @type {*}
* @memberof AppFormDRUIPart * @memberof AppTreePicker
*/ */
@Prop() public context!: any; @Prop() public context!: any;
...@@ -44,7 +44,7 @@ export default class AppTreePicker extends Vue { ...@@ -44,7 +44,7 @@ export default class AppTreePicker extends Vue {
* 视图参数 * 视图参数
* *
* @type {*} * @type {*}
* @memberof AppFormDRUIPart * @memberof AppTreePicker
*/ */
@Prop() public viewparams!: any; @Prop() public viewparams!: any;
...@@ -52,7 +52,7 @@ export default class AppTreePicker extends Vue { ...@@ -52,7 +52,7 @@ export default class AppTreePicker extends Vue {
* 表单数据 * 表单数据
* *
* @type {*} * @type {*}
* @memberof AppPicker * @memberof AppTreePicker
*/ */
@Prop() public data!: any; @Prop() public data!: any;
...@@ -68,7 +68,7 @@ export default class AppTreePicker extends Vue { ...@@ -68,7 +68,7 @@ export default class AppTreePicker extends Vue {
* 是否启用 * 是否启用
* *
* @type {boolean} * @type {boolean}
* @memberof AppPicker * @memberof AppTreePicker
*/ */
@Prop({default: false}) public disabled!: boolean; @Prop({default: false}) public disabled!: boolean;
...@@ -101,7 +101,7 @@ export default class AppTreePicker extends Vue { ...@@ -101,7 +101,7 @@ export default class AppTreePicker extends Vue {
* 值项名称 * 值项名称
* *
* @type {string} * @type {string}
* @memberof AppPicker * @memberof AppTreePicker
*/ */
@Prop() public valueItem?: string; @Prop() public valueItem?: string;
...@@ -109,7 +109,7 @@ export default class AppTreePicker extends Vue { ...@@ -109,7 +109,7 @@ export default class AppTreePicker extends Vue {
* 关联视图名称 * 关联视图名称
* *
* @type {string} * @type {string}
* @memberof AppPicker * @memberof AppTreePicker
*/ */
@Prop() public refviewname?: string; @Prop() public refviewname?: string;
...@@ -125,17 +125,25 @@ export default class AppTreePicker extends Vue { ...@@ -125,17 +125,25 @@ export default class AppTreePicker extends Vue {
* 属性项名称 * 属性项名称
* *
* @type {string} * @type {string}
* @memberof AppPicker * @memberof AppTreePicker
*/ */
@Prop() public name!: string; @Prop() public name!: string;
/** /**
* 关联视图参数 * 局部上下文导航参数
* *
* @type {*} * @type {any}
* @memberof AppTreePicker * @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 { ...@@ -210,8 +218,8 @@ export default class AppTreePicker extends Vue {
* *
* @memberof AppTreePicker * @memberof AppTreePicker
*/ */
public setViewParam(activeData: any) { public setViewParam() {
if (!this.itemParam || !activeData) { if (!this.data) {
return; return;
} }
let arg: any = {}; let arg: any = {};
...@@ -219,17 +227,13 @@ export default class AppTreePicker extends Vue { ...@@ -219,17 +227,13 @@ export default class AppTreePicker extends Vue {
let param: any = JSON.parse(JSON.stringify(this.viewparams)); let param: any = JSON.parse(JSON.stringify(this.viewparams));
let context: any = JSON.parse(JSON.stringify(this.context)); let context: any = JSON.parse(JSON.stringify(this.context));
// 附加参数处理 // 附加参数处理
if (this.itemParam.context) { if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.formatData(activeData,context,this.itemParam.context); let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(context,_context); Object.assign(arg.context,_context);
} }
if (this.itemParam.param) { if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.formatData(activeData,param,this.itemParam.param); let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(param,_param); Object.assign(arg.param,_param);
}
if (this.itemParam.parentdata) {
let _parentdata = this.$util.formatData(activeData,param,this.itemParam.parentdata);
Object.assign(param,_parentdata);
} }
this.viewdata = JSON.stringify(context); this.viewdata = JSON.stringify(context);
this.viewparam = JSON.stringify(param); this.viewparam = JSON.stringify(param);
...@@ -240,13 +244,13 @@ export default class AppTreePicker extends Vue { ...@@ -240,13 +244,13 @@ export default class AppTreePicker extends Vue {
* *
* @param {*} newVal * @param {*} newVal
* @param {*} oldVal * @param {*} oldVal
* @memberof AppFormDRUIPart * @memberof AppTreePicker
*/ */
@Watch('data') @Watch('data')
onActivedataChange(newVal: any, oldVal: any) { onActivedataChange(newVal: any, oldVal: any) {
const newFormData: any = JSON.parse(newVal); const newFormData: any = JSON.parse(newVal);
const oldDormData: any = JSON.parse(oldVal); const oldDormData: any = JSON.parse(oldVal);
this.setViewParam(newFormData); this.setViewParam();
if (!this.refreshitems || this.ignorefieldvaluechange) { if (!this.refreshitems || this.ignorefieldvaluechange) {
return; return;
} }
...@@ -261,7 +265,7 @@ export default class AppTreePicker extends Vue { ...@@ -261,7 +265,7 @@ export default class AppTreePicker extends Vue {
* *
* @param {*} newVal * @param {*} newVal
* @param {*} oldVal * @param {*} oldVal
* @memberof AppPicker * @memberof AppTreePicker
*/ */
@Watch('value') @Watch('value')
public onValueChange(newVal: any, oldVal: any) { public onValueChange(newVal: any, oldVal: any) {
...@@ -277,7 +281,7 @@ export default class AppTreePicker extends Vue { ...@@ -277,7 +281,7 @@ export default class AppTreePicker extends Vue {
if(this.formState) { if(this.formState) {
this.formStateEvent = this.formState.subscribe(({ tag, action, data }) => { this.formStateEvent = this.formState.subscribe(({ tag, action, data }) => {
if (Object.is('load', action)) { if (Object.is('load', action)) {
this.setViewParam(JSON.parse(this.data)); this.setViewParam();
} }
}); });
} }
...@@ -286,7 +290,7 @@ export default class AppTreePicker extends Vue { ...@@ -286,7 +290,7 @@ export default class AppTreePicker extends Vue {
/** /**
* vue 生命周期 * vue 生命周期
* *
* @memberof SelectType * @memberof AppTreePicker
*/ */
public destroyed() { public destroyed() {
if (this.formStateEvent) { if (this.formStateEvent) {
......
...@@ -79,12 +79,20 @@ export default class CodeList extends Vue { ...@@ -79,12 +79,20 @@ export default class CodeList extends Vue {
@Prop() public data?: any; @Prop() public data?: any;
/** /**
* 传入额外参数 * 局部上下文导航参数
* *
* @type {*} * @type {any}
* @memberof CodeList
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof CodeList * @memberof CodeList
*/ */
@Prop() public itemParam?: any; @Prop() public localParam!:any;
/** /**
* 视图上下文 * 视图上下文
...@@ -270,12 +278,12 @@ export default class CodeList extends Vue { ...@@ -270,12 +278,12 @@ export default class CodeList 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.itemParam && this.itemParam.context) { if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context); let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context); Object.assign(arg.context,_context);
} }
if (this.itemParam && this.itemParam.param) { if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param); let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param); Object.assign(arg.param,_param);
} }
} }
......
...@@ -12,6 +12,11 @@ ...@@ -12,6 +12,11 @@
position: absolute; position: absolute;
background: #FFF; background: #FFF;
// border: 1px solid #e3e3e3; // border: 1px solid #e3e3e3;
.tree-right-menu{
.ivu-select-dropdown{
overflow: auto;
}
}
.ivu-divider{ .ivu-divider{
width: 100%; width: 100%;
} }
......
...@@ -86,12 +86,20 @@ export default class DropDownListDynamic extends Vue { ...@@ -86,12 +86,20 @@ export default class DropDownListDynamic extends Vue {
} }
/** /**
* 传入额外参数 * 局部上下文导航参数
* *
* @type {*} * @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 { ...@@ -172,12 +180,12 @@ export default class DropDownListDynamic 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.itemParam.context) { if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context); let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context); Object.assign(arg.context,_context);
} }
if (this.itemParam.param) { if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param); let _param = this.$util.computedNavData(this.data,arg.context,arg.param,this.localParam);
Object.assign(arg.param,_param); Object.assign(arg.param,_param);
} }
} }
......
...@@ -85,12 +85,20 @@ export default class DropDownListMpicker extends Vue { ...@@ -85,12 +85,20 @@ export default class DropDownListMpicker extends Vue {
@Prop() public placeholder?: string; @Prop() public placeholder?: string;
/** /**
* 传入额外参数 * 局部上下文导航参数
* *
* @type {*} * @type {any}
* @memberof DropDownListMpicker
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof DropDownListMpicker * @memberof DropDownListMpicker
*/ */
@Prop() public itemParam?: any; @Prop() public localParam!:any;
/** /**
* 视图上下文 * 视图上下文
...@@ -157,12 +165,12 @@ export default class DropDownListMpicker extends Vue { ...@@ -157,12 +165,12 @@ export default class DropDownListMpicker 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.itemParam.context) { if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context); let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context); Object.assign(arg.context,_context);
} }
if (this.itemParam.param) { if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param); let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param); Object.assign(arg.param,_param);
} }
} }
......
...@@ -86,12 +86,20 @@ export default class DropDownList extends Vue { ...@@ -86,12 +86,20 @@ export default class DropDownList extends Vue {
} }
/** /**
* 传入额外参数 * 局部上下文导航参数
* *
* @type {*} * @type {*}
* @memberof DropDownList * @memberof DropDownList
*/ */
@Prop() public itemParam?: any; @Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {*}
* @memberof DropDownList
*/
@Prop() public localParam!:any;
/** /**
* 视图上下文 * 视图上下文
...@@ -172,12 +180,12 @@ export default class DropDownList extends Vue { ...@@ -172,12 +180,12 @@ export default class DropDownList 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.itemParam && this.itemParam.context) { if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context); let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context); Object.assign(arg.context,_context);
} }
if (this.itemParam && this.itemParam.param) { if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param); let _param = this.$util.computedNavData(this.data,arg.context,arg.param,this.localParam);
Object.assign(arg.param,_param); Object.assign(arg.param,_param);
} }
} }
......
// .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 { .ibiz-page-tag {
.el-tabs{ position: relative;
.el-tabs__nav{ .left{
padding:0px 10px;
border:none;
}
.el-tabs__item{
color:#ccc;
border:none;
}
.el-tabs__item:hover{
color:#409eff;
}
.is-active{
color:#409eff;
border-bottom:2px solid #409eff !important;
}
.el-tabs__nav-scroll{
background-color: white;
}
.el-tabs__header{ .el-tabs__header{
box-shadow: 0 1px 2px 0 rgba(0,0,0,.15); padding-right:120px;
margin:0 0 1 0; }
}
.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;
}
}
.el-tabs__item:hover{
color:#409eff;
}
.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;
}
} }
} }
} }
\ No newline at end of file
<template> <template>
<div class="ibiz-page-tag"> <div class="ibiz-page-tag">
<el-tabs <div class="tag-tabs left">
type="card" <el-tabs
@tab-click="changePage" type="card"
v-model="editableTabsValue" @tab-click="changePage"
closable v-model="editableTabsValue"
@tab-remove="onClose" closable
> @tab-remove="onClose"
<el-tab-pane >
v-for="(meta, index) of $store.state.pageMetas" <el-tab-pane
:label="getCaption(meta.caption, meta.info)" v-for="(meta, index) of $store.state.pageMetas"
:name="index+''" :name="index+''"
:key="index+''" :key="index+''"
></el-tab-pane>
</el-tabs> >
<span slot="label"><span class="ivu-tag-dot-inner"></span>{{ getCaption(meta.caption, meta.info) }}</span>
</el-tab-pane>
</el-tabs>
</div>
<div v-show="$store.state.pageMetas.length > 0" class="right">
<el-dropdown @command="handlerClose">
<el-button size="mini" type="primary">
更多<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="item" v-for="(item,index) in actions" :key="index">{{ $t(item.text) }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div> </div>
</template> </template>
...@@ -23,6 +37,7 @@ import { Environment } from "../../environments/environment"; ...@@ -23,6 +37,7 @@ import { Environment } from "../../environments/environment";
@Component({}) @Component({})
export default class TabPageExp extends Vue { export default class TabPageExp extends Vue {
@Provide() @Provide()
public styleLeft: number = 0; public styleLeft: number = 0;
...@@ -32,7 +47,14 @@ export default class TabPageExp extends Vue { ...@@ -32,7 +47,14 @@ export default class TabPageExp extends Vue {
{ text: "app.tabpage.closeother", value: "closeOther" } { text: "app.tabpage.closeother", value: "closeOther" }
]; ];
public editableTabsValue: any = ""; /**
* 关闭tab页方法
*/
public handlerClose(item: any){
this.doTagAction(item.value);
}
public editableTabsValue: any = ""; //tabs页绑定值
@Watch("$route") @Watch("$route")
public onRouteChange(newVal: any) { public onRouteChange(newVal: any) {
......
...@@ -101,7 +101,7 @@ export default class EditViewEngine extends ViewEngine { ...@@ -101,7 +101,7 @@ export default class EditViewEngine extends ViewEngine {
* @memberof EditViewEngine * @memberof EditViewEngine
*/ */
public onFormLoad(arg: any): void { 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); this.setTabCaption(this.view.model.dataInfo);
const newdata: boolean = !Object.is(arg.srfuf, '1'); const newdata: boolean = !Object.is(arg.srfuf, '1');
...@@ -115,7 +115,7 @@ export default class EditViewEngine extends ViewEngine { ...@@ -115,7 +115,7 @@ export default class EditViewEngine extends ViewEngine {
* @memberof EditViewEngine * @memberof EditViewEngine
*/ */
public onFormSave(arg: any): void { 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); this.setTabCaption(this.view.model.dataInfo);
const newdata: boolean = !Object.is(arg.srfuf, '1'); const newdata: boolean = !Object.is(arg.srfuf, '1');
...@@ -248,7 +248,8 @@ export default class EditViewEngine extends ViewEngine { ...@@ -248,7 +248,8 @@ export default class EditViewEngine extends ViewEngine {
public setTabCaption(info: string): void { public setTabCaption(info: string): void {
let viewdata: any = this.view.model; let viewdata: any = this.view.model;
if (viewdata && info && !Object.is(info, '') && this.view.$tabPageExp && (viewdata.srfTitle.indexOf(" - ") === -1)) { 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);
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}`;
} }
} }
......
...@@ -26,7 +26,8 @@ vueApp.locale = () => { }; ...@@ -26,7 +26,8 @@ vueApp.locale = () => { };
const i18n = new VueI18n({ const i18n = new VueI18n({
locale: lang, locale: lang,
messages messages,
silentTranslationWarn:true
}); });
export default i18n; export default i18n;
...@@ -12,6 +12,9 @@ export default { ...@@ -12,6 +12,9 @@ export default {
ok: 'OK', ok: 'OK',
cancel: 'Cancel', cancel: 'Cancel',
}, },
local:{
new: 'New'
},
gridpage: { gridpage: {
choicecolumns: 'Choice columns', choicecolumns: 'Choice columns',
refresh: 'refresh', refresh: 'refresh',
......
...@@ -12,6 +12,9 @@ export default { ...@@ -12,6 +12,9 @@ export default {
ok: '确认', ok: '确认',
cancel: '取消', cancel: '取消',
}, },
local:{
new: '新建'
},
gridpage: { gridpage: {
choicecolumns: '选择列', choicecolumns: '选择列',
refresh: '刷新', refresh: '刷新',
......
...@@ -25,7 +25,8 @@ const router = new Router({ ...@@ -25,7 +25,8 @@ const router = new Router({
}); });
}, },
meta: { meta: {
caption: 'app.views.appindexview.caption', caption: 'app.views.appindexview.title',
info:'',
viewType: 'APPINDEX', viewType: 'APPINDEX',
parameters: [ parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' }, { pathName: 'appindexview', parameterName: 'appindexview' },
...@@ -37,7 +38,8 @@ const router = new Router({ ...@@ -37,7 +38,8 @@ const router = new Router({
{ {
path: 'ibzdicts/:ibzdict?/gridview/:gridview?', path: 'ibzdicts/:ibzdict?/gridview/:gridview?',
meta: { meta: {
caption: 'entities.ibzdict.views.gridview.caption', caption: 'entities.ibzdict.views.gridview.title',
info:'',
parameters: [ parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' }, { pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'ibzdicts', parameterName: 'ibzdict' }, { pathName: 'ibzdicts', parameterName: 'ibzdict' },
...@@ -50,7 +52,8 @@ const router = new Router({ ...@@ -50,7 +52,8 @@ const router = new Router({
{ {
path: 'ibzdicts/:ibzdict?/ibzdictitems/:ibzdictitem?/editview/:editview?', path: 'ibzdicts/:ibzdict?/ibzdictitems/:ibzdictitem?/editview/:editview?',
meta: { meta: {
caption: 'entities.ibzdictitem.views.editview.caption', caption: 'entities.ibzdictitem.views.editview.title',
info:'',
parameters: [ parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' }, { pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'ibzdicts', parameterName: 'ibzdict' }, { pathName: 'ibzdicts', parameterName: 'ibzdict' },
...@@ -64,7 +67,8 @@ const router = new Router({ ...@@ -64,7 +67,8 @@ const router = new Router({
{ {
path: 'ibzdictitems/:ibzdictitem?/editview/:editview?', path: 'ibzdictitems/:ibzdictitem?/editview/:editview?',
meta: { meta: {
caption: 'entities.ibzdictitem.views.editview.caption', caption: 'entities.ibzdictitem.views.editview.title',
info:'',
parameters: [ parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' }, { pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'ibzdictitems', parameterName: 'ibzdictitem' }, { pathName: 'ibzdictitems', parameterName: 'ibzdictitem' },
...@@ -77,7 +81,8 @@ const router = new Router({ ...@@ -77,7 +81,8 @@ const router = new Router({
{ {
path: 'ibzdicts/:ibzdict?/editview/:editview?', path: 'ibzdicts/:ibzdict?/editview/:editview?',
meta: { meta: {
caption: 'entities.ibzdict.views.editview.caption', caption: 'entities.ibzdict.views.editview.title',
info:'',
parameters: [ parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' }, { pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'ibzdicts', parameterName: 'ibzdict' }, { pathName: 'ibzdicts', parameterName: 'ibzdict' },
...@@ -90,7 +95,8 @@ const router = new Router({ ...@@ -90,7 +95,8 @@ const router = new Router({
{ {
path: 'ibzdicts/:ibzdict?/ibzdictitems/:ibzdictitem?/gridview/:gridview?', path: 'ibzdicts/:ibzdict?/ibzdictitems/:ibzdictitem?/gridview/:gridview?',
meta: { meta: {
caption: 'entities.ibzdictitem.views.gridview.caption', caption: 'entities.ibzdictitem.views.gridview.title',
info:'',
parameters: [ parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' }, { pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'ibzdicts', parameterName: 'ibzdict' }, { pathName: 'ibzdicts', parameterName: 'ibzdict' },
...@@ -104,7 +110,8 @@ const router = new Router({ ...@@ -104,7 +110,8 @@ const router = new Router({
{ {
path: 'ibzdictitems/:ibzdictitem?/gridview/:gridview?', path: 'ibzdictitems/:ibzdictitem?/gridview/:gridview?',
meta: { meta: {
caption: 'entities.ibzdictitem.views.gridview.caption', caption: 'entities.ibzdictitem.views.gridview.title',
info:'',
parameters: [ parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' }, { pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'ibzdictitems', parameterName: 'ibzdictitem' }, { pathName: 'ibzdictitems', parameterName: 'ibzdictitem' },
...@@ -120,7 +127,8 @@ const router = new Router({ ...@@ -120,7 +127,8 @@ const router = new Router({
{ {
path: '/ibzdicts/:ibzdict?/ibzdictitems/:ibzdictitem?/gridview/:gridview?', path: '/ibzdicts/:ibzdict?/ibzdictitems/:ibzdictitem?/gridview/:gridview?',
meta: { meta: {
caption: 'entities.ibzdictitem.views.gridview.caption', caption: 'entities.ibzdictitem.views.gridview.title',
info:'',
parameters: [ parameters: [
{ pathName: 'ibzdicts', parameterName: 'ibzdict' }, { pathName: 'ibzdicts', parameterName: 'ibzdict' },
{ pathName: 'ibzdictitems', parameterName: 'ibzdictitem' }, { pathName: 'ibzdictitems', parameterName: 'ibzdictitem' },
...@@ -133,7 +141,8 @@ const router = new Router({ ...@@ -133,7 +141,8 @@ const router = new Router({
{ {
path: '/ibzdictitems/:ibzdictitem?/gridview/:gridview?', path: '/ibzdictitems/:ibzdictitem?/gridview/:gridview?',
meta: { meta: {
caption: 'entities.ibzdictitem.views.gridview.caption', caption: 'entities.ibzdictitem.views.gridview.title',
info:'',
parameters: [ parameters: [
{ pathName: 'ibzdictitems', parameterName: 'ibzdictitem' }, { pathName: 'ibzdictitems', parameterName: 'ibzdictitem' },
{ pathName: 'gridview', parameterName: 'gridview' }, { pathName: 'gridview', parameterName: 'gridview' },
...@@ -145,7 +154,8 @@ const router = new Router({ ...@@ -145,7 +154,8 @@ const router = new Router({
{ {
path: '/ibzdicts/:ibzdict?/ibzdictitems/:ibzdictitem?/editview/:editview?', path: '/ibzdicts/:ibzdict?/ibzdictitems/:ibzdictitem?/editview/:editview?',
meta: { meta: {
caption: 'entities.ibzdictitem.views.editview.caption', caption: 'entities.ibzdictitem.views.editview.title',
info:'',
parameters: [ parameters: [
{ pathName: 'ibzdicts', parameterName: 'ibzdict' }, { pathName: 'ibzdicts', parameterName: 'ibzdict' },
{ pathName: 'ibzdictitems', parameterName: 'ibzdictitem' }, { pathName: 'ibzdictitems', parameterName: 'ibzdictitem' },
...@@ -158,7 +168,8 @@ const router = new Router({ ...@@ -158,7 +168,8 @@ const router = new Router({
{ {
path: '/ibzdictitems/:ibzdictitem?/editview/:editview?', path: '/ibzdictitems/:ibzdictitem?/editview/:editview?',
meta: { meta: {
caption: 'entities.ibzdictitem.views.editview.caption', caption: 'entities.ibzdictitem.views.editview.title',
info:'',
parameters: [ parameters: [
{ pathName: 'ibzdictitems', parameterName: 'ibzdictitem' }, { pathName: 'ibzdictitems', parameterName: 'ibzdictitem' },
{ pathName: 'editview', parameterName: 'editview' }, { pathName: 'editview', parameterName: 'editview' },
...@@ -170,7 +181,8 @@ const router = new Router({ ...@@ -170,7 +181,8 @@ const router = new Router({
{ {
path: '/ibzdicts/:ibzdict?/gridview/:gridview?', path: '/ibzdicts/:ibzdict?/gridview/:gridview?',
meta: { meta: {
caption: 'entities.ibzdict.views.gridview.caption', caption: 'entities.ibzdict.views.gridview.title',
info:'',
parameters: [ parameters: [
{ pathName: 'ibzdicts', parameterName: 'ibzdict' }, { pathName: 'ibzdicts', parameterName: 'ibzdict' },
{ pathName: 'gridview', parameterName: 'gridview' }, { pathName: 'gridview', parameterName: 'gridview' },
...@@ -182,7 +194,8 @@ const router = new Router({ ...@@ -182,7 +194,8 @@ const router = new Router({
{ {
path: '/ibzdicts/:ibzdict?/editview/:editview?', path: '/ibzdicts/:ibzdict?/editview/:editview?',
meta: { meta: {
caption: 'entities.ibzdict.views.editview.caption', caption: 'entities.ibzdict.views.editview.title',
info:'',
parameters: [ parameters: [
{ pathName: 'ibzdicts', parameterName: 'ibzdict' }, { pathName: 'ibzdicts', parameterName: 'ibzdict' },
{ pathName: 'editview', parameterName: 'editview' }, { pathName: 'editview', parameterName: 'editview' },
......
...@@ -8,4 +8,5 @@ declare module '@fullcalendar/timegrid'; ...@@ -8,4 +8,5 @@ declare module '@fullcalendar/timegrid';
declare module '@fullcalendar/list'; declare module '@fullcalendar/list';
declare module '@fullcalendar/interaction'; declare module '@fullcalendar/interaction';
declare module 'vue-grid-layout'; declare module 'vue-grid-layout';
declare module 'vue-print-nb'; declare module 'vue-print-nb';
\ No newline at end of file declare module 'vuedraggable';
\ No newline at end of file
...@@ -237,6 +237,12 @@ ...@@ -237,6 +237,12 @@
} }
} }
// 清除看板里视图的阴影
.dashboard .portlet .view-container{
-webkit-box-shadow: none ;
box-shadow: none;
}
/*** END:多数据视图属性布局 ***/ /*** END:多数据视图属性布局 ***/
// 看板视图,卡片模式 // 看板视图,卡片模式
......
...@@ -130,6 +130,20 @@ export declare interface Util { ...@@ -130,6 +130,20 @@ export declare interface Util {
*/ */
formatData(arg: any,parent:any, params: any): any ; 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;
/** /**
* 日期格式化 * 日期格式化
* *
......
...@@ -324,6 +324,44 @@ export class Util { ...@@ -324,6 +324,44 @@ export class Util {
return _data; 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;
}
/** /**
* 日期格式化 * 日期格式化
* *
......
...@@ -6,12 +6,8 @@ ...@@ -6,12 +6,8 @@
<row> <row>
<i-col v-show="detailsModel.n_ibzdictid_like.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }"> <i-col v-show="detailsModel.n_ibzdictid_like.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item name='n_ibzdictid_like' :itemRules="this.rules.n_ibzdictid_like" class='' :caption="$t('entities.ibzdict.default_searchform.details.n_ibzdictid_like')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.n_ibzdictid_like.error" :isEmptyCaption="false" labelPos="LEFT"> <app-form-item name='n_ibzdictid_like' :itemRules="this.rules.n_ibzdictid_like" class='' :caption="$t('entities.ibzdict.default_searchform.details.n_ibzdictid_like')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.n_ibzdictid_like.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='n_ibzdictid_like'
:value="data.n_ibzdictid_like" :data="data" <app-span name='n_ibzdictid_like' :value="data.n_ibzdictid_like" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="width:100px;"></app-span>
:context="context"
:viewparams="viewparams"
:itemParam="{}"
style="width:100px;"></app-span>
</app-form-item> </app-form-item>
</i-col> </i-col>
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
<verbose>true</verbose> <verbose>true</verbose>
<logging>debug</logging> <logging>debug</logging>
<contexts>!test</contexts> <contexts>!test</contexts>
<diffExcludeObjects>Index:.*,table:ibzfile,ibzuser,ibzdataaudit,IBZFILE,IBZUSER,IBZDATAAUDIT</diffExcludeObjects> <diffExcludeObjects>Index:.*,table:ibzfile,ibzuser,ibzdataaudit,ibzcfg,IBZFILE,IBZUSER,IBZDATAAUDIT,IBZCFG</diffExcludeObjects>
</configuration> </configuration>
<phase>process-resources</phase> <phase>process-resources</phase>
<goals> <goals>
......
...@@ -29,6 +29,7 @@ public class MybatisConfiguration { ...@@ -29,6 +29,7 @@ public class MybatisConfiguration {
Properties p = new Properties(); Properties p = new Properties();
p.setProperty("Oracle", "oracle"); p.setProperty("Oracle", "oracle");
p.setProperty("MySQL", "mysql"); p.setProperty("MySQL", "mysql");
p.setProperty("PostgreSQL", "postgresql");
p.setProperty("DM", "oracle");//达梦数据库使用oracle模式 p.setProperty("DM", "oracle");//达梦数据库使用oracle模式
p.setProperty("H2", "mysql");//根据当前运行的数据库设置h2对应的databaseid p.setProperty("H2", "mysql");//根据当前运行的数据库设置h2对应的databaseid
databaseIdProvider.setProperties(p); databaseIdProvider.setProperties(p);
......
!!!!模版产生代码错误:---- <?xml version="1.1" encoding="UTF-8" standalone="no"?>
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
----
----
FTL stack trace ("~" means nesting-related): <!--输出实体[IBZDICT]数据结构 -->
- Failed at: ${dbinst.getUserName()} [in template "CODETEMPL_zh_CN" at line 28, column 24] <changeSet author="a_A_5d9d78509" id="tab-ibzdict-47-1">
---- <createTable tableName="IBZDICT">
\ No newline at end of file <column name="IBZDICTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZDICT_IBZDICTID"/>
</column>
<column name="IBZDICTNAME" remarks="" type="VARCHAR(200)">
</column>
<column name="ENABLE" remarks="" type="INT">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
<column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column>
<column name="UPDATEMAN" remarks="" type="VARCHAR(60)">
</column>
<column name="CFG" remarks="" type="TEXT(1048576)">
</column>
</createTable>
</changeSet>
<!--输出实体[IBZDICTITEM]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzdictitem-78-2">
<createTable tableName="IBZDICTITEM">
<column name="IBZDICTITEMID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZDICTITEM_IBZDICTITEMID"/>
</column>
<column name="IBZDICTITEMNAME" remarks="" type="VARCHAR(200)">
</column>
<column name="DICTITEMVAL" remarks="" type="VARCHAR(30)">
</column>
<column name="DICTID" remarks="" type="VARCHAR(100)">
</column>
<column name="PITEMVAL" remarks="" type="VARCHAR(100)">
</column>
<column name="ITEMFILTER" remarks="" type="VARCHAR(500)">
</column>
<column name="ITEMCLS" remarks="" type="VARCHAR(100)">
</column>
<column name="ITEMICON" remarks="" type="VARCHAR(100)">
</column>
<column name="SHOWORDER" remarks="" type="INT">
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
<column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column>
<column name="UPDATEMAN" remarks="" type="VARCHAR(60)">
</column>
</createTable>
</changeSet>
<!--输出实体[IBZDICT]外键关系 -->
<!--输出实体[IBZDICTITEM]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzdictitem-78-3">
<addForeignKeyConstraint baseColumnNames="DICTID" baseTableName="IBZDICTITEM" constraintName="DER1N_IBZDICTITEM_IBZDICT_DICT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="IBZDICTID" referencedTableName="IBZDICT" validate="true"/>
</changeSet>
</databaseChangeLog>
...@@ -35,37 +35,37 @@ ...@@ -35,37 +35,37 @@
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="mysql"> <sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENABLE`, t1.`IBZDICTID`, t1.`IBZDICTNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZDICT` t1 <![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENABLE`, t1.`IBZDICTID`, t1.`IBZDICTNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZDICT` t1
WHERE t1.enable = 1 WHERE t1.ENABLE = 1
]]> ]]>
</sql> </sql>
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="oracle"> <sql id="Default" databaseId="oracle">
<![CDATA[ SELECT t1.CREATEDATE, t1.CREATEMAN, t1.ENABLE, t1.IBZDICTID, t1.IBZDICTNAME, t1.UPDATEDATE, t1.UPDATEMAN FROM IBZDICT t1 <![CDATA[ SELECT t1.CREATEDATE, t1.CREATEMAN, t1.ENABLE, t1.IBZDICTID, t1.IBZDICTNAME, t1.UPDATEDATE, t1.UPDATEMAN FROM IBZDICT t1
WHERE t1.enable = 1 WHERE t1.ENABLE = 1
]]> ]]>
</sql> </sql>
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql"> <sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.CREATEDATE, t1.CREATEMAN, t1.ENABLE, t1.IBZDICTID, t1.IBZDICTNAME, t1.UPDATEDATE, t1.UPDATEMAN FROM IBZDICT t1 <![CDATA[ SELECT t1.CREATEDATE, t1.CREATEMAN, t1.ENABLE, t1.IBZDICTID, t1.IBZDICTNAME, t1.UPDATEDATE, t1.UPDATEMAN FROM IBZDICT t1
WHERE t1.enable = 1 WHERE t1.ENABLE = 1
]]> ]]>
</sql> </sql>
<!--数据查询[View]--> <!--数据查询[View]-->
<sql id="View" databaseId="mysql"> <sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CFG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENABLE`, t1.`IBZDICTID`, t1.`IBZDICTNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZDICT` t1 <![CDATA[ SELECT t1.`CFG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENABLE`, t1.`IBZDICTID`, t1.`IBZDICTNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZDICT` t1
WHERE t1.enable = 1 WHERE t1.ENABLE = 1
]]> ]]>
</sql> </sql>
<!--数据查询[View]--> <!--数据查询[View]-->
<sql id="View" databaseId="oracle"> <sql id="View" databaseId="oracle">
<![CDATA[ SELECT t1.CFG, t1.CREATEDATE, t1.CREATEMAN, t1.ENABLE, t1.IBZDICTID, t1.IBZDICTNAME, t1.UPDATEDATE, t1.UPDATEMAN FROM IBZDICT t1 <![CDATA[ SELECT t1.CFG, t1.CREATEDATE, t1.CREATEMAN, t1.ENABLE, t1.IBZDICTID, t1.IBZDICTNAME, t1.UPDATEDATE, t1.UPDATEMAN FROM IBZDICT t1
WHERE t1.enable = 1 WHERE t1.ENABLE = 1
]]> ]]>
</sql> </sql>
<!--数据查询[View]--> <!--数据查询[View]-->
<sql id="View" databaseId="postgresql"> <sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.CFG, t1.CREATEDATE, t1.CREATEMAN, t1.ENABLE, t1.IBZDICTID, t1.IBZDICTNAME, t1.UPDATEDATE, t1.UPDATEMAN FROM IBZDICT t1 <![CDATA[ SELECT t1.CFG, t1.CREATEDATE, t1.CREATEMAN, t1.ENABLE, t1.IBZDICTID, t1.IBZDICTNAME, t1.UPDATEDATE, t1.UPDATEMAN FROM IBZDICT t1
WHERE t1.enable = 1 WHERE t1.ENABLE = 1
]]> ]]>
</sql> </sql>
</mapper> </mapper>
......
...@@ -77,6 +77,9 @@ ...@@ -77,6 +77,9 @@
<!--xxl-job定时服务 --> <!--xxl-job定时服务 -->
<xxl-job.version>2.1.0</xxl-job.version> <xxl-job.version>2.1.0</xxl-job.version>
<oracle.version>11.2.0.3</oracle.version>
<postgresql.version>42.2.6</postgresql.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
...@@ -299,12 +302,6 @@ ...@@ -299,12 +302,6 @@
<artifactId>httpclient</artifactId> <artifactId>httpclient</artifactId>
</dependency> </dependency>
<!-- MySQL驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- 阿里Druid数据源 --> <!-- 阿里Druid数据源 -->
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
...@@ -317,9 +314,23 @@ ...@@ -317,9 +314,23 @@
<artifactId>h2</artifactId> <artifactId>h2</artifactId>
</dependency> </dependency>
<!-- Error --> <!-- Oracle驱动包 -->
<dependency>
<!-- Security --> <groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>${oracle.version}</version>
</dependency>
<!-- PostgreSQL驱动包 -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<!-- MySQL驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies> </dependencies>
......
...@@ -253,7 +253,7 @@ public class DEFieldDefaultValueAspect ...@@ -253,7 +253,7 @@ public class DEFieldDefaultValueAspect
et.set(fieldname,curUser.getMdeptname()); et.set(fieldname,curUser.getMdeptname());
break; break;
case LOGICVALID: case LOGICVALID:
if(!StringUtils.isEmpty(logicValue)){ if(StringUtils.isEmpty(logicValue)){
logicValue="1"; logicValue="1";
} }
et.set(fieldname,logicValue); et.set(fieldname,logicValue);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册