Merge branch 'master-dev' into feature-Beta-dev-renpy

This commit is contained in:
orgin 2024-02-19 18:10:32 +08:00
commit fadc2b0b8e
7 changed files with 138 additions and 35 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -22,6 +22,11 @@
<a-icon type="tool"/> <a-icon type="tool"/>
<span>系统设置</span> <span>系统设置</span>
</a-menu-item> --> </a-menu-item> -->
<a-menu-item key="3">
<a-icon type="user" />
<span>{{ this.userInfo().username }}</span>
</a-menu-item>
<a-menu-divider />
<a-menu-item key="4" @click="updatePassword"> <a-menu-item key="4" @click="updatePassword">
<a-icon type="setting" /> <a-icon type="setting" />
<span>Change Password</span> <span>Change Password</span>

View File

@ -5,13 +5,43 @@
<a-col flex="108px"> <a-col flex="108px">
<a-button class="search-btn" type="primary" @click="handleConfig"> Config </a-button> <a-button class="search-btn" type="primary" @click="handleConfig"> Config </a-button>
</a-col> </a-col>
<a-col flex="380px"> <a-col flex="365px">
<span class="item-label">Cacl date</span> <span class="item-label">Cacl date</span>
<a-range-picker <a-range-picker
:value="[moment(queryParams.startDate), moment(queryParams.endDate)]" :value="[moment(queryParams.startDate), moment(queryParams.endDate)]"
@change="onRangeDateChange" @change="onRangeDateChange"
/> />
</a-col> </a-col>
<a-col flex="265px">
<span class="item-label">Station</span>
<a-select
style="width: 180px"
v-model="queryParams.stationId"
placeholder="select..."
:filter-option="filterOption"
show-arrow
allowClear
:options="stationOptions"
@change="onStationChange"
>
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
</a-select>
</a-col>
<a-col flex="285px">
<span class="item-label">Source Type</span>
<a-select
style="width: 180px"
v-model="queryParams.sourceType"
placeholder="select..."
:filter-option="filterOption"
show-arrow
allowClear
:options="sourceOptions"
@change="onSourceChange"
>
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
</a-select>
</a-col>
</a-row> </a-row>
</div> </div>
<div class="analysis-main"> <div class="analysis-main">
@ -89,6 +119,11 @@ import moment from 'moment'
import TableList from '../../components/tableList.vue' import TableList from '../../components/tableList.vue'
import { getAction, postAction, httpAction, deleteAction } from '@/api/manage' import { getAction, postAction, httpAction, deleteAction } from '@/api/manage'
const columns = [ const columns = [
{
title: 'STATION',
align: 'center',
dataIndex: 'stationCode',
},
{ {
title: 'NUCLIDE', title: 'NUCLIDE',
align: 'center', align: 'center',
@ -125,6 +160,8 @@ export default {
dataSource: [], dataSource: [],
loading: false, loading: false,
queryParams: { queryParams: {
stationId: undefined,
sourceType: undefined,
startDate: dateFormat(new Date(), 'yyyy-MM-dd'), startDate: dateFormat(new Date(), 'yyyy-MM-dd'),
endDate: dateFormat(new Date(), 'yyyy-MM-dd'), endDate: dateFormat(new Date(), 'yyyy-MM-dd'),
}, },
@ -148,6 +185,17 @@ export default {
index: '', index: '',
}, },
currId: '', currId: '',
stationOptions: [],
sourceOptions: [
{
label: 'ARMDARR',
value: '1',
},
{
label: 'ARMDRRR',
value: '2',
},
],
} }
}, },
created() { created() {
@ -157,6 +205,30 @@ export default {
this.getNuclideAvgList() this.getNuclideAvgList()
}, },
methods: { methods: {
onSourceChange(val) {
console.log(val)
},
getStationList() {
getAction('/webStatistics/findStationList', { menuName: '' }).then((res) => {
if (res.success) {
if (res.result.length > 0) {
this.stationOptions = res.result.map((item) => {
return {
label: item.stationCode,
value: `${item.stationId}`,
}
})
} else {
this.stationOptions = []
}
} else {
this.$message.warning('This operation fails. Contact your system administrator')
}
})
},
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
// n // n
getBeforeDate(n) { getBeforeDate(n) {
var n = n var n = n
@ -183,8 +255,7 @@ export default {
getNuclideAvgList() { getNuclideAvgList() {
this.loading = true this.loading = true
let params = { let params = {
startDate: this.queryParams.startDate, ...this.queryParams,
endDate: this.queryParams.endDate,
pageNo: this.ipagination.current, pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize, pageSize: this.ipagination.pageSize,
} }
@ -198,6 +269,14 @@ export default {
} }
}) })
}, },
onStationChange(val) {
this.queryParams.stationId = val
this.getNuclideAvgList()
},
onSourceChange(val) {
this.queryParams.sourceType = val
this.getNuclideAvgList()
},
onRangeDateChange(date, dateString) { onRangeDateChange(date, dateString) {
this.queryParams.startDate = dateString[0] this.queryParams.startDate = dateString[0]
this.queryParams.endDate = dateString[1] this.queryParams.endDate = dateString[1]

View File

@ -4,7 +4,7 @@
{{ item.stationName || item.stationCode }} {{ item.stationName || item.stationCode }}
</h4> </h4>
<div class="data-list-item-container"> <div class="data-list-item-container">
<div class="data-list-item-content"> <div class="data-list-item-content" :class="[item.scheduling ? 'active' : '']">
<div class="data-list-item-children"> <div class="data-list-item-children">
<div class="data-list-item-child"> <div class="data-list-item-child">
<label>Station Type:</label> <label>Station Type:</label>
@ -42,9 +42,9 @@
export default { export default {
props: { props: {
item: { item: {
type: Object type: Object,
} },
} },
} }
</script> </script>
@ -85,6 +85,10 @@ export default {
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
&.active {
background-image: url(~@/assets/images/station-operation/data-item-bg-active.png);
}
.data-list-item-children { .data-list-item-children {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;

View File

@ -189,7 +189,7 @@
<div class="content"> <div class="content">
<a-form-model class="attribute-form" layout="vertical"> <a-form-model class="attribute-form" layout="vertical">
<a-form-model-item label="Cache time"> <a-form-model-item label="Cache time">
<a-input-number type="number" v-model="dataRecieveStatusModel.cacheTime" :min="0"></a-input-number> <a-input-number type="number" v-model="dataRecieveStatusModel.cacheTime" :min="1"></a-input-number>
<span>day</span> <span>day</span>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="Scale interval"> <a-form-model-item label="Scale interval">
@ -268,15 +268,11 @@
import CustomModal from '@/components/CustomModal/index.vue' import CustomModal from '@/components/CustomModal/index.vue'
import CustomTree from '@/components/CustomTree/index.vue' import CustomTree from '@/components/CustomTree/index.vue'
import RealTimeDataChart from './RealTimeDataChart.vue' import RealTimeDataChart from './RealTimeDataChart.vue'
import { getAction, postAction } from '../../../api/manage' import { deleteAction, getAction, postAction } from '../../../api/manage'
import { MarkerType, FilterIcon } from './markerEnum' import { MarkerType, FilterIcon } from './markerEnum'
import { Vector as VectorLayer } from 'ol/layer' import { Vector as VectorLayer } from 'ol/layer'
import VectorSource from 'ol/source/Vector' import VectorSource from 'ol/source/Vector'
import { Circle } from 'ol/geom'
import { fromLonLat } from 'ol/proj'
import Feature from 'ol/Feature'
import { Fill, Stroke, Style } from 'ol/style'
import { cloneDeep } from 'lodash' import { cloneDeep } from 'lodash'
// Filter // Filter
@ -455,8 +451,6 @@ export default {
this.initParentMapProps() this.initParentMapProps()
document.addEventListener('fullscreenchange', this.onFullScreenChange) document.addEventListener('fullscreenchange', this.onFullScreenChange)
this.stationList = [] this.stationList = []
this.getDataRecieveSettings()
}, },
destroyed() { destroyed() {
document.removeEventListener('fullscreenchange', this.onFullScreenChange) document.removeEventListener('fullscreenchange', this.onFullScreenChange)
@ -739,7 +733,16 @@ export default {
userId: this.$store.getters.userInfo.id, userId: this.$store.getters.userInfo.id,
}) })
if (success) { if (success) {
const { cacheTime, scaleInterval, timelineLength, updateIntervalTime, sysUserFocusStations } = result
this.initialDataRecieveSettings = result this.initialDataRecieveSettings = result
this.dataRecieveStatusModel = {
cacheTime,
scaleInterval,
timelineLength,
updateIntervalTime,
}
this.dataStatusCheckedKeys = sysUserFocusStations.map((item) => parseInt(item.stationId))
} else { } else {
this.$message.error(message) this.$message.error(message)
} }
@ -771,6 +774,7 @@ export default {
const { success, result, message } = await getAction('/stationOperation/getDataReceivingStatus', { const { success, result, message } = await getAction('/stationOperation/getDataReceivingStatus', {
userId: this.$store.getters.userInfo.id, userId: this.$store.getters.userInfo.id,
oneStationId: (this.stationInfo && this.stationInfo.stationId) || '', oneStationId: (this.stationInfo && this.stationInfo.stationId) || '',
cacheTime: this.initialDataRecieveSettings.cacheTime,
}) })
this.maskVisi = false this.maskVisi = false
this.spinLoading = false this.spinLoading = false
@ -804,24 +808,32 @@ export default {
} }
}, },
//
async clearDataRecieveSetting() {
const { success, message } = await deleteAction('/sysUserFocusStation/deleteUserCache', {
userId: this.$store.getters.userInfo.id,
})
if (!success) {
throw new Error(message)
}
},
handleResize() { handleResize() {
this.$refs.realtimeChartRef.resize() this.$refs.realtimeChartRef.resize()
}, },
}, },
watch: { watch: {
dataStatusModalVisible(val) { async dataStatusModalVisible(val) {
if (val) { if (val) {
this.dataStatusCheckedKeys = this.initialDataRecieveSettings.sysUserFocusStations.map((item) => try {
parseInt(item.stationId) this.spinLoading = true
) await this.clearDataRecieveSetting()
this.dataRecieveStatusModel = { await this.getDataRecieveSettings()
cacheTime: this.initialDataRecieveSettings.cacheTime,
scaleInterval: this.initialDataRecieveSettings.scaleInterval,
timelineLength: this.initialDataRecieveSettings.timelineLength,
updateIntervalTime: this.initialDataRecieveSettings.updateIntervalTime,
}
this.startGetDataReceiveStatusList() this.startGetDataReceiveStatusList()
} catch (error) {
this.$message.error(error)
this.spinLoading = false
}
} else { } else {
clearInterval(this.timer) clearInterval(this.timer)
} }

View File

@ -521,12 +521,6 @@ export default {
*/ */
onFilterMarker({ filterType, filterDataQuality }) { onFilterMarker({ filterType, filterDataQuality }) {
this.updataFilterType = filterType this.updataFilterType = filterType
console.log(
'%c [ filterType, filterDataQuality ]-343',
'font-size:13px; background:pink; color:#bf2c9f;',
filterType,
filterDataQuality
)
this.updataFilterDataQuality = [] this.updataFilterDataQuality = []
filterDataQuality.forEach((item) => { filterDataQuality.forEach((item) => {
if (item === 'Excellent data quality') { if (item === 'Excellent data quality') {
@ -548,7 +542,13 @@ export default {
// //
onMarkerClick(stationInfo) { onMarkerClick(stationInfo) {
const { stationType, status } = stationInfo const { stationType, stationName } = stationInfo
const find = this.orgStationList.find(item => item.stationCode == stationName)
if(!find) {
return
}
const status = find.status
if (stationType !== 'NRL' && stationType !== 'Nuclear Facility' && status !== 'Unoperating') { if (stationType !== 'NRL' && stationType !== 'Nuclear Facility' && status !== 'Unoperating') {
this.$refs.mapPane.handleOpenAnalyzeModal(stationInfo) this.$refs.mapPane.handleOpenAnalyzeModal(stationInfo)
} }

View File

@ -188,7 +188,10 @@ export default {
} }
const validateCountryCode = (_, value, callback) => { const validateCountryCode = (_, value, callback) => {
if (value && value.length > 2) { if(!value) {
callback(new Error('Please Enter Country Code'))
}
else if (value.length > 2) {
callback(new Error('Country Code Limit 2 Char')) callback(new Error('Country Code Limit 2 Char'))
} else { } else {
callback() callback()
@ -199,7 +202,7 @@ export default {
rules: { rules: {
stationId: [{ required: true, message: 'Please Enter Station Id' }], stationId: [{ required: true, message: 'Please Enter Station Id' }],
stationCode: [{ required: true, validator: validateStationCode }], stationCode: [{ required: true, validator: validateStationCode }],
countryCode: [{ validator: validateCountryCode }] countryCode: [{ required: true, validator: validateCountryCode }]
}, },
url: { url: {
list: '/gardsStations/findPage', list: '/gardsStations/findPage',