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

xignzi006 发布系统代码

上级 fa9c54c1
...@@ -329,13 +329,13 @@ ...@@ -329,13 +329,13 @@
"viewtag": "31f2ad06ced735d250dfa5f309b5aea4", "viewtag": "31f2ad06ced735d250dfa5f309b5aea4",
"memo": "" "memo": ""
}, },
"leadtabexpview": { "leadinfo": {
"title": "潜在顾客分页导航视图", "title": "潜在顾客",
"caption": "潜在顾客", "caption": "潜在顾客",
"viewtype": "DETABEXPVIEW", "viewtype": "DETABEXPVIEW",
"viewmodule": "Sales", "viewmodule": "Sales",
"viewname": "LeadTabExpView", "viewname": "LeadInfo",
"viewfilename": "lead-tab-exp-view", "viewfilename": "lead-info",
"viewtag": "35728a12ceecb647982051842853547c", "viewtag": "35728a12ceecb647982051842853547c",
"memo": "" "memo": ""
}, },
......
...@@ -624,6 +624,18 @@ export default { ...@@ -624,6 +624,18 @@ export default {
caption: "-", caption: "-",
tip: "", tip: "",
}, },
deuiaction1: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
},
seperator1: {
caption: "",
tip: "",
},
tbitem12: { tbitem12: {
caption: "关闭", caption: "关闭",
tip: "关闭", tip: "关闭",
......
...@@ -623,6 +623,18 @@ export default { ...@@ -623,6 +623,18 @@ export default {
caption: '-', caption: '-',
tip: '', tip: '',
}, },
deuiaction1: {
caption: '删除并关闭',
tip: '删除并关闭',
},
deuiaction2: {
caption: '刷新',
tip: '刷新',
},
seperator1: {
caption: '',
tip: '',
},
tbitem12: { tbitem12: {
caption: '关闭', caption: '关闭',
tip: '关闭', tip: '关闭',
......
...@@ -106,6 +106,18 @@ export default { ...@@ -106,6 +106,18 @@ export default {
caption: "-", caption: "-",
tip: "", tip: "",
}, },
deuiaction1: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
},
seperator1: {
caption: "",
tip: "",
},
tbitem12: { tbitem12: {
caption: "关闭", caption: "关闭",
tip: "关闭", tip: "关闭",
......
...@@ -105,6 +105,18 @@ export default { ...@@ -105,6 +105,18 @@ export default {
caption: '-', caption: '-',
tip: '', tip: '',
}, },
deuiaction1: {
caption: '删除并关闭',
tip: '删除并关闭',
},
deuiaction2: {
caption: '刷新',
tip: '刷新',
},
seperator1: {
caption: '',
tip: '',
},
tbitem12: { tbitem12: {
caption: '关闭', caption: '关闭',
tip: '关闭', tip: '关闭',
......
...@@ -352,6 +352,18 @@ export default { ...@@ -352,6 +352,18 @@ export default {
caption: "-", caption: "-",
tip: "", tip: "",
}, },
deuiaction1: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
},
seperator1: {
caption: "",
tip: "",
},
tbitem12: { tbitem12: {
caption: "关闭", caption: "关闭",
tip: "关闭", tip: "关闭",
...@@ -370,6 +382,18 @@ export default { ...@@ -370,6 +382,18 @@ export default {
caption: "-", caption: "-",
tip: "", tip: "",
}, },
deuiaction1: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
},
seperator1: {
caption: "",
tip: "",
},
tbitem12: { tbitem12: {
caption: "关闭", caption: "关闭",
tip: "关闭", tip: "关闭",
......
...@@ -351,6 +351,18 @@ export default { ...@@ -351,6 +351,18 @@ export default {
caption: '-', caption: '-',
tip: '', tip: '',
}, },
deuiaction1: {
caption: '删除并关闭',
tip: '删除并关闭',
},
deuiaction2: {
caption: '刷新',
tip: '刷新',
},
seperator1: {
caption: '',
tip: '',
},
tbitem12: { tbitem12: {
caption: '关闭', caption: '关闭',
tip: '关闭', tip: '关闭',
...@@ -369,6 +381,18 @@ export default { ...@@ -369,6 +381,18 @@ export default {
caption: '-', caption: '-',
tip: '', tip: '',
}, },
deuiaction1: {
caption: '删除并关闭',
tip: '删除并关闭',
},
deuiaction2: {
caption: '刷新',
tip: '刷新',
},
seperator1: {
caption: '',
tip: '',
},
tbitem12: { tbitem12: {
caption: '关闭', caption: '关闭',
tip: '关闭', tip: '关闭',
......
...@@ -170,9 +170,9 @@ export default { ...@@ -170,9 +170,9 @@ export default {
caption: "潜在顾客", caption: "潜在顾客",
title: '潜在顾客编辑视图', title: '潜在顾客编辑视图',
}, },
tabexpview: { info: {
caption: "潜在顾客", caption: "潜在顾客",
title: '潜在顾客分页导航视图', title: '潜在顾客',
}, },
quickcreate: { quickcreate: {
caption: "快速新建", caption: "快速新建",
...@@ -405,6 +405,64 @@ export default { ...@@ -405,6 +405,64 @@ export default {
tip: "Filter", tip: "Filter",
}, },
}, },
infotoolbar_toolbar: {
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem6: {
caption: "-",
tip: "",
},
deuiaction1: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
},
seperator1: {
caption: "",
tip: "",
},
deuiaction4: {
caption: "授予资格",
tip: "授予资格",
},
items1: {
caption: "取消资格",
tip: "取消资格",
},
deuiaction5: {
caption: "丢单",
tip: "丢单",
},
deuiaction6: {
caption: "无法联系",
tip: "无法联系",
},
deuiaction7: {
caption: "不再感兴趣",
tip: "不再感兴趣",
},
deuiaction8: {
caption: "已取消",
tip: "已取消",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "关闭",
tip: "关闭",
},
},
editviewtoolbar_toolbar: { editviewtoolbar_toolbar: {
tbitem3: { tbitem3: {
caption: "Save", caption: "Save",
......
...@@ -169,9 +169,9 @@ export default { ...@@ -169,9 +169,9 @@ export default {
caption: '潜在顾客', caption: '潜在顾客',
title: '潜在顾客编辑视图', title: '潜在顾客编辑视图',
}, },
tabexpview: { info: {
caption: '潜在顾客', caption: '潜在顾客',
title: '潜在顾客分页导航视图', title: '潜在顾客',
}, },
quickcreate: { quickcreate: {
caption: '快速新建', caption: '快速新建',
...@@ -404,6 +404,64 @@ export default { ...@@ -404,6 +404,64 @@ export default {
tip: '过滤', tip: '过滤',
}, },
}, },
infotoolbar_toolbar: {
tbitem3: {
caption: '保存',
tip: '保存',
},
tbitem5: {
caption: '保存并关闭',
tip: '保存并关闭',
},
tbitem6: {
caption: '-',
tip: '',
},
deuiaction1: {
caption: '删除并关闭',
tip: '删除并关闭',
},
deuiaction2: {
caption: '刷新',
tip: '刷新',
},
seperator1: {
caption: '',
tip: '',
},
deuiaction4: {
caption: '授予资格',
tip: '授予资格',
},
items1: {
caption: '取消资格',
tip: '取消资格',
},
deuiaction5: {
caption: '丢单',
tip: '丢单',
},
deuiaction6: {
caption: '无法联系',
tip: '无法联系',
},
deuiaction7: {
caption: '不再感兴趣',
tip: '不再感兴趣',
},
deuiaction8: {
caption: '已取消',
tip: '已取消',
},
tbitem13: {
caption: '-',
tip: '',
},
tbitem12: {
caption: '关闭',
tip: '关闭',
},
},
editviewtoolbar_toolbar: { editviewtoolbar_toolbar: {
tbitem3: { tbitem3: {
caption: '保存', caption: '保存',
......
...@@ -103,6 +103,18 @@ export default { ...@@ -103,6 +103,18 @@ export default {
caption: "-", caption: "-",
tip: "", tip: "",
}, },
deuiaction1: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
},
seperator1: {
caption: "",
tip: "",
},
tbitem12: { tbitem12: {
caption: "关闭", caption: "关闭",
tip: "关闭", tip: "关闭",
......
...@@ -102,6 +102,18 @@ export default { ...@@ -102,6 +102,18 @@ export default {
caption: '-', caption: '-',
tip: '', tip: '',
}, },
deuiaction1: {
caption: '删除并关闭',
tip: '删除并关闭',
},
deuiaction2: {
caption: '刷新',
tip: '刷新',
},
seperator1: {
caption: '',
tip: '',
},
tbitem12: { tbitem12: {
caption: '关闭', caption: '关闭',
tip: '关闭', tip: '关闭',
......
...@@ -94,6 +94,18 @@ export default { ...@@ -94,6 +94,18 @@ export default {
caption: "-", caption: "-",
tip: "", tip: "",
}, },
deuiaction1: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
},
seperator1: {
caption: "",
tip: "",
},
tbitem12: { tbitem12: {
caption: "关闭", caption: "关闭",
tip: "关闭", tip: "关闭",
......
...@@ -93,6 +93,18 @@ export default { ...@@ -93,6 +93,18 @@ export default {
caption: '-', caption: '-',
tip: '', tip: '',
}, },
deuiaction1: {
caption: '删除并关闭',
tip: '删除并关闭',
},
deuiaction2: {
caption: '刷新',
tip: '刷新',
},
seperator1: {
caption: '',
tip: '',
},
tbitem12: { tbitem12: {
caption: '关闭', caption: '关闭',
tip: '关闭', tip: '关闭',
......
...@@ -271,12 +271,12 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -271,12 +271,12 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "AccountInfo_All", "viewname": "AccountInfo_All",
"viewtag": "31f2ad06ced735d250dfa5f309b5aea4" "viewtag": "31f2ad06ced735d250dfa5f309b5aea4"
}, },
"leadtabexpview": { "leadinfo": {
"title": "潜在顾客分页导航视图", "title": "潜在顾客",
"caption": "潜在顾客", "caption": "潜在顾客",
"viewtype": "DETABEXPVIEW", "viewtype": "DETABEXPVIEW",
"viewmodule": "Sales", "viewmodule": "Sales",
"viewname": "LeadTabExpView", "viewname": "LeadInfo",
"viewtag": "35728a12ceecb647982051842853547c" "viewtag": "35728a12ceecb647982051842853547c"
}, },
"incidentgridview": { "incidentgridview": {
......
...@@ -113,6 +113,11 @@ export default class AccountInfoBase extends TabExpViewBase { ...@@ -113,6 +113,11 @@ export default class AccountInfoBase extends TabExpViewBase {
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: '' }, 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: '' },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } }, tbitem6: { name: 'tbitem6', 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: '' },
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: '' },
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: '' }, 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: '' },
}; };
...@@ -157,6 +162,12 @@ export default class AccountInfoBase extends TabExpViewBase { ...@@ -157,6 +162,12 @@ export default class AccountInfoBase extends TabExpViewBase {
if (Object.is($event.tag, 'tbitem5')) { if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2); this.toolbar_tbitem5_click(null, '', $event2);
} }
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.toolbar_deuiaction2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) { if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2); this.toolbar_tbitem12_click(null, '', $event2);
} }
...@@ -216,6 +227,60 @@ export default class AccountInfoBase extends TabExpViewBase { ...@@ -216,6 +227,60 @@ export default class AccountInfoBase extends TabExpViewBase {
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"Account"); this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"Account");
} }
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"Account");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction2_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"Account");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -302,6 +367,58 @@ export default class AccountInfoBase extends TabExpViewBase { ...@@ -302,6 +367,58 @@ export default class AccountInfoBase extends TabExpViewBase {
}); });
} }
} }
/**
* 删除并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountInfoBase
*/
public RemoveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.removeAndExit instanceof Function) {
xData.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.removeAndExit && _this.removeAndExit instanceof Function) {
_this.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 刷新
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountInfoBase
*/
public Refresh(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);
}
}
/** /**
* 关闭 * 关闭
* *
......
...@@ -113,6 +113,11 @@ export default class CampaignInfoBase extends TabExpViewBase { ...@@ -113,6 +113,11 @@ export default class CampaignInfoBase extends TabExpViewBase {
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: '' }, 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: '' },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } }, tbitem6: { name: 'tbitem6', 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: '' },
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: '' },
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: '' }, 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: '' },
}; };
...@@ -157,6 +162,12 @@ export default class CampaignInfoBase extends TabExpViewBase { ...@@ -157,6 +162,12 @@ export default class CampaignInfoBase extends TabExpViewBase {
if (Object.is($event.tag, 'tbitem5')) { if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2); this.toolbar_tbitem5_click(null, '', $event2);
} }
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.toolbar_deuiaction2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) { if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2); this.toolbar_tbitem12_click(null, '', $event2);
} }
...@@ -216,6 +227,60 @@ export default class CampaignInfoBase extends TabExpViewBase { ...@@ -216,6 +227,60 @@ export default class CampaignInfoBase extends TabExpViewBase {
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"Campaign"); this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"Campaign");
} }
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"Campaign");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction2_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"Campaign");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -302,6 +367,58 @@ export default class CampaignInfoBase extends TabExpViewBase { ...@@ -302,6 +367,58 @@ export default class CampaignInfoBase extends TabExpViewBase {
}); });
} }
} }
/**
* 删除并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof CampaignInfoBase
*/
public RemoveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.removeAndExit instanceof Function) {
xData.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.removeAndExit && _this.removeAndExit instanceof Function) {
_this.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 刷新
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof CampaignInfoBase
*/
public Refresh(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);
}
}
/** /**
* 关闭 * 关闭
* *
......
...@@ -127,6 +127,11 @@ export default class CampaignListEditViewBase extends EditViewBase { ...@@ -127,6 +127,11 @@ export default class CampaignListEditViewBase extends EditViewBase {
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: '' }, 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: '' },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } }, tbitem6: { name: 'tbitem6', 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: '' },
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: '' },
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: '' }, 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: '' },
}; };
...@@ -173,6 +178,12 @@ export default class CampaignListEditViewBase extends EditViewBase { ...@@ -173,6 +178,12 @@ export default class CampaignListEditViewBase extends EditViewBase {
if (Object.is($event.tag, 'tbitem5')) { if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2); this.toolbar_tbitem5_click(null, '', $event2);
} }
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.toolbar_deuiaction2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) { if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2); this.toolbar_tbitem12_click(null, '', $event2);
} }
...@@ -267,6 +278,62 @@ export default class CampaignListEditViewBase extends EditViewBase { ...@@ -267,6 +278,62 @@ export default class CampaignListEditViewBase extends EditViewBase {
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"CampaignList"); this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"CampaignList");
} }
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_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.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"CampaignList");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction2_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.Refresh(datas, contextJO,paramJO, $event, xData,this,"CampaignList");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -354,6 +421,58 @@ export default class CampaignListEditViewBase extends EditViewBase { ...@@ -354,6 +421,58 @@ export default class CampaignListEditViewBase extends EditViewBase {
}); });
} }
} }
/**
* 删除并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof CampaignListEditViewBase
*/
public RemoveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.removeAndExit instanceof Function) {
xData.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.removeAndExit && _this.removeAndExit instanceof Function) {
_this.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 刷新
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof CampaignListEditViewBase
*/
public Refresh(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);
}
}
/** /**
* 关闭 * 关闭
* *
......
...@@ -112,6 +112,11 @@ export default class CampaignSummary_HeadBase extends DashboardViewBase { ...@@ -112,6 +112,11 @@ export default class CampaignSummary_HeadBase extends DashboardViewBase {
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: '' }, 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: '' },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } }, tbitem6: { name: 'tbitem6', 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: '' },
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: '' },
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: '' }, 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: '' },
}; };
...@@ -157,6 +162,12 @@ export default class CampaignSummary_HeadBase extends DashboardViewBase { ...@@ -157,6 +162,12 @@ export default class CampaignSummary_HeadBase extends DashboardViewBase {
if (Object.is($event.tag, 'tbitem5')) { if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2); this.toolbar_tbitem5_click(null, '', $event2);
} }
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.toolbar_deuiaction2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) { if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2); this.toolbar_tbitem12_click(null, '', $event2);
} }
...@@ -227,6 +238,60 @@ export default class CampaignSummary_HeadBase extends DashboardViewBase { ...@@ -227,6 +238,60 @@ export default class CampaignSummary_HeadBase extends DashboardViewBase {
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"Campaign"); this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"Campaign");
} }
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"Campaign");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction2_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"Campaign");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -313,6 +378,58 @@ export default class CampaignSummary_HeadBase extends DashboardViewBase { ...@@ -313,6 +378,58 @@ export default class CampaignSummary_HeadBase extends DashboardViewBase {
}); });
} }
} }
/**
* 删除并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof CampaignSummary_HeadBase
*/
public RemoveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.removeAndExit instanceof Function) {
xData.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.removeAndExit && _this.removeAndExit instanceof Function) {
_this.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 刷新
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof CampaignSummary_HeadBase
*/
public Refresh(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);
}
}
/** /**
* 关闭 * 关闭
* *
......
...@@ -127,6 +127,11 @@ export default class ListAccountEditViewBase extends EditViewBase { ...@@ -127,6 +127,11 @@ export default class ListAccountEditViewBase extends EditViewBase {
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: '' }, 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: '' },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } }, tbitem6: { name: 'tbitem6', 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: '' },
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: '' },
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: '' }, 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: '' },
}; };
...@@ -173,6 +178,12 @@ export default class ListAccountEditViewBase extends EditViewBase { ...@@ -173,6 +178,12 @@ export default class ListAccountEditViewBase extends EditViewBase {
if (Object.is($event.tag, 'tbitem5')) { if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2); this.toolbar_tbitem5_click(null, '', $event2);
} }
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.toolbar_deuiaction2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) { if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2); this.toolbar_tbitem12_click(null, '', $event2);
} }
...@@ -267,6 +278,62 @@ export default class ListAccountEditViewBase extends EditViewBase { ...@@ -267,6 +278,62 @@ export default class ListAccountEditViewBase extends EditViewBase {
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"ListAccount"); this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"ListAccount");
} }
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_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.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"ListAccount");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction2_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.Refresh(datas, contextJO,paramJO, $event, xData,this,"ListAccount");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -354,6 +421,58 @@ export default class ListAccountEditViewBase extends EditViewBase { ...@@ -354,6 +421,58 @@ export default class ListAccountEditViewBase extends EditViewBase {
}); });
} }
} }
/**
* 删除并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof ListAccountEditViewBase
*/
public RemoveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.removeAndExit instanceof Function) {
xData.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.removeAndExit && _this.removeAndExit instanceof Function) {
_this.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 刷新
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof ListAccountEditViewBase
*/
public Refresh(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);
}
}
/** /**
* 关闭 * 关闭
* *
......
...@@ -127,6 +127,11 @@ export default class ListContactEditViewBase extends EditViewBase { ...@@ -127,6 +127,11 @@ export default class ListContactEditViewBase extends EditViewBase {
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: '' }, 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: '' },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } }, tbitem6: { name: 'tbitem6', 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: '' },
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: '' },
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: '' }, 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: '' },
}; };
...@@ -173,6 +178,12 @@ export default class ListContactEditViewBase extends EditViewBase { ...@@ -173,6 +178,12 @@ export default class ListContactEditViewBase extends EditViewBase {
if (Object.is($event.tag, 'tbitem5')) { if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2); this.toolbar_tbitem5_click(null, '', $event2);
} }
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.toolbar_deuiaction2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) { if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2); this.toolbar_tbitem12_click(null, '', $event2);
} }
...@@ -267,6 +278,62 @@ export default class ListContactEditViewBase extends EditViewBase { ...@@ -267,6 +278,62 @@ export default class ListContactEditViewBase extends EditViewBase {
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"ListContact"); this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"ListContact");
} }
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_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.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"ListContact");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction2_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.Refresh(datas, contextJO,paramJO, $event, xData,this,"ListContact");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -354,6 +421,58 @@ export default class ListContactEditViewBase extends EditViewBase { ...@@ -354,6 +421,58 @@ export default class ListContactEditViewBase extends EditViewBase {
}); });
} }
} }
/**
* 删除并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof ListContactEditViewBase
*/
public RemoveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.removeAndExit instanceof Function) {
xData.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.removeAndExit && _this.removeAndExit instanceof Function) {
_this.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 刷新
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof ListContactEditViewBase
*/
public Refresh(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);
}
}
/** /**
* 关闭 * 关闭
* *
......
...@@ -599,7 +599,7 @@ export default class LeadGridViewBase extends GridViewBase { ...@@ -599,7 +599,7 @@ export default class LeadGridViewBase extends GridViewBase {
} }
const parameters: any[] = [ const parameters: any[] = [
{ pathName: 'leads', parameterName: 'lead' }, { pathName: 'leads', parameterName: 'lead' },
{ pathName: 'tabexpview', parameterName: 'tabexpview' }, { pathName: 'info', parameterName: 'info' },
]; ];
const _this: any = this; const _this: any = this;
const openIndexViewTab = (data: any) => { const openIndexViewTab = (data: any) => {
......
<template>
<studio-view-style2 viewName="leadinfo" viewTitle="潜在顾客" class='detabexpview lead-info'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click"/> </template>
<view_tabexppanel
:viewState="viewState"
:viewparams="viewparams"
:context="context"
name="tabexppanel"
ref='tabexppanel'
@closeview="closeView($event)">
</view_tabexppanel>
</studio-view-style2>
</template>
<script lang='tsx'>
import { Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs';
import { UIActionTool, Util } from '@/utils';
import { VueLifeCycleProcessing, TabExpViewBase } from '@/studio-core';
import LeadService from '@/service/lead/lead-service';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
import LeadUIService from '@/uiservice/lead/lead-ui-service';
/**
* 潜在顾客视图基类
*
* @export
* @class LeadInfoBase
* @extends {TabExpViewBase}
*/
@Component({})
@VueLifeCycleProcessing()
export default class LeadInfoBase extends TabExpViewBase {
/**
* 实体服务对象
*
* @type {LeadService}
* @memberof LeadInfoBase
*/
protected appEntityService: LeadService = new LeadService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof LeadInfoBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 自定义视图导航上下文集合
*
* @protected
* @type {*}
* @memberof LeadInfoBase
*/
protected customViewNavContexts: any = {
};
/**
* 自定义视图导航参数集合
*
* @protected
* @type {*}
* @memberof LeadInfoBase
*/
protected customViewParams: any = {
};
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof LeadInfoBase
*/
protected model: any = {
srfCaption: 'entities.lead.views.info.caption',
srfTitle: 'entities.lead.views.info.title',
srfSubTitle: 'entities.lead.views.info.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof LeadInfoBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_tabexppanel: { name: 'tabexppanel', type: 'TABEXPPANEL' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof LeadInfo
*/
public toolBarModels: any = {
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: '' },
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: '' },
tbitem6: { name: 'tbitem6', 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: '' },
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: '' },
seperator1: { name: 'seperator1', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction4: { name: 'deuiaction4', caption: '授予资格','isShowCaption':true,'isShowIcon':true, tooltip: '授予资格', iconcls: 'fa fa-check', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Qualification', target: 'SINGLEKEY' }, class: '' },
items1: { name: 'items1', caption: '取消资格', disabled: false, type: 'ITEMS', visabled: true, dataaccaction: '',
model: {
deuiaction5: { name: 'deuiaction5', caption: '丢单','isShowCaption':true,'isShowIcon':true, tooltip: '丢单', iconcls: 'fa fa-close', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'DisQualification', target: 'SINGLEKEY' }, class: '' },
deuiaction6: { name: 'deuiaction6', caption: '无法联系','isShowCaption':true,'isShowIcon':true, tooltip: '无法联系', iconcls: 'fa fa-close', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'DisQualification', target: 'SINGLEKEY' }, class: '' },
deuiaction7: { name: 'deuiaction7', caption: '不再感兴趣','isShowCaption':true,'isShowIcon':true, tooltip: '不再感兴趣', iconcls: 'fa fa-close', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'DisQualification', target: 'SINGLEKEY' }, class: '' },
deuiaction8: { name: 'deuiaction8', caption: '已取消','isShowCaption':true,'isShowIcon':true, tooltip: '已取消', iconcls: 'fa fa-close', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'DisQualification', target: 'SINGLEKEY' }, class: '' },
}
},
tbitem13: { name: 'tbitem13', 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: '' },
};
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof LeadInfoBase
*/
public engine: TabExpViewEngine = new TabExpViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof LeadInfoBase
*/
public engineInit(): void {
this.engine.init({
view: this,
keyPSDEField: 'lead',
majorPSDEField: 'fullname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof LeadInfoBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_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, 'deuiaction2')) {
this.toolbar_deuiaction2_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction4')) {
this.toolbar_deuiaction4_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction5')) {
this.toolbar_deuiaction5_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction6')) {
this.toolbar_deuiaction6_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction7')) {
this.toolbar_deuiaction7_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction8')) {
this.toolbar_deuiaction8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2);
}
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"Lead");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"Lead");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"Lead");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction2_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"Lead");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction4_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:LeadUIService = new LeadUIService();
curUIService.Lead_Qualification(datas,contextJO, paramJO, $event, xData,this,"Lead");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction5_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:LeadUIService = new LeadUIService();
curUIService.Lead_DisQualification(datas,contextJO, paramJO, $event, xData,this,"Lead");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction6_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:LeadUIService = new LeadUIService();
curUIService.Lead_DisQualification(datas,contextJO, paramJO, $event, xData,this,"Lead");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction7_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:LeadUIService = new LeadUIService();
curUIService.Lead_DisQualification(datas,contextJO, paramJO, $event, xData,this,"Lead");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction8_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:LeadUIService = new LeadUIService();
curUIService.Lead_DisQualification(datas,contextJO, paramJO, $event, xData,this,"Lead");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem12_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Exit(datas, contextJO,paramJO, $event, xData,this,"Lead");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof LeadInfoBase
*/
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 LeadInfoBase
*/
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 }],'*');
}
});
}
}
/**
* 删除并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof LeadInfoBase
*/
public RemoveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.removeAndExit instanceof Function) {
xData.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.removeAndExit && _this.removeAndExit instanceof Function) {
_this.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 刷新
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof LeadInfoBase
*/
public Refresh(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);
}
}
/**
* 关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof LeadInfoBase
*/
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 }],'*');
}
}
/**
* 加载模型
*
* @protected
* @memberof LeadInfoBase
*/
protected async loadModel(): Promise<any> {
if(this.context.lead){
this.appEntityService.getDataInfo(JSON.parse(JSON.stringify(this.context)),{},false).then((response:any) =>{
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (_data.fullname) {
Object.assign(this.model, { dataInfo: _data.fullname });
if (this.$tabPageExp) {
this.$tabPageExp.setCurPageCaption(this.model.srfTitle, this.model.srfTitle, this.model.dataInfo);
}
if(this.$route){
this.$route.meta.info = this.model.dataInfo;
}
Object.assign(this.model, { srfTitle: `${this.$t(this.model.srfTitle)} - ${this.model.dataInfo}` });
}
})
}
}
}
</script>
<style lang='less'>
@import './lead-info.less';
</style>
\ No newline at end of file
// 避免空文件,后台不让空文件过
.lead-info {
--lead-info: 0;
}
// 视图样式
// this is less
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import LeadInfoBase from './lead-info-base.vue';
import view_tabexppanel from '@widgets/lead/infotabexppanel-tabexppanel/infotabexppanel-tabexppanel.vue';
@Component({
components: {
view_tabexppanel,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
},
})
export default class LeadInfo extends LeadInfoBase {
}
</script>
\ No newline at end of file
...@@ -89,7 +89,7 @@ export const PageComponents = { ...@@ -89,7 +89,7 @@ export const PageComponents = {
Vue.component('list-account-quick-create-by-list', () => import('@pages/marketing/list-account-quick-create-by-list/list-account-quick-create-by-list.vue')); Vue.component('list-account-quick-create-by-list', () => import('@pages/marketing/list-account-quick-create-by-list/list-account-quick-create-by-list.vue'));
Vue.component('campaign-list-edit-view', () => import('@pages/marketing/campaign-list-edit-view/campaign-list-edit-view.vue')); Vue.component('campaign-list-edit-view', () => import('@pages/marketing/campaign-list-edit-view/campaign-list-edit-view.vue'));
Vue.component('account-pickup-grid-view', () => import('@pages/base/account-pickup-grid-view/account-pickup-grid-view.vue')); Vue.component('account-pickup-grid-view', () => import('@pages/base/account-pickup-grid-view/account-pickup-grid-view.vue'));
Vue.component('lead-tab-exp-view', () => import('@pages/sales/lead-tab-exp-view/lead-tab-exp-view.vue')); Vue.component('lead-info', () => import('@pages/sales/lead-info/lead-info.vue'));
Vue.component('list-lead-quick-create-by-list', () => import('@pages/marketing/list-lead-quick-create-by-list/list-lead-quick-create-by-list.vue')); Vue.component('list-lead-quick-create-by-list', () => import('@pages/marketing/list-lead-quick-create-by-list/list-lead-quick-create-by-list.vue'));
Vue.component('account-info', () => import('@pages/base/account-info/account-info.vue')); Vue.component('account-info', () => import('@pages/base/account-info/account-info.vue'));
Vue.component('lead-info-detail', () => import('@pages/sales/lead-info-detail/lead-info-detail.vue')); Vue.component('lead-info-detail', () => import('@pages/sales/lead-info-detail/lead-info-detail.vue'));
......
...@@ -2644,64 +2644,64 @@ const router = new Router({ ...@@ -2644,64 +2644,64 @@ const router = new Router({
component: () => import('@pages/base/account-pickup-grid-view/account-pickup-grid-view.vue'), component: () => import('@pages/base/account-pickup-grid-view/account-pickup-grid-view.vue'),
}, },
{ {
path: 'accounts/:account?/contacts/:contact?/leads/:lead?/tabexpview/:tabexpview?', path: 'accounts/:account?/contacts/:contact?/leads/:lead?/info/:info?',
meta: { meta: {
caption: 'entities.lead.views.tabexpview.title', caption: 'entities.lead.views.info.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'central', parameterName: 'central' }, { pathName: 'central', parameterName: 'central' },
{ pathName: 'accounts', parameterName: 'account' }, { pathName: 'accounts', parameterName: 'account' },
{ pathName: 'contacts', parameterName: 'contact' }, { pathName: 'contacts', parameterName: 'contact' },
{ pathName: 'leads', parameterName: 'lead' }, { pathName: 'leads', parameterName: 'lead' },
{ pathName: 'tabexpview', parameterName: 'tabexpview' }, { pathName: 'info', parameterName: 'info' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/sales/lead-tab-exp-view/lead-tab-exp-view.vue'), component: () => import('@pages/sales/lead-info/lead-info.vue'),
}, },
{ {
path: 'contacts/:contact?/leads/:lead?/tabexpview/:tabexpview?', path: 'contacts/:contact?/leads/:lead?/info/:info?',
meta: { meta: {
caption: 'entities.lead.views.tabexpview.title', caption: 'entities.lead.views.info.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'central', parameterName: 'central' }, { pathName: 'central', parameterName: 'central' },
{ pathName: 'contacts', parameterName: 'contact' }, { pathName: 'contacts', parameterName: 'contact' },
{ pathName: 'leads', parameterName: 'lead' }, { pathName: 'leads', parameterName: 'lead' },
{ pathName: 'tabexpview', parameterName: 'tabexpview' }, { pathName: 'info', parameterName: 'info' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/sales/lead-tab-exp-view/lead-tab-exp-view.vue'), component: () => import('@pages/sales/lead-info/lead-info.vue'),
}, },
{ {
path: 'campaigns/:campaign?/leads/:lead?/tabexpview/:tabexpview?', path: 'campaigns/:campaign?/leads/:lead?/info/:info?',
meta: { meta: {
caption: 'entities.lead.views.tabexpview.title', caption: 'entities.lead.views.info.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'central', parameterName: 'central' }, { pathName: 'central', parameterName: 'central' },
{ pathName: 'campaigns', parameterName: 'campaign' }, { pathName: 'campaigns', parameterName: 'campaign' },
{ pathName: 'leads', parameterName: 'lead' }, { pathName: 'leads', parameterName: 'lead' },
{ pathName: 'tabexpview', parameterName: 'tabexpview' }, { pathName: 'info', parameterName: 'info' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/sales/lead-tab-exp-view/lead-tab-exp-view.vue'), component: () => import('@pages/sales/lead-info/lead-info.vue'),
}, },
{ {
path: 'leads/:lead?/tabexpview/:tabexpview?', path: 'leads/:lead?/info/:info?',
meta: { meta: {
caption: 'entities.lead.views.tabexpview.title', caption: 'entities.lead.views.info.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'central', parameterName: 'central' }, { pathName: 'central', parameterName: 'central' },
{ pathName: 'leads', parameterName: 'lead' }, { pathName: 'leads', parameterName: 'lead' },
{ pathName: 'tabexpview', parameterName: 'tabexpview' }, { pathName: 'info', parameterName: 'info' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/sales/lead-tab-exp-view/lead-tab-exp-view.vue'), component: () => import('@pages/sales/lead-info/lead-info.vue'),
}, },
{ {
path: 'accounts/:account?/contacts/:contact?/leads/:lead?/listleads/:listlead?/quickcreatebylist/:quickcreatebylist?', path: 'accounts/:account?/contacts/:contact?/leads/:lead?/listleads/:listlead?/quickcreatebylist/:quickcreatebylist?',
...@@ -3988,60 +3988,60 @@ const router = new Router({ ...@@ -3988,60 +3988,60 @@ const router = new Router({
component: () => import('@pages/base/account-info-all/account-info-all.vue'), component: () => import('@pages/base/account-info-all/account-info-all.vue'),
}, },
{ {
path: '/accounts/:account?/contacts/:contact?/leads/:lead?/tabexpview/:tabexpview?', path: '/accounts/:account?/contacts/:contact?/leads/:lead?/info/:info?',
meta: { meta: {
caption: 'entities.lead.views.tabexpview.title', caption: 'entities.lead.views.info.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'accounts', parameterName: 'account' }, { pathName: 'accounts', parameterName: 'account' },
{ pathName: 'contacts', parameterName: 'contact' }, { pathName: 'contacts', parameterName: 'contact' },
{ pathName: 'leads', parameterName: 'lead' }, { pathName: 'leads', parameterName: 'lead' },
{ pathName: 'tabexpview', parameterName: 'tabexpview' }, { pathName: 'info', parameterName: 'info' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/sales/lead-tab-exp-view/lead-tab-exp-view.vue'), component: () => import('@pages/sales/lead-info/lead-info.vue'),
}, },
{ {
path: '/contacts/:contact?/leads/:lead?/tabexpview/:tabexpview?', path: '/contacts/:contact?/leads/:lead?/info/:info?',
meta: { meta: {
caption: 'entities.lead.views.tabexpview.title', caption: 'entities.lead.views.info.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'contacts', parameterName: 'contact' }, { pathName: 'contacts', parameterName: 'contact' },
{ pathName: 'leads', parameterName: 'lead' }, { pathName: 'leads', parameterName: 'lead' },
{ pathName: 'tabexpview', parameterName: 'tabexpview' }, { pathName: 'info', parameterName: 'info' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/sales/lead-tab-exp-view/lead-tab-exp-view.vue'), component: () => import('@pages/sales/lead-info/lead-info.vue'),
}, },
{ {
path: '/campaigns/:campaign?/leads/:lead?/tabexpview/:tabexpview?', path: '/campaigns/:campaign?/leads/:lead?/info/:info?',
meta: { meta: {
caption: 'entities.lead.views.tabexpview.title', caption: 'entities.lead.views.info.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'campaigns', parameterName: 'campaign' }, { pathName: 'campaigns', parameterName: 'campaign' },
{ pathName: 'leads', parameterName: 'lead' }, { pathName: 'leads', parameterName: 'lead' },
{ pathName: 'tabexpview', parameterName: 'tabexpview' }, { pathName: 'info', parameterName: 'info' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/sales/lead-tab-exp-view/lead-tab-exp-view.vue'), component: () => import('@pages/sales/lead-info/lead-info.vue'),
}, },
{ {
path: '/leads/:lead?/tabexpview/:tabexpview?', path: '/leads/:lead?/info/:info?',
meta: { meta: {
caption: 'entities.lead.views.tabexpview.title', caption: 'entities.lead.views.info.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'leads', parameterName: 'lead' }, { pathName: 'leads', parameterName: 'lead' },
{ pathName: 'tabexpview', parameterName: 'tabexpview' }, { pathName: 'info', parameterName: 'info' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/sales/lead-tab-exp-view/lead-tab-exp-view.vue'), component: () => import('@pages/sales/lead-info/lead-info.vue'),
}, },
{ {
path: '/incidents/:incident?/gridview/:gridview?', path: '/incidents/:incident?/gridview/:gridview?',
......
...@@ -310,7 +310,7 @@ export const viewstate: any = { ...@@ -310,7 +310,7 @@ export const viewstate: any = {
{ {
viewtag: '35728a12ceecb647982051842853547c', viewtag: '35728a12ceecb647982051842853547c',
viewmodule: 'Sales', viewmodule: 'Sales',
viewname: 'LeadTabExpView', viewname: 'LeadInfo',
viewaction: '', viewaction: '',
viewdatachange: false, viewdatachange: false,
refviews: [ refviews: [
......
...@@ -82,7 +82,7 @@ export default class LeadUIServiceBase extends UIService { ...@@ -82,7 +82,7 @@ export default class LeadUIServiceBase extends UIService {
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'leads'}); this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'leads'});
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'leads'}); this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'leads'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'leads'}); this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'leads'});
this.allViewMap.set(':',{viewname:'tabexpview',srfappde:'leads'}); this.allViewMap.set(':',{viewname:'info',srfappde:'leads'});
this.allViewMap.set(':',{viewname:'quickcreate',srfappde:'leads'}); this.allViewMap.set(':',{viewname:'quickcreate',srfappde:'leads'});
this.allViewMap.set(':',{viewname:'info_market',srfappde:'leads'}); this.allViewMap.set(':',{viewname:'info_market',srfappde:'leads'});
this.allViewMap.set(':',{viewname:'info_contact',srfappde:'leads'}); this.allViewMap.set(':',{viewname:'info_contact',srfappde:'leads'});
...@@ -165,6 +165,134 @@ export default class LeadUIServiceBase extends UIService { ...@@ -165,6 +165,134 @@ export default class LeadUIServiceBase extends UIService {
openDrawer(view, data); openDrawer(view, data);
} }
/**
* 授予资格
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async Lead_Qualification(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
Object.assign(context, { lead: '%lead%' });
Object.assign(params, { leadid: '%lead%' });
Object.assign(params, { fullname: '%fullname%' });
if(_this.context){
parentContext = _this.context;
}
if(_this.viewparams){
parentViewParam = _this.viewparams;
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
context = Object.assign({},actionContext.context,context);
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
Object.assign(data,parentObj);
Object.assign(context,parentObj);
// 直接调实体服务需要转换的数据
if(context && context.srfsessionid){
context.srfsessionkey = context.srfsessionid;
delete context.srfsessionid;
}
const backend = () => {
const curService:LeadService = new LeadService();
curService.Qualification(context,data, true).then((response: any) => {
if (!response || response.status !== 200) {
actionContext.$Notice.error({ title: '错误', desc: response.message });
return;
}
actionContext.$Notice.success({ title: '成功', desc: '授予资格成功!' });
const _this: any = actionContext;
return response;
}).catch((response: any) => {
if (!response || !response.status || !response.data) {
actionContext.$Notice.error({ title: '错误', desc: '系统异常!' });
return;
}
if (response.status === 401) {
return;
}
return response;
});
};
backend();
}
/**
* 取消资格
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async Lead_DisQualification(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
Object.assign(context, { lead: '%lead%' });
Object.assign(params, { leadid: '%lead%' });
Object.assign(params, { fullname: '%fullname%' });
if(_this.context){
parentContext = _this.context;
}
if(_this.viewparams){
parentViewParam = _this.viewparams;
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
context = Object.assign({},actionContext.context,context);
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
Object.assign(data,parentObj);
Object.assign(context,parentObj);
// 直接调实体服务需要转换的数据
if(context && context.srfsessionid){
context.srfsessionkey = context.srfsessionid;
delete context.srfsessionid;
}
const backend = () => {
const curService:LeadService = new LeadService();
curService.DisQualification(context,data, true).then((response: any) => {
if (!response || response.status !== 200) {
actionContext.$Notice.error({ title: '错误', desc: response.message });
return;
}
actionContext.$Notice.success({ title: '成功', desc: '取消资格成功!' });
const _this: any = actionContext;
return response;
}).catch((response: any) => {
if (!response || !response.status || !response.data) {
actionContext.$Notice.error({ title: '错误', desc: '系统异常!' });
return;
}
if (response.status === 401) {
return;
}
return response;
});
};
backend();
}
/** /**
* 获取指定数据的重定向页面 * 获取指定数据的重定向页面
......
<template>
<div class='tabviewpanel'>
<tabs :value="activiedTabViewPanel" :animated="false" class='tabexppanel' name='infotabexppanel' @on-click="tabPanelClick">
<tab-pane :index="0" name='tabviewpanel' tab='infotabexppanel' class=''
:label="(h) =>{
return h('div', [
h('i',{
class:'fa fa-info-circle',
style:{
'margin-right' : '2px'
}
}),
h('span', '概览'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}" >
<view_tabviewpanel
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
v-if="isInit.tabviewpanel"
name="tabviewpanel"
ref='tabviewpanel'
@viewpanelDatasChange = "tabViewPanelDatasChange"
@closeview="closeView($event)">
</view_tabviewpanel>
</tab-pane>
<tab-pane :index="1" name='tabviewpanel2' tab='infotabexppanel' class=''
:label="(h) =>{
return h('div', [
h('i',{
class:'fa fa-paper-plane',
style:{
'margin-right' : '2px'
}
}),
h('span', '活动'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}" >
<view_tabviewpanel2
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
v-if="isInit.tabviewpanel2"
name="tabviewpanel2"
ref='tabviewpanel2'
@viewpanelDatasChange = "tabViewPanelDatasChange"
@closeview="closeView($event)">
</view_tabviewpanel2>
</tab-pane>
</tabs>
</div>
</template>
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch, Model } from 'vue-property-decorator';
import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import { UIActionTool,Util } from '@/utils';
import LeadService from '@/service/lead/lead-service';
import InfotabexppanelService from './infotabexppanel-tabexppanel-service';
@Component({
components: {
}
})
export default class InfotabexppanelBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof Infotabexppanel
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Infotabexppanel
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof Infotabexppanel
*/
@Prop() public context: any;
/**
* 视图参数
*
* @type {*}
* @memberof Infotabexppanel
*/
@Prop() public viewparams: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Infotabexppanel
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof Infotabexppanel
*/
public getControlType(): string {
return 'TABEXPPANEL'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof Infotabexppanel
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {InfotabexppanelService}
* @memberof Infotabexppanel
*/
public service: InfotabexppanelService = new InfotabexppanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {LeadService}
* @memberof Infotabexppanel
*/
public appEntityService: LeadService = new LeadService({ $store: this.$store });
/**
* 关闭视图
*
* @param {any} args
* @memberof Infotabexppanel
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof Infotabexppanel
*/
public counterRefresh(){
const _this:any =this;
if(_this.counterServiceArray && _this.counterServiceArray.length >0){
_this.counterServiceArray.forEach((item:any) =>{
if(item.refreshData && item.refreshData instanceof Function){
item.refreshData();
}
})
}
}
/**
* 是否初始化
*
* @returns {any}
* @memberof Infotabexppanel
*/
public isInit: any = {
tabviewpanel: true ,
tabviewpanel2: false ,
}
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof Infotabexppanel
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof Infotabexppanel
*/
public getData(): any {
return null;
}
/**
* 行为参数
*
* @public
* @type {*}
* @memberof Infotabexppanel
*/
public action:any = '';
/**
* 被激活的分页面板
*
* @type {string}
* @memberof Infotabexppanel
*/
public activiedTabViewPanel: string = 'tabviewpanel';
/**
* 分页视图面板数据变更
*
* @memberof Infotabexppanel
*/
public tabViewPanelDatasChange(){
this.counterRefresh();
}
/**
* vue 生命周期
*
* @returns
* @memberof Infotabexppanel
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof Infotabexppanel
*/
public afterCreated(){
//设置分页导航srfparentdename和srfparentkey
if (this.context.lead) {
Object.assign(this.context, { srfparentdename: 'Lead', srfparentkey: this.context.lead });
}
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.action = action;
this.viewState.next({ tag: this.activiedTabViewPanel, action: action, data: data });
this.$forceUpdate();
});
}
}
/**
* 组件加载完毕
*
* @memberof Infotabexppanel
*/
public mounted(): void {
if (this.viewparams) {
const activate = this.viewparams.srftabactivate;
if (activate && this.isInit[activate] !== undefined) {
for (const key in this.isInit) {
if (this.isInit.hasOwnProperty(key)) {
this.isInit[key] = false;
}
}
this.$nextTick(() => {
this.tabPanelClick(activate);
});
}
}
}
/**
* vue 生命周期
*
* @memberof Infotabexppanel
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof Infotabexppanel
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 分页面板选中
*
* @param {*} $event
* @returns
* @memberof Infotabexppanel
*/
public tabPanelClick($event: any) {
if (!$event) {
return;
}
this.isInit[$event] = true;
if (!this.viewState) {
return;
}
this.activiedTabViewPanel = $event;
this.viewState.next({ tag: this.activiedTabViewPanel, action: this.action, data: {}});
}
}
</script>
<style lang='less'>
@import './infotabexppanel-tabexppanel.less';
</style>
\ No newline at end of file
/**
* Infotabexppanel 部件模型
*
* @export
* @class InfotabexppanelModel
*/
export default class InfotabexppanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfotabexppanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'address1_fax',
},
{
name: 'address2_utcoffset',
},
{
name: 'jobtitle',
},
{
name: 'address2_country',
},
{
name: 'budgetamount',
},
{
name: 'address2_fax',
},
{
name: 'onholdtime',
},
{
name: 'lastname',
},
{
name: 'address1_telephone2',
},
{
name: 'address1_stateorprovince',
},
{
name: 'masterleadidyominame',
},
{
name: 'estimatedvalue',
},
{
name: 'lead',
prop: 'leadid',
},
{
name: 'address1_longitude',
},
{
name: 'address1_line1',
},
{
name: 'leadqualitycode',
},
{
name: 'donotphone',
},
{
name: 'exchangerate',
},
{
name: 'entityimage_url',
},
{
name: 'createman',
},
{
name: 'address2_stateorprovince',
},
{
name: 'description',
},
{
name: 'numberofemployees',
},
{
name: 'address1_city',
},
{
name: 'entityimageid',
},
{
name: 'address2_line3',
},
{
name: 'statuscode',
},
{
name: 'address2_line1',
},
{
name: 'customerid',
},
{
name: 'companyname',
},
{
name: 'versionnumber',
},
{
name: 'qualificationcomments',
},
{
name: 'owneridtype',
},
{
name: 'contactidyominame',
},
{
name: 'address2_name',
},
{
name: 'emailaddress1',
},
{
name: 'followemail',
},
{
name: 'address1_country',
},
{
name: 'websiteurl',
},
{
name: 'yomicompanyname',
},
{
name: 'updatedate',
},
{
name: 'address1_line3',
},
{
name: 'address2_addressid',
},
{
name: 'address1_composite',
},
{
name: 'subject',
},
{
name: 'address1_utcoffset',
},
{
name: 'budgetamount_base',
},
{
name: 'address1_addresstypecode',
},
{
name: 'address2_telephone3',
},
{
name: 'evaluatefit',
},
{
name: 'address1_latitude',
},
{
name: 'address1_telephone3',
},
{
name: 'fullname',
},
{
name: 'estimatedamount_base',
},
{
name: 'budgetstatus',
},
{
name: 'industrycode',
},
{
name: 'address1_line2',
},
{
name: 'initialcommunication',
},
{
name: 'address1_postofficebox',
},
{
name: 'address1_telephone1',
},
{
name: 'revenue',
},
{
name: 'yomilastname',
},
{
name: 'address2_county',
},
{
name: 'stageid',
},
{
name: 'address1_shippingmethodcode',
},
{
name: 'estimatedamount',
},
{
name: 'address1_county',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'lastonholdtime',
},
{
name: 'createdate',
},
{
name: 'teamsfollowed',
},
{
name: 'salutation',
},
{
name: 'address2_shippingmethodcode',
},
{
name: 'address2_latitude',
},
{
name: 'participatesinworkflow',
},
{
name: 'yomifirstname',
},
{
name: 'address2_composite',
},
{
name: 'salesstage',
},
{
name: 'donotpostalmail',
},
{
name: 'customeridyominame',
},
{
name: 'revenue_base',
},
{
name: 'overriddencreatedon',
},
{
name: 'schedulefollowup_prospect',
},
{
name: 'address2_city',
},
{
name: 'telephone1',
},
{
name: 'ibizprivate',
},
{
name: 'customeridtype',
},
{
name: 'mobilephone',
},
{
name: 'need',
},
{
name: 'prioritycode',
},
{
name: 'address1_addressid',
},
{
name: 'yomifullname',
},
{
name: 'salesstagecode',
},
{
name: 'importsequencenumber',
},
{
name: 'address2_telephone1',
},
{
name: 'ownerid',
},
{
name: 'middlename',
},
{
name: 'telephone2',
},
{
name: 'purchasetimeframe',
},
{
name: 'yomimiddlename',
},
{
name: 'leadsourcecode',
},
{
name: 'entityimage_timestamp',
},
{
name: 'preferredcontactmethodcode',
},
{
name: 'entityimage',
},
{
name: 'address2_telephone2',
},
{
name: 'donotsendmm',
},
{
name: 'purchaseprocess',
},
{
name: 'donotbulkemail',
},
{
name: 'sic',
},
{
name: 'donotemail',
},
{
name: 'address2_longitude',
},
{
name: 'confirminterest',
},
{
name: 'address2_postofficebox',
},
{
name: 'statecode',
},
{
name: 'autocreate',
},
{
name: 'address1_name',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'lastusedincampaign',
},
{
name: 'estimatedclosedate',
},
{
name: 'address2_line2',
},
{
name: 'emailaddress3',
},
{
name: 'pager',
},
{
name: 'address2_upszone',
},
{
name: 'traversedpath',
},
{
name: 'fax',
},
{
name: 'schedulefollowup_qualify',
},
{
name: 'telephone3',
},
{
name: 'processid',
},
{
name: 'emailaddress2',
},
{
name: 'updateman',
},
{
name: 'decisionmaker',
},
{
name: 'owneridyominame',
},
{
name: 'address1_postalcode',
},
{
name: 'address2_postalcode',
},
{
name: 'donotfax',
},
{
name: 'firstname',
},
{
name: 'merged',
},
{
name: 'address2_addresstypecode',
},
{
name: 'address1_upszone',
},
{
name: 'slaname',
},
{
name: 'qualifyingopportunityid',
},
{
name: 'slaid',
},
{
name: 'campaignid',
},
{
name: 'relatedobjectid',
},
{
name: 'transactioncurrencyid',
},
{
name: 'parentaccountid',
},
{
name: 'originatingcaseid',
},
{
name: 'parentcontactid',
},
{
name: 'originatingcasename',
},
{
name: 'qualifyingopportunityname',
},
{
name: 'campaignname',
},
{
name: 'parentcontactname',
},
{
name: 'parentaccountname',
},
{
name: 'relatedobjectname',
},
{
name: 'transactioncurrencyname',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import LeadService from '@/service/lead/lead-service';
import InfotabexppanelModel from './infotabexppanel-tabexppanel-model';
/**
* Infotabexppanel 部件服务对象
*
* @export
* @class InfotabexppanelService
*/
export default class InfotabexppanelService extends ControlService {
/**
* 潜在顾客服务对象
*
* @type {LeadService}
* @memberof InfotabexppanelService
*/
public appEntityService: LeadService = new LeadService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof InfotabexppanelService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of InfotabexppanelService.
*
* @param {*} [opts={}]
* @memberof InfotabexppanelService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new InfotabexppanelModel();
}
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import InfotabexppanelBase from './infotabexppanel-tabexppanel-base.vue';
import view_tabviewpanel from '@widgets/lead/infotabviewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.vue';
import view_tabviewpanel2 from '@widgets/lead/infotabviewpanel2-tabviewpanel/infotabviewpanel2-tabviewpanel.vue';
@Component({
components: {
view_tabviewpanel,
view_tabviewpanel2,
}
})
export default class Infotabexppanel extends InfotabexppanelBase {
}
</script>
\ No newline at end of file
<template>
<div class='tabviewpanel' style="height:100%;" v-if = 'isActivied' >
<lead-dashboard-view
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false" >
</lead-dashboard-view>
</div>
</template>
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch, Model } from 'vue-property-decorator';
import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import { UIActionTool,Util } from '@/utils';
import LeadService from '@/service/lead/lead-service';
import InfotabviewpanelService from './infotabviewpanel-tabviewpanel-service';
@Component({
components: {
}
})
export default class InfotabviewpanelBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof Infotabviewpanel
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Infotabviewpanel
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof Infotabviewpanel
*/
@Prop() public context: any;
/**
* 视图参数
*
* @type {*}
* @memberof Infotabviewpanel
*/
@Prop() public viewparams: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Infotabviewpanel
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof Infotabviewpanel
*/
public getControlType(): string {
return 'TABVIEWPANEL'
}
/**
* 建构部件服务对象
*
* @type {InfotabviewpanelService}
* @memberof Infotabviewpanel
*/
public service: InfotabviewpanelService = new InfotabviewpanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {LeadService}
* @memberof Infotabviewpanel
*/
public appEntityService: LeadService = new LeadService({ $store: this.$store });
/**
* 关闭视图
*
* @param {any} args
* @memberof Infotabviewpanel
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof Infotabviewpanel
*/
public counterRefresh(){
const _this:any =this;
if(_this.counterServiceArray && _this.counterServiceArray.length >0){
_this.counterServiceArray.forEach((item:any) =>{
if(item.refreshData && item.refreshData instanceof Function){
item.refreshData();
}
})
}
}
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof Infotabviewpanel
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof Infotabviewpanel
*/
public getData(): any {
return null;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof Infotabviewpanel
*/
public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof Infotabviewpanel
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof Infotabviewpanel
*/
public localViewParam: any = null;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof Infotabviewpanel
*/
public navfilter: string = "";
/**
* vue 生命周期
*
* @returns
* @memberof Infotabviewpanel
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof Infotabviewpanel
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.$forceUpdate();
this.initNavParam();
});
}
}
/**
* 初始化导航参数
*
* @memberof Infotabviewpanel
*/
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* 视图数据变化
*
* @memberof Infotabviewpanel
*/
public viewDatasChange($event:any){
this.$emit('viewpanelDatasChange',$event);
}
/**
* vue 生命周期
*
* @memberof Infotabviewpanel
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof Infotabviewpanel
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
</script>
<style lang='less'>
@import './infotabviewpanel-tabviewpanel.less';
</style>
\ No newline at end of file
/**
* Infotabviewpanel 部件模型
*
* @export
* @class InfotabviewpanelModel
*/
export default class InfotabviewpanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfotabviewpanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'address1_fax',
},
{
name: 'address2_utcoffset',
},
{
name: 'jobtitle',
},
{
name: 'address2_country',
},
{
name: 'budgetamount',
},
{
name: 'address2_fax',
},
{
name: 'onholdtime',
},
{
name: 'lastname',
},
{
name: 'address1_telephone2',
},
{
name: 'address1_stateorprovince',
},
{
name: 'masterleadidyominame',
},
{
name: 'estimatedvalue',
},
{
name: 'lead',
prop: 'leadid',
},
{
name: 'address1_longitude',
},
{
name: 'address1_line1',
},
{
name: 'leadqualitycode',
},
{
name: 'donotphone',
},
{
name: 'exchangerate',
},
{
name: 'entityimage_url',
},
{
name: 'createman',
},
{
name: 'address2_stateorprovince',
},
{
name: 'description',
},
{
name: 'numberofemployees',
},
{
name: 'address1_city',
},
{
name: 'entityimageid',
},
{
name: 'address2_line3',
},
{
name: 'statuscode',
},
{
name: 'address2_line1',
},
{
name: 'customerid',
},
{
name: 'companyname',
},
{
name: 'versionnumber',
},
{
name: 'qualificationcomments',
},
{
name: 'owneridtype',
},
{
name: 'contactidyominame',
},
{
name: 'address2_name',
},
{
name: 'emailaddress1',
},
{
name: 'followemail',
},
{
name: 'address1_country',
},
{
name: 'websiteurl',
},
{
name: 'yomicompanyname',
},
{
name: 'updatedate',
},
{
name: 'address1_line3',
},
{
name: 'address2_addressid',
},
{
name: 'address1_composite',
},
{
name: 'subject',
},
{
name: 'address1_utcoffset',
},
{
name: 'budgetamount_base',
},
{
name: 'address1_addresstypecode',
},
{
name: 'address2_telephone3',
},
{
name: 'evaluatefit',
},
{
name: 'address1_latitude',
},
{
name: 'address1_telephone3',
},
{
name: 'fullname',
},
{
name: 'estimatedamount_base',
},
{
name: 'budgetstatus',
},
{
name: 'industrycode',
},
{
name: 'address1_line2',
},
{
name: 'initialcommunication',
},
{
name: 'address1_postofficebox',
},
{
name: 'address1_telephone1',
},
{
name: 'revenue',
},
{
name: 'yomilastname',
},
{
name: 'address2_county',
},
{
name: 'stageid',
},
{
name: 'address1_shippingmethodcode',
},
{
name: 'estimatedamount',
},
{
name: 'address1_county',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'lastonholdtime',
},
{
name: 'createdate',
},
{
name: 'teamsfollowed',
},
{
name: 'salutation',
},
{
name: 'address2_shippingmethodcode',
},
{
name: 'address2_latitude',
},
{
name: 'participatesinworkflow',
},
{
name: 'yomifirstname',
},
{
name: 'address2_composite',
},
{
name: 'salesstage',
},
{
name: 'donotpostalmail',
},
{
name: 'customeridyominame',
},
{
name: 'revenue_base',
},
{
name: 'overriddencreatedon',
},
{
name: 'schedulefollowup_prospect',
},
{
name: 'address2_city',
},
{
name: 'telephone1',
},
{
name: 'ibizprivate',
},
{
name: 'customeridtype',
},
{
name: 'mobilephone',
},
{
name: 'need',
},
{
name: 'prioritycode',
},
{
name: 'address1_addressid',
},
{
name: 'yomifullname',
},
{
name: 'salesstagecode',
},
{
name: 'importsequencenumber',
},
{
name: 'address2_telephone1',
},
{
name: 'ownerid',
},
{
name: 'middlename',
},
{
name: 'telephone2',
},
{
name: 'purchasetimeframe',
},
{
name: 'yomimiddlename',
},
{
name: 'leadsourcecode',
},
{
name: 'entityimage_timestamp',
},
{
name: 'preferredcontactmethodcode',
},
{
name: 'entityimage',
},
{
name: 'address2_telephone2',
},
{
name: 'donotsendmm',
},
{
name: 'purchaseprocess',
},
{
name: 'donotbulkemail',
},
{
name: 'sic',
},
{
name: 'donotemail',
},
{
name: 'address2_longitude',
},
{
name: 'confirminterest',
},
{
name: 'address2_postofficebox',
},
{
name: 'statecode',
},
{
name: 'autocreate',
},
{
name: 'address1_name',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'lastusedincampaign',
},
{
name: 'estimatedclosedate',
},
{
name: 'address2_line2',
},
{
name: 'emailaddress3',
},
{
name: 'pager',
},
{
name: 'address2_upszone',
},
{
name: 'traversedpath',
},
{
name: 'fax',
},
{
name: 'schedulefollowup_qualify',
},
{
name: 'telephone3',
},
{
name: 'processid',
},
{
name: 'emailaddress2',
},
{
name: 'updateman',
},
{
name: 'decisionmaker',
},
{
name: 'owneridyominame',
},
{
name: 'address1_postalcode',
},
{
name: 'address2_postalcode',
},
{
name: 'donotfax',
},
{
name: 'firstname',
},
{
name: 'merged',
},
{
name: 'address2_addresstypecode',
},
{
name: 'address1_upszone',
},
{
name: 'slaname',
},
{
name: 'qualifyingopportunityid',
},
{
name: 'slaid',
},
{
name: 'campaignid',
},
{
name: 'relatedobjectid',
},
{
name: 'transactioncurrencyid',
},
{
name: 'parentaccountid',
},
{
name: 'originatingcaseid',
},
{
name: 'parentcontactid',
},
{
name: 'originatingcasename',
},
{
name: 'qualifyingopportunityname',
},
{
name: 'campaignname',
},
{
name: 'parentcontactname',
},
{
name: 'parentaccountname',
},
{
name: 'relatedobjectname',
},
{
name: 'transactioncurrencyname',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* Infotabviewpanel 部件服务对象
*
* @export
* @class InfotabviewpanelService
*/
export default class InfotabviewpanelService extends ControlService {
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import InfotabviewpanelBase from './infotabviewpanel-tabviewpanel-base.vue';
@Component({
components: {
}
})
export default class Infotabviewpanel extends InfotabviewpanelBase {
}
</script>
\ No newline at end of file
<template>
<div class='tabviewpanel' style="height:100%;" v-if = 'isActivied' >
<activity-pointer-by-parent-key
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false" >
</activity-pointer-by-parent-key>
</div>
</template>
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch, Model } from 'vue-property-decorator';
import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import { UIActionTool,Util } from '@/utils';
import LeadService from '@/service/lead/lead-service';
import Infotabviewpanel2Service from './infotabviewpanel2-tabviewpanel-service';
@Component({
components: {
}
})
export default class Infotabviewpanel2Base extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof Infotabviewpanel2
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Infotabviewpanel2
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof Infotabviewpanel2
*/
@Prop() public context: any;
/**
* 视图参数
*
* @type {*}
* @memberof Infotabviewpanel2
*/
@Prop() public viewparams: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Infotabviewpanel2
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof Infotabviewpanel2
*/
public getControlType(): string {
return 'TABVIEWPANEL'
}
/**
* 建构部件服务对象
*
* @type {Infotabviewpanel2Service}
* @memberof Infotabviewpanel2
*/
public service: Infotabviewpanel2Service = new Infotabviewpanel2Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {LeadService}
* @memberof Infotabviewpanel2
*/
public appEntityService: LeadService = new LeadService({ $store: this.$store });
/**
* 关闭视图
*
* @param {any} args
* @memberof Infotabviewpanel2
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof Infotabviewpanel2
*/
public counterRefresh(){
const _this:any =this;
if(_this.counterServiceArray && _this.counterServiceArray.length >0){
_this.counterServiceArray.forEach((item:any) =>{
if(item.refreshData && item.refreshData instanceof Function){
item.refreshData();
}
})
}
}
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof Infotabviewpanel2
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof Infotabviewpanel2
*/
public getData(): any {
return null;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof Infotabviewpanel2
*/
public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof Infotabviewpanel2
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof Infotabviewpanel2
*/
public localViewParam: any = null;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof Infotabviewpanel2
*/
public navfilter: string = "";
/**
* vue 生命周期
*
* @returns
* @memberof Infotabviewpanel2
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof Infotabviewpanel2
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.$forceUpdate();
this.initNavParam();
});
}
}
/**
* 初始化导航参数
*
* @memberof Infotabviewpanel2
*/
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* 视图数据变化
*
* @memberof Infotabviewpanel2
*/
public viewDatasChange($event:any){
this.$emit('viewpanelDatasChange',$event);
}
/**
* vue 生命周期
*
* @memberof Infotabviewpanel2
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof Infotabviewpanel2
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
</script>
<style lang='less'>
@import './infotabviewpanel2-tabviewpanel.less';
</style>
\ No newline at end of file
/**
* Infotabviewpanel2 部件模型
*
* @export
* @class Infotabviewpanel2Model
*/
export default class Infotabviewpanel2Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Infotabviewpanel2Model
*/
public getDataItems(): any[] {
return [
{
name: 'address1_fax',
},
{
name: 'address2_utcoffset',
},
{
name: 'jobtitle',
},
{
name: 'address2_country',
},
{
name: 'budgetamount',
},
{
name: 'address2_fax',
},
{
name: 'onholdtime',
},
{
name: 'lastname',
},
{
name: 'address1_telephone2',
},
{
name: 'address1_stateorprovince',
},
{
name: 'masterleadidyominame',
},
{
name: 'estimatedvalue',
},
{
name: 'lead',
prop: 'leadid',
},
{
name: 'address1_longitude',
},
{
name: 'address1_line1',
},
{
name: 'leadqualitycode',
},
{
name: 'donotphone',
},
{
name: 'exchangerate',
},
{
name: 'entityimage_url',
},
{
name: 'createman',
},
{
name: 'address2_stateorprovince',
},
{
name: 'description',
},
{
name: 'numberofemployees',
},
{
name: 'address1_city',
},
{
name: 'entityimageid',
},
{
name: 'address2_line3',
},
{
name: 'statuscode',
},
{
name: 'address2_line1',
},
{
name: 'customerid',
},
{
name: 'companyname',
},
{
name: 'versionnumber',
},
{
name: 'qualificationcomments',
},
{
name: 'owneridtype',
},
{
name: 'contactidyominame',
},
{
name: 'address2_name',
},
{
name: 'emailaddress1',
},
{
name: 'followemail',
},
{
name: 'address1_country',
},
{
name: 'websiteurl',
},
{
name: 'yomicompanyname',
},
{
name: 'updatedate',
},
{
name: 'address1_line3',
},
{
name: 'address2_addressid',
},
{
name: 'address1_composite',
},
{
name: 'subject',
},
{
name: 'address1_utcoffset',
},
{
name: 'budgetamount_base',
},
{
name: 'address1_addresstypecode',
},
{
name: 'address2_telephone3',
},
{
name: 'evaluatefit',
},
{
name: 'address1_latitude',
},
{
name: 'address1_telephone3',
},
{
name: 'fullname',
},
{
name: 'estimatedamount_base',
},
{
name: 'budgetstatus',
},
{
name: 'industrycode',
},
{
name: 'address1_line2',
},
{
name: 'initialcommunication',
},
{
name: 'address1_postofficebox',
},
{
name: 'address1_telephone1',
},
{
name: 'revenue',
},
{
name: 'yomilastname',
},
{
name: 'address2_county',
},
{
name: 'stageid',
},
{
name: 'address1_shippingmethodcode',
},
{
name: 'estimatedamount',
},
{
name: 'address1_county',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'lastonholdtime',
},
{
name: 'createdate',
},
{
name: 'teamsfollowed',
},
{
name: 'salutation',
},
{
name: 'address2_shippingmethodcode',
},
{
name: 'address2_latitude',
},
{
name: 'participatesinworkflow',
},
{
name: 'yomifirstname',
},
{
name: 'address2_composite',
},
{
name: 'salesstage',
},
{
name: 'donotpostalmail',
},
{
name: 'customeridyominame',
},
{
name: 'revenue_base',
},
{
name: 'overriddencreatedon',
},
{
name: 'schedulefollowup_prospect',
},
{
name: 'address2_city',
},
{
name: 'telephone1',
},
{
name: 'ibizprivate',
},
{
name: 'customeridtype',
},
{
name: 'mobilephone',
},
{
name: 'need',
},
{
name: 'prioritycode',
},
{
name: 'address1_addressid',
},
{
name: 'yomifullname',
},
{
name: 'salesstagecode',
},
{
name: 'importsequencenumber',
},
{
name: 'address2_telephone1',
},
{
name: 'ownerid',
},
{
name: 'middlename',
},
{
name: 'telephone2',
},
{
name: 'purchasetimeframe',
},
{
name: 'yomimiddlename',
},
{
name: 'leadsourcecode',
},
{
name: 'entityimage_timestamp',
},
{
name: 'preferredcontactmethodcode',
},
{
name: 'entityimage',
},
{
name: 'address2_telephone2',
},
{
name: 'donotsendmm',
},
{
name: 'purchaseprocess',
},
{
name: 'donotbulkemail',
},
{
name: 'sic',
},
{
name: 'donotemail',
},
{
name: 'address2_longitude',
},
{
name: 'confirminterest',
},
{
name: 'address2_postofficebox',
},
{
name: 'statecode',
},
{
name: 'autocreate',
},
{
name: 'address1_name',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'lastusedincampaign',
},
{
name: 'estimatedclosedate',
},
{
name: 'address2_line2',
},
{
name: 'emailaddress3',
},
{
name: 'pager',
},
{
name: 'address2_upszone',
},
{
name: 'traversedpath',
},
{
name: 'fax',
},
{
name: 'schedulefollowup_qualify',
},
{
name: 'telephone3',
},
{
name: 'processid',
},
{
name: 'emailaddress2',
},
{
name: 'updateman',
},
{
name: 'decisionmaker',
},
{
name: 'owneridyominame',
},
{
name: 'address1_postalcode',
},
{
name: 'address2_postalcode',
},
{
name: 'donotfax',
},
{
name: 'firstname',
},
{
name: 'merged',
},
{
name: 'address2_addresstypecode',
},
{
name: 'address1_upszone',
},
{
name: 'slaname',
},
{
name: 'qualifyingopportunityid',
},
{
name: 'slaid',
},
{
name: 'campaignid',
},
{
name: 'relatedobjectid',
},
{
name: 'transactioncurrencyid',
},
{
name: 'parentaccountid',
},
{
name: 'originatingcaseid',
},
{
name: 'parentcontactid',
},
{
name: 'originatingcasename',
},
{
name: 'qualifyingopportunityname',
},
{
name: 'campaignname',
},
{
name: 'parentcontactname',
},
{
name: 'parentaccountname',
},
{
name: 'relatedobjectname',
},
{
name: 'transactioncurrencyname',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* Infotabviewpanel2 部件服务对象
*
* @export
* @class Infotabviewpanel2Service
*/
export default class Infotabviewpanel2Service extends ControlService {
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import Infotabviewpanel2Base from './infotabviewpanel2-tabviewpanel-base.vue';
@Component({
components: {
}
})
export default class Infotabviewpanel2 extends Infotabviewpanel2Base {
}
</script>
\ No newline at end of file
...@@ -522,8 +522,8 @@ export default class QuickCreateBase extends Vue implements ControlInterface { ...@@ -522,8 +522,8 @@ export default class QuickCreateBase extends Vue implements ControlInterface {
fullname: [ fullname: [
{ type: 'string', message: '姓名 值必须为字符串类型', trigger: 'change' }, { type: 'string', message: '姓名 值必须为字符串类型', trigger: 'change' },
{ type: 'string', message: '姓名 值必须为字符串类型', trigger: 'blur' }, { type: 'string', message: '姓名 值必须为字符串类型', trigger: 'blur' },
{ required: false, type: 'string', message: '姓名 值不能为空', trigger: 'change' }, { required: true, type: 'string', message: '姓名 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '姓名 值不能为空', trigger: 'blur' }, { required: true, type: 'string', message: '姓名 值不能为空', trigger: 'blur' },
], ],
companyname: [ companyname: [
{ type: 'string', message: '公司名称 值必须为字符串类型', trigger: 'change' }, { type: 'string', message: '公司名称 值必须为字符串类型', trigger: 'change' },
......
...@@ -83,7 +83,6 @@ public class Relationships extends EntityMP implements Serializable { ...@@ -83,7 +83,6 @@ public class Relationships extends EntityMP implements Serializable {
/** /**
* 关系类型 * 关系类型
*/ */
@DEField(defaultValue = "OPPORTUNITYCOMPETITOR")
@TableField(value = "relationshipstype") @TableField(value = "relationshipstype")
@JSONField(name = "relationshipstype") @JSONField(name = "relationshipstype")
@JsonProperty("relationshipstype") @JsonProperty("relationshipstype")
......
package cn.ibizlab.businesscentral.core.sales.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.businesscentral.util.domain.EntityBase;
import cn.ibizlab.businesscentral.util.annotation.DEField;
import cn.ibizlab.businesscentral.util.enums.DEPredefinedFieldType;
import cn.ibizlab.businesscentral.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.businesscentral.util.domain.EntityMP;
/**
* 实体[潜在客户对手]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "RELATIONSHIPS",resultMap = "LeadCompetitorResultMap")
public class LeadCompetitor extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 关系标识
*/
@DEField(isKeyField=true)
@TableId(value= "relationshipsid",type=IdType.ASSIGN_UUID)
@JSONField(name = "relationshipsid")
@JsonProperty("relationshipsid")
private String relationshipsid;
/**
* 关系名称
*/
@TableField(value = "relationshipsname")
@JSONField(name = "relationshipsname")
@JsonProperty("relationshipsname")
private String relationshipsname;
/**
* 关系类型
*/
@DEField(defaultValue = "LEADCOMPETITOR")
@TableField(value = "relationshipstype")
@JSONField(name = "relationshipstype")
@JsonProperty("relationshipstype")
private String relationshipstype;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 潜在顾客
*/
@TableField(value = "entityid")
@JSONField(name = "entityid")
@JsonProperty("entityid")
private String entityid;
/**
* 竞争对手
*/
@TableField(value = "entity2id")
@JSONField(name = "entity2id")
@JsonProperty("entity2id")
private String entity2id;
/**
* 潜在客户
*/
@TableField(value = "entityname")
@JSONField(name = "entityname")
@JsonProperty("entityname")
private String entityname;
/**
* 对手
*/
@TableField(value = "entity2name")
@JSONField(name = "entity2name")
@JsonProperty("entity2name")
private String entity2name;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.sales.domain.Competitor competitor;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.sales.domain.Lead lead;
/**
* 设置 [关系名称]
*/
public void setRelationshipsname(String relationshipsname){
this.relationshipsname = relationshipsname ;
this.modify("relationshipsname",relationshipsname);
}
/**
* 设置 [关系类型]
*/
public void setRelationshipstype(String relationshipstype){
this.relationshipstype = relationshipstype ;
this.modify("relationshipstype",relationshipstype);
}
/**
* 设置 [潜在顾客]
*/
public void setEntityid(String entityid){
this.entityid = entityid ;
this.modify("entityid",entityid);
}
/**
* 设置 [竞争对手]
*/
public void setEntity2id(String entity2id){
this.entity2id = entity2id ;
this.modify("entity2id",entity2id);
}
/**
* 设置 [潜在客户]
*/
public void setEntityname(String entityname){
this.entityname = entityname ;
this.modify("entityname",entityname);
}
/**
* 设置 [对手]
*/
public void setEntity2name(String entity2name){
this.entity2name = entity2name ;
this.modify("entity2name",entity2name);
}
}
...@@ -74,6 +74,7 @@ public class OpportunityCompetitor extends EntityMP implements Serializable { ...@@ -74,6 +74,7 @@ public class OpportunityCompetitor extends EntityMP implements Serializable {
/** /**
* 关系类型 * 关系类型
*/ */
@DEField(defaultValue = "OPPORTUNITYCOMPETITOR")
@TableField(value = "relationshipstype") @TableField(value = "relationshipstype")
@JSONField(name = "relationshipstype") @JSONField(name = "relationshipstype")
@JsonProperty("relationshipstype") @JsonProperty("relationshipstype")
......
package cn.ibizlab.businesscentral.core.sales.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.businesscentral.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.businesscentral.core.sales.domain.LeadCompetitor;
/**
* 关系型数据实体[LeadCompetitor] 查询条件对象
*/
@Slf4j
@Data
public class LeadCompetitorSearchContext extends QueryWrapperContext<LeadCompetitor> {
private String n_relationshipsname_like;//[关系名称]
public void setN_relationshipsname_like(String n_relationshipsname_like) {
this.n_relationshipsname_like = n_relationshipsname_like;
if(!ObjectUtils.isEmpty(this.n_relationshipsname_like)){
this.getSearchCond().like("relationshipsname", n_relationshipsname_like);
}
}
private String n_relationshipstype_eq;//[关系类型]
public void setN_relationshipstype_eq(String n_relationshipstype_eq) {
this.n_relationshipstype_eq = n_relationshipstype_eq;
if(!ObjectUtils.isEmpty(this.n_relationshipstype_eq)){
this.getSearchCond().eq("relationshipstype", n_relationshipstype_eq);
}
}
private String n_entityid_eq;//[潜在顾客]
public void setN_entityid_eq(String n_entityid_eq) {
this.n_entityid_eq = n_entityid_eq;
if(!ObjectUtils.isEmpty(this.n_entityid_eq)){
this.getSearchCond().eq("entityid", n_entityid_eq);
}
}
private String n_entity2id_eq;//[竞争对手]
public void setN_entity2id_eq(String n_entity2id_eq) {
this.n_entity2id_eq = n_entity2id_eq;
if(!ObjectUtils.isEmpty(this.n_entity2id_eq)){
this.getSearchCond().eq("entity2id", n_entity2id_eq);
}
}
private String n_entityname_eq;//[潜在客户]
public void setN_entityname_eq(String n_entityname_eq) {
this.n_entityname_eq = n_entityname_eq;
if(!ObjectUtils.isEmpty(this.n_entityname_eq)){
this.getSearchCond().eq("entityname", n_entityname_eq);
}
}
private String n_entityname_like;//[潜在客户]
public void setN_entityname_like(String n_entityname_like) {
this.n_entityname_like = n_entityname_like;
if(!ObjectUtils.isEmpty(this.n_entityname_like)){
this.getSearchCond().like("entityname", n_entityname_like);
}
}
private String n_entity2name_eq;//[对手]
public void setN_entity2name_eq(String n_entity2name_eq) {
this.n_entity2name_eq = n_entity2name_eq;
if(!ObjectUtils.isEmpty(this.n_entity2name_eq)){
this.getSearchCond().eq("entity2name", n_entity2name_eq);
}
}
private String n_entity2name_like;//[对手]
public void setN_entity2name_like(String n_entity2name_like) {
this.n_entity2name_like = n_entity2name_like;
if(!ObjectUtils.isEmpty(this.n_entity2name_like)){
this.getSearchCond().like("entity2name", n_entity2name_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("relationshipsname", query)
);
}
}
}
package cn.ibizlab.businesscentral.core.sales.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.businesscentral.core.sales.domain.LeadCompetitor;
import cn.ibizlab.businesscentral.core.sales.filter.LeadCompetitorSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface LeadCompetitorMapper extends BaseMapper<LeadCompetitor>{
Page<LeadCompetitor> searchDefault(IPage page, @Param("srf") LeadCompetitorSearchContext context, @Param("ew") Wrapper<LeadCompetitor> wrapper) ;
@Override
LeadCompetitor selectById(Serializable id);
@Override
int insert(LeadCompetitor entity);
@Override
int updateById(@Param(Constants.ENTITY) LeadCompetitor entity);
@Override
int update(@Param(Constants.ENTITY) LeadCompetitor entity, @Param("ew") Wrapper<LeadCompetitor> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<LeadCompetitor> selectByEntity2id(@Param("competitorid") Serializable competitorid) ;
List<LeadCompetitor> selectByEntityid(@Param("leadid") Serializable leadid) ;
}
package cn.ibizlab.businesscentral.core.sales.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.businesscentral.core.sales.domain.LeadCompetitor;
import cn.ibizlab.businesscentral.core.sales.filter.LeadCompetitorSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[LeadCompetitor] 服务对象接口
*/
public interface ILeadCompetitorService extends IService<LeadCompetitor>{
boolean checkKey(LeadCompetitor et) ;
LeadCompetitor getDraft(LeadCompetitor et) ;
boolean create(LeadCompetitor et) ;
void createBatch(List<LeadCompetitor> list) ;
boolean update(LeadCompetitor et) ;
void updateBatch(List<LeadCompetitor> list) ;
boolean save(LeadCompetitor et) ;
void saveBatch(List<LeadCompetitor> list) ;
LeadCompetitor get(String key) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
Page<LeadCompetitor> searchDefault(LeadCompetitorSearchContext context) ;
List<LeadCompetitor> selectByEntity2id(String competitorid) ;
void removeByEntity2id(String competitorid) ;
List<LeadCompetitor> selectByEntityid(String leadid) ;
void removeByEntityid(String leadid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<LeadCompetitor> getLeadcompetitorByIds(List<String> ids) ;
List<LeadCompetitor> getLeadcompetitorByEntities(List<LeadCompetitor> entities) ;
}
...@@ -44,6 +44,9 @@ import org.springframework.util.StringUtils; ...@@ -44,6 +44,9 @@ import org.springframework.util.StringUtils;
@Service("CompetitorServiceImpl") @Service("CompetitorServiceImpl")
public class CompetitorServiceImpl extends ServiceImpl<CompetitorMapper, Competitor> implements ICompetitorService { public class CompetitorServiceImpl extends ServiceImpl<CompetitorMapper, Competitor> implements ICompetitorService {
@Autowired
@Lazy
private cn.ibizlab.businesscentral.core.sales.service.ILeadCompetitorService leadcompetitorService;
@Autowired @Autowired
@Lazy @Lazy
private cn.ibizlab.businesscentral.core.sales.service.IOpportunityCloseService opportunitycloseService; private cn.ibizlab.businesscentral.core.sales.service.IOpportunityCloseService opportunitycloseService;
......
package cn.ibizlab.businesscentral.core.sales.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.businesscentral.core.sales.domain.LeadCompetitor;
import cn.ibizlab.businesscentral.core.sales.filter.LeadCompetitorSearchContext;
import cn.ibizlab.businesscentral.core.sales.service.ILeadCompetitorService;
import cn.ibizlab.businesscentral.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.businesscentral.core.sales.mapper.LeadCompetitorMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[潜在客户对手] 服务对象接口实现
*/
@Slf4j
@Service("LeadCompetitorServiceImpl")
public class LeadCompetitorServiceImpl extends ServiceImpl<LeadCompetitorMapper, LeadCompetitor> implements ILeadCompetitorService {
@Autowired
@Lazy
private cn.ibizlab.businesscentral.core.sales.service.ICompetitorService competitorService;
@Autowired
@Lazy
private cn.ibizlab.businesscentral.core.sales.service.ILeadService leadService;
private int batchSize = 500;
@Override
public boolean checkKey(LeadCompetitor et) {
return (!ObjectUtils.isEmpty(et.getRelationshipsid()))&&(!Objects.isNull(this.getById(et.getRelationshipsid())));
}
@Override
public LeadCompetitor getDraft(LeadCompetitor et) {
fillParentData(et);
return et;
}
@Override
@Transactional
public boolean create(LeadCompetitor et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getRelationshipsid()),et);
return true;
}
@Override
public void createBatch(List<LeadCompetitor> list) {
list.forEach(item->fillParentData(item));
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(LeadCompetitor et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("relationshipsid",et.getRelationshipsid())))
return false;
CachedBeanCopier.copy(get(et.getRelationshipsid()),et);
return true;
}
@Override
public void updateBatch(List<LeadCompetitor> list) {
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean save(LeadCompetitor et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(LeadCompetitor et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<LeadCompetitor> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<LeadCompetitor> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
@Transactional
public LeadCompetitor get(String key) {
LeadCompetitor et = getById(key);
if(et==null){
et=new LeadCompetitor();
et.setRelationshipsid(key);
}
else{
}
return et;
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
public List<LeadCompetitor> selectByEntity2id(String competitorid) {
return baseMapper.selectByEntity2id(competitorid);
}
@Override
public void removeByEntity2id(String competitorid) {
this.remove(new QueryWrapper<LeadCompetitor>().eq("entity2id",competitorid));
}
@Override
public List<LeadCompetitor> selectByEntityid(String leadid) {
return baseMapper.selectByEntityid(leadid);
}
@Override
public void removeByEntityid(String leadid) {
this.remove(new QueryWrapper<LeadCompetitor>().eq("entityid",leadid));
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<LeadCompetitor> searchDefault(LeadCompetitorSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<LeadCompetitor> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<LeadCompetitor>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private void fillParentData(LeadCompetitor et){
//实体关系[DER1N_LEADCOMPETITOR_COMPETITOR_ENTITY2ID]
if(!ObjectUtils.isEmpty(et.getEntity2id())){
cn.ibizlab.businesscentral.core.sales.domain.Competitor competitor=et.getCompetitor();
if(ObjectUtils.isEmpty(competitor)){
cn.ibizlab.businesscentral.core.sales.domain.Competitor majorEntity=competitorService.get(et.getEntity2id());
et.setCompetitor(majorEntity);
competitor=majorEntity;
}
et.setEntity2name(competitor.getCompetitorname());
}
//实体关系[DER1N_LEADCOMPETITOR_LEAD_ENTITYID]
if(!ObjectUtils.isEmpty(et.getEntityid())){
cn.ibizlab.businesscentral.core.sales.domain.Lead lead=et.getLead();
if(ObjectUtils.isEmpty(lead)){
cn.ibizlab.businesscentral.core.sales.domain.Lead majorEntity=leadService.get(et.getEntityid());
et.setLead(majorEntity);
lead=majorEntity;
}
et.setEntityname(lead.getFullname());
}
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<LeadCompetitor> getLeadcompetitorByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<LeadCompetitor> getLeadcompetitorByEntities(List<LeadCompetitor> entities) {
List ids =new ArrayList();
for(LeadCompetitor entity : entities){
Serializable id=entity.getRelationshipsid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
}
...@@ -55,6 +55,9 @@ public class LeadServiceImpl extends ServiceImpl<LeadMapper, Lead> implements IL ...@@ -55,6 +55,9 @@ public class LeadServiceImpl extends ServiceImpl<LeadMapper, Lead> implements IL
private cn.ibizlab.businesscentral.core.sales.service.ILeadAddressService leadaddressService; private cn.ibizlab.businesscentral.core.sales.service.ILeadAddressService leadaddressService;
@Autowired @Autowired
@Lazy @Lazy
private cn.ibizlab.businesscentral.core.sales.service.ILeadCompetitorService leadcompetitorService;
@Autowired
@Lazy
private cn.ibizlab.businesscentral.core.marketing.service.IListLeadService listleadService; private cn.ibizlab.businesscentral.core.marketing.service.IListLeadService listleadService;
@Autowired @Autowired
@Lazy @Lazy
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.ibizlab.businesscentral.core.sales.mapper.LeadCompetitorMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="LeadCompetitorResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTITY2ID`, t1.`ENTITY2NAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1 ) t1 where relationshipsid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="LeadCompetitorResultMap" type="cn.ibizlab.businesscentral.core.sales.domain.LeadCompetitor" autoMapping="true">
<id property="relationshipsid" column="relationshipsid" /><!--主键字段映射-->
<result property="entityid" column="entityid" />
<result property="entity2id" column="entity2id" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="competitor" javaType="cn.ibizlab.businesscentral.core.sales.domain.Competitor" column="entity2id" select="cn.ibizlab.businesscentral.core.sales.mapper.CompetitorMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="lead" javaType="cn.ibizlab.businesscentral.core.sales.domain.Lead" column="entityid" select="cn.ibizlab.businesscentral.core.sales.mapper.LeadMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_LEADCOMPETITOR_COMPETITOR_ENTITY2ID] -->
<select id="selectByEntity2id" resultMap="LeadCompetitorResultMap">
select t1.* from (
<include refid="Default" />
) t1
where entity2id=#{competitorid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_LEADCOMPETITOR_LEAD_ENTITYID] -->
<select id="selectByEntityid" resultMap="LeadCompetitorResultMap">
select t1.* from (
<include refid="Default" />
) t1
where entityid=#{leadid}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.sales.filter.LeadCompetitorSearchContext" resultMap="LeadCompetitorResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTITY2ID`, t1.`ENTITY2NAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1
WHERE ( t1.`RELATIONSHIPSTYPE` = 'LEADCOMPETITOR' )
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTITY2ID`, t1.`ENTITY2NAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1
WHERE ( t1.`RELATIONSHIPSTYPE` = 'LEADCOMPETITOR' )
]]>
</sql>
</mapper>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册