|
|
|
@ -362,6 +362,135 @@
|
|
|
|
|
}); |
|
|
|
|
}(); |
|
|
|
|
; |
|
|
|
|
!function () { |
|
|
|
|
BI.Front = BI.Front || {}; |
|
|
|
|
BI.Front = BI.extend(BI.Front, { |
|
|
|
|
utils: { |
|
|
|
|
injectionFunc: function injectionFunc(o, configs) { |
|
|
|
|
if (BI.isNotEmptyArray(configs)) { |
|
|
|
|
BI.each(configs, function (index, item) { |
|
|
|
|
var functionName = item.functionName; |
|
|
|
|
if (functionName) { |
|
|
|
|
var oldFunction = o[functionName]; |
|
|
|
|
var beforeFunc = item.beforeFunc; //执行前的函数
|
|
|
|
|
var afterFunc = item.afterFunc; //执行后函数
|
|
|
|
|
var returnValue = item.returnValue; //是否返回值
|
|
|
|
|
var replaceFunc = item.replaceFunc; //替换函数,如果不传递那么就会执行下默认的
|
|
|
|
|
|
|
|
|
|
o[functionName] = function () { |
|
|
|
|
var para = []; |
|
|
|
|
var len = arguments.length; |
|
|
|
|
for (var i = 0; i < len; i++) { |
|
|
|
|
para.push(arguments[i]); |
|
|
|
|
} |
|
|
|
|
if (BI.isFunction(beforeFunc)) { |
|
|
|
|
beforeFunc.apply(o, para); |
|
|
|
|
} |
|
|
|
|
if (returnValue) { |
|
|
|
|
var value = null; |
|
|
|
|
if (BI.isFunction(replaceFunc)) { |
|
|
|
|
value = replaceFunc.apply(o, para); |
|
|
|
|
} else { |
|
|
|
|
value = oldFunction.apply(o, para); |
|
|
|
|
} |
|
|
|
|
if (BI.isFunction(afterFunc)) { |
|
|
|
|
para.unshift(value); |
|
|
|
|
value = afterFunc.apply(o, para); |
|
|
|
|
} |
|
|
|
|
return value; |
|
|
|
|
} else { |
|
|
|
|
if (BI.isFunction(replaceFunc)) { |
|
|
|
|
replaceFunc.apply(o, para); |
|
|
|
|
} else { |
|
|
|
|
oldFunction.apply(o, para); |
|
|
|
|
} |
|
|
|
|
if (BI.isFunction(afterFunc)) { |
|
|
|
|
afterFunc.apply(o, para); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
$.extend(BI.Msg, { |
|
|
|
|
/** |
|
|
|
|
* 弹出框然后有个输入,确认返回输入的值 |
|
|
|
|
* @param title 标题 |
|
|
|
|
* @param content 标签 |
|
|
|
|
* @param callback 回调函数 |
|
|
|
|
* @param validationChecker 文本框的校验 |
|
|
|
|
*/ |
|
|
|
|
prompt: function prompt(title, content, callback, config, checkFunc) { |
|
|
|
|
// BI.Popovers.removeAll();
|
|
|
|
|
var id = BI.UUID(); |
|
|
|
|
var textEditor = { |
|
|
|
|
type: "bi.text_editor", |
|
|
|
|
ref: function ref(_ref) { |
|
|
|
|
BI[id] = _ref; |
|
|
|
|
}, |
|
|
|
|
width: 200 |
|
|
|
|
}; |
|
|
|
|
textEditor = BI.extend(textEditor, config ? config : {}); |
|
|
|
|
var widget = BI.Popovers.create(id, { |
|
|
|
|
type: "bi.bar_popover", |
|
|
|
|
// String或者是json都行
|
|
|
|
|
header: title, |
|
|
|
|
size: "small", |
|
|
|
|
body: { |
|
|
|
|
type: "bi.horizontal", |
|
|
|
|
horizontalAlign: "center", |
|
|
|
|
verticalAlign: "middle", |
|
|
|
|
hgap: 10, |
|
|
|
|
items: [{ |
|
|
|
|
type: "bi.label", |
|
|
|
|
text: content |
|
|
|
|
}, textEditor] |
|
|
|
|
}, |
|
|
|
|
footer: { |
|
|
|
|
type: "bi.right_vertical_adapt", |
|
|
|
|
lgap: 10, |
|
|
|
|
items: [{ |
|
|
|
|
type: "bi.button", |
|
|
|
|
text: "取消", |
|
|
|
|
value: 1, |
|
|
|
|
level: "ignore", |
|
|
|
|
handler: function handler(v) { |
|
|
|
|
BI.Popovers.remove(id); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
type: "bi.button", |
|
|
|
|
text: "确定", |
|
|
|
|
value: 0, |
|
|
|
|
handler: function handler(v) { |
|
|
|
|
var value = BI[id].getValue(); |
|
|
|
|
if (BI.isFunction(checkFunc) && !checkFunc(value)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
BI.isFunction(callback) && callback(BI[id].getValue()); |
|
|
|
|
BI.Popovers.remove(id); |
|
|
|
|
} |
|
|
|
|
}] |
|
|
|
|
} |
|
|
|
|
/* listeners: [{ |
|
|
|
|
eventName: "EVENT_CANCEL", |
|
|
|
|
action: function () { |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
eventName: "EVENT_CONFIRM", |
|
|
|
|
action: function () { |
|
|
|
|
BI.isFunction(callback) && callback(BI[id].getValue()); |
|
|
|
|
} |
|
|
|
|
}]*/ |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
widget.show(id); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}(); |
|
|
|
|
; |
|
|
|
|
!function () { |
|
|
|
|
var widget = BI.inherit(BI.Widget, { |
|
|
|
|
props: {}, |
|
|
|
@ -865,10 +994,12 @@
|
|
|
|
|
} else { |
|
|
|
|
var token = res.data; |
|
|
|
|
} |
|
|
|
|
var url = window.location.origin + Dec.fineServletURL + "?" + "GWToken" + "?" + token + "?" + self.model.id ; |
|
|
|
|
var url = window.location.origin + Dec.fineServletURL + "?" + "GWToken" + "?" + token + "?" + self.model.id; |
|
|
|
|
url = "finereport://" + encodeURIComponent(url); |
|
|
|
|
try { |
|
|
|
|
BI.CLI.compatible.remoteDesign(url,{web_ip : BI.CLI.info.ip},self.model.subjectInfo.id); |
|
|
|
|
BI.CLI.compatible.remoteDesign(url, { |
|
|
|
|
web_ip: BI.CLI.info.ip |
|
|
|
|
}, self.model.subjectInfo.id); |
|
|
|
|
} catch (e) { |
|
|
|
|
window.open(url); |
|
|
|
|
} |
|
|
|
@ -969,135 +1100,6 @@
|
|
|
|
|
BI.model("bi.subject.view.extend.report.model", store); |
|
|
|
|
}(); |
|
|
|
|
; |
|
|
|
|
!function () { |
|
|
|
|
BI.Front = BI.Front || {}; |
|
|
|
|
BI.Front = BI.extend(BI.Front, { |
|
|
|
|
utils: { |
|
|
|
|
injectionFunc: function injectionFunc(o, configs) { |
|
|
|
|
if (BI.isNotEmptyArray(configs)) { |
|
|
|
|
BI.each(configs, function (index, item) { |
|
|
|
|
var functionName = item.functionName; |
|
|
|
|
if (functionName) { |
|
|
|
|
var oldFunction = o[functionName]; |
|
|
|
|
var beforeFunc = item.beforeFunc; //执行前的函数
|
|
|
|
|
var afterFunc = item.afterFunc; //执行后函数
|
|
|
|
|
var returnValue = item.returnValue; //是否返回值
|
|
|
|
|
var replaceFunc = item.replaceFunc; //替换函数,如果不传递那么就会执行下默认的
|
|
|
|
|
|
|
|
|
|
o[functionName] = function () { |
|
|
|
|
var para = []; |
|
|
|
|
var len = arguments.length; |
|
|
|
|
for (var i = 0; i < len; i++) { |
|
|
|
|
para.push(arguments[i]); |
|
|
|
|
} |
|
|
|
|
if (BI.isFunction(beforeFunc)) { |
|
|
|
|
beforeFunc.apply(o, para); |
|
|
|
|
} |
|
|
|
|
if (returnValue) { |
|
|
|
|
var value = null; |
|
|
|
|
if (BI.isFunction(replaceFunc)) { |
|
|
|
|
value = replaceFunc.apply(o, para); |
|
|
|
|
} else { |
|
|
|
|
value = oldFunction.apply(o, para); |
|
|
|
|
} |
|
|
|
|
if (BI.isFunction(afterFunc)) { |
|
|
|
|
para.unshift(value); |
|
|
|
|
value = afterFunc.apply(o, para); |
|
|
|
|
} |
|
|
|
|
return value; |
|
|
|
|
} else { |
|
|
|
|
if (BI.isFunction(replaceFunc)) { |
|
|
|
|
replaceFunc.apply(o, para); |
|
|
|
|
} else { |
|
|
|
|
oldFunction.apply(o, para); |
|
|
|
|
} |
|
|
|
|
if (BI.isFunction(afterFunc)) { |
|
|
|
|
afterFunc.apply(o, para); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
$.extend(BI.Msg, { |
|
|
|
|
/** |
|
|
|
|
* 弹出框然后有个输入,确认返回输入的值 |
|
|
|
|
* @param title 标题 |
|
|
|
|
* @param content 标签 |
|
|
|
|
* @param callback 回调函数 |
|
|
|
|
* @param validationChecker 文本框的校验 |
|
|
|
|
*/ |
|
|
|
|
prompt: function prompt(title, content, callback, config, checkFunc) { |
|
|
|
|
// BI.Popovers.removeAll();
|
|
|
|
|
var id = BI.UUID(); |
|
|
|
|
var textEditor = { |
|
|
|
|
type: "bi.text_editor", |
|
|
|
|
ref: function ref(_ref) { |
|
|
|
|
BI[id] = _ref; |
|
|
|
|
}, |
|
|
|
|
width: 200 |
|
|
|
|
}; |
|
|
|
|
textEditor = BI.extend(textEditor, config ? config : {}); |
|
|
|
|
var widget = BI.Popovers.create(id, { |
|
|
|
|
type: "bi.bar_popover", |
|
|
|
|
// String或者是json都行
|
|
|
|
|
header: title, |
|
|
|
|
size: "small", |
|
|
|
|
body: { |
|
|
|
|
type: "bi.horizontal", |
|
|
|
|
horizontalAlign: "center", |
|
|
|
|
verticalAlign: "middle", |
|
|
|
|
hgap: 10, |
|
|
|
|
items: [{ |
|
|
|
|
type: "bi.label", |
|
|
|
|
text: content |
|
|
|
|
}, textEditor] |
|
|
|
|
}, |
|
|
|
|
footer: { |
|
|
|
|
type: "bi.right_vertical_adapt", |
|
|
|
|
lgap: 10, |
|
|
|
|
items: [{ |
|
|
|
|
type: "bi.button", |
|
|
|
|
text: "取消", |
|
|
|
|
value: 1, |
|
|
|
|
level: "ignore", |
|
|
|
|
handler: function handler(v) { |
|
|
|
|
BI.Popovers.remove(id); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
type: "bi.button", |
|
|
|
|
text: "确定", |
|
|
|
|
value: 0, |
|
|
|
|
handler: function handler(v) { |
|
|
|
|
var value = BI[id].getValue(); |
|
|
|
|
if (BI.isFunction(checkFunc) && !checkFunc(value)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
BI.isFunction(callback) && callback(BI[id].getValue()); |
|
|
|
|
BI.Popovers.remove(id); |
|
|
|
|
} |
|
|
|
|
}] |
|
|
|
|
} |
|
|
|
|
/* listeners: [{ |
|
|
|
|
eventName: "EVENT_CANCEL", |
|
|
|
|
action: function () { |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
eventName: "EVENT_CONFIRM", |
|
|
|
|
action: function () { |
|
|
|
|
BI.isFunction(callback) && callback(BI[id].getValue()); |
|
|
|
|
} |
|
|
|
|
}]*/ |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
widget.show(id); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}(); |
|
|
|
|
; |
|
|
|
|
!function () { |
|
|
|
|
function importResource(path, type) { |
|
|
|
|
var url = Dec.fineServletURL + "/file?path=" + path; |
|
|
|
@ -1195,17 +1197,33 @@
|
|
|
|
|
reportMap = self.store.frmMap; |
|
|
|
|
} |
|
|
|
|
if (reportMap[item.id]) { |
|
|
|
|
return BI.extend(self.store.createExtendReportNode(pId, reportMap[item.id], find.typeValue), info); |
|
|
|
|
return BI.extend(self.store.createExtendReportNode(pId, reportMap[item.id], find.typeValue, reportMap), info); |
|
|
|
|
} |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
return self.store.oldGetNodeByItem(pId, item, direction); |
|
|
|
|
}; |
|
|
|
|
self.store.createExtendReportNode = function (pId, report, itemType) { |
|
|
|
|
self.store.createExtendReportNode = function (pId, report, itemType, reportMap) { |
|
|
|
|
return { |
|
|
|
|
text: report.name, |
|
|
|
|
title: function title() { |
|
|
|
|
return report.name; |
|
|
|
|
if (BI.isNotNull(reportMap[report.id].position)) { |
|
|
|
|
return Promise.resolve(getReportDescription(reportMap[report.id])); |
|
|
|
|
} |
|
|
|
|
return getExtendReportInfo(report.id, itemType).then(function (res) { |
|
|
|
|
var _res$data = res.data, |
|
|
|
|
position = _res$data.position, |
|
|
|
|
createBy = _res$data.createBy, |
|
|
|
|
createTime = _res$data.createTime, |
|
|
|
|
lastUpdateTime = _res$data.lastUpdateTime; |
|
|
|
|
reportMap[report.id] = Object.assign(Object.assign({}, report), { |
|
|
|
|
position: position, |
|
|
|
|
createBy: createBy, |
|
|
|
|
createTime: createTime, |
|
|
|
|
lastUpdateTime: lastUpdateTime |
|
|
|
|
}); |
|
|
|
|
return getReportDescription(reportMap[report.id]); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
value: Object.assign(Object.assign({}, report), { |
|
|
|
|
moduleType: 2 |
|
|
|
@ -1215,6 +1233,28 @@
|
|
|
|
|
itemType: itemType |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
function getExtendReportInfo(id, type) { |
|
|
|
|
var url = "/v5/conf/tables/usage/info"; |
|
|
|
|
var data = { |
|
|
|
|
id: id, |
|
|
|
|
type: type |
|
|
|
|
}; |
|
|
|
|
return new Promise(function (resolve) { |
|
|
|
|
Dec.reqPost(url, data, function (res) { |
|
|
|
|
resolve(res); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
function getReportDescription(report) { |
|
|
|
|
var description = []; |
|
|
|
|
description.push("报表名称:" + report.name); |
|
|
|
|
description.push(BI.i18nText('BI-Conf_Position_With_Colon') + report.position); |
|
|
|
|
description.push(BI.i18nText('BI-Basic_Creator_Colon') + report.createBy); |
|
|
|
|
report.createTime && description.push(BI.i18nText('BI-Basic_Creator_Time_Colon') + BI.print(BI.getDate(report.createTime), '%Y/%X/%d %H:%M:%S')); |
|
|
|
|
report.lastUpdateTime && description.push(BI.i18nText('BI-Conf_Last_Edit_Time') + BI.print(BI.getDate(report.lastUpdateTime), '%Y/%X/%d %H:%M:%S')); |
|
|
|
|
return description.join('\n'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 图标 |
|
|
|
|
* @type {function(*=): (*)} |
|
|
|
|