mirror of
https://gitee.com/devlive-community/datacap.git
synced 2024-11-29 18:48:23 +08:00
fix(ui): fixed code
This commit is contained in:
parent
0b9e8463e3
commit
0028fd79bd
@ -46,7 +46,7 @@
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"tippy.js": "^6.3.7",
|
||||
"typescript": "^5.2.2",
|
||||
"typescript": "5.2.2",
|
||||
"vite": "^5.4.8",
|
||||
"vue-tsc": "^1.8.27"
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import router from '@/router'
|
||||
import i18n from '@/i18n/I18n'
|
||||
import store from '@/utils/store'
|
||||
import { createIcons } from '@/fontawesome'
|
||||
// @ts-ignore
|
||||
import ShadcnViewUI from 'view-shadcn-ui'
|
||||
|
||||
const app = createApp(App)
|
||||
|
@ -9,6 +9,7 @@ export interface ReportModel
|
||||
realtime?: boolean
|
||||
type?: string
|
||||
query?: string
|
||||
description?: string
|
||||
dataset?: DatasetModel
|
||||
source?: SourceModel
|
||||
}
|
@ -149,6 +149,9 @@ export class HttpUtils
|
||||
|
||||
private handlerMessage(message: string)
|
||||
{
|
||||
if (message) {
|
||||
console.debug(message)
|
||||
}
|
||||
}
|
||||
|
||||
getAxios()
|
||||
|
@ -130,6 +130,7 @@ export default defineComponent({
|
||||
const saveConfigure = (configure: any) => {
|
||||
const data = toObject()
|
||||
if (!configure.from) {
|
||||
// @ts-ignore
|
||||
proxy?.$Message.error({
|
||||
content: i18n.t('pipeline.validator.from'),
|
||||
showIcon: true
|
||||
@ -138,6 +139,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
if (!configure.to) {
|
||||
// @ts-ignore
|
||||
proxy?.$Message.error({
|
||||
content: i18n.t('pipeline.validator.to'),
|
||||
showIcon: true
|
||||
@ -146,6 +148,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
if (data.edges.length === 0) {
|
||||
// @ts-ignore
|
||||
proxy?.$Message.error({
|
||||
content: i18n.t('pipeline.validator.edge'),
|
||||
showIcon: true
|
||||
|
@ -24,7 +24,7 @@
|
||||
</ShadcnFormItem>
|
||||
|
||||
<ShadcnFormItem>
|
||||
<VisualEditor :loading="loading" :configuration="configuration" @commitOptions="onCommitOptions"/>
|
||||
<VisualEditor :loading="loading" :configuration="configuration as any" @commitOptions="onCommitOptions"/>
|
||||
</ShadcnFormItem>
|
||||
|
||||
<div class="flex justify-end">
|
||||
|
@ -8,18 +8,77 @@
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<VisualTable v-if="configuration?.type === Type.TABLE" :configuration="localConfiguration" :submitted="false" :width="width" :height="height"/>
|
||||
<VisualLine v-else-if="configuration?.type === Type.LINE" :configuration="localConfiguration" :submitted="false" :width="width" :height="height"/>
|
||||
<VisualBar v-else-if="configuration?.type === Type.BAR" :configuration="localConfiguration" :submitted="false" :width="width" :height="height"/>
|
||||
<VisualArea v-else-if="configuration?.type === Type.AREA" :configuration="localConfiguration" :submitted="false" :width="width" :height="height"/>
|
||||
<VisualPie v-else-if="configuration?.type === Type.PIE" :configuration="localConfiguration" :submitted="false" :width="width" :height="height"/>
|
||||
<VisualHistogram v-else-if="configuration?.type === Type.HISTOGRAM" :configuration="localConfiguration" :submitted="false" :width="width" :height="height"/>
|
||||
<VisualWordCloud v-else-if="configuration?.type === Type.WORDCLOUD" :configuration="localConfiguration" :submitted="false" :width="width" :height="height"/>
|
||||
<VisualScatter v-else-if="configuration?.type === Type.SCATTER" :configuration="localConfiguration" :submitted="false" :width="width" :height="height"/>
|
||||
<VisualRadar v-else-if="configuration?.type === Type.RADAR" :configuration="localConfiguration" :submitted="false" :width="width" :height="height"/>
|
||||
<VisualFunnel v-else-if="configuration?.type === Type.FUNNEL" :configuration="localConfiguration" :submitted="false" :width="width" :height="height"/>
|
||||
<VisualGauge v-else-if="configuration?.type === Type.GAUGE" :configuration="localConfiguration" :submitted="false" :width="width" :height="height"/>
|
||||
<VisualRose v-else-if="configuration?.type === Type.ROSE" :configuration="localConfiguration" :submitted="false" :width="width" :height="height"/>
|
||||
<VisualTable v-if="configuration?.type === Type.TABLE"
|
||||
:configuration="localConfiguration as any"
|
||||
:submitted="false"
|
||||
:width="width"
|
||||
:height="height"/>
|
||||
|
||||
<VisualLine v-else-if="configuration?.type === Type.LINE"
|
||||
:configuration="localConfiguration as any"
|
||||
:submitted="false"
|
||||
:width="width"
|
||||
:height="height"/>
|
||||
|
||||
<VisualBar v-else-if="configuration?.type === Type.BAR"
|
||||
:configuration="localConfiguration as any"
|
||||
:submitted="false"
|
||||
:width="width"
|
||||
:height="height"/>
|
||||
|
||||
<VisualArea v-else-if="configuration?.type === Type.AREA"
|
||||
:configuration="localConfiguration as any"
|
||||
:submitted="false"
|
||||
:width="width"
|
||||
:height="height"/>
|
||||
|
||||
<VisualPie v-else-if="configuration?.type === Type.PIE"
|
||||
:configuration="localConfiguration as any"
|
||||
:submitted="false"
|
||||
:width="width"
|
||||
:height="height"/>
|
||||
|
||||
<VisualHistogram v-else-if="configuration?.type === Type.HISTOGRAM"
|
||||
:configuration="localConfiguration as any"
|
||||
:submitted="false"
|
||||
:width="width"
|
||||
:height="height"/>
|
||||
|
||||
<VisualWordCloud v-else-if="configuration?.type === Type.WORDCLOUD"
|
||||
:configuration="localConfiguration as any"
|
||||
:submitted="false"
|
||||
:width="width"
|
||||
:height="height"/>
|
||||
|
||||
<VisualScatter v-else-if="configuration?.type === Type.SCATTER"
|
||||
:configuration="localConfiguration as any"
|
||||
:submitted="false"
|
||||
:width="width"
|
||||
:height="height"/>
|
||||
|
||||
<VisualRadar v-else-if="configuration?.type === Type.RADAR"
|
||||
:configuration="localConfiguration as any"
|
||||
:submitted="false"
|
||||
:width="width"
|
||||
:height="height"/>
|
||||
|
||||
<VisualFunnel v-else-if="configuration?.type === Type.FUNNEL"
|
||||
:configuration="localConfiguration as any"
|
||||
:submitted="false"
|
||||
:width="width"
|
||||
:height="height"/>
|
||||
|
||||
<VisualGauge v-else-if="configuration?.type === Type.GAUGE"
|
||||
:configuration="localConfiguration as any"
|
||||
:submitted="false"
|
||||
:width="width"
|
||||
:height="height"/>
|
||||
|
||||
<VisualRose v-else-if="configuration?.type === Type.ROSE"
|
||||
:configuration="localConfiguration as any"
|
||||
:submitted="false"
|
||||
:width="width"
|
||||
:height="height"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -108,6 +167,7 @@ export default defineComponent({
|
||||
this.formatRaw(response)
|
||||
}
|
||||
else {
|
||||
// @ts-ignore
|
||||
this.$Message.error({
|
||||
content: response.data.message,
|
||||
showIcon: true
|
||||
|
@ -29,7 +29,7 @@ export default defineComponent({
|
||||
{
|
||||
const { locale } = useI18n()
|
||||
|
||||
const changeLanguage = (language: string) => {
|
||||
const changeLanguage = (language: any) => {
|
||||
const prefix = 'language_'
|
||||
|
||||
language = language.value
|
||||
|
@ -85,37 +85,37 @@
|
||||
|
||||
<TableCreate v-if="tableCreateVisible"
|
||||
:is-visible="tableCreateVisible"
|
||||
:info="dataInfo"
|
||||
:info="dataInfo as any"
|
||||
@close="visibleCreateTable(false)"/>
|
||||
|
||||
<ColumnCreate v-if="columnCreateVisible"
|
||||
:is-visible="columnCreateVisible"
|
||||
:info="dataInfo"
|
||||
:info="dataInfo as any"
|
||||
@close="visibleCreateColumn(false)"/>
|
||||
|
||||
<TableExport v-if="tableExportVisible"
|
||||
:isVisible="tableExportVisible"
|
||||
:info="dataInfo"
|
||||
:info="dataInfo as any"
|
||||
@close="visibleExportData(false)"/>
|
||||
|
||||
<TableTruncate v-if="tableTruncateVisible"
|
||||
:is-visible="tableTruncateVisible"
|
||||
:info="dataInfo"
|
||||
:info="dataInfo as any"
|
||||
@close="visibleTruncateTable(false)"/>
|
||||
|
||||
<TableDrop v-if="tableDropVisible"
|
||||
:is-visible="tableDropVisible"
|
||||
:info="dataInfo"
|
||||
:info="dataInfo as any"
|
||||
@close="visibleDropTable(false)"/>
|
||||
|
||||
<ColumnChange v-if="columnChangeVisible"
|
||||
:is-visible="columnChangeVisible"
|
||||
:info="dataInfo"
|
||||
:info="dataInfo as any"
|
||||
@close="visibleChangeColumn(false)"/>
|
||||
|
||||
<ColumnDrop v-if="columnDropVisible"
|
||||
:is-visible="columnDropVisible"
|
||||
:info="dataInfo"
|
||||
:info="dataInfo as any"
|
||||
@close="visibleDropColumn(false)"/>
|
||||
</template>
|
||||
|
||||
|
@ -197,7 +197,7 @@
|
||||
<ShadcnDivider class="my-2"/>
|
||||
</div>
|
||||
|
||||
<VisualEditor :loading="loading" :configuration="configuration" @commitOptions="visibleCommitOptions"/>
|
||||
<VisualEditor :loading="loading" :configuration="configuration as any" @commitOptions="visibleCommitOptions"/>
|
||||
</ShadcnCol>
|
||||
</ShadcnRow>
|
||||
|
||||
@ -384,7 +384,7 @@ export default defineComponent({
|
||||
{
|
||||
return cloneDeep(value)
|
||||
},
|
||||
onRemove(index: number, array: never[])
|
||||
onRemove(index: number, array: any[])
|
||||
{
|
||||
array.splice(index, 1)
|
||||
this.onApplyAdhoc()
|
||||
|
@ -73,6 +73,7 @@ const onSubmit = () => {
|
||||
ReportService.saveOrUpdate(configure)
|
||||
.then(response => {
|
||||
if (response.status) {
|
||||
// @ts-ignore
|
||||
proxy?.$Message.success({
|
||||
content: proxy.$t('report.tip.publishSuccess').replace('$VALUE', formState.value.name),
|
||||
showIcon: true
|
||||
|
@ -3,7 +3,7 @@
|
||||
<template #content>
|
||||
<div class="relative h-24">
|
||||
<ShadcnSpin v-if="loading" fixed/>
|
||||
<VisualTable :configuration="configuration" :submitted="false"/>
|
||||
<VisualTable :configuration="configuration as any" :submitted="false"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -57,6 +57,7 @@ const onSubmit = () => {
|
||||
TableService.getData(props.info.code, configure)
|
||||
.then(response => {
|
||||
if (response.status) {
|
||||
// @ts-ignore
|
||||
proxy.$Message.success({
|
||||
content: proxy.$t('source.tip.resetAutoIncrementSuccess').replace('$VALUE', String(formState.value.autoIncrement)),
|
||||
showIcon: true
|
||||
@ -65,6 +66,7 @@ const onSubmit = () => {
|
||||
onCancel()
|
||||
}
|
||||
else {
|
||||
// @ts-ignore
|
||||
proxy.$Message.error({
|
||||
content: response.message,
|
||||
showIcon: true
|
||||
|
@ -83,7 +83,7 @@ export default defineComponent({
|
||||
{
|
||||
if (this.info) {
|
||||
this.loading = true
|
||||
TableService.exportData(String(this.info.value), this.formState)
|
||||
TableService.exportData(Number(this.info.value), this.formState)
|
||||
.then(response => {
|
||||
if (response.status) {
|
||||
this.formState.path = response.data
|
||||
|
@ -51,7 +51,7 @@
|
||||
:description="$t('user.tip.radar7Days')"
|
||||
:loading="loading">
|
||||
<div class="p-2">
|
||||
<VisualPie v-if="radar.configuration" :configuration="radar.configuration" :height="'200px'" :submitted="false"/>
|
||||
<VisualPie v-if="radar.configuration" :configuration="radar.configuration as any" :height="'200px'" :submitted="false"/>
|
||||
</div>
|
||||
</ShadcnCard>
|
||||
</ShadcnCol>
|
||||
|
@ -135,7 +135,7 @@ export default defineComponent({
|
||||
const result = Array.from(
|
||||
new Set(
|
||||
(Object.values(response.data)
|
||||
.reduce((acc, curr) => acc.concat(curr), []) as any[])
|
||||
.reduce((acc: any, curr) => acc.concat(curr), []) as any[])
|
||||
.map((value: { name: string }) => ({ label: value.name, value: value.name }))
|
||||
)
|
||||
)
|
||||
|
@ -134,7 +134,7 @@ export default defineComponent({
|
||||
const result = Array.from(
|
||||
new Set(
|
||||
(Object.values(response.data)
|
||||
.reduce((acc, curr) => acc.concat(curr), []) as any[])
|
||||
.reduce((acc: any, curr) => acc.concat(curr), []) as any[])
|
||||
.map((value: { name: string }) => ({ label: value.name, value: value.name }))
|
||||
)
|
||||
)
|
||||
|
@ -2,7 +2,7 @@
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"module": "Node16",
|
||||
"module": "ESNext",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
@ -10,14 +10,14 @@
|
||||
],
|
||||
"skipLibCheck": true,
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "node16",
|
||||
"moduleResolution": "node",
|
||||
"allowImportingTsExtensions": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "preserve",
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"strict": false,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
Loading…
Reference in New Issue
Block a user