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

xignzi006 发布系统代码

上级 da7b7fd7
.pickup-view {
--pickup-view: 0;
}
// 避免空文件,后台不让空文件过
.contact-pickup-grid-view {
--contact-pickup-grid-view: 0;
}
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import ContactPickupGridViewBase from './contact-pickup-grid-view-base.vue';
import view_grid from '@widgets/contact/main-grid/main-grid.vue';
import view_searchform from '@widgets/contact/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 ContactPickupGridView extends ContactPickupGridViewBase {
}
</script>
\ No newline at end of file
// 避免空文件,后台不让空文件过
.contact-pickup-view {
--contact-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 ContactPickupViewBase from './contact-pickup-view-base.vue';
import view_pickupviewpanel from '@widgets/contact/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 ContactPickupView extends ContactPickupViewBase {
}
</script>
\ No newline at end of file
......@@ -19,7 +19,6 @@ export const PageComponents = {
Vue.component('account-account-info', () => import('@pages/base/account-account-info/account-account-info.vue'));
Vue.component('invoice-edit-view', () => import('@pages/finance/invoice-edit-view/invoice-edit-view.vue'));
Vue.component('account-summary', () => import('@pages/base/account-summary/account-summary.vue'));
Vue.component('contact-pickup-view', () => import('@pages/base/contact-pickup-view/contact-pickup-view.vue'));
Vue.component('account-contact-setting', () => import('@pages/base/account-contact-setting/account-contact-setting.vue'));
Vue.component('opportunity-grid-view', () => import('@pages/sales/opportunity-grid-view/opportunity-grid-view.vue'));
Vue.component('letter-edit-view', () => import('@pages/base/letter-edit-view/letter-edit-view.vue'));
......@@ -56,5 +55,6 @@ export const PageComponents = {
Vue.component('ibiz-list-edit-view', () => import('@pages/marketing/ibiz-list-edit-view/ibiz-list-edit-view.vue'));
Vue.component('quote-edit-view', () => import('@pages/sales/quote-edit-view/quote-edit-view.vue'));
Vue.component('incident-grid-view', () => import('@pages/service/incident-grid-view/incident-grid-view.vue'));
Vue.component('contact-pickup-view', () => import('@pages/base/contact-pickup-view/contact-pickup-view.vue'));
}
};
\ No newline at end of file
......@@ -1171,6 +1171,19 @@ const router = new Router({
},
component: () => import('@pages/ungroup/centeral-portal/centeral-portal.vue'),
},
{
path: '/contacts/:contact?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.contact.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'contacts', parameterName: 'contact' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/base/contact-pickup-grid-view/contact-pickup-grid-view.vue'),
},
{
path: '/tasks/:task?/quickcreate/:quickcreate?',
meta: {
......@@ -1366,6 +1379,19 @@ const router = new Router({
},
component: () => import('@pages/marketing/campaign-response-edit-view/campaign-response-edit-view.vue'),
},
{
path: '/contacts/:contact?/pickupview/:pickupview?',
meta: {
caption: 'entities.contact.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'contacts', parameterName: 'contact' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/base/contact-pickup-view/contact-pickup-view.vue'),
},
{
path: '/activitypointers/:activitypointer?/byparentkey/:byparentkey?',
meta: {
......
......@@ -279,6 +279,15 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '85781d107d628dfc6cdf9693797f073e',
viewmodule: 'Base',
viewname: 'ContactPickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '893e62d6fbdc4580de7e3e802aec9108',
viewmodule: 'Base',
......@@ -443,6 +452,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: 'b6b6215e439e78cdf6959b6f45bd7927',
viewmodule: 'Base',
viewname: 'ContactPickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'85781d107d628dfc6cdf9693797f073e',
],
},
{
viewtag: 'bae77557d2f7a7852b634dc5d5a93435',
viewmodule: 'Base',
......
......@@ -561,7 +561,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: '错误', desc: 'ContactGridView视图搜索表单loadAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'ContactPickupGridView视图搜索表单loadAction参数未配置' });
return;
}
const arg: any = { ...opt };
......@@ -598,7 +598,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public loadDraft(opt: any = {},mode?:string): void {
if(!this.loaddraftAction){
this.$Notice.error({ title: '错误', desc: 'ContactGridView视图搜索表单loaddraftAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'ContactPickupGridView视图搜索表单loaddraftAction参数未配置' });
return;
}
const arg: any = { ...opt } ;
......
......@@ -268,20 +268,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;
/**
* 显示处理提示
......@@ -663,7 +649,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: 'ContactGridView视图表格fetchAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'ContactPickupGridView视图表格fetchAction参数未配置' });
return;
}
if(pageReset){
......@@ -740,7 +726,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){
this.$Notice.error({ title: '错误', desc: 'ContactGridView视图表格removeAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'ContactPickupGridView视图表格removeAction参数未配置' });
return;
}
let _datas:any[] = [];
......@@ -846,7 +832,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public addBatch(arg: any = {}): void {
if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: 'ContactGridView视图表格fetchAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'ContactPickupGridView视图表格fetchAction参数未配置' });
return;
}
if(!arg){
......@@ -1384,7 +1370,7 @@ export default class MainBase extends Vue implements ControlInterface {
try {
if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){
this.$Notice.error({ title: '错误', desc: 'ContactGridView视图表格createAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'ContactPickupGridView视图表格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);
......@@ -1392,7 +1378,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){
this.$Notice.error({ title: '错误', desc: 'ContactGridView视图表格updateAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'ContactPickupGridView视图表格updateAction参数未配置' });
}else{
Object.assign(item,{viewparams:this.viewparams});
if(item.contact){
......
<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 ContactService from '@/service/contact/contact-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 {ContactService}
* @memberof PickupViewpickupviewpanel
*/
public appEntityService: ContactService = new ContactService({ $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: 'contact-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['fullname'];
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
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册