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

ShineKOT 发布系统代码 [后台服务,演示应用]

上级 0ae30e42
......@@ -879,6 +879,14 @@
"viewname": "IBIZSample0017F20EditView",
"viewtag": "9147f210be1f0751245496a40be86fad"
},
"ibizcustomerusr2mpickupview": {
"title": "客户实体数据多项选择视图(树视图)",
"caption": "客户",
"viewtype": "DEMPICKUPVIEW",
"viewmodule": "Sample",
"viewname": "IBIZCustomerUsr2MPickupView",
"viewtag": "91b325a01c9c24c60d42df9701221c2f"
},
"ibizorderusr2calendarexpview": {
"title": "订单日历导航视图(时间轴)",
"caption": "订单",
......@@ -1071,6 +1079,14 @@
"viewname": "IBIZOrderF10EditView",
"viewtag": "ad37d44e57c18e4431a609968203c646"
},
"ibizcustomerusr2pickupview": {
"title": "客户实体数据选择视图(树视图)",
"caption": "客户",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Sample",
"viewname": "IBIZCustomerUsr2PickupView",
"viewtag": "af3f8f6f28bc9acbc7affccdcd1bdfb6"
},
"ibizbooklistview": {
"title": "图书列表视图(内置功能)",
"caption": "图书",
......
......@@ -381,11 +381,14 @@ export default {
srfdeid: "",
srfsourcekey: "",
ibizbookid: "图书标识",
author: "图书作者",
formitem: "表格选择视图",
formitem1: "数据选择视图",
formitem2: "多选数据选择",
borrower: "借阅人",
borrower: "树单项数据选择",
borrower1: "树多项数据选择",
borrower2: "表格单项数据选择",
borrower3: "表格多项数据选择",
borrower1_id: "借阅人1_ID",
borrower2_id: "借阅人2_ID",
borrower3_id: "借阅人3_ID",
borrowerid: "借阅人ID",
},
uiactions: {
},
......
......@@ -380,11 +380,14 @@ export default {
srfdeid: "",
srfsourcekey: "",
ibizbookid: "图书标识",
author: "图书作者",
formitem: "表格选择视图",
formitem1: "数据选择视图",
formitem2: "多选数据选择",
borrower: "借阅人",
borrower: "树单项数据选择",
borrower1: "树多项数据选择",
borrower2: "表格单项数据选择",
borrower3: "表格多项数据选择",
borrower1_id: "借阅人1_ID",
borrower2_id: "借阅人2_ID",
borrower3_id: "借阅人3_ID",
borrowerid: "借阅人ID",
},
uiactions: {
},
......
......@@ -28,6 +28,14 @@ export default {
caption: "客户",
title: "客户编辑视图",
},
usr2mpickupview: {
caption: "客户",
title: "客户实体数据多项选择视图(树视图)",
},
usr2pickupview: {
caption: "客户",
title: "客户实体数据选择视图(树视图)",
},
usr2editview: {
caption: "客户",
title: "客户编辑视图",
......
......@@ -27,6 +27,14 @@ export default {
caption: "客户",
title: "客户编辑视图",
},
usr2mpickupview: {
caption: "客户",
title: "客户实体数据多项选择视图(树视图)",
},
usr2pickupview: {
caption: "客户",
title: "客户实体数据选择视图(树视图)",
},
usr2editview: {
caption: "客户",
title: "客户编辑视图",
......
......@@ -887,6 +887,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "IBIZSample0017F20EditView",
"viewtag": "9147f210be1f0751245496a40be86fad"
},
"ibizcustomerusr2mpickupview": {
"title": "客户实体数据多项选择视图(树视图)",
"caption": "客户",
"viewtype": "DEMPICKUPVIEW",
"viewmodule": "Sample",
"viewname": "IBIZCustomerUsr2MPickupView",
"viewtag": "91b325a01c9c24c60d42df9701221c2f"
},
"ibizorderusr2calendarexpview": {
"title": "订单日历导航视图(时间轴)",
"caption": "订单",
......@@ -1079,6 +1087,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "IBIZOrderF10EditView",
"viewtag": "ad37d44e57c18e4431a609968203c646"
},
"ibizcustomerusr2pickupview": {
"title": "客户实体数据选择视图(树视图)",
"caption": "客户",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Sample",
"viewname": "IBIZCustomerUsr2PickupView",
"viewtag": "af3f8f6f28bc9acbc7affccdcd1bdfb6"
},
"ibizbooklistview": {
"title": "图书列表视图(内置功能)",
"caption": "图书",
......
.ibizcustomer-usr2-mpickup-view{
position: relative;
}
.pickup-view {
>.translate-contant {
overflow: auto;
flex-grow: 1;
display: flex;
justify-content: flex-end;
height: calc(100% - 64px);
.translate-buttons {
width: 80px;
display: flex;
align-items: center;
text-align: center;
button {
margin-bottom: 5px;
}
}
.left, .right {
width: 300px;
}
.right {
border: 1px solid #e9e9e9;
.mpicker-select {
font-family: helvetica, sans-serif;
font-size: 16px;
text-align: justify;
word-spacing: -3.8pt;
line-height: 1.6;
font-weight: bold;
word-spacing: 10px;
height: 100%;
overflow: auto;
}
.mpicker-select > div {
padding: 3px 10px;
font-size: 14px;
color: rgba(0, 0, 0, 0.85);
font-weight: initial;
cursor: pointer;
min-height: 28px;
border: 1px solid #e9e9e9;
margin: 4px 4px;
transition: all .3s;
}
.mpicker-select > div:hover {
background: #ecf6fd;
}
.mpicker-select > .select{
color: #108ee9;
background: #ecf6fd;
}
}
.center{
width: calc(100% - 380px);
.pickupviewpanel {
width: 100%;
height: 100%;
}
}
}
>.footer {
height: 64px;
}
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import IBIZCustomerUsr2MPickupViewBase from './ibizcustomer-usr2-mpickup-view-base.vue';
import view_pickupviewpanel from '@widgets/ibizcustomer/usr2-mpickup-viewpickupviewpanel-pickupviewpanel/usr2-mpickup-viewpickupviewpanel-pickupviewpanel.vue';
@Component({
components: {
view_pickupviewpanel,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
})
export default class IBIZCustomerUsr2MPickupView extends IBIZCustomerUsr2MPickupViewBase {
}
</script>
\ No newline at end of file
.ibizcustomer-usr2-pickup-view{
position: relative;
}
.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 IBIZCustomerUsr2PickupViewBase from './ibizcustomer-usr2-pickup-view-base.vue';
import view_pickupviewpanel from '@widgets/ibizcustomer/usr2-pickup-viewpickupviewpanel-pickupviewpanel/usr2-pickup-viewpickupviewpanel-pickupviewpanel.vue';
@Component({
components: {
view_pickupviewpanel,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
})
export default class IBIZCustomerUsr2PickupView extends IBIZCustomerUsr2PickupViewBase {
}
</script>
\ No newline at end of file
......@@ -123,6 +123,7 @@ export const PageComponents = {
Vue.component('ibizbookusr2-data-view', () => import('@pages/sample/ibizbookusr2-data-view/ibizbookusr2-data-view.vue'));
Vue.component('ibizbooklist-view', () => import('@pages/sample/ibizbooklist-view/ibizbooklist-view.vue'));
Vue.component('ibizsample0017-form-pickup-view', () => import('@pages/sample/ibizsample0017-form-pickup-view/ibizsample0017-form-pickup-view.vue'));
Vue.component('ibizcustomer-usr2-pickup-view', () => import('@pages/sample/ibizcustomer-usr2-pickup-view/ibizcustomer-usr2-pickup-view.vue'));
Vue.component('ibizsample0002-grid-view', () => import('@pages/sample/ibizsample0002-grid-view/ibizsample0002-grid-view.vue'));
Vue.component('ibizcustomer-intfpickup-grid-view', () => import('@pages/sample/ibizcustomer-intfpickup-grid-view/ibizcustomer-intfpickup-grid-view.vue'));
Vue.component('ibizbookinter-func-kan-ban-view', () => import('@pages/sample/ibizbookinter-func-kan-ban-view/ibizbookinter-func-kan-ban-view.vue'));
......@@ -132,6 +133,7 @@ export const PageComponents = {
Vue.component('ibizhardware-index-pickup-view', () => import('@pages/sample/ibizhardware-index-pickup-view/ibizhardware-index-pickup-view.vue'));
Vue.component('ibizhardware-grid-view9', () => import('@pages/sample/ibizhardware-grid-view9/ibizhardware-grid-view9.vue'));
Vue.component('ibizorder-sf3-edit-view', () => import('@pages/sample/ibizorder-sf3-edit-view/ibizorder-sf3-edit-view.vue'));
Vue.component('ibizcustomer-usr2-mpickup-view', () => import('@pages/sample/ibizcustomer-usr2-mpickup-view/ibizcustomer-usr2-mpickup-view.vue'));
Vue.component('ibizorder-f13-edit-view', () => import('@pages/sample/ibizorder-f13-edit-view/ibizorder-f13-edit-view.vue'));
Vue.component('ibizcustomer-pickup-tree-view', () => import('@pages/sample/ibizcustomer-pickup-tree-view/ibizcustomer-pickup-tree-view.vue'));
Vue.component('ibizorder-detail-f6-edit-view', () => import('@pages/sample/ibizorder-detail-f6-edit-view/ibizorder-detail-f6-edit-view.vue'));
......
......@@ -1982,6 +1982,20 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizsample0017-form-pickup-view/ibizsample0017-form-pickup-view.vue'),
},
{
path: 'ibizcustomers/:ibizcustomer?/usr2pickupview/:usr2pickupview?',
meta: {
caption: 'entities.ibizcustomer.views.usr2pickupview.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibizcustomers', parameterName: 'ibizcustomer' },
{ pathName: 'usr2pickupview', parameterName: 'usr2pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizcustomer-usr2-pickup-view/ibizcustomer-usr2-pickup-view.vue'),
},
{
path: 'ibizsample0002s/:ibizsample0002?/gridview/:gridview?',
meta: {
......@@ -2108,6 +2122,20 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizorder-sf3-edit-view/ibizorder-sf3-edit-view.vue'),
},
{
path: 'ibizcustomers/:ibizcustomer?/usr2mpickupview/:usr2mpickupview?',
meta: {
caption: 'entities.ibizcustomer.views.usr2mpickupview.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibizcustomers', parameterName: 'ibizcustomer' },
{ pathName: 'usr2mpickupview', parameterName: 'usr2mpickupview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizcustomer-usr2-mpickup-view/ibizcustomer-usr2-mpickup-view.vue'),
},
{
path: 'ibizorders/:ibizorder?/f13editview/:f13editview?',
meta: {
......@@ -4187,6 +4215,19 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizsample0017-f20-edit-view/ibizsample0017-f20-edit-view.vue'),
},
{
path: '/ibizcustomers/:ibizcustomer?/usr2mpickupview/:usr2mpickupview?',
meta: {
caption: 'entities.ibizcustomer.views.usr2mpickupview.caption',
info:'',
parameters: [
{ pathName: 'ibizcustomers', parameterName: 'ibizcustomer' },
{ pathName: 'usr2mpickupview', parameterName: 'usr2mpickupview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizcustomer-usr2-mpickup-view/ibizcustomer-usr2-mpickup-view.vue'),
},
{
path: '/ibizorders/:ibizorder?/usr2calendarexpview/:usr2calendarexpview?',
meta: {
......@@ -4473,6 +4514,19 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizorder-f10-edit-view/ibizorder-f10-edit-view.vue'),
},
{
path: '/ibizcustomers/:ibizcustomer?/usr2pickupview/:usr2pickupview?',
meta: {
caption: 'entities.ibizcustomer.views.usr2pickupview.caption',
info:'',
parameters: [
{ pathName: 'ibizcustomers', parameterName: 'ibizcustomer' },
{ pathName: 'usr2pickupview', parameterName: 'usr2pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizcustomer-usr2-pickup-view/ibizcustomer-usr2-pickup-view.vue'),
},
{
path: '/ibizbooks/:ibizbook?/listview/:listview?',
meta: {
......
......@@ -545,10 +545,10 @@ export const viewstate: any = {
viewaction: '',
viewdatachange: false,
refviews: [
'91b325a01c9c24c60d42df9701221c2f',
'f7ce60a7707de1ef9f926b3f9d5d6954',
'2a63c4595d7b116f63e0960a2365bbfa',
'af3f8f6f28bc9acbc7affccdcd1bdfb6',
'81e92e837f6fa81fed5b6beaa75f6bbd',
'460fc1d5b6f2e2012b281df34d929f3b',
],
},
{
......@@ -1086,6 +1086,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '91b325a01c9c24c60d42df9701221c2f',
viewmodule: 'Sample',
viewname: 'IBIZCustomerUsr2MPickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'2a63c4595d7b116f63e0960a2365bbfa',
],
},
{
viewtag: '92cca69539c77ba96bfc384fc570bfa7',
viewmodule: 'Sample',
......@@ -1311,6 +1321,16 @@ export const viewstate: any = {
'8a4246bc438e47ec0f6f3516b9befc53',
],
},
{
viewtag: 'af3f8f6f28bc9acbc7affccdcd1bdfb6',
viewmodule: 'Sample',
viewname: 'IBIZCustomerUsr2PickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'2a63c4595d7b116f63e0960a2365bbfa',
],
},
{
viewtag: 'b038c48269316664e5b48380a879fd99',
viewmodule: 'Sample',
......
......@@ -100,6 +100,8 @@ export default class IBIZCustomerUIServiceBase extends UIService {
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'ibizcustomers',component:'ibizcustomer-pickup-grid-view'});
this.allViewMap.set('MPICKUPVIEW:',{viewname:'mpickupview',srfappde:'ibizcustomers',component:'ibizcustomer-mpickup-view'});
this.allViewMap.set(':',{viewname:'editview',srfappde:'ibizcustomers',component:'ibizcustomer-edit-view'});
this.allViewMap.set(':',{viewname:'usr2mpickupview',srfappde:'ibizcustomers',component:'ibizcustomer-usr2-mpickup-view'});
this.allViewMap.set(':',{viewname:'usr2pickupview',srfappde:'ibizcustomers',component:'ibizcustomer-usr2-pickup-view'});
this.allViewMap.set(':',{viewname:'usr2editview',srfappde:'ibizcustomers',component:'ibizcustomer-usr2-edit-view'});
this.allViewMap.set(':',{viewname:'usr2gridview',srfappde:'ibizcustomers',component:'ibizcustomer-usr2-grid-view'});
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'ibizcustomers',component:'ibizcustomer-pickup-view'});
......
......@@ -61,28 +61,43 @@ export default class InterFuncForm_2Model {
dataType: 'GUID',
},
{
name: 'author',
prop: 'author',
name: 'borrower',
prop: 'borrower',
dataType: 'TEXT',
},
{
name: 'formitem',
prop: 'borrowerid',
name: 'borrower1',
prop: 'borrower1',
dataType: 'TEXT',
},
{
name: 'formitem1',
prop: 'borrowerid',
name: 'borrower2',
prop: 'borrower2',
dataType: 'TEXT',
},
{
name: 'formitem2',
prop: 'borrowerid',
name: 'borrower3',
prop: 'borrower3',
dataType: 'TEXT',
},
{
name: 'borrower',
prop: 'borrower',
name: 'borrower1_id',
prop: 'borrower1_id',
dataType: 'TEXT',
},
{
name: 'borrower2_id',
prop: 'borrower2_id',
dataType: 'TEXT',
},
{
name: 'borrower3_id',
prop: 'borrower3_id',
dataType: 'TEXT',
},
{
name: 'borrowerid',
prop: 'borrowerid',
dataType: 'TEXT',
},
{
......
<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,Inject } from 'vue-property-decorator';
import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import { UIActionTool,Util,ViewTool } from '@/utils';
import NavDataService from '@/service/app/navdata-service';
import AppCenterService from "@service/app/app-center-service";
import IBIZCustomerService from '@/service/ibizcustomer/ibizcustomer-service';
import Usr2MPickupViewpickupviewpanelService from './usr2-mpickup-viewpickupviewpanel-pickupviewpanel-service';
import IBIZCustomerUIService from '@/uiservice/ibizcustomer/ibizcustomer-ui-service';
import Usr2MPickupViewpickupviewpanelModel from './usr2-mpickup-viewpickupviewpanel-pickupviewpanel-model';
@Component({
components: {
}
})
export default class Usr2MPickupViewpickupviewpanelBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public getControlType(): string {
return 'PICKUPVIEWPANEL'
}
/**
* 建构部件服务对象
*
* @type {Usr2MPickupViewpickupviewpanelService}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public service: Usr2MPickupViewpickupviewpanelService = new Usr2MPickupViewpickupviewpanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {IBIZCustomerService}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public appEntityService: IBIZCustomerService = new IBIZCustomerService({ $store: this.$store });
/**
* 转化数据
*
* @param {any} args
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public transformData(args: any) {
let _this: any = this;
if(_this.service && _this.service.handleRequestData instanceof Function && _this.service.handleRequestData('transform',_this.context,args)){
return _this.service.handleRequestData('transform',_this.context,args)['data'];
}
}
/**
* 关闭视图
*
* @param {any} args
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
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 Usr2MPickupViewpickupviewpanelBase
*/
@Prop() public selectedData?: string;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public getData(): any {
return {};
}
/**
* 视图名称
*
* @type {*}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public view: any = {
viewname: 'ibizcustomer-pickup-tree-view',
data: {},
}
/**
* 局部上下文
*
* @type {*}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localViewParam: any = null;
/**
* 视图数据
*
* @type {*}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
@Prop({default: true}) public isShowButton!: boolean;
/**
* 是否单选
*
* @type {boolean}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
@Prop() public isSingleSelect?: boolean;
/**
* 初始化完成
*
* @type {boolean}
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public inited: boolean = false;
/**
* 视图数据变化
*
* @param {*} $event
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public onViewDatasChange($event: any): void {
if($event.length>0){
$event.forEach((item:any,index:any) => {
let srfmajortext = item.srfmajortext?item.srfmajortext:item['ibizcustomername'];
if(srfmajortext){
Object.assign($event[index],{srfmajortext: srfmajortext});
}
});
}
this.$emit('selectionchange', $event);
}
/**
* 视图数据被激活
*
* @param {*} $event
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public viewDatasActivated($event: any): void {
this.$emit('activated', $event);
}
/**
* 视图加载完成
*
* @param {*} $event
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public onViewLoad($event: any): void {
this.$emit('load', $event);
}
/**
* vue 生命周期
*
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
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 Usr2MPickupViewpickupviewpanelBase
*/
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 Usr2MPickupViewpickupviewpanelBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof Usr2MPickupViewpickupviewpanelBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
</script>
<style lang='less'>
@import './usr2-mpickup-viewpickupviewpanel-pickupviewpanel.less';
</style>
\ No newline at end of file
/**
* Usr2MPickupViewpickupviewpanel 部件模型
*
* @export
* @class Usr2MPickupViewpickupviewpanelModel
*/
export default class Usr2MPickupViewpickupviewpanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Usr2MPickupViewpickupviewpanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'createman',
},
{
name: 'sn',
},
{
name: 'updatedate',
},
{
name: 'createdate',
},
{
name: 'customeruid',
},
{
name: 'ibizcustomer',
prop: 'ibizcustomerid',
},
{
name: 'address',
},
{
name: 'ibizcustomername',
},
{
name: 'updateman',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* Usr2MPickupViewpickupviewpanel 部件服务对象
*
* @export
* @class Usr2MPickupViewpickupviewpanelService
*/
export default class Usr2MPickupViewpickupviewpanelService extends ControlService {
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import Usr2MPickupViewpickupviewpanelBase from './usr2-mpickup-viewpickupviewpanel-pickupviewpanel-base.vue';
@Component({
components: {
}
})
export default class Usr2MPickupViewpickupviewpanel extends Usr2MPickupViewpickupviewpanelBase {
}
</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,Inject } from 'vue-property-decorator';
import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import { UIActionTool,Util,ViewTool } from '@/utils';
import NavDataService from '@/service/app/navdata-service';
import AppCenterService from "@service/app/app-center-service";
import IBIZCustomerService from '@/service/ibizcustomer/ibizcustomer-service';
import Usr2PickupViewpickupviewpanelService from './usr2-pickup-viewpickupviewpanel-pickupviewpanel-service';
import IBIZCustomerUIService from '@/uiservice/ibizcustomer/ibizcustomer-ui-service';
import Usr2PickupViewpickupviewpanelModel from './usr2-pickup-viewpickupviewpanel-pickupviewpanel-model';
@Component({
components: {
}
})
export default class Usr2PickupViewpickupviewpanelBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public getControlType(): string {
return 'PICKUPVIEWPANEL'
}
/**
* 建构部件服务对象
*
* @type {Usr2PickupViewpickupviewpanelService}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public service: Usr2PickupViewpickupviewpanelService = new Usr2PickupViewpickupviewpanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {IBIZCustomerService}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public appEntityService: IBIZCustomerService = new IBIZCustomerService({ $store: this.$store });
/**
* 转化数据
*
* @param {any} args
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public transformData(args: any) {
let _this: any = this;
if(_this.service && _this.service.handleRequestData instanceof Function && _this.service.handleRequestData('transform',_this.context,args)){
return _this.service.handleRequestData('transform',_this.context,args)['data'];
}
}
/**
* 关闭视图
*
* @param {any} args
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof Usr2PickupViewpickupviewpanelBase
*/
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 Usr2PickupViewpickupviewpanelBase
*/
@Prop() public selectedData?: string;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public getData(): any {
return {};
}
/**
* 视图名称
*
* @type {*}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public view: any = {
viewname: 'ibizcustomer-pickup-tree-view',
data: {},
}
/**
* 局部上下文
*
* @type {*}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localViewParam: any = null;
/**
* 视图数据
*
* @type {*}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
@Prop({default: true}) public isShowButton!: boolean;
/**
* 是否单选
*
* @type {boolean}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
@Prop() public isSingleSelect?: boolean;
/**
* 初始化完成
*
* @type {boolean}
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public inited: boolean = false;
/**
* 视图数据变化
*
* @param {*} $event
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public onViewDatasChange($event: any): void {
if($event.length>0){
$event.forEach((item:any,index:any) => {
let srfmajortext = item.srfmajortext?item.srfmajortext:item['ibizcustomername'];
if(srfmajortext){
Object.assign($event[index],{srfmajortext: srfmajortext});
}
});
}
this.$emit('selectionchange', $event);
}
/**
* 视图数据被激活
*
* @param {*} $event
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public viewDatasActivated($event: any): void {
this.$emit('activated', $event);
}
/**
* 视图加载完成
*
* @param {*} $event
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public onViewLoad($event: any): void {
this.$emit('load', $event);
}
/**
* vue 生命周期
*
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof Usr2PickupViewpickupviewpanelBase
*/
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 Usr2PickupViewpickupviewpanelBase
*/
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 Usr2PickupViewpickupviewpanelBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof Usr2PickupViewpickupviewpanelBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
</script>
<style lang='less'>
@import './usr2-pickup-viewpickupviewpanel-pickupviewpanel.less';
</style>
\ No newline at end of file
/**
* Usr2PickupViewpickupviewpanel 部件模型
*
* @export
* @class Usr2PickupViewpickupviewpanelModel
*/
export default class Usr2PickupViewpickupviewpanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Usr2PickupViewpickupviewpanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'createman',
},
{
name: 'sn',
},
{
name: 'updatedate',
},
{
name: 'createdate',
},
{
name: 'customeruid',
},
{
name: 'ibizcustomer',
prop: 'ibizcustomerid',
},
{
name: 'address',
},
{
name: 'ibizcustomername',
},
{
name: 'updateman',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* Usr2PickupViewpickupviewpanel 部件服务对象
*
* @export
* @class Usr2PickupViewpickupviewpanelService
*/
export default class Usr2PickupViewpickupviewpanelService extends ControlService {
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import Usr2PickupViewpickupviewpanelBase from './usr2-pickup-viewpickupviewpanel-pickupviewpanel-base.vue';
@Component({
components: {
}
})
export default class Usr2PickupViewpickupviewpanel extends Usr2PickupViewpickupviewpanelBase {
}
</script>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册