Browse Source

清单精灵编辑器

zhongzewei 7 years ago
parent
commit
169aad0820

+ 5 - 0
modules/std_billsGuidance_lib/facade/facades.js

@@ -225,13 +225,18 @@ async function getItemsBybills(guidanceLibID, billsID){
 async function updateItems(updateDatas) {
     let bulkArr = [];
     for(let updateData of updateDatas){
+        console.log(updateData.updateType);
         if(updateData.updateType === 'create'){
             bulkArr.push({insertOne: {document: updateData.updateData}});
         }
         else if(updateData.updateType === 'update'){
+            console.log('enterUpdate================');
+            console.log(updateData.findData);
             bulkArr.push({updateOne: {filter: updateData.findData, update: {$set: updateData.updateData}}});
         }
         else{
+            console.log('enterDel====================');
+            console.log(updateData.findData);
             bulkArr.push({deleteOne: {filter: updateData.findData}});
         }
     }

+ 1 - 1
public/web/PerfectLoad.js

@@ -21,7 +21,7 @@ jQuery.bootstrapLoading = {
             //提示颜色
             delayTime: 500,
             //页面加载完成后,加载页面渐出速度
-            zindex: 999,
+            zindex: 2000,
             //loading页面层次
             sleep: 0
             //设置挂起,等于0时则无需挂起

+ 2 - 2
web/maintain/billsGuidance_lib/js/billsGuidance.js

@@ -658,7 +658,7 @@ const billsGuidance = (function () {
         //更新父节点
         updateDatas.push({updateType: updateType.update, findData: {ID: selected.getParentID()}, updateData: {NextSiblingID: selected.getID()}});
         //更新选中节点
-        updateDatas.push({udpateType: updateType.update, findData: {ID: selected.getID()},
+        updateDatas.push({updateType: updateType.update, findData: {ID: selected.getID()},
             updateData: {ParentID: selected.parent.getParentID(), NextSiblingID: selected.parent.getNextSiblingID()}});
         if(selected.nextSibling && selected.children.length > 0){
             //更新选中节点最末子节点
@@ -704,7 +704,7 @@ const billsGuidance = (function () {
         updateDatas.push({updateType: updateType.update, findData: {ID: selected.preSibling.getID()}, updateData: {NextSiblingID: selected.getNextSiblingID()}});
         //更新前前节点
         if(selected.preSibling.preSibling){
-            updateDatas.push({udpateType: updateType.update, findData: {ID: selected.preSibling.preSibling.getID()}, updateData: {NextSiblingID: selected.getID()}});
+            updateDatas.push({updateType: updateType.update, findData: {ID: selected.preSibling.preSibling.getID()}, updateData: {NextSiblingID: selected.getID()}});
         }
         //更新选中节点
         updateDatas.push({updateType: updateType.update, findData: {ID: selected.getID()}, updateData: {NextSiblingID: selected.preSibling.getID()}});

+ 3 - 0
web/maintain/billsGuidance_lib/js/main.js

@@ -106,14 +106,17 @@ const billsGuidanceMain = (function () {
                 }
                 //新建
                 $.bootstrapLoading.start();
+                $('#addY').addClass('disabled');
                 let createData = {type: parseInt(addType.val()), ID: uuid.v1(), name: cName, compilationId: compilationId, compilationName: compilationName, billsLibId: parseInt(billsLibId), billsLibName:billsLibName};
                 let updateData = {updateType: updateType.create, updateData: createData};
                 CommonAjax.post('/billsGuidance/api/updateBillsGuideLib', updateData, function (rstData) {
                     guidanceLibs.push(rstData);
                     addLibToView($('.main').find('tbody'), rstData);
                     $('#add').modal('hide');
+                    $('#addY').removeClass('disabled');
                     $.bootstrapLoading.end();
                 }, function () {
+                    $('#addY').removeClass('disabled');
                     $.bootstrapLoading.end();
                 });
             }