83 lines
2.4 KiB
JavaScript
83 lines
2.4 KiB
JavaScript
new Ext.Viewport({
|
|
id: 'viewPort',
|
|
enableTabScroll: true,
|
|
layout: "border",
|
|
items: [
|
|
{
|
|
itemId:'upPanel',
|
|
region: "north",
|
|
height: 50,
|
|
frame: true,
|
|
layout: 'column',
|
|
items: [
|
|
{
|
|
xtype: 'text',
|
|
text: 'web3admin',
|
|
y: 80,
|
|
columnWidth: 0.8,
|
|
style: 'color:#FF0000;font-family:宋体;,font-size:20px; font-weight:bold;margin-top:10px',
|
|
}
|
|
]
|
|
},
|
|
{
|
|
xtype: 'panel',
|
|
itemId: 'funcTree',
|
|
region: "west",
|
|
width: 200,
|
|
autoScroll: true,
|
|
// flex: 1,
|
|
title: "功能菜单",
|
|
layout: {
|
|
type: 'vbox',
|
|
align: 'stretch',
|
|
},
|
|
collapsible: true,
|
|
items: [
|
|
{
|
|
xtype: 'treepanel',
|
|
itemId: 'tpanFunc',
|
|
store: Ext.create('Ext.data.TreeStore', {}),
|
|
rootVisible: false,
|
|
},
|
|
]
|
|
},
|
|
{
|
|
id: 'mainPanel',
|
|
title: '功能区',
|
|
region: 'center',
|
|
},
|
|
]
|
|
});
|
|
|
|
setTimeout(() => {
|
|
let funcTree = [
|
|
{'text': '运营工具', 'expanded': true, 'children':[
|
|
{'text': '订单管理', 'expanded': true, 'children':[
|
|
{'text': '订单查询', 'leaf': true, 'page': 'order/index.html'},
|
|
{'text': '购买记录', 'leaf': true, 'page': 'buyrecord/index.html'},
|
|
]},
|
|
{'text': '日志管理', 'expanded': true, 'children':[
|
|
{'text': '日志查询', 'leaf': true, 'page': 'log/index.html'},
|
|
]},
|
|
{'text': 'nft管理', 'expanded': true, 'children':[
|
|
{'text': 'nft查询', 'leaf': true, 'page': 'nft/index.html'},
|
|
]},
|
|
]}
|
|
];
|
|
let tpanFunc = Ext.getCmp('viewPort').getComponent('funcTree').getComponent('tpanFunc');
|
|
tpanFunc.store.setRootNode({
|
|
expanded: true,
|
|
children: funcTree
|
|
});
|
|
tpanFunc.on('itemclick', (sender, record, item, index, e) => {
|
|
if(record.raw.text.indexOf('?') != -1){
|
|
// alert("该功能开发中,敬请期待....");
|
|
Ext.Msg.alert('Warn', '该功能开发中,敬请期待');
|
|
}else if(record.raw.page != '' && record.raw.page != undefined){
|
|
var _dc = (new Date()).valueOf() + Math.random();
|
|
Ext.get('mainPanel').setHTML('<iframe id="frame1" src="' + record.raw.page + '?_dc=' + _dc +
|
|
'" frameborder="0" width="100%" height="100%" target="_blank"></iframe>');
|
|
}
|
|
});
|
|
}, 100);
|