|
@@ -1,50 +1,56 @@
|
|
|
<template>
|
|
|
<div class="webapp">
|
|
|
<basic-container>
|
|
|
- <avue-formdesigner :option="option"
|
|
|
- @submit="handleSubmit"></avue-formdesigner>
|
|
|
+ <avue-form-design :option="option"
|
|
|
+ @submit="handleSubmit">
|
|
|
+ </avue-form-design>
|
|
|
</basic-container>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
|
|
|
<script>
|
|
|
- import {getForm} from '@/api/gen/gen'
|
|
|
- import {validatenull} from "../../util/validate";
|
|
|
+import { getForm } from '@/api/gen/gen'
|
|
|
+import { validatenull } from "../../util/validate";
|
|
|
|
|
|
- export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- box: true,
|
|
|
- option: {}
|
|
|
+export default {
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ box: true,
|
|
|
+ option: {
|
|
|
+ column: []
|
|
|
}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ this.getFormInfo()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleSubmit (json) {
|
|
|
+ console.log(json)
|
|
|
},
|
|
|
- created() {
|
|
|
- this.getFormInfo()
|
|
|
- },
|
|
|
- methods: {
|
|
|
- handleSubmit(json) {
|
|
|
- console.log(json)
|
|
|
- },
|
|
|
- getFormInfo() {
|
|
|
- let params = this.$route.query;
|
|
|
- getForm(params.tableName).then(response => {
|
|
|
- if (!validatenull(response.data.data)) {
|
|
|
- this.option = JSON.parse(response.data.data.formInfo)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ getFormInfo () {
|
|
|
+ let params = this.$route.query;
|
|
|
+ getForm(params.tableName).then(response => {
|
|
|
+ if (!validatenull(response.data.data)) {
|
|
|
+ this.option = JSON.parse(response.data.data.formInfo)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
- .webapp {
|
|
|
- background-color: #fff;
|
|
|
- position: fixed;
|
|
|
- left: 0;
|
|
|
- top: 0;
|
|
|
-
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
+.webapp {
|
|
|
+ background-color: #fff;
|
|
|
+ position: relative;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ .form-designer {
|
|
|
+ height: 700px;
|
|
|
+ }
|
|
|
+ .form-designer .widget-config-container .el-tabs__header {
|
|
|
+ position: relative;
|
|
|
}
|
|
|
+}
|
|
|
</style>
|