Browse Source

特征及内容

zhongzewei 7 năm trước cách đây
mục cha
commit
52f1003aa7
1 tập tin đã thay đổi với 6 bổ sung15 xóa
  1. 6 15
      web/building_saas/main/js/views/character_content_view.js

+ 6 - 15
web/building_saas/main/js/views/character_content_view.js

@@ -124,10 +124,7 @@ let contentOprObj = {
     save: function (callback) {
         let selectedNode = projectObj.mainController.tree.selected;
         const setting = projectObj.project.property.addRule !== undefined ? projectObj.project.property.addRule : null;
-        pageCCOprObj.setCharacterBySetting(selectedNode, setting);		let me = contentOprObj;
-        let contentTxt = me.getColData(me.currentCache);
-        let txtObj =  {field: 'jobContentText', text: contentTxt ? contentTxt : ''};
-        pageCCOprObj.updateCharacterContent(pageCCOprObj.currentFindSet, {field: 'jobContent', updateArr: me.currentCache}, txtObj, contentOprObj, callback);
+        pageCCOprObj.setCharacterBySetting(selectedNode, setting, callback);
     },
     onEditEnded: function (sender, args) {
         let me = contentOprObj;
@@ -499,18 +496,9 @@ let characterOprObj = {
         }
     },
     save: function (callback) {
-        let me = characterOprObj;
-        let characterTxt = me.getColData(me.currentCache);
-        let txtObj =  {field: 'itemCharacterText', text: characterTxt ? characterTxt : ''};
-        pageCCOprObj.updateCharacterContent(pageCCOprObj.currentFindSet, {field: 'itemCharacter', updateArr: me.currentCache}, txtObj, characterOprObj, callback);
-
         let selectedNode = projectObj.mainController.tree.selected;
         const setting = projectObj.project.property.addRule !== undefined ? projectObj.project.property.addRule : null;
-        pageCCOprObj.setCharacterBySetting(selectedNode, setting);
-        // let me = characterOprObj;
-        // let characterTxt = me.getColData(me.currentCache);
-        // let txtObj =  {field: 'itemCharacterText', text: characterTxt ? characterTxt : ''};
-        // pageCCOprObj.updateCharacterContent(pageCCOprObj.currentFindSet, {field: 'itemCharacter', updateArr: me.currentCache}, txtObj, characterOprObj);
+        pageCCOprObj.setCharacterBySetting(selectedNode, setting, callback);
     },
     onEditStart: function (sender, args) {
         let me = characterOprObj;
@@ -834,7 +822,7 @@ let pageCCOprObj = {
      * @param {Object} setting - 设置
      * @return {void}
      */
-    setCharacterBySetting: function(node, setting) {
+    setCharacterBySetting: function(node, setting, callback) {
         let self = this;
 
         // 保存的条件数据
@@ -855,6 +843,9 @@ let pageCCOprObj = {
             node.data.name = updateData.name;
             node.data.itemCharacterText = updateData.itemCharacterText;
             node.data.jobContentText = updateData.jobContentText;
+            if(callback){
+                callback();
+            }
         });
 
     },