|
@@ -143,6 +143,7 @@
|
|
|
placeholder="请输入"
|
|
|
maxlength="500"
|
|
|
show-word-limit
|
|
|
+ @blur="handleMindMap"
|
|
|
/>
|
|
|
<p v-else>{{ itemh.text }}</p>
|
|
|
</div>
|
|
@@ -175,8 +176,7 @@
|
|
|
/>
|
|
|
<p v-else>{{ itemh.text }}</p>
|
|
|
</div>
|
|
|
- <el-button v-if="inputActiveIndex !== indexh" type="primary" size="small"
|
|
|
-@click="inputActiveIndex = indexh"
|
|
|
+ <el-button v-if="inputActiveIndex !== indexh" type="primary" size="small" @click="inputActiveIndex = indexh"
|
|
|
>编辑</el-button
|
|
|
>
|
|
|
<el-button v-else type="primary" size="small" @click="inputActiveIndex = null">保存</el-button>
|
|
@@ -225,6 +225,7 @@ export default {
|
|
|
},
|
|
|
immediate: true,
|
|
|
},
|
|
|
+ 'data.text_list': 'handleMindMap',
|
|
|
},
|
|
|
methods: {
|
|
|
updateFileList({ file_list, file_id_list, file_info_list }) {
|
|
@@ -312,6 +313,17 @@ export default {
|
|
|
this.inputActiveIndex = null;
|
|
|
}
|
|
|
},
|
|
|
+ handleMindMap() {
|
|
|
+ // 思维导图数据
|
|
|
+ let node_list = [];
|
|
|
+ this.data.text_list.forEach((item) => {
|
|
|
+ node_list.push({
|
|
|
+ name: item.text,
|
|
|
+ id: Math.random().toString(36).substring(2, 12),
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.data.mind_map.node_list = node_list;
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|