Merge branch 'feature-Station-dev-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev

This commit is contained in:
xiaoguangbin 2023-10-28 17:22:47 +08:00
commit 8ed7bb2173
3 changed files with 111 additions and 90 deletions

View File

@ -136,7 +136,7 @@ export default {
img.draggable = false
img.src = MarkerIcon[stationInfo.stationType]
img.addEventListener('click', () => {
this.$emit('markerClick')
this.$emit('markerClick', stationInfo)
})
img.addEventListener('mouseover', () => {

View File

@ -14,7 +14,7 @@
<div class="map-pane-operators-main-operator">
<div>
<img v-if="dataStatusModalVisible" src="@/assets/images/station-operation/analyze-active.png" />
<img v-else src="@/assets/images/station-operation/analyze.png" @click="handleOpenAnalyzeModal" />
<img v-else src="@/assets/images/station-operation/analyze.png" @click="handleOpenAnalyzeModal()" />
</div>
<div>
<img
@ -46,9 +46,7 @@
<!-- 站点操作 -->
<div class="station-operation" v-show="active == 1">
<div class="station-operation-stations">
<div class="map-pane-content-header">
Stations
</div>
<div class="map-pane-content-header">Stations</div>
<div class="map-pane-content-main">
<div class="station-operation-stations-selection">
<a-space>
@ -58,7 +56,7 @@
>
</a-space>
</div>
<a-divider style="background-color: #0a544e; margin: 10px 0 0;"></a-divider>
<a-divider style="background-color: #0a544e; margin: 10px 0 0"></a-divider>
<!-- 站点选择树 -->
<div class="station-list-tree">
@ -72,17 +70,13 @@
</div>
</div>
<div class="station-operation-infomation">
<div class="map-pane-content-header">
Infomation
</div>
<div class="map-pane-content-header">Infomation</div>
<div class="map-pane-content-main">
<div class="station-operation-infomation-content">
<p class="radius-title">Radius</p>
<div class="radius-search">
<a-input suffix="KM" v-model="radius" type="number"></a-input>
<a-button type="primary" @click="handleSearchByRadius">
Search
</a-button>
<a-button type="primary" @click="handleSearchByRadius"> Search </a-button>
</div>
<div class="radius-table">
<a-table
@ -102,9 +96,7 @@
<!-- 站点筛选 -->
<div class="station-filter" v-show="active == 2">
<div class="map-pane-content-header">
Filter
</div>
<div class="map-pane-content-header">Filter</div>
<div class="map-pane-content-main">
<div class="station-filter-list">
<div
@ -122,7 +114,7 @@
<a-checkbox v-model="filterItem.checked"></a-checkbox>
</div>
</div>
<a-divider style="background-color: #0a544e; margin: 10px 0 0;"></a-divider>
<a-divider style="background-color: #0a544e; margin: 10px 0 0"></a-divider>
<!-- 数据质量类型 -->
<div class="station-data-quality-list">
<div
@ -162,9 +154,7 @@
<div class="data-receive-status-list-container">
<div class="data-receive-status-list-item">
<div class="title">
<span>
Particulate Station
</span>
<span> Station </span>
<img src="@/assets/images/station-operation/toggle.png" @click="leftPaneShow = !leftPaneShow" />
</div>
<div class="content">
@ -177,9 +167,7 @@
</div>
<div class="data-receive-status-list-item">
<div class="title">
<span>
Attribute Configuration
</span>
<span> Attribute Configuration </span>
<img src="@/assets/images/station-operation/toggle.png" @click="leftPaneShow = !leftPaneShow" />
</div>
<div class="content">
@ -233,10 +221,26 @@
<!-- 右侧图表展示栏 -->
<div class="data-receive-status-chart" :class="{ 'on-screen': !leftPaneShow }">
<template v-if="showChart">
<RealTimeDataChart ref="realtimeChartRef" :spinning="spinLoading" :list="statusList" :scale-settings="initialDataRecieveSettings" />
<RealTimeDataChart
ref="realtimeChartRef"
:spinning="spinLoading"
:list="statusList"
:scale-settings="initialDataRecieveSettings"
/>
<resize-observer @notify="handleResize" />
</template>
<div v-show="maskVisi" style="z-index: 1;position: absolute;top: 0;left: 0;width:100%;height: 100%;background: rgba(0, 0, 0, .45);"></div>
<div
v-show="maskVisi"
style="
z-index: 1;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.45);
"
></div>
</div>
<!-- 右侧图表展示栏结束 -->
</div>
@ -265,44 +269,44 @@ const filterList = [
title: 'IMS RN Station(P)',
type: MarkerType.ImsRnStationP,
icon: FilterIcon[MarkerType.ImsRnStationP],
checked: true
checked: true,
},
{
title: 'IMS RN Station(G)',
type: MarkerType.ImsRnStationG,
icon: FilterIcon[MarkerType.ImsRnStationG],
checked: true
checked: true,
},
{
title: 'NRL',
type: MarkerType.NRL,
icon: FilterIcon[MarkerType.NRL],
checked: true
checked: true,
},
{
title: 'Nuclear Facilities',
type: MarkerType.NuclearFacility,
icon: FilterIcon[MarkerType.NuclearFacility],
checked: true
checked: true,
},
{
title: 'Groud monitoring station',
type: MarkerType.GroudMonitoringStation,
icon: FilterIcon[MarkerType.GroudMonitoringStation],
checked: true
checked: true,
},
{
title: 'car',
type: MarkerType.Car,
icon: FilterIcon[MarkerType.Car],
checked: true
checked: true,
},
{
title: 'ship',
type: MarkerType.Ship,
icon: FilterIcon[MarkerType.Ship],
checked: true
}
checked: true,
},
]
// Filter
@ -310,23 +314,23 @@ const dataQualityList = [
{
title: 'Excellent data quality',
icon: FilterIcon.State1,
checked: true
checked: true,
},
{
title: 'Good data quality',
icon: FilterIcon.State2,
checked: true
checked: true,
},
{
title: 'Poor data quality',
icon: FilterIcon.State3,
checked: true
checked: true,
},
{
title: 'Signal interruption',
icon: FilterIcon.State4,
checked: true
}
checked: true,
},
]
// infomation-radius
@ -335,57 +339,57 @@ const columns = [
title: 'nuclearfaclity',
dataIndex: 'nuclearFacilityName',
width: 100,
ellipsis: true
ellipsis: true,
},
{
title: 'station',
dataIndex: 'stationName',
width: 70,
ellipsis: true
ellipsis: true,
},
{
title: 'distance',
dataIndex: 'radius',
width: 80,
ellipsis: true
}
ellipsis: true,
},
]
// Attribute Configuration (a-form)
const rules = {
cacheTime: {
required: true,
message: 'Please Input Cache Time'
message: 'Please Input Cache Time',
},
scaleInterval: {
required: true,
message: 'Please Input Scale Interval'
message: 'Please Input Scale Interval',
},
timelineLength: {
required: true,
message: 'Please Input Timeline Length'
message: 'Please Input Timeline Length',
},
updateIntervalTime: {
required: true,
message: 'Please Input Update Interval'
}
message: 'Please Input Update Interval',
},
}
export default {
props: {
panMovePix: {
type: Number,
default: 500
default: 500,
},
treeData: {
type: Array
}
type: Array,
},
},
components: {
CustomModal,
CustomTree,
RealTimeDataChart
RealTimeDataChart,
},
data() {
this.columns = columns
@ -409,7 +413,7 @@ export default {
cacheTime: 15,
scaleInterval: 120,
timelineLength: 1440,
updateIntervalTime: 5
updateIntervalTime: 5,
}, //
isSavingDataRecieveSettings: false,
@ -423,7 +427,9 @@ export default {
showPane: true,
spinLoading: false,
maskVisi: false
maskVisi: false,
stationInfo: undefined,
}
},
created() {
@ -446,9 +452,9 @@ export default {
this.map = map
this.circleLayer = new VectorLayer({
source: new VectorSource({
features: []
features: [],
}),
properties: { name: 'eventCircle' }
properties: { name: 'eventCircle' },
})
this.map.addLayer(this.circleLayer)
},
@ -496,12 +502,12 @@ export default {
// Filter Marker
emitFilter() {
const filterType = this.filterList.filter(item => item.checked).map(item => item.type)
const filterDataQuality = this.dataQualityList.filter(item => item.checked).map(item => item.title)
const filterType = this.filterList.filter((item) => item.checked).map((item) => item.type)
const filterDataQuality = this.dataQualityList.filter((item) => item.checked).map((item) => item.title)
this.$emit('filterMarker', {
filterType,
filterDataQuality
filterDataQuality,
})
},
@ -514,7 +520,7 @@ export default {
handleSelectAll() {
this.checkedKeys = this.treeData.reduce((prev, curr) => {
prev.push(curr.stationId)
prev.push(...curr.children.map(child => child.stationId))
prev.push(...curr.children.map((child) => child.stationId))
return prev
}, [])
},
@ -547,16 +553,16 @@ export default {
return
}
const stationIds = this.checkedKeys.filter(key => -1 == key.toString().indexOf('root_'))
const stationIds = this.checkedKeys.filter((key) => -1 == key.toString().indexOf('root_'))
try {
this.isGettingInfomationList = true
const {
success,
result: { GIS: markerList, table },
message
message,
} = await postAction('/jeecg-station-operation/stationOperation/getHitEquList', {
radius: this.radius,
stationIds
stationIds,
})
if (success) {
const source = this.circleLayer.getSource()
@ -571,7 +577,7 @@ export default {
this.dataSource = data // Infomation
this.stationList = [] //
markerList.forEach(markerItem => {
markerList.forEach((markerItem) => {
// stationId便marker
if (markerItem.stationId) {
//
@ -616,7 +622,8 @@ export default {
},
//
handleOpenAnalyzeModal() {
handleOpenAnalyzeModal(stationInfo) {
this.stationInfo = stationInfo
this.dataStatusModalVisible = true
},
@ -653,13 +660,13 @@ export default {
try {
await this.validateForm(this.dataRecieveStatusModel, rules)
try {
const stationIds = this.dataStatusCheckedKeys.filter(key => -1 == key.toString().indexOf('root_'))
const stationIds = this.dataStatusCheckedKeys.filter((key) => -1 == key.toString().indexOf('root_'))
this.isSavingDataRecieveSettings = true
const { success, message } = await postAction(
'/jeecg-station-operation/sysUserFocusStation/saveUserFocusByUserId',
{
stationIds,
...this.dataRecieveStatusModel
...this.dataRecieveStatusModel,
}
)
if (success) {
@ -701,7 +708,7 @@ export default {
const { success, result, message } = await getAction(
'/jeecg-station-operation/sysUserFocusStation/findUserFocusByUserId',
{
userId: this.$store.getters.userInfo.id
userId: this.$store.getters.userInfo.id,
}
)
if (success) {
@ -737,20 +744,25 @@ export default {
const { success, result, message } = await getAction(
'/jeecg-station-operation/stationOperation/getDataReceivingStatus',
{
userId: this.$store.getters.userInfo.id
userId: this.$store.getters.userInfo.id,
oneStationId: (this.stationInfo && this.stationInfo.stationId) || '',
}
)
this.maskVisi = false
this.spinLoading = false
if (success) {
// Marker
if (this.stationInfo) {
result.sort(({ stationId }) => (stationId == this.stationInfo.stationId ? -1 : 1)) // chrome firefox
}
const statusList = []
result.forEach(item => {
result.forEach((item) => {
const detectorArr = item.detectors[item.stationId]
detectorArr.forEach(detector => {
Object.values(detector).forEach(value => {
detectorArr.forEach((detector) => {
Object.values(detector).forEach((value) => {
statusList.push({
title: `${item.stationCode} ${value.detectorId}`,
dataList: value.dataList
dataList: value.dataList,
})
})
})
@ -770,27 +782,27 @@ export default {
handleResize() {
this.$refs.realtimeChartRef.resize()
}
},
},
watch: {
dataStatusModalVisible(val) {
if (val) {
this.dataStatusCheckedKeys = this.initialDataRecieveSettings.sysUserFocusStations.map(item =>
this.dataStatusCheckedKeys = this.initialDataRecieveSettings.sysUserFocusStations.map((item) =>
parseInt(item.stationId)
)
this.dataRecieveStatusModel = {
cacheTime: this.initialDataRecieveSettings.cacheTime,
scaleInterval: this.initialDataRecieveSettings.scaleInterval,
timelineLength: this.initialDataRecieveSettings.timelineLength,
updateIntervalTime: this.initialDataRecieveSettings.updateIntervalTime
updateIntervalTime: this.initialDataRecieveSettings.updateIntervalTime,
}
this.startGetDataReceiveStatusList()
} else {
clearInterval(this.timer)
}
}
}
},
},
}
</script>
<style lang="less" scoped>
@ -814,7 +826,7 @@ export default {
//
&-operators {
user-select: none;
pointer-events:all;
pointer-events: all;
height: 200px;
img {

View File

@ -228,6 +228,7 @@ export default {
timer: null,
updataFilterType: [],
updataFilterDataQuality: [],
httpNum: 0,
}
},
created() {
@ -268,6 +269,7 @@ export default {
//
async getDataProvisionEfficiency(arr, str) {
this.httpNum++
if (str && this.$route.path == '/station-operation') {
this.$message.loading({ content: 'Loading station data, please wait...', key, duration: 0 })
}
@ -279,6 +281,7 @@ export default {
this.$message.success({ content: 'Loaded!', key, duration: 2 })
}
res.result.forEach((item) => {
if (Object.prototype.toString.call(item) == '[object Object]') {
arr.forEach((el) => {
if (
parseInt(item.id) == el.stationId &&
@ -289,6 +292,7 @@ export default {
item.stationId = el.stationId
}
})
}
})
this.orgStationList = res.result
let arrA = []
@ -325,10 +329,15 @@ export default {
} else if (arrA.length == 0 || arrB.length == 0 || arrC.length == 0) {
this.upDateStationList = []
}
setTimeout(() => {
this.timer = setTimeout(() => {
this.getDataProvisionEfficiency(this.markerList_clone)
}, 10000)
} else {
if (this.httpNum <= 5) {
setTimeout(() => {
this.getDataProvisionEfficiency(this.markerList_clone)
}, 5000)
}
this.$message.warning('This operation fails. Contact your system administrator')
}
})
@ -525,8 +534,8 @@ export default {
},
//
onMarkerClick() {
this.$refs.mapPane.handleOpenAnalyzeModal()
onMarkerClick(stationInfo) {
this.$refs.mapPane.handleOpenAnalyzeModal(stationInfo)
},
getScrollContainer() {