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

lab_gzf 发布系统代码

上级 3bd5ec19
......@@ -1299,6 +1299,16 @@
"viewtag": "6e866e05730d8c3e03f150a33225307d",
"memo": "系统自动添加"
},
"competitoredit_datapanelview": {
"title": "头部信息编辑",
"caption": "竞争对手",
"viewtype": "DEEDITVIEW",
"viewmodule": "Sales",
"viewname": "CompetitorEdit_DataPanelView",
"viewfilename": "competitor-edit-data-panel-view",
"viewtag": "6f2e9be27a6026ea1b35f6b54101cd21",
"memo": ""
},
"leadconleadgridview": {
"title": "潜在顾客信息",
"caption": "潜在顾客信息",
......
......@@ -700,7 +700,7 @@ export default {
},
},
infotoolbar_toolbar: {
tbitem1_openmaineditview: {
tbitem1_editmain: {
caption: "编辑",
tip: "编辑",
},
......
......@@ -699,7 +699,7 @@ export default {
},
},
infotoolbar_toolbar: {
tbitem1_openmaineditview: {
tbitem1_editmain: {
caption: "编辑",
tip: "编辑",
},
......
......@@ -96,6 +96,10 @@ export default {
caption: "竞争对手",
title: "竞争对手选择表格视图",
},
edit_datapanelview: {
caption: "竞争对手",
title: "头部信息编辑",
},
summary: {
caption: "竞争对手概览",
title: "竞争对手概览",
......@@ -171,8 +175,29 @@ export default {
uiactions: {
},
},
edit_datapanel_form: {
details: {
group1: "竞争对手基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "竞争对手",
srfmajortext: "竞争对手名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
reportedrevenue: "报告收入",
websiteurl: "网站",
competitorid: "竞争对手",
},
uiactions: {
},
},
datapanel_form: {
details: {
button1: "头信息编辑",
grouppanel1: "分组面板",
group1: "竞争对手基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
......@@ -188,6 +213,7 @@ export default {
competitorid: "竞争对手",
},
uiactions: {
competitor_openedit_datapanelview: "头信息编辑",
},
},
main_form: {
......
......@@ -95,6 +95,10 @@ export default {
caption: "竞争对手",
title: "竞争对手选择表格视图",
},
edit_datapanelview: {
caption: "竞争对手",
title: "头部信息编辑",
},
summary: {
caption: "竞争对手概览",
title: "竞争对手概览",
......@@ -170,8 +174,29 @@ export default {
uiactions: {
},
},
edit_datapanel_form: {
details: {
group1: "竞争对手基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "竞争对手",
srfmajortext: "竞争对手名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
reportedrevenue: "报告收入",
websiteurl: "网站",
competitorid: "竞争对手",
},
uiactions: {
},
},
datapanel_form: {
details: {
button1: "头信息编辑",
grouppanel1: "分组面板",
group1: "竞争对手基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
......@@ -187,6 +212,7 @@ export default {
competitorid: "竞争对手",
},
uiactions: {
competitor_openedit_datapanelview: "头信息编辑",
},
},
main_form: {
......
......@@ -319,7 +319,7 @@ export default {
},
},
byparentkeytoolbar_toolbar: {
tbitem1_byparent: {
tbitem1_quickcreatebyparent: {
caption: "新建",
tip: "新建",
},
......@@ -399,7 +399,7 @@ export default {
},
},
gridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
tbitem1_quickcreate: {
caption: "新建",
tip: "新建",
},
......
......@@ -318,7 +318,7 @@ export default {
},
},
byparentkeytoolbar_toolbar: {
tbitem1_byparent: {
tbitem1_quickcreatebyparent: {
caption: "新建",
tip: "新建",
},
......@@ -398,7 +398,7 @@ export default {
},
},
gridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
tbitem1_quickcreate: {
caption: "新建",
tip: "新建",
},
......
......@@ -1047,6 +1047,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "OpportunityPickupGridView",
"viewtag": "6e866e05730d8c3e03f150a33225307d"
},
"competitoredit_datapanelview": {
"title": "头部信息编辑",
"caption": "竞争对手",
"viewtype": "DEEDITVIEW",
"viewmodule": "Sales",
"viewname": "CompetitorEdit_DataPanelView",
"viewtag": "6f2e9be27a6026ea1b35f6b54101cd21"
},
"leadconleadgridview": {
"title": "潜在顾客信息",
"caption": "潜在顾客信息",
......
......@@ -58,6 +58,7 @@ export const PageComponents = {
Vue.component('sales-literature-info-view', () => import('@pages/sales/sales-literature-info-view/sales-literature-info-view.vue'));
Vue.component('quote-detail-quo-detail-grid-view', () => import('@pages/sales/quote-detail-quo-detail-grid-view/quote-detail-quo-detail-grid-view.vue'));
Vue.component('campaign-activity-quick-create', () => import('@pages/marketing/campaign-activity-quick-create/campaign-activity-quick-create.vue'));
Vue.component('competitor-edit-data-panel-view', () => import('@pages/sales/competitor-edit-data-panel-view/competitor-edit-data-panel-view.vue'));
Vue.component('list-contact-grid-view', () => import('@pages/marketing/list-contact-grid-view/list-contact-grid-view.vue'));
Vue.component('fax-edit-view', () => import('@pages/base/fax-edit-view/fax-edit-view.vue'));
Vue.component('incident-quick-create-view', () => import('@pages/service/incident-quick-create-view/incident-quick-create-view.vue'));
......
......@@ -2615,6 +2615,20 @@ const router = new Router({
},
component: () => import('@pages/marketing/campaign-activity-quick-create/campaign-activity-quick-create.vue'),
},
{
path: 'competitors/:competitor?/edit_datapanelview/:edit_datapanelview?',
meta: {
caption: 'entities.competitor.views.edit_datapanelview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'competitors', parameterName: 'competitor' },
{ pathName: 'edit_datapanelview', parameterName: 'edit_datapanelview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/competitor-edit-data-panel-view/competitor-edit-data-panel-view.vue'),
},
{
path: 'accounts/:account?/contacts/:contact?/listcontacts/:listcontact?/gridview/:gridview?',
meta: {
......
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import CompetitorService from '@/service/competitor/competitor-service';
import EditViewEngine from '@engine/view/edit-view-engine';
/**
* 头部信息编辑视图基类
*
* @export
* @class CompetitorEdit_DataPanelViewBase
* @extends {EditViewBase}
*/
export class CompetitorEdit_DataPanelViewBase extends EditViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof CompetitorEdit_DataPanelViewBase
*/
protected appDeName: string = 'competitor';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof CompetitorEdit_DataPanelViewBase
*/
protected appDeKey: string = 'competitorid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof CompetitorEdit_DataPanelViewBase
*/
protected appDeMajor: string = 'competitorname';
/**
* 实体服务对象
*
* @type {CompetitorService}
* @memberof CompetitorEdit_DataPanelViewBase
*/
protected appEntityService: CompetitorService = new CompetitorService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof CompetitorEdit_DataPanelViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof CompetitorEdit_DataPanelViewBase
*/
protected model: any = {
srfCaption: 'entities.competitor.views.edit_datapanelview.caption',
srfTitle: 'entities.competitor.views.edit_datapanelview.title',
srfSubTitle: 'entities.competitor.views.edit_datapanelview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof CompetitorEdit_DataPanelViewBase
*/
protected containerModel: any = {
view_form: { name: 'form', type: 'FORM' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '6f2e9be27a6026ea1b35f6b54101cd21';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof CompetitorEdit_DataPanelViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof CompetitorEdit_DataPanelViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'competitor',
majorPSDEField: 'competitorname',
isLoadDefault: true,
});
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof CompetitorEdit_DataPanelViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof CompetitorEdit_DataPanelViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof CompetitorEdit_DataPanelViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="competitoredit_datapanelview" viewTitle="头部信息编辑" class='deeditview competitor-edit-data-panel-view'>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="true"
: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>
</studio-view-style2>
\ No newline at end of file
<template src="./competitor-edit-data-panel-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { CompetitorEdit_DataPanelViewBase } from './competitor-edit-data-panel-view-base';
import view_form from '@widgets/competitor/edit-data-panel-form/edit-data-panel-form.vue';
/**
* 头部信息编辑视图
*
* @export
* @class CompetitorEdit_DataPanelView
* @extends {CompetitorEdit_DataPanelViewBase}
*/
@Component({
components: {
view_form,
}
})
@VueLifeCycleProcessing()
export default class CompetitorEdit_DataPanelView extends CompetitorEdit_DataPanelViewBase { }
</script>
......@@ -94,7 +94,7 @@ export class IncidentByParentKeyBase extends GridViewBase {
* @memberof IncidentByParentKey
*/
public toolBarModels: any = {
tbitem1_byparent: { name: 'tbitem1_byparent', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'ByParent', target: 'NONE' }, class: '' },
tbitem1_quickcreatebyparent: { name: 'tbitem1_quickcreatebyparent', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-user-plus', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'QuickCreateByParent', 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: '' },
......@@ -164,8 +164,8 @@ export class IncidentByParentKeyBase extends GridViewBase {
* @memberof IncidentByParentKeyBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem1_byparent')) {
this.toolbar_tbitem1_byparent_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem1_quickcreatebyparent')) {
this.toolbar_tbitem1_quickcreatebyparent_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
......@@ -283,7 +283,7 @@ export class IncidentByParentKeyBase extends GridViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_byparent_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem1_quickcreatebyparent_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -301,7 +301,7 @@ export class IncidentByParentKeyBase extends GridViewBase {
}
// 界面行为
const curUIService:IncidentUIService = new IncidentUIService();
curUIService.Incident_ByParent(datas,contextJO, paramJO, $event, xData,this,"Incident");
curUIService.Incident_QuickCreateByParent(datas,contextJO, paramJO, $event, xData,this,"Incident");
}
/**
......
......@@ -94,7 +94,7 @@ export class IncidentGridViewBase extends GridViewBase {
* @memberof IncidentGridView
*/
public toolBarModels: any = {
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: '' },
tbitem1_quickcreate: { name: 'tbitem1_quickcreate', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-user-plus', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'QuickCreate', 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: '' },
......@@ -164,8 +164,8 @@ export class IncidentGridViewBase extends GridViewBase {
* @memberof IncidentGridViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem1_openquickcreateview')) {
this.toolbar_tbitem1_openquickcreateview_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem1_quickcreate')) {
this.toolbar_tbitem1_quickcreate_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
......@@ -283,7 +283,7 @@ export class IncidentGridViewBase extends GridViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_openquickcreateview_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem1_quickcreate_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -301,7 +301,7 @@ export class IncidentGridViewBase extends GridViewBase {
}
// 界面行为
const curUIService:IncidentUIService = new IncidentUIService();
curUIService.Incident_OpenQuickCreateView(datas,contextJO, paramJO, $event, xData,this,"Incident");
curUIService.Incident_QuickCreate(datas,contextJO, paramJO, $event, xData,this,"Incident");
}
/**
......
......@@ -1193,6 +1193,15 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '6f2e9be27a6026ea1b35f6b54101cd21',
viewmodule: 'Sales',
viewname: 'CompetitorEdit_DataPanelView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '6f35f461b53398775ff2f1a563776fa3',
viewmodule: 'Sales',
......@@ -1935,6 +1944,7 @@ export const viewstate: any = {
refviews: [
'f83783341c365d6eb1d7385c9d1ddb95',
'74d764142f94fb7dafabc018c953002c',
'6f2e9be27a6026ea1b35f6b54101cd21',
'ac5ea5e435a4102d39f1f4a569368b25',
'9bf80730e83a74615919a0f0907505d4',
],
......
......@@ -461,7 +461,7 @@ export default class AccountUIServiceBase extends UIService {
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async Account_OpenMainEditView(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
public async Account_EditMain(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let data: any = {};
let parentContext:any = {};
......
......@@ -82,6 +82,7 @@ export default class CompetitorUIServiceBase extends UIService {
this.allViewMap.set(':',{viewname:'optionview',srfappde:'competitors'});
this.allViewMap.set(':',{viewname:'info_abstract',srfappde:'competitors'});
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'competitors'});
this.allViewMap.set(':',{viewname:'edit_datapanelview',srfappde:'competitors'});
this.allViewMap.set(':',{viewname:'summary',srfappde:'competitors'});
this.allViewMap.set(':',{viewname:'info',srfappde:'competitors'});
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'competitors'});
......@@ -212,6 +213,54 @@ export default class CompetitorUIServiceBase 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 Competitor_OpenEdit_DataPanelView(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, { competitor: '%competitor%' });
Object.assign(params, { competitorid: '%competitor%' });
Object.assign(params, { competitorname: '%competitorname%' });
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: 'competitors', parameterName: 'competitor' },
{ pathName: 'edit_datapanelview', parameterName: 'edit_datapanelview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
return null;
}
openIndexViewTab(data);
}
/**
* 获取指定数据的重定向页面
......
......@@ -113,7 +113,7 @@ export default class IncidentUIServiceBase extends UIService {
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async Incident_OpenQuickCreateView(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
public async Incident_QuickCreate(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let data: any = {};
let parentContext:any = {};
......@@ -148,8 +148,8 @@ export default class IncidentUIServiceBase extends UIService {
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
}
if (this.Incident_OpenInfoView && this.Incident_OpenInfoView instanceof Function) {
this.Incident_OpenInfoView(result.datas,context,params, $event, xData,actionContext);
if (this.Incident_EditInfo && this.Incident_EditInfo instanceof Function) {
this.Incident_EditInfo(result.datas,context,params, $event, xData,actionContext);
}
if(window.opener){
window.opener.postMessage({status:'OK',identification:'WF'},Environment.uniteAddress);
......@@ -180,7 +180,7 @@ export default class IncidentUIServiceBase extends UIService {
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async Incident_OpenInfoView(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
public async Incident_EditInfo(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let data: any = {};
let parentContext:any = {};
......@@ -228,7 +228,7 @@ export default class IncidentUIServiceBase extends UIService {
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async Incident_ByParent(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
public async Incident_QuickCreateByParent(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let data: any = {};
let parentContext:any = {};
......@@ -263,8 +263,8 @@ export default class IncidentUIServiceBase extends UIService {
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
}
if (this.Incident_OpenInfoView && this.Incident_OpenInfoView instanceof Function) {
this.Incident_OpenInfoView(result.datas,context,params, $event, xData,actionContext);
if (this.Incident_EditInfo && this.Incident_EditInfo instanceof Function) {
this.Incident_EditInfo(result.datas,context,params, $event, xData,actionContext);
}
if(window.opener){
window.opener.postMessage({status:'OK',identification:'WF'},Environment.uniteAddress);
......
......@@ -3,6 +3,7 @@ import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import CompetitorService from '@/service/competitor/competitor-service';
import DataPanelService from './data-panel-form-service';
import CompetitorUIService from '@/uiservice/competitor/competitor-ui-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
......@@ -49,6 +50,34 @@ export class DataPanelEditFormBase extends EditFormControlBase {
*/
protected appDeName: string = 'competitor';
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public datapanel_button1_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;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:CompetitorUIService = new CompetitorUIService();
curUIService.Competitor_OpenEdit_DataPanelView(datas,contextJO, paramJO, $event, xData,this,"Competitor");
}
/**
* 表单数据对象
*
......@@ -86,6 +115,10 @@ export class DataPanelEditFormBase extends EditFormControlBase {
* @memberof DataPanelEditFormBase
*/
public detailsModel: any = {
button1: new FormButtonModel({ caption: '头信息编辑', detailType: 'BUTTON', name: 'button1', visible: true, isShowCaption: false, form: this, showMoreMode: 0, uiaction: { type: 'DEUIACTION', tag: 'OpenEdit_DataPanelView', actiontarget: 'SINGLEKEY' } }),
grouppanel1: new FormGroupPanelModel({ caption: '分组面板', detailType: 'GROUPPANEL', name: 'grouppanel1', visible: true, isShowCaption: false, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.competitor.datapanel_form', extractMode: 'ITEM', details: [] } }),
group1: new FormGroupPanelModel({ caption: '竞争对手基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: false, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.competitor.datapanel_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),
......@@ -113,4 +146,14 @@ export class DataPanelEditFormBase extends EditFormControlBase {
competitorid: new FormItemModel({ caption: '竞争对手', detailType: 'FORMITEM', name: 'competitorid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
};
/**
* 表单 头信息编辑 事件
*
* @memberof @memberof DataPanelEditFormBase
*/
public button1_click($event: any): void {
this.datapanel_button1_click(null, null, $event);
}
}
\ No newline at end of file
......@@ -18,6 +18,22 @@
<app-span name='websiteurl' :value="data.websiteurl" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</div>
<div v-show="detailsModel.grouppanel1.visible" :style="{}">
<app-form-group :model="detailsModel.grouppanel1" layoutType="FLEX" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.competitor.datapanel_form.details.grouppanel1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="true" >
<div style="height: 100%;display: flex;">
<div v-show="detailsModel.button1.visible" :style="{}">
<i-button type="primary" @click="button1_click($event)" class="form-btn-noborder-transparent"
style="">
<i class="fa fa-angle-down" style="margin-right: 2px;"></i>
</i-button>
</div>
</div>
</app-form-group>
</div>
</div>
......
......@@ -22,3 +22,11 @@
line-height: 24px!important;
}
}
.form-btn-noborder-transparent {
background-color:rgba(255, 0, 0, 0);border-style:none;margin:0px 10px 0px 0px
}
.form-btn-noborder-transparent {
background-color:transparent!important;
border-style:none;
margin:0px 5px 0px 5px
}
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import CompetitorService from '@/service/competitor/competitor-service';
import Edit_DataPanelService from './edit-data-panel-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {Edit_DataPanelEditFormBase}
*/
export class Edit_DataPanelEditFormBase extends EditFormControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof Edit_DataPanelEditFormBase
*/
protected controlType: string = 'FORM';
/**
* 建构部件服务对象
*
* @type {Edit_DataPanelService}
* @memberof Edit_DataPanelEditFormBase
*/
public service: Edit_DataPanelService = new Edit_DataPanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {CompetitorService}
* @memberof Edit_DataPanelEditFormBase
*/
public appEntityService: CompetitorService = new CompetitorService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof Edit_DataPanelEditFormBase
*/
protected appDeName: string = 'competitor';
/**
* 表单数据对象
*
* @type {*}
* @memberof Edit_DataPanelEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
reportedrevenue: null,
websiteurl: null,
competitorid: null,
competitor:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof Edit_DataPanelEditFormBase
*/
public rules: any = {
}
/**
* 详情模型集合
*
* @type {*}
* @memberof Edit_DataPanelEditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '竞争对手基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: false, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.competitor.edit_datapanel_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 0 }),
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfkey: new FormItemModel({ caption: '竞争对手', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfmajortext: new FormItemModel({ caption: '竞争对手名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
reportedrevenue: new FormItemModel({ caption: '报告收入', detailType: 'FORMITEM', name: 'reportedrevenue', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
websiteurl: new FormItemModel({ caption: '网站', detailType: 'FORMITEM', name: 'websiteurl', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
competitorid: new FormItemModel({ caption: '竞争对手', detailType: 'FORMITEM', name: 'competitorid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
};
}
\ No newline at end of file
/**
* Edit_DataPanel 部件模型
*
* @export
* @class Edit_DataPanelModel
*/
export default class Edit_DataPanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Edit_DataPanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'srfupdatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'srforikey',
},
{
name: 'srfkey',
prop: 'competitorid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'competitorname',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'reportedrevenue',
prop: 'reportedrevenue',
dataType: 'BIGDECIMAL',
},
{
name: 'websiteurl',
prop: 'websiteurl',
dataType: 'TEXT',
},
{
name: 'competitorid',
prop: 'competitorid',
dataType: 'GUID',
},
{
name: 'competitor',
prop: 'competitorid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-form' ref='form' id='competitor_edit_datapanel' style="">
<input style="display:none;" />
<row >
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.group1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.competitor.edit_datapanel_form.details.group1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.reportedrevenue.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='reportedrevenue' :itemRules="this.rules.reportedrevenue" class='' :caption="$t('entities.competitor.edit_datapanel_form.details.reportedrevenue')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.reportedrevenue.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.reportedrevenue" @enter="onEnter($event)" unit="" :disabled="detailsModel.reportedrevenue.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.websiteurl.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='websiteurl' :itemRules="this.rules.websiteurl" class='' :caption="$t('entities.competitor.edit_datapanel_form.details.websiteurl')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.websiteurl.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.websiteurl" @enter="onEnter($event)" unit="" :disabled="detailsModel.websiteurl.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
<template src="./edit-data-panel-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { Edit_DataPanelEditFormBase } from './edit-data-panel-form-base';
/**
* form部件
*
* @export
* @class Edit_DataPanelEditForm
* @extends {Edit_DataPanelEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class Edit_DataPanelEditForm extends Edit_DataPanelEditFormBase { }
</script>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册