|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <n-modal class="go-chart-data-request" v-model:show="modelShow" :mask-closable="false" :closeOnEsc="false">
|
|
|
|
|
|
|
+ <n-modal class="go-chart-data-request" v-model:show="modelShowRef" :mask-closable="false" :closeOnEsc="false">
|
|
|
<n-card :bordered="false" role="dialog" size="small" aria-modal="true" style="width: 1000px; height: 800px">
|
|
<n-card :bordered="false" role="dialog" size="small" aria-modal="true" style="width: 1000px; height: 800px">
|
|
|
<template #header></template>
|
|
<template #header></template>
|
|
|
<template #header-extra> </template>
|
|
<template #header-extra> </template>
|
|
@@ -29,7 +29,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script script lang="ts" setup>
|
|
<script script lang="ts" setup>
|
|
|
-import { toRefs, PropType } from 'vue'
|
|
|
|
|
|
|
+import { ref, toRefs, PropType, watch } from 'vue'
|
|
|
import { RequestContentTypeEnum } from '@/enums/httpEnum'
|
|
import { RequestContentTypeEnum } from '@/enums/httpEnum'
|
|
|
import { useTargetData } from '../../../hooks/useTargetData.hook'
|
|
import { useTargetData } from '../../../hooks/useTargetData.hook'
|
|
|
import { RequestGlobalConfig } from './components/RequestGlobalConfig'
|
|
import { RequestGlobalConfig } from './components/RequestGlobalConfig'
|
|
@@ -46,11 +46,22 @@ const emit = defineEmits(['update:modelShow', 'sendHandle'])
|
|
|
// 解构基础配置
|
|
// 解构基础配置
|
|
|
const { chartConfig } = toRefs(props.targetData as CreateComponentType)
|
|
const { chartConfig } = toRefs(props.targetData as CreateComponentType)
|
|
|
const { requestContentType } = toRefs((props.targetData as CreateComponentType).request)
|
|
const { requestContentType } = toRefs((props.targetData as CreateComponentType).request)
|
|
|
|
|
+const modelShowRef = ref(false)
|
|
|
const requestContentTypeObj = {
|
|
const requestContentTypeObj = {
|
|
|
[RequestContentTypeEnum.DEFAULT]: '普通请求',
|
|
[RequestContentTypeEnum.DEFAULT]: '普通请求',
|
|
|
[RequestContentTypeEnum.SQL]: 'SQL 请求'
|
|
[RequestContentTypeEnum.SQL]: 'SQL 请求'
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+watch(
|
|
|
|
|
+ () => props.modelShow,
|
|
|
|
|
+ newValue => {
|
|
|
|
|
+ modelShowRef.value = newValue
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ immediate: true
|
|
|
|
|
+ }
|
|
|
|
|
+)
|
|
|
|
|
+
|
|
|
const closeHandle = () => {
|
|
const closeHandle = () => {
|
|
|
emit('update:modelShow', false)
|
|
emit('update:modelShow', false)
|
|
|
}
|
|
}
|