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

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

上级 04be4580
......@@ -495,6 +495,14 @@
"viewname": "IBIZStorageEditView",
"viewtag": "75f6b59b25762a8faf7c795e94370834"
},
"ibizbookusr3calendarview": {
"title": "图书日历视图(项布局面板)",
"caption": "图书",
"viewtype": "DECALENDARVIEW",
"viewmodule": "Sample",
"viewname": "IBIZBOOKUsr3CalendarView",
"viewtag": "794fbfb192285c60dc9ce640270d79c0"
},
"ibizsample0002pickupgridview": {
"title": "首页图表数据源选择表格视图",
"caption": "示例实体02",
......
......@@ -229,6 +229,7 @@ export default {
menuitem95: "日历",
menuitem96: "内置功能",
menuitem97: "时间轴样式",
menuitem109: "项布局面板",
menuitem101: "看板",
menuitem102: "看板内置功能",
menuitem104: "代码表分组",
......
......@@ -229,6 +229,7 @@ export default {
menuitem95: "日历",
menuitem96: "内置功能",
menuitem97: "时间轴样式",
menuitem109: "项布局面板",
menuitem101: "看板",
menuitem102: "看板内置功能",
menuitem104: "代码表分组",
......
......@@ -50,6 +50,10 @@ export default {
caption: "图书",
title: "图书表格视图(远程聚合)",
},
usr3calendarview: {
caption: "图书",
title: "图书日历视图(项布局面板)",
},
usr4gridview: {
caption: "图书",
title: "图书表格视图(当前页本地聚合)",
......@@ -1011,4 +1015,9 @@ export default {
refresh: "刷新",
},
},
ibizbookpanel_calendar: {
nodata:"",
uiactions: {
},
},
};
\ No newline at end of file
......@@ -49,6 +49,10 @@ export default {
caption: "图书",
title: "图书表格视图(远程聚合)",
},
usr3calendarview: {
caption: "图书",
title: "图书日历视图(项布局面板)",
},
usr4gridview: {
caption: "图书",
title: "图书表格视图(当前页本地聚合)",
......@@ -1010,4 +1014,9 @@ export default {
refresh: "刷新",
},
},
ibizbookpanel_calendar: {
nodata:"",
uiactions: {
},
},
};
\ No newline at end of file
......@@ -1213,6 +1213,24 @@ mock.onGet('v7/main-menuappmenu').reply((config: any) => {
textcls: '',
appfunctag: 'AppFunc21',
resourcetag: '',
},
{
id: '9B9CBBC9-5774-45FB-8060-18A69D74D1F3',
name: 'menuitem109',
text: '项布局面板',
type: 'MENUITEM',
counterid: '',
tooltip: '项布局面板',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc29',
resourcetag: '',
},
],
},
......
......@@ -503,6 +503,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "IBIZStorageEditView",
"viewtag": "75f6b59b25762a8faf7c795e94370834"
},
"ibizbookusr3calendarview": {
"title": "图书日历视图(项布局面板)",
"caption": "图书",
"viewtype": "DECALENDARVIEW",
"viewmodule": "Sample",
"viewname": "IBIZBOOKUsr3CalendarView",
"viewtag": "794fbfb192285c60dc9ce640270d79c0"
},
"ibizsample0002pickupgridview": {
"title": "首页图表数据源选择表格视图",
"caption": "示例实体02",
......
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import IBIZBOOKUsr3CalendarViewBase from './ibizbookusr3-calendar-view-base.vue';
import view_calendar from '@widgets/ibizbook/ibizbookpanel-calendar/ibizbookpanel-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 IBIZBOOKUsr3CalendarView extends IBIZBOOKUsr3CalendarViewBase {
}
</script>
\ No newline at end of file
......@@ -60,6 +60,7 @@ export const PageComponents = {
Vue.component('ibizorder-usr2-edit-view', () => import('@pages/sample/ibizorder-usr2-edit-view/ibizorder-usr2-edit-view.vue'));
Vue.component('ibizorder-sf4-edit-view', () => import('@pages/sample/ibizorder-sf4-edit-view/ibizorder-sf4-edit-view.vue'));
Vue.component('ibizorder-sf1-edit-view', () => import('@pages/sample/ibizorder-sf1-edit-view/ibizorder-sf1-edit-view.vue'));
Vue.component('ibizbookusr3-calendar-view', () => import('@pages/sample/ibizbookusr3-calendar-view/ibizbookusr3-calendar-view.vue'));
Vue.component('ibizsample0017-grid-view', () => import('@pages/sample/ibizsample0017-grid-view/ibizsample0017-grid-view.vue'));
Vue.component('ibizorder-f8-edit-view', () => import('@pages/sample/ibizorder-f8-edit-view/ibizorder-f8-edit-view.vue'));
Vue.component('ibizsample0003-f1-tree-exp-view', () => import('@pages/sample/ibizsample0003-f1-tree-exp-view/ibizsample0003-f1-tree-exp-view.vue'));
......
......@@ -920,6 +920,20 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizorder-sf1-edit-view/ibizorder-sf1-edit-view.vue'),
},
{
path: 'ibizbooks/:ibizbook?/usr3calendarview/:usr3calendarview?',
meta: {
caption: 'entities.ibizbook.views.usr3calendarview.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr3calendarview', parameterName: 'usr3calendarview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookusr3-calendar-view/ibizbookusr3-calendar-view.vue'),
},
{
path: 'ibizsample0017s/:ibizsample0017?/gridview/:gridview?',
meta: {
......@@ -2758,6 +2772,19 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizstorage-edit-view/ibizstorage-edit-view.vue'),
},
{
path: '/ibizbooks/:ibizbook?/usr3calendarview/:usr3calendarview?',
meta: {
caption: 'entities.ibizbook.views.usr3calendarview.caption',
info:'',
parameters: [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr3calendarview', parameterName: 'usr3calendarview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookusr3-calendar-view/ibizbookusr3-calendar-view.vue'),
},
{
path: '/ibizsample0002s/:ibizsample0002?/pickupgridview/:pickupgridview?',
meta: {
......
......@@ -222,6 +222,7 @@ export const viewstate: any = {
'836bdb4063978b55fedd6a180d60c323',
'e54ae8e27a53b3425ac78a229a163bd5',
'369a14f21cbff0d0fe23831aecfca7ba',
'794fbfb192285c60dc9ce640270d79c0',
'00a0716a2029a7fe79fe03b6f74c7c90',
'2b42718d8fb3b4c9a01651222304445a',
'a894de140705ecab2f39797d2922a3ce',
......@@ -647,6 +648,15 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '794fbfb192285c60dc9ce640270d79c0',
viewmodule: 'Sample',
viewname: 'IBIZBOOKUsr3CalendarView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '7a334494f71d4328c743657a6429ee03',
viewmodule: 'Sample',
......
......@@ -104,6 +104,7 @@ export default class IBIZBOOKUIServiceBase extends UIService {
this.allViewMap.set(':',{viewname:'valuerulesgridview',srfappde:'ibizbooks',component:'ibizbookvalue-rules-grid-view'});
this.allViewMap.set(':',{viewname:'interfunctreeview',srfappde:'ibizbooks',component:'ibizbookinter-func-tree-view'});
this.allViewMap.set(':',{viewname:'usr5gridview',srfappde:'ibizbooks',component:'ibizbookusr5-grid-view'});
this.allViewMap.set(':',{viewname:'usr3calendarview',srfappde:'ibizbooks',component:'ibizbookusr3-calendar-view'});
this.allViewMap.set(':',{viewname:'usr4gridview',srfappde:'ibizbooks',component:'ibizbookusr4-grid-view'});
this.allViewMap.set(':',{viewname:'interfunckanbanview',srfappde:'ibizbooks',component:'ibizbookinter-func-kan-ban-view'});
this.allViewMap.set(':',{viewname:'haspanelkanbanview',srfappde:'ibizbooks',component:'ibizbookhas-panel-kan-ban-view'});
......
......@@ -536,6 +536,9 @@ export default class MainMenuBase extends Vue implements ControlInterface {
case 'Auto262':
this.clickAuto262(item);
return;
case 'AppFunc29':
this.clickAppFunc29(item);
return;
case 'AppFunc18':
this.clickAppFunc18(item);
return;
......@@ -914,6 +917,29 @@ export default class MainMenuBase extends Vue implements ControlInterface {
})
}
/**
* 功能名称
*
* @param {*} [item={}]
* @memberof MainMenu
*/
public clickAppFunc29(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr3calendarview', parameterName: 'usr3calendarview' },
];
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);
})
}
/**
* 补充示例数据
*
......
......@@ -1283,6 +1283,25 @@ export default class MainMenuModel {
appfunctag: 'AppFunc21',
resourcetag: '',
authtag:'Web-MainMenu-menuitem97',
},
{
id: '9B9CBBC9-5774-45FB-8060-18A69D74D1F3',
name: 'menuitem109',
text: '项布局面板',
type: 'MENUITEM',
counterid: '',
tooltip: '项布局面板',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc29',
resourcetag: '',
authtag:'Web-MainMenu-menuitem109',
},
],
},
......
/**
* IBIZBOOKPANEL 部件模型
*
* @export
* @class IBIZBOOKPANELModel
*/
export default class IBIZBOOKPANELModel {
/**
* 日历项类型
*
* @returns {any[]}
* @memberof IBIZBOOKPANELCalendarMode
*/
public itemType: string = "";
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof IBIZBOOKPANELCalendarMode
*/
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 "item1":
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 IBIZBOOKPANELModel from './ibizbookpanel-calendar-model';
/**
* IBIZBOOKPANEL 部件服务对象
*
* @export
* @class IBIZBOOKPANELService
*/
export default class IBIZBOOKPANELService extends ControlService {
/**
* 图书服务对象
*
* @type {IBIZBOOKService}
* @memberof IBIZBOOKPANELService
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof IBIZBOOKPANELService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of IBIZBOOKPANELService.
*
* @param {*} [opts={}]
* @memberof IBIZBOOKPANELService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new IBIZBOOKPANELModel();
}
/**
* 事件配置集合
*
* @public
* @type {any[]}
* @memberof IBIZBOOKPANEL
*/
public eventsConfig: any[] = [
{
itemName : '图书管理',
itemType : 'item1',
color : '',
textColor : '',
},
];
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKPANELService
*/
@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,"item1");
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 IBIZBOOKPANELService
*/
@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 "item1":
tempRequest = this.handleRequestData("",context,data,false,"item1");
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;
.el-timeline{
padding-left: 2px;
}
.app-data-empty{
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
}
.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 IBIZBOOKPANELBase from './ibizbookpanel-calendar-base.vue';
import layout_item1layoutpanel from '@widgets/ibizbook/has-panel-kan-ban-panel/has-panel-kan-ban-panel.vue';
@Component({
components: {
layout_item1layoutpanel,
}
})
export default class IBIZBOOKPANEL extends IBIZBOOKPANELBase {
}
</script>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册