From 79590f973b3a4ea566cae5ff475eb6fd398316ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Thu, 21 Mar 2024 08:50:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=99=BB=E5=BD=95=E5=9B=9E=E8=BD=A6?= =?UTF-8?q?=EF=BC=8C=E5=A4=84=E7=90=86=E5=8A=A8=E6=80=81=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=EF=BC=8C=E5=85=A8=E5=B1=80=E8=AF=B7=E6=B1=82=E5=BC=B9=E7=AA=97?= =?UTF-8?q?ESC=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Charts/Maps/MapBase/config.vue | 4 +- .../Charts/Scatters/ScatterCommon/config.ts | 160 +++++++++--------- .../components/ChartDataPondControl/index.vue | 32 +++- .../components/RequestGlobalConfig/index.vue | 6 +- .../components/ChartDataRequest/index.vue | 17 +- .../components/ChartDataRequest/pondIndex.vue | 24 ++- .../components/EditBottom/index.vue | 1 + .../ContentHeader/headerRightBtn/index.vue | 8 +- src/views/login/index.vue | 2 + .../ProjectItemsModalCard/index.vue | 2 +- 10 files changed, 157 insertions(+), 99 deletions(-) diff --git a/src/packages/components/Charts/Maps/MapBase/config.vue b/src/packages/components/Charts/Maps/MapBase/config.vue index e0363d8f..c3677dbe 100644 --- a/src/packages/components/Charts/Maps/MapBase/config.vue +++ b/src/packages/components/Charts/Maps/MapBase/config.vue @@ -81,8 +81,8 @@ - - + + diff --git a/src/packages/components/Charts/Scatters/ScatterCommon/config.ts b/src/packages/components/Charts/Scatters/ScatterCommon/config.ts index 753ea6d0..916d43ba 100644 --- a/src/packages/components/Charts/Scatters/ScatterCommon/config.ts +++ b/src/packages/components/Charts/Scatters/ScatterCommon/config.ts @@ -1,80 +1,80 @@ -import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public' -import { ScatterCommonConfig } from './index' -import { CreateComponentType } from '@/packages/index.d' -import cloneDeep from 'lodash/cloneDeep' -import dataJson from './data.json' - -export const includes = ['legend', 'xAxis', 'yAxis', 'grid'] - -export const seriesItem = { - type: 'scatter', - emphasis: { - focus: 'series' - }, - symbolSize: 12, - markArea: { - silent: true, - itemStyle: { - color: 'transparent', - borderWidth: 1, - borderType: 'dashed' - }, - data: [ - [ - { - xAxis: 'min', - yAxis: 'min' - }, - { - xAxis: 'max', - yAxis: 'max' - } - ] - ] - }, - markPoint: { - symbol: 'pin', - symbolSize: 50, - data: [ - { type: 'max', name: 'Max' }, - { type: 'min', name: 'Min' } - ] - } -} - -export const option = { - dataset: dataJson, - tooltip: { - showDelay: 0, - formatter: (params: { value: string | any[]; seriesName: string; name: string }) => { - return params.value.length > 1 - ? `${params.seriesName}:
${params.value[0]} ${params.value[1]}` - : `${params.name} ${params.value}` - }, - axisPointer: { - show: true, - type: 'cross', - lineStyle: { - type: 'dashed', - width: 1 - } - } - }, - xAxis: { - scale: true - }, - yAxis: { - scale: true - }, - series: dataJson.map((item, index) => ({ - ...seriesItem, - datasetIndex: index - })) -} - -export default class Config extends PublicConfigClass implements CreateComponentType { - public key = ScatterCommonConfig.key - public chartConfig = cloneDeep(ScatterCommonConfig) - // 图表配置项 - public option = echartOptionProfixHandle(option, includes) -} +import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public' +import { ScatterCommonConfig } from './index' +import { CreateComponentType } from '@/packages/index.d' +import cloneDeep from 'lodash/cloneDeep' +import dataJson from './data.json' + +export const includes = ['legend', 'xAxis', 'yAxis', 'grid'] + +export const seriesItem = { + type: 'scatter', + emphasis: { + focus: 'series' + }, + symbolSize: 12, + markArea: { + silent: true, + itemStyle: { + color: 'transparent', + borderWidth: 1, + borderType: 'dashed' + }, + data: [ + [ + { + xAxis: 'min', + yAxis: 'min' + }, + { + xAxis: 'max', + yAxis: 'max' + } + ] + ] + }, + markPoint: { + symbol: 'pin', + symbolSize: 50, + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' } + ] + } +} + +export const option = { + dataset: dataJson, + tooltip: { + showDelay: 0, + formatter: (params: { value: string | any[]; seriesName: string; name: string }) => { + return params.value.length > 1 + ? `${params.seriesName}:
${params.value[0]} ${params.value[1]}` + : `${params.name} ${params.value}` + }, + axisPointer: { + show: true, + type: 'cross', + lineStyle: { + type: 'dashed', + width: 1 + } + } + }, + xAxis: { + scale: true + }, + yAxis: { + scale: true + }, + series: dataJson.map((item, index) => ({ + ...seriesItem, + datasetIndex: index + })) +} + +export default class Config extends PublicConfigClass implements CreateComponentType { + public key = ScatterCommonConfig.key + public chartConfig = cloneDeep(ScatterCommonConfig) + // 图表配置项 + public option = echartOptionProfixHandle(option, includes) +} diff --git a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataPond/components/ChartDataPondControl/index.vue b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataPond/components/ChartDataPondControl/index.vue index 1e4ac8c7..65041b6e 100644 --- a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataPond/components/ChartDataPondControl/index.vue +++ b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataPond/components/ChartDataPondControl/index.vue @@ -1,5 +1,11 @@ - 保存 & 发送请求 +
+ 取消 + 保存 & 发送请求 +
@@ -82,9 +91,12 @@ const pondData = computed(() => { return data[0] }) -watch(() => props.modelShow, (newValue) => { - modelShowRef.value = newValue -}) +watch( + () => props.modelShow, + newValue => { + modelShowRef.value = newValue + } +) watch( () => pondData.value, @@ -189,7 +201,7 @@ const deletePond = (targetData: RequestDataPondItemType) => { } // 关闭 -const closeHandle = () => { +const closeAndSendHandle = () => { // 将所选内容赋值给对象 if (pondData.value) { targetData.value.request = { @@ -200,6 +212,14 @@ const closeHandle = () => { emit('update:modelShow', false) emit('sendHandle') } + +const closeHandle = () => { + emit('update:modelShow', false) +} + +const onEsc = () => { + closeHandle() +} diff --git a/src/views/login/index.vue b/src/views/login/index.vue index de32c8e5..e818f4fe 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -56,6 +56,7 @@ type="text" maxlength="16" :placeholder="$t('global.form_account')" + @keydown.enter="handleSubmit" >