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

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

上级 e4573f95
...@@ -237,14 +237,6 @@ export default class UsrBase extends Vue implements ControlInterface { ...@@ -237,14 +237,6 @@ export default class UsrBase extends Vue implements ControlInterface {
}, },
labelField: 'text', labelField: 'text',
columns: [ columns: [
{
label: '归还日期',
value: 'returntime',
render: (task: any) => {
return this.getColumnValue(task, 'returntime')
},
width: 200,
},
{ {
label: '图书名称', label: '图书名称',
value: 'ibizbookname', value: 'ibizbookname',
...@@ -277,6 +269,14 @@ export default class UsrBase extends Vue implements ControlInterface { ...@@ -277,6 +269,14 @@ export default class UsrBase extends Vue implements ControlInterface {
}, },
width: 200, width: 200,
}, },
{
label: '归还日期',
value: 'returntime',
render: (task: any) => {
return this.getColumnValue(task, 'returntime')
},
width: 200,
},
] ]
} }
}; };
......
...@@ -4,7 +4,6 @@ import IBIZOrderService from '@/service/ibizorder/ibizorder-service'; ...@@ -4,7 +4,6 @@ import IBIZOrderService from '@/service/ibizorder/ibizorder-service';
import TreeExpModel from './tree-exp-treeview-model'; import TreeExpModel from './tree-exp-treeview-model';
import CodeListService from "@/codelist/codelist-service"; import CodeListService from "@/codelist/codelist-service";
import i18n from '@/locale'; import i18n from '@/locale';
import IBIZOrderTypeService from '@service/ibizorder-type/ibizorder-type-service';
/** /**
...@@ -54,14 +53,6 @@ export default class TreeExpService extends ControlService { ...@@ -54,14 +53,6 @@ export default class TreeExpService extends ControlService {
public codeListService:CodeListService = new CodeListService({ $store: this.getStore() }); public codeListService:CodeListService = new CodeListService({ $store: this.getStore() });
/**
* 订单类型服务对象
*
* @type {IBIZOrderTypeService}
* @memberof TreeExpService
*/
public ibizordertypeService: IBIZOrderTypeService = new IBIZOrderTypeService({ $store: this.getStore() });
/** /**
* 节点分隔符号 * 节点分隔符号
* *
...@@ -480,6 +471,8 @@ export default class TreeExpService extends ControlService { ...@@ -480,6 +471,8 @@ export default class TreeExpService extends ControlService {
strNodeId += item.value; strNodeId += item.value;
Object.assign(item, { id: strNodeId }); Object.assign(item, { id: strNodeId });
Object.assign(item, { expanded: filter.isautoexpand }); Object.assign(item, { expanded: filter.isautoexpand });
Object.assign(item, {navigateContext: {ORDERTYPE:"%ordertype%"} });
Object.assign(item, {navigateParams: {ordertype:"%ordertype%"} });
Object.assign(item, { nodeid: item.srfkey }); Object.assign(item, { nodeid: item.srfkey });
Object.assign(item, { nodeid2: item.pvalue }); Object.assign(item, { nodeid2: item.pvalue });
Object.assign(item, { nodeType: 'STATIC' }); Object.assign(item, { nodeType: 'STATIC' });
...@@ -498,6 +491,8 @@ export default class TreeExpService extends ControlService { ...@@ -498,6 +491,8 @@ export default class TreeExpService extends ControlService {
Object.assign(treeNode, { id: strNodeId }); Object.assign(treeNode, { id: strNodeId });
Object.assign(treeNode, { expanded: filter.isautoexpand }); Object.assign(treeNode, { expanded: filter.isautoexpand });
Object.assign(treeNode, { leaf: true }); Object.assign(treeNode, { leaf: true });
Object.assign(treeNode, {navigateContext: {ORDERTYPE:"%ordertype%"} });
Object.assign(treeNode, {navigateParams: {ordertype:"%ordertype%"} });
if(item.children && item.children.length >0){ if(item.children && item.children.length >0){
Object.assign(treeNode, { children: item.children }); Object.assign(treeNode, { children: item.children });
} }
...@@ -769,104 +764,55 @@ export default class TreeExpService extends ControlService { ...@@ -769,104 +764,55 @@ export default class TreeExpService extends ControlService {
context = this.handleResNavContext(context,filter,rsNavContext); context = this.handleResNavContext(context,filter,rsNavContext);
filter = this.handleResNavParams(context,filter,rsNavParams,rsParams); filter = this.handleResNavParams(context,filter,rsNavParams,rsParams);
return new Promise((resolve:any,reject:any) =>{ return new Promise((resolve:any,reject:any) =>{
let searchFilter: any = {}; this.codeListService.getItems('ORDERTYPE',context).then((codeListIems:any)=>{
Object.assign(searchFilter, { total: false }); if(codeListIems && codeListIems.length >0){
let bFirst: boolean = true; const handleChildData = (context:any,item:any,) =>{
let records: any[] = []; Object.assign(item,{srfappctx:context});
try { Object.assign(item, { text: item.text });
this.searchOrdertypedata(context, searchFilter, filter).then((records:any) =>{ Object.assign(item, { srfmajortext: item.text });
if(records && records.length >0){ let strNodeId: string = "orderTypeData";
records.forEach((entity: any) => { Object.assign(item, { srfkey: item.value });
let treeNode: any = {}; strNodeId += this.TREENODE_SEPARATOR;
// 整理context strNodeId += item.value;
let strId: string = entity.ibizordertypeid; Object.assign(item, { id: strNodeId });
let strText: string = entity.ibizordertypename; Object.assign(item, { expanded: filter.isautoexpand });
Object.assign(treeNode,{srfparentdename:'IBIZOrderType',srfparentkey:entity.ibizordertypeid}); Object.assign(item, {navigateContext: {ORDERTYPE:"%ordertype%"} });
let tempContext:any = JSON.parse(JSON.stringify(context)); Object.assign(item, {navigateParams: {ordertype:"%ordertype%"} });
Object.assign(tempContext,{srfparentdename:'IBIZOrderType',srfparentkey:entity.ibizordertypeid,ibizordertype:strId}) Object.assign(item, { nodeid: item.srfkey });
Object.assign(treeNode,{srfappctx:tempContext}); Object.assign(item, { nodeid2: item.pvalue });
Object.assign(treeNode,{'ibizordertype':strId}); Object.assign(item, { nodeType: "CODELIST",appEntityName:"ibizordertype" });
Object.assign(treeNode, { srfkey: strId }); }
Object.assign(treeNode, { text: strText, srfmajortext: strText }); codeListIems = this.handleDataSet(JSON.parse(JSON.stringify(codeListIems)),context,handleChildData);
let strNodeId: string = 'orderTypeData'; codeListIems.forEach((item:any) => {
strNodeId += this.TREENODE_SEPARATOR; let treeNode: any = {};
strNodeId += strId; Object.assign(treeNode,{srfappctx:context});
Object.assign(treeNode, { id: strNodeId }); Object.assign(treeNode, { text: item.text });
Object.assign(treeNode, { expanded: filter.isautoexpand }); Object.assign(treeNode, { srfmajortext: treeNode.text });
Object.assign(treeNode, { leaf: true }); let strNodeId: string = "orderTypeData";
Object.assign(treeNode, { curData: entity }); Object.assign(treeNode, { srfkey: item.value });
Object.assign(treeNode, { nodeid: treeNode.srfkey }); strNodeId += this.TREENODE_SEPARATOR;
Object.assign(treeNode, { nodeid2: filter.strRealNodeId }); strNodeId += item.value;
Object.assign(treeNode, { nodeType: "DE",appEntityName:"ibizordertype" }); Object.assign(treeNode, { id: strNodeId });
list.push(treeNode); Object.assign(treeNode, { expanded: filter.isautoexpand });
resolve(list); Object.assign(treeNode, { leaf: true });
bFirst = false; Object.assign(treeNode, {navigateContext: {ORDERTYPE:"%ordertype%"} });
}); Object.assign(treeNode, {navigateParams: {ordertype:"%ordertype%"} });
}else{ if(item.children && item.children.length >0){
resolve(list); Object.assign(treeNode, { children: item.children });
} }
}); Object.assign(treeNode, { nodeid: treeNode.srfkey });
} catch (error) { Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
console.error(error); Object.assign(treeNode, { nodeType: "CODELIST",appEntityName:"ibizordertype" });
} list.push(treeNode);
resolve(list);
})
}else{
resolve(list);
}
});
}); });
} }
/**
* 获取查询集合
*
* @public
* @param {any{}} context
* @param {*} searchFilter
* @param {*} filter
* @returns {any[]}
* @memberof TestEnetityDatasService
*/
@Errorlog
public searchOrdertypedata(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.ibizordertypeService;
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数据集异常!');
});
}
})
}
/** /**
* 填充 树视图节点[订单类型实体]子节点 * 填充 树视图节点[订单类型实体]子节点
* *
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册