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

ibizdev提交

上级 830bccba
...@@ -88,6 +88,35 @@ mock.onDelete(new RegExp(/^\/wfmembers\/batch$/)).reply((config: any) => { ...@@ -88,6 +88,35 @@ mock.onDelete(new RegExp(/^\/wfmembers\/batch$/)).reply((config: any) => {
// Select
mock.onGet(new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id','memberid'];
const matchArray:any = new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.memberid, tempValue.memberid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Select // Select
mock.onGet(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: Select"); console.groupCollapsed("实体:wfmember 方法: Select");
...@@ -145,6 +174,33 @@ mock.onGet(new RegExp(/^\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply(( ...@@ -145,6 +174,33 @@ mock.onGet(new RegExp(/^\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((
}); });
// CheckKey
mock.onPost(new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id','memberid'];
const matchArray:any = new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey // CheckKey
mock.onPost(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: CheckKey"); console.groupCollapsed("实体:wfmember 方法: CheckKey");
...@@ -210,6 +266,23 @@ mock.onPost(new RegExp(/^\/wfmembers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).rep ...@@ -210,6 +266,23 @@ mock.onPost(new RegExp(/^\/wfmembers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).rep
}); });
// GetDraft
mock.onGet(new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// GetDraft // GetDraft
mock.onGet(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/getdraft$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: GetDraft"); console.groupCollapsed("实体:wfmember 方法: GetDraft");
...@@ -243,6 +316,33 @@ mock.onGet(new RegExp(/^\/wfmembers\/getdraft$/)).reply((config: any) => { ...@@ -243,6 +316,33 @@ mock.onGet(new RegExp(/^\/wfmembers\/getdraft$/)).reply((config: any) => {
}); });
// Create
mock.onPost(new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: Create");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id','memberid'];
const matchArray:any = new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Create // Create
mock.onPost(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: Create"); console.groupCollapsed("实体:wfmember 方法: Create");
...@@ -297,6 +397,34 @@ mock.onPost(new RegExp(/^\/wfmembers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config ...@@ -297,6 +397,34 @@ mock.onPost(new RegExp(/^\/wfmembers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config
// Save
mock.onPost(new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id','memberid'];
const matchArray:any = new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Save // Save
mock.onPost(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: Save"); console.groupCollapsed("实体:wfmember 方法: Save");
...@@ -362,6 +490,33 @@ mock.onPost(new RegExp(/^\/wfmembers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply(( ...@@ -362,6 +490,33 @@ mock.onPost(new RegExp(/^\/wfmembers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((
}); });
// Update
mock.onPut(new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id','memberid'];
const matchArray:any = new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Update // Update
mock.onPut(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => { mock.onPut(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: Update"); console.groupCollapsed("实体:wfmember 方法: Update");
...@@ -428,6 +583,52 @@ mock.onPut(new RegExp(/^\/wfmembers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: ...@@ -428,6 +583,52 @@ mock.onPut(new RegExp(/^\/wfmembers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
// FetchDefault
mock.onGet(new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/fetchdefault$/).exec(config.url);
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/fetchdefault$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: FetchDefault"); console.groupCollapsed("实体:wfmember 方法: FetchDefault");
...@@ -516,28 +717,70 @@ mock.onGet(new RegExp(/^\/wfmembers\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((c ...@@ -516,28 +717,70 @@ mock.onGet(new RegExp(/^\/wfmembers\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((c
return [status, records ? records : []]; return [status, records ? records : []];
}); });
// URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id','memberid'];
const matchArray:any = new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.memberid, tempValue.memberid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Remove // Remove
mock.onDelete(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => { mock.onDelete(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: Remove"); console.groupCollapsed("实体:wfmember 方法: Remove");
...@@ -594,6 +837,34 @@ mock.onDelete(new RegExp(/^\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((confi ...@@ -594,6 +837,34 @@ mock.onDelete(new RegExp(/^\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((confi
return [status, _items?_items:{}]; return [status, _items?_items:{}];
}); });
// Get
mock.onGet(new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id','memberid'];
const matchArray:any = new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.memberid, tempValue.memberid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get // Get
mock.onGet(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/wfmembers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:wfmember 方法: Get"); console.groupCollapsed("实体:wfmember 方法: Get");
......
...@@ -1204,7 +1204,7 @@ export default class WFGroupEditViewBase extends Vue { ...@@ -1204,7 +1204,7 @@ export default class WFGroupEditViewBase extends Vue {
const _this: any = this; const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) { if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {}; const data: any = {};
_this.newdata([{ ...data }], params, $event, xData); _this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
} }
...@@ -1230,7 +1230,7 @@ export default class WFGroupEditViewBase extends Vue { ...@@ -1230,7 +1230,7 @@ export default class WFGroupEditViewBase extends Vue {
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
} }
_this.newdata([{ ...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 = {}; const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
......
...@@ -1153,7 +1153,7 @@ export default class WFGroupGridViewBase extends Vue { ...@@ -1153,7 +1153,7 @@ export default class WFGroupGridViewBase extends Vue {
const _this: any = this; const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) { if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {}; const data: any = {};
_this.newdata([{ ...data }], params, $event, xData); _this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
} }
...@@ -1231,7 +1231,7 @@ export default class WFGroupGridViewBase extends Vue { ...@@ -1231,7 +1231,7 @@ export default class WFGroupGridViewBase extends Vue {
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
} }
_this.newdata([{ ...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 = {}; const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
......
...@@ -86,6 +86,20 @@ const router = new Router({ ...@@ -86,6 +86,20 @@ const router = new Router({
}, },
component: () => import('@pages/workflow/wfuser-pickup-view/wfuser-pickup-view.vue'), component: () => import('@pages/workflow/wfuser-pickup-view/wfuser-pickup-view.vue'),
}, },
{
path: 'wfusers/:wfuser?/wfmembers/:wfmember?/editview/:editview?',
meta: {
caption: 'entities.wfmember.views.editview.caption',
parameters: [
{ pathName: 'wfindexview', parameterName: 'wfindexview' },
{ pathName: 'wfusers', parameterName: 'wfuser' },
{ pathName: 'wfmembers', parameterName: 'wfmember' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/workflow/wfmember-edit-view/wfmember-edit-view.vue'),
},
{ {
path: 'wfgroups/:wfgroup?/wfmembers/:wfmember?/editview/:editview?', path: 'wfgroups/:wfgroup?/wfmembers/:wfmember?/editview/:editview?',
meta: { meta: {
...@@ -152,6 +166,20 @@ const router = new Router({ ...@@ -152,6 +166,20 @@ const router = new Router({
}, },
component: () => import('@pages/workflow/wfgroup-mpickup-view/wfgroup-mpickup-view.vue'), component: () => import('@pages/workflow/wfgroup-mpickup-view/wfgroup-mpickup-view.vue'),
}, },
{
path: 'wfusers/:wfuser?/wfmembers/:wfmember?/gridview/:gridview?',
meta: {
caption: 'entities.wfmember.views.gridview.caption',
parameters: [
{ pathName: 'wfindexview', parameterName: 'wfindexview' },
{ pathName: 'wfusers', parameterName: 'wfuser' },
{ pathName: 'wfmembers', parameterName: 'wfmember' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/workflow/wfmember-grid-view/wfmember-grid-view.vue'),
},
{ {
path: 'wfgroups/:wfgroup?/wfmembers/:wfmember?/gridview/:gridview?', path: 'wfgroups/:wfgroup?/wfmembers/:wfmember?/gridview/:gridview?',
meta: { meta: {
...@@ -208,6 +236,19 @@ const router = new Router({ ...@@ -208,6 +236,19 @@ const router = new Router({
...indexRoutes, ...indexRoutes,
], ],
}, },
{
path: '/wfusers/:wfuser?/wfmembers/:wfmember?/gridview/:gridview?',
meta: {
caption: 'entities.wfmember.views.gridview.caption',
parameters: [
{ pathName: 'wfusers', parameterName: 'wfuser' },
{ pathName: 'wfmembers', parameterName: 'wfmember' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/workflow/wfmember-grid-view/wfmember-grid-view.vue'),
},
{ {
path: '/wfgroups/:wfgroup?/wfmembers/:wfmember?/gridview/:gridview?', path: '/wfgroups/:wfgroup?/wfmembers/:wfmember?/gridview/:gridview?',
meta: { meta: {
...@@ -305,6 +346,19 @@ const router = new Router({ ...@@ -305,6 +346,19 @@ const router = new Router({
}, },
component: () => import('@pages/workflow/wfuser-pickup-grid-view/wfuser-pickup-grid-view.vue'), component: () => import('@pages/workflow/wfuser-pickup-grid-view/wfuser-pickup-grid-view.vue'),
}, },
{
path: '/wfusers/:wfuser?/wfmembers/:wfmember?/editview/:editview?',
meta: {
caption: 'entities.wfmember.views.editview.caption',
parameters: [
{ pathName: 'wfusers', parameterName: 'wfuser' },
{ pathName: 'wfmembers', parameterName: 'wfmember' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/workflow/wfmember-edit-view/wfmember-edit-view.vue'),
},
{ {
path: '/wfgroups/:wfgroup?/wfmembers/:wfmember?/editview/:editview?', path: '/wfgroups/:wfgroup?/wfmembers/:wfmember?/editview/:editview?',
meta: { meta: {
......
...@@ -1204,7 +1204,7 @@ export default class WFMemberEditViewBase extends Vue { ...@@ -1204,7 +1204,7 @@ export default class WFMemberEditViewBase extends Vue {
const _this: any = this; const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) { if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {}; const data: any = {};
_this.newdata([{ ...data }], params, $event, xData); _this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
} }
...@@ -1230,7 +1230,7 @@ export default class WFMemberEditViewBase extends Vue { ...@@ -1230,7 +1230,7 @@ export default class WFMemberEditViewBase extends Vue {
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
} }
_this.newdata([{ ...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 = {}; const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
......
...@@ -1089,9 +1089,9 @@ export default class WFMemberGridViewBase extends Vue { ...@@ -1089,9 +1089,9 @@ export default class WFMemberGridViewBase extends Vue {
protected newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) { protected newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
const batchAddPSAppViews=[ const batchAddPSAppViews=[
{view:{viewname:'wfgroup-mpickup-view',height: 0,width: 0,title: '角色/用户组数据多项选择视图'}, {view:{viewname:'wfgroup-mpickup-view',height: 0,width: 0,title: '角色/用户组数据多项选择视图'},
res:['WFGroup']}, res:['WFGroup'],'resAppKey':'groupid'},
{view:{viewname:'wfuser-mpickup-view',height: 0,width: 0,title: '用户数据多项选择视图'}, {view:{viewname:'wfuser-mpickup-view',height: 0,width: 0,title: '用户数据多项选择视图'},
res:[]} res:['WFUser'],'resAppKey':'userid'}
]; ];
if(batchAddPSAppViews.length == 0 || !this.context.srfparentdename){ if(batchAddPSAppViews.length == 0 || !this.context.srfparentdename){
this.$Notice.warning({ title: '错误', desc: '批量添加需添加N:N关系' }); this.$Notice.warning({ title: '错误', desc: '批量添加需添加N:N关系' });
...@@ -1100,6 +1100,9 @@ export default class WFMemberGridViewBase extends Vue { ...@@ -1100,6 +1100,9 @@ export default class WFMemberGridViewBase extends Vue {
let openViewModel:any = batchAddPSAppViews.find((item:any) =>{ let openViewModel:any = batchAddPSAppViews.find((item:any) =>{
return (item.res && (item.res[0] !== this.context.srfparentdename)); return (item.res && (item.res[0] !== this.context.srfparentdename));
}) })
let otherViewModel:any = batchAddPSAppViews.find((item:any) =>{
return (item.res && (item.res[0] == this.context.srfparentdename));
})
let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]); let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
container.subscribe((result: any) => { container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
...@@ -1110,8 +1113,10 @@ export default class WFMemberGridViewBase extends Vue { ...@@ -1110,8 +1113,10 @@ export default class WFMemberGridViewBase extends Vue {
} }
let requestParam:Array<any> = []; let requestParam:Array<any> = [];
result.datas.forEach((record:any) => { result.datas.forEach((record:any) => {
record[this.appEntityService.APPDEKEY] = this.context['srfparentkey']; let tempParam:any = {};
requestParam.push(record); tempParam[otherViewModel.resAppKey] = this.context['srfparentkey'];
tempParam[openViewModel.resAppKey] = record.srfkey;
requestParam.push(tempParam);
}); });
this.appEntityService.createBatch(JSON.parse(JSON.stringify(this.context)),requestParam,true).then((response:any) =>{ this.appEntityService.createBatch(JSON.parse(JSON.stringify(this.context)),requestParam,true).then((response:any) =>{
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
...@@ -1177,7 +1182,7 @@ export default class WFMemberGridViewBase extends Vue { ...@@ -1177,7 +1182,7 @@ export default class WFMemberGridViewBase extends Vue {
const _this: any = this; const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) { if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {}; const data: any = {};
_this.newdata([{ ...data }], params, $event, xData); _this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
} }
...@@ -1255,7 +1260,7 @@ export default class WFMemberGridViewBase extends Vue { ...@@ -1255,7 +1260,7 @@ export default class WFMemberGridViewBase extends Vue {
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
} }
_this.newdata([{ ...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 = {}; const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
......
...@@ -1204,7 +1204,7 @@ export default class WFProcessDefinitionEditViewBase extends Vue { ...@@ -1204,7 +1204,7 @@ export default class WFProcessDefinitionEditViewBase extends Vue {
const _this: any = this; const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) { if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {}; const data: any = {};
_this.newdata([{ ...data }], params, $event, xData); _this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
} }
...@@ -1230,7 +1230,7 @@ export default class WFProcessDefinitionEditViewBase extends Vue { ...@@ -1230,7 +1230,7 @@ export default class WFProcessDefinitionEditViewBase extends Vue {
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
} }
_this.newdata([{ ...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 = {}; const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
......
...@@ -1153,7 +1153,7 @@ export default class WFProcessDefinitionGridViewBase extends Vue { ...@@ -1153,7 +1153,7 @@ export default class WFProcessDefinitionGridViewBase extends Vue {
const _this: any = this; const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) { if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {}; const data: any = {};
_this.newdata([{ ...data }], params, $event, xData); _this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
} }
...@@ -1231,7 +1231,7 @@ export default class WFProcessDefinitionGridViewBase extends Vue { ...@@ -1231,7 +1231,7 @@ export default class WFProcessDefinitionGridViewBase extends Vue {
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
} }
_this.newdata([{ ...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 = {}; const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
......
...@@ -1204,7 +1204,7 @@ export default class WFUserEditViewBase extends Vue { ...@@ -1204,7 +1204,7 @@ export default class WFUserEditViewBase extends Vue {
const _this: any = this; const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) { if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {}; const data: any = {};
_this.newdata([{ ...data }], params, $event, xData); _this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
} }
...@@ -1230,7 +1230,7 @@ export default class WFUserEditViewBase extends Vue { ...@@ -1230,7 +1230,7 @@ export default class WFUserEditViewBase extends Vue {
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
} }
_this.newdata([{ ...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 = {}; const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
......
...@@ -1153,7 +1153,7 @@ export default class WFUserGridViewBase extends Vue { ...@@ -1153,7 +1153,7 @@ export default class WFUserGridViewBase extends Vue {
const _this: any = this; const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) { if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {}; const data: any = {};
_this.newdata([{ ...data }], params, $event, xData); _this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
} }
...@@ -1231,7 +1231,7 @@ export default class WFUserGridViewBase extends Vue { ...@@ -1231,7 +1231,7 @@ export default class WFUserGridViewBase extends Vue {
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
} }
_this.newdata([{ ...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 = {}; const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
......
...@@ -587,12 +587,12 @@ export default class EntityService { ...@@ -587,12 +587,12 @@ export default class EntityService {
* createBatch接口方法 * createBatch接口方法
* *
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data]
* @param {boolean} [isloading] * @param {boolean} [isloading]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof EntityService * @memberof EntityService
*/ */
public async createBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async createBatch(context: any = {},data: any, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/${this.APPDENAME}/batch`,data,isloading); return Http.getInstance().post(`/${this.APPDENAME}/batch`,data,isloading);
} }
...@@ -600,12 +600,12 @@ export default class EntityService { ...@@ -600,12 +600,12 @@ export default class EntityService {
* updateBatch接口方法 * updateBatch接口方法
* *
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data]
* @param {boolean} [isloading] * @param {boolean} [isloading]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof EntityService * @memberof EntityService
*/ */
public async updateBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async updateBatch(context: any = {},data: any, isloading?: boolean): Promise<any> {
return Http.getInstance().put(`/${this.APPDENAME}/batch`,data,isloading); return Http.getInstance().put(`/${this.APPDENAME}/batch`,data,isloading);
} }
...@@ -613,12 +613,12 @@ export default class EntityService { ...@@ -613,12 +613,12 @@ export default class EntityService {
* removeBatch接口方法 * removeBatch接口方法
* *
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data]
* @param {boolean} [isloading] * @param {boolean} [isloading]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof EntityService * @memberof EntityService
*/ */
public async removeBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async removeBatch(context: any = {},data: any, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/${this.APPDENAME}/batch`,isloading,data); return Http.getInstance().delete(`/${this.APPDENAME}/batch`,isloading,data);
} }
......
...@@ -48,6 +48,9 @@ export default class WFMemberServiceBase extends EntityService { ...@@ -48,6 +48,9 @@ export default class WFMemberServiceBase extends EntityService {
* @memberof WFMemberServiceBase * @memberof WFMemberServiceBase
*/ */
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.wfuser && context.wfmember){
return Http.getInstance().get(`/wfusers/${context.wfuser}/wfmembers/${context.wfmember}/select`,isloading);
}
if(context.wfgroup && context.wfmember){ if(context.wfgroup && context.wfmember){
return Http.getInstance().get(`/wfgroups/${context.wfgroup}/wfmembers/${context.wfmember}/select`,isloading); return Http.getInstance().get(`/wfgroups/${context.wfgroup}/wfmembers/${context.wfmember}/select`,isloading);
} }
...@@ -64,6 +67,9 @@ export default class WFMemberServiceBase extends EntityService { ...@@ -64,6 +67,9 @@ export default class WFMemberServiceBase extends EntityService {
* @memberof WFMemberServiceBase * @memberof WFMemberServiceBase
*/ */
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.wfuser && context.wfmember){
return Http.getInstance().post(`/wfusers/${context.wfuser}/wfmembers/${context.wfmember}/checkkey`,data,isloading);
}
if(context.wfgroup && context.wfmember){ if(context.wfgroup && context.wfmember){
return Http.getInstance().post(`/wfgroups/${context.wfgroup}/wfmembers/${context.wfmember}/checkkey`,data,isloading); return Http.getInstance().post(`/wfgroups/${context.wfgroup}/wfmembers/${context.wfmember}/checkkey`,data,isloading);
} }
...@@ -80,6 +86,9 @@ export default class WFMemberServiceBase extends EntityService { ...@@ -80,6 +86,9 @@ export default class WFMemberServiceBase extends EntityService {
* @memberof WFMemberServiceBase * @memberof WFMemberServiceBase
*/ */
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.wfuser && true){
return Http.getInstance().get(`/wfusers/${context.wfuser}/wfmembers/getdraft`,isloading);
}
if(context.wfgroup && true){ if(context.wfgroup && true){
return Http.getInstance().get(`/wfgroups/${context.wfgroup}/wfmembers/getdraft`,isloading); return Http.getInstance().get(`/wfgroups/${context.wfgroup}/wfmembers/getdraft`,isloading);
} }
...@@ -98,6 +107,15 @@ export default class WFMemberServiceBase extends EntityService { ...@@ -98,6 +107,15 @@ export default class WFMemberServiceBase extends EntityService {
* @memberof WFMemberServiceBase * @memberof WFMemberServiceBase
*/ */
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.wfuser && true){
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
return Http.getInstance().post(`/wfusers/${context.wfuser}/wfmembers`,data,isloading);
}
if(context.wfgroup && true){ if(context.wfgroup && true){
if(!data.srffrontuf || data.srffrontuf !== "1"){ if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null; data[this.APPDEKEY] = null;
...@@ -130,6 +148,9 @@ export default class WFMemberServiceBase extends EntityService { ...@@ -130,6 +148,9 @@ export default class WFMemberServiceBase extends EntityService {
* @memberof WFMemberServiceBase * @memberof WFMemberServiceBase
*/ */
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.wfuser && context.wfmember){
return Http.getInstance().delete(`/wfusers/${context.wfuser}/wfmembers/${context.wfmember}`,isloading);
}
if(context.wfgroup && context.wfmember){ if(context.wfgroup && context.wfmember){
return Http.getInstance().delete(`/wfgroups/${context.wfgroup}/wfmembers/${context.wfmember}`,isloading); return Http.getInstance().delete(`/wfgroups/${context.wfgroup}/wfmembers/${context.wfmember}`,isloading);
} }
...@@ -147,6 +168,9 @@ export default class WFMemberServiceBase extends EntityService { ...@@ -147,6 +168,9 @@ export default class WFMemberServiceBase extends EntityService {
* @memberof WFMemberServiceBase * @memberof WFMemberServiceBase
*/ */
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.wfuser && context.wfmember){
return Http.getInstance().post(`/wfusers/${context.wfuser}/wfmembers/${context.wfmember}/save`,data,isloading);
}
if(context.wfgroup && context.wfmember){ if(context.wfgroup && context.wfmember){
return Http.getInstance().post(`/wfgroups/${context.wfgroup}/wfmembers/${context.wfmember}/save`,data,isloading); return Http.getInstance().post(`/wfgroups/${context.wfgroup}/wfmembers/${context.wfmember}/save`,data,isloading);
} }
...@@ -166,6 +190,9 @@ export default class WFMemberServiceBase extends EntityService { ...@@ -166,6 +190,9 @@ export default class WFMemberServiceBase extends EntityService {
* @memberof WFMemberServiceBase * @memberof WFMemberServiceBase
*/ */
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.wfuser && context.wfmember){
return Http.getInstance().put(`/wfusers/${context.wfuser}/wfmembers/${context.wfmember}`,data,isloading);
}
if(context.wfgroup && context.wfmember){ if(context.wfgroup && context.wfmember){
return Http.getInstance().put(`/wfgroups/${context.wfgroup}/wfmembers/${context.wfmember}`,data,isloading); return Http.getInstance().put(`/wfgroups/${context.wfgroup}/wfmembers/${context.wfmember}`,data,isloading);
} }
...@@ -185,6 +212,9 @@ export default class WFMemberServiceBase extends EntityService { ...@@ -185,6 +212,9 @@ export default class WFMemberServiceBase extends EntityService {
* @memberof WFMemberServiceBase * @memberof WFMemberServiceBase
*/ */
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.wfuser && context.wfmember){
return Http.getInstance().get(`/wfusers/${context.wfuser}/wfmembers/${context.wfmember}`,isloading);
}
if(context.wfgroup && context.wfmember){ if(context.wfgroup && context.wfmember){
return Http.getInstance().get(`/wfgroups/${context.wfgroup}/wfmembers/${context.wfmember}`,isloading); return Http.getInstance().get(`/wfgroups/${context.wfgroup}/wfmembers/${context.wfmember}`,isloading);
} }
...@@ -203,6 +233,10 @@ export default class WFMemberServiceBase extends EntityService { ...@@ -203,6 +233,10 @@ export default class WFMemberServiceBase extends EntityService {
* @memberof WFMemberServiceBase * @memberof WFMemberServiceBase
*/ */
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.wfuser && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/wfusers/${context.wfuser}/wfmembers/fetchdefault`,tempData,isloading);
}
if(context.wfgroup && true){ if(context.wfgroup && true){
let tempData:any = JSON.parse(JSON.stringify(data)); let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/wfgroups/${context.wfgroup}/wfmembers/fetchdefault`,tempData,isloading); return Http.getInstance().get(`/wfgroups/${context.wfgroup}/wfmembers/fetchdefault`,tempData,isloading);
......
...@@ -77,6 +77,7 @@ export default class WFUserServiceBase extends EntityService { ...@@ -77,6 +77,7 @@ export default class WFUserServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/wfusers/getdraft`,isloading); let res:any = await Http.getInstance().get(`/wfusers/getdraft`,isloading);
res.data.wfuser = data.wfuser; res.data.wfuser = data.wfuser;
this.tempStorage.setItem(context.srfsessionkey+'_wfmembers',JSON.stringify(res.data.wfmembers));
return res; return res;
} }
...@@ -91,8 +92,24 @@ export default class WFUserServiceBase extends EntityService { ...@@ -91,8 +92,24 @@ export default class WFUserServiceBase extends EntityService {
*/ */
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let wfmembersData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_wfmembers'),'undefined')){
wfmembersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_wfmembers') as any);
if(wfmembersData && wfmembersData.length && wfmembersData.length > 0){
wfmembersData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.memberid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.wfmembers = wfmembersData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/wfusers/${context.wfuser}/save`,data,isloading); let res:any = await Http.getInstance().post(`/wfusers/${context.wfuser}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_wfmembers',JSON.stringify(res.data.wfmembers));
return res; return res;
} }
...@@ -107,8 +124,24 @@ export default class WFUserServiceBase extends EntityService { ...@@ -107,8 +124,24 @@ export default class WFUserServiceBase extends EntityService {
*/ */
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let wfmembersData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_wfmembers'),'undefined')){
wfmembersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_wfmembers') as any);
if(wfmembersData && wfmembersData.length && wfmembersData.length > 0){
wfmembersData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.memberid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.wfmembers = wfmembersData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/wfusers/${context.wfuser}`,data,isloading); let res:any = await Http.getInstance().put(`/wfusers/${context.wfuser}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_wfmembers',JSON.stringify(res.data.wfmembers));
return res; return res;
} }
...@@ -123,6 +156,7 @@ export default class WFUserServiceBase extends EntityService { ...@@ -123,6 +156,7 @@ export default class WFUserServiceBase extends EntityService {
*/ */
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/wfusers/${context.wfuser}`,isloading); let res:any = await Http.getInstance().get(`/wfusers/${context.wfuser}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_wfmembers',JSON.stringify(res.data.wfmembers));
return res; return res;
} }
...@@ -138,6 +172,21 @@ export default class WFUserServiceBase extends EntityService { ...@@ -138,6 +172,21 @@ export default class WFUserServiceBase extends EntityService {
*/ */
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let wfmembersData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_wfmembers'),'undefined')){
wfmembersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_wfmembers') as any);
if(wfmembersData && wfmembersData.length && wfmembersData.length > 0){
wfmembersData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.memberid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.wfmembers = wfmembersData;
Object.assign(data,masterData); Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){ if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null; data[this.APPDEKEY] = null;
...@@ -147,6 +196,7 @@ export default class WFUserServiceBase extends EntityService { ...@@ -147,6 +196,7 @@ export default class WFUserServiceBase extends EntityService {
} }
let tempContext:any = JSON.parse(JSON.stringify(context)); let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/wfusers`,data,isloading); let res:any = await Http.getInstance().post(`/wfusers`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_wfmembers',JSON.stringify(res.data.wfmembers));
return res; return res;
} }
......
...@@ -78,7 +78,7 @@ export class Http { ...@@ -78,7 +78,7 @@ export class Http {
axios({ axios({
method: 'post', method: 'post',
url: url, url: url,
data: { ...params }, data: params,
headers: { 'Content-Type': 'application/json;charset=UTF-8', 'Accept': 'application/json' }, headers: { 'Content-Type': 'application/json;charset=UTF-8', 'Accept': 'application/json' },
// transformResponse: [(data: any) => { // transformResponse: [(data: any) => {
// let _data: any = null; // let _data: any = null;
......
...@@ -38,11 +38,6 @@ ...@@ -38,11 +38,6 @@
git clone -b master $para2 ibzwf/ git clone -b master $para2 ibzwf/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibzwf/ cd ibzwf/
mvn clean package -Papi
cd ibzwf-provider/ibzwf-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzwf-provider-api.yaml ibzlab-rt --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \ ...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \ sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzwf-provider-api.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzwf-provider-api.jar
EXPOSE 40003 EXPOSE 8081
ADD ibzwf-provider-api.jar /ibzwf-provider-api.jar ADD ibzwf-provider-api.jar /ibzwf-provider-api.jar
...@@ -3,11 +3,9 @@ services: ...@@ -3,11 +3,9 @@ services:
ibzwf-provider-api: ibzwf-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzwf-provider-api:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzwf-provider-api:latest
ports: ports:
- "40003:40003" - "8081:8081"
networks: networks:
- agent_network - agent_network
environment:
SPRING_CLOUD_NACOS_DISCOVERY_IP: 172.16.180.237
deploy: deploy:
mode: replicated mode: replicated
replicas: 1 replicas: 1
......
...@@ -308,6 +308,130 @@ public class WFMemberResource { ...@@ -308,6 +308,130 @@ public class WFMemberResource {
} }
@ApiOperation(value = "CheckKeyByWFUser", tags = {"WFMember" }, notes = "CheckKeyByWFUser")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/{wfuser_id}/wfmembers/checkkey")
public ResponseEntity<Boolean> checkKeyByWFUser(@PathVariable("wfuser_id") String wfuser_id, @RequestBody WFMemberDTO wfmemberdto) {
return ResponseEntity.status(HttpStatus.OK).body(wfmemberService.checkKey(wfmemberMapping.toDomain(wfmemberdto)));
}
@ApiOperation(value = "GetDraftByWFUser", tags = {"WFMember" }, notes = "GetDraftByWFUser")
@RequestMapping(method = RequestMethod.GET, value = "/wfusers/{wfuser_id}/wfmembers/getdraft")
public ResponseEntity<WFMemberDTO> getDraftByWFUser(@PathVariable("wfuser_id") String wfuser_id) {
WFMember domain = new WFMember();
domain.setUserid(wfuser_id);
return ResponseEntity.status(HttpStatus.OK).body(wfmemberMapping.toDto(wfmemberService.getDraft(domain)));
}
@ApiOperation(value = "CreateByWFUser", tags = {"WFMember" }, notes = "CreateByWFUser")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/{wfuser_id}/wfmembers")
@Transactional
public ResponseEntity<WFMemberDTO> createByWFUser(@PathVariable("wfuser_id") String wfuser_id, @RequestBody WFMemberDTO wfmemberdto) {
WFMember domain = wfmemberMapping.toDomain(wfmemberdto);
domain.setUserid(wfuser_id);
wfmemberService.create(domain);
WFMemberDTO dto = wfmemberMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "createBatchByWFUser", tags = {"WFMember" }, notes = "createBatchByWFUser")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/{wfuser_id}/wfmembers/batch")
public ResponseEntity<Boolean> createBatchByWFUser(@PathVariable("wfuser_id") String wfuser_id, @RequestBody List<WFMemberDTO> wfmemberdtos) {
List<WFMember> domainlist=wfmemberMapping.toDomain(wfmemberdtos);
for(WFMember domain:domainlist){
domain.setUserid(wfuser_id);
}
wfmemberService.createBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "RemoveByWFUser", tags = {"WFMember" }, notes = "RemoveByWFUser")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/{wfuser_id}/wfmembers/{wfmember_id}")
@Transactional
public ResponseEntity<Boolean> removeByWFUser(@PathVariable("wfuser_id") String wfuser_id, @PathVariable("wfmember_id") String wfmember_id) {
return ResponseEntity.status(HttpStatus.OK).body(wfmemberService.remove(wfmember_id));
}
@ApiOperation(value = "RemoveBatchByWFUser", tags = {"WFMember" }, notes = "RemoveBatchByWFUser")
@RequestMapping(method = RequestMethod.DELETE, value = "/wfusers/{wfuser_id}/wfmembers/batch")
public ResponseEntity<Boolean> removeBatchByWFUser(@RequestBody List<String> ids) {
wfmemberService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "SaveByWFUser", tags = {"WFMember" }, notes = "SaveByWFUser")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/{wfuser_id}/wfmembers/save")
public ResponseEntity<Boolean> saveByWFUser(@PathVariable("wfuser_id") String wfuser_id, @RequestBody WFMemberDTO wfmemberdto) {
WFMember domain = wfmemberMapping.toDomain(wfmemberdto);
domain.setUserid(wfuser_id);
return ResponseEntity.status(HttpStatus.OK).body(wfmemberService.save(domain));
}
@ApiOperation(value = "SaveBatchByWFUser", tags = {"WFMember" }, notes = "SaveBatchByWFUser")
@RequestMapping(method = RequestMethod.POST, value = "/wfusers/{wfuser_id}/wfmembers/savebatch")
public ResponseEntity<Boolean> saveBatchByWFUser(@PathVariable("wfuser_id") String wfuser_id, @RequestBody List<WFMemberDTO> wfmemberdtos) {
List<WFMember> domainlist=wfmemberMapping.toDomain(wfmemberdtos);
for(WFMember domain:domainlist){
domain.setUserid(wfuser_id);
}
wfmemberService.saveBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "UpdateByWFUser", tags = {"WFMember" }, notes = "UpdateByWFUser")
@RequestMapping(method = RequestMethod.PUT, value = "/wfusers/{wfuser_id}/wfmembers/{wfmember_id}")
@Transactional
public ResponseEntity<WFMemberDTO> updateByWFUser(@PathVariable("wfuser_id") String wfuser_id, @PathVariable("wfmember_id") String wfmember_id, @RequestBody WFMemberDTO wfmemberdto) {
WFMember domain = wfmemberMapping.toDomain(wfmemberdto);
domain.setUserid(wfuser_id);
domain.setMemberid(wfmember_id);
wfmemberService.update(domain);
WFMemberDTO dto = wfmemberMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "UpdateBatchByWFUser", tags = {"WFMember" }, notes = "UpdateBatchByWFUser")
@RequestMapping(method = RequestMethod.PUT, value = "/wfusers/{wfuser_id}/wfmembers/batch")
public ResponseEntity<Boolean> updateBatchByWFUser(@PathVariable("wfuser_id") String wfuser_id, @RequestBody List<WFMemberDTO> wfmemberdtos) {
List<WFMember> domainlist=wfmemberMapping.toDomain(wfmemberdtos);
for(WFMember domain:domainlist){
domain.setUserid(wfuser_id);
}
wfmemberService.updateBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "GetByWFUser", tags = {"WFMember" }, notes = "GetByWFUser")
@RequestMapping(method = RequestMethod.GET, value = "/wfusers/{wfuser_id}/wfmembers/{wfmember_id}")
public ResponseEntity<WFMemberDTO> getByWFUser(@PathVariable("wfuser_id") String wfuser_id, @PathVariable("wfmember_id") String wfmember_id) {
WFMember domain = wfmemberService.get(wfmember_id);
WFMemberDTO dto = wfmemberMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "fetchDEFAULTByWFUser", tags = {"WFMember" } ,notes = "fetchDEFAULTByWFUser")
@RequestMapping(method= RequestMethod.GET , value="/wfusers/{wfuser_id}/wfmembers/fetchdefault")
public ResponseEntity<List<WFMemberDTO>> fetchWFMemberDefaultByWFUser(@PathVariable("wfuser_id") String wfuser_id,WFMemberSearchContext context) {
context.setN_userid_eq(wfuser_id);
Page<WFMember> domains = wfmemberService.searchDefault(context) ;
List<WFMemberDTO> list = wfmemberMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@ApiOperation(value = "searchDEFAULTByWFUser", tags = {"WFMember" } ,notes = "searchDEFAULTByWFUser")
@RequestMapping(method= RequestMethod.GET , value="/wfusers/{wfuser_id}/wfmembers/searchdefault")
public ResponseEntity<Page<WFMemberDTO>> searchWFMemberDefaultByWFUser(@PathVariable("wfuser_id") String wfuser_id,WFMemberSearchContext context) {
context.setN_userid_eq(wfuser_id);
Page<WFMember> domains = wfmemberService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(wfmemberMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
/** /**
* 用户权限校验 * 用户权限校验
* @return * @return
......
server: server:
port: 40003 port: 8081
\ No newline at end of file \ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册