qian386620 2016-07-11 03:37 采纳率: 0%
浏览 796

节点的增删改。可以一直加下去。图标也会改变

//新增页面
var PanelFormWin = new Ext.Window({
title: "新增节点",
width: 360,
height: 150,
plain: true,
icon: 'Image/Img/searchlistimg.png',
resizable: false,

collapsible: true,
closeAction: "hide",
closable: true,

modal: 'true',
buttonAlign: "center",
bodyStyle: "padding:10px",
items: [PanelForm],
buttons: [{
text: "确定",
minWidth: 70,
handler: function () {
if (PanelForm.getForm().isValid()) {
Ext.Ajax.request({
url: 'SaveNode.ashx',
params: {
pNode: Ext.getDom('hid_NodeNow').value, //读取根节点
ptype: 'Add',
NodeName: Ext.getDom('S_NodeName').value,
Num: Ext.getDom('S_Num').value = Ext.getDom('S_Num').value == null ? 0 : Ext.getDom('S_Num').value,
NodeType: Ext.getDom('hid_ModelName').value,
NodeTypeCode: Ext.getDom('hid_ModelTypeCode').value
},
method: 'POST',
success: function (response, options) {
if (currentNode.leaf) {
//currentNode.leaf = false;
if (currentNode.parentNode != null) {
currentNode.parentNode.reload();
} else {
currentNode.reload();
}
currentNode.expandChildNodes(true);
} else {
currentNode.reload();
}
},
failure: function (response, options) {
Ext.MessageBox.alert('失败', '请求超时或网络故障,错误编号:' + response.status);
}
});
}
PanelFormWin.hide();
}
},
{
text: "重置",
minWidth: 70,
handler: function () {
PanelForm.getForm().reset();
}
},
{
text: "关闭",
minWidth: 70,
handler: function () {
PanelFormWin.hide();
}
}]
})

     //新增容器
var PanelForm = new Ext.FormPanel({
    labelAlign: 'right', buttonAlign: 'right', bodyStyle: 'padding:5px;',
    frame: true, labelWidth: 65, monitorValid: true,
    items: [
        {
            layout: 'column', border: false, labelSeparator: ':',
            defaults: { layout: 'form', border: false, columnWidth: 1 },
            items: [
                { items: [{ xtype: 'textfield', fieldLabel: '节点名称', id: 'S_NodeName', name: 'S_NodeName', anchor: '90%', allowBlank: false, blankText: '请输入节点名称!' }] },
                { items: [{ xtype: 'textfield', fieldLabel: '排  序', id: 'S_Num', name: 'S_Num', anchor: '90%', blankText: '', allowBlank: false, regex: /^\d+$/, regexText: '请输入正确的数据类型', vtype: 'alphanum' }] }
            ]
        }]
});

    急。不会改。就告知。新手入学!!
  • 写回答

1条回答

  • dabocaiqq 2017-03-11 15:37
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序