浏览代码

特征及内容

zhongzewei 7 年之前
父节点
当前提交
52f1003aa7
共有 1 个文件被更改,包括 6 次插入15 次删除
  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();
+            }
         });
 
     },