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

xignzi006 发布系统代码

上级 d4e96ae8
<template>
<studio-view-style2 viewName="opportunitypickupgridview" viewTitle="商机选择表格视图" class='depickupgridview opportunity-pickup-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:showBusyIndicator="true"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</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 PickupGridViewEngine from '@engine/view/pickup-grid-view-engine';
/**
* 商机选择表格视图视图基类
*
* @export
* @class OpportunityPickupGridViewBase
* @extends {PickupViewBase}
*/
@Component({})
@VueLifeCycleProcessing()
export default class OpportunityPickupGridViewBase extends PickupViewBase {
/**
* 实体服务对象
*
* @type {OpportunityService}
* @memberof OpportunityPickupGridViewBase
*/
protected appEntityService: OpportunityService = new OpportunityService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof OpportunityPickupGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 自定义视图导航上下文集合
*
* @protected
* @type {*}
* @memberof OpportunityPickupGridViewBase
*/
protected customViewNavContexts: any = {
};
/**
* 自定义视图导航参数集合
*
* @protected
* @type {*}
* @memberof OpportunityPickupGridViewBase
*/
protected customViewParams: any = {
};
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof OpportunityPickupGridViewBase
*/
protected model: any = {
srfCaption: 'entities.opportunity.views.pickupgridview.caption',
srfTitle: 'entities.opportunity.views.pickupgridview.title',
srfSubTitle: 'entities.opportunity.views.pickupgridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof OpportunityPickupGridViewBase
*/
protected containerModel: any = {
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof OpportunityPickupGridViewBase
*/
public engine: PickupGridViewEngine = new PickupGridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof OpportunityPickupGridViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'opportunity',
majorPSDEField: 'opportunityname',
isLoadDefault: true,
});
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof OpportunityPickupGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof OpportunityPickupGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof OpportunityPickupGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof OpportunityPickupGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof OpportunityPickupGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof OpportunityPickupGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof OpportunityPickupGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 是否展开搜索表单
*
* @protected
* @type {boolean}
* @memberof OpportunityPickupGridViewBase
*/
protected isExpandSearchForm: boolean = true;
}
</script>
<style lang='less'>
@import './opportunity-pickup-grid-view.less';
</style>
\ No newline at end of file
.pickup-view {
--pickup-view: 0;
}
// 避免空文件,后台不让空文件过
.opportunity-pickup-grid-view {
--opportunity-pickup-grid-view: 0;
}
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import OpportunityPickupGridViewBase from './opportunity-pickup-grid-view-base.vue';
import view_grid from '@widgets/opportunity/main-grid/main-grid.vue';
import view_searchform from '@widgets/opportunity/default-searchform/default-searchform.vue';
@Component({
components: {
view_grid,
view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
},
})
export default class OpportunityPickupGridView extends OpportunityPickupGridViewBase {
}
</script>
\ No newline at end of file
......@@ -98,7 +98,6 @@ export const PageComponents = {
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'));
......@@ -114,6 +113,7 @@ export const PageComponents = {
Vue.component('contact-edit-market', () => import('@pages/base/contact-edit-market/contact-edit-market.vue'));
Vue.component('campaign-summary-head', () => import('@pages/marketing/campaign-summary-head/campaign-summary-head.vue'));
Vue.component('account-edit-account-info', () => import('@pages/base/account-edit-account-info/account-edit-account-info.vue'));
Vue.component('opportunity-pickup-grid-view', () => import('@pages/sales/opportunity-pickup-grid-view/opportunity-pickup-grid-view.vue'));
Vue.component('account-inner-pickup-grid-view', () => import('@pages/base/account-inner-pickup-grid-view/account-inner-pickup-grid-view.vue'));
Vue.component('contact-edit-address', () => import('@pages/base/contact-edit-address/contact-edit-address.vue'));
Vue.component('campaign-response-quick-create', () => import('@pages/marketing/campaign-response-quick-create/campaign-response-quick-create.vue'));
......
......@@ -5241,6 +5241,48 @@ const router = new Router({
},
component: () => import('@pages/base/account-edit-view/account-edit-view.vue'),
},
{
path: '/accounts/:account?/contacts/:contact?/opportunities/:opportunity?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.opportunity.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'accounts', parameterName: 'account' },
{ pathName: 'contacts', parameterName: 'contact' },
{ pathName: 'opportunities', parameterName: 'opportunity' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/opportunity-pickup-grid-view/opportunity-pickup-grid-view.vue'),
},
{
path: '/contacts/:contact?/opportunities/:opportunity?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.opportunity.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'contacts', parameterName: 'contact' },
{ pathName: 'opportunities', parameterName: 'opportunity' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/opportunity-pickup-grid-view/opportunity-pickup-grid-view.vue'),
},
{
path: '/opportunities/:opportunity?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.opportunity.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'opportunities', parameterName: 'opportunity' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/opportunity-pickup-grid-view/opportunity-pickup-grid-view.vue'),
},
{
path: '/accounts/:account?/innerpickupgridview/:innerpickupgridview?',
meta: {
......
......@@ -645,6 +645,15 @@ export const viewstate: any = {
'29bfcd628ab25e297248ff0524d12908',
],
},
{
viewtag: '6e866e05730d8c3e03f150a33225307d',
viewmodule: 'Sales',
viewname: 'OpportunityPickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '7217511947b8833ba5683e54c06b0271',
viewmodule: 'Base',
......
......@@ -555,7 +555,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: '错误', desc: 'OpportunityGridView视图搜索表单loadAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'OpportunityPickupGridView视图搜索表单loadAction参数未配置' });
return;
}
const arg: any = { ...opt };
......@@ -592,7 +592,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public loadDraft(opt: any = {},mode?:string): void {
if(!this.loaddraftAction){
this.$Notice.error({ title: '错误', desc: 'OpportunityGridView视图搜索表单loaddraftAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'OpportunityPickupGridView视图搜索表单loaddraftAction参数未配置' });
return;
}
const arg: any = { ...opt } ;
......
......@@ -292,20 +292,6 @@ export default class MainBase extends Vue implements ControlInterface {
return this.selections[0];
}
/**
* 打开新建数据视图
*
* @type {any}
* @memberof Main
*/
@Prop() public newdata: any;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof Main
*/
@Prop() public opendata: any;
/**
* 显示处理提示
......@@ -701,7 +687,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}, pageReset: boolean = false): void {
if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: 'OpportunityGridView视图表格fetchAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'OpportunityPickupGridView视图表格fetchAction参数未配置' });
return;
}
if(pageReset){
......@@ -778,7 +764,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){
this.$Notice.error({ title: '错误', desc: 'OpportunityGridView视图表格removeAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'OpportunityPickupGridView视图表格removeAction参数未配置' });
return;
}
let _datas:any[] = [];
......@@ -884,7 +870,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public addBatch(arg: any = {}): void {
if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: 'OpportunityGridView视图表格fetchAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'OpportunityPickupGridView视图表格fetchAction参数未配置' });
return;
}
if(!arg){
......@@ -1422,7 +1408,7 @@ export default class MainBase extends Vue implements ControlInterface {
try {
if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){
this.$Notice.error({ title: '错误', desc: 'OpportunityGridView视图表格createAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'OpportunityPickupGridView视图表格createAction参数未配置' });
}else{
Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
......@@ -1430,7 +1416,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){
this.$Notice.error({ title: '错误', desc: 'OpportunityGridView视图表格updateAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'OpportunityPickupGridView视图表格updateAction参数未配置' });
}else{
Object.assign(item,{viewparams:this.viewparams});
if(item.opportunity){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册