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 0000000..e9d9fba
Binary files /dev/null and b/src/assets/images/station-operation/toggle-2.png differ
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 @@
-
-
- 分析弹窗内容
+
+
+
+
+
+
+
+
+
+ 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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 筛选
-
-
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -168,6 +202,7 @@ import MapMarker from './components/MapMarker.vue'
import MapPane from './components/MapPane.vue'
import ScrollContainer from '@/components/ScrollContainer/index.vue'
import { getAction } from '../../api/manage'
+import { cloneDeep } from 'lodash'
export default {
components: {
@@ -179,13 +214,28 @@ export default {
data() {
return {
activeKey: '1',
+
isGettingDateList: false,
dateList: [],
- searchVisible: false
+
+ searchPlacementVisible: false, // 搜索栏占位是否显示
+
+ searchVisible: false, // 搜索组件是否显示
+
+ filter: {
+ searchText: undefined,
+ status: undefined,
+ type: undefined
+ },
+
+ filterVisible: false, // 筛选组件是否显示
+
+ stationTypeList: []
}
},
created() {
this.getStationList()
+ this.getStationTypeList()
},
methods: {
// 获取站点列表
@@ -197,6 +247,7 @@ export default {
result: { records }
} = await getAction('/gardsStations/findPage?pageIndex=1&pageSize=999')
if (success) {
+ this.originalDateList = cloneDeep(records)
this.dateList = records
}
} catch (error) {
@@ -206,13 +257,67 @@ export default {
}
},
- // 左侧 All Date 查询
- onSearch() {
- this.searchVisible = false
+ // 获取站点类型
+ async getStationTypeList() {
+ try {
+ const res = await getAction('/gardsStations/findType')
+ this.stationTypeList = res.filter(item => item).map(item => ({ label: item, value: item }))
+ } catch (error) {
+ console.error(error)
+ }
+ },
+
+ handleShowSearch() {
+ if (this.filterVisible) {
+ this.searchVisible = true
+ this.filterVisible = false
+ this.searchPlacementVisible = true
+ } else {
+ this.searchPlacementVisible = !this.searchPlacementVisible
+ if (this.searchPlacementVisible) {
+ this.searchVisible = true
+ }
+ }
+ },
+
+ // 显示筛选栏
+ handleShowFilter() {
+ if (this.searchVisible) {
+ this.searchVisible = false
+ this.filterVisible = true
+ this.searchPlacementVisible = true
+ } else {
+ this.searchPlacementVisible = !this.searchPlacementVisible
+ if (this.searchPlacementVisible) {
+ this.filterVisible = true
+ }
+ }
},
// 左侧 All Date 筛选
- onFilter() {}
+ onFilterChange() {
+ this.dateList = this.originalDateList.filter(dateItem => {
+ const filterSearchText =
+ !this.filter.searchText ||
+ -1 !== dateItem.stationCode.toLowerCase().indexOf(this.filter.searchText.toLowerCase())
+ const filterStatus = !this.filter.status || this.filter.status == dateItem.status
+ const filterType = !this.filter.type || this.filter.type == dateItem.type
+
+ return filterSearchText && filterStatus && filterType
+ })
+
+ this.$nextTick(() => {
+ this.$refs.scrollContainerRef.checkScrollEnd()
+ })
+ },
+
+ getScrollContainer() {
+ return this.$refs.customScrollContainerRef
+ },
+
+ getDictSelectTagContainer() {
+ return document.body
+ }
}
}
@@ -248,6 +353,8 @@ export default {
border-top: 1px solid rgba(12, 235, 201, 0.3);
border-bottom: 4px solid rgba(12, 235, 201, 0.2);
height: auto;
+ background-color: rgba(1, 18, 20, 0.6);
+
.ant-collapse-arrow {
right: 9px;
transition: transform 0.24s;
@@ -281,7 +388,6 @@ export default {
font-size: 18px;
font-weight: bold;
color: #0cebc9;
- background-color: rgba(1, 18, 20, 0.6);
&-text {
padding-left: 20px;
@@ -356,6 +462,15 @@ export default {
padding: 2px 0 10px 7px;
overflow: auto;
+ @searchHeight: 45px;
+ .search-filter-placement {
+ height: 0;
+ display: flex;
+ align-items: center;
+ transition: height 0.3s ease-in-out;
+ overflow: hidden;
+ }
+
&-content {
.ant-spin {
width: 100%;
@@ -365,6 +480,24 @@ export default {
}
}
+ &.has-search {
+ .date-list-content {
+ transition: height 0.3s ease-in-out;
+ height: 100%;
+ overflow: auto;
+ }
+ }
+
+ &.show-search {
+ .search-filter-placement {
+ height: @searchHeight;
+ }
+
+ .date-list-content {
+ height: calc(100% - @searchHeight);
+ }
+ }
+
&-item {
width: 322px;
&-title {