From 3fdfa001bf0517550c7b01b5baef1e476fd2d110 Mon Sep 17 00:00:00 2001 From: jackhoo_98 Date: Wed, 22 Mar 2023 21:06:28 +0800 Subject: [PATCH 01/10] =?UTF-8?q?fix:=20=E8=BF=90=E7=BB=B4=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BB=AA=E8=A1=A8=E7=9B=98=20=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96=E7=BD=91=E7=BB=9C=E6=B5=81=E9=87=8FY=E8=BD=B4?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/link/DashBoard/components/Cpu.vue | 2 -- .../link/DashBoard/components/Network.vue | 18 ++++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/views/link/DashBoard/components/Cpu.vue b/src/views/link/DashBoard/components/Cpu.vue index fd11d632..33d4e0ac 100644 --- a/src/views/link/DashBoard/components/Cpu.vue +++ b/src/views/link/DashBoard/components/Cpu.vue @@ -75,8 +75,6 @@ const pickerTimeChange = () => { const getCPUEcharts = async (val: any) => { loading.value = true; - console.log(224, val); - const res: any = await dashboard(defulteParamsData('cpu', val)); if (res.success) { const _cpuOptions = {}; diff --git a/src/views/link/DashBoard/components/Network.vue b/src/views/link/DashBoard/components/Network.vue index 070a563d..e470644e 100644 --- a/src/views/link/DashBoard/components/Network.vue +++ b/src/views/link/DashBoard/components/Network.vue @@ -114,8 +114,8 @@ const getNetworkEcharts = async (val: any) => { loading.value = false; }, 300); }; -const networkValueRender = (obj: any) => { - const { value } = obj; + +const formatterData = (value: any) => { let _data = ''; if (value >= 1024 && value < 1024 * 1024) { _data = `${Number((value / 1024).toFixed(2))}KB`; @@ -124,7 +124,14 @@ const networkValueRender = (obj: any) => { } else { _data = `${value}B`; } - return `${obj?.axisValueLabel}
${obj?.marker}${obj?.seriesName}: ${_data}`; + return _data; +}; + +const networkValueRender = (obj: any) => { + const { value } = obj; + return `${obj?.axisValueLabel}
${obj?.marker}${ + obj?.seriesName + }   ${formatterData(value)}`; }; const setOptions = (data: any, key: string) => ({ @@ -149,9 +156,12 @@ const handleNetworkOptions = (optionsData: any, xAxis: any) => { }, yAxis: { type: 'value', + axisLabel: { + formatter: (_value: any) => formatterData(_value), + }, }, grid: { - left: '100px', + left: '70px', right: '50px', }, tooltip: { From 0a33ca67ab3ed549a1dceeb2925805abe3f5112f Mon Sep 17 00:00:00 2001 From: jackhoo_98 Date: Thu, 23 Mar 2023 14:33:17 +0800 Subject: [PATCH 02/10] =?UTF-8?q?fix:=20bug#10802=E3=80=8110799=E3=80=8110?= =?UTF-8?q?798=E3=80=8110796=E3=80=8110791=20=E4=BF=AE=E5=A4=8D=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E6=8E=A5=E5=85=A5=E7=BD=91=E5=85=B3=E5=9B=BD=E6=A0=87?= =?UTF-8?q?=E6=8E=A5=E5=85=A5=E9=83=A8=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AccessConfig/components/Media/GB28181.vue | 54 ++++++++++++------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/src/views/link/AccessConfig/components/Media/GB28181.vue b/src/views/link/AccessConfig/components/Media/GB28181.vue index c44876b7..6da76ce8 100644 --- a/src/views/link/AccessConfig/components/Media/GB28181.vue +++ b/src/views/link/AccessConfig/components/Media/GB28181.vue @@ -482,6 +482,7 @@ type="primary" style="margin-right: 8px" @click="saveData" + :loading="loading" :hasPermission="`link/AccessConfig:${ id === ':id' ? 'add' : 'update' }`" @@ -534,7 +535,7 @@ const props = defineProps({ const route = useRoute(); const view = route.query.view as string; const id = route.params.id as string; - +const loading = ref(false); const activeKey: any = ref([]); const clientHeight = document.body.clientHeight; @@ -638,10 +639,17 @@ const saveData = () => { transport: 'SIP', channel: 'gb28181', }; - params.configuration.sipId = Number(params.configuration?.sipId); + loading.value = true; const resp = - id === ':id' ? await save(params) : await update({ ...params, id }); - if (resp.status === 200) { + id === ':id' + ? await save(params).catch(() => { + loading.value = false; + }) + : await update({ ...params, id }).catch(() => { + loading.value = false; + }); + + if (resp?.status === 200) { onlyMessage('操作成功', 'success'); history.back(); } @@ -667,12 +675,14 @@ const next = async () => { ...data1, ...data2, }; + } else { + return onlyMessage('请新增或完善配置', 'error'); } current.value = current.value + 1; params.configuration = data1; }) .catch((err) => { - err.errorFields.forEach((item: any) => { + err.errorFields?.forEach((item: any) => { const activeId: any = dynamicValidateForm.cluster[item.name[1]].id; if (!activeKey.value.includes(activeId)) { @@ -680,10 +690,24 @@ const next = async () => { } }); }); + } else { + current.value = current.value + 1; + params.configuration = data1; } }; const prev = () => { current.value = current.value - 1; + develop(); +}; + +const develop = () => { + if (dynamicValidateForm.cluster.length !== 0) { + dynamicValidateForm.cluster.forEach((item) => { + const id: any = JSON.stringify(Date.now() + Math.random()); + item.id = id; + activeKey.value.push(id); + }); + } }; onMounted(() => { @@ -723,21 +747,13 @@ onMounted(() => { const { configuration, name, description = '' } = props.data; formData.value = { name, description }; - if (configuration?.shareCluster) { - formState.value = { - ...formState.value, - ...props.data.configuration, - }; - } else { - formState.value = { - ...formState.value, - ...props.data.configuration, - }; + formState.value = { + ...formState.value, + ...props.data.configuration, + }; + if (!configuration?.shareCluster) { dynamicValidateForm.cluster = configuration.cluster; - if (dynamicValidateForm.cluster.length === 1) { - activeKey.value = ['1']; - dynamicValidateForm.cluster[0].id = 1; - } + develop(); } } }); From e97255d08872a9fa6fa3fa04d71707e3e9a874c1 Mon Sep 17 00:00:00 2001 From: jackhoo_98 Date: Thu, 23 Mar 2023 14:41:35 +0800 Subject: [PATCH 03/10] =?UTF-8?q?fix:=20bug#10721=E3=80=8110714=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=81=E4=B9=A6=E7=AE=A1=E7=90=86=E9=83=A8?= =?UTF-8?q?=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/link/Certificate/Detail/index.vue | 4 ++-- src/views/link/Certificate/index.vue | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/link/Certificate/Detail/index.vue b/src/views/link/Certificate/Detail/index.vue index e6d5aa16..470d0222 100644 --- a/src/views/link/Certificate/Detail/index.vue +++ b/src/views/link/Certificate/Detail/index.vue @@ -41,7 +41,7 @@ diff --git a/src/views/link/Certificate/index.vue b/src/views/link/Certificate/index.vue index 43d90035..8a29ae29 100644 --- a/src/views/link/Certificate/index.vue +++ b/src/views/link/Certificate/index.vue @@ -96,6 +96,7 @@ const columns = [ ellipsis: true, search: { type: 'string', + first: true, }, }, { From d04e69ba1bc23fd939c67e0e09fc6ef56b3bff62 Mon Sep 17 00:00:00 2001 From: jackhoo_98 Date: Thu, 23 Mar 2023 14:54:44 +0800 Subject: [PATCH 04/10] =?UTF-8?q?fix:=20=E8=AE=BE=E5=A4=87=E6=8E=A5?= =?UTF-8?q?=E5=85=A5=E7=BD=91=E5=85=B3=20=E5=B1=8F=E8=94=BD=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E6=8E=A5=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/link/AccessConfig/index.vue | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/views/link/AccessConfig/index.vue b/src/views/link/AccessConfig/index.vue index 5cfdbea5..1be02296 100644 --- a/src/views/link/AccessConfig/index.vue +++ b/src/views/link/AccessConfig/index.vue @@ -13,6 +13,17 @@ :request="list" :defaultParams="{ sorts: [{ name: 'createTime', order: 'desc' }], + terms: [ + { + terms: [ + { + termType: 'nin', + column: 'provider', + value: 'plugin_gateway', //todo 暂时不做插件接入 + }, + ], + }, + ], }" gridColumn="2" :gridColumns="[1, 2]" @@ -310,10 +321,12 @@ const getActions = (data: Partial>): ActionsType[] => { const getProvidersList = async () => { const res: any = await getProviders(); providersList.value = res.result; - providersOptions.value = (res?.result || [])?.map((item: any) => ({ - label: item.name, - value: item.id, - })); + providersOptions.value = (res?.result || []) + ?.map((item: any) => ({ + label: item.name, + value: item.id, + })) + .filter((item: any) => item.value !== 'plugin_gateway'); // todo 暂时不做插件接入 }; getProvidersList(); From a4b79f2b8ff5e6bbde74f827ee3396cb33b82f9f Mon Sep 17 00:00:00 2001 From: jackhoo_98 Date: Thu, 23 Mar 2023 16:02:22 +0800 Subject: [PATCH 05/10] =?UTF-8?q?fix:=20bug#10702=E3=80=8110703=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BD=91=E7=BB=9C=E7=BB=84=E4=BB=B6=E3=80=81?= =?UTF-8?q?=E6=B5=81=E5=AA=92=E4=BD=93=E6=9C=8D=E5=8A=A1=E5=9F=9F=E5=90=8D?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/link/Type/Detail/index.vue | 21 ++++---------- src/views/link/Type/data.ts | 27 ++++++++++++++---- src/views/media/Stream/Detail/index.vue | 37 +++++++++++++------------ src/views/media/Stream/index.vue | 2 +- 4 files changed, 46 insertions(+), 41 deletions(-) diff --git a/src/views/link/Type/Detail/index.vue b/src/views/link/Type/Detail/index.vue index d1887f34..0be2e4a6 100644 --- a/src/views/link/Type/Detail/index.vue +++ b/src/views/link/Type/Detail/index.vue @@ -103,18 +103,6 @@ :key="cluster.id" :show-arrow="!formData.shareCluster" > -