|
|
@ -67,13 +67,11 @@ |
|
|
|
BI.hwColTypeDeal = function(data){ |
|
|
|
BI.hwColTypeDeal = function(data){ |
|
|
|
BI.each(data, function (index, val) { |
|
|
|
BI.each(data, function (index, val) { |
|
|
|
if (BI.contains(BI.Constants.getConstant("dec.hw.col.type.int"), val.colType)) { |
|
|
|
if (BI.contains(BI.Constants.getConstant("dec.hw.col.type.int"), val.colType)) { |
|
|
|
val.colType = 2; |
|
|
|
val.colType = 32; |
|
|
|
} else if (BI.contains(BI.Constants.getConstant("dec.hw.col.type.str"), val.colType)) { |
|
|
|
} else if (BI.contains(BI.Constants.getConstant("dec.hw.col.type.str"), val.colType)) { |
|
|
|
val.colType = 12; |
|
|
|
|
|
|
|
} else if (BI.contains(BI.Constants.getConstant("dec.hw.col.type.bool"), val.colType)) { |
|
|
|
|
|
|
|
val.colType = 16; |
|
|
|
val.colType = 16; |
|
|
|
} else if (BI.contains(BI.Constants.getConstant("dec.hw.col.type.date"), val.colType)) { |
|
|
|
} else if (BI.contains(BI.Constants.getConstant("dec.hw.col.type.date"), val.colType)) { |
|
|
|
val.colType = 91; |
|
|
|
val.colType = 48; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
return data; |
|
|
|
return data; |
|
|
@ -99,177 +97,4 @@ |
|
|
|
{value: "export", text: "Excel数据管理"}, |
|
|
|
{value: "export", text: "Excel数据管理"}, |
|
|
|
{value: "auth", text: "Excel权限管理"} |
|
|
|
{value: "auth", text: "Excel权限管理"} |
|
|
|
]); |
|
|
|
]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 组件实现,效果为使用绝对布局组件放置了一个iframe
|
|
|
|
|
|
|
|
var Fanruan = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
|
|
|
baseCls: "dec-management-fanruan" |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var file = { |
|
|
|
|
|
|
|
type: "bi.multifile_editor", |
|
|
|
|
|
|
|
ref: function (_ref) { |
|
|
|
|
|
|
|
self.file = _ref; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
width: 200, |
|
|
|
|
|
|
|
// accept: "*.zip;",
|
|
|
|
|
|
|
|
url: Dec.fineServletURL + "/url/demo/test?width=32&height=32", |
|
|
|
|
|
|
|
listeners: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
eventName: BI.MultifileEditor.EVENT_ERROR, |
|
|
|
|
|
|
|
action: function (args) { |
|
|
|
|
|
|
|
/* self.fireEvent("EVENT_ERROR"); |
|
|
|
|
|
|
|
self._closeUpload();*/ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
eventName: BI.MultifileEditor.EVENT_UPLOADED, |
|
|
|
|
|
|
|
action: function (args) { |
|
|
|
|
|
|
|
var files = this.getValue(); |
|
|
|
|
|
|
|
if (files[files.length - 1].errorCode) { |
|
|
|
|
|
|
|
BI.Msg.toast(BI.i18nText(files[files.length - 1].errorMsg), { |
|
|
|
|
|
|
|
level: "error" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
self._closeUpload(); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var id = files[files.length - 1].attach_id; |
|
|
|
|
|
|
|
var filename = files[files.length - 1].filename; |
|
|
|
|
|
|
|
// self.store.analysisFile(id, filename);
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
eventName: BI.MultifileEditor.EVENT_CHANGE, |
|
|
|
|
|
|
|
action: function () { |
|
|
|
|
|
|
|
this.upload(); |
|
|
|
|
|
|
|
/* self._startUpload();*/ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
type: "bi.absolute", |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
el: { |
|
|
|
|
|
|
|
type: "bi.center_adapt", |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
el: file |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
el: { |
|
|
|
|
|
|
|
type: "bi.button", |
|
|
|
|
|
|
|
width: 200, |
|
|
|
|
|
|
|
text: "123123", |
|
|
|
|
|
|
|
handler: function () { |
|
|
|
|
|
|
|
self.file.select(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
top: 100, |
|
|
|
|
|
|
|
left: 0, |
|
|
|
|
|
|
|
right: 0, |
|
|
|
|
|
|
|
bottom: 0 |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
el: { |
|
|
|
|
|
|
|
type: "bi.vertical_adapt", |
|
|
|
|
|
|
|
items: [{ |
|
|
|
|
|
|
|
type: "bi.button", |
|
|
|
|
|
|
|
text: "新建", |
|
|
|
|
|
|
|
handler: function () { |
|
|
|
|
|
|
|
var pane = { |
|
|
|
|
|
|
|
type: "dec.hw.table.add.popup", |
|
|
|
|
|
|
|
add:true, |
|
|
|
|
|
|
|
infoId:"add", |
|
|
|
|
|
|
|
onClickConfirm: function (val, callback) { |
|
|
|
|
|
|
|
Dec.HW.importTableData(val,function (res) { |
|
|
|
|
|
|
|
debugger; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
callback(true); |
|
|
|
|
|
|
|
// self.store.addDepartment(val, callback);
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
listeners: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
eventName: "EVENT_CLOSE", |
|
|
|
|
|
|
|
action: function () { |
|
|
|
|
|
|
|
BI.Popovers.remove(self.getName() + "add"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
BI.Popovers.create(self.getName() + "add", { |
|
|
|
|
|
|
|
type: "bi.popover", |
|
|
|
|
|
|
|
header: BI.i18nText("Dec-Add_Department"), |
|
|
|
|
|
|
|
body: pane, |
|
|
|
|
|
|
|
width: 700, |
|
|
|
|
|
|
|
height: 800, |
|
|
|
|
|
|
|
listeners: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
eventName: "EVENT_CLOSE", |
|
|
|
|
|
|
|
action: function () { |
|
|
|
|
|
|
|
BI.Popovers.remove(self.getName() + "add"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}).open(self.getName() + "add"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
type: "bi.button", |
|
|
|
|
|
|
|
text: "编辑", |
|
|
|
|
|
|
|
handler:function () { |
|
|
|
|
|
|
|
var pane = { |
|
|
|
|
|
|
|
type: "dec.hw.table.add.popup", |
|
|
|
|
|
|
|
add:false, |
|
|
|
|
|
|
|
infoId:"edit", |
|
|
|
|
|
|
|
onClickConfirm: function (val, callback) { |
|
|
|
|
|
|
|
Dec.HW.importTableData(val,function (res) { |
|
|
|
|
|
|
|
debugger; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
callback(true); |
|
|
|
|
|
|
|
// self.store.addDepartment(val, callback);
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
listeners: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
eventName: "EVENT_CLOSE", |
|
|
|
|
|
|
|
action: function () { |
|
|
|
|
|
|
|
BI.Popovers.remove(self.getName() + "edit"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
BI.Popovers.create(self.getName() + "edit", { |
|
|
|
|
|
|
|
type: "bi.popover", |
|
|
|
|
|
|
|
header: BI.i18nText("Dec-Add_Department"), |
|
|
|
|
|
|
|
body: pane, |
|
|
|
|
|
|
|
width: 700, |
|
|
|
|
|
|
|
height: 800, |
|
|
|
|
|
|
|
listeners: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
eventName: "EVENT_CLOSE", |
|
|
|
|
|
|
|
action: function () { |
|
|
|
|
|
|
|
BI.Popovers.remove(self.getName() + "edit"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}).open(self.getName() + "edit"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
top: 0, |
|
|
|
|
|
|
|
left: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
BI.shortcut("dec.management.fanruan_demo", Fanruan); |
|
|
|
|
|
|
|
})(); |
|
|
|
})(); |