From a1dd55845f229e78a26b15fdabd2aa5af719746b Mon Sep 17 00:00:00 2001 From: herenshan112 Date: Fri, 18 Jul 2025 16:34:02 +0800 Subject: [PATCH 1/2] 1 --- src/views/redirect/index.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/views/redirect/index.vue diff --git a/src/views/redirect/index.vue b/src/views/redirect/index.vue new file mode 100644 index 0000000..1e8f5a9 --- /dev/null +++ b/src/views/redirect/index.vue @@ -0,0 +1,10 @@ + + + + From b764d10323797ec21efc580094c21b63f7558118 Mon Sep 17 00:00:00 2001 From: herenshan112 Date: Fri, 18 Jul 2025 16:36:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../appPageForm/echatesUnit/chart/bar.vue | 49 +++++++++-- .../appPageForm/echatesUnit/chart/line.vue | 88 ++++++++++--------- 2 files changed, 86 insertions(+), 51 deletions(-) diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/bar.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/bar.vue index 39e4baf..158e38b 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/bar.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/bar.vue @@ -38,15 +38,46 @@ const drawPictures = () => { myChart.value = echarts.init(document.getElementById(props.uuid) as HTMLDivElement); analyzeChartData({ tableKey: props.tableKey, chartId: props.uuid }).then((data) => { console.log("火兔", data); - let optVal = data.data; - optVal.grid = { - left: "2%", - right: "2%", - bottom: "15%", - top: "15%", - containLabel: true, - }; - myChart.value.setOption(optVal); + if (data.code == 0) { + let optVal = data.data; + optVal.grid = { + left: "2%", + right: "2%", + bottom: "15%", + top: "15%", + containLabel: true, + }; + myChart.value.setOption(optVal); + } else { + myChart.value.setOption({ + grid: { + left: "2%", + right: "2%", + bottom: "15%", + top: "15%", + containLabel: true, + }, + xAxis: { + data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"], + }, + yAxis: {}, + legend: { + data: ["销量", "销量科技"], + }, + series: [ + { + name: "销量", + type: "bar", + data: [5, 20, 36, 10, 10, 20], + }, + { + name: "销量科技", + type: "bar", + data: [15, 21, 26, 70, 18, 29], + }, + ], + }); + } }); // myChart.value.setOption({ // grid: { diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/line.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/line.vue index 550922e..82e0234 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/line.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/line.vue @@ -36,49 +36,53 @@ const drawPie = () => { ); analyzeChartData({ tableKey: props.tableKey, chartId: props.uuid }).then((data) => { console.log("火兔", data); - let optVal = data.data; - optVal.grid = { - left: "2%", - right: "2%", - bottom: "15%", - top: "15%", - containLabel: true, - }; - myChartPie.value.setOption(optVal); + if (data.code == 0) { + let optVal = data.data; + optVal.grid = { + left: "2%", + right: "2%", + bottom: "15%", + top: "15%", + containLabel: true, + }; + myChartPie.value.setOption(optVal); + } else { + myChartPie.value.setOption({ + grid: { + left: "2%", + right: "2%", + bottom: "5%", + top: "15%", + containLabel: true, + }, + xAxis: { + type: "category", + data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], + }, + legend: { + data: ["销量", "销量科技"], + }, + yAxis: { + type: "value", + }, + series: [ + { + name: "销量", + data: [820, 932, 901, 934, 1290, 1330, 1320], + type: "line", + smooth: true, + }, + { + name: "销量科技", + data: [822, 942, 951, 4, 1290, 1330, 1320], + type: "line", + smooth: true, + }, + ], + }); + } }); - // myChartPie.value.setOption({ - // grid: { - // left: "2%", - // right: "2%", - // bottom: "5%", - // top: "15%", - // containLabel: true, - // }, - // xAxis: { - // type: "category", - // data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], - // }, - // legend: { - // data: ["销量", "销量科技"], - // }, - // yAxis: { - // type: "value", - // }, - // series: [ - // { - // name: "销量", - // data: [820, 932, 901, 934, 1290, 1330, 1320], - // type: "line", - // smooth: true, - // }, - // { - // name: "销量科技", - // data: [822, 942, 951, 4, 1290, 1330, 1320], - // type: "line", - // smooth: true, - // }, - // ], - // }); + // console.log("画图完毕---->", props); } };