feat: 表单数据保存修复

This commit is contained in:
tony
2022-12-16 21:52:53 +08:00
parent bc42ac6005
commit 2f5fed6f44
17 changed files with 45 additions and 50 deletions

View File

@@ -25,7 +25,7 @@
</template>
<script>
import { beautifierConf } from '@/utils/index'
import { beautifierConf } from '@/utils'
import ClipboardJS from 'clipboard'
import { saveAs } from 'file-saver'
import loadMonaco from '@/utils/loadMonaco'

View File

@@ -41,12 +41,12 @@
<div class="center-board">
<div class="action-bar">
<el-button icon="el-icon-plus" type="text" @click="handleForm">
保存
</el-button>
<el-button icon="el-icon-video-play" type="text" @click="run">
运行
</el-button>
<el-button icon="el-icon-plus" type="text" @click="handleForm">
保存
</el-button>
<el-button icon="el-icon-view" type="text" @click="showJson">
查看json
</el-button>
@@ -274,9 +274,6 @@ export default {
that.drawingList = drawingDefault
}
this.activeFormItem(that.drawingList[0])
// // if (formConfInDB) {
// // this.formConf = formConfInDB
// // }
that.drawingList = [];
const formId = that.$route.query && that.$route.query.formId;
if (formId) {
@@ -534,11 +531,11 @@ export default {
if (valid) {
if (this.form.formId != null) {
updateForm(this.form).then(response => {
this.msgSuccess("修改成功");
this.$modal.msgSuccess("修改成功");
});
} else {
addForm(this.form).then(response => {
this.msgSuccess("新增成功");
this.$modal.msgSuccess("新增成功");
});
}
this.drawingList = []
@@ -555,5 +552,5 @@ export default {
</script>
<style lang='scss'>
@import '@/styles/home';
@import '@/styles/home.scss';
</style>