Commit 97ae6841b56868fb4ba6d69c5017d790547c6202
1 parent
c26cda58
perf: add nodeIds field to delete cell bind data source
Showing
1 changed file
with
9 additions
and
5 deletions
| ... | ... | @@ -195,14 +195,18 @@ LocalFile.prototype.saveFile = function (title, revision, success, error, useCur |
| 195 | 195 | this.removeDraft(); |
| 196 | 196 | Editor.defaultContent = savedData; |
| 197 | 197 | var configurationContentList = []; |
| 198 | + console.log('EditorUi', this.ui.editor.graph.getDefaultParent().children) | |
| 199 | + const basicAttr = Sidebar.prototype.enumCellBasicAttribute | |
| 200 | + const allCell = (this.ui.editor.graph.getDefaultParent().children || []).filter(item => item.getAttribute(basicAttr.COMPONENT_TYPE)) | |
| 198 | 201 | var configurationContent = { |
| 199 | - "name": "第 1 页", | |
| 200 | - "id": Editor.configurationContentId, | |
| 201 | - "content": savedData, | |
| 202 | - "type": 1 | |
| 202 | + name: "第 1 页", | |
| 203 | + id: Editor.configurationContentId, | |
| 204 | + content: savedData, | |
| 205 | + type: 1, | |
| 206 | + nodeIds: allCell.map(item => item.id) | |
| 203 | 207 | }; |
| 204 | 208 | configurationContentList.push(configurationContent); |
| 205 | - var parmam = { "configurationId": Editor.configurationId, "configurationContentList": configurationContentList }; | |
| 209 | + var parmam = { configurationId: Editor.configurationId, configurationContentList }; | |
| 206 | 210 | defHttp.put("/yt/configuration/content", parmam).then(res => { |
| 207 | 211 | console.log(res) |
| 208 | 212 | }) | ... | ... |