Merge branch 'master-dev' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
f17ce2b03b
|
@ -53,7 +53,7 @@ export const JeecgListMixin = {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
if(!this.disableMixinCreated&&!this.isImmediate){
|
||||
if (!this.disableMixinCreated) {
|
||||
console.log(' -- mixin created -- ')
|
||||
this.loadData();
|
||||
//初始化字典配置 在自己页面定义
|
||||
|
@ -88,8 +88,7 @@ export const JeecgListMixin = {
|
|||
if (res.success) {
|
||||
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
this.dataSource = res.result.records || res.result;
|
||||
if(res.result.total)
|
||||
{
|
||||
if (res.result.total) {
|
||||
this.ipagination.total = res.result.total;
|
||||
} else {
|
||||
this.ipagination.total = 0;
|
||||
|
@ -126,7 +125,8 @@ export const JeecgListMixin = {
|
|||
sqp['superQueryMatchType'] = this.superQueryMatchType
|
||||
}
|
||||
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
|
||||
param.field = this.getQueryField();
|
||||
// param.field = this.getQueryField();
|
||||
param.field = this.isorter.column;
|
||||
param.pageNo = this.ipagination.current;
|
||||
param.pageSize = this.ipagination.pageSize;
|
||||
return filterObj(param);
|
||||
|
@ -237,6 +237,7 @@ export const JeecgListMixin = {
|
|||
this.$refs.modalForm.disableSubmit = false;
|
||||
},
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
console.log("sortersorter", sorter);
|
||||
//分页、排序、筛选变化时触发
|
||||
//TODO 筛选
|
||||
console.log(pagination)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<a-card :bordered="false" style="height: 100%;">
|
||||
<a-card :bordered="false" style="height: 100%">
|
||||
<a-layout id="components-layout-demo-custom-trigger" style="height: 100%">
|
||||
<a-layout-sider theme="light" v-model="collapsed" :trigger="null" collapsible width="350px">
|
||||
<div style="height: 100%">
|
||||
|
@ -97,13 +97,13 @@ export default {
|
|||
},
|
||||
created() {
|
||||
var permissionList = this.$store.getters.permissionList
|
||||
console.log("permissionList",permissionList);
|
||||
console.log('permissionList', permissionList)
|
||||
permissionList.forEach((f) => {
|
||||
if (f.name === "abnormal-alarm") {
|
||||
if (f.name === 'abnormal-alarm') {
|
||||
this.menus = f.children
|
||||
}
|
||||
})
|
||||
console.log("路由信息",this.menus);
|
||||
console.log('路由信息', this.menus)
|
||||
// this.initDefaultKeys(this.menus[0])
|
||||
// 将从缓存中取出openKeys
|
||||
// const openKeys = window.sessionStorage.getItem('openKeys')
|
||||
|
@ -113,10 +113,9 @@ export default {
|
|||
// this.defaultSelectedKeys.push(selectedKeys)
|
||||
this.currSlecteKey.push(selectedKeys)
|
||||
} else {
|
||||
|
||||
this.initDefaultKeys(this.menus[0])
|
||||
}
|
||||
this.openKeys =this.defaultOpenKeys= this.menus.map(item => {
|
||||
this.openKeys = this.defaultOpenKeys = this.menus.map((item) => {
|
||||
return item.path
|
||||
})
|
||||
// if (openKeys) {
|
||||
|
@ -128,21 +127,22 @@ export default {
|
|||
// this.openKeys = JSON.parse(openKeys)
|
||||
// }
|
||||
},
|
||||
// watch: {
|
||||
// "$route": {
|
||||
// handler: function (val, oldVal) {
|
||||
// this.currSlecteKey=[]
|
||||
// console.log(val);
|
||||
// this.currSlecteKey.push(val.path)
|
||||
// window.sessionStorage.setItem('currMenu', val.path)
|
||||
// },
|
||||
// deep:true,
|
||||
// immediate:true
|
||||
// }
|
||||
// },
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function (val, oldVal) {
|
||||
this.currSlecteKey = []
|
||||
console.log(val)
|
||||
this.currSlecteKey.push(val.path)
|
||||
window.sessionStorage.setItem('currMenu_alarm', val.path)
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 点击菜单,路由跳转,注意的是当点击MenuItem才会触发此函数
|
||||
menuClick({ item, key, keyPath }) {
|
||||
console.log(item, key, keyPath)
|
||||
this.currSlecteKey = []
|
||||
window.sessionStorage.setItem('currMenu_alarm', key)
|
||||
// var parentPath = item._props.parentMenu._props.eventKey;
|
||||
|
@ -156,7 +156,7 @@ export default {
|
|||
},
|
||||
initDefaultKeys(data) {
|
||||
this.currSlecteKey = []
|
||||
console.log("datadefaultOpenKeys",data);
|
||||
console.log('datadefaultOpenKeys', data)
|
||||
this.defaultOpenKeys.push(data.path)
|
||||
data.children.some((f) => {
|
||||
if (f.children) {
|
||||
|
|
|
@ -448,6 +448,8 @@ export default {
|
|||
max: 0,
|
||||
min: 0,
|
||||
avg: 0,
|
||||
xData: [],
|
||||
yData: [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
@ -622,7 +624,6 @@ export default {
|
|||
getCpuUtilizationData() {
|
||||
let params = {
|
||||
itemId: this.currItemId,
|
||||
// itemId: '37550',
|
||||
itemType: 0,
|
||||
start: `${dateFormat(new Date(), 'yyyy-MM-dd')} 00:00:00`,
|
||||
end: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
|
||||
|
@ -646,7 +647,6 @@ export default {
|
|||
getTimeLineData() {
|
||||
let params = {
|
||||
itemId: this.currItemId,
|
||||
// itemId: '37550',
|
||||
itemType: 0,
|
||||
start: `${dateFormat(new Date(), 'yyyy-MM-dd')} 00:00:00`,
|
||||
end: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
|
||||
|
@ -728,6 +728,16 @@ export default {
|
|||
this.currIndex = i
|
||||
this.currItemId = item.cpuUsedItemId
|
||||
this.currSourceId = item.sourceId
|
||||
this.detailInfo = {}
|
||||
this.cpuData = {
|
||||
max: 0,
|
||||
min: 0,
|
||||
avg: 0,
|
||||
xData: [],
|
||||
yData: [],
|
||||
}
|
||||
startTime = null
|
||||
data1 = []
|
||||
this.getBasiclnfo(item.hostId)
|
||||
this.getCpuUtilizationData()
|
||||
this.getTimeLineData()
|
||||
|
@ -735,8 +745,7 @@ export default {
|
|||
getDetailsAlarmInfo(callBack) {
|
||||
this.loading = true
|
||||
let params = {
|
||||
// sourceId:this.currSourceId,
|
||||
sourceId: 'e2',
|
||||
sourceId: this.currSourceId,
|
||||
pageNo: this.ipagination_alarm_info.current,
|
||||
pageSize: this.ipagination_alarm_info.pageSize,
|
||||
}
|
||||
|
|
|
@ -128,9 +128,9 @@
|
|||
<span>C to E : </span>
|
||||
<span>
|
||||
E =
|
||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramA" /> +
|
||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramB" /> *C +
|
||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramC" /> *C <sup>2</sup>
|
||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramA" @change="newCalibrationFuncModelChange"/> +
|
||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramB" @change="newCalibrationFuncModelChange"/> *C +
|
||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramC" @change="newCalibrationFuncModelChange" /> *C <sup>2</sup>
|
||||
</span>
|
||||
</p>
|
||||
<div class="func">
|
||||
|
@ -785,6 +785,11 @@ export default {
|
|||
energy,
|
||||
})
|
||||
|
||||
// add之后 需要清空chart黄色的线 20231028:Xiao
|
||||
if(this.figureChartOption.series[1].data) {
|
||||
this.figureChartOption.series[1].data = []
|
||||
}
|
||||
|
||||
this.figureChartOption.series[1].markPoint.data.push({ xAxis: channel, yAxis: energy })
|
||||
|
||||
const { min, max } = this.getFigureChartMaxAndMin()
|
||||
|
@ -808,6 +813,19 @@ export default {
|
|||
this.isInverse = true
|
||||
},
|
||||
|
||||
// 输入框发生变化
|
||||
newCalibrationFuncModelChange() {
|
||||
// 输入内容的时候 需要清空table数据 20231028:Xiao
|
||||
this.list = []
|
||||
// 需要清空chart黄色的线 20231028:Xiao
|
||||
if(this.figureChartOption.series[1].data) {
|
||||
this.figureChartOption.series[1].data = []
|
||||
}
|
||||
if(this.figureChartOption.series[1].markPoint.data) {
|
||||
this.figureChartOption.series[1].markPoint.data = []
|
||||
}
|
||||
},
|
||||
|
||||
// 删除表格里的单项
|
||||
handleDel(index) {
|
||||
const willDelItem = this.list.splice(index, 1)[0]
|
||||
|
@ -857,15 +875,19 @@ export default {
|
|||
// 点击Fitting按钮执行重新计算
|
||||
async handleFitting() {
|
||||
const hasEmpty = Object.entries(this.newCalibrationFuncModel).some(([_, v]) => !v)
|
||||
if (hasEmpty) {
|
||||
if (hasEmpty && this.list.length < 3) {
|
||||
return
|
||||
}
|
||||
try {
|
||||
const { success, result, message } = await postAction('/spectrumAnalysis/fitting', {
|
||||
...this.newCalibrationFuncModel,
|
||||
tempPoints: this.isFirstFitting
|
||||
? this.oldScatterSeries
|
||||
: this.list.map((item) => ({ x: item.channel, y: item.energy })),
|
||||
// 修改逻辑,如果列表中有数据 以列表的数据优先进行分析 20231028:Xiao
|
||||
tempPoints: this.list.length > 0
|
||||
? this.list.map((item) => ({ x: item.channel, y: item.energy }))
|
||||
: this.oldScatterSeries,
|
||||
// tempPoints: this.isFirstFitting
|
||||
// ? this.oldScatterSeries
|
||||
// : this.list.map((item) => ({ x: item.channel, y: item.energy })),
|
||||
count: this.isFirstFitting || !this.isInverse ? undefined : this.count,
|
||||
})
|
||||
if (success) {
|
||||
|
|
|
@ -95,9 +95,9 @@
|
|||
<span>C to E : </span>
|
||||
<span>
|
||||
E =
|
||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramA" /> +
|
||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramB" /> *C +
|
||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramC" /> *C <sup>2</sup>
|
||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramA" @change="newCalibrationFuncModelChange()"/> +
|
||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramB" @change="newCalibrationFuncModelChange()"/> *C +
|
||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramC" @change="newCalibrationFuncModelChange()"/> *C <sup>2</sup>
|
||||
</span>
|
||||
</p>
|
||||
<div class="func">
|
||||
|
@ -154,6 +154,7 @@ import { exportEchartImg, getXAxisAndYAxisByPosition, splitAxis } from '@/utils/
|
|||
import { cloneDeep } from 'lodash'
|
||||
import { isNullOrUndefined } from '@/utils/util'
|
||||
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
||||
import { f } from 'vue-area-linkage'
|
||||
|
||||
const initialGammaSpectrumChartOption = {
|
||||
grid: {
|
||||
|
@ -571,6 +572,11 @@ export default {
|
|||
energy,
|
||||
})
|
||||
|
||||
// add之后 需要清空chart黄色的线 20231028:Xiao
|
||||
if(this.figureChartOption.series[1].data) {
|
||||
this.figureChartOption.series[1].data = []
|
||||
}
|
||||
|
||||
this.figureChartOption.series[1].markPoint.data.push({ xAxis: channel, yAxis: energy })
|
||||
|
||||
const { min, max } = this.getFigureChartMaxAndMin()
|
||||
|
@ -593,6 +599,18 @@ export default {
|
|||
|
||||
this.isInverse = true
|
||||
},
|
||||
// 输入框发生变化
|
||||
newCalibrationFuncModelChange(val,a) {
|
||||
// 输入内容的时候 需要清空table数据 20231028:Xiao
|
||||
this.list = []
|
||||
// 需要清空chart黄色的线 20231028:Xiao
|
||||
if(this.figureChartOption.series[1].data) {
|
||||
this.figureChartOption.series[1].data = []
|
||||
}
|
||||
if(this.figureChartOption.series[1].markPoint.data) {
|
||||
this.figureChartOption.series[1].markPoint.data = []
|
||||
}
|
||||
},
|
||||
|
||||
// 删除表格里的单项
|
||||
handleDel(index) {
|
||||
|
@ -634,15 +652,20 @@ export default {
|
|||
// 点击Fitting按钮执行重新计算
|
||||
async handleFitting() {
|
||||
const hasEmpty = Object.entries(this.newCalibrationFuncModel).some(([_, v]) => !v)
|
||||
if (hasEmpty) {
|
||||
if (hasEmpty && this.list.length < 3) {
|
||||
return
|
||||
}
|
||||
try {
|
||||
const { success, result, message } = await postAction('/spectrumAnalysis/fitting', {
|
||||
...this.newCalibrationFuncModel,
|
||||
tempPoints: this.isFirstFitting
|
||||
? this.oldScatterSeries
|
||||
: this.list.map((item) => ({ x: item.channel, y: item.energy })),
|
||||
// 修改逻辑,如果列表中有数据 以列表的数据优先进行分析 20231028:Xiao
|
||||
tempPoints: this.list.length > 0
|
||||
? this.list.map((item) => ({ x: item.channel, y: item.energy }))
|
||||
: this.oldScatterSeries,
|
||||
|
||||
// tempPoints: this.isFirstFitting
|
||||
// ? this.oldScatterSeries
|
||||
// : this.list.map((item) => ({ x: item.channel, y: item.energy })),
|
||||
count: this.isFirstFitting || !this.isInverse ? undefined : this.count,
|
||||
})
|
||||
if (success) {
|
||||
|
|
|
@ -37,25 +37,32 @@ export default {
|
|||
detBg: [],
|
||||
gasBg: [],
|
||||
qc: [],
|
||||
sample: []
|
||||
sample: [],
|
||||
},
|
||||
isLoading: true,
|
||||
fileName: '',
|
||||
currTab: 1
|
||||
currTab: 1,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getContent() {
|
||||
try {
|
||||
this.isLoading = true
|
||||
const { sampleId, dbName, sampleFileName, gasFileName, detFileName, qcFileName } = this.newSampleData
|
||||
const {
|
||||
sampleId,
|
||||
dbName,
|
||||
inputFileName: sampleFileName,
|
||||
gasFileName,
|
||||
detFileName,
|
||||
qcFileName,
|
||||
} = this.newSampleData
|
||||
const { success, result, message } = await getAction('/spectrumAnalysis/viewSpectrum', {
|
||||
sampleId,
|
||||
dbName,
|
||||
sampleFileName,
|
||||
gasFileName,
|
||||
detFileName,
|
||||
qcFileName
|
||||
qcFileName,
|
||||
})
|
||||
if (success) {
|
||||
if (result) {
|
||||
|
@ -78,8 +85,8 @@ export default {
|
|||
this.currTab = key
|
||||
},
|
||||
handleOk() {
|
||||
this.fileName=""
|
||||
let text = ""
|
||||
this.fileName = ''
|
||||
let text = ''
|
||||
if (this.currTab == 1) {
|
||||
text = this.content.sample.join('\n')
|
||||
} else if (this.currTab == 2) {
|
||||
|
@ -90,30 +97,30 @@ export default {
|
|||
text = this.content.qc.join('\n')
|
||||
}
|
||||
if (text) {
|
||||
let strData = new Blob([text], { type: 'text/plain;charset=utf-8' });
|
||||
let strData = new Blob([text], { type: 'text/plain;charset=utf-8' })
|
||||
// saveAs(strData, `GammaViewer Log.txt`)
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
title: 'Please enter file name',
|
||||
content: h => <a-input v-model={_this.fileName} />,
|
||||
content: (h) => <a-input v-model={_this.fileName} />,
|
||||
okText: 'Cancle',
|
||||
cancelText: 'Save',
|
||||
okButtonProps: {style: {backgroundColor: "#b98326", color: "#fff", borderColor: "transparent"}},
|
||||
cancelButtonProps: {style: {color: "#fff", backgroundColor: "#31aab0", borderColor: "transparent"}},
|
||||
okButtonProps: { style: { backgroundColor: '#b98326', color: '#fff', borderColor: 'transparent' } },
|
||||
cancelButtonProps: { style: { color: '#fff', backgroundColor: '#31aab0', borderColor: 'transparent' } },
|
||||
onOk() {
|
||||
console.log('Cancel');
|
||||
console.log('Cancel')
|
||||
},
|
||||
onCancel() {
|
||||
if (_this.fileName) {
|
||||
saveAs(strData, `${_this.fileName}.txt`)
|
||||
}
|
||||
},
|
||||
});
|
||||
})
|
||||
} else {
|
||||
this.$message.warning("No data can be saved!")
|
||||
}
|
||||
}
|
||||
this.$message.warning('No data can be saved!')
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ const columns = [
|
|||
title: 'Col.Stop',
|
||||
align: 'left',
|
||||
dataIndex: 'collectStop',
|
||||
sorter: true,
|
||||
width: 170,
|
||||
},
|
||||
{
|
||||
|
@ -434,7 +435,7 @@ export default {
|
|||
allowClear: true,
|
||||
},
|
||||
style: {
|
||||
width: '264px',
|
||||
width: '207px',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -465,7 +466,7 @@ export default {
|
|||
},
|
||||
},
|
||||
style: {
|
||||
width: '19%',
|
||||
width: '16%',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -481,8 +482,43 @@ export default {
|
|||
},
|
||||
style: {
|
||||
paddingRight: 0,
|
||||
marginRight: '22px',
|
||||
width: '19%',
|
||||
marginRight: '8px',
|
||||
width: '13%',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Status',
|
||||
type: 'custom-select',
|
||||
name: 'status',
|
||||
props: {
|
||||
options: [
|
||||
{
|
||||
label: 'U',
|
||||
value: 'U',
|
||||
},
|
||||
{
|
||||
label: 'A',
|
||||
value: 'A',
|
||||
},
|
||||
{
|
||||
label: 'P',
|
||||
value: 'P',
|
||||
},
|
||||
{
|
||||
label: 'R',
|
||||
value: 'R',
|
||||
},
|
||||
{
|
||||
label: 'F',
|
||||
value: 'F',
|
||||
},
|
||||
],
|
||||
allowClear: true,
|
||||
},
|
||||
style: {
|
||||
width: '14%',
|
||||
|
||||
marginRight: '10px',
|
||||
},
|
||||
},
|
||||
]
|
||||
|
|
|
@ -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,
|
||||
|
||||
|
@ -425,7 +429,7 @@ export default {
|
|||
spinLoading: false,
|
||||
maskVisi: false,
|
||||
|
||||
stationInfo: undefined
|
||||
stationInfo: undefined,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -448,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)
|
||||
},
|
||||
|
@ -498,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,
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -516,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
|
||||
}, [])
|
||||
},
|
||||
|
@ -549,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()
|
||||
|
@ -573,7 +577,7 @@ export default {
|
|||
this.dataSource = data // 设置Infomation表格内容
|
||||
|
||||
this.stationList = [] // 台站列表
|
||||
markerList.forEach(markerItem => {
|
||||
markerList.forEach((markerItem) => {
|
||||
// 返回的数据类型不符合要求,根据stationId判断是否是台站,增加台站类型和转换字段,以便进行marker的绘制
|
||||
if (markerItem.stationId) {
|
||||
// 是台站
|
||||
|
@ -656,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) {
|
||||
|
@ -704,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) {
|
||||
|
@ -740,7 +744,8 @@ 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
|
||||
|
@ -748,16 +753,16 @@ export default {
|
|||
if (success) {
|
||||
// 如果从地图的Marker上点开,且点开的为已关注的台站,则把这个台站放到前面
|
||||
if (this.stationInfo) {
|
||||
result.sort(({ stationId }) => stationId == this.stationInfo.stationId? -1: 1) // chrome 和 firefox下表现不同,但都能将目标值排到第一个
|
||||
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,
|
||||
})
|
||||
})
|
||||
})
|
||||
|
@ -777,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>
|
||||
|
|
|
@ -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')
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user