From 421d81fa29ec627b3c13f4dc917abe0343badf37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Wed, 13 Mar 2024 11:42:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=AA=E5=9C=A3=E6=96=87=E6=9A=82=E9=99=8D?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/money.png | Bin 0 -> 1492 bytes src/utils/tableStore.ts | 2 +- src/views/hsw/index.vue | 694 +++++++++++++++++++++++++++++- src/views/hsw/popupCalculator.vue | 322 +++++++++++--- src/views/hsw/sags3D.vue | 278 +++++++++++- src/views/hsw/toleranceCurve.vue | 156 ++++++- 6 files changed, 1353 insertions(+), 99 deletions(-) create mode 100644 src/assets/money.png diff --git a/src/assets/money.png b/src/assets/money.png new file mode 100644 index 0000000000000000000000000000000000000000..483dcf09de58cf7198368a88a4d3a2f1fc38f842 GIT binary patch literal 1492 zcmV;_1uOcAP)NklRXL1#uVzMjrBqsCFWMsB#pUmc6W~7+1c%8HoIoCGuuvJJ~Cu7yYrtj-^`rf z`OZWU6kHW0^-4EjEz32}f?V?~$TiP`T=Oi*HP3=v^DM|U&w{*Hx&Z}A#DVi&5ECbW zxjrB|4Cw!|^&SWhPr)Aqv^pqdwLoYi5ZnYMxRbYrR?=oEj!qb{8Q`baf&Rk~`XtTr zCJi%w8|%X7TeeO97XAp7%Dqslo}!82k~GiRcV5?{z|fb5A-+{MRm?+7e*s+|f?E4_ zNt);EKF<@dp+=SU8hPYw^Yj?7Ta`KLh&})(2(46wt0I# z1vWp!L2u*g_f<3~<@=%5ykUR4(uZ&~FnV49u78Q32mzzr5Eq#+<_8Fhabr>A1~BAf zD-(uWp!c2@=wy@YHgyJIxB^{(fu>SR90io+UtjAaPIfcse}IM{Pev zDf@a^o%!?EcYwb4+3^0HQ3|OjCFI{T-b?F3YhaAp52fNE7Rn-|%(Z`i1~GCZQ%B># zH&B(ywsIGJEDvo<2NL@#AAb_~>x1H=RQv+;iFcvI&q1wzZRPLBrfBM%>4L0n+RhDH zufaabq;>aLE~#j@Tdt8$_LsQ!`E50Q2dE9$@Mh*6d3risWTq0wGyf3AWN`)(dTC-EAy6!KeEhUYG}LImK+* zXI`3&&7DBQE}(w5F+P(Ml(`h2WZyLmF@GjM8MA3ydj}BNkiQKgL1X(!+uvC86qjSk zt7fDv_5CF^SRO6M%f39mU}IiPy!w14RRXFYE568aTAy699sQ~dArQEZ4dJ9D()SG61=srabuCPug^QdVale*c(+^&jD62| zcFG`QbcjcZo8y^JzU^w@(oWLe$bM-H0Wt)A>X6yM?&pE+2a~xKV?9h6Uy-=IM&y$d zqDx-@Y4rqDvq4=|lt1eZ5YG_*<1o`!e0oc#jG;d0HhAlEz# ua?P_K*E|by&9flaJPUHovmn - + diff --git a/src/views/hsw/popupCalculator.vue b/src/views/hsw/popupCalculator.vue index 35827f26..08a7fc60 100644 --- a/src/views/hsw/popupCalculator.vue +++ b/src/views/hsw/popupCalculator.vue @@ -1,24 +1,65 @@ + + diff --git a/src/views/hsw/sags3D.vue b/src/views/hsw/sags3D.vue index 1b75ae37..2cff0307 100644 --- a/src/views/hsw/sags3D.vue +++ b/src/views/hsw/sags3D.vue @@ -1,7 +1,16 @@ @@ -11,7 +20,12 @@ import { ref, onMounted, provide, defineOptions } from 'vue' import SecondSheet from '@/components/secondSheet/index.vue' import Table from '@/components/table/index.vue' import TableStore from '@/utils/tableStore' +import MyEchart from '@/components/echarts/MyEchart.vue' +import { log } from 'console' +const radio = ref('三维图') +const options = ref() +const apiData = ref() const tableStore = new TableStore({ showPage: false, // 若页面表格高度需要调整,请修改publicHeight(内容区域除表格外其他内容的高度) @@ -21,34 +35,262 @@ const tableStore = new TableStore({ { title: '电压暂降频次统计表', children: [ - { title: '暂降福度', field: 'loginName', width: '130' }, + { title: '暂降福度', field: 'amplitude', width: '130' }, { title: '持续时间', field: 'loginName', - children: [ - { title: '0.01-0.02', field: 'loginName' }, - { title: '0.02-0.05', field: 'loginName' }, - { title: '0.05-0.07', field: 'loginName' }, - { title: '0.07-0.10', field: 'loginName' }, - { title: '0.10-1.00', field: 'loginName' }, - ] + children: [] } ] } - ] + ], + loadCallback: () => { + tableStore.table.data = { + lineIds: [1, 5], + type: 1, + beginDate: '2019-01-01', + endDate: '2024-12-31', + amplitudes: ['0.8~0.9', '0.7~0.8', '0.6~0.7', '0.5~0.6', '0.4~0.5', '0.1~0.4'], + durations: ['0.01~0.02', '0.02~0.05', '0.05~0.07', '0.07~0.10', '0.10~1.00'], + values: [ + ['0.8~0.9', '0.01~0.02', '0'], + ['0.8~0.9', '0.02~0.05', '0'], + ['0.8~0.9', '0.05~0.07', '0'], + ['0.8~0.9', '0.07~0.10', '0'], + ['0.8~0.9', '0.10~1.00', '6'], + ['0.7~0.8', '0.01~0.02', '0'], + ['0.7~0.8', '0.02~0.05', '0'], + ['0.7~0.8', '0.05~0.07', '0'], + ['0.7~0.8', '0.07~0.10', '0'], + ['0.7~0.8', '0.10~1.00', '1'], + ['0.6~0.7', '0.01~0.02', '0'], + ['0.6~0.7', '0.02~0.05', '0'], + ['0.6~0.7', '0.05~0.07', '0'], + ['0.6~0.7', '0.07~0.10', '0'], + ['0.6~0.7', '0.10~1.00', '2'], + ['0.5~0.6', '0.01~0.02', '0'], + ['0.5~0.6', '0.02~0.05', '0'], + ['0.5~0.6', '0.05~0.07', '0'], + ['0.5~0.6', '0.07~0.10', '0'], + ['0.5~0.6', '0.10~1.00', '5'], + ['0.4~0.5', '0.01~0.02', '0'], + ['0.4~0.5', '0.02~0.05', '0'], + ['0.4~0.5', '0.05~0.07', '0'], + ['0.4~0.5', '0.07~0.10', '0'], + ['0.4~0.5', '0.10~1.00', '1'], + ['0.1~0.4', '0.01~0.02', '0'], + ['0.1~0.4', '0.02~0.05', '0'], + ['0.1~0.4', '0.05~0.07', '0'], + ['0.1~0.4', '0.07~0.10', '0'], + ['0.1~0.4', '0.10~1.00', '3'] + ], + table: { + total: 6, + rows: [ + { + searchValue: null, + createBy: null, + createTime: null, + updateBy: null, + updateTime: null, + remark: null, + params: {}, + amplitude: '0.8~0.9', + d005_007s: '0', + d001_002s: '0', + d002_005s: '0', + d010_100s: '6', + d007_010s: '0' + }, + { + searchValue: null, + createBy: null, + createTime: null, + updateBy: null, + updateTime: null, + remark: null, + params: {}, + amplitude: '0.7~0.8', + d005_007s: '0', + d001_002s: '0', + d002_005s: '0', + d010_100s: '1', + d007_010s: '0' + }, + { + searchValue: null, + createBy: null, + createTime: null, + updateBy: null, + updateTime: null, + remark: null, + params: {}, + amplitude: '0.6~0.7', + d005_007s: '0', + d001_002s: '0', + d002_005s: '0', + d010_100s: '2', + d007_010s: '0' + }, + { + searchValue: null, + createBy: null, + createTime: null, + updateBy: null, + updateTime: null, + remark: null, + params: {}, + amplitude: '0.5~0.6', + d005_007s: '0', + d001_002s: '0', + d002_005s: '0', + d010_100s: '5', + d007_010s: '0' + }, + { + searchValue: null, + createBy: null, + createTime: null, + updateBy: null, + updateTime: null, + remark: null, + params: {}, + amplitude: '0.4~0.5', + d005_007s: '0', + d001_002s: '0', + d002_005s: '0', + d010_100s: '1', + d007_010s: '0' + }, + { + searchValue: null, + createBy: null, + createTime: null, + updateBy: null, + updateTime: null, + remark: null, + params: {}, + amplitude: '0.1~0.4', + d005_007s: '0', + d001_002s: '0', + d002_005s: '0', + d010_100s: '3', + d007_010s: '0' + } + ], + code: 200, + msg: '查询成功' + } + } + apiData.value = tableStore.table.data + tableStore.table.column![0].children![1].children!.push( + ...(apiData.value.durations.map((item: string) => { + return { + title: item, + field: `d${item.replaceAll('.', '').replaceAll('~', '_')}s` + } + }) as any[]) + ) + tableStore.table.data = apiData.value.table.rows + initEchart() + } }) // 注入到子组件 provide('tableStore', tableStore) -// 默认参数 参数多的话可以使用Object.assign方法 -tableStore.table.params.pageSize = 9999 -tableStore.table.params.searchState = 1 -tableStore.table.params.searchValue = '' -tableStore.table.params.casualUser = -1 -tableStore.table.params.orderBy = '' - onMounted(() => { - // 加载数据 - tableStore.index() + search() }) +const initEchart = () => { + options.value = { + options: { + xAxis: null, + yAxis: null, + dataZoom: null, + backgroundColor: '#fff', + tooltip: { + trigger: 'axis' + }, + title: { + text: '暂降密度图', + x: 'center' + }, + xAxis3D: { + name: '暂降福度(p.u.)', + type: 'category', + data: apiData.value.amplitudes + }, + yAxis3D: { + name: '持续时间(s)', + type: 'category', + data: apiData.value.durations + }, + zAxis3D: { + name: '次数', + type: 'value' + }, + grid3D: { + boxWidth: 200, + boxDepth: 80, + viewControl: { + projection: 'perspective', + distance: 250 + }, + light: { + main: { + intensity: 1.2, + shadow: true + }, + ambient: { + intensity: 0.3 + } + } + }, + series: [ + { + type: 'bar3D', + data: apiData.value.values.map((item: [string, string, string]) => { + return [ + apiData.value.amplitudes.indexOf(item[0]), + apiData.value.durations.indexOf(item[1]), + item[2] + ] + }), + shading: 'lambert', + label: { + fontSize: 16, + borderWidth: 1 + }, + emphasis: { + label: { + fontSize: 20, + color: '#900' + }, + itemStyle: { + color: '#900' + } + } + } + ] + } + } +} +const search = () => { + // 从父组件tableStore获取参数 + tableStore.table.params.pageSize = 9999 + tableStore.table.params.searchState = 1 + tableStore.table.params.searchValue = '' + tableStore.table.params.casualUser = -1 + tableStore.table.params.orderBy = '' + tableStore.index() +} +defineExpose({ search }) + diff --git a/src/views/hsw/toleranceCurve.vue b/src/views/hsw/toleranceCurve.vue index 2c4911c0..d95ab5b9 100644 --- a/src/views/hsw/toleranceCurve.vue +++ b/src/views/hsw/toleranceCurve.vue @@ -1,7 +1,159 @@ - + +