|
@@ -1,7 +1,6 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import {copyStrFunc} from "@/utils/public";
|
|
import {copyStrFunc} from "@/utils/public";
|
|
|
import {PageStore} from "@/views/data-base/page-editor-help-v2/page-help-v2";
|
|
import {PageStore} from "@/views/data-base/page-editor-help-v2/page-help-v2";
|
|
|
-import XEUtils from "xe-utils";
|
|
|
|
|
import {CyJsonEditorDialog} from "@/components/cy/cy-monaco-editor/CyMonacoEditor";
|
|
import {CyJsonEditorDialog} from "@/components/cy/cy-monaco-editor/CyMonacoEditor";
|
|
|
import {ElButton} from "element-plus";
|
|
import {ElButton} from "element-plus";
|
|
|
|
|
|
|
@@ -28,21 +27,6 @@ function saveData() {
|
|
|
props.store.handleSavaData()
|
|
props.store.handleSavaData()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function defaultValue() {
|
|
|
|
|
- let temp = {};
|
|
|
|
|
- if (XEUtils.isEmpty(props.store.pageData.value.paramsDefaultValue)) {
|
|
|
|
|
- props.store.pageData.value.header.forEach(item => {
|
|
|
|
|
- temp[item.key] = ""
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- temp = props.store.pageData.value.paramsDefaultValue
|
|
|
|
|
- }
|
|
|
|
|
- CyJsonEditorDialog(temp, {bodyWidth: '60%'}).then(res => {
|
|
|
|
|
- props.store.pageData.value.paramsDefaultValue = res.json
|
|
|
|
|
- })
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
function editorPageJson() {
|
|
function editorPageJson() {
|
|
|
CyJsonEditorDialog(props.store.pageData.value, {fullScreen: true}).then(res => {
|
|
CyJsonEditorDialog(props.store.pageData.value, {fullScreen: true}).then(res => {
|
|
|
props.store.mutation.setPageData(res.json)
|
|
props.store.mutation.setPageData(res.json)
|
|
@@ -57,7 +41,7 @@ function editorPageJson() {
|
|
|
<el-button @click="generateQuery">生成查询</el-button>
|
|
<el-button @click="generateQuery">生成查询</el-button>
|
|
|
<el-button @click="generateTableColumns">生成表格列</el-button>
|
|
<el-button @click="generateTableColumns">生成表格列</el-button>
|
|
|
<el-button @click="saveData">保存</el-button>
|
|
<el-button @click="saveData">保存</el-button>
|
|
|
- <el-button @click="defaultValue">默认值</el-button>
|
|
|
|
|
|
|
+ <el-button @click="store.defaultValue">默认值</el-button>
|
|
|
<el-button @click="editorPageJson">编辑页面JSON对象</el-button>
|
|
<el-button @click="editorPageJson">编辑页面JSON对象</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|