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

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

上级 51a29b53
......@@ -242,6 +242,7 @@ export default {
menuitem96: "内置功能",
menuitem97: "时间轴样式",
menuitem109: "项布局面板",
menuitem64: "自定义插件",
menuitem101: "看板",
menuitem102: "看板内置功能",
menuitem104: "代码表分组",
......
......@@ -242,6 +242,7 @@ export default {
menuitem96: "内置功能",
menuitem97: "时间轴样式",
menuitem109: "项布局面板",
menuitem64: "自定义插件",
menuitem101: "看板",
menuitem102: "看板内置功能",
menuitem104: "代码表分组",
......
......@@ -1323,6 +1323,24 @@ mock.onGet('v7/main-menuappmenu').reply((config: any) => {
textcls: '',
appfunctag: 'AppFunc29',
resourcetag: '',
},
{
id: '9118D94A-9D3F-43E3-A0F1-6909BE09996F',
name: 'menuitem64',
text: '自定义插件',
type: 'MENUITEM',
counterid: '',
tooltip: '自定义插件',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc72',
resourcetag: '',
},
],
},
......
<template>
<div class='view-container decalendarview ibizbookusr4-calendar-view'>
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizbookusr4calendarview"></app-studioaction>
<card class='view-card view-no-toolbar' :bordered="false" :dis-hover="true" >
<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_calendar
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
@beforeload="onBeforeLoad($event)"
:newdata="newdata"
:opendata="opendata"
name="calendar"
ref='calendar'
@closeview="closeView($event)">
</view_calendar>
</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 IBIZBOOKService from '@/service/ibizbook/ibizbook-service';
import IBIZBOOKAuthService from '@/authservice/ibizbook/ibizbook-auth-service';
import IBIZBOOKUIService from '@/uiservice/ibizbook/ibizbook-ui-service';
import CodeListService from "@/codelist/codelist-service";
@Component({
components: {
},
})
export default class IBIZBOOKUsr4CalendarViewBase extends Vue {
/**
* 实体服务对象
*
* @type {IBIZBOOKService}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService;
/**
* 实体UI服务对象
*
* @type IBIZBOOKUIService
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public appUIService: IBIZBOOKUIService = new IBIZBOOKUIService(this.$store);
/**
* 数据变化
*
* @param {*} val
* @returns {*}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
@Emit()
public viewDatasChange(val: any):any {
return val;
}
/**
* 传入视图上下文
*
* @type {string}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
@Prop() public viewdata!: string;
/**
* 传入视图参数
*
* @type {string}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
@Prop() public viewparam!: string;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
@Prop({ default: true }) public viewDefaultUsage!: boolean;
/**
* 视图默认使用
*
* @type {string}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 视图标识
*
* @type {string}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public viewtag: string = '95984592003cd9b15f3fd01371cc384c';
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public customViewNavContexts:any ={
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public customViewParams:any ={
};
/**
* 视图模型数据
*
* @type {*}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public model: any = {
srfCaption: 'entities.ibizbook.views.usr4calendarview.caption',
srfTitle: 'entities.ibizbook.views.usr4calendarview.title',
srfSubTitle: 'entities.ibizbook.views.usr4calendarview.subtitle',
dataInfo: ''
}
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
@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 IBIZBOOKUsr4CalendarViewBase
*/
@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 IBIZBOOKUsr4CalendarViewBase
*/
public containerModel: any = {
view_calendar: { name: 'calendar', type: 'CALENDAR' },
};
/**
* 视图刷新
*
* @param {*} args
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public refresh(args?: any): void {
const refs: any = this.$refs;
if (refs && refs.calendar) {
refs.calendar.refresh();
}
}
/**
* 计数器刷新
*
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
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 IBIZBOOKUsr4CalendarViewBase
*/
public viewState: Subject<ViewState> = new Subject();
/**
* 引擎初始化
*
* @public
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public engineInit(): void {
}
/**
* 应用导航服务
*
* @type {*}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public navDataService = NavDataService.getInstance(this.$store);
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public serviceStateEvent: Subscription | undefined;
/**
* 门户部件状态对象
*
* @type {*}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
@Prop() public portletState?: any;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public portletStateEvent: Subscription | undefined;
/**
* 应用上下文
*
* @type {*}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public context:any = {};
/**
* 视图参数
*
* @type {*}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public viewparams:any = {};
/**
* 视图缓存数据
*
* @type {*}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
* @public
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
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,{'ibizbook':inputvalue});
}
//初始化视图唯一标识
Object.assign(this.context,{srfsessionid:this.$util.createUUID()});
this.handleCustomViewData();
//初始化导航数据
this.initNavDataWithRoute();
}
/**
* 处理自定义视图数据
*
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
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 IBIZBOOKUsr4CalendarViewBase
*/
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 IBIZBOOKUsr4CalendarViewBase
*/
public initNavDataWithRoute(data:any = null, isNew:boolean = false, isAlways:boolean = false){
if( isAlways || (this.viewDefaultUsage && Object.is(this.navModel,"route")) ){
this.navDataService.addNavData({id:'ibizbookusr4-calendar-view',tag:this.viewtag,srfkey:isNew ? null : this.context.ibizbook,title:this.$t(this.model.srfCaption),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
}
}
/**
* 初始化导航数据(分页模式)
*
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public initNavDataWithTab(data:any = null,isOnlyAdd:boolean = true, isAlways:boolean = false){
if( isAlways || (this.viewDefaultUsage && !Object.is(this.navModel,"route")) ){
this.navDataService.addNavDataByOnly({id:'ibizbookusr4-calendar-view',tag:this.viewtag,srfkey:this.context.ibizbook,title:this.$t(this.model.srfCaption),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath},isOnlyAdd);
}
}
/**
* Vue声明周期
*
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
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,'ibizbookusr4-calendar-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,'IBIZBOOKUsr4CalendarView')){
return;
}
if(Object.is(res.action,'refresh') && _this.refresh && _this.refresh instanceof Function){
_this.refresh();
}
})
}
}
/**
* 销毁之前
*
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public beforeDestroy() {
this.$store.commit('viewaction/removeView', this.viewtag);
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public mounted() {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public afterMounted(){
const _this: any = this;
_this.engineInit();
if (_this.loadModel && _this.loadModel instanceof Function) {
_this.loadModel();
}
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof IBIZBOOKUsr4CalendarView
*/
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
this.$Notice.warning({ title: '错误', desc: '未指定关系视图' });
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof IBIZBOOKUsr4CalendarView
*/
public opendata(args: any[],fullargs?:any,params?: any, $event?: any, xData?: any) {
if(!this.viewDefaultUsage){
if(Object.is(this.navModel,"route")){
this.initNavDataWithRoute(this.viewCacheData, false, true);
}else{
this.initNavDataWithTab(this.viewCacheData, false, true);
}
}
let localContext:any = null;
let localViewParam:any =null;
this.$Notice.warning({ title: '错误', desc: '未指定关系视图' });
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
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 IBIZBOOKUsr4CalendarViewBase
*/
public destroyed(){
this.afterDestroyed();
}
/**
* 执行destroyed后的逻辑
*
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
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();
}
}
/**
* 搜索值
*
* @type {string}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public query: string = '';
/**
* 是否展开搜索表单
*
* @type {boolean}
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public isExpandSearchForm: boolean = false;
/**
* 快速搜索
*
* @param {*} $event
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public onSearch($event: any): void {
const refs: any = this.$refs;
if (refs.calendar) {
refs.calendar.refresh();
}
}
/**
* calendar 的 beforeload 事件
*
* @param {*} arg
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public onBeforeLoad(arg: any){
let _this:any = this;
if (_this.viewparams && Object.keys(_this.viewparams).length > 0) {
Object.assign(arg, _this.viewparams);
}
if (_this.$refs.searchform && _this.isExpandSearchForm) {
Object.assign(arg, _this.$refs.searchform.getData());
}
if (_this && !_this.isExpandSearchForm) {
Object.assign(arg, { query: _this.query });
}
// 快速分组和快速搜索栏
let otherQueryParam:any = {};
if(_this && (_this.quickGroupData as any)){
Object.assign(otherQueryParam,_this.quickGroupData);
}
if(_this && _this.quickFormData){
Object.assign(otherQueryParam,_this.quickFormData);
}
Object.assign(arg,{viewparams:otherQueryParam});
}
/**
* searchform 部件 search 事件
*
* @param {*} $event
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public searchform_search($event: any) {
this.onSearch($event);
}
/**
* searchform 部件 load 事件
*
* @param {*} $event
* @memberof IBIZBOOKUsr4CalendarViewBase
*/
public searchform_load($event: any) {
this.onSearch($event);
}
}
</script>
<style lang='less'>
@import './ibizbookusr4-calendar-view.less';
</style>
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import IBIZBOOKUsr4CalendarViewBase from './ibizbookusr4-calendar-view-base.vue';
import view_calendar from '@widgets/ibizbook/custom-calendar-calendar/custom-calendar-calendar.vue';
@Component({
components: {
view_calendar,
},
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 IBIZBOOKUsr4CalendarView extends IBIZBOOKUsr4CalendarViewBase {
}
</script>
\ No newline at end of file
......@@ -181,6 +181,7 @@ export const PageComponents = {
Vue.component('ibizuniproduct-index-pickup-data-view', () => import('@pages/sample/ibizuniproduct-index-pickup-data-view/ibizuniproduct-index-pickup-data-view.vue'));
Vue.component('ibizorder-type-usr2-grid-view', () => import('@pages/sample/ibizorder-type-usr2-grid-view/ibizorder-type-usr2-grid-view.vue'));
Vue.component('ibizorder-tab-exp-view', () => import('@pages/sample/ibizorder-tab-exp-view/ibizorder-tab-exp-view.vue'));
Vue.component('ibizbookusr4-calendar-view', () => import('@pages/sample/ibizbookusr4-calendar-view/ibizbookusr4-calendar-view.vue'));
Vue.component('ibizsample0018-grid-view', () => import('@pages/sample/ibizsample0018-grid-view/ibizsample0018-grid-view.vue'));
Vue.component('ibizsample0014-grid-view', () => import('@pages/sample/ibizsample0014-grid-view/ibizsample0014-grid-view.vue'));
Vue.component('app-panel-view', () => import('@pages/ungroup/app-panel-view/app-panel-view.vue'));
......
......@@ -2853,6 +2853,20 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizorder-tab-exp-view/ibizorder-tab-exp-view.vue'),
},
{
path: 'ibizbooks/:ibizbook?/usr4calendarview/:usr4calendarview?',
meta: {
caption: 'entities.ibizbook.views.usr4calendarview.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr4calendarview', parameterName: 'usr4calendarview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookusr4-calendar-view/ibizbookusr4-calendar-view.vue'),
},
...indexRoutes,
],
},
......@@ -4325,6 +4339,19 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizbookusr4-grid-view/ibizbookusr4-grid-view.vue'),
},
{
path: '/ibizbooks/:ibizbook?/usr4calendarview/:usr4calendarview?',
meta: {
caption: 'entities.ibizbook.views.usr4calendarview.caption',
info:'',
parameters: [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr4calendarview', parameterName: 'usr4calendarview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookusr4-calendar-view/ibizbookusr4-calendar-view.vue'),
},
{
path: '/ibizbooks/:ibizbook?/interfunckanbanview/:interfunckanbanview?',
meta: {
......
......@@ -290,6 +290,7 @@ export const viewstate: any = {
'e57dd501c75c6933363fa245edcadbbd',
'14eddc6d2c858a72c796b017959cc4ef',
'1247febf206e1e0dbb4f384b4cfa565c',
'95984592003cd9b15f3fd01371cc384c',
],
},
{
......@@ -1119,6 +1120,15 @@ export const viewstate: any = {
'b3429ecc4d89a02bc5f5279f1bd7f620',
],
},
{
viewtag: '95984592003cd9b15f3fd01371cc384c',
viewmodule: 'Sample',
viewname: 'IBIZBOOKUsr4CalendarView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '98865bf786ea85b14932dd5e48a74983',
viewmodule: 'Sample',
......
......@@ -587,6 +587,9 @@ export default class MainMenuBase extends Vue implements ControlInterface {
case 'AppFunc25':
this.clickAppFunc25(item);
return;
case 'AppFunc72':
this.clickAppFunc72(item);
return;
case 'Auto286':
this.clickAuto286(item);
return;
......@@ -1410,6 +1413,29 @@ export default class MainMenuBase extends Vue implements ControlInterface {
})
}
/**
* 图书日历自定义插件
*
* @param {*} [item={}]
* @memberof MainMenu
*/
public clickAppFunc72(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr4calendarview', parameterName: 'usr4calendarview' },
];
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);
})
}
/**
* 列操作表格
*
......
......@@ -1399,6 +1399,25 @@ export default class MainMenuModel {
appfunctag: 'AppFunc29',
resourcetag: '',
authtag:'Web-MainMenu-menuitem109',
},
{
id: '9118D94A-9D3F-43E3-A0F1-6909BE09996F',
name: 'menuitem64',
text: '自定义插件',
type: 'MENUITEM',
counterid: '',
tooltip: '自定义插件',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc72',
resourcetag: '',
authtag:'Web-MainMenu-menuitem64',
},
],
},
......
......@@ -26,6 +26,11 @@ export default class MainModel {
]
}else{
return [
{
name: 'amount',
prop: 'amount',
dataType: 'INT',
},
{
name: 'ibizappctrltype',
prop: 'ibizappctrltype',
......
......@@ -26,6 +26,11 @@ export default class MainModel {
]
}else{
return [
{
name: 'amount',
prop: 'amount',
dataType: 'INT',
},
{
name: 'instanceaddress',
prop: 'instanceaddress',
......
<template>
<div :class='calendarClass'>
<context-menu-container>
<template v-if="events.length >0">
<el-timeline>
<el-timeline-item
v-for="(item, index) in events"
:key="item.title+index"
:color="item.color"
:timestamp="item.start"
placement="top">
<context-menu :contextMenuStyle="{width: '100%'}" :data="item" :renderContent="renderContextMenu">
<el-card @click.native="onEventClick(item,true,$event)" :class="item.className">
<div v-if="false && item.itemType == 'item'">
</div>
<div v-else>
<h4>{{item.title}}</h4>
<p>{{$t('app.calendar.from')}} {{item.start}} {{$t('app.calendar.to')}} {{item.end}}</p>
</div>
</el-card>
</context-menu>
</el-timeline-item>
</el-timeline>
</template>
<template v-else>
<span class="app-data-empty">{{ $t('entities.ibizbook.customcalendar_calendar.nodata') }}</span>
</template>
</context-menu-container>
</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 IBIZBOOKService from '@/service/ibizbook/ibizbook-service';
import CustomCalendarService from './custom-calendar-calendar-service';
import IBIZBOOKUIService from '@/uiservice/ibizbook/ibizbook-ui-service';
import FullCalendar from '@fullcalendar/vue'
import dayGridPlugin from '@fullcalendar/daygrid'
import timeGridPlugin from '@fullcalendar/timegrid';
import listPlugin from '@fullcalendar/list';
import interactionPlugin from '@fullcalendar/interaction';
import ContextMenu from '@components/context-menu/context-menu';
import UIService from '@/uiservice/ui-service';
@Component({
components: {
FullCalendar,
}
})
export default class CustomCalendarBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof CustomCalendarBase
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof CustomCalendarBase
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof CustomCalendarBase
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof CustomCalendarBase
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof CustomCalendarBase
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof CustomCalendarBase
*/
public getControlType(): string {
return 'CALENDAR'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof CustomCalendarBase
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {CustomCalendarService}
* @memberof CustomCalendarBase
*/
public service: CustomCalendarService = new CustomCalendarService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {IBIZBOOKService}
* @memberof CustomCalendarBase
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService({ $store: this.$store });
/**
* 转化数据
*
* @param {any} args
* @memberof CustomCalendarBase
*/
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 CustomCalendarBase
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof CustomCalendarBase
*/
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 CustomCalendarBase
*/
@Prop({ default: false }) public isSelectFirstDefault!: boolean;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof CustomCalendarBase
*/
@Prop({ default: true }) public showBusyIndicator?: boolean;
/**
* 部件行为--load
*
* @type {string}
* @memberof CustomCalendarBase
*/
@Prop() public loadAction!: string;
/**
* 打开新建数据视图
*
* @type {any}
* @memberof CustomCalendarBase
*/
@Prop() public newdata: any;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof CustomCalendarBase
*/
@Prop() public opendata: any;
/**
* 日历部件样式名
*
* @public
* @type {any[]}
* @memberof CustomCalendarBase
*/
public calendarClass: string = "calendar";
/**
* this引用
*
* @type {any}
* @memberof CustomCalendarBase
*/
public thisRef: any = this;
/**
* 选中事件element元素
*
* @public
* @type {any[]}
* @memberof CustomCalendarBase
*/
public selectedEventElement:any;
/**
* 引用插件集合
*
* @public
* @type {any[]}
* @memberof CustomCalendarBase
*/
public calendarPlugins: any[] = [
dayGridPlugin,
timeGridPlugin,
listPlugin,
interactionPlugin
];
/**
* 设置头部显示
*
* @public
* @type {}
* @memberof CustomCalendarBase
*/
public header: any = {
left: 'prev,next today gotoDate',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
};
/**
* 按钮文本集合
*
* @public
* @type {}
* @memberof CustomCalendarBase
*/
public buttonText: any = {
today: '今天',
month: '月',
week: '周',
day: '天',
list: '列'
};
/**
* 自定义按钮集合
*
* @public
* @type {}
* @memberof CustomCalendarBase
*/
public customButtons: any = {
gotoDate: {
text: "跳转",
click: this.openDateSelect
}
};
/**
* 模态显示控制变量
*
* @public
* @type boolean
* @memberof CustomCalendarBase
*/
public modalVisible: boolean = false;
/**
* 跳转日期
*
* @public
* @type Date
* @memberof CustomCalendarBase
*/
public selectedGotoDate: Date = new Date();
/**
* 打开时间选择模态
*
* @public
* @memberof CustomCalendarBase
*/
public openDateSelect(){
this.modalVisible = true;
}
/**
* 跳转到指定时间
*
* @public
* @memberof CustomCalendarBase
*/
public gotoDate(){
let appCalendar: any = this.$refs.calendar;
let api = appCalendar.getApi();
api.gotoDate(this.selectedGotoDate);
}
/**
* 有效日期范围
*
* @public
* @type {}
* @memberof CustomCalendarBase
*/
public validRange: any = {
start:"0000-01-01",
end:"9999-12-31"
};
/**
* 默认加载日期
*
* @public
* @type {}
* @memberof CustomCalendarBase
*/
public defaultDate: any = this.$util.dateFormat(new Date());
/**
* 设置按钮文本
*
* @public
* @memberof CustomCalendarBase
*/
public setButtonText(){
this.buttonText.today = this.$t('app.calendar.today'),
this.buttonText.month = this.$t('app.calendar.month'),
this.buttonText.week = this.$t('app.calendar.week'),
this.buttonText.day = this.$t('app.calendar.day'),
this.buttonText.list = this.$t('app.calendar.list')
this.customButtons.gotoDate.text = this.$t('app.calendar.gotoDate')
}
/**
* 监听语言变化
*
* @public
* @memberof CustomCalendarBase
*/
@Watch('$i18n.locale')
public onLocaleChange(newval: any, val: any) {
this.setButtonText();
}
/**
* 日程事件集合
*
* @public
* @type {any[]}
* @memberof CustomCalendarBase
*/
public events: any[] = [];
/**
* 日历项上下文菜单集合
*
* @type {string[]}
* @memberof CustomCalendarBase
*/
public actionModel: any = {
}
/**
* 备份日历项上下文菜单
*
* @type {string[]}
* @memberof CustomCalendarBase
*/
public copyActionModel: any;
/**
* 日历样式类型
*
* @public
* @type {string}
* @memberof CustomCalendarBase
*/
public calendarType: string = "TIMELINE";
/**
* 图例显示控制
*
* @public
* @type {any}
* @memberof CustomCalendarBase
*/
public isShowlegend: any = {
item:true,
};
/**
* 图例点击事件
*
* @public
* @memberof CustomCalendarBase
*/
legendTrigger(itemType:string){
this.isShowlegend[itemType] = !this.isShowlegend[itemType];
this.refresh();
}
/**
* 查询参数缓存
*
* @public
* @type {any}
* @memberof CustomCalendarBase
*/
public searchArgCache: any = {};
/**
* 搜索获取日程事件
*
* @param {*} $event 日期信息
* @memberof CustomCalendarBase
*/
public searchEvents(fetchInfo?:any, successCallback?:any, failureCallback?:any ) {
// 处理请求参数
let start = (fetchInfo && fetchInfo.start) ? this.$util.dateFormat(fetchInfo.start) : null;
let end = (fetchInfo && fetchInfo.end) ? this.$util.dateFormat(fetchInfo.end) : null;
let arg = { start: start, end: end };
if(fetchInfo && fetchInfo.query){
Object.assign(arg,{query : fetchInfo.query});
}
const parentdata: any = {};
this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata);
let tempViewParams: any = parentdata.viewparams ? parentdata.viewparams : {};
Object.assign(tempViewParams, JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(arg, { viewparams: tempViewParams });
// 处理events数据
let _this = this;
let handleEvents = ()=>{
if(_this.isSelectFirstDefault){
// 模拟$event数据
let tempEvent = JSON.parse(JSON.stringify(_this.events.length > 0?_this.events[0]:{}));
_this.onEventClick(tempEvent,true);
if(_this.events.length > 0){
_this.events[0].className = "select-first-event";
}
_this.calendarClass = "calendar select-first-calendar";
}
let filterEvents = this.events.filter((event:any)=>{
return _this.isShowlegend[event.itemType];
});
if(successCallback){
successCallback(filterEvents);
}
// 刷新日历的大小(仅fullcalendar组件使用)
if(!Object.is(_this.calendarType,"TIMELINE")){
let appCalendar: any = _this.$refs.calendar;
let api = appCalendar.getApi();
api.updateSize();
}
}
if(JSON.stringify(arg) === JSON.stringify(this.searchArgCache)){
handleEvents();
return;
}else{
this.searchArgCache = arg;
}
const post: Promise<any> = this.service.search(this.loadAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}
return;
}
// 默认选中第一项
this.events = response.data;
handleEvents();
}, (response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
});
}
/**
* 日期点击事件
*
* @param {*} $event 日期信息
* @memberof CustomCalendarBase
*/
public onDateClick($event: any) {
let date = $event.date;
let datestr = $event.dateStr;
}
/**
* 获取编辑视图信息
*
* @param {*} $event 事件信息
* @memberof CustomCalendarBase
*/
public getEditView(deName: string) {
let view: any = {};
switch(deName){
}
return view;
}
/**
* 日程点击事件
*
* @param {*} $event calendar事件对象或event数据
* @param {*} isOriginData true:$event是原始event数据,false:是组件
* @param {*} $event timeline事件对象
* @memberof CustomCalendarBase
*/
public onEventClick($event: any, isOriginData:boolean = false, $event2?: any) {
// 处理event数据
let event: any = {};
if(isOriginData){
event = JSON.parse(JSON.stringify($event));
}else{
event = Object.assign({title: $event.event.title, start: $event.event.start, end: $event.event.end}, $event.event.extendedProps);
}
// 点击选中样式
let JSelement:any = null;
if(!isOriginData && $event.el){
JSelement = $event.el;
}else if(isOriginData && $event2 && $event2.currentTarget){
JSelement = $event2.currentTarget;
}
if(JSelement){
this.calendarClass = "calendar";
if(this.selectedEventElement){
this.selectedEventElement.classList.remove("selected-event");
}
this.selectedEventElement = JSelement;
this.selectedEventElement.classList.add("selected-event");
}
// 处理上下文数据
let _this = this;
let view: any = {};
let _context: any = Object.assign({},this.context);
let _viewparams:any = Object.assign({start:event.start,end:event.end},this.viewparams);
switch(event.itemType) {
case "item":
_context.ibizbook = event.ibizbook;
view = this.getEditView("ibizbook");
break;
}
this.selections = [event];
// 导航栏中不需要打开视图,只要抛出选中数据
if(this.isSelectFirstDefault){
this.$emit("selectionchange",this.selections);
return;
}
// 根据打开模式打开视图
if(!view.viewname){
return;
} else if (Object.is(view.placement, 'INDEXVIEWTAB') || Object.is(view.placement, '')) {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, this.context, view.deResParameters, view.parameters, [JSON.parse(JSON.stringify(_context))] , _viewparams);
this.$router.push(routePath);
} else {
let container: Subject<any> = new Subject();
if (Object.is(view.placement, 'POPOVER')) {
container = this.$apppopover.openPop(isOriginData ? $event2 : $event.jsEvent, view,JSON.parse(JSON.stringify(_context)), _viewparams);
} else if (Object.is(view.placement, 'POPUPMODAL')) {
container = this.$appmodal.openModal(view, JSON.parse(JSON.stringify(_context)), _viewparams);
} else if (view.placement.startsWith('DRAWER')) {
container = this.$appdrawer.openDrawer(view, JSON.parse(JSON.stringify(_context)), _viewparams);
}
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
// 刷新日历
_this.refresh();
});
}
}
/**
* 日历刷新
*
* @memberof CustomCalendarBase
*/
public refresh(args?:any) {
if(Object.is(this.calendarType,"TIMELINE")){
this.searchEvents();
} else {
let calendarApi = (this.$refs.calendar as any).getApi();
calendarApi.refetchEvents();
}
}
/**
* 日程拖动事件
*
* @param {*} $event 事件信息
* @memberof CustomCalendarBase
*/
public onEventDrop($event: any) {
if(this.isSelectFirstDefault){
return;
}
let arg: any = {};
let _context: any = Object.assign({},this.context);
arg.start = this.$util.dateFormat($event.event.start);
arg.end = this.$util.dateFormat($event.event.end);
let itemType = $event.event._def.extendedProps.itemType;
switch(itemType) {
case "item":
arg.ibizbook = $event.event._def.extendedProps.ibizbook;
_context.ibizbook = $event.event._def.extendedProps.ibizbook;
break;
}
Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.update(itemType, JSON.parse(JSON.stringify(_context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}
return;
}
}, (response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
});
}
/**
* 选中的数据
*
* @returns {any[]}
* @memberof CustomCalendarBase
*/
public selections: any[] = [];
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof CustomCalendarBase
*/
public appStateEvent: Subscription | undefined;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof CustomCalendarBase
*/
public getDatas(): any[] {
return this.selections;
}
/**
* 获取单项数据
*
* @returns {*}
* @memberof CustomCalendarBase
*/
public getData(): any {
return null;
}
/**
* vue 生命周期
*
* @returns
* @memberof CustomCalendarBase
*/
public created() {
this.searchEvents();
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof CustomCalendarBase
*/
public afterCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
});
}
if(AppCenterService && AppCenterService.getMessageCenter()){
this.appStateEvent = AppCenterService.getMessageCenter().subscribe(({ name, action, data }) =>{
if(!Object.is(name,"IBIZBOOK")){
return;
}
if(Object.is(action,'appRefresh')){
this.refresh();
}
})
}
}
/**
* vue 生命周期
*
* @memberof CustomCalendarBase
*/
public mounted(){
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof CustomCalendarBase
*/
public afterMounted(){
let appCalendar: any = this.$refs.calendar;
if(appCalendar){
let api = appCalendar.getApi();
api.updateSize()
}
}
/**
* vue 生命周期
*
* @memberof CustomCalendarBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof CustomCalendarBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
if(this.appStateEvent){
this.appStateEvent.unsubscribe();
}
}
/**
* 计算节点右键权限
*
* @param {*} data 日历项数据
* @param {*} appEntityName 应用实体名称
* @returns
* @memberof CustomCalendarBase
*/
public async computeNodeState(data:any,appEntityName:string) {
let service:any = await this.appEntityService.getService(appEntityName);
if(this.copyActionModel && Object.keys(this.copyActionModel).length > 0) {
if(service['Get'] && service['Get'] instanceof Function){
let tempContext:any = Util.deepCopy(this.context);
tempContext[appEntityName] = data[appEntityName];
let targetData = await service.Get(tempContext,{}, false);
let uiservice:any = await new UIService().getService(appEntityName);
let result: any[] = ViewTool.calcActionItemAuthState(targetData.data,this.copyActionModel,uiservice);
return this.copyActionModel;
}else{
console.warn("获取数据异常");
return this.copyActionModel;
}
}
}
/**
* 事件绘制回调
*
* @param {*} info 信息
* @memberof CustomCalendarBase
*/
public eventRender(info?:any,) {
let data = Object.assign({title: info.event.title, start: info.event.start, end: info.event.end}, info.event.extendedProps);
info.el.addEventListener('contextmenu', (event: MouseEvent) => {
this.copyActionModel = {};
Object.values(this.actionModel).forEach((item:any) =>{
if(Object.is(item.nodeOwner,data.itemType)){
this.copyActionModel[item.name] = item;
}
})
if(Object.keys(this.copyActionModel).length === 0){
return;
}
let dataMapping:any ={'item':'ibizbook'};
this.computeNodeState(data,dataMapping[data.itemType]).then((result:any) => {
let flag:boolean = false;
if(Object.values(result).length>0){
flag =Object.values(result).some((item:any) =>{
return item.visabled === true;
})
}
if(flag){
let props = { data: data, renderContent: this.renderContextMenu };
let component = ContextMenu;
const vm:any = new Vue({
render(h) {
return h(component, { props });
}
}).$mount();
document.body.appendChild(vm.$el);
const comp: any = vm.$children[0];
comp.showContextMenu(event.clientX, event.clientY);
}
});
});
}
/**
* 绘制右键菜单
*
* @param {*} event
* @returns
* @memberof CustomCalendarBase
*/
public renderContextMenu(event: any) {
let content;
if (event && event.itemType) {
const data: any = JSON.parse(JSON.stringify(event));
this.selections = [event];
switch(event.itemType){
}
}
return content;
}
}
</script>
<style lang='less'>
@import './custom-calendar-calendar.less';
</style>
\ No newline at end of file
/**
* CustomCalendar 部件模型
*
* @export
* @class CustomCalendarModel
*/
export default class CustomCalendarModel {
/**
* 日历项类型
*
* @returns {any[]}
* @memberof CustomCalendarCalendarMode
*/
public itemType: string = "";
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof CustomCalendarCalendarMode
*/
public getDataItems(): any[] {
let dataItems: any = [
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'color',
},
{
name: 'textColor',
},
{
name: 'itemType',
},
{
name: 'query',
prop: 'query',
},
];
switch(this.itemType){
case "item":
dataItems = [...dataItems,
{
name: 'ibizbook',
prop: 'ibizbookid'
},
{
name: 'title',
prop: 'ibizbookname'
},
{
name:'start',
prop:'lendouttime'
},
{
name:'end',
prop:'returntime'
},
];
break;
}
return dataItems;
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import IBIZBOOKService from '@/service/ibizbook/ibizbook-service';
import CustomCalendarModel from './custom-calendar-calendar-model';
/**
* CustomCalendar 部件服务对象
*
* @export
* @class CustomCalendarService
*/
export default class CustomCalendarService extends ControlService {
/**
* 图书服务对象
*
* @type {IBIZBOOKService}
* @memberof CustomCalendarService
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof CustomCalendarService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of CustomCalendarService.
*
* @param {*} [opts={}]
* @memberof CustomCalendarService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new CustomCalendarModel();
}
/**
* 事件配置集合
*
* @public
* @type {any[]}
* @memberof CustomCalendar
*/
public eventsConfig: any[] = [
{
itemName : '图书',
itemType : 'item',
color : '',
textColor : '',
},
];
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CustomCalendarService
*/
@Errorlog
public search(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let _this = this;
return new Promise((resolve: any, reject: any) => {
let promises:any = [];
let tempRequest:any;
tempRequest = this.handleRequestData(action,context,data,true,"item");
promises.push(this.appEntityService.FetchDefault(tempRequest.context, tempRequest.data, isloading));
Promise.all(promises).then((resArray: any) => {
let _data:any = [];
resArray.forEach((response:any,resIndex:number) => {
if (!response || response.status !== 200) {
return;
}
let _response: any = JSON.parse(JSON.stringify(response));
_response.data.forEach((item:any,index:number) =>{
_response.data[index].color = _this.eventsConfig[resIndex].color;
_response.data[index].textColor = _this.eventsConfig[resIndex].textColor;
_response.data[index].itemType = _this.eventsConfig[resIndex].itemType;
});
;
_this.handleResponse(action, _response,false,_this.eventsConfig[resIndex].itemType);
_data.push(..._response.data);
});
// 排序
_data.sort((a:any, b:any)=>{
let dateA = new Date(Date.parse(a.start.replace(/-/g, "/")));
let dateB = new Date(Date.parse(b.start.replace(/-/g, "/")));
return dateA > dateB ? 1 : -1 ;
});
let result = {status: 200, data: _data};
resolve(result);
}).catch((response: any) => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CustomCalendarService
*/
@Errorlog
public update(itemType: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => {
let result: any;
let tempRequest:any;
switch(itemType) {
case "item":
tempRequest = this.handleRequestData("",context,data,false,"item");
result = this.appEntityService.Update(tempRequest.context, tempRequest.data, isloading);
break;
}
if(result){
result.then((response: any) => {
this.handleResponse("", response);
resolve(response);
}).catch((response: any) => {
reject(response);
});
}else{
reject("没有匹配的实体服务");
}
});
}
/**
* 处理request请求数据
*
* @param action 行为
* @param data 数据
* @memberof ControlService
*/
public handleRequestData(action: string,context:any ={},data: any = {},isMerge:boolean = false,itemType:string=""){
let model: any = this.getMode();
model.itemType = itemType;
return super.handleRequestData(action,context,data,isMerge);
}
/**
* 处理response返回数据
*
* @param {string} action
* @param {*} response
* @memberof ControlService
*/
public async handleResponse(action: string, response: any,isCreate:boolean = false,itemType:string=""){
let model: any = this.getMode();
model.itemType = itemType;
super.handleResponse(action,response,isCreate);
}
}
\ No newline at end of file
// this is less
@import '~@fullcalendar/core/main.css';
@import '~@fullcalendar/daygrid/main.css';
@import '~@fullcalendar/timegrid/main.css';
@import '~@fullcalendar/list/main.css';
.calendar{
height:100%;
overflow: auto;
.context-menu-container {
height: calc(100% - 70px);
}
.el-timeline{
padding-left: 2px;
}
.app-data-empty{
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.event-legends{
width: 100%;
text-align: center;
.event-lengend{
display: inline-block;
margin-left: 10px;
height: 20px;
.lengend-icon{
display: inline-block;
width: 30px;
height: 20px;
border-radius: 5px;
}
span{
display: inline-block;
margin-left: 5px;
line-height: 20px;
vertical-align: top;
}
}
.event-lengend.event-disabled{
.lengend-icon{
background:#cccccc !important;
}
span{
color:#cccccc !important;
}
}
}
}
// 选中样式
.calendar .selected-event,
.select-first-calendar .select-first-event{
border: 2px solid #ff8711 !important;
}
.calendar .fc-dayGrid-view .selected-event:before,
.select-first-calendar .fc-dayGrid-view .select-first-event:before,
.calendar .fc-timeGrid-view .selected-event:before,
.select-first-calendar .fc-timeGrid-view .select-first-event:before{
content: '';
display: block;
position: absolute;
right: 0;
bottom: 0;
border: 9px solid #ff8711;
border-top-color: transparent;
border-left-color: transparent;
color: #fff;
}
.calendar .fc-dayGrid-view .selected-event:after,
.select-first-calendar .fc-dayGrid-view .select-first-event:after,
.calendar .fc-timeGrid-view .selected-event:after,
.select-first-calendar .fc-timeGrid-view .select-first-event:after{
content: '';
display: block;
width: 4px;
height: 11px;
position: absolute;
right: 1px;
bottom: 0px;
border: 2px solid #fff;
border-top-color: transparent;
border-left-color: transparent;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
box-sizing: content-box;
}
// 选择跳转日期模态
.date-select-modal{
display: flex;
align-items: center;
justify-content: center;
.ivu-modal{
top: 0;
.ivu-modal-body {
text-align: center;
}
}
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import CustomCalendarBase from './custom-calendar-calendar-base.vue';
@Component({
components: {
}
})
export default class CustomCalendar extends CustomCalendarBase {
}
</script>
\ No newline at end of file
......@@ -37,11 +37,6 @@
git clone -b master $para2 demosys/
export NODE_OPTIONS=--max-old-space-size=4096
cd demosys/
mvn clean package -Pdemoapi
cd demo-provider/demo-provider-demoapi
mvn -Pdemoapi docker:build
mvn -Pdemoapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/demo-provider-demoapi.yaml iBizDemo --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
......@@ -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":"menuitem17" , "name":"向导面板" , "items":[{ "id":"menuitem134" , "name":"基础用法" },{ "id":"menuitem135" , "name":"状态属性" }]},{ "id":"menuitem14" , "name":"树视图" , "items":[{ "id":"menuitem60" , "name":"静态节点" },{ "id":"menuitem61" , "name":"动态节点(代码表)" },{ "id":"menuitem62" , "name":"动态节点(实体)" },{ "id":"menuitem63" , "name":"右键操作" }]},{ "id":"menuitem110" , "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":"menuitem95" , "name":"日历" , "items":[{ "id":"menuitem96" , "name":"内置功能" },{ "id":"menuitem97" , "name":"时间轴样式" },{ "id":"menuitem109" , "name":"项布局面板" }]},{ "id":"menuitem101" , "name":"看板" , "items":[{ "id":"menuitem102" , "name":"看板内置功能" },{ "id":"menuitem104" , "name":"代码表分组" },{ "id":"menuitem105" , "name":"嵌入视图面板" }]},{ "id":"menuitem111" , "name":"甘特图" , "items":[{ "id":"menuitem112" , "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":"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":"menuitem17" , "name":"向导面板" , "items":[{ "id":"menuitem134" , "name":"基础用法" },{ "id":"menuitem135" , "name":"状态属性" }]},{ "id":"menuitem14" , "name":"树视图" , "items":[{ "id":"menuitem60" , "name":"静态节点" },{ "id":"menuitem61" , "name":"动态节点(代码表)" },{ "id":"menuitem62" , "name":"动态节点(实体)" },{ "id":"menuitem63" , "name":"右键操作" }]},{ "id":"menuitem110" , "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":"menuitem95" , "name":"日历" , "items":[{ "id":"menuitem96" , "name":"内置功能" },{ "id":"menuitem97" , "name":"时间轴样式" },{ "id":"menuitem109" , "name":"项布局面板" },{ "id":"menuitem64" , "name":"自定义插件" }]},{ "id":"menuitem101" , "name":"看板" , "items":[{ "id":"menuitem102" , "name":"看板内置功能" },{ "id":"menuitem104" , "name":"代码表分组" },{ "id":"menuitem105" , "name":"嵌入视图面板" }]},{ "id":"menuitem111" , "name":"甘特图" , "items":[{ "id":"menuitem112" , "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":"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":"编辑器数据补充" }]}] }]
}
]
}
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /demo-provider-demoapi.jar
EXPOSE 51000
EXPOSE 8081
ADD demo-provider-demoapi.jar /demo-provider-demoapi.jar
......@@ -3,24 +3,9 @@ services:
demo-provider-demoapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/demo-provider-demoapi:latest
ports:
- "51000:51000"
- "8081:8081"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=51000
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_df847bdfd
- SPRING_DATASOURCE_PASSWORD=3d6@460A
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_df847bdfd?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_df847bdfd
- NACOS=172.16.240.110:8848
- SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy:
resources:
limits:
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册