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

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

上级 6d68cda5
......@@ -15,6 +15,11 @@
<template slot="empty">
{{$t('entities.ibizbook.treetable_treegridex.nodata')}}
</template>
<el-table-column show-overflow-tooltip prop="author" label="" :width="50" :align="''">
<template v-slot="{ row }">
<span>{{ getColumnValue(row, 'author') }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="subtext" label="" :width="50" :align="''">
<template v-slot="{ row }">
<span>{{ getColumnValue(row, 'subtext') }}</span>
......@@ -25,11 +30,6 @@
<span>{{ getColumnValue(row, 'ibizbookname') }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="author" label="" :width="50" :align="''">
<template v-slot="{ row }">
<span>{{ getColumnValue(row, 'author') }}</span>
</template>
</el-table-column>
</el-table>
</template>
......
......@@ -237,13 +237,29 @@ export default class UsrBase extends Vue implements ControlInterface {
},
labelField: 'text',
columns: [
{
label: '图书名称',
value: 'ibizbookname',
render: (task: any) => {
return this.getColumnValue(task, 'ibizbookname')
},
width: 200,
},
{
label: '出版社',
value: 'press',
render: (task: any) => {
return this.getColumnValue(task, 'press')
},
width: 200,
},
{
label: '作者',
value: 'author',
render: (task: any) => {
return this.getColumnValue(task, 'author')
},
width: 50,
width: 200,
},
{
label: '借出日期',
......@@ -251,7 +267,7 @@ export default class UsrBase extends Vue implements ControlInterface {
render: (task: any) => {
return this.getColumnValue(task, 'lendouttime')
},
width: 50,
width: 200,
},
{
label: '归还日期',
......@@ -259,23 +275,7 @@ export default class UsrBase extends Vue implements ControlInterface {
render: (task: any) => {
return this.getColumnValue(task, 'returntime')
},
width: 50,
},
{
label: '图书名称',
value: 'ibizbookname',
render: (task: any) => {
return this.getColumnValue(task, 'ibizbookname')
},
width: 50,
},
{
label: '出版社',
value: 'press',
render: (task: any) => {
return this.getColumnValue(task, 'press')
},
width: 50,
width: 200,
},
]
}
......@@ -329,7 +329,10 @@ export default class UsrBase extends Vue implements ControlInterface {
if(Object.is(task.id.split(';')[0], 'ROOT')) {
return task[field];
}
if(Object.is(task.id.split(';')[0], 'IBIZBOOKMANAGE')) {
if(Object.is(task.id.split(';')[0], 'item1')) {
return task[field];
}
if(Object.is(task.id.split(';')[0], 'item')) {
return task[field];
}
}
......
......@@ -46,7 +46,7 @@ export default class UsrModel {
},
];
switch(this.itemType){
case "IBIZBOOKMANAGE":
case "item1":
dataItems = [...dataItems,
{
name: 'id',
......
......@@ -71,6 +71,15 @@ export default class UsrService extends ControlService {
*/
public TREENODE_ROOT: string = 'ROOT';
/**
* 图书管理日志节点分隔符号
*
* @public
* @type {string}
* @memberof UsrService
*/
public TREENODE_ITEM1: string = 'item1';
/**
* 埃毕致图书管理节点分隔符号
*
......@@ -78,7 +87,7 @@ export default class UsrService extends ControlService {
* @type {string}
* @memberof UsrService
*/
public TREENODE_IBIZBOOKMANAGE: string = 'IBIZBOOKMANAGE';
public TREENODE_ITEM: string = 'item';
/**
* 商品类别节点分隔符号
......@@ -90,7 +99,9 @@ export default class UsrService extends ControlService {
public dataModel: any = {
ROOT: {
},
IBIZBOOKMANAGE: {
item1: {
},
item: {
},
}
......@@ -176,8 +187,12 @@ export default class UsrService extends ControlService {
await this.fillRootNodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
if (Object.is(strNodeType, this.TREENODE_IBIZBOOKMANAGE)) {
await this.fillIbizbookmanageNodeChilds(context,filter, list);
if (Object.is(strNodeType, this.TREENODE_ITEM1)) {
await this.fillItem1NodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
if (Object.is(strNodeType, this.TREENODE_ITEM)) {
await this.fillItemNodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
return Promise.resolve({ status: 500, data: { title: '失败', message: `树节点${strTreeNodeId}标识无效` } });
......@@ -241,21 +256,21 @@ export default class UsrService extends ControlService {
public async fillRootNodeChilds(context:any={}, filter: any, list: any[]): Promise<any> {
if (filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")) {
// 填充埃毕致图书管理
let IbizbookmanageRsNavContext:any = {};
let IbizbookmanageRsNavParams:any = {};
let IbizbookmanageRsParams:any = {};
await this.fillIbizbookmanageNodes(context, filter, list ,IbizbookmanageRsNavContext,IbizbookmanageRsNavParams,IbizbookmanageRsParams);
let ItemRsNavContext:any = {};
let ItemRsNavParams:any = {};
let ItemRsParams:any = {};
await this.fillItemNodes(context, filter, list ,ItemRsNavContext,ItemRsNavParams,ItemRsParams);
} else {
// 填充埃毕致图书管理
let IbizbookmanageRsNavContext:any = {};
let IbizbookmanageRsNavParams:any = {};
let IbizbookmanageRsParams:any = {};
await this.fillIbizbookmanageNodes(context, filter, list ,IbizbookmanageRsNavContext,IbizbookmanageRsNavParams,IbizbookmanageRsParams);
let ItemRsNavContext:any = {};
let ItemRsNavParams:any = {};
let ItemRsParams:any = {};
await this.fillItemNodes(context, filter, list ,ItemRsNavContext,ItemRsNavParams,ItemRsParams);
}
}
/**
* 填充 树视图节点[埃毕致图书管理]
* 填充 树视图节点[图书管理日志]
*
* @public
* @param {any{}} context
......@@ -268,7 +283,7 @@ export default class UsrService extends ControlService {
* @memberof UsrService
*/
@Errorlog
public fillIbizbookmanageNodes(context:any={},filter: any, list: any[],rsNavContext?:any,rsNavParams?:any,rsParams?:any): Promise<any> {
public fillItem1Nodes(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) =>{
......@@ -277,7 +292,7 @@ export default class UsrService extends ControlService {
let bFirst: boolean = true;
let records: any[] = [];
try {
this.searchIbizbookmanage(context, searchFilter, filter).then((records:any) =>{
this.searchItem1(context, searchFilter, filter).then((records:any) =>{
if(records && records.length >0){
records.forEach((entity: any) => {
let treeNode: any = {};
......@@ -291,7 +306,7 @@ export default class UsrService extends ControlService {
Object.assign(treeNode,{'ibizbook':strId});
Object.assign(treeNode, { srfkey: strId });
Object.assign(treeNode, { text: strText, srfmajortext: strText });
let strNodeId: string = 'IBIZBOOKMANAGE';
let strNodeId: string = 'item1';
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += strId;
Object.assign(treeNode, { id: strNodeId + '_#_' + filter.srfnodeid });
......@@ -303,8 +318,8 @@ export default class UsrService extends ControlService {
if(!Object.is(filter.srfnodeid, this.TREENODE_ROOT)) {
Object.assign(treeNode, { parentId: filter.srfotherkey });
}
for(let key in this.dataModel.IBIZBOOKMANAGE) {
let item = this.dataModel.IBIZBOOKMANAGE[key];
for(let key in this.dataModel.item1) {
let item = this.dataModel.item1[key];
let propVal: any = entity[item.prop];
try {
let def: any = JSON.parse(item.default);
......@@ -346,7 +361,7 @@ export default class UsrService extends ControlService {
* @memberof TestEnetityDatasService
*/
@Errorlog
public searchIbizbookmanage(context:any={}, searchFilter: any, filter: any): Promise<any> {
public searchItem1(context:any={}, searchFilter: any, filter: any): Promise<any> {
return new Promise((resolve:any,reject:any) =>{
if(filter.viewparams){
Object.assign(searchFilter,filter.viewparams);
......@@ -389,6 +404,68 @@ export default class UsrService extends ControlService {
})
}
/**
* 填充 树视图节点[图书管理日志]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof UsrService
*/
@Errorlog
public async fillItem1NodeChilds(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 UsrService
*/
@Errorlog
public fillItemNodes(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.ibizbook.usr_gantt.nodes.item' });
Object.assign(treeNode, { isUseLangRes: true });
Object.assign(treeNode,{srfappctx:context});
Object.assign(treeNode, { srfmajortext: treeNode.text });
let strNodeId: string = 'item';
// 没有指定节点值,直接使用父节点值
Object.assign(treeNode, { srfkey: filter.strRealNodeId });
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += filter.strRealNodeId;
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);
});
}
/**
* 填充 树视图节点[埃毕致图书管理]子节点
*
......@@ -400,9 +477,19 @@ export default class UsrService extends ControlService {
* @memberof UsrService
*/
@Errorlog
public async fillIbizbookmanageNodeChilds(context:any={}, filter: any, list: any[]): Promise<any> {
public async fillItemNodeChilds(context:any={}, filter: any, list: any[]): Promise<any> {
if (filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")) {
// 填充图书管理日志
let Item1RsNavContext:any = {};
let Item1RsNavParams:any = {};
let Item1RsParams:any = {};
await this.fillItem1Nodes(context, filter, list ,Item1RsNavContext,Item1RsNavParams,Item1RsParams);
} else {
// 填充图书管理日志
let Item1RsNavContext:any = {};
let Item1RsNavParams:any = {};
let Item1RsParams:any = {};
await this.fillItem1Nodes(context, filter, list ,Item1RsNavContext,Item1RsNavParams,Item1RsParams);
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册