|
@@ -38,9 +38,9 @@ let zTreeOprObj = {
|
|
CommonAjax.postEx("report_tpl_api/getCompilationList", params, 20000, true, function(result){
|
|
CommonAjax.postEx("report_tpl_api/getCompilationList", params, 20000, true, function(result){
|
|
//console.log(result);
|
|
//console.log(result);
|
|
for (let item of result) {
|
|
for (let item of result) {
|
|
- if (item.is_release) {
|
|
|
|
|
|
+ // if (item.is_release) {
|
|
$("#compilations").append("<option value='" + item._id + "'>" + item.name + "</option>");
|
|
$("#compilations").append("<option value='" + item._id + "'>" + item.name + "</option>");
|
|
- }
|
|
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
// me.getReportTemplateTree($("#compilations").get(0));
|
|
// me.getReportTemplateTree($("#compilations").get(0));
|
|
me.getReportTemplateTreeEx($("#compilations").get(0));
|
|
me.getReportTemplateTreeEx($("#compilations").get(0));
|
|
@@ -581,10 +581,12 @@ let zTreeOprObj = {
|
|
// me.chkAndSetDupRefTplIds(result);
|
|
// me.chkAndSetDupRefTplIds(result);
|
|
// console.log(dupRefIds);
|
|
// console.log(dupRefIds);
|
|
let allTopTplNodes = [{userId: "-100", name: "公共模板", items:[], isParent: true, refId: ""}];
|
|
let allTopTplNodes = [{userId: "-100", name: "公共模板", items:[], isParent: true, refId: ""}];
|
|
- if (!result[0].hasOwnProperty("refId")) {
|
|
|
|
- result[0].refId = "";
|
|
|
|
|
|
+ if (result.length > 0) {
|
|
|
|
+ if (!result[0].hasOwnProperty("refId")) {
|
|
|
|
+ result[0].refId = "";
|
|
|
|
+ }
|
|
|
|
+ allTopTplNodes[0].items.push(result[0]);
|
|
}
|
|
}
|
|
- allTopTplNodes[0].items.push(result[0]);
|
|
|
|
let userIds = [];
|
|
let userIds = [];
|
|
for (let idx = 1; idx < result.length; idx++) {
|
|
for (let idx = 1; idx < result.length; idx++) {
|
|
let item = result[idx];
|
|
let item = result[idx];
|