From 12f010ecb8e06e59e732f9f885be904724fdca02 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Mon, 12 Jun 2023 20:34:21 +0800 Subject: [PATCH] =?UTF-8?q?WIP:=20=E7=BB=98=E5=88=B6Data=20Recevice=20stat?= =?UTF-8?q?us=20Monitoring=E5=BC=B9=E7=AA=97=E5=86=85=E5=AE=B9=EF=BC=88?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E4=B8=AD=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + .../images/station-operation/toggle-2.png | Bin 0 -> 1203 bytes src/components/CustomChart/index.vue | 26 ++ src/components/CustomSelect/index.vue | 11 +- src/components/CustomTree/index.vue | 79 ++++ src/components/ScrollContainer/index.vue | 40 +- src/components/dict/JDictSelectTag.vue | 4 +- src/main.js | 3 + src/style.less | 45 +- src/views/stationOperation/components/Map.vue | 1 - .../stationOperation/components/MapPane.vue | 401 +++++++++++++++--- src/views/stationOperation/index.vue | 185 ++++++-- 12 files changed, 686 insertions(+), 110 deletions(-) create mode 100644 src/assets/images/station-operation/toggle-2.png create mode 100644 src/components/CustomChart/index.vue create mode 100644 src/components/CustomTree/index.vue diff --git a/package.json b/package.json index 48f73e6..948ac2a 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "cron-parser": "^2.10.0", "dayjs": "^1.8.0", "dom-align": "1.12.0", + "echarts": "^4.9.0", "enquire.js": "^2.1.6", "js-cookie": "^2.2.0", "lodash.get": "^4.4.2", diff --git a/src/assets/images/station-operation/toggle-2.png b/src/assets/images/station-operation/toggle-2.png new file mode 100644 index 0000000000000000000000000000000000000000..e9d9fba29908b83f82d25463776d632a4a456df5 GIT binary patch literal 1203 zcmeAS@N?(olHy`uVBq!ia0vp^Ahs9>8<6~|#v2QyBuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFe_(0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)CuGfo`&afsul_rJkXg ziHVtkj)IYak%7K}slK6+uA!Ngfr*u&xdId@0c|TvNwW%aaf8|g1^l#~=$>Fbx5 zm+O@q>*W`v>l<2HTIw4Z=^Gj80#)c1SLT%@R_NvxE5l51Ni9w;$}A|!%+FH*nV6WA zUs__T1av9H3%LbwWAlok!2}F2{ffi_eM3D1ke6TzeSPsO&CP|YE-nd5MYtEM!Nnn! z1*!T$sm1xFMajU3OH&3}Rbb^@l$uzQUlfv`p92fUfQ*lEl2^R8JRMC7=;{nVBh82IkI2CMK?Ku0UjH=;~tWyn>bnwy$e0@IrU*Xw40Q!gkjdBEge1WeZ%it@e;42)`? zE{-7;w|Xw0*JeqSIsP%-WGj17!P6x%vD-YnEOWUwUh$Gya%T#+`&RRBj}|R?vQ6`8 zINuhHq6Y^O-_QQvuuZox;PKxp>9236oU!|Q>-o&N-`|}%cZTiVyV}E+;YFH@d2d@} zsP=5=nY-nK^J~*L|HZc{_gAlZV4ykYfTY{U9@Q!Tx$@6`6If^1f4O2u2jk~^5`G4~ z+|tiVPsj*8~Lx@3i9+pgu@nf&j>mRe?mvv4FO#mj*tSA5g literal 0 HcmV?d00001 diff --git a/src/components/CustomChart/index.vue b/src/components/CustomChart/index.vue new file mode 100644 index 0000000..8895695 --- /dev/null +++ b/src/components/CustomChart/index.vue @@ -0,0 +1,26 @@ + + + diff --git a/src/components/CustomSelect/index.vue b/src/components/CustomSelect/index.vue index 39efd14..a1de057 100644 --- a/src/components/CustomSelect/index.vue +++ b/src/components/CustomSelect/index.vue @@ -1,5 +1,5 @@ @@ -16,12 +16,15 @@ export default { innerValue: this.value } }, + methods: { + onChange(val) { + this.$emit('input', val) + this.$emit('change', val) + } + }, watch: { value () { this.innerValue = this.value - }, - innerValue () { - this.$emit('input', this.innerValue) } } } diff --git a/src/components/CustomTree/index.vue b/src/components/CustomTree/index.vue new file mode 100644 index 0000000..ae20421 --- /dev/null +++ b/src/components/CustomTree/index.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/src/components/ScrollContainer/index.vue b/src/components/ScrollContainer/index.vue index 128d15d..22b6fdd 100644 --- a/src/components/ScrollContainer/index.vue +++ b/src/components/ScrollContainer/index.vue @@ -1,5 +1,5 @@ @@ -8,32 +8,42 @@ export default { props: { direction: { type: String, - default: 'horizontal', // horizontal | vertical + default: 'horizontal' // horizontal | vertical }, + scrollContainer: { + type: Function + } }, data() { + this.isCustomContainer = this.scrollContainer && typeof this.scrollContainer == 'function' // 是自定义的容器 return { - scrollEnd: false, + scrollEnd: false } }, mounted() { - this.onScroll() - window.addEventListener('resize', this.onScroll) - }, - destroyed() { - window.removeEventListener('resize', this.onScroll) + this.containerEle = this.isCustomContainer ? this.scrollContainer() : this.$refs.containerRef + this.containerEle.addEventListener('scroll', () => { + this.checkScrollEnd() + }) + + this.containerEle.addEventListener('transitionend', () => { // 如果有过渡动画,则在过渡动画结束后触发 + this.checkScrollEnd() + }) }, + methods: { - onScroll() { - const ele = this.$refs.containerRef + /** + * 检查是否滚动到尾部 + */ + checkScrollEnd() { if (this.direction == 'horizontal') { - this.scrollEnd = ele.scrollLeft + ele.offsetWidth == ele.scrollWidth + this.scrollEnd = this.containerEle.scrollLeft + this.containerEle.offsetWidth == this.containerEle.scrollWidth } else { - this.scrollEnd = ele.scrollTop + ele.offsetHeight == ele.scrollHeight + this.scrollEnd = this.containerEle.scrollTop + this.containerEle.offsetHeight == this.containerEle.scrollHeight } this.$emit('scrollEnd', this.scrollEnd) - }, - }, + } + } } \ No newline at end of file + diff --git a/src/components/dict/JDictSelectTag.vue b/src/components/dict/JDictSelectTag.vue index 2ffc498..1b4f0d6 100644 --- a/src/components/dict/JDictSelectTag.vue +++ b/src/components/dict/JDictSelectTag.vue @@ -93,9 +93,9 @@ val = e } console.log(val); - this.$emit('change', val); + this.$emit('change', val? val: undefined); //LOWCOD-2146 【菜单】数据规则,选择自定义SQL 规则值无法输入空格 - this.$emit('input', val); + this.$emit('input', val? val: undefined); }, setCurrentDictOptions(dictOptions){ this.dictOptions = dictOptions diff --git a/src/main.js b/src/main.js index 3ce7142..f06eed6 100644 --- a/src/main.js +++ b/src/main.js @@ -57,6 +57,8 @@ import CustomModal from '@/components/CustomModal' import CustomDatePicker from '@/components/CustomDatePicker' import CustomMonthPicker from '@/components/CustomMonthPicker' import CustomEmpty from '@/components/CustomEmpty' +import CustomChart from '@/components/CustomChart' +console.log('%c [ CustomChart ]-61', 'font-size:13px; background:pink; color:#bf2c9f;', CustomChart) Vue.prototype.rules = rules @@ -79,6 +81,7 @@ Vue.component('custom-modal', CustomModal) Vue.component('custom-date-picker', CustomDatePicker) Vue.component('custom-month-picker', CustomMonthPicker) Vue.component('custom-empty', CustomEmpty) +Vue.component('custom-chart', CustomChart) SSO.init(() => { main() diff --git a/src/style.less b/src/style.less index 5155066..4aa6979 100644 --- a/src/style.less +++ b/src/style.less @@ -286,7 +286,7 @@ body { } &-table { - background-color: #06282A !important; + background-color: #06282a !important; } &-tbody { @@ -334,6 +334,49 @@ body { } } +// 数字输入框 +@input-number-handler-active-bg: #06404c; +@input-number-handler-hover-bg: #06404c; +@input-number-handler-bg: #06404c; +@input-number-handler-border-color: transparent; + +.ant-input-number { + border-radius: 0; + border: 1px solid #0b8c82; + &-handler { + height: 50% !important; + &:hover { + height: 50% !important; + } + + .anticon { + display: none !important; + } + + // 数组输入框右侧的上下箭头 + &::after { + content: ''; + display: inline-block; + width: 0; + height: 0; + border: 5px solid transparent; + border-left-width: 4px; + border-right-width: 4px; + border-bottom-color: #4b859e; + position: relative; + top: -1px; + } + + &-down { + border-top: none; + &::after { + transform: rotate(180deg); + top: 1px; + } + } + } +} + // 单选样式 .ant-radio { &-wrapper { diff --git a/src/views/stationOperation/components/Map.vue b/src/views/stationOperation/components/Map.vue index 760d51b..e114a22 100644 --- a/src/views/stationOperation/components/Map.vue +++ b/src/views/stationOperation/components/Map.vue @@ -86,7 +86,6 @@ export default { // 设置地图缩放级别 setZoom(zoom) { - console.log('%c [ zoom ]-89', 'font-size:13px; background:pink; color:#bf2c9f;', zoom) if (zoom < this.minZoom) { zoom = this.minZoom } diff --git a/src/views/stationOperation/components/MapPane.vue b/src/views/stationOperation/components/MapPane.vue index f5b2f95..2e8adb3 100644 --- a/src/views/stationOperation/components/MapPane.vue +++ b/src/views/stationOperation/components/MapPane.vue @@ -13,7 +13,7 @@
- +
@@ -54,13 +54,7 @@
- +
@@ -125,16 +119,84 @@
- - - 分析弹窗内容 + + +
+ +
+
+
+
+ + Particulate Station + + +
+
+ +
+
+
+
+ + Attribute Configuration + + +
+
+ + + + day + + + + min + + + + min + + + + min + + + +
+
+
+ +
+ +
+
+ + + +
+ +
+ +
- + diff --git a/src/views/stationOperation/index.vue b/src/views/stationOperation/index.vue index d662db2..f2a0f43 100644 --- a/src/views/stationOperation/index.vue +++ b/src/views/stationOperation/index.vue @@ -22,30 +22,64 @@
- -
- -
- -
- -
- -
- -
+
+ +
+
+ +
- -
+ +
+ + + + + + + + + + + + + + + + +
+