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

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

上级 ee35d1ca
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
<context-menu-container> <context-menu-container>
<template v-if="events.length >0"> <template v-if="events.length >0">
<div class="event-legends"> <div class="event-legends">
<div :class="{'event-lengend':true, 'item1':true, 'event-disabled':!isShowlegend.item1}" @click="legendTrigger('item1')">
<div class="lengend-icon" style="background:;"></div>
<span style="color:;">借书日记</span>
</div>
</div> </div>
<FullCalendar <FullCalendar
ref="calendar" ref="calendar"
...@@ -435,6 +439,7 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface { ...@@ -435,6 +439,7 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
* @memberof IBIZBOOKMONTHBase * @memberof IBIZBOOKMONTHBase
*/ */
public isShowlegend: any = { public isShowlegend: any = {
item1:true,
}; };
/** /**
...@@ -587,6 +592,10 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface { ...@@ -587,6 +592,10 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
let view: any = {}; let view: any = {};
let _context: any = Object.assign({},this.context); let _context: any = Object.assign({},this.context);
switch(event.itemType) { switch(event.itemType) {
case "item1":
_context.ibizbook = event.ibizbook;
view = this.getEditView("ibizbook");
break;
} }
this.selections = [event]; this.selections = [event];
// 导航栏中不需要打开视图,只要抛出选中数据 // 导航栏中不需要打开视图,只要抛出选中数据
...@@ -649,6 +658,10 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface { ...@@ -649,6 +658,10 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
arg.end = this.$util.dateFormat($event.event.end); arg.end = this.$util.dateFormat($event.event.end);
let itemType = $event.event._def.extendedProps.itemType; let itemType = $event.event._def.extendedProps.itemType;
switch(itemType) { switch(itemType) {
case "item1":
arg.ibizbook = $event.event._def.extendedProps.ibizbook;
_context.ibizbook = $event.event._def.extendedProps.ibizbook;
break;
} }
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.update(itemType, JSON.parse(JSON.stringify(_context)), arg, this.showBusyIndicator); const post: Promise<any> = this.service.update(itemType, JSON.parse(JSON.stringify(_context)), arg, this.showBusyIndicator);
...@@ -831,7 +844,7 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface { ...@@ -831,7 +844,7 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
if(Object.keys(this.copyActionModel).length === 0){ if(Object.keys(this.copyActionModel).length === 0){
return; return;
} }
let dataMapping:any ={}; let dataMapping:any ={'item1':'ibizbook'};
this.computeNodeState(data,dataMapping[data.itemType]).then((result:any) => { this.computeNodeState(data,dataMapping[data.itemType]).then((result:any) => {
let flag:boolean = false; let flag:boolean = false;
if(Object.values(result).length>0){ if(Object.values(result).length>0){
......
...@@ -43,6 +43,26 @@ export default class IBIZBOOKMONTHModel { ...@@ -43,6 +43,26 @@ export default class IBIZBOOKMONTHModel {
}, },
]; ];
switch(this.itemType){ switch(this.itemType){
case "item1":
dataItems = [...dataItems,
{
name: 'ibizbook',
prop: 'ibizbookid'
},
{
name: 'title',
prop: 'ibizbookname'
},
{
name:'start',
prop:'lendouttime'
},
{
name:'end',
prop:'returntime'
},
];
break;
} }
return dataItems; return dataItems;
} }
......
...@@ -50,6 +50,12 @@ export default class IBIZBOOKMONTHService extends ControlService { ...@@ -50,6 +50,12 @@ export default class IBIZBOOKMONTHService extends ControlService {
* @memberof IBIZBOOKMONTH * @memberof IBIZBOOKMONTH
*/ */
public eventsConfig: any[] = [ public eventsConfig: any[] = [
{
itemName : '借书日记',
itemType : 'item1',
color : '',
textColor : '',
},
]; ];
/** /**
...@@ -68,6 +74,8 @@ export default class IBIZBOOKMONTHService extends ControlService { ...@@ -68,6 +74,8 @@ export default class IBIZBOOKMONTHService extends ControlService {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let promises:any = []; let promises:any = [];
let tempRequest:any; let tempRequest:any;
tempRequest = this.handleRequestData(action,context,data,true,"item1");
promises.push(this.appEntityService.FetchDefault(tempRequest.context, tempRequest.data, isloading));
Promise.all(promises).then((resArray: any) => { Promise.all(promises).then((resArray: any) => {
let _data:any = []; let _data:any = [];
resArray.forEach((response:any,resIndex:number) => { resArray.forEach((response:any,resIndex:number) => {
...@@ -114,6 +122,10 @@ export default class IBIZBOOKMONTHService extends ControlService { ...@@ -114,6 +122,10 @@ export default class IBIZBOOKMONTHService extends ControlService {
let result: any; let result: any;
let tempRequest:any; let tempRequest:any;
switch(itemType) { switch(itemType) {
case "item1":
tempRequest = this.handleRequestData("",context,data,false,"item1");
result = this.appEntityService.Update(tempRequest.context, tempRequest.data, isloading);
break;
} }
if(result){ if(result){
result.then((response: any) => { result.then((response: any) => {
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
placement="top"> placement="top">
<context-menu :contextMenuStyle="{width: '100%'}" :data="item" :renderContent="renderContextMenu"> <context-menu :contextMenuStyle="{width: '100%'}" :data="item" :renderContent="renderContextMenu">
<el-card @click.native="onEventClick(item,true,$event)" :class="item.className"> <el-card @click.native="onEventClick(item,true,$event)" :class="item.className">
<div v-if="false && item.itemType == 'item1'">
</div>
<div v-else> <div v-else>
<h4>{{item.title}}</h4> <h4>{{item.title}}</h4>
<p>{{$t('app.calendar.from')}} {{item.start}} {{$t('app.calendar.to')}} {{item.end}}</p> <p>{{$t('app.calendar.from')}} {{item.start}} {{$t('app.calendar.to')}} {{item.end}}</p>
...@@ -428,6 +430,7 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac ...@@ -428,6 +430,7 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
* @memberof IBIZBOOKTIMELINEBase * @memberof IBIZBOOKTIMELINEBase
*/ */
public isShowlegend: any = { public isShowlegend: any = {
item1:true,
}; };
/** /**
...@@ -580,6 +583,10 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac ...@@ -580,6 +583,10 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
let view: any = {}; let view: any = {};
let _context: any = Object.assign({},this.context); let _context: any = Object.assign({},this.context);
switch(event.itemType) { switch(event.itemType) {
case "item1":
_context.ibizbook = event.ibizbook;
view = this.getEditView("ibizbook");
break;
} }
this.selections = [event]; this.selections = [event];
// 导航栏中不需要打开视图,只要抛出选中数据 // 导航栏中不需要打开视图,只要抛出选中数据
...@@ -642,6 +649,10 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac ...@@ -642,6 +649,10 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
arg.end = this.$util.dateFormat($event.event.end); arg.end = this.$util.dateFormat($event.event.end);
let itemType = $event.event._def.extendedProps.itemType; let itemType = $event.event._def.extendedProps.itemType;
switch(itemType) { switch(itemType) {
case "item1":
arg.ibizbook = $event.event._def.extendedProps.ibizbook;
_context.ibizbook = $event.event._def.extendedProps.ibizbook;
break;
} }
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.update(itemType, JSON.parse(JSON.stringify(_context)), arg, this.showBusyIndicator); const post: Promise<any> = this.service.update(itemType, JSON.parse(JSON.stringify(_context)), arg, this.showBusyIndicator);
...@@ -824,7 +835,7 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac ...@@ -824,7 +835,7 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
if(Object.keys(this.copyActionModel).length === 0){ if(Object.keys(this.copyActionModel).length === 0){
return; return;
} }
let dataMapping:any ={}; let dataMapping:any ={'item1':'ibizbook'};
this.computeNodeState(data,dataMapping[data.itemType]).then((result:any) => { this.computeNodeState(data,dataMapping[data.itemType]).then((result:any) => {
let flag:boolean = false; let flag:boolean = false;
if(Object.values(result).length>0){ if(Object.values(result).length>0){
......
...@@ -43,6 +43,26 @@ export default class IBIZBOOKTIMELINEModel { ...@@ -43,6 +43,26 @@ export default class IBIZBOOKTIMELINEModel {
}, },
]; ];
switch(this.itemType){ switch(this.itemType){
case "item1":
dataItems = [...dataItems,
{
name: 'ibizbook',
prop: 'ibizbookid'
},
{
name: 'title',
prop: 'ibizbookname'
},
{
name:'start',
prop:'lendouttime'
},
{
name:'end',
prop:'returntime'
},
];
break;
} }
return dataItems; return dataItems;
} }
......
...@@ -50,6 +50,12 @@ export default class IBIZBOOKTIMELINEService extends ControlService { ...@@ -50,6 +50,12 @@ export default class IBIZBOOKTIMELINEService extends ControlService {
* @memberof IBIZBOOKTIMELINE * @memberof IBIZBOOKTIMELINE
*/ */
public eventsConfig: any[] = [ public eventsConfig: any[] = [
{
itemName : '借书日记',
itemType : 'item1',
color : '',
textColor : '',
},
]; ];
/** /**
...@@ -68,6 +74,8 @@ export default class IBIZBOOKTIMELINEService extends ControlService { ...@@ -68,6 +74,8 @@ export default class IBIZBOOKTIMELINEService extends ControlService {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let promises:any = []; let promises:any = [];
let tempRequest:any; let tempRequest:any;
tempRequest = this.handleRequestData(action,context,data,true,"item1");
promises.push(this.appEntityService.FetchDefault(tempRequest.context, tempRequest.data, isloading));
Promise.all(promises).then((resArray: any) => { Promise.all(promises).then((resArray: any) => {
let _data:any = []; let _data:any = [];
resArray.forEach((response:any,resIndex:number) => { resArray.forEach((response:any,resIndex:number) => {
...@@ -114,6 +122,10 @@ export default class IBIZBOOKTIMELINEService extends ControlService { ...@@ -114,6 +122,10 @@ export default class IBIZBOOKTIMELINEService extends ControlService {
let result: any; let result: any;
let tempRequest:any; let tempRequest:any;
switch(itemType) { switch(itemType) {
case "item1":
tempRequest = this.handleRequestData("",context,data,false,"item1");
result = this.appEntityService.Update(tempRequest.context, tempRequest.data, isloading);
break;
} }
if(result){ if(result){
result.then((response: any) => { result.then((response: any) => {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册