mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 16:22:57 +08:00
fix:新增数据设置小提示
This commit is contained in:
parent
8ee18819c5
commit
6d4be943d7
@ -7,6 +7,11 @@ export enum DataResultEnum {
|
|||||||
FAILURE = 2,
|
FAILURE = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum TimelineTitleEnum {
|
||||||
|
MAPPING = '数据映射',
|
||||||
|
CONTENT = '数据内容',
|
||||||
|
}
|
||||||
|
|
||||||
export enum SelcetOptionsLableEnum {
|
export enum SelcetOptionsLableEnum {
|
||||||
STATIC = '静态数据',
|
STATIC = '静态数据',
|
||||||
AJAX = '动态请求',
|
AJAX = '动态请求',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/>
|
/>
|
||||||
</setting-item-box>
|
</setting-item-box>
|
||||||
<n-timeline>
|
<n-timeline>
|
||||||
<n-timeline-item type="info" title="数据映射">
|
<n-timeline-item type="info" :title="TimelineTitleEnum.MAPPING">
|
||||||
<n-table striped>
|
<n-table striped>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -34,8 +34,9 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</n-table>
|
</n-table>
|
||||||
</n-timeline-item>
|
</n-timeline-item>
|
||||||
<n-timeline-item type="success" title="静态数据">
|
<n-timeline-item type="success" :title="TimelineTitleEnum.CONTENT">
|
||||||
<n-space vertical>
|
<n-space vertical>
|
||||||
|
<n-text prefix="bar" depth="3">数据格式需要符合 ECharts-setdata 规范</n-text>
|
||||||
<n-space class="source-btn-box">
|
<n-space class="source-btn-box">
|
||||||
<n-upload
|
<n-upload
|
||||||
v-model:file-list="uploadFileListRef"
|
v-model:file-list="uploadFileListRef"
|
||||||
@ -43,14 +44,16 @@
|
|||||||
:customRequest="customRequest"
|
:customRequest="customRequest"
|
||||||
@before-upload="beforeUpload"
|
@before-upload="beforeUpload"
|
||||||
>
|
>
|
||||||
<n-button class="sourceBtn-item">
|
<n-space>
|
||||||
<template #icon>
|
<n-button class="sourceBtn-item">
|
||||||
<n-icon>
|
<template #icon>
|
||||||
<document-add-icon />
|
<n-icon>
|
||||||
</n-icon>
|
<document-add-icon />
|
||||||
</template>
|
</n-icon>
|
||||||
导入(json / txt)
|
</template>
|
||||||
</n-button>
|
导入(json / txt)
|
||||||
|
</n-button>
|
||||||
|
</n-space>
|
||||||
</n-upload>
|
</n-upload>
|
||||||
<n-button class="sourceBtn-item" @click="download">
|
<n-button class="sourceBtn-item" @click="download">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
@ -71,14 +74,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, toRefs, computed, watch, nextTick } from 'vue'
|
import { ref, computed, watch, nextTick } from 'vue'
|
||||||
import { SettingItemBox } from '@/components/ChartItemSetting/index'
|
import { SettingItemBox } from '@/components/ChartItemSetting/index'
|
||||||
import { RequestDataTypeEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
import { RequestDataTypeEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||||
import { useTargetData } from '../hooks/useTargetData.hook'
|
import { useTargetData } from '../hooks/useTargetData.hook'
|
||||||
import { UploadCustomRequestOptions } from 'naive-ui'
|
import { UploadCustomRequestOptions } from 'naive-ui'
|
||||||
import { FileTypeEnum } from '@/enums/fileTypeEnum'
|
import { FileTypeEnum } from '@/enums/fileTypeEnum'
|
||||||
import { readFile, downloadFile } from '@/utils'
|
import { readFile, downloadFile } from '@/utils'
|
||||||
import { DataResultEnum, SelcetOptionsLableEnum, SelectOptionsType } from './index.d'
|
import { DataResultEnum, TimelineTitleEnum, SelcetOptionsLableEnum, SelectOptionsType } from './index.d'
|
||||||
import { icon } from '@/plugins'
|
import { icon } from '@/plugins'
|
||||||
|
|
||||||
const { DocumentAddIcon, DocumentDownloadIcon } = icon.carbon
|
const { DocumentAddIcon, DocumentDownloadIcon } = icon.carbon
|
||||||
@ -103,7 +106,6 @@ const selectOptions: SelectOptionsType[] = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
// 获取数据
|
// 获取数据
|
||||||
const getSource = computed(() => {
|
const getSource = computed(() => {
|
||||||
return JSON.stringify(source.value)
|
return JSON.stringify(source.value)
|
||||||
|
Loading…
Reference in New Issue
Block a user