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

ibizdev提交

上级 6e63f78e
...@@ -1127,16 +1127,36 @@ export default class SYS_PERMISSIONEditViewBase extends Vue { ...@@ -1127,16 +1127,36 @@ export default class SYS_PERMISSIONEditViewBase extends Vue {
}); });
} }
} }
!!!!模版产生代码错误:---- /**
Tip: It's the step after the last dot that caused this error, not those before it. * 开始流程
---- *
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? * @param {any[]} args 当前数据
---- * @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
---- * @param {*} [$event] 事件源
FTL stack trace ("~" means nesting-related): * @param {*} [xData] 执行行为所需当前部件
- Failed at: #if item.getPSControlContainer()?? &&... [in template "TEMPLCODE_zh_CN" at line 17, column 9] * @param {*} [actionContext] 执行行为上下文
---- * @memberof SYS_PERMISSIONEditViewBase
*/
protected SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}
});
}
/** /**
* 当前流程步骤 * 当前流程步骤
* *
......
...@@ -1159,16 +1159,36 @@ export default class SYS_PERMISSIONEditView2Base extends Vue { ...@@ -1159,16 +1159,36 @@ export default class SYS_PERMISSIONEditView2Base extends Vue {
}); });
} }
} }
!!!!模版产生代码错误:---- /**
Tip: It's the step after the last dot that caused this error, not those before it. * 开始流程
---- *
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? * @param {any[]} args 当前数据
---- * @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
---- * @param {*} [$event] 事件源
FTL stack trace ("~" means nesting-related): * @param {*} [xData] 执行行为所需当前部件
- Failed at: #if item.getPSControlContainer()?? &&... [in template "TEMPLCODE_zh_CN" at line 17, column 9] * @param {*} [actionContext] 执行行为上下文
---- * @memberof SYS_PERMISSIONEditView2Base
*/
protected SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}
});
}
/** /**
* 当前流程步骤 * 当前流程步骤
* *
......
...@@ -1127,16 +1127,36 @@ export default class SYS_ROLE_PERMISSIONEditViewBase extends Vue { ...@@ -1127,16 +1127,36 @@ export default class SYS_ROLE_PERMISSIONEditViewBase extends Vue {
}); });
} }
} }
!!!!模版产生代码错误:---- /**
Tip: It's the step after the last dot that caused this error, not those before it. * 开始流程
---- *
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? * @param {any[]} args 当前数据
---- * @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
---- * @param {*} [$event] 事件源
FTL stack trace ("~" means nesting-related): * @param {*} [xData] 执行行为所需当前部件
- Failed at: #if item.getPSControlContainer()?? &&... [in template "TEMPLCODE_zh_CN" at line 17, column 9] * @param {*} [actionContext] 执行行为上下文
---- * @memberof SYS_ROLE_PERMISSIONEditViewBase
*/
protected SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}
});
}
/** /**
* 当前流程步骤 * 当前流程步骤
* *
......
...@@ -1159,16 +1159,36 @@ export default class SYS_ROLE_PERMISSIONEditView2Base extends Vue { ...@@ -1159,16 +1159,36 @@ export default class SYS_ROLE_PERMISSIONEditView2Base extends Vue {
}); });
} }
} }
!!!!模版产生代码错误:---- /**
Tip: It's the step after the last dot that caused this error, not those before it. * 开始流程
---- *
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? * @param {any[]} args 当前数据
---- * @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
---- * @param {*} [$event] 事件源
FTL stack trace ("~" means nesting-related): * @param {*} [xData] 执行行为所需当前部件
- Failed at: #if item.getPSControlContainer()?? &&... [in template "TEMPLCODE_zh_CN" at line 17, column 9] * @param {*} [actionContext] 执行行为上下文
---- * @memberof SYS_ROLE_PERMISSIONEditView2Base
*/
protected SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}
});
}
/** /**
* 当前流程步骤 * 当前流程步骤
* *
......
...@@ -1127,16 +1127,36 @@ export default class SYS_ROLEEditViewBase extends Vue { ...@@ -1127,16 +1127,36 @@ export default class SYS_ROLEEditViewBase extends Vue {
}); });
} }
} }
!!!!模版产生代码错误:---- /**
Tip: It's the step after the last dot that caused this error, not those before it. * 开始流程
---- *
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? * @param {any[]} args 当前数据
---- * @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
---- * @param {*} [$event] 事件源
FTL stack trace ("~" means nesting-related): * @param {*} [xData] 执行行为所需当前部件
- Failed at: #if item.getPSControlContainer()?? &&... [in template "TEMPLCODE_zh_CN" at line 17, column 9] * @param {*} [actionContext] 执行行为上下文
---- * @memberof SYS_ROLEEditViewBase
*/
protected SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}
});
}
/** /**
* 当前流程步骤 * 当前流程步骤
* *
......
...@@ -1159,16 +1159,36 @@ export default class SYS_ROLEEditView2Base extends Vue { ...@@ -1159,16 +1159,36 @@ export default class SYS_ROLEEditView2Base extends Vue {
}); });
} }
} }
!!!!模版产生代码错误:---- /**
Tip: It's the step after the last dot that caused this error, not those before it. * 开始流程
---- *
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? * @param {any[]} args 当前数据
---- * @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
---- * @param {*} [$event] 事件源
FTL stack trace ("~" means nesting-related): * @param {*} [xData] 执行行为所需当前部件
- Failed at: #if item.getPSControlContainer()?? &&... [in template "TEMPLCODE_zh_CN" at line 17, column 9] * @param {*} [actionContext] 执行行为上下文
---- * @memberof SYS_ROLEEditView2Base
*/
protected SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}
});
}
/** /**
* 当前流程步骤 * 当前流程步骤
* *
......
...@@ -1127,16 +1127,36 @@ export default class SYS_USER_ROLEEditViewBase extends Vue { ...@@ -1127,16 +1127,36 @@ export default class SYS_USER_ROLEEditViewBase extends Vue {
}); });
} }
} }
!!!!模版产生代码错误:---- /**
Tip: It's the step after the last dot that caused this error, not those before it. * 开始流程
---- *
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? * @param {any[]} args 当前数据
---- * @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
---- * @param {*} [$event] 事件源
FTL stack trace ("~" means nesting-related): * @param {*} [xData] 执行行为所需当前部件
- Failed at: #if item.getPSControlContainer()?? &&... [in template "TEMPLCODE_zh_CN" at line 17, column 9] * @param {*} [actionContext] 执行行为上下文
---- * @memberof SYS_USER_ROLEEditViewBase
*/
protected SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}
});
}
/** /**
* 当前流程步骤 * 当前流程步骤
* *
......
...@@ -1159,16 +1159,36 @@ export default class SYS_USER_ROLEEditView2Base extends Vue { ...@@ -1159,16 +1159,36 @@ export default class SYS_USER_ROLEEditView2Base extends Vue {
}); });
} }
} }
!!!!模版产生代码错误:---- /**
Tip: It's the step after the last dot that caused this error, not those before it. * 开始流程
---- *
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? * @param {any[]} args 当前数据
---- * @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
---- * @param {*} [$event] 事件源
FTL stack trace ("~" means nesting-related): * @param {*} [xData] 执行行为所需当前部件
- Failed at: #if item.getPSControlContainer()?? &&... [in template "TEMPLCODE_zh_CN" at line 17, column 9] * @param {*} [actionContext] 执行行为上下文
---- * @memberof SYS_USER_ROLEEditView2Base
*/
protected SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}
});
}
/** /**
* 当前流程步骤 * 当前流程步骤
* *
......
...@@ -1127,16 +1127,36 @@ export default class SYS_USEREditViewBase extends Vue { ...@@ -1127,16 +1127,36 @@ export default class SYS_USEREditViewBase extends Vue {
}); });
} }
} }
!!!!模版产生代码错误:---- /**
Tip: It's the step after the last dot that caused this error, not those before it. * 开始流程
---- *
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? * @param {any[]} args 当前数据
---- * @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
---- * @param {*} [$event] 事件源
FTL stack trace ("~" means nesting-related): * @param {*} [xData] 执行行为所需当前部件
- Failed at: #if item.getPSControlContainer()?? &&... [in template "TEMPLCODE_zh_CN" at line 17, column 9] * @param {*} [actionContext] 执行行为上下文
---- * @memberof SYS_USEREditViewBase
*/
protected SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}
});
}
/** /**
* 当前流程步骤 * 当前流程步骤
* *
......
...@@ -1159,16 +1159,36 @@ export default class SYS_USEREditView2Base extends Vue { ...@@ -1159,16 +1159,36 @@ export default class SYS_USEREditView2Base extends Vue {
}); });
} }
} }
!!!!模版产生代码错误:---- /**
Tip: It's the step after the last dot that caused this error, not those before it. * 开始流程
---- *
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? * @param {any[]} args 当前数据
---- * @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
---- * @param {*} [$event] 事件源
FTL stack trace ("~" means nesting-related): * @param {*} [xData] 执行行为所需当前部件
- Failed at: #if item.getPSControlContainer()?? &&... [in template "TEMPLCODE_zh_CN" at line 17, column 9] * @param {*} [actionContext] 执行行为上下文
---- * @memberof SYS_USEREditView2Base
*/
protected SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}
});
}
/** /**
* 当前流程步骤 * 当前流程步骤
* *
......
...@@ -1242,14 +1242,10 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1242,14 +1242,10 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
protected async wfstart(data: any,localdata?:any): Promise<any> { protected async wfstart(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.WFStartAction){
this.$Notice.error({ title: '错误', desc: 'WFCIDEditView视图表单WFStartAction参数未配置' });
return;
}
const _this: any = this; const _this: any = this;
const arg: any = data[0]; const arg: any = data[0];
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = Object.is(data.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
post.then((response:any) =>{ post.then((response:any) =>{
const arg:any = response.data; const arg:any = response.data;
if(this.viewparams){ if(this.viewparams){
...@@ -1302,17 +1298,13 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1302,17 +1298,13 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
protected async wfsubmit(data: any,localdata?:any): Promise<any> { protected async wfsubmit(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.WFSubmitAction){
this.$Notice.error({ title: '错误', desc: 'SYS_PERMISSIONEditView视图表单WFSubmitAction参数未配置' });
return;
}
const _this: any = this; const _this: any = this;
const arg: any = data[0]; const arg: any = data[0];
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
if (!arg.sys_permission || Object.is(arg.sys_permission, '')) { if (!arg.sys_permission || Object.is(arg.sys_permission, '')) {
return; return;
} }
const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata); const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
post.then((response:any) =>{ post.then((response:any) =>{
const arg:any = response.data; const arg:any = response.data;
if(this.viewparams){ if(this.viewparams){
......
...@@ -1335,14 +1335,10 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1335,14 +1335,10 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
protected async wfstart(data: any,localdata?:any): Promise<any> { protected async wfstart(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.WFStartAction){
this.$Notice.error({ title: '错误', desc: 'WFCIDEditView视图表单WFStartAction参数未配置' });
return;
}
const _this: any = this; const _this: any = this;
const arg: any = data[0]; const arg: any = data[0];
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = Object.is(data.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
post.then((response:any) =>{ post.then((response:any) =>{
const arg:any = response.data; const arg:any = response.data;
if(this.viewparams){ if(this.viewparams){
...@@ -1395,17 +1391,13 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1395,17 +1391,13 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
protected async wfsubmit(data: any,localdata?:any): Promise<any> { protected async wfsubmit(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.WFSubmitAction){
this.$Notice.error({ title: '错误', desc: 'SYS_ROLE_PERMISSIONEditView2视图表单WFSubmitAction参数未配置' });
return;
}
const _this: any = this; const _this: any = this;
const arg: any = data[0]; const arg: any = data[0];
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
if (!arg.sys_role_permission || Object.is(arg.sys_role_permission, '')) { if (!arg.sys_role_permission || Object.is(arg.sys_role_permission, '')) {
return; return;
} }
const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata); const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
post.then((response:any) =>{ post.then((response:any) =>{
const arg:any = response.data; const arg:any = response.data;
if(this.viewparams){ if(this.viewparams){
......
...@@ -1260,14 +1260,10 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1260,14 +1260,10 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
protected async wfstart(data: any,localdata?:any): Promise<any> { protected async wfstart(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.WFStartAction){
this.$Notice.error({ title: '错误', desc: 'WFCIDEditView视图表单WFStartAction参数未配置' });
return;
}
const _this: any = this; const _this: any = this;
const arg: any = data[0]; const arg: any = data[0];
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = Object.is(data.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
post.then((response:any) =>{ post.then((response:any) =>{
const arg:any = response.data; const arg:any = response.data;
if(this.viewparams){ if(this.viewparams){
...@@ -1320,17 +1316,13 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1320,17 +1316,13 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
protected async wfsubmit(data: any,localdata?:any): Promise<any> { protected async wfsubmit(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.WFSubmitAction){
this.$Notice.error({ title: '错误', desc: 'SYS_ROLEEditView视图表单WFSubmitAction参数未配置' });
return;
}
const _this: any = this; const _this: any = this;
const arg: any = data[0]; const arg: any = data[0];
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
if (!arg.sys_role || Object.is(arg.sys_role, '')) { if (!arg.sys_role || Object.is(arg.sys_role, '')) {
return; return;
} }
const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata); const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
post.then((response:any) =>{ post.then((response:any) =>{
const arg:any = response.data; const arg:any = response.data;
if(this.viewparams){ if(this.viewparams){
......
...@@ -1376,14 +1376,10 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1376,14 +1376,10 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
protected async wfstart(data: any,localdata?:any): Promise<any> { protected async wfstart(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.WFStartAction){
this.$Notice.error({ title: '错误', desc: 'WFCIDEditView视图表单WFStartAction参数未配置' });
return;
}
const _this: any = this; const _this: any = this;
const arg: any = data[0]; const arg: any = data[0];
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = Object.is(data.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
post.then((response:any) =>{ post.then((response:any) =>{
const arg:any = response.data; const arg:any = response.data;
if(this.viewparams){ if(this.viewparams){
...@@ -1436,17 +1432,13 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1436,17 +1432,13 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
protected async wfsubmit(data: any,localdata?:any): Promise<any> { protected async wfsubmit(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.WFSubmitAction){
this.$Notice.error({ title: '错误', desc: 'SYS_USER_ROLEEditView2视图表单WFSubmitAction参数未配置' });
return;
}
const _this: any = this; const _this: any = this;
const arg: any = data[0]; const arg: any = data[0];
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
if (!arg.sys_user_role || Object.is(arg.sys_user_role, '')) { if (!arg.sys_user_role || Object.is(arg.sys_user_role, '')) {
return; return;
} }
const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata); const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
post.then((response:any) =>{ post.then((response:any) =>{
const arg:any = response.data; const arg:any = response.data;
if(this.viewparams){ if(this.viewparams){
......
...@@ -1225,14 +1225,10 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1225,14 +1225,10 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
protected async wfstart(data: any,localdata?:any): Promise<any> { protected async wfstart(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.WFStartAction){
this.$Notice.error({ title: '错误', desc: 'WFCIDEditView视图表单WFStartAction参数未配置' });
return;
}
const _this: any = this; const _this: any = this;
const arg: any = data[0]; const arg: any = data[0];
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = Object.is(data.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
post.then((response:any) =>{ post.then((response:any) =>{
const arg:any = response.data; const arg:any = response.data;
if(this.viewparams){ if(this.viewparams){
...@@ -1285,17 +1281,13 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1285,17 +1281,13 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
protected async wfsubmit(data: any,localdata?:any): Promise<any> { protected async wfsubmit(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.WFSubmitAction){
this.$Notice.error({ title: '错误', desc: 'SYS_USEREditView视图表单WFSubmitAction参数未配置' });
return;
}
const _this: any = this; const _this: any = this;
const arg: any = data[0]; const arg: any = data[0];
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
if (!arg.sys_user || Object.is(arg.sys_user, '')) { if (!arg.sys_user || Object.is(arg.sys_user, '')) {
return; return;
} }
const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata); const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
post.then((response:any) =>{ post.then((response:any) =>{
const arg:any = response.data; const arg:any = response.data;
if(this.viewparams){ if(this.viewparams){
......
...@@ -38,11 +38,6 @@ ...@@ -38,11 +38,6 @@
git clone -b master $para2 ibzuaa/ git clone -b master $para2 ibzuaa/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibzuaa/ cd ibzuaa/
mvn clean package -Papi
cd ibzuaa-provider/ibzuaa-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzuaa-provider-api.yaml dev --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 /ibzuaa-provider-api.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzuaa-provider-api.jar
EXPOSE 40002 EXPOSE 8081
ADD ibzuaa-provider-api.jar /ibzuaa-provider-api.jar ADD ibzuaa-provider-api.jar /ibzuaa-provider-api.jar
...@@ -3,11 +3,9 @@ services: ...@@ -3,11 +3,9 @@ services:
ibzuaa-provider-api: ibzuaa-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-provider-api:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-provider-api:latest
ports: ports:
- "40002:40002" - "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
......
server: server:
port: 40002 port: 8081
\ No newline at end of file \ No newline at end of file
...@@ -18,4 +18,8 @@ public class IBZUAAFallback implements IBZUAAFeignClient { ...@@ -18,4 +18,8 @@ public class IBZUAAFallback implements IBZUAAFeignClient {
return null; return null;
} }
@Override
public AuthenticationUser loginByUsername(String username) {
return null;
}
} }
...@@ -26,4 +26,7 @@ public interface IBZUAAFeignClient ...@@ -26,4 +26,7 @@ public interface IBZUAAFeignClient
@PostMapping(value = "/uaa/login") @PostMapping(value = "/uaa/login")
AuthenticationUser login(@RequestBody AuthorizationLogin authorizationLogin); AuthenticationUser login(@RequestBody AuthorizationLogin authorizationLogin);
@PostMapping(value = "/uaa/loginbyusername")
AuthenticationUser loginByUsername(@RequestBody String username);
} }
...@@ -33,7 +33,7 @@ public class AuthenticationController ...@@ -33,7 +33,7 @@ public class AuthenticationController
@PostMapping(value = "${ibiz.auth.path:v7/login}") @PostMapping(value = "${ibiz.auth.path:v7/login}")
public ResponseEntity<AuthenticationInfo> login(@Validated @RequestBody AuthorizationLogin authorizationLogin){ public ResponseEntity<AuthenticationInfo> login(@Validated @RequestBody AuthorizationLogin authorizationLogin){
userDetailsService.resetByUsername(authorizationLogin.getUsername()); userDetailsService.resetByUsername(authorizationLogin.getUsername());
final AuthenticationUser authuserdetail = userDetailsService.loadUserByLogin(authorizationLogin.getDomain(),authorizationLogin.getLoginname(),authorizationLogin.getPassword()); final AuthenticationUser authuserdetail = userDetailsService.loadUserByLogin(authorizationLogin.getUsername(),authorizationLogin.getPassword());
// 生成令牌 // 生成令牌
final String token = jwtTokenUtil.generateToken(authuserdetail); final String token = jwtTokenUtil.generateToken(authuserdetail);
// 返回 token // 返回 token
......
...@@ -13,16 +13,14 @@ import org.springframework.stereotype.Service; ...@@ -13,16 +13,14 @@ import org.springframework.stereotype.Service;
public interface AuthenticationUserService extends UserDetailsService { public interface AuthenticationUserService extends UserDetailsService {
@Override @Override
@Cacheable( value="ibzdict_users",key = "'getByUsername:'+#p0") @Cacheable( value="ibzuaa_users",key = "'getByUsername:'+#p0")
AuthenticationUser loadUserByUsername(String username); AuthenticationUser loadUserByUsername(String username);
@Cacheable( value="ibzdict_users",key = "'getByUsername:'+#p0") @Cacheable( value="ibzuaa_users",key = "'getByUsername:'+#p0")
AuthenticationUser loadUserByLogin(String username,String password); AuthenticationUser loadUserByLogin(String username,String password);
@Cacheable( value="ibzdict_users",key = "'getByUsername:'+#p1") @CacheEvict( value="ibzuaa_users",key = "'getByUsername:'+#p0")
AuthenticationUser loadUserByLogin(String domain,String username,String password);
@CacheEvict( value="ibzdict_users",key = "'getByUsername:'+#p0")
void resetByUsername(String username); void resetByUsername(String username);
} }
...@@ -2,6 +2,7 @@ package cn.ibizlab.util.service; ...@@ -2,6 +2,7 @@ package cn.ibizlab.util.service;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import cn.ibizlab.util.client.IBZOUFeignClient; import cn.ibizlab.util.client.IBZOUFeignClient;
import cn.ibizlab.util.errors.BadRequestAlertException;
import cn.ibizlab.util.client.IBZUAAFeignClient; import cn.ibizlab.util.client.IBZUAAFeignClient;
import cn.ibizlab.util.security.AuthenticationUser; import cn.ibizlab.util.security.AuthenticationUser;
import cn.ibizlab.util.security.AuthorizationLogin; import cn.ibizlab.util.security.AuthorizationLogin;
...@@ -15,7 +16,6 @@ import org.springframework.util.StringUtils; ...@@ -15,7 +16,6 @@ import org.springframework.util.StringUtils;
/** /**
* 实体[IBZUSER] 服务对象接口实现 * 实体[IBZUSER] 服务对象接口实现
*/ */
//@Primary
@Service("IBZUAAUserService") @Service("IBZUAAUserService")
public class IBZUAAUserService implements AuthenticationUserService{ public class IBZUAAUserService implements AuthenticationUserService{
...@@ -25,39 +25,32 @@ public class IBZUAAUserService implements AuthenticationUserService{ ...@@ -25,39 +25,32 @@ public class IBZUAAUserService implements AuthenticationUserService{
@Override @Override
public AuthenticationUser loadUserByUsername(String username) { public AuthenticationUser loadUserByUsername(String username) {
AuthenticationUser user=uaaFeignClient.loginByUsername(username);
if(user==null)
throw new BadRequestAlertException("登录失败","IBZUAAUser",username);
return user;
}
@Override
public AuthenticationUser loadUserByLogin(String username, String password) {
String[] data=username.split("[|]"); String[] data=username.split("[|]");
String loginname=username; String loginname=username;
String domains=""; String domains="";
String password="";
if(data.length==3) { if(data.length==2) {
loginname=data[0].trim(); loginname=data[0].trim();
domains=data[1].trim(); domains=data[1].trim();
password=data[2].trim();
}
else if(data.length==2) {
loginname=data[0].trim();
password=data[1].trim();
} }
AuthorizationLogin user = new AuthorizationLogin(); AuthorizationLogin logininfo = new AuthorizationLogin();
user.setDomain(domains); logininfo.setDomain(domains);
user.setLoginname(loginname); logininfo.setLoginname(loginname);
user.setPassword(password); logininfo.setPassword(password);
return uaaFeignClient.login(user); AuthenticationUser user=uaaFeignClient.login(logininfo);
if(user==null)
throw new BadRequestAlertException("登录失败","IBZUAAUser",username);
return user;
} }
@Override
public AuthenticationUser loadUserByLogin(String username, String password) {
AuthenticationUser authuserdetail = loadUserByUsername(username+"|"+password);
return authuserdetail;
}
@Override
public AuthenticationUser loadUserByLogin(String domain, String username, String password) {
if(!StringUtils.isEmpty(domain))
username = username+"|"+domain;
return loadUserByLogin(username,password);
}
@Override @Override
public void resetByUsername(String username) { public void resetByUsername(String username) {
......
...@@ -62,12 +62,6 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl ...@@ -62,12 +62,6 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl
return authuserdetail; return authuserdetail;
} }
@Override
public AuthenticationUser loadUserByLogin(String domain, String username, String password) {
if(!StringUtils.isEmpty(domain))
username = username+"|"+domain;
return loadUserByLogin(username,password);
}
public void resetByUsername(String username) { public void resetByUsername(String username) {
......
...@@ -19,12 +19,6 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -19,12 +19,6 @@ import org.springframework.beans.factory.annotation.Value;
@Service("SimpleUserService") @Service("SimpleUserService")
public class SimpleUserService implements AuthenticationUserService{ public class SimpleUserService implements AuthenticationUserService{
@Value("${ibiz.enablePermissionValid:false}")
boolean enablePermissionValid; //是否开启权限校验
@Value("${ibiz.systemid:2C40DFCD-0DF5-47BF-91A5-C45F810B0001}")
private String systemid;
@Override @Override
public AuthenticationUser loadUserByUsername(String username) { public AuthenticationUser loadUserByUsername(String username) {
AuthenticationUser user = new AuthenticationUser(); AuthenticationUser user = new AuthenticationUser();
...@@ -33,17 +27,12 @@ public class SimpleUserService implements AuthenticationUserService{ ...@@ -33,17 +27,12 @@ public class SimpleUserService implements AuthenticationUserService{
String domains=""; String domains="";
String password=""; String password="";
if(data.length==3) { if(data.length==2) {
loginname=data[0].trim(); loginname=data[0].trim();
domains=data[1].trim(); domains=data[1].trim();
password=data[2].trim();
}
else if(data.length==2) {
loginname=data[0].trim();
password=data[1].trim();
} }
user.setUserid(DigestUtils.md5DigestAsHex(username.getBytes())); user.setUserid(username);
user.setUsercode(loginname); user.setUsercode(loginname);
user.setUsername(username); user.setUsername(username);
user.setLoginname(loginname); user.setLoginname(loginname);
...@@ -59,17 +48,11 @@ public class SimpleUserService implements AuthenticationUserService{ ...@@ -59,17 +48,11 @@ public class SimpleUserService implements AuthenticationUserService{
@Override @Override
public AuthenticationUser loadUserByLogin(String username, String password) { public AuthenticationUser loadUserByLogin(String username, String password) {
password = DigestUtils.md5DigestAsHex(String.format("%1$s||%2$s", username, password).getBytes()); AuthenticationUser authuserdetail = loadUserByUsername(username);
AuthenticationUser authuserdetail = loadUserByUsername(username+"|"+password);
return authuserdetail; return authuserdetail;
} }
@Override
public AuthenticationUser loadUserByLogin(String domain, String username, String password) {
if(!StringUtils.isEmpty(domain))
username = username+"|"+domain;
return loadUserByLogin(username,password);
}
@Override @Override
public void resetByUsername(String username) { public void resetByUsername(String username) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册