|
@@ -36,7 +36,7 @@
|
|
|
></Toolbar>
|
|
|
<Editor
|
|
|
style="overflow-y: hidden; height: calc(100% - 100px);"
|
|
|
- v-model="editorHtml"
|
|
|
+ v-model="changeObj.script_requirement"
|
|
|
:defaultConfig="editorConfig"
|
|
|
:mode="mode"
|
|
|
@onCreated="onCreated"
|
|
@@ -211,7 +211,7 @@ export default {
|
|
|
return {
|
|
|
drawer: false,
|
|
|
editor: null,
|
|
|
- editorHtml: null,
|
|
|
+ // editorHtml: null,
|
|
|
toolbarConfig: {
|
|
|
toolbarKeys: [
|
|
|
'headerSelect',
|
|
@@ -274,6 +274,12 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.editBaseRefs.setValues(data)
|
|
|
})
|
|
|
+ this.changeObj = {
|
|
|
+ script_content: data.script_content,
|
|
|
+ script_requirement: data.script_requirement,
|
|
|
+ source_table: data.source_table,
|
|
|
+ target_table: data.target_table
|
|
|
+ }
|
|
|
} catch (error) {
|
|
|
this.$snackbar.error(error)
|
|
|
}
|
|
@@ -311,17 +317,17 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
async onGenerating () {
|
|
|
- const text = this.editor.getText()
|
|
|
- if (!text) {
|
|
|
+ // const text = this.editor.getText()
|
|
|
+ if (!this.changeObj.script_requirement) {
|
|
|
this.$snackbar.warning('请输入内容')
|
|
|
return
|
|
|
}
|
|
|
this.loading = true
|
|
|
try {
|
|
|
const { data } = await api.getDataFlowScript({
|
|
|
- request_data: text
|
|
|
+ request_data: this.changeObj.script_requirement
|
|
|
})
|
|
|
- this.changeObj.script_requirement = text
|
|
|
+ // this.changeObj.script_requirement = text
|
|
|
this.changeObj.script_content = data.script_content
|
|
|
} catch (error) {
|
|
|
this.$snackbar.error(error)
|