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

ibizdev提交

上级 180035cf
## v7.0.0-alpha.4 [2020-5-14]
### Bug修复
修复代码表代码项图标和数据
修复数据多项选择视图UI逻辑不匹配
修复列表高度异常
修复树节点上下文
修复表格(视图)高度,滚动条问题
修复表单loaddraft服务仿真主键丢失修复
修复user显示名称逻辑
修复issue地址为正式环境地址
### 功能新增及优化
#### 模板
模态时视图样式调整
增加菜单权限
增加快速分组搜索或快速搜索表单功能
增加表格内置工具栏
代码表多选控件分割符从分号转化为逗号
#### 基础文件
增加数据选择类插件表格呈现插件
## v7.0.0-alpha.3 [2020-5-10] ## v7.0.0-alpha.3 [2020-5-10]
### Bug修复 ### Bug修复
...@@ -65,3 +106,5 @@ ...@@ -65,3 +106,5 @@
## v7.0.0-alpha.1 [2020-4-29] ## v7.0.0-alpha.1 [2020-4-29]
初始化文件 初始化文件
...@@ -47,6 +47,14 @@ export default class AppFormDRUIPart extends Vue { ...@@ -47,6 +47,14 @@ export default class AppFormDRUIPart extends Vue {
*/ */
@Prop({ default: '' }) public refreshitems!: string; @Prop({ default: '' }) public refreshitems!: string;
/**
* 禁止加载
*
* @type {string}
* @memberof AppFormDRUIPart
*/
@Prop({ default: false }) public isForbidLoad!: boolean;
/** /**
* 关系视图类型 * 关系视图类型
* *
...@@ -254,7 +262,11 @@ export default class AppFormDRUIPart extends Vue { ...@@ -254,7 +262,11 @@ export default class AppFormDRUIPart extends Vue {
this.blockUIStop(); this.blockUIStop();
} }
} }
this.formDruipart.next({action:'load',data:{srfparentdename:this.parentName,srfparentkey:_paramitem}}); if(!this.isForbidLoad){
this.$nextTick(() => {
this.formDruipart.next({action:'load',data:{srfparentdename:this.parentName,srfparentkey:_paramitem}});
});
}
} }
/** /**
......
...@@ -22,7 +22,7 @@ export const Environment = { ...@@ -22,7 +22,7 @@ export const Environment = {
// 是否为开发模式 // 是否为开发模式
devMode: true, devMode: true,
// 项目模板地址 // 项目模板地址
ProjectUrl: "http://demo.ibizlab.cn/groups/ibizr7pfstdtempl", ProjectUrl: "http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7",
// 配置平台地址 // 配置平台地址
StudioUrl: "http://172.16.170.145/slnstudio/", StudioUrl: "http://172.16.170.145/slnstudio/",
// 中心标识 // 中心标识
......
...@@ -25,7 +25,7 @@ mock.onGet('v7/wfindex-viewappmenu').reply((config: any) => { ...@@ -25,7 +25,7 @@ mock.onGet('v7/wfindex-viewappmenu').reply((config: any) => {
iconcls: 'fa fa-random', iconcls: 'fa fa-random',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '_2', appfunctag: 'Auto1',
resourcetag: '', resourcetag: '',
}, },
{ {
...@@ -43,7 +43,7 @@ mock.onGet('v7/wfindex-viewappmenu').reply((config: any) => { ...@@ -43,7 +43,7 @@ mock.onGet('v7/wfindex-viewappmenu').reply((config: any) => {
iconcls: 'fa fa-arrow-circle-o-up', iconcls: 'fa fa-arrow-circle-o-up',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '_4', appfunctag: 'Auto3',
resourcetag: '', resourcetag: '',
}, },
{ {
...@@ -61,7 +61,7 @@ mock.onGet('v7/wfindex-viewappmenu').reply((config: any) => { ...@@ -61,7 +61,7 @@ mock.onGet('v7/wfindex-viewappmenu').reply((config: any) => {
iconcls: 'fa fa-users', iconcls: 'fa fa-users',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '_3', appfunctag: 'Auto2',
resourcetag: '', resourcetag: '',
}, },
], ],
......
...@@ -1228,14 +1228,14 @@ export default class WFGroupEditViewBase extends Vue { ...@@ -1228,14 +1228,14 @@ export default class WFGroupEditViewBase extends Vue {
const data: any = {}; const data: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData); _this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) { } else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey }) actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
xData.copy(data2); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -1093,6 +1093,9 @@ export default class WFGroupGridViewBase extends Vue { ...@@ -1093,6 +1093,9 @@ export default class WFGroupGridViewBase extends Vue {
*/ */
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) { public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
const data: any = {}; const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context)); let curViewParam = JSON.parse(JSON.stringify(this.context));
if(args.length >0){ if(args.length >0){
Object.assign(curViewParam,args[0]); Object.assign(curViewParam,args[0]);
...@@ -1235,14 +1238,14 @@ export default class WFGroupGridViewBase extends Vue { ...@@ -1235,14 +1238,14 @@ export default class WFGroupGridViewBase extends Vue {
const data: any = {}; const data: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData); _this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) { } else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey }) actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
xData.copy(data2); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -1228,14 +1228,14 @@ export default class WFMemberEditViewBase extends Vue { ...@@ -1228,14 +1228,14 @@ export default class WFMemberEditViewBase extends Vue {
const data: any = {}; const data: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData); _this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) { } else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey }) actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
xData.copy(data2); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -1266,14 +1266,14 @@ export default class WFMemberGridViewBase extends Vue { ...@@ -1266,14 +1266,14 @@ export default class WFMemberGridViewBase extends Vue {
const data: any = {}; const data: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData); _this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) { } else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey }) actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
xData.copy(data2); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -1228,14 +1228,14 @@ export default class WFProcessDefinitionEditViewBase extends Vue { ...@@ -1228,14 +1228,14 @@ export default class WFProcessDefinitionEditViewBase extends Vue {
const data: any = {}; const data: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData); _this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) { } else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey }) actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
xData.copy(data2); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -1093,6 +1093,9 @@ export default class WFProcessDefinitionGridViewBase extends Vue { ...@@ -1093,6 +1093,9 @@ export default class WFProcessDefinitionGridViewBase extends Vue {
*/ */
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) { public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
const data: any = {}; const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context)); let curViewParam = JSON.parse(JSON.stringify(this.context));
if(args.length >0){ if(args.length >0){
Object.assign(curViewParam,args[0]); Object.assign(curViewParam,args[0]);
...@@ -1235,14 +1238,14 @@ export default class WFProcessDefinitionGridViewBase extends Vue { ...@@ -1235,14 +1238,14 @@ export default class WFProcessDefinitionGridViewBase extends Vue {
const data: any = {}; const data: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData); _this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) { } else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey }) actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
xData.copy(data2); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -1228,14 +1228,14 @@ export default class WFUserEditViewBase extends Vue { ...@@ -1228,14 +1228,14 @@ export default class WFUserEditViewBase extends Vue {
const data: any = {}; const data: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData); _this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) { } else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey }) actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
xData.copy(data2); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -1093,6 +1093,9 @@ export default class WFUserGridViewBase extends Vue { ...@@ -1093,6 +1093,9 @@ export default class WFUserGridViewBase extends Vue {
*/ */
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) { public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
const data: any = {}; const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context)); let curViewParam = JSON.parse(JSON.stringify(this.context));
if(args.length >0){ if(args.length >0){
Object.assign(curViewParam,args[0]); Object.assign(curViewParam,args[0]);
...@@ -1235,14 +1238,14 @@ export default class WFUserGridViewBase extends Vue { ...@@ -1235,14 +1238,14 @@ export default class WFUserGridViewBase extends Vue {
const data: any = {}; const data: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData); _this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) { } else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey }) actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
xData.copy(data2); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -75,4 +75,17 @@ export const getZIndex = (state: any) => () => { ...@@ -75,4 +75,17 @@ export const getZIndex = (state: any) => () => {
*/ */
export const getViewSplit = (state: any) => (viewUID: string) => { export const getViewSplit = (state: any) => (viewUID: string) => {
return state.viewSplit[viewUID]; return state.viewSplit[viewUID];
}
/**
* 获取拷贝数据
*
* @param state
*/
export const getCopyData = (state: any) => (srfkey: string) => {
let copyData = state.copyDataMap[srfkey];
if(copyData){
delete state.copyDataMap[srfkey];
}
return copyData;
} }
\ No newline at end of file
...@@ -253,4 +253,16 @@ export const updateZIndex = (state: any, zIndex: number) => { ...@@ -253,4 +253,16 @@ export const updateZIndex = (state: any, zIndex: number) => {
*/ */
export const setViewSplit = (state: any, args: {viewSplit: number,viewUID:string}) => { export const setViewSplit = (state: any, args: {viewSplit: number,viewUID:string}) => {
state.viewSplit[args.viewUID] = args.viewSplit; state.viewSplit[args.viewUID] = args.viewSplit;
}
/**
* 添加拷贝数据
*
* @param state
* @param localdata
*/
export const addCopyData = (state: any, args: {srfkey: string,copyData: any}) => {
if(args && args.srfkey && args.copyData){
state.copyDataMap[args.srfkey] = JSON.parse(JSON.stringify(args.copyData));
}
} }
\ No newline at end of file
...@@ -13,4 +13,5 @@ export const rootstate: any = { ...@@ -13,4 +13,5 @@ export const rootstate: any = {
localdata: {}, localdata: {},
zIndex: 300, zIndex: 300,
viewSplit: {}, viewSplit: {},
copyDataMap:{},
} }
\ No newline at end of file
...@@ -92,7 +92,7 @@ export class StudioActionUtil { ...@@ -92,7 +92,7 @@ export class StudioActionUtil {
const config: any = await this.getConfig(viewName); const config: any = await this.getConfig(viewName);
if (config) { if (config) {
const context: string = `视图模块:${config.viewmodule}\n视图标识:${config.viewname}\n视图类型:${config.viewtype}\n`; const context: string = `视图模块:${config.viewmodule}\n视图标识:${config.viewname}\n视图类型:${config.viewtype}\n`;
window.open(`${Environment.ProjectUrl}/issues/`, '_blank'); window.open(`${Environment.ProjectUrl}/issues/new?issue[title]=${encodeURIComponent('问题')}&issue[description]=${encodeURIComponent(context)}`, '_blank');
} }
} }
......
...@@ -558,14 +558,14 @@ export default class WFIndexViewBase extends Vue implements ControlInterface { ...@@ -558,14 +558,14 @@ export default class WFIndexViewBase extends Vue implements ControlInterface {
public click(item: any) { public click(item: any) {
if (item) { if (item) {
switch (item.appfunctag) { switch (item.appfunctag) {
case '_4': case 'Auto3':
this.click_4(item); this.clickAuto3(item);
return; return;
case '_2': case 'Auto1':
this.click_2(item); this.clickAuto1(item);
return; return;
case '_3': case 'Auto2':
this.click_3(item); this.clickAuto2(item);
return; return;
default: default:
console.warn('未指定应用功能'); console.warn('未指定应用功能');
...@@ -580,7 +580,7 @@ export default class WFIndexViewBase extends Vue implements ControlInterface { ...@@ -580,7 +580,7 @@ export default class WFIndexViewBase extends Vue implements ControlInterface {
* @param {*} [item={}] * @param {*} [item={}]
* @memberof WFIndexView * @memberof WFIndexView
*/ */
public click_4(item: any = {}) { public clickAuto3(item: any = {}) {
const viewparam: any = {}; const viewparam: any = {};
Object.assign(viewparam, {}); Object.assign(viewparam, {});
const deResParameters: any[] = []; const deResParameters: any[] = [];
...@@ -598,7 +598,7 @@ export default class WFIndexViewBase extends Vue implements ControlInterface { ...@@ -598,7 +598,7 @@ export default class WFIndexViewBase extends Vue implements ControlInterface {
* @param {*} [item={}] * @param {*} [item={}]
* @memberof WFIndexView * @memberof WFIndexView
*/ */
public click_2(item: any = {}) { public clickAuto1(item: any = {}) {
const viewparam: any = {}; const viewparam: any = {};
Object.assign(viewparam, {}); Object.assign(viewparam, {});
const deResParameters: any[] = []; const deResParameters: any[] = [];
...@@ -616,7 +616,7 @@ export default class WFIndexViewBase extends Vue implements ControlInterface { ...@@ -616,7 +616,7 @@ export default class WFIndexViewBase extends Vue implements ControlInterface {
* @param {*} [item={}] * @param {*} [item={}]
* @memberof WFIndexView * @memberof WFIndexView
*/ */
public click_3(item: any = {}) { public clickAuto2(item: any = {}) {
const viewparam: any = {}; const viewparam: any = {};
Object.assign(viewparam, {}); Object.assign(viewparam, {});
const deResParameters: any[] = []; const deResParameters: any[] = [];
......
...@@ -29,7 +29,7 @@ export default class WFIndexViewModel { ...@@ -29,7 +29,7 @@ export default class WFIndexViewModel {
iconcls: 'fa fa-random', iconcls: 'fa fa-random',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '_2', appfunctag: 'Auto1',
resourcetag: '', resourcetag: '',
}, },
{ {
...@@ -47,7 +47,7 @@ export default class WFIndexViewModel { ...@@ -47,7 +47,7 @@ export default class WFIndexViewModel {
iconcls: 'fa fa-arrow-circle-o-up', iconcls: 'fa fa-arrow-circle-o-up',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '_4', appfunctag: 'Auto3',
resourcetag: '', resourcetag: '',
}, },
{ {
...@@ -65,7 +65,7 @@ export default class WFIndexViewModel { ...@@ -65,7 +65,7 @@ export default class WFIndexViewModel {
iconcls: 'fa fa-users', iconcls: 'fa fa-users',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '_3', appfunctag: 'Auto2',
resourcetag: '', resourcetag: '',
}, },
]; ];
...@@ -79,7 +79,7 @@ export default class WFIndexViewModel { ...@@ -79,7 +79,7 @@ export default class WFIndexViewModel {
*/ */
public funcs: any[] = [ public funcs: any[] = [
{ {
appfunctag: '_4', appfunctag: 'Auto3',
appfuncyype: 'APPVIEW', appfuncyype: 'APPVIEW',
openmode: '', openmode: '',
codename: 'wfremodeleditview', codename: 'wfremodeleditview',
...@@ -91,7 +91,7 @@ export default class WFIndexViewModel { ...@@ -91,7 +91,7 @@ export default class WFIndexViewModel {
], ],
}, },
{ {
appfunctag: '_2', appfunctag: 'Auto1',
appfuncyype: 'APPVIEW', appfuncyype: 'APPVIEW',
openmode: '', openmode: '',
codename: 'wfprocessdefinitiongridview', codename: 'wfprocessdefinitiongridview',
...@@ -103,7 +103,7 @@ export default class WFIndexViewModel { ...@@ -103,7 +103,7 @@ export default class WFIndexViewModel {
], ],
}, },
{ {
appfunctag: '_3', appfunctag: 'Auto2',
appfuncyype: 'APPVIEW', appfuncyype: 'APPVIEW',
openmode: '', openmode: '',
codename: 'wfgroupgridview', codename: 'wfgroupgridview',
......
...@@ -282,8 +282,9 @@ export default class DefaultService extends ControlService { ...@@ -282,8 +282,9 @@ export default class DefaultService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.id = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.wfgroup = Data.id; Data.id = PrimaryKey;
Data.wfgroup = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -293,6 +294,7 @@ export default class DefaultService extends ControlService { ...@@ -293,6 +294,7 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.id = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<app-form-druipart <app-form-druipart
:formState="formState" :formState="formState"
:isForbidLoad="this.data.srfuf === '0'"
paramItem='wfgroup' paramItem='wfgroup'
:parentdata='{"srfparentdefname":"GROUPID","srfparentdename":"WF_GROUP","SRFPARENTTYPE":"DER1N","srfparentmode":"DER1N_WF_GROUP_MEMBER_WF_GROUP_GROUPID","SRFDER1NID":"DER1N_WF_GROUP_MEMBER_WF_GROUP_GROUPID"}' :parentdata='{"srfparentdefname":"GROUPID","srfparentdename":"WF_GROUP","SRFPARENTTYPE":"DER1N","srfparentmode":"DER1N_WF_GROUP_MEMBER_WF_GROUP_GROUPID","SRFDER1NID":"DER1N_WF_GROUP_MEMBER_WF_GROUP_GROUPID"}'
:parameters="[ :parameters="[
...@@ -887,7 +888,11 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -887,7 +888,11 @@ export default class MainBase extends Vue implements ControlInterface {
this.load(data); this.load(data);
} }
if (Object.is('loaddraft', action)) { if (Object.is('loaddraft', action)) {
this.loadDraft(data); if(this.context.srfsourcekey){
this.copy(this.context.srfsourcekey);
}else{
this.loadDraft(data);
}
} }
if (Object.is('save', action)) { if (Object.is('save', action)) {
this.save(data,data.showResultInfo); this.save(data,data.showResultInfo);
...@@ -951,8 +956,18 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -951,8 +956,18 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {*} [arg={}] * @param {*} [arg={}]
* @memberof @memberof Main * @memberof @memberof Main
*/ */
public copy(arg: any = {}): void { public copy(srfkey: string): void {
this.loadDraft(arg); let copyData = this.$store.getters.getCopyData(srfkey);
copyData.srfkey = Util.createUUID();
copyData.wfgroup = copyData.srfkey;
copyData.id = copyData.srfkey;
Object.assign(this.context,{wfgroup:copyData.wfgroup})
this.data = copyData;
this.$nextTick(() => {
this.formState.next({ type: 'load', data: copyData });
this.data.srfuf = '0';
this.setFormEnableCond(this.data);
});
} }
/** /**
......
...@@ -282,8 +282,9 @@ export default class MainService extends ControlService { ...@@ -282,8 +282,9 @@ export default class MainService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.id = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.wfgroup = Data.id; Data.id = PrimaryKey;
Data.wfgroup = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -293,6 +294,7 @@ export default class MainService extends ControlService { ...@@ -293,6 +294,7 @@ export default class MainService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.id = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -264,7 +264,7 @@ export default class MainService extends ControlService { ...@@ -264,7 +264,7 @@ export default class MainService extends ControlService {
if(response.data){ if(response.data){
Object.assign(response.data,{srfuf:'0'}); Object.assign(response.data,{srfuf:'0'});
//仿真主键数据 //仿真主键数据
response.data.wfgroup = Util.createUUID(); response.data.id = Util.createUUID();
} }
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
this.mergeDefaults(response); this.mergeDefaults(response);
......
...@@ -282,8 +282,9 @@ export default class DefaultService extends ControlService { ...@@ -282,8 +282,9 @@ export default class DefaultService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.memberid = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.wfmember = Data.memberid; Data.memberid = PrimaryKey;
Data.wfmember = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -293,6 +294,7 @@ export default class DefaultService extends ControlService { ...@@ -293,6 +294,7 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.memberid = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -896,7 +896,11 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -896,7 +896,11 @@ export default class MainBase extends Vue implements ControlInterface {
this.load(data); this.load(data);
} }
if (Object.is('loaddraft', action)) { if (Object.is('loaddraft', action)) {
this.loadDraft(data); if(this.context.srfsourcekey){
this.copy(this.context.srfsourcekey);
}else{
this.loadDraft(data);
}
} }
if (Object.is('save', action)) { if (Object.is('save', action)) {
this.save(data,data.showResultInfo); this.save(data,data.showResultInfo);
...@@ -960,8 +964,18 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -960,8 +964,18 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {*} [arg={}] * @param {*} [arg={}]
* @memberof @memberof Main * @memberof @memberof Main
*/ */
public copy(arg: any = {}): void { public copy(srfkey: string): void {
this.loadDraft(arg); let copyData = this.$store.getters.getCopyData(srfkey);
copyData.srfkey = Util.createUUID();
copyData.wfmember = copyData.srfkey;
copyData.memberid = copyData.srfkey;
Object.assign(this.context,{wfmember:copyData.wfmember})
this.data = copyData;
this.$nextTick(() => {
this.formState.next({ type: 'load', data: copyData });
this.data.srfuf = '0';
this.setFormEnableCond(this.data);
});
} }
/** /**
......
...@@ -294,8 +294,9 @@ export default class MainService extends ControlService { ...@@ -294,8 +294,9 @@ export default class MainService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.memberid = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.wfmember = Data.memberid; Data.memberid = PrimaryKey;
Data.wfmember = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -305,6 +306,7 @@ export default class MainService extends ControlService { ...@@ -305,6 +306,7 @@ export default class MainService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.memberid = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -264,7 +264,7 @@ export default class MainService extends ControlService { ...@@ -264,7 +264,7 @@ export default class MainService extends ControlService {
if(response.data){ if(response.data){
Object.assign(response.data,{srfuf:'0'}); Object.assign(response.data,{srfuf:'0'});
//仿真主键数据 //仿真主键数据
response.data.wfmember = Util.createUUID(); response.data.memberid = Util.createUUID();
} }
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
this.mergeDefaults(response); this.mergeDefaults(response);
......
...@@ -282,8 +282,9 @@ export default class DefaultService extends ControlService { ...@@ -282,8 +282,9 @@ export default class DefaultService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.definitionkey = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.wfprocessdefinition = Data.definitionkey; Data.definitionkey = PrimaryKey;
Data.wfprocessdefinition = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -293,6 +294,7 @@ export default class DefaultService extends ControlService { ...@@ -293,6 +294,7 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.definitionkey = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -1001,7 +1001,11 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1001,7 +1001,11 @@ export default class MainBase extends Vue implements ControlInterface {
this.load(data); this.load(data);
} }
if (Object.is('loaddraft', action)) { if (Object.is('loaddraft', action)) {
this.loadDraft(data); if(this.context.srfsourcekey){
this.copy(this.context.srfsourcekey);
}else{
this.loadDraft(data);
}
} }
if (Object.is('save', action)) { if (Object.is('save', action)) {
this.save(data,data.showResultInfo); this.save(data,data.showResultInfo);
...@@ -1065,8 +1069,18 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1065,8 +1069,18 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {*} [arg={}] * @param {*} [arg={}]
* @memberof @memberof Main * @memberof @memberof Main
*/ */
public copy(arg: any = {}): void { public copy(srfkey: string): void {
this.loadDraft(arg); let copyData = this.$store.getters.getCopyData(srfkey);
copyData.srfkey = Util.createUUID();
copyData.wfprocessdefinition = copyData.srfkey;
copyData.definitionkey = copyData.srfkey;
Object.assign(this.context,{wfprocessdefinition:copyData.wfprocessdefinition})
this.data = copyData;
this.$nextTick(() => {
this.formState.next({ type: 'load', data: copyData });
this.data.srfuf = '0';
this.setFormEnableCond(this.data);
});
} }
/** /**
......
...@@ -282,8 +282,9 @@ export default class MainService extends ControlService { ...@@ -282,8 +282,9 @@ export default class MainService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.definitionkey = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.wfprocessdefinition = Data.definitionkey; Data.definitionkey = PrimaryKey;
Data.wfprocessdefinition = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -293,6 +294,7 @@ export default class MainService extends ControlService { ...@@ -293,6 +294,7 @@ export default class MainService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.definitionkey = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -264,7 +264,7 @@ export default class MainService extends ControlService { ...@@ -264,7 +264,7 @@ export default class MainService extends ControlService {
if(response.data){ if(response.data){
Object.assign(response.data,{srfuf:'0'}); Object.assign(response.data,{srfuf:'0'});
//仿真主键数据 //仿真主键数据
response.data.wfprocessdefinition = Util.createUUID(); response.data.definitionkey = Util.createUUID();
} }
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
this.mergeDefaults(response); this.mergeDefaults(response);
......
...@@ -833,7 +833,11 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -833,7 +833,11 @@ export default class MainBase extends Vue implements ControlInterface {
this.load(data); this.load(data);
} }
if (Object.is('loaddraft', action)) { if (Object.is('loaddraft', action)) {
this.loadDraft(data); if(this.context.srfsourcekey){
this.copy(this.context.srfsourcekey);
}else{
this.loadDraft(data);
}
} }
if (Object.is('save', action)) { if (Object.is('save', action)) {
this.save(data,data.showResultInfo); this.save(data,data.showResultInfo);
...@@ -897,8 +901,18 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -897,8 +901,18 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {*} [arg={}] * @param {*} [arg={}]
* @memberof @memberof Main * @memberof @memberof Main
*/ */
public copy(arg: any = {}): void { public copy(srfkey: string): void {
this.loadDraft(arg); let copyData = this.$store.getters.getCopyData(srfkey);
copyData.srfkey = Util.createUUID();
copyData.wfremodel = copyData.srfkey;
copyData.id = copyData.srfkey;
Object.assign(this.context,{wfremodel:copyData.wfremodel})
this.data = copyData;
this.$nextTick(() => {
this.formState.next({ type: 'load', data: copyData });
this.data.srfuf = '0';
this.setFormEnableCond(this.data);
});
} }
/** /**
......
...@@ -282,8 +282,9 @@ export default class MainService extends ControlService { ...@@ -282,8 +282,9 @@ export default class MainService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.id = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.wfremodel = Data.id; Data.id = PrimaryKey;
Data.wfremodel = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -293,6 +294,7 @@ export default class MainService extends ControlService { ...@@ -293,6 +294,7 @@ export default class MainService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.id = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -282,8 +282,9 @@ export default class DefaultService extends ControlService { ...@@ -282,8 +282,9 @@ export default class DefaultService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.id = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.wfuser = Data.id; Data.id = PrimaryKey;
Data.wfuser = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -293,6 +294,7 @@ export default class DefaultService extends ControlService { ...@@ -293,6 +294,7 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.id = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -861,7 +861,11 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -861,7 +861,11 @@ export default class MainBase extends Vue implements ControlInterface {
this.load(data); this.load(data);
} }
if (Object.is('loaddraft', action)) { if (Object.is('loaddraft', action)) {
this.loadDraft(data); if(this.context.srfsourcekey){
this.copy(this.context.srfsourcekey);
}else{
this.loadDraft(data);
}
} }
if (Object.is('save', action)) { if (Object.is('save', action)) {
this.save(data,data.showResultInfo); this.save(data,data.showResultInfo);
...@@ -925,8 +929,18 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -925,8 +929,18 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {*} [arg={}] * @param {*} [arg={}]
* @memberof @memberof Main * @memberof @memberof Main
*/ */
public copy(arg: any = {}): void { public copy(srfkey: string): void {
this.loadDraft(arg); let copyData = this.$store.getters.getCopyData(srfkey);
copyData.srfkey = Util.createUUID();
copyData.wfuser = copyData.srfkey;
copyData.id = copyData.srfkey;
Object.assign(this.context,{wfuser:copyData.wfuser})
this.data = copyData;
this.$nextTick(() => {
this.formState.next({ type: 'load', data: copyData });
this.data.srfuf = '0';
this.setFormEnableCond(this.data);
});
} }
/** /**
......
...@@ -282,8 +282,9 @@ export default class MainService extends ControlService { ...@@ -282,8 +282,9 @@ export default class MainService extends ControlService {
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据 //仿真主键数据
Data.id = Util.createUUID(); const PrimaryKey = Util.createUUID();
Data.wfuser = Data.id; Data.id = PrimaryKey;
Data.wfuser = PrimaryKey;
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
...@@ -293,6 +294,7 @@ export default class MainService extends ControlService { ...@@ -293,6 +294,7 @@ export default class MainService extends ControlService {
result = this.appEntityService.GetDraft(Context,Data, isloading); result = this.appEntityService.GetDraft(Context,Data, isloading);
} }
result.then((response) => { result.then((response) => {
response.data.id = PrimaryKey;
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
......
...@@ -264,7 +264,7 @@ export default class MainService extends ControlService { ...@@ -264,7 +264,7 @@ export default class MainService extends ControlService {
if(response.data){ if(response.data){
Object.assign(response.data,{srfuf:'0'}); Object.assign(response.data,{srfuf:'0'});
//仿真主键数据 //仿真主键数据
response.data.wfuser = Util.createUUID(); response.data.id = Util.createUUID();
} }
this.handleResponse(action, response, true); this.handleResponse(action, response, true);
this.mergeDefaults(response); this.mergeDefaults(response);
......
...@@ -13,4 +13,5 @@ services: ...@@ -13,4 +13,5 @@ services:
networks: networks:
agent_network: agent_network:
driver: overlay driver: overlay
attachable: true attachable: true
\ No newline at end of file
...@@ -42,6 +42,9 @@ public class webSecurityConfig extends WebSecurityConfigurerAdapter { ...@@ -42,6 +42,9 @@ public class webSecurityConfig extends WebSecurityConfigurerAdapter {
@Value("${ibiz.auth.path:v7/login}") @Value("${ibiz.auth.path:v7/login}")
private String loginPath; private String loginPath;
@Value("${ibiz.auth.logoutpath:v7/logout}")
private String logoutPath;
@Value("${ibiz.file.uploadpath:ibizutil/upload}") @Value("${ibiz.file.uploadpath:ibizutil/upload}")
private String uploadpath; private String uploadpath;
...@@ -107,6 +110,8 @@ public class webSecurityConfig extends WebSecurityConfigurerAdapter { ...@@ -107,6 +110,8 @@ public class webSecurityConfig extends WebSecurityConfigurerAdapter {
).permitAll() ).permitAll()
//放行登录请求 //放行登录请求
.antMatchers( HttpMethod.POST,"/"+loginPath).permitAll() .antMatchers( HttpMethod.POST,"/"+loginPath).permitAll()
//放行注销请求
.antMatchers( HttpMethod.GET,"/"+logoutPath).permitAll()
// 文件操作 // 文件操作
.antMatchers("/"+downloadpath+"/**").permitAll() .antMatchers("/"+downloadpath+"/**").permitAll()
.antMatchers("/"+uploadpath).permitAll() .antMatchers("/"+uploadpath).permitAll()
......
server: server:
port: 8080 port: 30003
#zuul网关路由设置 #zuul网关路由设置
zuul: zuul:
routes: routes:
......
...@@ -41,6 +41,9 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter { ...@@ -41,6 +41,9 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter {
@Value("${ibiz.auth.path:v7/login}") @Value("${ibiz.auth.path:v7/login}")
private String loginPath; private String loginPath;
@Value("${ibiz.auth.logoutpath:v7/logout}")
private String logoutPath;
@Value("${ibiz.file.uploadpath:ibizutil/upload}") @Value("${ibiz.file.uploadpath:ibizutil/upload}")
private String uploadpath; private String uploadpath;
...@@ -102,6 +105,8 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter { ...@@ -102,6 +105,8 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter {
).permitAll() ).permitAll()
//放行登录请求 //放行登录请求
.antMatchers( HttpMethod.POST,"/"+loginPath).permitAll() .antMatchers( HttpMethod.POST,"/"+loginPath).permitAll()
//放行注销请求
.antMatchers( HttpMethod.GET,"/"+logoutPath).permitAll()
// 文件操作 // 文件操作
.antMatchers("/"+downloadpath+"/**").permitAll() .antMatchers("/"+downloadpath+"/**").permitAll()
.antMatchers("/"+uploadpath).permitAll() .antMatchers("/"+uploadpath).permitAll()
......
server: server:
port: 8080 port: 8080
#zuul网关路由设置 #zuul网关路由设置
zuul: zuul:
routes: routes:
......
{
"unires":[
],
"predefineddatarange":[{"id":"ALL","name":"全部数据"},{"id":"CURORG","name":"当前单位"},{"id":"PORG","name":"上级单位"},{"id":"SORG","name":"下级单位"},{"id":"CURORGDEPT","name":"当前部门"},{"id":"PORGDEPT","name":"上级部门"},{"id":"SORGDEPT","name":"下级部门"}],
"entities":[
],
"appmenus":[
{
"appid":"web",
"appname":"统一工作流",
"appmenu":[{"menuid":"WFIndexView", "menuname":"WFIndexView", "menuitem":[{ "id":"menuitem1" , "name":"流程定义" },{ "id":"menuitem3" , "name":"发布新流程" },{ "id":"menuitem2" , "name":"用户组" }] }]
}
]
}
此差异已折叠。
...@@ -13,4 +13,5 @@ services: ...@@ -13,4 +13,5 @@ services:
networks: networks:
agent_network: agent_network:
driver: overlay driver: overlay
attachable: true attachable: true
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>ibzwf</artifactId>
<groupId>cn.ibizlab</groupId>
<version>1.0.0.0</version>
</parent>
<artifactId>ibzwf-util</artifactId>
<name>Ibzwf Util</name>
<description>Ibzwf Util</description>
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-security</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
</dependency>
<dependency>
<groupId>org.zalando</groupId>
<artifactId>problem-spring-web</artifactId>
</dependency>
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>com.esotericsoftware</groupId>
<artifactId>kryo-shaded</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
<!-- Swagger2 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
</dependency>
</dependencies>
</project>
...@@ -4,7 +4,7 @@ import com.github.benmanes.caffeine.cache.CaffeineSpec; ...@@ -4,7 +4,7 @@ import com.github.benmanes.caffeine.cache.CaffeineSpec;
import cn.ibizlab.util.cache.cacheManager.CaffeineCacheManager; import cn.ibizlab.util.cache.cacheManager.CaffeineCacheManager;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.cache.CacheProperties; import org.springframework.boot.autoconfigure.cache.CacheProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
...@@ -19,7 +19,7 @@ import org.springframework.util.StringUtils; ...@@ -19,7 +19,7 @@ import org.springframework.util.StringUtils;
@EnableCaching @EnableCaching
@Configuration @Configuration
@EnableConfigurationProperties(CacheProperties.class) @EnableConfigurationProperties(CacheProperties.class)
@ConditionalOnProperty("ibiz.enableCaffeineCache") @ConditionalOnExpression("'${ibiz.cacheLevel:None}'.equals('L1')")
public class CaffeineCacheConfig { public class CaffeineCacheConfig {
@Autowired @Autowired
......
...@@ -11,7 +11,7 @@ import cn.ibizlab.util.cache.redis.StringRedisSerializer; ...@@ -11,7 +11,7 @@ import cn.ibizlab.util.cache.redis.StringRedisSerializer;
import cn.ibizlab.util.enums.RedisChannelTopic; import cn.ibizlab.util.enums.RedisChannelTopic;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.cache.CacheProperties; import org.springframework.boot.autoconfigure.cache.CacheProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
...@@ -36,7 +36,7 @@ import org.springframework.util.StringUtils; ...@@ -36,7 +36,7 @@ import org.springframework.util.StringUtils;
@EnableCaching @EnableCaching
@Configuration @Configuration
@EnableConfigurationProperties(CacheProperties.class) @EnableConfigurationProperties(CacheProperties.class)
@ConditionalOnProperty("ibiz.enableRedisCache") @ConditionalOnExpression("'${ibiz.cacheLevel:None}'.equals('L2')")
public class RedisCacheConfig { public class RedisCacheConfig {
@Autowired @Autowired
......
...@@ -3,7 +3,7 @@ package cn.ibizlab.util.cache.cacheManager; ...@@ -3,7 +3,7 @@ package cn.ibizlab.util.cache.cacheManager;
import com.github.benmanes.caffeine.cache.Caffeine; import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.benmanes.caffeine.cache.CaffeineSpec; import com.github.benmanes.caffeine.cache.CaffeineSpec;
import lombok.Data; import lombok.Data;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.cache.caffeine.CaffeineCache; import org.springframework.cache.caffeine.CaffeineCache;
...@@ -22,7 +22,7 @@ import java.util.concurrent.TimeUnit; ...@@ -22,7 +22,7 @@ import java.util.concurrent.TimeUnit;
*/ */
@Data @Data
@Component @Component
@ConditionalOnProperty("ibiz.enableCaffeineCache") @ConditionalOnExpression("'${ibiz.cacheLevel:None}'.equals('L1')")
public class CaffeineCacheManager implements CacheManager { public class CaffeineCacheManager implements CacheManager {
private static final int DEFAULT_EXPIRE_AFTER_WRITE = 1; private static final int DEFAULT_EXPIRE_AFTER_WRITE = 1;
......
...@@ -5,7 +5,7 @@ import com.github.benmanes.caffeine.cache.CaffeineSpec; ...@@ -5,7 +5,7 @@ import com.github.benmanes.caffeine.cache.CaffeineSpec;
import lombok.Data; import lombok.Data;
import cn.ibizlab.util.cache.cache.LayeringCache; import cn.ibizlab.util.cache.cache.LayeringCache;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.data.redis.cache.RedisCacheConfiguration; import org.springframework.data.redis.cache.RedisCacheConfiguration;
...@@ -27,7 +27,7 @@ import java.util.concurrent.TimeUnit; ...@@ -27,7 +27,7 @@ import java.util.concurrent.TimeUnit;
*/ */
@Data @Data
@Component @Component
@ConditionalOnProperty("ibiz.enableRedisCache") @ConditionalOnExpression("'${ibiz.cacheLevel:None}'.equals('L2')")
public class LayeringCacheManager implements CacheManager { public class LayeringCacheManager implements CacheManager {
private static final int DEFAULT_EXPIRE_AFTER_WRITE = 1; private static final int DEFAULT_EXPIRE_AFTER_WRITE = 1;
......
...@@ -5,7 +5,7 @@ import cn.ibizlab.util.enums.RedisChannelTopic; ...@@ -5,7 +5,7 @@ import cn.ibizlab.util.enums.RedisChannelTopic;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.data.redis.connection.Message; import org.springframework.data.redis.connection.Message;
...@@ -22,7 +22,7 @@ import java.util.Map; ...@@ -22,7 +22,7 @@ import java.util.Map;
*/ */
@Component @Component
@ConditionalOnProperty("ibiz.enableRedisCache") @ConditionalOnExpression("'${ibiz.cacheLevel:None}'.equals('L2')")
public class RedisMessageListener extends MessageListenerAdapter { public class RedisMessageListener extends MessageListenerAdapter {
private static final Logger logger = LoggerFactory.getLogger(RedisPublisher.class); private static final Logger logger = LoggerFactory.getLogger(RedisPublisher.class);
@Autowired @Autowired
......
...@@ -3,13 +3,14 @@ package cn.ibizlab.util.client; ...@@ -3,13 +3,14 @@ package cn.ibizlab.util.client;
import cn.ibizlab.util.security.AuthenticationUser; import cn.ibizlab.util.security.AuthenticationUser;
import cn.ibizlab.util.security.AuthorizationLogin; import cn.ibizlab.util.security.AuthorizationLogin;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSONObject;
import java.util.Map; import java.util.Map;
@Component @Component
public class IBZUAAFallback implements IBZUAAFeignClient { public class IBZUAAFallback implements IBZUAAFeignClient {
@Override @Override
public Map<String, Object> pushSystemPermissionData(Map<String, Object> systemPermissionData, String systemId) { public JSONObject pushSystemPermissionData(Map<String, Object> systemPermissionData, String systemId) {
return null; return null;
} }
......
...@@ -4,6 +4,7 @@ import cn.ibizlab.util.security.AuthenticationUser; ...@@ -4,6 +4,7 @@ import cn.ibizlab.util.security.AuthenticationUser;
import cn.ibizlab.util.security.AuthorizationLogin; import cn.ibizlab.util.security.AuthorizationLogin;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.alibaba.fastjson.JSONObject;
import java.util.Map; import java.util.Map;
@FeignClient(value = "ibzuaa-api",fallback = IBZUAAFallback.class) @FeignClient(value = "ibzuaa-api",fallback = IBZUAAFallback.class)
...@@ -16,7 +17,7 @@ public interface IBZUAAFeignClient ...@@ -16,7 +17,7 @@ public interface IBZUAAFeignClient
* @return * @return
*/ */
@PostMapping("/uaa/permission/save") @PostMapping("/uaa/permission/save")
Map<String,Object> pushSystemPermissionData(@RequestBody Map<String, Object> systemPermissionData, @RequestParam("systemid") String systemId); JSONObject pushSystemPermissionData(@RequestBody Map<String, Object> systemPermissionData, @RequestParam("systemid") String systemId);
/** /**
* 用户登录 * 用户登录
......
...@@ -39,15 +39,20 @@ public class PermissionSyncJob implements ApplicationRunner { ...@@ -39,15 +39,20 @@ public class PermissionSyncJob implements ApplicationRunner {
public void run(ApplicationArguments args) { public void run(ApplicationArguments args) {
if(enablePermissionValid){ if(enablePermissionValid){
try { try {
InputStream permission= this.getClass().getResourceAsStream("/deprivs/DEPrivs.json"); //获取当前系统所有实体资源能力 InputStream permission= this.getClass().getResourceAsStream("/permission/systemResource.json"); //获取当前系统所有实体资源能力
String permissionResult = IOUtils.toString(permission,"UTF-8"); String permissionResult = IOUtils.toString(permission,"UTF-8");
JSONObject jsonNodePermission = JSONObject.parseObject(permissionResult); JSONObject jsonNodePermission = JSONObject.parseObject(permissionResult);
Map<String,Object> map=new HashMap<>(); Map<String,Object> map=new HashMap<>();
map.put("permission",jsonNodePermission); map.put("permission",jsonNodePermission);
client.pushSystemPermissionData(map,systemId); JSONObject syncResult=client.pushSystemPermissionData(map,systemId);
if(syncResult.getInteger("code")==1){
log.info("向[UAA]同步系统资源成功");
}else{
log.info(String.format("向[UAA]同步系统资源失败,失败原因为[%s]",syncResult.getString("msg")));
}
} }
catch (Exception ex) { catch (Exception ex) {
log.error(String.format("向UAA同步数据发生错误,请检查UAA服务是否正常! [%s]",ex)); log.error(String.format("向[UAA]同步系统资源失败,请检查[UAA]服务是否正常! [%s]",ex));
} }
} }
} }
......
...@@ -9,7 +9,9 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -9,7 +9,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.annotation.Autowired;
import cn.ibizlab.util.security.AuthenticationUser; import cn.ibizlab.util.security.AuthenticationUser;
import cn.ibizlab.util.service.AuthenticationUserService;
@RestController @RestController
@RequestMapping(value = "") @RequestMapping(value = "")
...@@ -18,19 +20,32 @@ public class AppController { ...@@ -18,19 +20,32 @@ public class AppController {
@Value("${ibiz.enablePermissionValid:false}") @Value("${ibiz.enablePermissionValid:false}")
boolean enablePermissionValid; //是否开启权限校验 boolean enablePermissionValid; //是否开启权限校验
@Autowired
private AuthenticationUserService userDetailsService;
@RequestMapping(method = RequestMethod.GET, value = "/appdata") @RequestMapping(method = RequestMethod.GET, value = "/appdata")
public ResponseEntity<JSONObject> getAppData() { public ResponseEntity<JSONObject> getAppData() {
JSONObject appData = new JSONObject() ; JSONObject appData = new JSONObject() ;
JSONArray uniRes=new JSONArray(); JSONArray uniRes=new JSONArray();
JSONArray appMenu=new JSONArray();
if(enablePermissionValid){ if(enablePermissionValid){
JSONObject userPermission=AuthenticationUser.getAuthenticationUser().getPermissionList(); JSONObject userPermission=AuthenticationUser.getAuthenticationUser().getPermissionList();
if(!ObjectUtils.isEmpty(userPermission)){ if(!ObjectUtils.isEmpty(userPermission)){
uniRes = userPermission.getJSONArray("unires"); uniRes = userPermission.getJSONArray("unires");
appMenu = userPermission.getJSONArray("appmenu");
} }
} }
appData.put("unires",uniRes); appData.put("unires",uniRes);
appData.put("appmenu",appMenu);
appData.put("enablepermissionvalid",enablePermissionValid); appData.put("enablepermissionvalid",enablePermissionValid);
return ResponseEntity.status(HttpStatus.OK).body(appData); return ResponseEntity.status(HttpStatus.OK).body(appData);
} }
@RequestMapping(method = RequestMethod.GET, value = "${ibiz.auth.logoutpath:v7/logout}")
public void logout() {
if(AuthenticationUser.getAuthenticationUser()!=null){
userDetailsService.resetByUsername(AuthenticationUser.getAuthenticationUser().getUsername());
}
}
} }
...@@ -78,9 +78,9 @@ ribbon: ...@@ -78,9 +78,9 @@ ribbon:
ConnectTimeout: 60000 ConnectTimeout: 60000
#系统是否开启权限验证、是否开启缓存 #系统是否开启权限验证、是否开启缓存
#缓存模式:关闭缓存(无配置项)、本地缓存(enableCaffeineCache=true-默认)、caffeine+redis两级缓存(enableRedisCache=true) #缓存级别:无缓存(无配置项)、一级缓存(L1)、二级缓存(L2)
ibiz: ibiz:
enablePermissionValid: true enablePermissionValid: true
enableCaffeineCache: true cacheLevel: L1 #一级缓存,本地caffeine缓存
#enableRedisCache: true #cacheLevel: L2 #二级缓存,本地caffeine缓存+Redis缓存
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册