|
@@ -16,6 +16,12 @@ function findNode (key, value, arr) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+// 分类数据排序
|
|
|
+function sortCategory() {
|
|
|
+ category.sort(function (a, b) {
|
|
|
+ return a.level ? (b.level ? a.level - b.level : -1) : a.id - b.id;
|
|
|
+ });
|
|
|
+}
|
|
|
// 初始化TenderTree数据
|
|
|
function initTenderTree () {
|
|
|
const levelCategory = category.filter(function (c) {
|
|
@@ -93,6 +99,7 @@ function initTenderTree () {
|
|
|
tenderTree.push(t);
|
|
|
}
|
|
|
}
|
|
|
+ sortTenderTree();
|
|
|
}
|
|
|
function recursiveGetTenderNodeHtml (node, arr, pid) {
|
|
|
// console.log(node, tender)
|
|
@@ -147,10 +154,12 @@ function getTenderTreeHtml () {
|
|
|
}
|
|
|
}
|
|
|
$(document).ready(function () {
|
|
|
- initTenderTree()
|
|
|
+ sortCategory();
|
|
|
+ initTenderTree();
|
|
|
$('#copyBtn').click(() => {
|
|
|
- const html = getTenderTreeHtml();
|
|
|
- $('#copyModalContent').html(html);
|
|
|
+ tenderListOrder.reOrderTenders('', '#copyModalContent', false);
|
|
|
+ // const html = getTenderTreeHtml();
|
|
|
+ // $('#copyModalContent').html(html);
|
|
|
$('#bd-set-8').modal('show');
|
|
|
});
|
|
|
|