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

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

上级 64ad8d9b
......@@ -1991,6 +1991,7 @@ export default {
nodata:"",
nodes: {
orderstatus: "订单状态",
orderdata: "所有订单",
ordertype: "订单类型",
root: "默认根节点",
},
......
......@@ -1990,6 +1990,7 @@ export default {
nodata:"",
nodes: {
orderstatus: "订单状态",
orderdata: "所有订单",
ordertype: "订单类型",
root: "默认根节点",
},
......
......@@ -739,6 +739,7 @@ export const viewstate: any = {
viewaction: '',
viewdatachange: false,
refviews: [
'2567fdd6130699509d22512564bbb650',
'ac9add3724d90fba46e7298ac051fa5f',
],
},
......
......@@ -15,11 +15,6 @@
<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>
......@@ -30,6 +25,11 @@
<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,6 +237,14 @@ export default class UsrBase extends Vue implements ControlInterface {
},
labelField: 'text',
columns: [
{
label: '归还日期',
value: 'returntime',
render: (task: any) => {
return this.getColumnValue(task, 'returntime')
},
width: 200,
},
{
label: '图书名称',
value: 'ibizbookname',
......@@ -269,14 +277,6 @@ export default class UsrBase extends Vue implements ControlInterface {
},
width: 200,
},
{
label: '归还日期',
value: 'returntime',
render: (task: any) => {
return this.getColumnValue(task, 'returntime')
},
width: 200,
},
]
}
};
......
......@@ -80,6 +80,15 @@ export default class TreeExpService extends ControlService {
*/
public TREENODE_ORDERSTATUS: string = 'orderstatus';
/**
* 订单数据节点分隔符号
*
* @public
* @type {string}
* @memberof TreeExpService
*/
public TREENODE_ORDERDATA: string = 'orderData';
/**
* 订单类型节点分隔符号
*
......@@ -98,6 +107,15 @@ export default class TreeExpService extends ControlService {
*/
public TREENODE_ORDERSTATUSDATA: string = 'orderStatusData';
/**
* 订单实体节点分隔符号
*
* @public
* @type {string}
* @memberof TreeExpService
*/
public TREENODE_ORDERDATADYC: string = 'orderDataDyc';
/**
* 默认根节点节点分隔符号
*
......@@ -194,6 +212,10 @@ export default class TreeExpService extends ControlService {
await this.fillOrderstatusNodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
if (Object.is(strNodeType, this.TREENODE_ORDERDATA)) {
await this.fillOrderdataNodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
if (Object.is(strNodeType, this.TREENODE_ORDERTYPE)) {
await this.fillOrdertypeNodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
......@@ -202,6 +224,10 @@ export default class TreeExpService extends ControlService {
await this.fillOrderstatusdataNodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
if (Object.is(strNodeType, this.TREENODE_ORDERDATADYC)) {
await this.fillOrderdatadycNodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
if (Object.is(strNodeType, this.TREENODE_ROOT)) {
await this.fillRootNodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
......@@ -282,6 +308,75 @@ export default class TreeExpService extends ControlService {
}
}
/**
* 填充 树视图节点[订单数据]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof TreeExpService
*/
@Errorlog
public fillOrderdataNodes(context:any={},filter: any, list: any[],rsNavContext?:any,rsNavParams?:any,rsParams?:any): Promise<any> {
context = this.handleResNavContext(context,filter,rsNavContext);
filter = this.handleResNavParams(context,filter,rsNavParams,rsParams);
return new Promise((resolve:any,reject:any) =>{
let treeNode: any = {};
Object.assign(treeNode, { text: i18n.t('entities.ibizorder.treeexp_treeview.nodes.orderdata') });
Object.assign(treeNode, { isUseLangRes: true });
Object.assign(treeNode,{srfappctx:context});
Object.assign(treeNode, { srfmajortext: treeNode.text });
let strNodeId: string = 'orderData';
// 没有指定节点值,直接使用父节点值
Object.assign(treeNode, { srfkey: filter.strRealNodeId });
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += filter.strRealNodeId;
Object.assign(treeNode, { id: strNodeId });
Object.assign(treeNode, { expanded: filter.isAutoexpand });
Object.assign(treeNode, { leaf: false });
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
Object.assign(treeNode, { nodeType: "STATIC" });
list.push(treeNode);
resolve(list);
});
}
/**
* 填充 树视图节点[订单数据]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof TreeExpService
*/
@Errorlog
public async fillOrderdataNodeChilds(context:any={}, filter: any, list: any[]): Promise<any> {
if (filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")) {
// 填充订单实体
let OrderdatadycRsNavContext:any = {};
let OrderdatadycRsNavParams:any = {};
let OrderdatadycRsParams:any = {};
await this.fillOrderdatadycNodes(context, filter, list ,OrderdatadycRsNavContext,OrderdatadycRsNavParams,OrderdatadycRsParams);
} else {
// 填充订单实体
let OrderdatadycRsNavContext:any = {};
let OrderdatadycRsNavParams:any = {};
let OrderdatadycRsParams:any = {};
await this.fillOrderdatadycNodes(context, filter, list ,OrderdatadycRsNavContext,OrderdatadycRsNavParams,OrderdatadycRsParams);
}
}
/**
* 填充 树视图节点[订单类型]
*
......@@ -435,6 +530,139 @@ export default class TreeExpService extends ControlService {
}
}
/**
* 填充 树视图节点[订单实体]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof TreeExpService
*/
@Errorlog
public fillOrderdatadycNodes(context:any={},filter: any, list: any[],rsNavContext?:any,rsNavParams?:any,rsParams?:any): Promise<any> {
context = this.handleResNavContext(context,filter,rsNavContext);
filter = this.handleResNavParams(context,filter,rsNavParams,rsParams);
return new Promise((resolve:any,reject:any) =>{
let searchFilter: any = {};
Object.assign(searchFilter, { total: false });
let bFirst: boolean = true;
let records: any[] = [];
try {
this.searchOrderdatadyc(context, searchFilter, filter).then((records:any) =>{
if(records && records.length >0){
records.forEach((entity: any) => {
let treeNode: any = {};
// 整理context
let strId: string = entity.ibizorderid;
let strText: string = entity.ibizordername;
Object.assign(treeNode,{srfparentdename:'IBIZOrder',srfparentkey:entity.ibizorderid});
let tempContext:any = JSON.parse(JSON.stringify(context));
Object.assign(tempContext,{srfparentdename:'IBIZOrder',srfparentkey:entity.ibizorderid,ibizorder:strId})
Object.assign(treeNode,{srfappctx:tempContext});
Object.assign(treeNode,{'ibizorder':strId});
Object.assign(treeNode, { srfkey: strId });
Object.assign(treeNode, { text: strText, srfmajortext: strText });
let strNodeId: string = 'orderDataDyc';
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += strId;
Object.assign(treeNode, { id: strNodeId });
Object.assign(treeNode, { expanded: filter.isautoexpand });
Object.assign(treeNode, { leaf: true });
Object.assign(treeNode, { curData: entity });
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
Object.assign(treeNode, { nodeType: "DE",appEntityName:"ibizorder" });
list.push(treeNode);
resolve(list);
bFirst = false;
});
}else{
resolve(list);
}
});
} catch (error) {
console.error(error);
}
});
}
/**
* 获取查询集合
*
* @public
* @param {any{}} context
* @param {*} searchFilter
* @param {*} filter
* @returns {any[]}
* @memberof TestEnetityDatasService
*/
@Errorlog
public searchOrderdatadyc(context:any={}, searchFilter: any, filter: any): Promise<any> {
return new Promise((resolve:any,reject:any) =>{
if(filter.viewparams){
Object.assign(searchFilter,filter.viewparams);
}
if(!searchFilter.page){
Object.assign(searchFilter,{page:0});
}
if(!searchFilter.size){
Object.assign(searchFilter,{size:1000});
}
if(context && context.srfparentdename){
Object.assign(searchFilter,{srfparentdename:JSON.parse(JSON.stringify(context)).srfparentdename});
}
if(context && context.srfparentkey){
Object.assign(searchFilter,{srfparentkey:JSON.parse(JSON.stringify(context)).srfparentkey});
}
const _appEntityService: any = this.appEntityService;
let list: any[] = [];
if (_appEntityService['FetchDefault'] && _appEntityService['FetchDefault'] instanceof Function) {
const response: Promise<any> = _appEntityService['FetchDefault'](context, searchFilter, false);
response.then((response: any) => {
if (!response.status || response.status !== 200) {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询FetchDefault数据集异常!');
}
const data: any = response.data;
if (Object.keys(data).length > 0) {
list = JSON.parse(JSON.stringify(data));
resolve(list);
} else {
resolve([]);
}
}).catch((response: any) => {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询FetchDefault数据集异常!');
});
}
})
}
/**
* 填充 树视图节点[订单实体]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof TreeExpService
*/
@Errorlog
public async fillOrderdatadycNodeChilds(context:any={}, filter: any, list: any[]): Promise<any> {
if (filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")) {
} else {
}
}
/**
* 填充 树视图节点[默认根节点]
*
......@@ -499,6 +727,11 @@ export default class TreeExpService extends ControlService {
let OrdertypeRsNavParams:any = {};
let OrdertypeRsParams:any = {};
await this.fillOrdertypeNodes(context, filter, list ,OrdertypeRsNavContext,OrdertypeRsNavParams,OrdertypeRsParams);
// 填充订单数据
let OrderdataRsNavContext:any = {};
let OrderdataRsNavParams:any = {};
let OrderdataRsParams:any = {};
await this.fillOrderdataNodes(context, filter, list ,OrderdataRsNavContext,OrderdataRsNavParams,OrderdataRsParams);
} else {
// 填充订单状态
let OrderstatusRsNavContext:any = {};
......@@ -510,6 +743,11 @@ export default class TreeExpService extends ControlService {
let OrdertypeRsNavParams:any = {};
let OrdertypeRsParams:any = {};
await this.fillOrdertypeNodes(context, filter, list ,OrdertypeRsNavContext,OrdertypeRsNavParams,OrdertypeRsParams);
// 填充订单数据
let OrderdataRsNavContext:any = {};
let OrderdataRsNavParams:any = {};
let OrderdataRsParams:any = {};
await this.fillOrderdataNodes(context, filter, list ,OrderdataRsNavContext,OrderdataRsNavParams,OrderdataRsParams);
}
}
......
......@@ -337,6 +337,13 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt
deKeyField:'ibizorder'
};
}
if (Object.is(expmode, 'ORDERDATADYC')) {
return {
viewname: 'ibizorder-detail-grid-view9',
parentdata: {"srfparentdefname":"IBIZORDERID","srfparentdename":"IBIZORDER","srfparentmode":"DER1N_IBIZORDERDETAIL_IBIZORDER_IBIZORDERID"},
deKeyField:'ibizorderdetail'
};
}
if (Object.is(expmode, 'ORDERTYPEDATA')) {
return {
viewname: 'ibizorder-grid-view9',
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册