📄 fiberdialog.js
字号:
fiberManage = function(){
var fiberLayout;
var tbFiber;
var addFiberBtn, modifyFiberBtn, deleteFiberBtn, relayManageBtn, constructUnitManageBtn;
var addFiberDialog, addFiberForm, afieldset1, aleftColumn1, arightColumn1, afieldset2, aleftColumn2, arightColumn2, afieldset3, aleftColumn3, arightColumn3;
var aautoCreatBtn, aff1, aff2, aff3, aff4, aff5, aff6, aff7, aff8, aff9, aff10, aff11, aff12, aff13, aff14, aff15;
var modifyFiberDialog, modifyFiberForm, mfieldset1, mleftColumn1, mrightColumn1, mfieldset2, mleftColumn2, mrightColumn2, mfieldset3, mleftColumn3, mrightColumn3;
var mautoCreatBtn, fsf0, mff0, mff1, mff2, mff3, mff4, mff5, mff6, mff7, mff8, mff9, mff10, mff11, mff12, mff13, mff14, mff15;
var relayManageDialog, relayManageForm;
var constructUnitManageDialog, constructUnitManageForm;
var gridFiber, gridFootFiber, pagingFiber;
return {
createDilog:function(){
var fiberManageDialog = new Ext.LayoutDialog('fiberManageDlg', {
modal:true,
width:1000,
height:520,
resizable:false,
north: {
id:'fiberBtns',
split:false,
initialSize:30
},
center: {
id:'fiberGrid',
autoScroll: true
}
});
fiberLayout = fiberManageDialog.getLayout();
fiberLayout.beginUpdate();
fiberLayout.add('north', new Ext.ContentPanel('inorth', {fitToFrame:true}));
fiberLayout.add('center', new Ext.ContentPanel('icenter', {autoScroll:true, autoCreate:true, fitToFrame:true}));
fiberLayout.endUpdate();
tbFiber = new Ext.Toolbar('toolbarfiber');
addFiberBtn = new Ext.Toolbar.Button({text: '增加', handler: this.addFiberClick});
modifyFiberBtn = new Ext.Toolbar.Button({text: '修改', handler: this.modifyFiberClick});
deleteFiberBtn = new Ext.Toolbar.Button({text: '删除', handler: this.deleteFiberClick});
relayManageBtn = new Ext.Toolbar.Button({text: '中继管理', handler: this.relayManageClick});
constructUnitManageBtn = new Ext.Toolbar.Button({text: '施工单位管理', handler: this.constructUnitManageClick});
tbFiber.add(addFiberBtn, '-', modifyFiberBtn, '-', deleteFiberBtn, '-', relayManageBtn, '-', constructUnitManageBtn);
gridFiber = new Ext.grid.Grid('fiber-grid', {
ds: fiberDS,
cm: fiberCM,
selModel: new Ext.grid.RowSelectionModel({singleSelect:true}),
loadMask: new Ext.LoadMask('fiber-grid',{msg:'正在加载数据,请稍候...'})
});
gridFiber.render();
gridFootFiber = gridFiber.getView().getFooterPanel(true);
pagingFiber = new Ext.PagingToolbar(gridFootFiber, fiberDS, {
displayInfo: true,
displayMsg: '共有{2}条记录',
emptyMsg: "没有记录"
});
return fiberManageDialog;
},
addFiberClick: function(){
if(!addFiberDialog)
{
addFiberDialog = new Ext.BasicDialog("addFiberDlg", {
width:600,
height:400,
modal:false,
resizable:false
}); /*
addFiberForm = new Ext.form.Form({
id: 'addFiberform',
labelAlign: 'left',
labelWidth: 60,
waitMsgTarget: 'addFiberDlg'
});
afieldset1 = addFiberForm.fieldset({legend:'基本信息', style:'width:550px'});
aleftColumn1 = new Ext.form.Column();
addFiberForm.start(aleftColumn1);
addFiberForm.add(
aff1 = new Ext.form.TextField({
fieldLabel: '光路代码',
name: 'acodef',
width:175
}),
aff2 = new Ext.form.TextField({
fieldLabel: '光路名称',
name: 'anamea',
width:175
}),
aff3 = new Ext.form.ClearableComboBox({
fieldLabel: '速率',
name: 'avelocityf',
store: new Ext.data.SimpleStore({
fields: ['ov', 'ot'],
data: velocityDS
}),
valueField:'ov',
displayField:'ot',
mode: 'local',
triggerAction: 'all',
selectOnFocus:true,
editable: false,
width:175
}),
aff4 = new Ext.form.ClearableComboBox({
fieldLabel: '业务类型',
name: 'abusinessTypeaf',
store: new Ext.data.SimpleStore({
fields: ['ov', 'ot'],
data: businessTypeDS
}),
valueField:'ov',
displayField:'ot',
mode: 'local',
triggerAction: 'all',
selectOnFocus:true,
editable: false,
width:175
}));
addFiberForm.end(aleftColumn1);
arightColumn1 = new Ext.form.Column();
addFiberForm.start(arightColumn1);
addFiberForm.add(
aautoCreatBtn = new Ext.Button('addCreateBtn', {text:'自动生成'}),
aff5 = new Ext.form.ClearableComboBox({
fieldLabel: '主光路',
name: 'aisMainf',
store: new Ext.data.SimpleStore({
fields: ['ov', 'ot'],
data: ysDS
}),
valueField:'ov',
displayField:'ot',
mode: 'local',
triggerAction: 'all',
selectOnFocus:true,
editable: false,
width:175
}),
aff6 = new Ext.form.TextField({
fieldLabel: '数量',
name: 'aamountf',
value: '1',
width:175
}),
aff7 = new Ext.form.ClearableComboBox({
fieldLabel: '传输系统',
name: 'atransSystemf',
store: transSystemCBDS,
valueField:'id',
displayField:'name',
typeAhead: true,
mode: 'remote',
triggerAction: 'all',
selectOnFocus:true,
editable: false,
width:175
}));
addFiberForm.end(arightColumn1);
addFiberForm.end(afieldset1);
afieldset2 = addFiberForm.fieldset({legend:'A端信息', style:'width:550px'});
aleftColumn2 = new Ext.form.Column();
addFiberForm.start(aleftColumn2);
addFiberForm.add(
aff8 = new Ext.form.ClearableComboBox({
fieldLabel: '省干',
name: 'aaisTrunkf',
store: new Ext.data.SimpleStore({
fields: ['ov', 'ot'],
data: ysDS
}),
valueField:'ov',
displayField:'ot',
mode: 'local',
triggerAction: 'all',
selectOnFocus:true,
editable: false,
width:175
}),
aff9 = new Ext.form.ClearableComboBox({
fieldLabel: '机房',
name: 'aaroomf',
store: roomCBDS,
valueField:'id',
displayField:'name',
typeAhead: true,
mode: 'remote',
triggerAction: 'all',
selectOnFocus:true,
editable: false,
width:175
}));
addFiberForm.end(aleftColumn2);
arightColumn2 = new Ext.form.Column();
addFiberForm.start(arightColumn2);
addFiberForm.add(
aff10 = new Ext.form.ClearableComboBox({
fieldLabel: '波分通道',
name: 'aachannelf',
store: channelCBDS,
valueField:'id',
displayField:'channel',
typeAhead: true,
mode: 'remote',
triggerAction: 'all',
selectOnFocus:true,
editable: false,
width:175
}),
aff11 = new Ext.form.ClearableComboBox({
fieldLabel: '端口',
name: 'aaportf',
store: portCBDS,
valueField:'id',
displayField:'name',
typeAhead: true,
mode: 'remote',
triggerAction: 'all',
selectOnFocus:true,
editable: false,
width:175
}));
addFiberForm.end(arightColumn2);
addFiberForm.end(afieldset2);
afieldset3 = addFiberForm.fieldset({legend:'B端信息', style:'width:550px'});
aleftColumn3 = new Ext.form.Column();
addFiberForm.start(aleftColumn3);
addFiberForm.add(
aff12 = new Ext.form.ClearableComboBox({
fieldLabel: '省干',
name: 'abisTrunkf',
store: new Ext.data.SimpleStore({
fields: ['ov', 'ot'],
data: ysDS
}),
valueField:'ov',
displayField:'ot',
mode: 'local',
triggerAction: 'all',
selectOnFocus:true,
editable: false,
width:175
}),
aff13 = new Ext.form.ClearableComboBox({
fieldLabel: '机房',
name: 'abroomf',
store: roomCBDS,
valueField:'id',
displayField:'name',
typeAhead: true,
mode: 'remote',
triggerAction: 'all',
selectOnFocus:true,
editable: false,
width:175
}));
addFiberForm.end(aleftColumn3);
arightColumn3 = new Ext.form.Column();
addFiberForm.start(arightColumn3);
addFiberForm.add(
aff14 = new Ext.form.ClearableComboBox({
fieldLabel: '波分通道',
name: 'abchannelf',
store: channelCBDS,
valueField:'id',
displayField:'channel',
typeAhead: true,
mode: 'remote',
triggerAction: 'all',
selectOnFocus:true,
editable: false,
width:175
}),
aff15 = new Ext.form.ClearableComboBox({
fieldLabel: '端口',
name: 'abportf',
store: portCBDS,
valueField:'id',
displayField:'name',
typeAhead: true,
mode: 'remote',
triggerAction: 'all',
selectOnFocus:true,
editable: false,
width:175
}));
addFiberForm.end(arightColumn3);
addFiberForm.end(afieldset3);
function addFiberSubmit(){
addFiberForm.submit({
url:FiberSchedulerPath+'fiberapply/addFiber.do',
waitMsg:'正在操作,请稍候......',
success:function(){
addFiberDialog.hide();
fiberDS.load({params:{start:0, limit:pgSize}});
Ext.MessageBox.alert('提示','增加光路,操作成功');
},
failure:function(){
Ext.MessageBox.alert('提示ʾ','增加光路,操作失败');
}});
}
addFiberForm.addButton('提交', addFiberSubmit, addFiberForm );
addFiberForm.addButton('重置', addFiberForm.reset, addFiberForm);
addFiberForm.addButton('取消', addFiberDialog.hide, addFiberDialog);
addFiberForm.render('addFiberForm'); */
}
addFiberDialog.show(addFiberBtn.dom);
},
modifyFiberClick: function(){
var selectFiber = gridFiber.getSelectionModel().getSelected();
/*
if(!selectFiber)
{
Ext.MessageBox.alert('提示','请先选择一条记录');
return;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -