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

lab_gzf 发布系统代码

上级 b974357b
......@@ -649,6 +649,16 @@
"viewtag": "6d8a2615030eed5779caea69f7f001aa",
"memo": "系统自动添加"
},
"opportunitypickupview": {
"title": "商机数据选择视图",
"caption": "商机",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Sales",
"viewname": "OpportunityPickupView",
"viewfilename": "opportunity-pickup-view",
"viewtag": "6debde861c6e6f91eeb442cb869e9737",
"memo": "系统自动添加"
},
"accounteditview": {
"title": "客户编辑视图",
"caption": "客户",
......@@ -659,6 +669,16 @@
"viewtag": "6e18ac74e5685439110f9b4e534ee005",
"memo": "系统自动添加"
},
"opportunitypickupgridview": {
"title": "商机选择表格视图",
"caption": "商机",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Sales",
"viewname": "OpportunityPickupGridView",
"viewfilename": "opportunity-pickup-grid-view",
"viewtag": "6e866e05730d8c3e03f150a33225307d",
"memo": "系统自动添加"
},
"accountinnerpickupgridview": {
"title": "客户选择表格视图",
"caption": "客户",
......@@ -919,6 +939,16 @@
"viewtag": "99d4a530c13b03a98cd143f341394354",
"memo": "系统自动添加"
},
"quoteoptionview": {
"title": "报价单选项操作视图",
"caption": "报价单",
"viewtype": "DEOPTVIEW",
"viewmodule": "Sales",
"viewname": "QuoteOptionView",
"viewfilename": "quote-option-view",
"viewtag": "9a8f1a5129b4191c2dfb20b23aeb4c7a",
"memo": ""
},
"contacteditview": {
"title": "联系人编辑视图",
"caption": "联系人",
......@@ -929,13 +959,13 @@
"viewtag": "9a96ebf2e57358b3590b9d4479edb77a",
"memo": "系统自动添加"
},
"competitordashboardview": {
"title": "竞争对手数据看板视图",
"caption": "竞争对手",
"competitorsummary": {
"title": "竞争对手概览",
"caption": "竞争对手概览",
"viewtype": "DEPORTALVIEW",
"viewmodule": "Sales",
"viewname": "CompetitorDashboardView",
"viewfilename": "competitor-dashboard-view",
"viewname": "CompetitorSummary",
"viewfilename": "competitor-summary",
"viewtag": "9bf80730e83a74615919a0f0907505d4",
"memo": ""
},
......@@ -1049,13 +1079,13 @@
"viewtag": "aaa875342bd9286a39c2d193a150afc4",
"memo": ""
},
"competitortabexpview": {
"title": "竞争对手分页导航视图",
"competitorinfo": {
"title": "竞争对手",
"caption": "竞争对手",
"viewtype": "DETABEXPVIEW",
"viewmodule": "Sales",
"viewname": "CompetitorTabExpView",
"viewfilename": "competitor-tab-exp-view",
"viewname": "CompetitorInfo",
"viewfilename": "competitor-info",
"viewtag": "ad5b5579442b2a90900b62803059a029",
"memo": ""
},
......
......@@ -316,7 +316,6 @@ export default {
},
info_all_form: {
details: {
grouppanel5: "简介",
group1: "账户信息",
grouppanel3: "简介",
grouppanel1: "地址信息",
......@@ -340,10 +339,6 @@ export default {
tickersymbol: "股票代号",
customertypecode: "关系类型",
defaultpricelevelname: "价目表",
industrycode1: "行业",
sic1: "行业编码",
ownershipcode1: "所有权",
description1: "说明",
industrycode: "行业",
sic: "行业编码",
ownershipcode: "所有权",
......@@ -420,33 +415,6 @@ export default {
uiactions: {
},
},
quickcreate_form: {
details: {
group1: "客户基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "客户",
srfmajortext: "客户名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
accountname: "客户名称",
telephone1: "主要电话",
fax: "传真",
websiteurl: "网站",
parentaccountname: "上级单位",
tickersymbol: "股票代号",
customertypecode: "关系类型",
defaultpricelevelname: "价目表",
defaultpricelevelid: "价目表",
parentaccountid: "上级单位",
accountid: "客户",
},
uiactions: {
},
},
main_form: {
details: {
group1: "账户信息",
......@@ -498,6 +466,33 @@ export default {
uiactions: {
},
},
quickcreate_form: {
details: {
group1: "客户基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "客户",
srfmajortext: "客户名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
accountname: "客户名称",
telephone1: "主要电话",
fax: "传真",
websiteurl: "网站",
parentaccountname: "上级单位",
tickersymbol: "股票代号",
customertypecode: "关系类型",
defaultpricelevelname: "价目表",
defaultpricelevelid: "价目表",
parentaccountid: "上级单位",
accountid: "客户",
},
uiactions: {
},
},
introduction_form: {
details: {
group1: "客户基本信息",
......@@ -616,7 +611,25 @@ export default {
uiactions: {
},
},
editviewtoolbar_toolbar: {
tbitem1: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem2: {
caption: "关闭",
tip: "关闭",
},
},
infotoolbar_toolbar: {
tbitem1_openmaineditview: {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "Save",
tip: "Save",
......
......@@ -315,7 +315,6 @@ export default {
},
info_all_form: {
details: {
grouppanel5: '简介',
group1: '账户信息',
grouppanel3: '简介',
grouppanel1: '地址信息',
......@@ -339,10 +338,6 @@ export default {
tickersymbol: '股票代号',
customertypecode: '关系类型',
defaultpricelevelname: '价目表',
industrycode1: '行业',
sic1: '行业编码',
ownershipcode1: '所有权',
description1: '说明',
industrycode: '行业',
sic: '行业编码',
ownershipcode: '所有权',
......@@ -419,33 +414,6 @@ export default {
uiactions: {
},
},
quickcreate_form: {
details: {
group1: '客户基本信息',
formpage1: '基本信息',
srfupdatedate: '更新时间',
srforikey: '',
srfkey: '客户',
srfmajortext: '客户名称',
srftempmode: '',
srfuf: '',
srfdeid: '',
srfsourcekey: '',
accountname: '客户名称',
telephone1: '主要电话',
fax: '传真',
websiteurl: '网站',
parentaccountname: '上级单位',
tickersymbol: '股票代号',
customertypecode: '关系类型',
defaultpricelevelname: '价目表',
defaultpricelevelid: '价目表',
parentaccountid: '上级单位',
accountid: '客户',
},
uiactions: {
},
},
main_form: {
details: {
group1: '账户信息',
......@@ -497,6 +465,33 @@ export default {
uiactions: {
},
},
quickcreate_form: {
details: {
group1: '客户基本信息',
formpage1: '基本信息',
srfupdatedate: '更新时间',
srforikey: '',
srfkey: '客户',
srfmajortext: '客户名称',
srftempmode: '',
srfuf: '',
srfdeid: '',
srfsourcekey: '',
accountname: '客户名称',
telephone1: '主要电话',
fax: '传真',
websiteurl: '网站',
parentaccountname: '上级单位',
tickersymbol: '股票代号',
customertypecode: '关系类型',
defaultpricelevelname: '价目表',
defaultpricelevelid: '价目表',
parentaccountid: '上级单位',
accountid: '客户',
},
uiactions: {
},
},
introduction_form: {
details: {
group1: '客户基本信息',
......@@ -615,7 +610,25 @@ export default {
uiactions: {
},
},
editviewtoolbar_toolbar: {
tbitem1: {
caption: '保存并关闭',
tip: '保存并关闭',
},
tbitem2: {
caption: '关闭',
tip: '关闭',
},
},
infotoolbar_toolbar: {
tbitem1_openmaineditview: {
caption: '编辑',
tip: '编辑',
},
tbitem2: {
caption: '-',
tip: '',
},
tbitem3: {
caption: '保存',
tip: '保存',
......
......@@ -92,13 +92,13 @@ export default {
caption: "竞争对手",
title: '竞争对手编辑视图',
},
dashboardview: {
caption: "竞争对手",
title: '竞争对手数据看板视图',
summary: {
caption: "竞争对手概览",
title: '竞争对手概览',
},
tabexpview: {
info: {
caption: "竞争对手",
title: '竞争对手分页导航视图',
title: '竞争对手',
},
gridview: {
caption: "竞争对手",
......
......@@ -91,13 +91,13 @@ export default {
caption: '竞争对手',
title: '竞争对手编辑视图',
},
dashboardview: {
caption: '竞争对手',
title: '竞争对手数据看板视图',
summary: {
caption: '竞争对手概览',
title: '竞争对手概览',
},
tabexpview: {
info: {
caption: '竞争对手',
title: '竞争对手分页导航视图',
title: '竞争对手',
},
gridview: {
caption: '竞争对手',
......
......@@ -125,6 +125,14 @@ export default {
info_abstract: {
caption: "商机",
title: '商机编辑视图',
},
pickupview: {
caption: "商机",
title: '商机数据选择视图',
},
pickupgridview: {
caption: "商机",
title: '商机选择表格视图',
},
editview: {
caption: "商机",
......
......@@ -124,6 +124,14 @@ export default {
info_abstract: {
caption: '商机',
title: '商机编辑视图',
},
pickupview: {
caption: '商机',
title: '商机数据选择视图',
},
pickupgridview: {
caption: '商机',
title: '商机选择表格视图',
},
editview: {
caption: '商机',
......
......@@ -105,6 +105,10 @@ export default {
oppquagridview: {
caption: "报价单",
title: '报价单表格视图',
},
optionview: {
caption: "报价单",
title: '报价单选项操作视图',
},
editview: {
caption: "报价单",
......@@ -135,6 +139,33 @@ export default {
uiactions: {
},
},
quickcreate_form: {
details: {
group1: "报价单基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "报价单",
srfmajortext: "报价名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
quotenumber: "报价单 ID",
revisionnumber: "修订 ID",
quotename: "报价名称",
transactioncurrencyname: "货币",
opportunityname: "商机",
customerid: "潜在客户",
pricelevelname: "价目表",
transactioncurrencyid: "货币",
opportunityid: "商机",
pricelevelid: "价目表",
quoteid: "报价单",
},
uiactions: {
},
},
main_grid: {
columns: {
quotename: "报价名称",
......@@ -228,9 +259,13 @@ export default {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "Edit",
......
......@@ -104,6 +104,10 @@ export default {
oppquagridview: {
caption: '报价单',
title: '报价单表格视图',
},
optionview: {
caption: '报价单',
title: '报价单选项操作视图',
},
editview: {
caption: '报价单',
......@@ -134,6 +138,33 @@ export default {
uiactions: {
},
},
quickcreate_form: {
details: {
group1: '报价单基本信息',
formpage1: '基本信息',
srfupdatedate: '更新时间',
srforikey: '',
srfkey: '报价单',
srfmajortext: '报价名称',
srftempmode: '',
srfuf: '',
srfdeid: '',
srfsourcekey: '',
quotenumber: '报价单 ID',
revisionnumber: '修订 ID',
quotename: '报价名称',
transactioncurrencyname: '货币',
opportunityname: '商机',
customerid: '潜在客户',
pricelevelname: '价目表',
transactioncurrencyid: '货币',
opportunityid: '商机',
pricelevelid: '价目表',
quoteid: '报价单',
},
uiactions: {
},
},
main_grid: {
columns: {
quotename: '报价名称',
......@@ -227,10 +258,14 @@ export default {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
tbitem1_openquickcreateview: {
caption: '新建',
tip: '新建',
},
tbitem2: {
caption: '-',
tip: '',
},
tbitem4: {
caption: '编辑',
tip: '编辑',
......
......@@ -527,6 +527,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "TransactionCurrencyPickupGridView",
"viewtag": "6d8a2615030eed5779caea69f7f001aa"
},
"opportunitypickupview": {
"title": "商机数据选择视图",
"caption": "商机",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Sales",
"viewname": "OpportunityPickupView",
"viewtag": "6debde861c6e6f91eeb442cb869e9737"
},
"accounteditview": {
"title": "客户编辑视图",
"caption": "客户",
......@@ -535,6 +543,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "AccountEditView",
"viewtag": "6e18ac74e5685439110f9b4e534ee005"
},
"opportunitypickupgridview": {
"title": "商机选择表格视图",
"caption": "商机",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Sales",
"viewname": "OpportunityPickupGridView",
"viewtag": "6e866e05730d8c3e03f150a33225307d"
},
"accountinnerpickupgridview": {
"title": "客户选择表格视图",
"caption": "客户",
......@@ -743,6 +759,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "ServiceAppointmentEditView",
"viewtag": "99d4a530c13b03a98cd143f341394354"
},
"quoteoptionview": {
"title": "报价单选项操作视图",
"caption": "报价单",
"viewtype": "DEOPTVIEW",
"viewmodule": "Sales",
"viewname": "QuoteOptionView",
"viewtag": "9a8f1a5129b4191c2dfb20b23aeb4c7a"
},
"contacteditview": {
"title": "联系人编辑视图",
"caption": "联系人",
......@@ -751,12 +775,12 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "ContactEditView",
"viewtag": "9a96ebf2e57358b3590b9d4479edb77a"
},
"competitordashboardview": {
"title": "竞争对手数据看板视图",
"caption": "竞争对手",
"competitorsummary": {
"title": "竞争对手概览",
"caption": "竞争对手概览",
"viewtype": "DEPORTALVIEW",
"viewmodule": "Sales",
"viewname": "CompetitorDashboardView",
"viewname": "CompetitorSummary",
"viewtag": "9bf80730e83a74615919a0f0907505d4"
},
"ibizlistsummary": {
......@@ -847,12 +871,12 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "ListContactInner",
"viewtag": "aaa875342bd9286a39c2d193a150afc4"
},
"competitortabexpview": {
"title": "竞争对手分页导航视图",
"competitorinfo": {
"title": "竞争对手",
"caption": "竞争对手",
"viewtype": "DETABEXPVIEW",
"viewmodule": "Sales",
"viewname": "CompetitorTabExpView",
"viewname": "CompetitorInfo",
"viewtag": "ad5b5579442b2a90900b62803059a029"
},
"quoteeditview": {
......
<template>
<studio-view-style2 viewName="accounteditview" viewTitle="客户编辑视图" class='deeditview account-edit-view'>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click"/> </template>
<view_form
:viewState="viewState"
:viewparams="viewparams"
......@@ -106,9 +108,24 @@ export default class AccountEditViewBase extends EditViewBase {
* @memberof AccountEditViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof AccountEditView
*/
public toolBarModels: any = {
tbitem1: { name: 'tbitem1', caption: '保存并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '保存并关闭', iconcls: 'fa fa-power-off', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' }, class: '' },
tbitem2: { name: 'tbitem2', caption: '关闭','isShowCaption':true,'isShowIcon':true, tooltip: '关闭', iconcls: 'fa fa-sign-out', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Exit', target: '' }, class: '' },
};
/**
* 视图引擎
......@@ -136,6 +153,22 @@ export default class AccountEditViewBase extends EditViewBase {
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof AccountEditViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
}
/**
* form 部件 save 事件
*
......@@ -169,6 +202,113 @@ export default class AccountEditViewBase extends EditViewBase {
this.engine.onCtrlEvent('form', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"Account");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem2_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.Exit(datas, contextJO,paramJO, $event, xData,this,"Account");
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountEditViewBase
*/
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 AccountEditViewBase
*/
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 }],'*');
}
}
}
</script>
......
......@@ -2,5 +2,7 @@
.account-edit-view {
--account-edit-view: 0;
}
// 视图样式
// this is less
......@@ -543,16 +543,28 @@ export default class AccountGridViewBase extends GridViewBase {
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'accounts', parameterName: 'account' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
}
openIndexViewTab(data);
const view: any = {
viewname: 'account-edit-view',
height: 0,
width: 0,
title: this.$t('entities.account.views.editview.title'),
placement: 'DRAWER_TOP',
};
openDrawer(view, data);
}
......
......@@ -25,6 +25,7 @@ import AccountService from '@/service/account/account-service';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
import AccountUIService from '@/uiservice/account/account-ui-service';
/**
* 客户信息视图基类
......@@ -108,6 +109,9 @@ export default class AccountInfoBase extends TabExpViewBase {
* @memberof AccountInfo
*/
public toolBarModels: any = {
tbitem1_openmaineditview: { name: 'tbitem1_openmaineditview', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenMainEditView', target: 'SINGLEKEY' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
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: '' },
......@@ -156,6 +160,9 @@ export default class AccountInfoBase extends TabExpViewBase {
* @memberof AccountInfoBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem1_openmaineditview')) {
this.toolbar_tbitem1_openmaineditview_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
......@@ -173,6 +180,34 @@ export default class AccountInfoBase extends TabExpViewBase {
}
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_openmaineditview_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:AccountUIService = new AccountUIService();
curUIService.Account_OpenMainEditView(datas,contextJO, paramJO, $event, xData,this,"Account");
}
/**
* 逻辑事件
*
......
......@@ -577,7 +577,7 @@ export default class CompetitorGridViewBase extends GridViewBase {
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'competitors', parameterName: 'competitor' },
{ pathName: 'tabexpview', parameterName: 'tabexpview' },
{ pathName: 'info', parameterName: 'info' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
......
<template>
<studio-view-style2 viewName="competitorinfo" viewTitle="竞争对手" class='detabexpview competitor-info'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</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 CompetitorService from '@/service/competitor/competitor-service';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
/**
* 竞争对手视图基类
*
* @export
* @class CompetitorInfoBase
* @extends {TabExpViewBase}
*/
@Component({})
@VueLifeCycleProcessing()
export default class CompetitorInfoBase extends TabExpViewBase {
/**
* 实体服务对象
*
* @type {CompetitorService}
* @memberof CompetitorInfoBase
*/
protected appEntityService: CompetitorService = new CompetitorService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof CompetitorInfoBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 自定义视图导航上下文集合
*
* @protected
* @type {*}
* @memberof CompetitorInfoBase
*/
protected customViewNavContexts: any = {
};
/**
* 自定义视图导航参数集合
*
* @protected
* @type {*}
* @memberof CompetitorInfoBase
*/
protected customViewParams: any = {
};
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof CompetitorInfoBase
*/
protected model: any = {
srfCaption: 'entities.competitor.views.info.caption',
srfTitle: 'entities.competitor.views.info.title',
srfSubTitle: 'entities.competitor.views.info.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof CompetitorInfoBase
*/
protected containerModel: any = {
view_tabexppanel: { name: 'tabexppanel', type: 'TABEXPPANEL' },
};
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof CompetitorInfoBase
*/
public engine: TabExpViewEngine = new TabExpViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof CompetitorInfoBase
*/
public engineInit(): void {
this.engine.init({
view: this,
keyPSDEField: 'competitor',
majorPSDEField: 'competitorname',
isLoadDefault: true,
});
}
/**
* 加载模型
*
* @protected
* @memberof CompetitorInfoBase
*/
protected async loadModel(): Promise<any> {
if(this.context.competitor){
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.competitorname) {
Object.assign(this.model, { dataInfo: _data.competitorname });
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 './competitor-info.less';
</style>
\ No newline at end of file
// 避免空文件,后台不让空文件过
.competitor-info {
--competitor-info: 0;
}
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import CompetitorInfoBase from './competitor-info-base.vue';
import view_tabexppanel from '@widgets/competitor/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 CompetitorInfo extends CompetitorInfoBase {
}
</script>
\ No newline at end of file
<template>
<studio-view-style2 viewName="competitorsummary" viewTitle="竞争对手概览" class='deportalview competitor-summary'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<view_dashboard
:viewState="viewState"
:viewparams="viewparams"
:context="JSON.parse(JSON.stringify(context))"
:isEnableCustomized = "false"
name="dashboard"
ref='dashboard'
@load="dashboard_load($event)"
@closeview="closeView($event)">
</view_dashboard>
</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, DashboardViewBase } from '@/studio-core';
import CompetitorService from '@/service/competitor/competitor-service';
import PortalViewEngine from '@engine/view/portal-view-engine';
/**
* 竞争对手概览视图基类
*
* @export
* @class CompetitorSummaryBase
* @extends {DashboardViewBase}
*/
@Component({})
@VueLifeCycleProcessing()
export default class CompetitorSummaryBase extends DashboardViewBase {
/**
* 实体服务对象
*
* @type {CompetitorService}
* @memberof CompetitorSummaryBase
*/
protected appEntityService: CompetitorService = new CompetitorService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof CompetitorSummaryBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 自定义视图导航上下文集合
*
* @protected
* @type {*}
* @memberof CompetitorSummaryBase
*/
protected customViewNavContexts: any = {
'REGARDINGOBJECTID': { isRawValue: false, value: 'competitor' },
'REGARDINGOBJECTTYPECODE': { isRawValue: true, value: 'COMPETITOR' }
};
/**
* 自定义视图导航参数集合
*
* @protected
* @type {*}
* @memberof CompetitorSummaryBase
*/
protected customViewParams: any = {
};
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof CompetitorSummaryBase
*/
protected model: any = {
srfCaption: 'entities.competitor.views.summary.caption',
srfTitle: 'entities.competitor.views.summary.title',
srfSubTitle: 'entities.competitor.views.summary.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof CompetitorSummaryBase
*/
protected containerModel: any = {
view_dashboard: { name: 'dashboard', type: 'DASHBOARD' },
};
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof CompetitorSummaryBase
*/
public engine: PortalViewEngine = new PortalViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof CompetitorSummaryBase
*/
public engineInit(): void {
this.engine.init({
view: this,
dashboard: this.$refs.dashboard,
keyPSDEField: 'competitor',
majorPSDEField: 'competitorname',
isLoadDefault: true,
});
}
/**
* dashboard 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof CompetitorSummaryBase
*/
public dashboard_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('dashboard', 'load', $event);
}
}
</script>
<style lang='less'>
@import './competitor-summary.less';
</style>
\ No newline at end of file
// 避免空文件,后台不让空文件过
.competitor-summary {
--competitor-summary: 0;
}
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import CompetitorSummaryBase from './competitor-summary-base.vue';
import view_dashboard from '@widgets/competitor/abstract-info-dashboard/abstract-info-dashboard.vue';
@Component({
components: {
view_dashboard,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
},
})
export default class CompetitorSummary extends CompetitorSummaryBase {
}
</script>
\ No newline at end of file
<template>
<studio-view-style2 viewName="opportunitypickupview" viewTitle="商机数据选择视图" class='depickupview opportunity-pickup-view'>
<div class="content-container pickup-view">
<view_pickupviewpanel
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
name="pickupviewpanel"
ref='pickupviewpanel'
@selectionchange="pickupviewpanel_selectionchange($event)"
@activated="pickupviewpanel_activated($event)"
@load="pickupviewpanel_load($event)"
@closeview="closeView($event)">
</view_pickupviewpanel>
<card v-if="isShowButton" :dis-hover="true" :bordered="false" class="footer">
<row :style="{ textAlign: 'right' }">
<i-button type="primary" :disabled="this.viewSelections.length > 0 ? false : true" @click="onClickOk">{{this.containerModel.view_okbtn.text}}</i-button>
&nbsp;&nbsp;
<i-button @click="onClickCancel">{{this.containerModel.view_cancelbtn.text}}</i-button>
</row>
</card>
</div>
</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, PickupViewBase } from '@/studio-core';
import OpportunityService from '@/service/opportunity/opportunity-service';
import PickupViewEngine from '@engine/view/pickup-view-engine';
/**
* 商机数据选择视图视图基类
*
* @export
* @class OpportunityPickupViewBase
* @extends {PickupViewBase}
*/
@Component({})
@VueLifeCycleProcessing()
export default class OpportunityPickupViewBase extends PickupViewBase {
/**
* 实体服务对象
*
* @type {OpportunityService}
* @memberof OpportunityPickupViewBase
*/
protected appEntityService: OpportunityService = new OpportunityService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof OpportunityPickupViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 自定义视图导航上下文集合
*
* @protected
* @type {*}
* @memberof OpportunityPickupViewBase
*/
protected customViewNavContexts: any = {
};
/**
* 自定义视图导航参数集合
*
* @protected
* @type {*}
* @memberof OpportunityPickupViewBase
*/
protected customViewParams: any = {
};
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof OpportunityPickupViewBase
*/
protected model: any = {
srfCaption: 'entities.opportunity.views.pickupview.caption',
srfTitle: 'entities.opportunity.views.pickupview.title',
srfSubTitle: 'entities.opportunity.views.pickupview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof OpportunityPickupViewBase
*/
protected containerModel: any = {
view_pickupviewpanel: { name: 'pickupviewpanel', type: 'PICKUPVIEWPANEL' },
view_okbtn: { name: 'okbtn', type: 'button', text: '确定', disabled: true },
view_cancelbtn: { name: 'cancelbtn', type: 'button', text: '取消', disabled: false },
view_leftbtn: { name: 'leftbtn', type: 'button', text: '左移', disabled: true },
view_rightbtn: { name: 'rightbtn', type: 'button', text: '右移', disabled: true },
view_allleftbtn: { name: 'allleftbtn', type: 'button', text: '全部左移', disabled: true },
view_allrightbtn: { name: 'allrightbtn', type: 'button', text: '全部右移', disabled: true },
};
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof OpportunityPickupViewBase
*/
public engine: PickupViewEngine = new PickupViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof OpportunityPickupViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
pickupviewpanel: this.$refs.pickupviewpanel,
keyPSDEField: 'opportunity',
majorPSDEField: 'opportunityname',
isLoadDefault: true,
});
}
/**
* pickupviewpanel 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof OpportunityPickupViewBase
*/
public pickupviewpanel_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'selectionchange', $event);
}
/**
* pickupviewpanel 部件 activated 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof OpportunityPickupViewBase
*/
public pickupviewpanel_activated($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'activated', $event);
}
/**
* pickupviewpanel 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof OpportunityPickupViewBase
*/
public pickupviewpanel_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'load', $event);
}
}
</script>
<style lang='less'>
@import './opportunity-pickup-view.less';
</style>
\ No newline at end of file
// 避免空文件,后台不让空文件过
.opportunity-pickup-view {
--opportunity-pickup-view: 0;
}
.pickup-view {
>.pickupviewpanel {
flex-grow: 1;
display: flex;
justify-content: flex-end;
height: calc(100% - 64px);
}
>.footer {
height: 64px;
}
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import OpportunityPickupViewBase from './opportunity-pickup-view-base.vue';
import view_pickupviewpanel from '@widgets/opportunity/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel.vue';
@Component({
components: {
view_pickupviewpanel,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
},
})
export default class OpportunityPickupView extends OpportunityPickupViewBase {
}
</script>
\ No newline at end of file
......@@ -63,6 +63,7 @@ import QuoteService from '@/service/quote/quote-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import QuoteUIService from '@/uiservice/quote/quote-ui-service';
import CodeListService from "@service/app/codelist-service";
......@@ -149,8 +150,9 @@ export default class QuoteGridViewBase extends GridViewBase {
* @memberof QuoteGridView
*/
public toolBarModels: any = {
tbitem3: { name: 'tbitem3', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'New', target: '' }, class: '' },
tbitem1_openquickcreateview: { name: 'tbitem1_openquickcreateview', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-user-plus', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem4: { name: 'tbitem4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' }, class: '' },
tbitem6: { name: 'tbitem6', caption: '拷贝','isShowCaption':true,'isShowIcon':true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' }, class: '' },
......@@ -208,8 +210,8 @@ export default class QuoteGridViewBase extends GridViewBase {
* @memberof QuoteGridViewBase
*/
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, 'tbitem1_openquickcreateview')) {
this.toolbar_tbitem1_openquickcreateview_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
......@@ -217,12 +219,6 @@ export default class QuoteGridViewBase extends GridViewBase {
if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem24')) {
this.toolbar_tbitem24_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem25')) {
this.toolbar_tbitem25_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
......@@ -333,7 +329,7 @@ export default class QuoteGridViewBase extends GridViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem1_openquickcreateview_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -350,7 +346,8 @@ export default class QuoteGridViewBase extends GridViewBase {
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"Quote");
const curUIService:QuoteUIService = new QuoteUIService();
curUIService.Quote_OpenQuickCreateView(datas,contextJO, paramJO, $event, xData,this,"Quote");
}
/**
......@@ -409,62 +406,6 @@ export default class QuoteGridViewBase extends GridViewBase {
this.Copy(datas, contextJO,paramJO, $event, xData,this,"Quote");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem24_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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"Quote");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem25_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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"Quote");
}
/**
* 逻辑事件
*
......@@ -607,16 +548,28 @@ export default class QuoteGridViewBase extends GridViewBase {
}
const parameters: any[] = [
{ pathName: 'quotes', parameterName: 'quote' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
}
openIndexViewTab(data);
const view: any = {
viewname: 'quote-option-view',
height: 0,
width: 0,
title: this.$t('entities.quote.views.optionview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
......@@ -657,26 +610,6 @@ export default class QuoteGridViewBase extends GridViewBase {
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof QuoteGridViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 编辑
*
......@@ -735,42 +668,6 @@ export default class QuoteGridViewBase extends GridViewBase {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 行编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof QuoteGridViewBase
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof QuoteGridViewBase
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.newRow && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/**
* 删除
*
......
<template>
<studio-view-style2 viewName="quoteoptionview" viewTitle="报价单选项操作视图" class='deoptview quote-option-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</view_form>
<template slot="footer">
<div class="option-view-footer-actions">
<i-button type='primary' @click="onClickOk">{{ containerModel.view_okbtn.text }}</i-button>
&nbsp;&nbsp;
<i-button @click="onClickCancel">{{ containerModel.view_cancelbtn.text }}</i-button>
</div>
</template>
</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, OptionViewBase } from '@/studio-core';
import QuoteService from '@/service/quote/quote-service';
import OptionViewEngine from '@engine/view/option-view-engine';
/**
* 报价单选项操作视图视图基类
*
* @export
* @class QuoteOptionViewBase
* @extends {OptionViewBase}
*/
@Component({})
@VueLifeCycleProcessing()
export default class QuoteOptionViewBase extends OptionViewBase {
/**
* 实体服务对象
*
* @type {QuoteService}
* @memberof QuoteOptionViewBase
*/
protected appEntityService: QuoteService = new QuoteService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof QuoteOptionViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 自定义视图导航上下文集合
*
* @protected
* @type {*}
* @memberof QuoteOptionViewBase
*/
protected customViewNavContexts: any = {
};
/**
* 自定义视图导航参数集合
*
* @protected
* @type {*}
* @memberof QuoteOptionViewBase
*/
protected customViewParams: any = {
};
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof QuoteOptionViewBase
*/
protected model: any = {
srfCaption: 'entities.quote.views.optionview.caption',
srfTitle: 'entities.quote.views.optionview.title',
srfSubTitle: 'entities.quote.views.optionview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof QuoteOptionViewBase
*/
protected containerModel: any = {
view_form: { name: 'form', type: 'FORM' },
view_okbtn: { name: 'okbtn', type: 'button', text: '确定', disabled: true },
view_cancelbtn: { name: 'cancelbtn', type: 'button', text: '取消', disabled: false },
view_leftbtn: { name: 'leftbtn', type: 'button', text: '左移', disabled: true },
view_rightbtn: { name: 'rightbtn', type: 'button', text: '右移', disabled: true },
view_allleftbtn: { name: 'allleftbtn', type: 'button', text: '全部左移', disabled: true },
view_allrightbtn: { name: 'allrightbtn', type: 'button', text: '全部右移', disabled: true },
};
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof QuoteOptionViewBase
*/
public engine: OptionViewEngine = new OptionViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof QuoteOptionViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'quote',
majorPSDEField: 'quotename',
isLoadDefault: true,
});
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof QuoteOptionViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof QuoteOptionViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof QuoteOptionViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
}
</script>
<style lang='less'>
@import './quote-option-view.less';
</style>
\ No newline at end of file
.option-view {
--option-view: 0;
}
// 避免空文件,后台不让空文件过
.quote-option-view {
--quote-option-view: 0;
}
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import QuoteOptionViewBase from './quote-option-view-base.vue';
import view_form from '@widgets/quote/quick-create-form/quick-create-form.vue';
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
},
})
export default class QuoteOptionView extends QuoteOptionViewBase {
}
</script>
\ No newline at end of file
......@@ -24,12 +24,13 @@ export const PageComponents = {
Vue.component('goal-grid-view', () => import('@pages/sales/goal-grid-view/goal-grid-view.vue'));
Vue.component('account-grid-view', () => import('@pages/base/account-grid-view/account-grid-view.vue'));
Vue.component('invoice-grid-view', () => import('@pages/finance/invoice-grid-view/invoice-grid-view.vue'));
Vue.component('competitor-dashboard-view', () => import('@pages/sales/competitor-dashboard-view/competitor-dashboard-view.vue'));
Vue.component('competitor-summary', () => import('@pages/sales/competitor-summary/competitor-summary.vue'));
Vue.component('ibiz-list-grid-view', () => import('@pages/marketing/ibiz-list-grid-view/ibiz-list-grid-view.vue'));
Vue.component('product-grid-view', () => import('@pages/product/product-grid-view/product-grid-view.vue'));
Vue.component('ibiz-list-info-abstract', () => import('@pages/marketing/ibiz-list-info-abstract/ibiz-list-info-abstract.vue'));
Vue.component('ibiz-list-info', () => import('@pages/marketing/ibiz-list-info/ibiz-list-info.vue'));
Vue.component('lead-pickup-grid-view', () => import('@pages/sales/lead-pickup-grid-view/lead-pickup-grid-view.vue'));
Vue.component('opportunity-pickup-view', () => import('@pages/sales/opportunity-pickup-view/opportunity-pickup-view.vue'));
Vue.component('ibiz-list-option-view', () => import('@pages/marketing/ibiz-list-option-view/ibiz-list-option-view.vue'));
Vue.component('product-edit-quick-create', () => import('@pages/product/product-edit-quick-create/product-edit-quick-create.vue'));
Vue.component('campaign-info-manager', () => import('@pages/marketing/campaign-info-manager/campaign-info-manager.vue'));
......@@ -67,6 +68,7 @@ export const PageComponents = {
Vue.component('product-edit-view', () => import('@pages/product/product-edit-view/product-edit-view.vue'));
Vue.component('quote-grid-view', () => import('@pages/sales/quote-grid-view/quote-grid-view.vue'));
Vue.component('invoice-edit-view', () => import('@pages/finance/invoice-edit-view/invoice-edit-view.vue'));
Vue.component('quote-option-view', () => import('@pages/sales/quote-option-view/quote-option-view.vue'));
Vue.component('campaign-edit-view', () => import('@pages/marketing/campaign-edit-view/campaign-edit-view.vue'));
Vue.component('opportunity-summary', () => import('@pages/sales/opportunity-summary/opportunity-summary.vue'));
Vue.component('list-contact-inner', () => import('@pages/marketing/list-contact-inner/list-contact-inner.vue'));
......@@ -91,11 +93,12 @@ export const PageComponents = {
Vue.component('lead-dashboard-view', () => import('@pages/sales/lead-dashboard-view/lead-dashboard-view.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('competitor-tab-exp-view', () => import('@pages/sales/competitor-tab-exp-view/competitor-tab-exp-view.vue'));
Vue.component('competitor-info', () => import('@pages/sales/competitor-info/competitor-info.vue'));
Vue.component('account-pickup-grid-view', () => import('@pages/base/account-pickup-grid-view/account-pickup-grid-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('account-info', () => import('@pages/base/account-info/account-info.vue'));
Vue.component('opportunity-pickup-grid-view', () => import('@pages/sales/opportunity-pickup-grid-view/opportunity-pickup-grid-view.vue'));
Vue.component('lead-info-detail', () => import('@pages/sales/lead-info-detail/lead-info-detail.vue'));
Vue.component('account-info-all', () => import('@pages/base/account-info-all/account-info-all.vue'));
Vue.component('opportunity-competitor-edit-view', () => import('@pages/sales/opportunity-competitor-edit-view/opportunity-competitor-edit-view.vue'));
......
......@@ -133,6 +133,7 @@ export const viewstate: any = {
viewdatachange: false,
refviews: [
'ad6abf83dc1bc466b988194cd868d98a',
'9a8f1a5129b4191c2dfb20b23aeb4c7a',
],
},
{
......@@ -260,6 +261,7 @@ export const viewstate: any = {
refviews: [
'fb06f2c1cea1ac2a5a70c20f4a277ae5',
'bae77557d2f7a7852b634dc5d5a93435',
'6e18ac74e5685439110f9b4e534ee005',
'016e75bb460270519a0ee9dda57b2c90',
],
},
......@@ -622,6 +624,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '6debde861c6e6f91eeb442cb869e9737',
viewmodule: 'Sales',
viewname: 'OpportunityPickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'6e866e05730d8c3e03f150a33225307d',
],
},
{
viewtag: '6e18ac74e5685439110f9b4e534ee005',
viewmodule: 'Base',
......@@ -858,10 +870,22 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '9a8f1a5129b4191c2dfb20b23aeb4c7a',
viewmodule: 'Sales',
viewname: 'QuoteOptionView',
viewaction: '',
viewdatachange: false,
refviews: [
'8b806fb12589b2fc17d1bb90f4b5422e',
'da3f8c1f20f440f3df54d6c13a8de586',
'6debde861c6e6f91eeb442cb869e9737',
],
},
{
viewtag: '9bf80730e83a74615919a0f0907505d4',
viewmodule: 'Sales',
viewname: 'CompetitorDashboardView',
viewname: 'CompetitorSummary',
viewaction: '',
viewdatachange: false,
refviews: [
......@@ -978,7 +1002,7 @@ export const viewstate: any = {
{
viewtag: 'ad5b5579442b2a90900b62803059a029',
viewmodule: 'Sales',
viewname: 'CompetitorTabExpView',
viewname: 'CompetitorInfo',
viewaction: '',
viewdatachange: false,
refviews: [
......
......@@ -234,6 +234,72 @@ export default class AccountUIServiceBase extends UIService {
openDrawer(view, data);
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async Account_OpenMainEditView(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, { account: '%account%' });
Object.assign(params, { accountid: '%account%' });
Object.assign(params, { accountname: '%accountname%' });
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);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'accounts', parameterName: 'account' },
];
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = actionContext.$appdrawer.openDrawer(view, context,data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
const _this: any = actionContext;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
}
if(window.opener){
window.opener.postMessage({status:'OK',identification:'WF'},Environment.uniteAddress);
window.close();
}
return result.datas;
});
}
const view: any = {
viewname: 'account-edit-view',
height: 0,
width: 0,
title: actionContext.$t('entities.account.views.editview.title'),
placement: 'DRAWER_TOP',
};
openDrawer(view, data);
}
/**
* 编辑
*
......
......@@ -81,8 +81,8 @@ export default class CompetitorUIServiceBase extends UIService {
public initViewMap(){
this.allViewMap.set(':',{viewname:'optionview',srfappde:'competitors'});
this.allViewMap.set(':',{viewname:'info_abstract',srfappde:'competitors'});
this.allViewMap.set(':',{viewname:'dashboardview',srfappde:'competitors'});
this.allViewMap.set(':',{viewname:'tabexpview',srfappde:'competitors'});
this.allViewMap.set(':',{viewname:'summary',srfappde:'competitors'});
this.allViewMap.set(':',{viewname:'info',srfappde:'competitors'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'competitors'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'competitors'});
}
......
......@@ -82,6 +82,8 @@ export default class OpportunityUIServiceBase extends UIService {
this.allViewMap.set(':',{viewname:'summary',srfappde:'opportunities'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'opportunities'});
this.allViewMap.set(':',{viewname:'info_abstract',srfappde:'opportunities'});
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'opportunities'});
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'opportunities'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'opportunities'});
this.allViewMap.set(':',{viewname:'info',srfappde:'opportunities'});
this.allViewMap.set(':',{viewname:'oppprodashboardview',srfappde:'opportunities'});
......
......@@ -81,6 +81,7 @@ export default class QuoteUIServiceBase extends UIService {
public initViewMap(){
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'quotes'});
this.allViewMap.set(':',{viewname:'oppquagridview',srfappde:'quotes'});
this.allViewMap.set(':',{viewname:'optionview',srfappde:'quotes'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'quotes'});
}
......@@ -92,6 +93,71 @@ export default class QuoteUIServiceBase extends UIService {
public initDeMainStateMap(){
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async Quote_OpenQuickCreateView(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 = 'NONE';
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);
let deResParameters: any[] = [];
if(context.opportunity && true){
deResParameters = [
{ pathName: 'opportunities', parameterName: 'opportunity' },
]
}
const parameters: any[] = [
{ pathName: 'quotes', parameterName: 'quote' },
];
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = actionContext.$appdrawer.openDrawer(view, context,data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
const _this: any = actionContext;
if(window.opener){
window.opener.postMessage({status:'OK',identification:'WF'},Environment.uniteAddress);
window.close();
}
return result.datas;
});
}
const view: any = {
viewname: 'quote-option-view',
height: 0,
width: 0,
title: actionContext.$t('entities.quote.views.optionview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
/**
* 获取指定数据的重定向页面
......
......@@ -95,26 +95,6 @@ export default class Info_AllModel {
prop: 'defaultpricelevelname',
dataType: 'PICKUPTEXT',
},
{
name: 'industrycode1',
prop: 'industrycode',
dataType: 'SSCODELIST',
},
{
name: 'sic1',
prop: 'sic',
dataType: 'TEXT',
},
{
name: 'ownershipcode1',
prop: 'ownershipcode',
dataType: 'SSCODELIST',
},
{
name: 'description1',
prop: 'description',
dataType: 'TEXT',
},
{
name: 'industrycode',
prop: 'industrycode',
......
......@@ -7,7 +7,7 @@
<i-col :md="{ span: 18, offset: 0 }" :lg="{ span: 18, offset: 0 }">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<span>
<div class='portlet-container dashboard-viewdashboard-container1 ' :style="{}">
<div class='portlet-container summarydashboard-container1 ' :style="{}">
<row>
<i-col :md="{ span: 24, offset: 0 }">
<div class="portlet-without-title">
......@@ -33,7 +33,7 @@
<i-col :md="{ span: 6, offset: 0 }" :lg="{ span: 6, offset: 0 }">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<span>
<div class='portlet-container dashboard-viewdashboard-container2 ' :style="{}">
<div class='portlet-container summarydashboard-container2 ' :style="{}">
<row>
<i-col :md="{ span: 24, offset: 0 }">
<div class="portlet-without-title">
......
<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('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('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 CompetitorService from '@/service/competitor/competitor-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 {CompetitorService}
* @memberof Infotabexppanel
*/
public appEntityService: CompetitorService = new CompetitorService({ $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.competitor) {
Object.assign(this.context, { srfparentdename: 'Competitor', srfparentkey: this.context.competitor });
}
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: 'entityimage',
},
{
name: 'createdate',
},
{
name: 'updatedate',
},
{
name: 'address2_shippingmethodcode',
},
{
name: 'address2_country',
},
{
name: 'address2_telephone2',
},
{
name: 'winpercentage',
},
{
name: 'address1_shippingmethodcode',
},
{
name: 'referenceinfourl',
},
{
name: 'address2_latitude',
},
{
name: 'versionnumber',
},
{
name: 'address2_county',
},
{
name: 'importsequencenumber',
},
{
name: 'address2_telephone3',
},
{
name: 'traversedpath',
},
{
name: 'address1_city',
},
{
name: 'reportedrevenue_base',
},
{
name: 'competitor',
prop: 'competitorid',
},
{
name: 'address1_fax',
},
{
name: 'updateman',
},
{
name: 'overview',
},
{
name: 'address2_stateorprovince',
},
{
name: 'entityimageid',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'address2_upszone',
},
{
name: 'address1_line3',
},
{
name: 'stockexchange',
},
{
name: 'stageid',
},
{
name: 'reportingyear',
},
{
name: 'reportingquarter',
},
{
name: 'address1_stateorprovince',
},
{
name: 'address1_utcoffset',
},
{
name: 'address1_latitude',
},
{
name: 'address1_composite',
},
{
name: 'address1_county',
},
{
name: 'address1_name',
},
{
name: 'address1_postalcode',
},
{
name: 'opportunities',
},
{
name: 'address1_addressid',
},
{
name: 'address2_line3',
},
{
name: 'address2_fax',
},
{
name: 'processid',
},
{
name: 'address2_postofficebox',
},
{
name: 'createman',
},
{
name: 'exchangerate',
},
{
name: 'overriddencreatedon',
},
{
name: 'address1_telephone2',
},
{
name: 'strengths',
},
{
name: 'address2_addresstypecode',
},
{
name: 'address1_postofficebox',
},
{
name: 'weaknesses',
},
{
name: 'address1_line2',
},
{
name: 'yominame',
},
{
name: 'address2_longitude',
},
{
name: 'threats',
},
{
name: 'address2_composite',
},
{
name: 'entityimage_timestamp',
},
{
name: 'address2_utcoffset',
},
{
name: 'address1_country',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'reportedrevenue',
},
{
name: 'address1_longitude',
},
{
name: 'tickersymbol',
},
{
name: 'address2_telephone1',
},
{
name: 'keyproduct',
},
{
name: 'entityimage_url',
},
{
name: 'address2_city',
},
{
name: 'websiteurl',
},
{
name: 'address2_addressid',
},
{
name: 'address1_telephone1',
},
{
name: 'address2_postalcode',
},
{
name: 'address1_line1',
},
{
name: 'address1_telephone3',
},
{
name: 'address2_line1',
},
{
name: 'address1_addresstypecode',
},
{
name: 'address2_name',
},
{
name: 'competitorname',
},
{
name: 'address1_upszone',
},
{
name: 'address2_line2',
},
{
name: 'transactioncurrencyid',
},
{
name: 'transactioncurrencyname',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import CompetitorService from '@/service/competitor/competitor-service';
import InfotabexppanelModel from './infotabexppanel-tabexppanel-model';
/**
* Infotabexppanel 部件服务对象
*
* @export
* @class InfotabexppanelService
*/
export default class InfotabexppanelService extends ControlService {
/**
* 竞争对手服务对象
*
* @type {CompetitorService}
* @memberof InfotabexppanelService
*/
public appEntityService: CompetitorService = new CompetitorService({ $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/competitor/infotabviewpanel-tabviewpanel/infotabviewpanel-tabviewpanel.vue';
import view_tabviewpanel2 from '@widgets/competitor/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' >
<competitor-summary
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false" >
</competitor-summary>
</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 CompetitorService from '@/service/competitor/competitor-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 {CompetitorService}
* @memberof Infotabviewpanel
*/
public appEntityService: CompetitorService = new CompetitorService({ $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: 'entityimage',
},
{
name: 'createdate',
},
{
name: 'updatedate',
},
{
name: 'address2_shippingmethodcode',
},
{
name: 'address2_country',
},
{
name: 'address2_telephone2',
},
{
name: 'winpercentage',
},
{
name: 'address1_shippingmethodcode',
},
{
name: 'referenceinfourl',
},
{
name: 'address2_latitude',
},
{
name: 'versionnumber',
},
{
name: 'address2_county',
},
{
name: 'importsequencenumber',
},
{
name: 'address2_telephone3',
},
{
name: 'traversedpath',
},
{
name: 'address1_city',
},
{
name: 'reportedrevenue_base',
},
{
name: 'competitor',
prop: 'competitorid',
},
{
name: 'address1_fax',
},
{
name: 'updateman',
},
{
name: 'overview',
},
{
name: 'address2_stateorprovince',
},
{
name: 'entityimageid',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'address2_upszone',
},
{
name: 'address1_line3',
},
{
name: 'stockexchange',
},
{
name: 'stageid',
},
{
name: 'reportingyear',
},
{
name: 'reportingquarter',
},
{
name: 'address1_stateorprovince',
},
{
name: 'address1_utcoffset',
},
{
name: 'address1_latitude',
},
{
name: 'address1_composite',
},
{
name: 'address1_county',
},
{
name: 'address1_name',
},
{
name: 'address1_postalcode',
},
{
name: 'opportunities',
},
{
name: 'address1_addressid',
},
{
name: 'address2_line3',
},
{
name: 'address2_fax',
},
{
name: 'processid',
},
{
name: 'address2_postofficebox',
},
{
name: 'createman',
},
{
name: 'exchangerate',
},
{
name: 'overriddencreatedon',
},
{
name: 'address1_telephone2',
},
{
name: 'strengths',
},
{
name: 'address2_addresstypecode',
},
{
name: 'address1_postofficebox',
},
{
name: 'weaknesses',
},
{
name: 'address1_line2',
},
{
name: 'yominame',
},
{
name: 'address2_longitude',
},
{
name: 'threats',
},
{
name: 'address2_composite',
},
{
name: 'entityimage_timestamp',
},
{
name: 'address2_utcoffset',
},
{
name: 'address1_country',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'reportedrevenue',
},
{
name: 'address1_longitude',
},
{
name: 'tickersymbol',
},
{
name: 'address2_telephone1',
},
{
name: 'keyproduct',
},
{
name: 'entityimage_url',
},
{
name: 'address2_city',
},
{
name: 'websiteurl',
},
{
name: 'address2_addressid',
},
{
name: 'address1_telephone1',
},
{
name: 'address2_postalcode',
},
{
name: 'address1_line1',
},
{
name: 'address1_telephone3',
},
{
name: 'address2_line1',
},
{
name: 'address1_addresstypecode',
},
{
name: 'address2_name',
},
{
name: 'competitorname',
},
{
name: 'address1_upszone',
},
{
name: 'address2_line2',
},
{
name: 'transactioncurrencyid',
},
{
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' >
<opportunity-competitor-opp-comp-grid-view
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false" >
</opportunity-competitor-opp-comp-grid-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 CompetitorService from '@/service/competitor/competitor-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 {CompetitorService}
* @memberof Infotabviewpanel2
*/
public appEntityService: CompetitorService = new CompetitorService({ $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: 'entityimage',
},
{
name: 'createdate',
},
{
name: 'updatedate',
},
{
name: 'address2_shippingmethodcode',
},
{
name: 'address2_country',
},
{
name: 'address2_telephone2',
},
{
name: 'winpercentage',
},
{
name: 'address1_shippingmethodcode',
},
{
name: 'referenceinfourl',
},
{
name: 'address2_latitude',
},
{
name: 'versionnumber',
},
{
name: 'address2_county',
},
{
name: 'importsequencenumber',
},
{
name: 'address2_telephone3',
},
{
name: 'traversedpath',
},
{
name: 'address1_city',
},
{
name: 'reportedrevenue_base',
},
{
name: 'competitor',
prop: 'competitorid',
},
{
name: 'address1_fax',
},
{
name: 'updateman',
},
{
name: 'overview',
},
{
name: 'address2_stateorprovince',
},
{
name: 'entityimageid',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'address2_upszone',
},
{
name: 'address1_line3',
},
{
name: 'stockexchange',
},
{
name: 'stageid',
},
{
name: 'reportingyear',
},
{
name: 'reportingquarter',
},
{
name: 'address1_stateorprovince',
},
{
name: 'address1_utcoffset',
},
{
name: 'address1_latitude',
},
{
name: 'address1_composite',
},
{
name: 'address1_county',
},
{
name: 'address1_name',
},
{
name: 'address1_postalcode',
},
{
name: 'opportunities',
},
{
name: 'address1_addressid',
},
{
name: 'address2_line3',
},
{
name: 'address2_fax',
},
{
name: 'processid',
},
{
name: 'address2_postofficebox',
},
{
name: 'createman',
},
{
name: 'exchangerate',
},
{
name: 'overriddencreatedon',
},
{
name: 'address1_telephone2',
},
{
name: 'strengths',
},
{
name: 'address2_addresstypecode',
},
{
name: 'address1_postofficebox',
},
{
name: 'weaknesses',
},
{
name: 'address1_line2',
},
{
name: 'yominame',
},
{
name: 'address2_longitude',
},
{
name: 'threats',
},
{
name: 'address2_composite',
},
{
name: 'entityimage_timestamp',
},
{
name: 'address2_utcoffset',
},
{
name: 'address1_country',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'reportedrevenue',
},
{
name: 'address1_longitude',
},
{
name: 'tickersymbol',
},
{
name: 'address2_telephone1',
},
{
name: 'keyproduct',
},
{
name: 'entityimage_url',
},
{
name: 'address2_city',
},
{
name: 'websiteurl',
},
{
name: 'address2_addressid',
},
{
name: 'address1_telephone1',
},
{
name: 'address2_postalcode',
},
{
name: 'address1_line1',
},
{
name: 'address1_telephone3',
},
{
name: 'address2_line1',
},
{
name: 'address1_addresstypecode',
},
{
name: 'address2_name',
},
{
name: 'competitorname',
},
{
name: 'address1_upszone',
},
{
name: 'address2_line2',
},
{
name: 'transactioncurrencyid',
},
{
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
<template>
<div class='pickupviewpanel'>
<component
v-if="inited && view.viewname && !Object.is(view.viewname, '')"
:is="view.viewname"
class="viewcontainer3"
:viewdata="viewdata"
:viewparam="viewparam"
:viewDefaultUsage="false"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
@viewdataschange="onViewDatasChange"
@viewdatasactivated="viewDatasActivated"
@viewload="onViewLoad">
</component>
</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 OpportunityService from '@/service/opportunity/opportunity-service';
import PickupViewpickupviewpanelService from './pickup-viewpickupviewpanel-pickupviewpanel-service';
import PickupViewpickupviewpanelModel from './pickup-viewpickupviewpanel-pickupviewpanel-model';
@Component({
components: {
}
})
export default class PickupViewpickupviewpanelBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public context: any;
/**
* 视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public viewparams: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof PickupViewpickupviewpanel
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof PickupViewpickupviewpanel
*/
public getControlType(): string {
return 'PICKUPVIEWPANEL'
}
/**
* 建构部件服务对象
*
* @type {PickupViewpickupviewpanelService}
* @memberof PickupViewpickupviewpanel
*/
public service: PickupViewpickupviewpanelService = new PickupViewpickupviewpanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {OpportunityService}
* @memberof PickupViewpickupviewpanel
*/
public appEntityService: OpportunityService = new OpportunityService({ $store: this.$store });
/**
* 关闭视图
*
* @param {any} args
* @memberof PickupViewpickupviewpanel
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof PickupViewpickupviewpanel
*/
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();
}
})
}
}
/**
* 选中数据字符串
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public selectedData?: string;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof PickupViewpickupviewpanel
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof PickupViewpickupviewpanel
*/
public getData(): any {
return {};
}
/**
* 视图名称
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public view: any = {
viewname: 'opportunity-pickup-grid-view',
data: {},
}
/**
* 局部上下文
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localViewParam: any = null;
/**
* 视图数据
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@Prop({default: true}) public isShowButton!: boolean;
/**
* 是否单选
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public isSingleSelect?: boolean;
/**
* 初始化完成
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
public inited: boolean = false;
/**
* 视图数据变化
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public onViewDatasChange($event: any): void {
if($event.length>0){
$event.forEach((item:any,index:any) => {
let srfmajortext = item['opportunityname'];
if(srfmajortext){
Object.assign($event[index],{srfmajortext: srfmajortext});
}
});
}
this.$emit('selectionchange', $event);
}
/**
* 视图数据被激活
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public viewDatasActivated($event: any): void {
this.$emit('activated', $event);
}
/**
* 视图加载完成
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public onViewLoad($event: any): void {
this.$emit('load', $event);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.viewdata = JSON.stringify(this.context);
this.viewparam = JSON.stringify(Object.assign(data, this.viewparams));
this.inited = true;
}
});
}
}
/**
* 初始化导航参数
*
* @memberof PickupViewpickupviewpanel
*/
public initNavParam(){
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);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
</script>
<style lang='less'>
@import './pickup-viewpickupviewpanel-pickupviewpanel.less';
</style>
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* PickupViewpickupviewpanel 部件服务对象
*
* @export
* @class PickupViewpickupviewpanelService
*/
export default class PickupViewpickupviewpanelService extends ControlService {
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import PickupViewpickupviewpanelBase from './pickup-viewpickupviewpanel-pickupviewpanel-base.vue';
@Component({
components: {
}
})
export default class PickupViewpickupviewpanel extends PickupViewpickupviewpanelBase {
}
</script>
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import QuickCreateBase from './quick-create-form-base.vue';
@Component({
components: {
}
})
export default class QuickCreate extends QuickCreateBase {
}
</script>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册