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

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

上级 0fb4ec4e
......@@ -235,6 +235,7 @@ export default {
menuitem62: "动态节点(实体)",
menuitem63: "右键操作",
menuitem110: "树表格",
menuitem111: "甘特图",
menuitem17: "向导面板",
menuitem134: "基础用法",
menuitem135: "状态属性",
......@@ -247,7 +248,6 @@ export default {
menuitem18: "界面行为",
menuitem65: "前端界面行为",
menuitem66: "后台界面行为",
menuitem111: "甘特图",
menuitem119: "分页视图",
menuitem120: "分页导航",
menuitem121: "多编辑视图",
......
......@@ -235,6 +235,7 @@ export default {
menuitem62: "动态节点(实体)",
menuitem63: "右键操作",
menuitem110: "树表格",
menuitem111: "甘特图",
menuitem17: "向导面板",
menuitem134: "基础用法",
menuitem135: "状态属性",
......@@ -247,7 +248,6 @@ export default {
menuitem18: "界面行为",
menuitem65: "前端界面行为",
menuitem66: "后台界面行为",
menuitem111: "甘特图",
menuitem119: "分页视图",
menuitem120: "分页导航",
menuitem121: "多编辑视图",
......
......@@ -1195,6 +1195,24 @@ mock.onGet('v7/main-menuappmenu').reply((config: any) => {
textcls: '',
appfunctag: 'AppFunc73',
resourcetag: '',
},
{
id: 'E5EAA3AF-BF88-496E-A1B1-31DAB9A4D309',
name: 'menuitem111',
text: '甘特图',
type: 'MENUITEM',
counterid: '',
tooltip: '甘特图',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc74',
resourcetag: '',
},
{
id: '95b2ccd6e3cdb5965ac67f44e89a3c02',
......@@ -1417,24 +1435,6 @@ mock.onGet('v7/main-menuappmenu').reply((config: any) => {
resourcetag: '',
},
],
},
{
id: 'E5EAA3AF-BF88-496E-A1B1-31DAB9A4D309',
name: 'menuitem111',
text: '甘特图',
type: 'MENUITEM',
counterid: '',
tooltip: '甘特图',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
},
{
id: 'CC40A1B2-FAD2-4EC7-9234-0EDB32E81908',
......
<template>
<div class="view-container deganttview ibizorder-gantt-view">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizorderganttview"></app-studioaction>
<card class='view-card view-no-toolbar' :disHover="true" :padding="0" :bordered="false">
<div slot='title' class="header-container">
<span class='caption-info'>{{$t(model.srfCaption)}}</span>
</div>
<div class='view-top-messages'>
</div>
<div class="content-container">
<div class='view-body-messages'>
</div>
<view_gantt
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
name="gantt"
ref='gantt'
@closeview="closeView($event)">
</view_gantt>
</div>
<div class='view-bottom-messages'>
</div>
</card>
</div>
</template>
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch,Inject } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils';
import NavDataService from '@/service/app/navdata-service';
import { Subject,Subscription } from 'rxjs';
import IBIZOrderService from '@/service/ibizorder/ibizorder-service';
import IBIZOrderAuthService from '@/authservice/ibizorder/ibizorder-auth-service';
import IBIZOrderUIService from '@/uiservice/ibizorder/ibizorder-ui-service';
@Component({
components: {
},
})
export default class IBIZOrderGanttViewBase extends Vue {
/**
* 实体服务对象
*
* @type {IBIZOrderService}
* @memberof IBIZOrderGanttViewBase
*/
public appEntityService: IBIZOrderService = new IBIZOrderService;
/**
* 实体UI服务对象
*
* @type IBIZOrderUIService
* @memberof IBIZOrderGanttViewBase
*/
public appUIService: IBIZOrderUIService = new IBIZOrderUIService(this.$store);
/**
* 数据变化
*
* @param {*} val
* @returns {*}
* @memberof IBIZOrderGanttViewBase
*/
@Emit()
public viewDatasChange(val: any):any {
return val;
}
/**
* 传入视图上下文
*
* @type {string}
* @memberof IBIZOrderGanttViewBase
*/
@Prop() public viewdata!: string;
/**
* 传入视图参数
*
* @type {string}
* @memberof IBIZOrderGanttViewBase
*/
@Prop() public viewparam!: string;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof IBIZOrderGanttViewBase
*/
@Prop({ default: true }) public viewDefaultUsage!: boolean;
/**
* 视图默认使用
*
* @type {string}
* @memberof IBIZOrderGanttViewBase
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 视图标识
*
* @type {string}
* @memberof IBIZOrderGanttViewBase
*/
public viewtag: string = '3077eef0d4b96e220a02f795ffb545fc';
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof IBIZOrderGanttViewBase
*/
public customViewNavContexts:any ={
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof IBIZOrderGanttViewBase
*/
public customViewParams:any ={
};
/**
* 视图模型数据
*
* @type {*}
* @memberof IBIZOrderGanttViewBase
*/
public model: any = {
srfCaption: 'entities.ibizorder.views.ganttview.caption',
srfTitle: 'entities.ibizorder.views.ganttview.title',
srfSubTitle: 'entities.ibizorder.views.ganttview.subtitle',
dataInfo: ''
}
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof IBIZOrderGanttViewBase
*/
@Watch('viewparam',{immediate: true, deep: true})
onParamData(newVal: any, oldVal: any) {
if(newVal){
this.viewparams = {};
if(typeof newVal == 'string') {
Object.assign(this.viewparams, JSON.parse(this.viewparam));
}else{
this.viewparams = Util.deepCopy(this.viewparam);
}
}
}
/**
* 处理应用上下文变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof IBIZOrderGanttViewBase
*/
@Watch('viewdata')
onViewData(newVal: any, oldVal: any) {
const _this: any = this;
if (!Object.is(newVal, oldVal) && _this.engine) {
this.$nextTick(()=>{
_this.parseViewParam();
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh && _this.refresh instanceof Function) {
_this.refresh();
}
}
/**
* 容器模型
*
* @type {*}
* @memberof IBIZOrderGanttViewBase
*/
public containerModel: any = {
view_gantt: { name: 'gantt', type: 'GANTT' },
wflinks: [],
};
/**
* 视图刷新
*
* @param {*} args
* @memberof IBIZOrderGanttViewBase
*/
public refresh(args?: any): void {
const refs: any = this.$refs;
if (refs && refs.gantt) {
refs.gantt.refresh();
}
}
/**
* 计数器刷新
*
* @memberof IBIZOrderGanttViewBase
*/
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();
}
})
}
}
/**
* 视图状态订阅对象
*
* @public
* @type {Subject<{action: string, data: any}>}
* @memberof IBIZOrderGanttViewBase
*/
public viewState: Subject<ViewState> = new Subject();
/**
* 引擎初始化
*
* @public
* @memberof IBIZOrderGanttViewBase
*/
public engineInit(): void {
}
/**
* 应用导航服务
*
* @type {*}
* @memberof IBIZOrderGanttViewBase
*/
public navDataService = NavDataService.getInstance(this.$store);
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZOrderGanttViewBase
*/
public serviceStateEvent: Subscription | undefined;
/**
* 门户部件状态对象
*
* @type {*}
* @memberof IBIZOrderGanttViewBase
*/
@Prop() public portletState?: any;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZOrderGanttViewBase
*/
public portletStateEvent: Subscription | undefined;
/**
* 应用上下文
*
* @type {*}
* @memberof IBIZOrderGanttViewBase
*/
public context:any = {};
/**
* 视图参数
*
* @type {*}
* @memberof IBIZOrderGanttViewBase
*/
public viewparams:any = {};
/**
* 视图缓存数据
*
* @type {*}
* @memberof IBIZOrderGanttViewBase
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof IBIZOrderGanttViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
* @public
* @memberof IBIZOrderGanttViewBase
*/
public parseViewParam(inputvalue:any = null): void {
for(let key in this.context){
delete this.context[key];
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) {
if(typeof this.viewdata == 'string') {
Object.assign(this.context, JSON.parse(this.viewdata));
}
if(this.context && this.context.srfparentdename){
Object.assign(this.viewparams,{srfparentdename:this.context.srfparentdename});
}
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
this.handleCustomViewData();
return;
}
const path = (this.$route.matched[this.$route.matched.length - 1]).path;
const keys: Array<any> = [];
const curReg = this.$pathToRegExp.pathToRegexp(path, keys);
const matchArray = curReg.exec(this.$route.path);
let tempValue: Object = {};
keys.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item.name, {
enumerable: true,
value: matchArray[index + 1]
});
});
this.$viewTool.formatRouteParams(tempValue,this.$route,this.context,this.viewparams);
if(inputvalue){
Object.assign(this.context,{'ibizorder':inputvalue});
}
//初始化视图唯一标识
Object.assign(this.context,{srfsessionid:this.$util.createUUID()});
this.handleCustomViewData();
//初始化导航数据
this.initNavDataWithRoute();
}
/**
* 处理自定义视图数据
*
* @memberof IBIZOrderGanttViewBase
*/
public handleCustomViewData(){
if(Object.keys(this.customViewNavContexts).length > 0){
Object.keys(this.customViewNavContexts).forEach((item:any) =>{
let tempContext:any = {};
let curNavContext:any = this.customViewNavContexts[item];
this.handleCustomDataLogic(curNavContext,tempContext,item);
Object.assign(this.context,tempContext);
})
}
if(Object.keys(this.customViewParams).length > 0){
Object.keys(this.customViewParams).forEach((item:any) =>{
let tempParam:any = {};
let curNavParam:any = this.customViewParams[item];
this.handleCustomDataLogic(curNavParam,tempParam,item);
Object.assign(this.viewparams,tempParam);
})
}
}
/**
* 处理自定义视图数据逻辑
*
* @memberof IBIZOrderGanttViewBase
*/
public handleCustomDataLogic(curNavData:any,tempData:any,item:string){
// 直接值直接赋值
if(curNavData.isRawValue){
if(Object.is(curNavData.value,"null") || Object.is(curNavData.value,"")){
Object.defineProperty(tempData, item.toLowerCase(), {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item.toLowerCase(), {
value: curNavData.value,
writable : true,
enumerable : true,
configurable : true
});
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.context[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
if(this.viewparams[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.viewparams[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item.toLowerCase(), {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}
}
}
}
/**
* 初始化导航数据(路由模式)
*
* @memberof IBIZOrderGanttViewBase
*/
public initNavDataWithRoute(data:any = null, isNew:boolean = false, isAlways:boolean = false){
if( isAlways || (this.viewDefaultUsage && Object.is(this.navModel,"route")) ){
this.navDataService.addNavData({id:'ibizorder-gantt-view',tag:this.viewtag,srfkey:isNew ? null : this.context.ibizorder,title:this.$t(this.model.srfCaption),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
}
}
/**
* 初始化导航数据(分页模式)
*
* @memberof IBIZOrderGanttViewBase
*/
public initNavDataWithTab(data:any = null,isOnlyAdd:boolean = true, isAlways:boolean = false){
if( isAlways || (this.viewDefaultUsage && !Object.is(this.navModel,"route")) ){
this.navDataService.addNavDataByOnly({id:'ibizorder-gantt-view',tag:this.viewtag,srfkey:this.context.ibizorder,title:this.$t(this.model.srfCaption),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath},isOnlyAdd);
}
}
/**
* Vue声明周期
*
* @memberof IBIZOrderGanttViewBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof IBIZOrderGanttViewBase
*/
public afterCreated(){
let _this:any = this;
const secondtag = _this.$util.createUUID();
_this.$store.commit('viewaction/createdView', { viewtag: _this.viewtag, secondtag: secondtag });
_this.viewtag = secondtag;
_this.parseViewParam();
_this.serviceStateEvent = _this.navDataService.serviceState.subscribe(({ action,name, data }:{ action:string,name:any,data:any }) => {
if(!Object.is(name,'ibizorder-gantt-view')){
return;
}
if (Object.is(action, 'viewrefresh')) {
_this.$nextTick(()=>{
_this.parseViewParam(data);
if(_this.engine){
_this.engine.load();
}
});
}
});
if(_this.portletState){
_this.portletStateEvent = _this.portletState.subscribe((res:any) =>{
if(!Object.is(res.name,'IBIZOrderGanttView')){
return;
}
if(Object.is(res.action,'refresh') && _this.refresh && _this.refresh instanceof Function){
_this.refresh();
}
})
}
}
/**
* 销毁之前
*
* @memberof IBIZOrderGanttViewBase
*/
public beforeDestroy() {
this.$store.commit('viewaction/removeView', this.viewtag);
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof IBIZOrderGanttViewBase
*/
public mounted() {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof IBIZOrderGanttViewBase
*/
public afterMounted(){
const _this: any = this;
_this.engineInit();
if (_this.loadModel && _this.loadModel instanceof Function) {
_this.loadModel();
}
if(this.isLoadDefault){
this.viewState.next({ tag:'gantt', action: 'load', data: this.viewparams });
}
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof IBIZOrderGanttViewBase
*/
public closeView(args: any[]): void {
let _view: any = this;
if (_view.viewdata) {
_view.$emit('viewdataschange', [args]);
_view.$emit('close', [args]);
} else if (_view.$tabPageExp) {
_view.$tabPageExp.onClose(_view.$route.fullPath);
}
}
/**
* 销毁视图回调
*
* @memberof IBIZOrderGanttViewBase
*/
public destroyed(){
this.afterDestroyed();
}
/**
* 执行destroyed后的逻辑
*
* @memberof IBIZOrderGanttViewBase
*/
public afterDestroyed(){
if(this.viewDefaultUsage){
let localStoreLength = Object.keys(localStorage);
if(localStoreLength.length > 0){
localStoreLength.forEach((item:string) =>{
if(item.startsWith(this.context.srfsessionid)){
localStorage.removeItem(item);
}
})
}
if(Object.is(this.navModel,"tab")){
this.navDataService.removeNavDataByTag(this.viewtag);
}
if (this.serviceStateEvent) {
this.serviceStateEvent.unsubscribe();
}
}
// 销毁计数器定时器
if(this.counterServiceArray && this.counterServiceArray.length >0){
this.counterServiceArray.forEach((item:any) =>{
if(item.destroyCounter && item.destroyCounter instanceof Function){
item.destroyCounter();
}
})
}
if(this.portletStateEvent){
this.portletStateEvent.unsubscribe();
}
}
/**
* 视图默认加载
*
* @memberof IBIZOrderGanttViewBase
*/
public isLoadDefault:boolean = true;
}
</script>
<style lang='less'>
@import './ibizorder-gantt-view.less';
</style>
\ No newline at end of file
.ibizorder-gantt-view{
position: relative;
}
.ibizorder-gantt-view {
> .view-card > .ivu-card-body > .content-container > .gantt {
overflow: auto;
}
}
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import IBIZOrderGanttViewBase from './ibizorder-gantt-view-base.vue';
import view_gantt from '@widgets/ibizorder/gantt-tree-gantt/gantt-tree-gantt.vue';
@Component({
components: {
view_gantt,
},
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 IBIZOrderGanttView extends IBIZOrderGanttViewBase {
}
</script>
\ No newline at end of file
......@@ -127,6 +127,7 @@ export const PageComponents = {
Vue.component('ibizorder-sf6-grid-view', () => import('@pages/sample/ibizorder-sf6-grid-view/ibizorder-sf6-grid-view.vue'));
Vue.component('ibizorder-detail-edit-view', () => import('@pages/sample/ibizorder-detail-edit-view/ibizorder-detail-edit-view.vue'));
Vue.component('ibizbookusr8-grid-view', () => import('@pages/sample/ibizbookusr8-grid-view/ibizbookusr8-grid-view.vue'));
Vue.component('ibizorder-gantt-view', () => import('@pages/sample/ibizorder-gantt-view/ibizorder-gantt-view.vue'));
Vue.component('ibizbookusr2-data-view', () => import('@pages/sample/ibizbookusr2-data-view/ibizbookusr2-data-view.vue'));
Vue.component('ibizappviewlist-view', () => import('@pages/sample/ibizappviewlist-view/ibizappviewlist-view.vue'));
Vue.component('ibizbooklist-view', () => import('@pages/sample/ibizbooklist-view/ibizbooklist-view.vue'));
......
......@@ -2038,6 +2038,20 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizbookusr8-grid-view/ibizbookusr8-grid-view.vue'),
},
{
path: 'ibizorders/:ibizorder?/ganttview/:ganttview?',
meta: {
caption: 'entities.ibizorder.views.ganttview.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibizorders', parameterName: 'ibizorder' },
{ pathName: 'ganttview', parameterName: 'ganttview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizorder-gantt-view/ibizorder-gantt-view.vue'),
},
{
path: 'ibizbooks/:ibizbook?/usr2dataview/:usr2dataview?',
meta: {
......@@ -3437,6 +3451,19 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizbookgroup-by-codelist-kan-ban-view/ibizbookgroup-by-codelist-kan-ban-view.vue'),
},
{
path: '/ibizorders/:ibizorder?/ganttview/:ganttview?',
meta: {
caption: 'entities.ibizorder.views.ganttview.caption',
info:'',
parameters: [
{ pathName: 'ibizorders', parameterName: 'ibizorder' },
{ pathName: 'ganttview', parameterName: 'ganttview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizorder-gantt-view/ibizorder-gantt-view.vue'),
},
{
path: '/ibizbooks/:ibizbook?/usr5dataview/:usr5dataview?',
meta: {
......
......@@ -269,6 +269,7 @@ export const viewstate: any = {
'17c2991a0bd88cfd2bd6f8651537450b',
'13ed6c02918e612bac45715a6f300f2f',
'9c8e1b12e5e55164c2ec0e5617e1574b',
'3077eef0d4b96e220a02f795ffb545fc',
'e9b54ef29b192ecd2da05ff9570eb4d5',
'b038c48269316664e5b48380a879fd99',
'd9bd3192a20de0815bed3fd3d79d0cb1',
......@@ -469,6 +470,15 @@ export const viewstate: any = {
'b3429ecc4d89a02bc5f5279f1bd7f620',
],
},
{
viewtag: '3077eef0d4b96e220a02f795ffb545fc',
viewmodule: 'Sample',
viewname: 'IBIZOrderGanttView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '323ab2f980880093a8f5fbaf3e0965a0',
viewmodule: 'Sample',
......
......@@ -587,6 +587,9 @@ export default class MainMenuBase extends Vue implements ControlInterface {
case 'AppFunc25':
this.clickAppFunc25(item);
return;
case 'AppFunc74':
this.clickAppFunc74(item);
return;
case 'AppFunc72':
this.clickAppFunc72(item);
return;
......@@ -1413,6 +1416,29 @@ export default class MainMenuBase extends Vue implements ControlInterface {
})
}
/**
* 甘特图
*
* @param {*} [item={}]
* @memberof MainMenu
*/
public clickAppFunc74(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizorders', parameterName: 'ibizorder' },
{ pathName: 'ganttview', parameterName: 'ganttview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
this.$router.push(path);
})
}
/**
* 图书日历自定义插件
*
......
......@@ -1264,6 +1264,25 @@ export default class MainMenuModel {
appfunctag: 'AppFunc73',
resourcetag: '',
authtag:'Web-MainMenu-menuitem110',
},
{
id: 'E5EAA3AF-BF88-496E-A1B1-31DAB9A4D309',
name: 'menuitem111',
text: '甘特图',
type: 'MENUITEM',
counterid: '',
tooltip: '甘特图',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc74',
resourcetag: '',
authtag:'Web-MainMenu-menuitem111',
},
{
id: '95b2ccd6e3cdb5965ac67f44e89a3c02',
......@@ -1498,25 +1517,6 @@ export default class MainMenuModel {
authtag:'Web-MainMenu-menuitem66',
},
],
},
{
id: 'E5EAA3AF-BF88-496E-A1B1-31DAB9A4D309',
name: 'menuitem111',
text: '甘特图',
type: 'MENUITEM',
counterid: '',
tooltip: '甘特图',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
authtag:'Web-MainMenu-menuitem111',
},
{
id: 'CC40A1B2-FAD2-4EC7-9234-0EDB32E81908',
......
<template>
<div class="app-gantt">
<gantt-elastic v-if="tasks.length >0" :class="ganttClass" :tasks="tasks" :options="getOptions(this.locale)" :dynamic-style="dynamicStyle" @taskList-item-dblclick="taskClick" @task-item-expand="taskItemExpand">
</gantt-elastic>
<div v-else class="app-data-empty">{{$t('entities.ibizorder.gantttree_gantt.nodata')}}</div>
</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 IBIZOrderService from '@/service/ibizorder/ibizorder-service';
import GanttTreeService from './gantt-tree-gantt-service';
import IBIZOrderUIService from '@/uiservice/ibizorder/ibizorder-ui-service';
import GanttElastic from "ibiz-gantt-elastic/src/GanttElastic.vue";
@Component({
components: {
GanttElastic,
}
})
export default class GanttTreeBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof GanttTreeBase
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof GanttTreeBase
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof GanttTreeBase
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof GanttTreeBase
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof GanttTreeBase
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof GanttTreeBase
*/
public getControlType(): string {
return 'GANTT'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof GanttTreeBase
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {GanttTreeService}
* @memberof GanttTreeBase
*/
public service: GanttTreeService = new GanttTreeService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {IBIZOrderService}
* @memberof GanttTreeBase
*/
public appEntityService: IBIZOrderService = new IBIZOrderService({ $store: this.$store });
/**
* 转化数据
*
* @param {any} args
* @memberof GanttTreeBase
*/
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 GanttTreeBase
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof GanttTreeBase
*/
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 {boolean}
* @memberof GanttTreeBase
*/
@Prop({ default: true }) public showBusyIndicator?: boolean;
/**
* 部件行为--load
*
* @type {string}
* @memberof GanttTreeBase
*/
@Prop() public loadAction!: string;
/**
* 部件样式名
*
* @public
* @type {any[]}
* @memberof GanttTreeBase
*/
public ganttClass: string = "gantt";
/**
* 语言
*
* @public
* @type {string}
* @memberof GanttTreeBase
*/
public locale: string = 'zh-CN';
/**
* 语言资源
*
* @public
* @type {any[]}
* @memberof GanttTreeBase
*/
public localeZH: any = {
weekdays: ['星期一','星期二','星期三','星期四','星期五','星期六','星期日'],
months: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
Now: "现在",
"X-Scale": "时间颗粒度",
"Display task list": "显示列表",
"Before/After": "数据范围"
}
/**
* 配置参数
*
* @public
* @type {any[]}
* @memberof GanttTreeBase
*/
public options: any = {
isflex: true,
maxRows: 1000,
dataType: 'treegrid',
title: {
label: ""
},
header: {
yScole: false,
taskListWidth: false,
},
calendar: {
hour: {
display: false
}
},
chart: {
progress: {
bar: false
},
expander: {
display: true
},
},
taskList: {
expander: {
straight: false
},
labelField: 'text',
columns: [
{
label: '名称',
value: 'name',
render: (task: any) => {
return this.getColumnValue(task, 'name')
},
width: 280,
},
{
label: '标识',
value: 'datakey',
render: (task: any) => {
return this.getColumnValue(task, 'datakey')
},
width: 280,
},
{
label: '更新日期',
value: 'updatedate',
render: (task: any) => {
return this.getColumnValue(task, 'updatedate')
},
width: 280,
},
]
}
};
/**
* 样式
*
* @public
* @type {any[]}
* @memberof GanttTreeBase
*/
public dynamicStyle: any = {};
/**
* 日程事件集合
*
* @public
* @type {any[]}
* @memberof GanttTreeBase
*/
public tasks: any[] = [];
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof GanttTreeBase
*/
public appStateEvent: Subscription | undefined;
/**
* 监听语言变化
*
* @public
* @memberof GanttTreeBase
*/
@Watch('$i18n.locale')
public onLocaleChange(newval: any, val: any) {
this.locale = newval;
}
/**
* 获取列属性值
*
* @public
* @memberof GanttTreeBase
*/
public getColumnValue(task: any, field: string) {
if(Object.is(task.id.split(';')[0], 'orderData')) {
return task[field];
}
if(Object.is(task.id.split(';')[0], 'orderDetailData')) {
return task[field];
}
if(Object.is(task.id.split(';')[0], 'ROOT')) {
return task[field];
}
}
/**
* 获取代码项
*
* @public
* @memberof GanttTreeBase
*/
public getCodeListItem(codelist: any, val: any) {
for(let i = 0; i < codelist.items.length; i++) {
if(Object.is(codelist.items[i].value, val)) {
return codelist.items[i].text;
}
}
return codelist.emptytext;
}
/**
* 获取部件参数
*
* @returns {any}
* @memberof GanttTreeBase
*/
public getOptions() {
if(Object.is(this.locale, 'zh-CN')) {
return { locale: this.localeZH, ...this.options };
}
return this.options;
}
/**
* 搜索获取日程事件
*
* @param {*} $event 日期信息
* @memberof GanttTreeBase
*/
public load(task: any = {}) {
const params: any = {
srfnodeid: task && task.id ? task.id : "#",
srfnodefilter: ''
};
let tempViewParams:any = JSON.parse(JSON.stringify(this.viewparams));
let curNode:any = {};
Util.deepObjectMerge(curNode, task);
let tempContext:any = this.computecurNodeContext(curNode);
if(curNode && curNode.srfparentdename) {
Object.assign(tempContext,{ srfparentdename: curNode.srfparentdename });
Object.assign(tempViewParams,{ srfparentdename: curNode.srfparentdename });
}
if(curNode && curNode.srfparentkey) {
Object.assign(tempContext,{ srfparentkey: curNode.srfparentkey });
Object.assign(tempViewParams,{ srfparentkey: curNode.srfparentkey });
}
Object.assign(params,{viewparams:tempViewParams});
this.service.getNodes(tempContext,params).then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
return;
}
this.tasks = [...this.tasks, ...response.data];
response.data.forEach((item: any) => {
if(!item.collapsed) {
this.load(item);
}
})
this.$emit("load", this.tasks);
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
});
}
/**
* 计算当前节点的上下文
*
* @param {*} curNode 当前节点
* @memberof GanttTreeBase
*/
public computecurNodeContext(curNode:any){
let tempContext:any = {};
if(curNode && curNode.data && curNode.data.srfappctx){
tempContext = JSON.parse(JSON.stringify(curNode.data.srfappctx));
}else{
tempContext = JSON.parse(JSON.stringify(this.context));
}
return tempContext;
}
/**
* 节点展开
*
* @param {*} task 当前节点
* @memberof GanttTreeBase
*/
public taskItemExpand(task: any) {
if(!task.collapsed) {
let index: number = this.tasks.findIndex((item: any) => Object.is(task.id, item.parentId));
if(index < 0) {
this.load(task);
}
}
}
/**
* 刷新
*
* @memberof GanttTreeBase
*/
public refresh(args?: any) {
this.load();
}
/**
* 选中的数据
*
* @returns {any[]}
* @memberof GanttTreeBase
*/
public selections: any[] = [];
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof GanttTreeBase
*/
public getDatas(): any[] {
return this.selections;
}
/**
* 获取单项树
*
* @returns {*}
* @memberof GanttTreeBase
*/
public getData(): any {
return null;
}
/**
* vue 生命周期
*
* @returns
* @memberof GanttTreeBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof GanttTreeBase
*/
public afterCreated() {
this.locale = this.$i18n.locale;
if(AppCenterService && AppCenterService.getMessageCenter()){
this.appStateEvent = AppCenterService.getMessageCenter().subscribe(({ name, action, data }) =>{
if(!Object.is(name,"IBIZOrder")){
return;
}
if(Object.is(action,'appRefresh')){
this.refresh();
}
})
}
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.load(data);
}
});
}
/**
* 点击事件
*
* @returns
* @memberof GanttTreeBase
*/
public taskClick({event, data}: {event: any, data: any}) {
const _this: any = this;
let key: string = data.id.split(';')[0];
if(_this[key + '_opendata'] instanceof Function) {
_this[key + '_opendata']([data]);
}
}
/**
* vue 生命周期
*
* @memberof GanttTreeBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof GanttTreeBase
*/
public afterDestroy() {
if(this.appStateEvent){
this.appStateEvent.unsubscribe();
}
if(this.viewStateEvent){
this.viewStateEvent.unsubscribe();
}
}
}
</script>
<style lang='less'>
@import './gantt-tree-gantt.less';
</style>
\ No newline at end of file
/**
* GanttTree 部件模型
*
* @export
* @class GanttTreeModel
*/
export default class GanttTreeModel {
/**
* 日历项类型
*
* @returns {any[]}
* @memberof GanttTreeGanttMode
*/
public itemType: string = "";
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof GanttTreeGanttMode
*/
public getDataItems(): any[] {
let dataItems: any = [
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'style',
},
{
name: 'textColor',
},
{
name: 'itemType',
},
{
name: 'parentId'
},
{
name: 'query',
prop: 'query',
},
];
switch(this.itemType){
case "orderData":
dataItems = [...dataItems,
{
name: 'id',
prop: 'ibizorderid'
},
{
name: 'datakey',
prop: 'orderuid'
},
{
name: 'name',
prop: 'ibizordername'
},
{
name: 'updatedate',
prop: 'updatedate'
},
];
break;
case "orderDetailData":
dataItems = [...dataItems,
{
name: 'id',
prop: 'ibizorderdetailid'
},
{
name: 'updatedate',
prop: 'updatedate'
},
{
name: 'name',
prop: 'ibizorderdetailname'
},
{
name: 'datakey',
prop: 'ibizorderdetailid'
},
];
break;
}
return dataItems;
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import IBIZOrderService from '@/service/ibizorder/ibizorder-service';
import GanttTreeModel from './gantt-tree-gantt-model';
import CodeListService from "@/codelist/codelist-service";
import i18n from '@/locale';
import IBIZOrderDetailService from '@service/ibizorder-detail/ibizorder-detail-service';
/**
* GanttTree 部件服务对象
*
* @export
* @class GanttTreeService
*/
export default class GanttTreeService extends ControlService {
/**
* 订单服务对象
*
* @type {IBIZOrderService}
* @memberof GanttTreeService
*/
public appEntityService: IBIZOrderService = new IBIZOrderService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof GanttTreeService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of GanttTreeService.
*
* @param {*} [opts={}]
* @memberof GanttTreeService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new GanttTreeModel();
}
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof GanttTreeService
*/
public codeListService:CodeListService = new CodeListService({ $store: this.getStore() });
/**
* 订单明细服务对象
*
* @type {IBIZOrderDetailService}
* @memberof GanttTreeService
*/
public ibizorderdetailService: IBIZOrderDetailService = new IBIZOrderDetailService({ $store: this.getStore() });
/**
* 节点分隔符号
*
* @public
* @type {string}
* @memberof GanttTreeService
*/
public TREENODE_SEPARATOR: string = ';';
/**
* 订单数据节点分隔符号
*
* @public
* @type {string}
* @memberof GanttTreeService
*/
public TREENODE_ORDERDATA: string = 'orderData';
/**
* 订单明细数据节点分隔符号
*
* @public
* @type {string}
* @memberof GanttTreeService
*/
public TREENODE_ORDERDETAILDATA: string = 'orderDetailData';
/**
* 默认根节点节点分隔符号
*
* @public
* @type {string}
* @memberof GanttTreeService
*/
public TREENODE_ROOT: string = 'ROOT';
/**
* 商品类别节点分隔符号
*
* @public
* @type {*}
* @memberof GanttTreeService
*/
public dataModel: any = {
orderData: {
datakey: {
prop: 'orderuid',
default: null
},
name: {
prop: 'ibizordername',
default: null
},
updatedate: {
prop: 'updatedate',
default: null
},
},
orderDetailData: {
updatedate: {
prop: 'updatedate',
default: null
},
name: {
prop: 'ibizorderdetailname',
default: null
},
datakey: {
prop: 'ibizorderdetailid',
default: null
},
},
ROOT: {
},
}
/**
* 获取节点数据
*
* @param {string} action
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof GanttTreeService
*/
@Errorlog
public async getNodes(context:any = {},data: any = {}, isloading?: boolean): Promise<any> {
let { srfparentkey, srfcat, srfnodeid, srfnodefilter, query }: { srfparentkey: string, srfcat: string, srfnodeid: string, srfnodefilter: string, query:string } = data;
srfnodefilter = query ? query : srfnodefilter;
let list: any[] = [];
let filter: any = {};
let srfotherkey: string = '';
if (!srfnodeid || Object.is(srfnodeid, '#')) {
srfnodeid = this.TREENODE_ROOT;
} else {
srfotherkey = srfnodeid;
srfnodeid = srfnodeid.split('_#_')[0];
}
let strTreeNodeId: string = srfnodeid;
let strRealNodeId: string = '';
let bRootSelect: boolean = false;
let strNodeType: string | null = null;
let strRootSelectNode: string = '';
if (Object.is(strTreeNodeId, this.TREENODE_ROOT)) {
strNodeType = this.TREENODE_ROOT;
if (srfparentkey) {
strRealNodeId = srfparentkey;
}
} else {
let nPos = strTreeNodeId.indexOf(this.TREENODE_SEPARATOR);
if (nPos === -1) {
return Promise.reject({ status: 500, data: { title: '失败', message: `树节点${strTreeNodeId}标识无效` } });
}
strNodeType = strTreeNodeId.substring(0, nPos);
strRealNodeId = strTreeNodeId.substring(nPos + 1);
}
Object.assign(filter,
{
srfparentkey: srfparentkey,
srfcat: srfcat,
srfnodefilter: srfnodefilter,
strRealNodeId: strRealNodeId,
srfnodeid: srfnodeid,
srfotherkey: srfotherkey,
strNodeType: strNodeType,
viewparams: JSON.parse(JSON.stringify(data)).viewparams
}
);
// 分解节点标识
let nodeid: string[] = strRealNodeId.split(this.TREENODE_SEPARATOR);
for (let i = 0; i < nodeid.length; i++) {
switch (i) {
case 0:
Object.assign(filter, { nodeid: nodeid[0] });
break;
case 1:
Object.assign(filter, { nodeid2: nodeid[1] });
break;
case 2:
Object.assign(filter, { nodeid3: nodeid[2] });
break;
case 3:
Object.assign(filter, { nodeid4: nodeid[3] });
break;
default:
break;
}
}
if (Object.is(strNodeType, this.TREENODE_ORDERDATA)) {
await this.fillOrderdataNodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
if (Object.is(strNodeType, this.TREENODE_ORDERDETAILDATA)) {
await this.fillOrderdetaildataNodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
if (Object.is(strNodeType, this.TREENODE_ROOT)) {
await this.fillRootNodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
return Promise.resolve({ status: 500, data: { title: '失败', message: `树节点${strTreeNodeId}标识无效` } });
}
/**
* 填充 树视图节点[订单数据]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof GanttTreeService
*/
@Errorlog
public fillOrderdataNodes(context:any={},filter: any, list: any[],rsNavContext?:any,rsNavParams?:any,rsParams?:any): Promise<any> {
context = this.handleResNavContext(context,filter,rsNavContext);
filter = this.handleResNavParams(context,filter,rsNavParams,rsParams);
return new Promise((resolve:any,reject:any) =>{
let searchFilter: any = {};
Object.assign(searchFilter, { total: false });
let bFirst: boolean = true;
let records: any[] = [];
try {
this.searchOrderdata(context, searchFilter, filter).then((records:any) =>{
if(records && records.length >0){
records.forEach((entity: any) => {
let treeNode: any = {};
// 整理context
let strId: string = entity.ibizorderid;
let strText: string = entity.ibizordername;
Object.assign(treeNode,{srfparentdename:'IBIZOrder',srfparentkey:entity.ibizorderid});
let tempContext:any = JSON.parse(JSON.stringify(context));
Object.assign(tempContext,{srfparentdename:'IBIZOrder',srfparentkey:entity.ibizorderid,ibizorder:strId})
Object.assign(treeNode,{srfappctx:tempContext});
Object.assign(treeNode,{'ibizorder':strId});
Object.assign(treeNode, { srfkey: strId });
Object.assign(treeNode, { text: strText, srfmajortext: strText });
let strNodeId: string = 'orderData';
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += strId;
Object.assign(treeNode, { id: strNodeId + '_#_' + filter.srfnodeid });
Object.assign(treeNode, { collapsed: true });
Object.assign(treeNode, { leaf: false });
Object.assign(treeNode, { navparams: '{}' });
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
if(!Object.is(filter.srfnodeid, this.TREENODE_ROOT)) {
Object.assign(treeNode, { parentId: filter.srfotherkey });
}
for(let key in this.dataModel.orderData) {
let item = this.dataModel.orderData[key];
let propVal: any = entity[item.prop];
try {
let def: any = JSON.parse(item.default);
propVal = propVal != null ? propVal : def.value;
if (def.hasOwnProperty('bkcolor')) {
Object.assign(treeNode.style, { base: { fill: def.bkcolor, stroke: def.bkcolor }});
}
if (def.hasOwnProperty('color')) {
Object.assign(treeNode.style, { text: { color: def.color }});
}
} catch(e) {
propVal = propVal != null ? propVal : item.default
}
treeNode[key] = propVal
}
list.push(treeNode);
resolve(list);
bFirst = false;
});
}else{
resolve(list);
}
});
} catch (error) {
console.error(error);
}
});
}
/**
* 获取查询集合
*
* @public
* @param {any{}} context
* @param {*} searchFilter
* @param {*} filter
* @returns {any[]}
* @memberof TestEnetityDatasService
*/
@Errorlog
public searchOrderdata(context:any={}, searchFilter: any, filter: any): Promise<any> {
return new Promise((resolve:any,reject:any) =>{
if(filter.viewparams){
Object.assign(searchFilter,filter.viewparams);
}
if(!searchFilter.page){
Object.assign(searchFilter,{page:0});
}
if(!searchFilter.size){
Object.assign(searchFilter,{size:1000});
}
if(context && context.srfparentdename){
Object.assign(searchFilter,{srfparentdename:JSON.parse(JSON.stringify(context)).srfparentdename});
}
if(context && context.srfparentkey){
Object.assign(searchFilter,{srfparentkey:JSON.parse(JSON.stringify(context)).srfparentkey});
}
const _appEntityService: any = this.appEntityService;
let list: any[] = [];
if (_appEntityService['FetchDefault'] && _appEntityService['FetchDefault'] instanceof Function) {
const response: Promise<any> = _appEntityService['FetchDefault'](context, searchFilter, false);
response.then((response: any) => {
if (!response.status || response.status !== 200) {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询FetchDefault数据集异常!');
}
const data: any = response.data;
if (Object.keys(data).length > 0) {
list = JSON.parse(JSON.stringify(data));
resolve(list);
} else {
resolve([]);
}
}).catch((response: any) => {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询FetchDefault数据集异常!');
});
}
})
}
/**
* 填充 树视图节点[订单数据]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof GanttTreeService
*/
@Errorlog
public async fillOrderdataNodeChilds(context:any={}, filter: any, list: any[]): Promise<any> {
if (filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")) {
// 填充订单明细数据
let OrderdetaildataRsNavContext:any = {};
let OrderdetaildataRsNavParams:any = {};
let OrderdetaildataRsParams:any = {};
await this.fillOrderdetaildataNodes(context, filter, list ,OrderdetaildataRsNavContext,OrderdetaildataRsNavParams,OrderdetaildataRsParams);
} else {
// 填充订单明细数据
let OrderdetaildataRsNavContext:any = {};
let OrderdetaildataRsNavParams:any = {};
let OrderdetaildataRsParams:any = {};
await this.fillOrderdetaildataNodes(context, filter, list ,OrderdetaildataRsNavContext,OrderdetaildataRsNavParams,OrderdetaildataRsParams);
}
}
/**
* 填充 树视图节点[订单明细数据]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof GanttTreeService
*/
@Errorlog
public fillOrderdetaildataNodes(context:any={},filter: any, list: any[],rsNavContext?:any,rsNavParams?:any,rsParams?:any): Promise<any> {
context = this.handleResNavContext(context,filter,rsNavContext);
filter = this.handleResNavParams(context,filter,rsNavParams,rsParams);
return new Promise((resolve:any,reject:any) =>{
let searchFilter: any = {};
if (Object.is(filter.strNodeType, this.TREENODE_ORDERDATA)) {
Object.assign(searchFilter, { n_ibizorderid_eq: filter.nodeid });
}
Object.assign(searchFilter, { total: false });
let bFirst: boolean = true;
let records: any[] = [];
try {
this.searchOrderdetaildata(context, searchFilter, filter).then((records:any) =>{
if(records && records.length >0){
records.forEach((entity: any) => {
let treeNode: any = {};
// 整理context
let strId: string = entity.ibizorderdetailid;
let strText: string = entity.ibizorderdetailname;
Object.assign(treeNode,{srfparentdename:'IBIZOrderDetail',srfparentkey:entity.ibizorderdetailid});
let tempContext:any = JSON.parse(JSON.stringify(context));
Object.assign(tempContext,{srfparentdename:'IBIZOrderDetail',srfparentkey:entity.ibizorderdetailid,ibizorderdetail:strId})
Object.assign(treeNode,{srfappctx:tempContext});
Object.assign(treeNode,{'ibizorderdetail':strId});
Object.assign(treeNode, { srfkey: strId });
Object.assign(treeNode, { text: strText, srfmajortext: strText });
let strNodeId: string = 'orderDetailData';
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += strId;
Object.assign(treeNode, { id: strNodeId + '_#_' + filter.srfnodeid });
Object.assign(treeNode, { collapsed: true });
Object.assign(treeNode, { leaf: true });
Object.assign(treeNode, { navparams: '{}' });
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
if(!Object.is(filter.srfnodeid, this.TREENODE_ROOT)) {
Object.assign(treeNode, { parentId: filter.srfotherkey });
}
for(let key in this.dataModel.orderDetailData) {
let item = this.dataModel.orderDetailData[key];
let propVal: any = entity[item.prop];
try {
let def: any = JSON.parse(item.default);
propVal = propVal != null ? propVal : def.value;
if (def.hasOwnProperty('bkcolor')) {
Object.assign(treeNode.style, { base: { fill: def.bkcolor, stroke: def.bkcolor }});
}
if (def.hasOwnProperty('color')) {
Object.assign(treeNode.style, { text: { color: def.color }});
}
} catch(e) {
propVal = propVal != null ? propVal : item.default
}
treeNode[key] = propVal
}
list.push(treeNode);
resolve(list);
bFirst = false;
});
}else{
resolve(list);
}
});
} catch (error) {
console.error(error);
}
});
}
/**
* 获取查询集合
*
* @public
* @param {any{}} context
* @param {*} searchFilter
* @param {*} filter
* @returns {any[]}
* @memberof TestEnetityDatasService
*/
@Errorlog
public searchOrderdetaildata(context:any={}, searchFilter: any, filter: any): Promise<any> {
return new Promise((resolve:any,reject:any) =>{
if(filter.viewparams){
Object.assign(searchFilter,filter.viewparams);
}
if(!searchFilter.page){
Object.assign(searchFilter,{page:0});
}
if(!searchFilter.size){
Object.assign(searchFilter,{size:1000});
}
if(context && context.srfparentdename){
Object.assign(searchFilter,{srfparentdename:JSON.parse(JSON.stringify(context)).srfparentdename});
}
if(context && context.srfparentkey){
Object.assign(searchFilter,{srfparentkey:JSON.parse(JSON.stringify(context)).srfparentkey});
}
const _appEntityService: any = this.ibizorderdetailService;
let list: any[] = [];
if (_appEntityService['FetchDefault'] && _appEntityService['FetchDefault'] instanceof Function) {
const response: Promise<any> = _appEntityService['FetchDefault'](context, searchFilter, false);
response.then((response: any) => {
if (!response.status || response.status !== 200) {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询FetchDefault数据集异常!');
}
const data: any = response.data;
if (Object.keys(data).length > 0) {
list = JSON.parse(JSON.stringify(data));
resolve(list);
} else {
resolve([]);
}
}).catch((response: any) => {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询FetchDefault数据集异常!');
});
}
})
}
/**
* 填充 树视图节点[订单明细数据]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof GanttTreeService
*/
@Errorlog
public async fillOrderdetaildataNodeChilds(context:any={}, filter: any, list: any[]): Promise<any> {
if (filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")) {
} else {
}
}
/**
* 填充 树视图节点[默认根节点]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof GanttTreeService
*/
@Errorlog
public fillRootNodes(context:any={},filter: any, list: any[],rsNavContext?:any,rsNavParams?:any,rsParams?:any): Promise<any> {
context = this.handleResNavContext(context,filter,rsNavContext);
filter = this.handleResNavParams(context,filter,rsNavParams,rsParams);
return new Promise((resolve:any,reject:any) =>{
let treeNode: any = {};
Object.assign(treeNode, { text: 'entities.ibizorder.gantttree_gantt.nodes.root' });
Object.assign(treeNode, { isUseLangRes: true });
Object.assign(treeNode,{srfappctx:context});
Object.assign(treeNode, { srfmajortext: treeNode.text });
let strNodeId: string = 'ROOT';
Object.assign(treeNode, { srfkey: 'root' });
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += 'root';
Object.assign(treeNode, { id: strNodeId + '_#_' + filter.srfnodeid });
Object.assign(treeNode, { collapsed: true });
Object.assign(treeNode, { leaf: false });
Object.assign(treeNode, { navparams: '{}' });
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
if(!Object.is(filter.srfnodeid, this.TREENODE_ROOT)) {
Object.assign(treeNode, { parentId: filter.srfotherkey });
}
list.push(treeNode);
resolve(list);
});
}
/**
* 填充 树视图节点[默认根节点]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof GanttTreeService
*/
@Errorlog
public async fillRootNodeChilds(context:any={}, filter: any, list: any[]): Promise<any> {
if (filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")) {
// 填充订单数据
let OrderdataRsNavContext:any = {};
let OrderdataRsNavParams:any = {};
let OrderdataRsParams:any = {};
await this.fillOrderdataNodes(context, filter, list ,OrderdataRsNavContext,OrderdataRsNavParams,OrderdataRsParams);
} else {
// 填充订单数据
let OrderdataRsNavContext:any = {};
let OrderdataRsNavParams:any = {};
let OrderdataRsParams:any = {};
await this.fillOrderdataNodes(context, filter, list ,OrderdataRsNavContext,OrderdataRsNavParams,OrderdataRsParams);
}
}
/**
* 处理代码表返回数据(树状结构)
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof GanttTreeService
*/
public handleDataSet(result:Array<any>,context:any,callBack:any){
let list:Array<any> = [];
if(result.length === 0){
return list;
}
result.forEach((codeItem:any) =>{
if(!codeItem.pvalue){
let valueField:string = codeItem.value;
this.setChildCodeItems(valueField,result,codeItem);
list.push(codeItem);
}
})
this.setNodeData(list,context,callBack);
return list;
}
/**
* 处理非根节点数据
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof GanttTreeService
*/
public setChildCodeItems(pValue:string,result:Array<any>,codeItem:any){
result.forEach((item:any) =>{
if(item.pvalue == pValue){
let valueField:string = item.value;
this.setChildCodeItems(valueField,result,item);
if(!codeItem.children){
codeItem.children = [];
}
codeItem.children.push(item);
}
})
}
/**
* 设置节点UI数据
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof GanttTreeService
*/
public setNodeData(result:Array<any>,context:any,callBack:any){
result.forEach((item:any) =>{
if(item.children){
item.leaf = false;
this.setNodeData(item.children,context,callBack);
}else{
item.leaf = true;
}
callBack(context,item);
})
}
/**
* 处理节点关系导航上下文
*
* @param context 应用上下文
* @param filter 参数
* @param resNavContext 节点关系导航上下文
*
* @memberof GanttTreeService
*/
public handleResNavContext(context:any,filter:any,resNavContext:any){
if(resNavContext && Object.keys(resNavContext).length > 0){
let tempContextData:any = JSON.parse(JSON.stringify(context));
let tempViewParams:any = {};
if(filter && filter.viewparams){
tempViewParams = filter.viewparams;
}
Object.keys(resNavContext).forEach((item:any) =>{
let curDataObj:any = resNavContext[item];
this.handleCustomDataLogic(context,tempViewParams,curDataObj,tempContextData,item);
})
return tempContextData;
}else{
return context;
}
}
/**
* 处理关系导航参数
*
* @param context 应用上下文
* @param filter 参数
* @param resNavParams 节点关系导航参数
* @param resParams 节点关系参数
*
* @memberof GanttTreeService
*/
public handleResNavParams(context:any,filter:any,resNavParams:any,resParams:any){
if((resNavParams && Object.keys(resNavParams).length >0) || (resParams && Object.keys(resParams).length >0)){
let tempViewParamData:any = {};
let tempViewParams:any = {};
if(filter && filter.viewparams){
tempViewParams = filter.viewparams;
tempViewParamData = JSON.parse(JSON.stringify(filter.viewparams));
}
if( Object.keys(resNavParams).length > 0){
Object.keys(resNavParams).forEach((item:any) =>{
let curDataObj:any = resNavParams[item];
this.handleCustomDataLogic(context,tempViewParams,curDataObj,tempViewParamData,item);
})
}
if( Object.keys(resParams).length > 0){
Object.keys(resParams).forEach((item:any) =>{
let curDataObj:any = resParams[item];
tempViewParamData[item.toLowerCase()] = curDataObj.value;
})
}
Object.assign(filter,{viewparams:tempViewParamData});
return filter;
}else{
return filter;
}
}
/**
* 处理自定义节点关系导航数据
*
* @param context 应用上下文
* @param viewparams 参数
* @param curNavData 节点关系导航参数对象
* @param tempData 返回数据
* @param item 节点关系导航参数键值
*
* @memberof GanttTreeService
*/
public handleCustomDataLogic(context:any,viewparams:any,curNavData:any,tempData:any,item:string){
// 直接值直接赋值
if(curNavData.isRawValue){
if(Object.is(curNavData.value,"null") || Object.is(curNavData.value,"")){
Object.defineProperty(tempData, item.toLowerCase(), {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item.toLowerCase(), {
value: curNavData.value,
writable : true,
enumerable : true,
configurable : true
});
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(context[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: context[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
if(viewparams[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: viewparams[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item.toLowerCase(), {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}
}
}
}
}
\ No newline at end of file
.app-gantt{
height: 100%;
.gantt {
height: 100%;
.gantt-elastic__main-view-container {
flex-grow: 1;
}
}
.app-data-empty{
height: 100%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
}
}
// this is less
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import GanttTreeBase from './gantt-tree-gantt-base.vue';
@Component({
components: {
}
})
export default class GanttTree extends GanttTreeBase {
}
</script>
\ No newline at end of file
......@@ -326,7 +326,7 @@
{
"appid":"Web",
"appname":"演示应用",
"appmenu":[{"menuid":"MainMenu", "menuname":"MainMenu", "menuitem":[{ "id":"menuitem1" , "name":"工作台" },{ "id":"menuitem3" , "name":"控件" , "items":[{ "id":"menuitem6" , "name":"默认数据类型" },{ "id":"menuitem7" , "name":"默认编辑器类型" },{ "id":"menuitem15" , "name":"基础表单项" },{ "id":"menuitem72" , "name":"扩展编辑器" },{ "id":"menuitem151" , "name":"自定义扩展编辑器" }]},{ "id":"menuitem4" , "name":"部件" , "items":[{ "id":"menuitem12" , "name":"编辑表单" , "items":[{ "id":"menuitem107" , "name":"内置功能" },{ "id":"menuitem47" , "name":"新建默认值" },{ "id":"menuitem99" , "name":"更新默认值" },{ "id":"menuitem48" , "name":"输入提示" },{ "id":"menuitem49" , "name":"辅助输入" },{ "id":"menuitem50" , "name":"自动填充" },{ "id":"menuitem51" , "name":"超链接" },{ "id":"menuitem52" , "name":"表单值重置" },{ "id":"menuitem55" , "name":"动态显示" },{ "id":"menuitem53" , "name":"动态启用" },{ "id":"menuitem54" , "name":"动态空输入" },{ "id":"menuitem56" , "name":"表单项更新" },{ "id":"menuitem108" , "name":"表单值规则" }]},{ "id":"menuitem16" , "name":"搜索表单" },{ "id":"menuitem13" , "name":"表格" , "items":[{ "id":"menuitem57" , "name":"禁用排序" },{ "id":"menuitem59" , "name":"行操作" },{ "id":"menuitem58" , "name":"行编辑" },{ "id":"menuitem73" , "name":"内置功能" },{ "id":"menuitem74" , "name":"表格行编辑" },{ "id":"menuitem75" , "name":"新建默认值" },{ "id":"menuitem76" , "name":"更新默认值" },{ "id":"menuitem77" , "name":"表格值规则" },{ "id":"menuitem132" , "name":"表格列更新" },{ "id":"menuitem133" , "name":"表格列重置" },{ "id":"menuitem78" , "name":"自动分组" },{ "id":"menuitem80" , "name":"代码表分组" },{ "id":"menuitem81" , "name":"当前页聚合" },{ "id":"menuitem82" , "name":"远程聚合" }]},{ "id":"menuitem83" , "name":"列表" , "items":[{ "id":"menuitem84" , "name":"内置功能" },{ "id":"menuitem85" , "name":"自动分组" },{ "id":"menuitem86" , "name":"代码表分组" },{ "id":"menuitem91" , "name":"项布局面板" },{ "id":"menuitem143" , "name":"自定义插件" }]},{ "id":"menuitem87" , "name":"数据视图" , "items":[{ "id":"menuitem88" , "name":"内置功能" },{ "id":"menuitem89" , "name":"自动分组" },{ "id":"menuitem90" , "name":"代码表分组" },{ "id":"menuitem94" , "name":"项布局面板" },{ "id":"menuitem152" , "name":"自定义插件" }]},{ "id":"menuitem101" , "name":"实体看板" , "items":[{ "id":"menuitem102" , "name":"内置功能" },{ "id":"menuitem104" , "name":"代码表分组" },{ "id":"menuitem105" , "name":"项布局面板" }]},{ "id":"menuitem95" , "name":"日历" , "items":[{ "id":"menuitem96" , "name":"内置功能" },{ "id":"menuitem97" , "name":"时间轴样式" },{ "id":"menuitem109" , "name":"项布局面板" },{ "id":"menuitem64" , "name":"自定义插件" }]},{ "id":"menuitem14" , "name":"树视图" , "items":[{ "id":"menuitem60" , "name":"静态节点" },{ "id":"menuitem61" , "name":"动态节点(代码表)" },{ "id":"menuitem62" , "name":"动态节点(实体)" },{ "id":"menuitem63" , "name":"右键操作" }]},{ "id":"menuitem110" , "name":"树表格" },{ "id":"menuitem17" , "name":"向导面板" , "items":[{ "id":"menuitem134" , "name":"基础用法" },{ "id":"menuitem135" , "name":"状态属性" }]},{ "id":"menuitem37" , "name":"图表" , "items":[{ "id":"menuitem38" , "name":"柱状图" },{ "id":"menuitem39" , "name":"折线图" },{ "id":"menuitem40" , "name":"饼图" },{ "id":"menuitem41" , "name":"区域图" },{ "id":"menuitem42" , "name":"雷达图" }]},{ "id":"menuitem18" , "name":"界面行为" , "items":[{ "id":"menuitem65" , "name":"前端界面行为" },{ "id":"menuitem66" , "name":"后台界面行为" }]},{ "id":"menuitem111" , "name":"甘特图" },{ "id":"menuitem119" , "name":"分页视图" , "items":[{ "id":"menuitem120" , "name":"分页导航" }]},{ "id":"menuitem121" , "name":"多编辑视图" , "items":[{ "id":"menuitem115" , "name":"多表单(行记录)" },{ "id":"menuitem123" , "name":"多表单(上分页)" }]},{ "id":"menuitem122" , "name":"数据关系栏" , "items":[{ "id":"menuitem116" , "name":"编辑视图(左右关系)" },{ "id":"menuitem117" , "name":"编辑视图(上下关系)" },{ "id":"menuitem118" , "name":"编辑视图(分页关系)" }]},{ "id":"menuitem125" , "name":"数据看板" , "items":[{ "id":"menuitem126" , "name":"实体数据看板" }]},{ "id":"menuitem127" , "name":"导航视图" , "items":[{ "id":"menuitem128" , "name":"表格导航" },{ "id":"menuitem114" , "name":"列表导航" },{ "id":"menuitem136" , "name":"树导航" },{ "id":"menuitem137" , "name":"卡片导航" },{ "id":"menuitem138" , "name":"日历导航" },{ "id":"menuitem139" , "name":"时间轴导航" }]},{ "id":"menuitem129" , "name":"选项操作" , "items":[{ "id":"menuitem131" , "name":"表格选项操作" }]},{ "id":"menuitem142" , "name":"选择视图" , "items":[{ "id":"menuitem130" , "name":"索引关系选择视图" },{ "id":"menuitem145" , "name":"选择视图" }]},{ "id":"menuitem147" , "name":"应用看板" , "items":[{ "id":"menuitem148" , "name":"应用看板视图" }]}]},{ "id":"menuitem5" , "name":"视图" , "items":[{ "id":"menuitem9" , "name":"列表视图" , "items":[{ "id":"menuitem19" , "name":"常规表格视图" },{ "id":"menuitem21" , "name":"左右表格视图" },{ "id":"menuitem20" , "name":"嵌入表格视图" }]},{ "id":"menuitem8" , "name":"编辑视图" , "items":[{ "id":"menuitem22" , "name":"常规编辑视图" },{ "id":"menuitem23" , "name":"左右编辑视图" },{ "id":"menuitem24" , "name":"分页编辑视图" },{ "id":"menuitem25" , "name":"嵌入编辑视图" }]},{ "id":"menuitem26" , "name":"选择视图" , "items":[{ "id":"menuitem27" , "name":"单选视图" },{ "id":"menuitem28" , "name":"多选视图" },{ "id":"menuitem29" , "name":"树形选择视图" },{ "id":"menuitem30" , "name":"左右单选视图" },{ "id":"menuitem31" , "name":"左右多选视图" }]},{ "id":"menuitem10" , "name":"导航视图" , "items":[{ "id":"menuitem32" , "name":"常规导航视图" },{ "id":"menuitem33" , "name":"分页导航视图" },{ "id":"menuitem34" , "name":"嵌入导航视图" }]},{ "id":"menuitem11" , "name":"其他视图" , "items":[{ "id":"menuitem35" , "name":"图表视图" },{ "id":"menuitem36" , "name":"报表视图" },{ "id":"menuitem98" , "name":"自定义视图" }]},{ "id":"menuitem79" , "name":"表格视图" },{ "id":"menuitem140" , "name":"单数据视图" },{ "id":"menuitem141" , "name":"多数据视图" }]},{ "id":"menuitem69" , "name":"工作流" },{ "id":"menuitem153" , "name":"逻辑" , "items":[{ "id":"menuitem154" , "name":"应用功能" },{ "id":"menuitem155" , "name":"界面行为" }]},{ "id":"menuitem2" , "name":"更多" , "items":[{ "id":"menuitem46" , "name":"数据导出导入" },{ "id":"menuitem45" , "name":"数据打印" },{ "id":"menuitem67" , "name":"索引实体" },{ "id":"menuitem68" , "name":"继承实体" },{ "id":"menuitem70" , "name":"主状态" },{ "id":"menuitem71" , "name":"多表单" }]},{ "id":"menuitem92" , "name":"其他" , "items":[{ "id":"menuitem93" , "name":"示例实体02示例数据补充" },{ "id":"menuitem100" , "name":"订单示例数据补充" },{ "id":"menuitem103" , "name":"产品示例数据补充" },{ "id":"menuitem106" , "name":"示例实体03示例数据补充" },{ "id":"menuitem113" , "name":"订单类型添加" },{ "id":"menuitem124" , "name":"示例实体01数据补充" },{ "id":"menuitem144" , "name":"客户实体示例数据补充" },{ "id":"menuitem146" , "name":"应用视图数据补充" },{ "id":"menuitem149" , "name":"应用部件数据补充" },{ "id":"menuitem150" , "name":"编辑器数据补充" }]}] }]
"appmenu":[{"menuid":"MainMenu", "menuname":"MainMenu", "menuitem":[{ "id":"menuitem1" , "name":"工作台" },{ "id":"menuitem3" , "name":"控件" , "items":[{ "id":"menuitem6" , "name":"默认数据类型" },{ "id":"menuitem7" , "name":"默认编辑器类型" },{ "id":"menuitem15" , "name":"基础表单项" },{ "id":"menuitem72" , "name":"扩展编辑器" },{ "id":"menuitem151" , "name":"自定义扩展编辑器" }]},{ "id":"menuitem4" , "name":"部件" , "items":[{ "id":"menuitem12" , "name":"编辑表单" , "items":[{ "id":"menuitem107" , "name":"内置功能" },{ "id":"menuitem47" , "name":"新建默认值" },{ "id":"menuitem99" , "name":"更新默认值" },{ "id":"menuitem48" , "name":"输入提示" },{ "id":"menuitem49" , "name":"辅助输入" },{ "id":"menuitem50" , "name":"自动填充" },{ "id":"menuitem51" , "name":"超链接" },{ "id":"menuitem52" , "name":"表单值重置" },{ "id":"menuitem55" , "name":"动态显示" },{ "id":"menuitem53" , "name":"动态启用" },{ "id":"menuitem54" , "name":"动态空输入" },{ "id":"menuitem56" , "name":"表单项更新" },{ "id":"menuitem108" , "name":"表单值规则" }]},{ "id":"menuitem16" , "name":"搜索表单" },{ "id":"menuitem13" , "name":"表格" , "items":[{ "id":"menuitem57" , "name":"禁用排序" },{ "id":"menuitem59" , "name":"行操作" },{ "id":"menuitem58" , "name":"行编辑" },{ "id":"menuitem73" , "name":"内置功能" },{ "id":"menuitem74" , "name":"表格行编辑" },{ "id":"menuitem75" , "name":"新建默认值" },{ "id":"menuitem76" , "name":"更新默认值" },{ "id":"menuitem77" , "name":"表格值规则" },{ "id":"menuitem132" , "name":"表格列更新" },{ "id":"menuitem133" , "name":"表格列重置" },{ "id":"menuitem78" , "name":"自动分组" },{ "id":"menuitem80" , "name":"代码表分组" },{ "id":"menuitem81" , "name":"当前页聚合" },{ "id":"menuitem82" , "name":"远程聚合" }]},{ "id":"menuitem83" , "name":"列表" , "items":[{ "id":"menuitem84" , "name":"内置功能" },{ "id":"menuitem85" , "name":"自动分组" },{ "id":"menuitem86" , "name":"代码表分组" },{ "id":"menuitem91" , "name":"项布局面板" },{ "id":"menuitem143" , "name":"自定义插件" }]},{ "id":"menuitem87" , "name":"数据视图" , "items":[{ "id":"menuitem88" , "name":"内置功能" },{ "id":"menuitem89" , "name":"自动分组" },{ "id":"menuitem90" , "name":"代码表分组" },{ "id":"menuitem94" , "name":"项布局面板" },{ "id":"menuitem152" , "name":"自定义插件" }]},{ "id":"menuitem101" , "name":"实体看板" , "items":[{ "id":"menuitem102" , "name":"内置功能" },{ "id":"menuitem104" , "name":"代码表分组" },{ "id":"menuitem105" , "name":"项布局面板" }]},{ "id":"menuitem95" , "name":"日历" , "items":[{ "id":"menuitem96" , "name":"内置功能" },{ "id":"menuitem97" , "name":"时间轴样式" },{ "id":"menuitem109" , "name":"项布局面板" },{ "id":"menuitem64" , "name":"自定义插件" }]},{ "id":"menuitem14" , "name":"树视图" , "items":[{ "id":"menuitem60" , "name":"静态节点" },{ "id":"menuitem61" , "name":"动态节点(代码表)" },{ "id":"menuitem62" , "name":"动态节点(实体)" },{ "id":"menuitem63" , "name":"右键操作" }]},{ "id":"menuitem110" , "name":"树表格" },{ "id":"menuitem111" , "name":"甘特图" },{ "id":"menuitem17" , "name":"向导面板" , "items":[{ "id":"menuitem134" , "name":"基础用法" },{ "id":"menuitem135" , "name":"状态属性" }]},{ "id":"menuitem37" , "name":"图表" , "items":[{ "id":"menuitem38" , "name":"柱状图" },{ "id":"menuitem39" , "name":"折线图" },{ "id":"menuitem40" , "name":"饼图" },{ "id":"menuitem41" , "name":"区域图" },{ "id":"menuitem42" , "name":"雷达图" }]},{ "id":"menuitem18" , "name":"界面行为" , "items":[{ "id":"menuitem65" , "name":"前端界面行为" },{ "id":"menuitem66" , "name":"后台界面行为" }]},{ "id":"menuitem119" , "name":"分页视图" , "items":[{ "id":"menuitem120" , "name":"分页导航" }]},{ "id":"menuitem121" , "name":"多编辑视图" , "items":[{ "id":"menuitem115" , "name":"多表单(行记录)" },{ "id":"menuitem123" , "name":"多表单(上分页)" }]},{ "id":"menuitem122" , "name":"数据关系栏" , "items":[{ "id":"menuitem116" , "name":"编辑视图(左右关系)" },{ "id":"menuitem117" , "name":"编辑视图(上下关系)" },{ "id":"menuitem118" , "name":"编辑视图(分页关系)" }]},{ "id":"menuitem125" , "name":"数据看板" , "items":[{ "id":"menuitem126" , "name":"实体数据看板" }]},{ "id":"menuitem127" , "name":"导航视图" , "items":[{ "id":"menuitem128" , "name":"表格导航" },{ "id":"menuitem114" , "name":"列表导航" },{ "id":"menuitem136" , "name":"树导航" },{ "id":"menuitem137" , "name":"卡片导航" },{ "id":"menuitem138" , "name":"日历导航" },{ "id":"menuitem139" , "name":"时间轴导航" }]},{ "id":"menuitem129" , "name":"选项操作" , "items":[{ "id":"menuitem131" , "name":"表格选项操作" }]},{ "id":"menuitem142" , "name":"选择视图" , "items":[{ "id":"menuitem130" , "name":"索引关系选择视图" },{ "id":"menuitem145" , "name":"选择视图" }]},{ "id":"menuitem147" , "name":"应用看板" , "items":[{ "id":"menuitem148" , "name":"应用看板视图" }]}]},{ "id":"menuitem5" , "name":"视图" , "items":[{ "id":"menuitem9" , "name":"列表视图" , "items":[{ "id":"menuitem19" , "name":"常规表格视图" },{ "id":"menuitem21" , "name":"左右表格视图" },{ "id":"menuitem20" , "name":"嵌入表格视图" }]},{ "id":"menuitem8" , "name":"编辑视图" , "items":[{ "id":"menuitem22" , "name":"常规编辑视图" },{ "id":"menuitem23" , "name":"左右编辑视图" },{ "id":"menuitem24" , "name":"分页编辑视图" },{ "id":"menuitem25" , "name":"嵌入编辑视图" }]},{ "id":"menuitem26" , "name":"选择视图" , "items":[{ "id":"menuitem27" , "name":"单选视图" },{ "id":"menuitem28" , "name":"多选视图" },{ "id":"menuitem29" , "name":"树形选择视图" },{ "id":"menuitem30" , "name":"左右单选视图" },{ "id":"menuitem31" , "name":"左右多选视图" }]},{ "id":"menuitem10" , "name":"导航视图" , "items":[{ "id":"menuitem32" , "name":"常规导航视图" },{ "id":"menuitem33" , "name":"分页导航视图" },{ "id":"menuitem34" , "name":"嵌入导航视图" }]},{ "id":"menuitem11" , "name":"其他视图" , "items":[{ "id":"menuitem35" , "name":"图表视图" },{ "id":"menuitem36" , "name":"报表视图" },{ "id":"menuitem98" , "name":"自定义视图" }]},{ "id":"menuitem79" , "name":"表格视图" },{ "id":"menuitem140" , "name":"单数据视图" },{ "id":"menuitem141" , "name":"多数据视图" }]},{ "id":"menuitem69" , "name":"工作流" },{ "id":"menuitem153" , "name":"逻辑" , "items":[{ "id":"menuitem154" , "name":"应用功能" },{ "id":"menuitem155" , "name":"界面行为" }]},{ "id":"menuitem2" , "name":"更多" , "items":[{ "id":"menuitem46" , "name":"数据导出导入" },{ "id":"menuitem45" , "name":"数据打印" },{ "id":"menuitem67" , "name":"索引实体" },{ "id":"menuitem68" , "name":"继承实体" },{ "id":"menuitem70" , "name":"主状态" },{ "id":"menuitem71" , "name":"多表单" }]},{ "id":"menuitem92" , "name":"其他" , "items":[{ "id":"menuitem93" , "name":"示例实体02示例数据补充" },{ "id":"menuitem100" , "name":"订单示例数据补充" },{ "id":"menuitem103" , "name":"产品示例数据补充" },{ "id":"menuitem106" , "name":"示例实体03示例数据补充" },{ "id":"menuitem113" , "name":"订单类型添加" },{ "id":"menuitem124" , "name":"示例实体01数据补充" },{ "id":"menuitem144" , "name":"客户实体示例数据补充" },{ "id":"menuitem146" , "name":"应用视图数据补充" },{ "id":"menuitem149" , "name":"应用部件数据补充" },{ "id":"menuitem150" , "name":"编辑器数据补充" }]}] }]
}
]
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册