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

xignzi006 部署微服务应用

上级 cd874362
......@@ -7,6 +7,33 @@
"appdedataset":"",
"items": []
},
{
"srfkey": "ContentType",
"emptytext": "未定义",
"codelisttype":"static",
"items": [
{
"id": "CONTENT",
"label": "内容",
"text": "内容",
"data":"",
"codename":"Content",
"value": "CONTENT",
"disabled": false
}
, {
"id": "LINK",
"label": "链接",
"text": "链接",
"data":"",
"codename":"Link",
"value": "LINK",
"disabled": false
}
]
},
{
"srfkey": "YesNo",
"emptytext": "未定义",
......
......@@ -2,6 +2,11 @@ export default {
SysOperator: {
"empty": "",
},
ContentType: {
"CONTENT": "内容",
"LINK": "链接",
"empty": ""
},
YesNo: {
"1": "是",
"0": "否",
......
......@@ -2,6 +2,11 @@ export default {
SysOperator: {
"empty": "",
},
ContentType: {
"CONTENT": "内容",
"LINK": "链接",
"empty": "",
},
YesNo: {
"1": "是",
"0": "否",
......
......@@ -101,33 +101,41 @@ export default {
},
},
editviewtoolbar_toolbar: {
deuiaction4: {
caption: "Edit",
tip: "Edit {0}",
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Save And New",
tip: "Save And New",
},
seperator4: {
caption: "",
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem6: {
caption: "-",
tip: "",
},
deuiaction1: {
tbitem7: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
seperator2: {
caption: "",
tbitem8: {
caption: "-",
tip: "",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
tbitem12: {
caption: "New",
tip: "New",
},
seperator1: {
caption: "",
tbitem13: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "关闭",
tip: "关闭",
tbitem14: {
caption: "Copy",
tip: "Copy {0}",
},
},
};
\ No newline at end of file
......@@ -100,33 +100,41 @@ export default {
},
},
editviewtoolbar_toolbar: {
deuiaction4: {
caption: "编辑",
tip: "编辑",
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: "保存并新建",
tip: "保存并新建",
},
seperator4: {
caption: "",
tbitem5: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem6: {
caption: "-",
tip: "",
},
deuiaction1: {
tbitem7: {
caption: "删除并关闭",
tip: "删除并关闭",
},
seperator2: {
caption: "",
tbitem8: {
caption: "-",
tip: "",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
tbitem12: {
caption: "新建",
tip: "新建",
},
seperator1: {
caption: "",
tbitem13: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "关闭",
tip: "关闭",
tbitem14: {
caption: "拷贝",
tip: "拷贝",
},
},
};
\ No newline at end of file
......@@ -75,33 +75,41 @@ export default {
},
},
editviewtoolbar_toolbar: {
deuiaction4: {
caption: "Edit",
tip: "Edit {0}",
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Save And New",
tip: "Save And New",
},
seperator4: {
caption: "",
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem6: {
caption: "-",
tip: "",
},
deuiaction1: {
tbitem7: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
seperator2: {
caption: "",
tbitem8: {
caption: "-",
tip: "",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
tbitem12: {
caption: "New",
tip: "New",
},
seperator1: {
caption: "",
tbitem13: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "关闭",
tip: "关闭",
tbitem14: {
caption: "Copy",
tip: "Copy {0}",
},
},
gridviewtoolbar_toolbar: {
......
......@@ -74,33 +74,41 @@ export default {
},
},
editviewtoolbar_toolbar: {
deuiaction4: {
caption: "编辑",
tip: "编辑",
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: "保存并新建",
tip: "保存并新建",
},
seperator4: {
caption: "",
tbitem5: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem6: {
caption: "-",
tip: "",
},
deuiaction1: {
tbitem7: {
caption: "删除并关闭",
tip: "删除并关闭",
},
seperator2: {
caption: "",
tbitem8: {
caption: "-",
tip: "",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
tbitem12: {
caption: "新建",
tip: "新建",
},
seperator1: {
caption: "",
tbitem13: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "关闭",
tip: "关闭",
tbitem14: {
caption: "拷贝",
tip: "拷贝",
},
},
gridviewtoolbar_toolbar: {
......
......@@ -87,33 +87,41 @@ export default {
},
},
editviewtoolbar_toolbar: {
deuiaction4: {
caption: "Edit",
tip: "Edit {0}",
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Save And New",
tip: "Save And New",
},
seperator4: {
caption: "",
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem6: {
caption: "-",
tip: "",
},
deuiaction1: {
tbitem7: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
seperator2: {
caption: "",
tbitem8: {
caption: "-",
tip: "",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
tbitem12: {
caption: "New",
tip: "New",
},
seperator1: {
caption: "",
tbitem13: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "关闭",
tip: "关闭",
tbitem14: {
caption: "Copy",
tip: "Copy {0}",
},
},
};
\ No newline at end of file
......@@ -86,33 +86,41 @@ export default {
},
},
editviewtoolbar_toolbar: {
deuiaction4: {
caption: "编辑",
tip: "编辑",
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: "保存并新建",
tip: "保存并新建",
},
seperator4: {
caption: "",
tbitem5: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem6: {
caption: "-",
tip: "",
},
deuiaction1: {
tbitem7: {
caption: "删除并关闭",
tip: "删除并关闭",
},
seperator2: {
caption: "",
tbitem8: {
caption: "-",
tip: "",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
tbitem12: {
caption: "新建",
tip: "新建",
},
seperator1: {
caption: "",
tbitem13: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "关闭",
tip: "关闭",
tbitem14: {
caption: "拷贝",
tip: "拷贝",
},
},
};
\ No newline at end of file
......@@ -67,33 +67,41 @@ export default {
},
},
editviewtoolbar_toolbar: {
deuiaction4: {
caption: "Edit",
tip: "Edit {0}",
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Save And New",
tip: "Save And New",
},
seperator4: {
caption: "",
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem6: {
caption: "-",
tip: "",
},
deuiaction1: {
tbitem7: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
seperator2: {
caption: "",
tbitem8: {
caption: "-",
tip: "",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
tbitem12: {
caption: "New",
tip: "New",
},
seperator1: {
caption: "",
tbitem13: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "关闭",
tip: "关闭",
tbitem14: {
caption: "Copy",
tip: "Copy {0}",
},
},
gridviewtoolbar_toolbar: {
......
......@@ -66,33 +66,41 @@ export default {
},
},
editviewtoolbar_toolbar: {
deuiaction4: {
caption: "编辑",
tip: "编辑",
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: "保存并新建",
tip: "保存并新建",
},
seperator4: {
caption: "",
tbitem5: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem6: {
caption: "-",
tip: "",
},
deuiaction1: {
tbitem7: {
caption: "删除并关闭",
tip: "删除并关闭",
},
seperator2: {
caption: "",
tbitem8: {
caption: "-",
tip: "",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
tbitem12: {
caption: "新建",
tip: "新建",
},
seperator1: {
caption: "",
tbitem13: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "关闭",
tip: "关闭",
tbitem14: {
caption: "拷贝",
tip: "拷贝",
},
},
gridviewtoolbar_toolbar: {
......
......@@ -15,6 +15,33 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
"appdedataset":"",
"items": []
},
{
srfkey: "ContentType",
emptytext: "未定义",
"codelisttype":"static",
items: [
{
id: "CONTENT",
label: "内容",
text: "内容",
"data":"",
"codename":"Content",
value: "CONTENT",
disabled: false,
},
{
id: "LINK",
label: "链接",
text: "链接",
"data":"",
"codename":"Link",
value: "LINK",
disabled: false,
},
]
},
{
srfkey: "YesNo",
emptytext: "未定义",
......
......@@ -63,16 +63,20 @@ export class WebSiteChannelEditViewBase extends EditViewBase {
* @memberof WebSiteChannelEditView
*/
public toolBarModels: any = {
deuiaction4: { name: 'deuiaction4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' }, class: '' },
tbitem3: { name: 'tbitem3', caption: '保存','isShowCaption':true,'isShowIcon':true, tooltip: '保存', iconcls: 'fa fa-save', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Save', target: '' }, class: '' },
seperator4: { name: 'seperator4', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction1: { name: 'deuiaction1', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
tbitem4: { name: 'tbitem4', caption: '保存并新建','isShowCaption':true,'isShowIcon':true, tooltip: '保存并新建', iconcls: 'sx-tb-saveandnew', icon: '../sasrfex/images/default/icon_saveandnew.png', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndNew', target: '' }, class: '' },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction2: { name: 'deuiaction2', caption: '刷新','isShowCaption':true,'isShowIcon':true, tooltip: '刷新', iconcls: 'fa fa-refresh', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Refresh', target: 'SINGLEKEY' }, class: '' },
tbitem5: { name: 'tbitem5', caption: '保存并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '保存并关闭', iconcls: 'fa fa-power-off', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' }, class: '' },
seperator1: { name: 'seperator1', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem12: { name: 'tbitem12', caption: '关闭','isShowCaption':true,'isShowIcon':true, tooltip: '关闭', iconcls: 'fa fa-sign-out', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Exit', target: '' }, class: '' },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem7: { name: 'tbitem7', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
tbitem8: { name: 'tbitem8', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem12: { name: 'tbitem12', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'New', target: '' }, class: '' },
tbitem13: { name: 'tbitem13', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem14: { name: 'tbitem14', caption: '拷贝','isShowCaption':true,'isShowIcon':true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' }, class: '' },
};
......@@ -122,18 +126,33 @@ export class WebSiteChannelEditViewBase extends EditViewBase {
* @memberof WebSiteChannelEditViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'deuiaction4')) {
this.toolbar_deuiaction4_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.toolbar_deuiaction2_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem9')) {
this.toolbar_tbitem9_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem14')) {
this.toolbar_tbitem14_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem15')) {
this.toolbar_tbitem15_click(null, '', $event2);
}
}
/**
......@@ -177,7 +196,35 @@ export class WebSiteChannelEditViewBase extends EditViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction4_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"WebSiteChannel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -194,7 +241,7 @@ export class WebSiteChannelEditViewBase extends EditViewBase {
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"WebSiteChannel");
this.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"WebSiteChannel");
}
/**
......@@ -205,7 +252,35 @@ export class WebSiteChannelEditViewBase extends EditViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"WebSiteChannel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem7_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -233,7 +308,35 @@ export class WebSiteChannelEditViewBase extends EditViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction2_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem9_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"WebSiteChannel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem10_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -250,7 +353,7 @@ export class WebSiteChannelEditViewBase extends EditViewBase {
datas = [params];
}
// 界面行为
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"WebSiteChannel");
this.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"WebSiteChannel");
}
/**
......@@ -278,11 +381,67 @@ export class WebSiteChannelEditViewBase extends EditViewBase {
datas = [params];
}
// 界面行为
this.Exit(datas, contextJO,paramJO, $event, xData,this,"WebSiteChannel");
this.New(datas, contextJO,paramJO, $event, xData,this,"WebSiteChannel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem14_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"WebSiteChannel");
}
/**
* 编辑
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem15_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"WebSiteChannel");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
......@@ -292,19 +451,79 @@ export class WebSiteChannelEditViewBase extends EditViewBase {
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteChannelEditViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
public Save(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 界面行为容器对象 _this
const _this: any = this;
if (xData && xData.save instanceof Function) {
xData.save().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
_this.$emit('viewdataschange', [{ ...response.data }]);
});
} else if (_this.save && _this.save instanceof Function) {
_this.save();
}
}
/**
* 保存并新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteChannelEditViewBase
*/
public SaveAndNew(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { websitechannel: args[0].websitechannel })
if (!xData || !(xData.saveAndNew instanceof Function)) {
return;
}
xData.saveAndNew().then((response: any) => {
if (!response || response.status !== 200) {
_this.$emit('viewdataschange', JSON.stringify({status:'error',action:'saveAndNew'}));
return;
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
_this.$emit('viewdataschange', JSON.stringify({status:'success',action:'saveAndNew',data:response.data}));
if (xData.autoLoad instanceof Function) {
xData.autoLoad();
}
});
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteChannelEditViewBase
*/
public SaveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.saveAndExit instanceof Function) {
xData.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.saveAndExit && _this.saveAndExit instanceof Function) {
_this.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
......@@ -341,7 +560,7 @@ export class WebSiteChannelEditViewBase extends EditViewBase {
}
}
/**
* 刷新
* 开始流程
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
......@@ -351,16 +570,29 @@ export class WebSiteChannelEditViewBase extends EditViewBase {
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteChannelEditViewBase
*/
public Refresh(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
public SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
} else if (_this.refresh && _this.refresh instanceof Function) {
_this.refresh(args);
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');
}else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
}
/**
* 关闭
* 当前流程步骤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
......@@ -370,12 +602,94 @@ export class WebSiteChannelEditViewBase extends EditViewBase {
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteChannelEditViewBase
*/
public Exit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.closeView(args);
if(window.parent){
window.parent.postMessage([{ ...args }],'*');
public ViewWFStep(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.wfsubmit instanceof Function)) {
return;
}
}
xData.wfsubmit(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
} else if (_this.$tabPageExp) {
_this.$tabPageExp.onClose(_this.$route.fullPath);
}
});
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteChannelEditViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteChannelEditViewBase
*/
public Copy(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
xData.copy(args[0].srfkey);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteChannelEditViewBase
*/
public Print(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.print instanceof Function) || !$event) {
return ;
}
xData.print();
}
}
\ No newline at end of file
......@@ -63,16 +63,20 @@ export class WebSiteContentEditViewBase extends EditViewBase {
* @memberof WebSiteContentEditView
*/
public toolBarModels: any = {
deuiaction4: { name: 'deuiaction4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' }, class: '' },
tbitem3: { name: 'tbitem3', caption: '保存','isShowCaption':true,'isShowIcon':true, tooltip: '保存', iconcls: 'fa fa-save', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Save', target: '' }, class: '' },
seperator4: { name: 'seperator4', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction1: { name: 'deuiaction1', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
tbitem4: { name: 'tbitem4', caption: '保存并新建','isShowCaption':true,'isShowIcon':true, tooltip: '保存并新建', iconcls: 'sx-tb-saveandnew', icon: '../sasrfex/images/default/icon_saveandnew.png', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndNew', target: '' }, class: '' },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction2: { name: 'deuiaction2', caption: '刷新','isShowCaption':true,'isShowIcon':true, tooltip: '刷新', iconcls: 'fa fa-refresh', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Refresh', target: 'SINGLEKEY' }, class: '' },
tbitem5: { name: 'tbitem5', caption: '保存并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '保存并关闭', iconcls: 'fa fa-power-off', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' }, class: '' },
seperator1: { name: 'seperator1', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem12: { name: 'tbitem12', caption: '关闭','isShowCaption':true,'isShowIcon':true, tooltip: '关闭', iconcls: 'fa fa-sign-out', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Exit', target: '' }, class: '' },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem7: { name: 'tbitem7', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
tbitem8: { name: 'tbitem8', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem12: { name: 'tbitem12', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'New', target: '' }, class: '' },
tbitem13: { name: 'tbitem13', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem14: { name: 'tbitem14', caption: '拷贝','isShowCaption':true,'isShowIcon':true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' }, class: '' },
};
......@@ -122,18 +126,33 @@ export class WebSiteContentEditViewBase extends EditViewBase {
* @memberof WebSiteContentEditViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'deuiaction4')) {
this.toolbar_deuiaction4_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.toolbar_deuiaction2_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem9')) {
this.toolbar_tbitem9_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem14')) {
this.toolbar_tbitem14_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem15')) {
this.toolbar_tbitem15_click(null, '', $event2);
}
}
/**
......@@ -177,7 +196,35 @@ export class WebSiteContentEditViewBase extends EditViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction4_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"WebSiteContent");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -194,7 +241,7 @@ export class WebSiteContentEditViewBase extends EditViewBase {
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"WebSiteContent");
this.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"WebSiteContent");
}
/**
......@@ -205,7 +252,35 @@ export class WebSiteContentEditViewBase extends EditViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"WebSiteContent");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem7_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -233,7 +308,35 @@ export class WebSiteContentEditViewBase extends EditViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction2_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem9_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"WebSiteContent");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem10_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -250,7 +353,7 @@ export class WebSiteContentEditViewBase extends EditViewBase {
datas = [params];
}
// 界面行为
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"WebSiteContent");
this.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"WebSiteContent");
}
/**
......@@ -278,11 +381,67 @@ export class WebSiteContentEditViewBase extends EditViewBase {
datas = [params];
}
// 界面行为
this.Exit(datas, contextJO,paramJO, $event, xData,this,"WebSiteContent");
this.New(datas, contextJO,paramJO, $event, xData,this,"WebSiteContent");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem14_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"WebSiteContent");
}
/**
* 编辑
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem15_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"WebSiteContent");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
......@@ -292,19 +451,79 @@ export class WebSiteContentEditViewBase extends EditViewBase {
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteContentEditViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
public Save(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 界面行为容器对象 _this
const _this: any = this;
if (xData && xData.save instanceof Function) {
xData.save().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
_this.$emit('viewdataschange', [{ ...response.data }]);
});
} else if (_this.save && _this.save instanceof Function) {
_this.save();
}
}
/**
* 保存并新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteContentEditViewBase
*/
public SaveAndNew(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { websitecontent: args[0].websitecontent })
if (!xData || !(xData.saveAndNew instanceof Function)) {
return;
}
xData.saveAndNew().then((response: any) => {
if (!response || response.status !== 200) {
_this.$emit('viewdataschange', JSON.stringify({status:'error',action:'saveAndNew'}));
return;
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
_this.$emit('viewdataschange', JSON.stringify({status:'success',action:'saveAndNew',data:response.data}));
if (xData.autoLoad instanceof Function) {
xData.autoLoad();
}
});
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteContentEditViewBase
*/
public SaveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.saveAndExit instanceof Function) {
xData.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.saveAndExit && _this.saveAndExit instanceof Function) {
_this.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
......@@ -341,7 +560,7 @@ export class WebSiteContentEditViewBase extends EditViewBase {
}
}
/**
* 刷新
* 开始流程
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
......@@ -351,16 +570,29 @@ export class WebSiteContentEditViewBase extends EditViewBase {
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteContentEditViewBase
*/
public Refresh(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
public SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
} else if (_this.refresh && _this.refresh instanceof Function) {
_this.refresh(args);
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');
}else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
}
/**
* 关闭
* 当前流程步骤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
......@@ -370,12 +602,94 @@ export class WebSiteContentEditViewBase extends EditViewBase {
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteContentEditViewBase
*/
public Exit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.closeView(args);
if(window.parent){
window.parent.postMessage([{ ...args }],'*');
public ViewWFStep(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.wfsubmit instanceof Function)) {
return;
}
}
xData.wfsubmit(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
} else if (_this.$tabPageExp) {
_this.$tabPageExp.onClose(_this.$route.fullPath);
}
});
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteContentEditViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteContentEditViewBase
*/
public Copy(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
xData.copy(args[0].srfkey);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteContentEditViewBase
*/
public Print(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.print instanceof Function) || !$event) {
return ;
}
xData.print();
}
}
\ No newline at end of file
......@@ -63,16 +63,20 @@ export class WebSiteEditViewBase extends EditViewBase {
* @memberof WebSiteEditView
*/
public toolBarModels: any = {
deuiaction4: { name: 'deuiaction4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' }, class: '' },
tbitem3: { name: 'tbitem3', caption: '保存','isShowCaption':true,'isShowIcon':true, tooltip: '保存', iconcls: 'fa fa-save', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Save', target: '' }, class: '' },
seperator4: { name: 'seperator4', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction1: { name: 'deuiaction1', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
tbitem4: { name: 'tbitem4', caption: '保存并新建','isShowCaption':true,'isShowIcon':true, tooltip: '保存并新建', iconcls: 'sx-tb-saveandnew', icon: '../sasrfex/images/default/icon_saveandnew.png', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndNew', target: '' }, class: '' },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction2: { name: 'deuiaction2', caption: '刷新','isShowCaption':true,'isShowIcon':true, tooltip: '刷新', iconcls: 'fa fa-refresh', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Refresh', target: 'SINGLEKEY' }, class: '' },
tbitem5: { name: 'tbitem5', caption: '保存并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '保存并关闭', iconcls: 'fa fa-power-off', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' }, class: '' },
seperator1: { name: 'seperator1', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem12: { name: 'tbitem12', caption: '关闭','isShowCaption':true,'isShowIcon':true, tooltip: '关闭', iconcls: 'fa fa-sign-out', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Exit', target: '' }, class: '' },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem7: { name: 'tbitem7', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
tbitem8: { name: 'tbitem8', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem12: { name: 'tbitem12', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'New', target: '' }, class: '' },
tbitem13: { name: 'tbitem13', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem14: { name: 'tbitem14', caption: '拷贝','isShowCaption':true,'isShowIcon':true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' }, class: '' },
};
......@@ -122,18 +126,33 @@ export class WebSiteEditViewBase extends EditViewBase {
* @memberof WebSiteEditViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'deuiaction4')) {
this.toolbar_deuiaction4_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.toolbar_deuiaction2_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem9')) {
this.toolbar_tbitem9_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem14')) {
this.toolbar_tbitem14_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem15')) {
this.toolbar_tbitem15_click(null, '', $event2);
}
}
/**
......@@ -177,7 +196,35 @@ export class WebSiteEditViewBase extends EditViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction4_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"WebSite");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -194,7 +241,7 @@ export class WebSiteEditViewBase extends EditViewBase {
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"WebSite");
this.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"WebSite");
}
/**
......@@ -205,7 +252,35 @@ export class WebSiteEditViewBase extends EditViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"WebSite");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem7_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -233,7 +308,35 @@ export class WebSiteEditViewBase extends EditViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction2_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem9_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"WebSite");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem10_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -250,7 +353,7 @@ export class WebSiteEditViewBase extends EditViewBase {
datas = [params];
}
// 界面行为
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"WebSite");
this.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"WebSite");
}
/**
......@@ -278,11 +381,67 @@ export class WebSiteEditViewBase extends EditViewBase {
datas = [params];
}
// 界面行为
this.Exit(datas, contextJO,paramJO, $event, xData,this,"WebSite");
this.New(datas, contextJO,paramJO, $event, xData,this,"WebSite");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem14_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"WebSite");
}
/**
* 编辑
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem15_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"WebSite");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
......@@ -292,19 +451,79 @@ export class WebSiteEditViewBase extends EditViewBase {
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteEditViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
public Save(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 界面行为容器对象 _this
const _this: any = this;
if (xData && xData.save instanceof Function) {
xData.save().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
_this.$emit('viewdataschange', [{ ...response.data }]);
});
} else if (_this.save && _this.save instanceof Function) {
_this.save();
}
}
/**
* 保存并新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteEditViewBase
*/
public SaveAndNew(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { website: args[0].website })
if (!xData || !(xData.saveAndNew instanceof Function)) {
return;
}
xData.saveAndNew().then((response: any) => {
if (!response || response.status !== 200) {
_this.$emit('viewdataschange', JSON.stringify({status:'error',action:'saveAndNew'}));
return;
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
_this.$emit('viewdataschange', JSON.stringify({status:'success',action:'saveAndNew',data:response.data}));
if (xData.autoLoad instanceof Function) {
xData.autoLoad();
}
});
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteEditViewBase
*/
public SaveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.saveAndExit instanceof Function) {
xData.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.saveAndExit && _this.saveAndExit instanceof Function) {
_this.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
......@@ -341,7 +560,7 @@ export class WebSiteEditViewBase extends EditViewBase {
}
}
/**
* 刷新
* 开始流程
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
......@@ -351,16 +570,29 @@ export class WebSiteEditViewBase extends EditViewBase {
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteEditViewBase
*/
public Refresh(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
public SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
} else if (_this.refresh && _this.refresh instanceof Function) {
_this.refresh(args);
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');
}else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
}
/**
* 关闭
* 当前流程步骤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
......@@ -370,12 +602,94 @@ export class WebSiteEditViewBase extends EditViewBase {
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteEditViewBase
*/
public Exit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.closeView(args);
if(window.parent){
window.parent.postMessage([{ ...args }],'*');
public ViewWFStep(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.wfsubmit instanceof Function)) {
return;
}
}
xData.wfsubmit(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
} else if (_this.$tabPageExp) {
_this.$tabPageExp.onClose(_this.$route.fullPath);
}
});
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteEditViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteEditViewBase
*/
public Copy(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
xData.copy(args[0].srfkey);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteEditViewBase
*/
public Print(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.print instanceof Function) || !$event) {
return ;
}
xData.print();
}
}
\ No newline at end of file
......@@ -63,16 +63,20 @@ export class WebSiteResourceEditViewBase extends EditViewBase {
* @memberof WebSiteResourceEditView
*/
public toolBarModels: any = {
deuiaction4: { name: 'deuiaction4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' }, class: '' },
tbitem3: { name: 'tbitem3', caption: '保存','isShowCaption':true,'isShowIcon':true, tooltip: '保存', iconcls: 'fa fa-save', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Save', target: '' }, class: '' },
seperator4: { name: 'seperator4', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction1: { name: 'deuiaction1', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
tbitem4: { name: 'tbitem4', caption: '保存并新建','isShowCaption':true,'isShowIcon':true, tooltip: '保存并新建', iconcls: 'sx-tb-saveandnew', icon: '../sasrfex/images/default/icon_saveandnew.png', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndNew', target: '' }, class: '' },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction2: { name: 'deuiaction2', caption: '刷新','isShowCaption':true,'isShowIcon':true, tooltip: '刷新', iconcls: 'fa fa-refresh', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Refresh', target: 'SINGLEKEY' }, class: '' },
tbitem5: { name: 'tbitem5', caption: '保存并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '保存并关闭', iconcls: 'fa fa-power-off', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' }, class: '' },
seperator1: { name: 'seperator1', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem12: { name: 'tbitem12', caption: '关闭','isShowCaption':true,'isShowIcon':true, tooltip: '关闭', iconcls: 'fa fa-sign-out', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Exit', target: '' }, class: '' },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem7: { name: 'tbitem7', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
tbitem8: { name: 'tbitem8', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem12: { name: 'tbitem12', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'New', target: '' }, class: '' },
tbitem13: { name: 'tbitem13', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem14: { name: 'tbitem14', caption: '拷贝','isShowCaption':true,'isShowIcon':true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' }, class: '' },
};
......@@ -122,18 +126,33 @@ export class WebSiteResourceEditViewBase extends EditViewBase {
* @memberof WebSiteResourceEditViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'deuiaction4')) {
this.toolbar_deuiaction4_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.toolbar_deuiaction2_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem9')) {
this.toolbar_tbitem9_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem14')) {
this.toolbar_tbitem14_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem15')) {
this.toolbar_tbitem15_click(null, '', $event2);
}
}
/**
......@@ -177,7 +196,35 @@ export class WebSiteResourceEditViewBase extends EditViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction4_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"WebSiteResource");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -194,7 +241,7 @@ export class WebSiteResourceEditViewBase extends EditViewBase {
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"WebSiteResource");
this.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"WebSiteResource");
}
/**
......@@ -205,7 +252,35 @@ export class WebSiteResourceEditViewBase extends EditViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"WebSiteResource");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem7_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -233,7 +308,35 @@ export class WebSiteResourceEditViewBase extends EditViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction2_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem9_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"WebSiteResource");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem10_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -250,7 +353,7 @@ export class WebSiteResourceEditViewBase extends EditViewBase {
datas = [params];
}
// 界面行为
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"WebSiteResource");
this.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"WebSiteResource");
}
/**
......@@ -278,11 +381,67 @@ export class WebSiteResourceEditViewBase extends EditViewBase {
datas = [params];
}
// 界面行为
this.Exit(datas, contextJO,paramJO, $event, xData,this,"WebSiteResource");
this.New(datas, contextJO,paramJO, $event, xData,this,"WebSiteResource");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem14_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"WebSiteResource");
}
/**
* 编辑
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem15_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"WebSiteResource");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
......@@ -292,19 +451,79 @@ export class WebSiteResourceEditViewBase extends EditViewBase {
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteResourceEditViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
public Save(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 界面行为容器对象 _this
const _this: any = this;
if (xData && xData.save instanceof Function) {
xData.save().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
_this.$emit('viewdataschange', [{ ...response.data }]);
});
} else if (_this.save && _this.save instanceof Function) {
_this.save();
}
}
/**
* 保存并新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteResourceEditViewBase
*/
public SaveAndNew(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { websiteresource: args[0].websiteresource })
if (!xData || !(xData.saveAndNew instanceof Function)) {
return;
}
xData.saveAndNew().then((response: any) => {
if (!response || response.status !== 200) {
_this.$emit('viewdataschange', JSON.stringify({status:'error',action:'saveAndNew'}));
return;
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
_this.$emit('viewdataschange', JSON.stringify({status:'success',action:'saveAndNew',data:response.data}));
if (xData.autoLoad instanceof Function) {
xData.autoLoad();
}
});
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteResourceEditViewBase
*/
public SaveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.saveAndExit instanceof Function) {
xData.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.saveAndExit && _this.saveAndExit instanceof Function) {
_this.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
......@@ -341,7 +560,7 @@ export class WebSiteResourceEditViewBase extends EditViewBase {
}
}
/**
* 刷新
* 开始流程
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
......@@ -351,16 +570,29 @@ export class WebSiteResourceEditViewBase extends EditViewBase {
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteResourceEditViewBase
*/
public Refresh(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
public SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
} else if (_this.refresh && _this.refresh instanceof Function) {
_this.refresh(args);
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');
}else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
}
/**
* 关闭
* 当前流程步骤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
......@@ -370,12 +602,94 @@ export class WebSiteResourceEditViewBase extends EditViewBase {
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteResourceEditViewBase
*/
public Exit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.closeView(args);
if(window.parent){
window.parent.postMessage([{ ...args }],'*');
public ViewWFStep(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.wfsubmit instanceof Function)) {
return;
}
}
xData.wfsubmit(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
} else if (_this.$tabPageExp) {
_this.$tabPageExp.onClose(_this.$route.fullPath);
}
});
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteResourceEditViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteResourceEditViewBase
*/
public Copy(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
xData.copy(args[0].srfkey);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WebSiteResourceEditViewBase
*/
public Print(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.print instanceof Function) || !$event) {
return ;
}
xData.print();
}
}
\ No newline at end of file
......@@ -62,21 +62,6 @@ export default class WebSiteServiceBase extends EntityService {
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let websitecontentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_websitecontents'),'undefined')){
websitecontentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_websitecontents') as any);
if(websitecontentsData && websitecontentsData.length && websitecontentsData.length > 0){
websitecontentsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.websitecontentid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.websitecontents = websitecontentsData;
let websitechannelsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_websitechannels'),'undefined')){
websitechannelsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_websitechannels') as any);
......@@ -107,6 +92,21 @@ export default class WebSiteServiceBase extends EntityService {
}
}
masterData.websiteresources = websiteresourcesData;
let websitecontentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_websitecontents'),'undefined')){
websitecontentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_websitecontents') as any);
if(websitecontentsData && websitecontentsData.length && websitecontentsData.length > 0){
websitecontentsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.websitecontentid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.websitecontents = websitecontentsData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -116,9 +116,9 @@ export default class WebSiteServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/websites`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_websitecontents',JSON.stringify(res.data.websitecontents));
this.tempStorage.setItem(tempContext.srfsessionkey+'_websitechannels',JSON.stringify(res.data.websitechannels));
this.tempStorage.setItem(tempContext.srfsessionkey+'_websiteresources',JSON.stringify(res.data.websiteresources));
this.tempStorage.setItem(tempContext.srfsessionkey+'_websitecontents',JSON.stringify(res.data.websitecontents));
return res;
}
......@@ -133,21 +133,6 @@ export default class WebSiteServiceBase extends EntityService {
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let websitecontentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_websitecontents'),'undefined')){
websitecontentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_websitecontents') as any);
if(websitecontentsData && websitecontentsData.length && websitecontentsData.length > 0){
websitecontentsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.websitecontentid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.websitecontents = websitecontentsData;
let websitechannelsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_websitechannels'),'undefined')){
websitechannelsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_websitechannels') as any);
......@@ -178,11 +163,26 @@ export default class WebSiteServiceBase extends EntityService {
}
}
masterData.websiteresources = websiteresourcesData;
let websitecontentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_websitecontents'),'undefined')){
websitecontentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_websitecontents') as any);
if(websitecontentsData && websitecontentsData.length && websitecontentsData.length > 0){
websitecontentsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.websitecontentid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.websitecontents = websitecontentsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/websites/${context.website}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_websitecontents',JSON.stringify(res.data.websitecontents));
this.tempStorage.setItem(context.srfsessionkey+'_websitechannels',JSON.stringify(res.data.websitechannels));
this.tempStorage.setItem(context.srfsessionkey+'_websiteresources',JSON.stringify(res.data.websiteresources));
this.tempStorage.setItem(context.srfsessionkey+'_websitecontents',JSON.stringify(res.data.websitecontents));
return res;
}
......@@ -210,9 +210,9 @@ export default class WebSiteServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/websites/${context.website}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_websitecontents',JSON.stringify(res.data.websitecontents));
this.tempStorage.setItem(context.srfsessionkey+'_websitechannels',JSON.stringify(res.data.websitechannels));
this.tempStorage.setItem(context.srfsessionkey+'_websiteresources',JSON.stringify(res.data.websiteresources));
this.tempStorage.setItem(context.srfsessionkey+'_websitecontents',JSON.stringify(res.data.websitecontents));
return res;
}
......@@ -228,9 +228,9 @@ export default class WebSiteServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/websites/getdraft`,isloading);
res.data.website = data.website;
this.tempStorage.setItem(context.srfsessionkey+'_websitecontents',JSON.stringify(res.data.websitecontents));
this.tempStorage.setItem(context.srfsessionkey+'_websitechannels',JSON.stringify(res.data.websitechannels));
this.tempStorage.setItem(context.srfsessionkey+'_websiteresources',JSON.stringify(res.data.websiteresources));
this.tempStorage.setItem(context.srfsessionkey+'_websitecontents',JSON.stringify(res.data.websitecontents));
return res;
}
......@@ -258,21 +258,6 @@ export default class WebSiteServiceBase extends EntityService {
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let websitecontentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_websitecontents'),'undefined')){
websitecontentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_websitecontents') as any);
if(websitecontentsData && websitecontentsData.length && websitecontentsData.length > 0){
websitecontentsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.websitecontentid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.websitecontents = websitecontentsData;
let websitechannelsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_websitechannels'),'undefined')){
websitechannelsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_websitechannels') as any);
......@@ -303,11 +288,26 @@ export default class WebSiteServiceBase extends EntityService {
}
}
masterData.websiteresources = websiteresourcesData;
let websitecontentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_websitecontents'),'undefined')){
websitecontentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_websitecontents') as any);
if(websitecontentsData && websitecontentsData.length && websitecontentsData.length > 0){
websitecontentsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.websitecontentid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.websitecontents = websitecontentsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/websites/${context.website}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_websitecontents',JSON.stringify(res.data.websitecontents));
this.tempStorage.setItem(context.srfsessionkey+'_websitechannels',JSON.stringify(res.data.websitechannels));
this.tempStorage.setItem(context.srfsessionkey+'_websiteresources',JSON.stringify(res.data.websiteresources));
this.tempStorage.setItem(context.srfsessionkey+'_websitecontents',JSON.stringify(res.data.websitecontents));
return res;
}
......
......@@ -195,6 +195,14 @@ export class MainGridBase extends GridControllerBase {
*/
public async formatExcelData(filterVal: any, jsonData: any, codelistColumns?: any[]): Promise<any> {
return super.formatExcelData(filterVal, jsonData, [
{
name: 'contenttype',
srfkey: 'ContentType',
codelistType : 'STATIC',
renderMode: 'other',
textSeparator: '、',
valueSeparator: ',',
},
{
name: 'validflag',
srfkey: 'YesNo',
......
......@@ -79,7 +79,9 @@
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.contenttype}}</span>
<template >
<codelist :value="row.contenttype" tag='ContentType' codelistType='STATIC' ></codelist>
</template>
</template>
</el-table-column>
</template>
......
......@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /businesscentral-app-crm.jar
EXPOSE 8080
EXPOSE 10324
ADD businesscentral-app-crm.jar /businesscentral-app-crm.jar
......@@ -3,9 +3,23 @@ services:
businesscentral-app-crm:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/businesscentral-app-crm:latest
ports:
- "8080:8080"
- "10324:10324"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10324
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
deploy:
resources:
limits:
......
......@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /businesscentral-app-website.jar
EXPOSE 8080
EXPOSE 10324
ADD businesscentral-app-website.jar /businesscentral-app-website.jar
......@@ -3,9 +3,23 @@ services:
businesscentral-app-website:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/businesscentral-app-website:latest
ports:
- "8080:8080"
- "10324:10324"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10324
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
deploy:
resources:
limits:
......
......@@ -10853,7 +10853,7 @@
<!--输出实体[WEBSITE]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-website-21-128">
<changeSet author="a_LAB01_e85d8801c" id="tab-website-22-128">
<createTable tableName="WEBSITE">
<column name="WEBSITENAME" remarks="" type="VARCHAR(200)">
</column>
......@@ -10879,7 +10879,7 @@
<!--输出实体[WEBSITECHANNEL]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-websitechannel-30-129">
<changeSet author="a_LAB01_e85d8801c" id="tab-websitechannel-31-129">
<createTable tableName="WEBSITECHANNEL">
<column name="WEBSITECHANNELID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_WEBSITECHANNEL_WEBSITECHANN"/>
......@@ -10913,7 +10913,7 @@
<!--输出实体[WEBSITECONTENT]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-websitecontent-29-130">
<changeSet author="a_LAB01_e85d8801c" id="tab-websitecontent-31-130">
<createTable tableName="WEBSITECONTENT">
<column name="WEBSITECONTENTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_WEBSITECONTENT_WEBSITECONTE"/>
......@@ -10957,7 +10957,7 @@
<!--输出实体[WEBSITERESOURCE]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-websiteresource-11-131">
<changeSet author="a_LAB01_e85d8801c" id="tab-websiteresource-12-131">
<createTable tableName="WEBSITERESOURCE">
<column name="WEBSITERESOURCEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_WEBSITERESOURCE_WEBSITERESO"/>
......@@ -11904,21 +11904,21 @@
<!--输出实体[UOMSCHEDULE]外键关系 -->
<!--输出实体[WEBSITE]外键关系 -->
<!--输出实体[WEBSITECHANNEL]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-websitechannel-30-427">
<changeSet author="a_LAB01_e85d8801c" id="fk-websitechannel-31-427">
<addForeignKeyConstraint baseColumnNames="PWEBSITECHANNELID" baseTableName="WEBSITECHANNEL" constraintName="DER1N_WEBSITECHANNEL_WEBSITECH" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="WEBSITECHANNELID" referencedTableName="WEBSITECHANNEL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-websitechannel-30-428">
<changeSet author="a_LAB01_e85d8801c" id="fk-websitechannel-31-428">
<addForeignKeyConstraint baseColumnNames="WEBSITEID" baseTableName="WEBSITECHANNEL" constraintName="DER1N_WEBSITECHANNEL_WEBSITE_W" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="WEBSITEID" referencedTableName="WEBSITE" validate="true"/>
</changeSet>
<!--输出实体[WEBSITECONTENT]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-websitecontent-29-429">
<changeSet author="a_LAB01_e85d8801c" id="fk-websitecontent-31-429">
<addForeignKeyConstraint baseColumnNames="WEBSITECHANNELID" baseTableName="WEBSITECONTENT" constraintName="DER1N_WEBSITECONTENT_WEBSITECH" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="WEBSITECHANNELID" referencedTableName="WEBSITECHANNEL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-websitecontent-29-430">
<changeSet author="a_LAB01_e85d8801c" id="fk-websitecontent-31-430">
<addForeignKeyConstraint baseColumnNames="WEBSITEID" baseTableName="WEBSITECONTENT" constraintName="DER1N_WEBSITECONTENT_WEBSITE_W" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="WEBSITEID" referencedTableName="WEBSITE" validate="true"/>
</changeSet>
<!--输出实体[WEBSITERESOURCE]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-websiteresource-11-431">
<changeSet author="a_LAB01_e85d8801c" id="fk-websiteresource-12-431">
<addForeignKeyConstraint baseColumnNames="WEBSITEID" baseTableName="WEBSITERESOURCE" constraintName="DER1N_WEBSITERESOURCE_WEBSITE_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="WEBSITEID" referencedTableName="WEBSITE" validate="true"/>
</changeSet>
......
......@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /businesscentral-provider-centralapi.jar
EXPOSE 10310
EXPOSE 8081
ADD businesscentral-provider-centralapi.jar /businesscentral-provider-centralapi.jar
......@@ -3,23 +3,9 @@ services:
businesscentral-provider-centralapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/businesscentral-provider-centralapi:latest
ports:
- "10310:10310"
- "8081:8081"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10310
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
deploy:
resources:
limits:
......
......@@ -37,11 +37,11 @@
git clone -b master $para2 ibizbusinesscentral/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibizbusinesscentral/
mvn clean package -Pcentralapi
cd businesscentral-provider/businesscentral-provider-centralapi
mvn -Pcentralapi docker:build
mvn -Pcentralapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/businesscentral-provider-centralapi.yaml iBizEE --with-registry-auth
mvn clean package -Pwebsite
cd businesscentral-app/businesscentral-app-website
mvn -Pwebsite docker:build
mvn -Pwebsite docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/businesscentral-app-website.yaml iBizEE --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册