Merge branch 'master-dev' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
f17ce2b03b
|
@ -4,20 +4,20 @@
|
|||
* data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除
|
||||
*/
|
||||
import { filterObj } from '@/utils/util';
|
||||
import { deleteAction, getAction,downFile,getFileAccessHttpUrl } from '@/api/manage'
|
||||
import { deleteAction, getAction, downFile, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
|
||||
import store from '@/store'
|
||||
|
||||
export const JeecgListMixin = {
|
||||
data(){
|
||||
data() {
|
||||
return {
|
||||
/* 查询条件-请不要在queryParam中声明非字符串值的属性 */
|
||||
queryParam: {},
|
||||
/* 数据源 */
|
||||
dataSource:[],
|
||||
dataSource: [],
|
||||
/* 分页参数 */
|
||||
ipagination:{
|
||||
ipagination: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
|
@ -30,22 +30,22 @@ export const JeecgListMixin = {
|
|||
total: 0
|
||||
},
|
||||
/* 排序参数 */
|
||||
isorter:{
|
||||
isorter: {
|
||||
column: 'createTime',
|
||||
order: 'desc',
|
||||
},
|
||||
/* 筛选参数 */
|
||||
filters: {},
|
||||
/* table加载状态 */
|
||||
loading:false,
|
||||
loading: false,
|
||||
/* table选中keys*/
|
||||
selectedRowKeys: [],
|
||||
/* table选中records*/
|
||||
selectionRows: [],
|
||||
/* 查询折叠 */
|
||||
toggleSearchStatus:false,
|
||||
toggleSearchStatus: false,
|
||||
/* 高级查询条件生效状态 */
|
||||
superQueryFlag:false,
|
||||
superQueryFlag: false,
|
||||
/* 高级查询条件 */
|
||||
superQueryParams: '',
|
||||
/** 高级查询拼接方式 */
|
||||
|
@ -53,80 +53,80 @@ export const JeecgListMixin = {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
if(!this.disableMixinCreated&&!this.isImmediate){
|
||||
console.log(' -- mixin created -- ')
|
||||
this.loadData();
|
||||
//初始化字典配置 在自己页面定义
|
||||
this.initDictConfig();
|
||||
}
|
||||
if (!this.disableMixinCreated) {
|
||||
console.log(' -- mixin created -- ')
|
||||
this.loadData();
|
||||
//初始化字典配置 在自己页面定义
|
||||
this.initDictConfig();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
//token header
|
||||
tokenHeader(){
|
||||
let head = {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)}
|
||||
tokenHeader() {
|
||||
let head = { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) }
|
||||
let tenantid = Vue.ls.get(TENANT_ID)
|
||||
if(tenantid){
|
||||
if (tenantid) {
|
||||
head['tenant-id'] = tenantid
|
||||
}
|
||||
return head;
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
methods: {
|
||||
loadData(arg) {
|
||||
if(!this.url.list){
|
||||
if (!this.url.list) {
|
||||
this.$message.error("请设置url.list属性!")
|
||||
return
|
||||
}
|
||||
//加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1;
|
||||
}
|
||||
this.onClearSelected()
|
||||
var params = this.getQueryParams();//查询条件
|
||||
this.loading = true;
|
||||
getAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
this.dataSource = res.result.records||res.result;
|
||||
if(res.result.total)
|
||||
{
|
||||
this.ipagination.total = res.result.total;
|
||||
}else{
|
||||
this.ipagination.total = 0;
|
||||
}
|
||||
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
}else{
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
//加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1;
|
||||
}
|
||||
this.onClearSelected()
|
||||
var params = this.getQueryParams();//查询条件
|
||||
this.loading = true;
|
||||
getAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
this.dataSource = res.result.records || res.result;
|
||||
if (res.result.total) {
|
||||
this.ipagination.total = res.result.total;
|
||||
} else {
|
||||
this.ipagination.total = 0;
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
initDictConfig(){
|
||||
initDictConfig() {
|
||||
console.log("--这是一个假的方法!")
|
||||
},
|
||||
handleSuperQuery(params, matchType) {
|
||||
//高级查询方法
|
||||
if(!params){
|
||||
this.superQueryParams=''
|
||||
if (!params) {
|
||||
this.superQueryParams = ''
|
||||
this.superQueryFlag = false
|
||||
}else{
|
||||
} else {
|
||||
this.superQueryFlag = true
|
||||
this.superQueryParams=JSON.stringify(params)
|
||||
this.superQueryParams = JSON.stringify(params)
|
||||
this.superQueryMatchType = matchType
|
||||
}
|
||||
this.loadData(1)
|
||||
},
|
||||
getQueryParams() {
|
||||
//获取查询条件
|
||||
console.log("this.queryParamthis.queryParam",this.queryParam);
|
||||
console.log("this.queryParamthis.queryParam", this.queryParam);
|
||||
let sqp = {}
|
||||
if(this.superQueryParams){
|
||||
sqp['superQueryParams']=encodeURI(this.superQueryParams)
|
||||
if (this.superQueryParams) {
|
||||
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
|
||||
sqp['superQueryMatchType'] = this.superQueryMatchType
|
||||
}
|
||||
var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters);
|
||||
param.field = this.getQueryField();
|
||||
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
|
||||
// param.field = this.getQueryField();
|
||||
param.field = this.isorter.column;
|
||||
param.pageNo = this.ipagination.current;
|
||||
param.pageSize = this.ipagination.pageSize;
|
||||
return filterObj(param);
|
||||
|
@ -163,7 +163,7 @@ export const JeecgListMixin = {
|
|||
this.loadData(1);
|
||||
},
|
||||
batchDel: function () {
|
||||
if(!this.url.deleteBatch){
|
||||
if (!this.url.deleteBatch) {
|
||||
this.$message.error("请设置url.deleteBatch属性!")
|
||||
return
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ export const JeecgListMixin = {
|
|||
content: "Do You Want To Delete This Item?",
|
||||
onOk: function () {
|
||||
that.loading = true;
|
||||
deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => {
|
||||
deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => {
|
||||
if (res.success) {
|
||||
//重新计算分页问题
|
||||
that.reCalculatePage(that.selectedRowKeys.length)
|
||||
|
@ -199,12 +199,12 @@ export const JeecgListMixin = {
|
|||
}
|
||||
},
|
||||
handleDelete: function (id, propertyName) {
|
||||
if(!this.url.delete){
|
||||
if (!this.url.delete) {
|
||||
this.$message.error("请设置url.delete属性!")
|
||||
return
|
||||
}
|
||||
var that = this;
|
||||
deleteAction(that.url.delete, {[propertyName || 'id']: id}).then((res) => {
|
||||
deleteAction(that.url.delete, { [propertyName || 'id']: id }).then((res) => {
|
||||
if (res.success) {
|
||||
//重新计算分页问题
|
||||
that.reCalculatePage(1)
|
||||
|
@ -215,16 +215,16 @@ export const JeecgListMixin = {
|
|||
}
|
||||
});
|
||||
},
|
||||
reCalculatePage(count){
|
||||
reCalculatePage(count) {
|
||||
//总数量-count
|
||||
let total=this.ipagination.total-count;
|
||||
let total = this.ipagination.total - count;
|
||||
//获取删除后的分页数
|
||||
let currentIndex=Math.ceil(total/this.ipagination.pageSize);
|
||||
let currentIndex = Math.ceil(total / this.ipagination.pageSize);
|
||||
//删除后的分页数<所在当前页
|
||||
if(currentIndex<this.ipagination.current){
|
||||
this.ipagination.current=currentIndex;
|
||||
if (currentIndex < this.ipagination.current) {
|
||||
this.ipagination.current = currentIndex;
|
||||
}
|
||||
console.log('currentIndex',currentIndex)
|
||||
console.log('currentIndex', currentIndex)
|
||||
},
|
||||
handleEdit: function (record) {
|
||||
this.$refs.modalForm.edit(record);
|
||||
|
@ -237,6 +237,7 @@ export const JeecgListMixin = {
|
|||
this.$refs.modalForm.disableSubmit = false;
|
||||
},
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
console.log("sortersorter", sorter);
|
||||
//分页、排序、筛选变化时触发
|
||||
//TODO 筛选
|
||||
console.log(pagination)
|
||||
|
@ -247,11 +248,11 @@ export const JeecgListMixin = {
|
|||
this.ipagination = pagination;
|
||||
this.loadData();
|
||||
},
|
||||
handleToggleSearch(){
|
||||
handleToggleSearch() {
|
||||
this.toggleSearchStatus = !this.toggleSearchStatus;
|
||||
},
|
||||
// 给popup查询使用(查询区域不支持回填多个字段,限制只返回一个字段)
|
||||
getPopupField(fields){
|
||||
getPopupField(fields) {
|
||||
return fields.split(',')[0]
|
||||
},
|
||||
modalFormOk() {
|
||||
|
@ -260,39 +261,39 @@ export const JeecgListMixin = {
|
|||
//清空列表选中
|
||||
this.onClearSelected()
|
||||
},
|
||||
handleDetail:function(record){
|
||||
handleDetail: function (record) {
|
||||
this.$refs.modalForm.edit(record);
|
||||
this.$refs.modalForm.title="Detail";
|
||||
this.$refs.modalForm.title = "Detail";
|
||||
this.$refs.modalForm.disableSubmit = true;
|
||||
},
|
||||
/* 导出 */
|
||||
handleExportXls2(){
|
||||
handleExportXls2() {
|
||||
let paramsStr = encodeURI(JSON.stringify(this.getQueryParams()));
|
||||
let url = `${window._CONFIG['domianURL']}/${this.url.exportXlsUrl}?paramsStr=${paramsStr}`;
|
||||
window.location.href = url;
|
||||
},
|
||||
handleExportXls(fileName){
|
||||
if(!fileName || typeof fileName != "string"){
|
||||
handleExportXls(fileName) {
|
||||
if (!fileName || typeof fileName != "string") {
|
||||
fileName = "导出文件"
|
||||
}
|
||||
let param = this.getQueryParams();
|
||||
if(this.selectedRowKeys && this.selectedRowKeys.length>0){
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
param['selections'] = this.selectedRowKeys.join(",")
|
||||
}
|
||||
console.log("导出参数",param)
|
||||
downFile(this.url.exportXlsUrl,param).then((data)=>{
|
||||
console.log("导出参数", param)
|
||||
downFile(this.url.exportXlsUrl, param).then((data) => {
|
||||
if (!data) {
|
||||
this.$message.warning("文件下载失败")
|
||||
return
|
||||
}
|
||||
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||
window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls')
|
||||
}else{
|
||||
let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'}))
|
||||
window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
|
||||
} else {
|
||||
let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
||||
let link = document.createElement('a')
|
||||
link.style.display = 'none'
|
||||
link.href = url
|
||||
link.setAttribute('download', fileName+'.xls')
|
||||
link.setAttribute('download', fileName + '.xls')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link); //下载完成移除元素
|
||||
|
@ -301,7 +302,7 @@ export const JeecgListMixin = {
|
|||
})
|
||||
},
|
||||
/* 导入 */
|
||||
handleImportExcel(info){
|
||||
handleImportExcel(info) {
|
||||
this.loading = true;
|
||||
if (info.file.status !== 'uploading') {
|
||||
console.log(info.file, info.fileList);
|
||||
|
@ -316,9 +317,9 @@ export const JeecgListMixin = {
|
|||
this.$warning({
|
||||
title: message,
|
||||
content: (<div>
|
||||
<span>{msg}</span><br/>
|
||||
<span>具体详情请 <a href={href} target="_blank" download={fileName}>点击下载</a> </span>
|
||||
</div>
|
||||
<span>{msg}</span><br />
|
||||
<span>具体详情请 <a href={href} target="_blank" download={fileName}>点击下载</a> </span>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
} else {
|
||||
|
@ -353,21 +354,21 @@ export const JeecgListMixin = {
|
|||
}
|
||||
},
|
||||
/* 图片预览 */
|
||||
getImgView(text){
|
||||
if(text && text.indexOf(",")>0){
|
||||
text = text.substring(0,text.indexOf(","))
|
||||
getImgView(text) {
|
||||
if (text && text.indexOf(",") > 0) {
|
||||
text = text.substring(0, text.indexOf(","))
|
||||
}
|
||||
return getFileAccessHttpUrl(text)
|
||||
},
|
||||
/* 文件下载 */
|
||||
// update--autor:lvdandan-----date:20200630------for:修改下载文件方法名uploadFile改为downloadFile------
|
||||
downloadFile(text){
|
||||
if(!text){
|
||||
downloadFile(text) {
|
||||
if (!text) {
|
||||
this.$message.warning("未知的文件")
|
||||
return;
|
||||
}
|
||||
if(text.indexOf(",")>0){
|
||||
text = text.substring(0,text.indexOf(","))
|
||||
if (text.indexOf(",") > 0) {
|
||||
text = text.substring(0, text.indexOf(","))
|
||||
}
|
||||
let url = getFileAccessHttpUrl(text)
|
||||
window.open(url);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<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%">
|
||||
<div style="height: 100%">
|
||||
<a-menu
|
||||
id="dddddd"
|
||||
:defaultOpenKeys="defaultOpenKeys"
|
||||
|
@ -97,53 +97,53 @@ 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')
|
||||
// console.log(openKeys);
|
||||
const selectedKeys = window.sessionStorage.getItem('currMenu_alarm')
|
||||
if (selectedKeys) {
|
||||
// this.defaultSelectedKeys.push(selectedKeys)
|
||||
this.currSlecteKey.push(selectedKeys)
|
||||
} else {
|
||||
|
||||
this.initDefaultKeys(this.menus[0])
|
||||
// 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) {
|
||||
// // 存在即赋值
|
||||
// this.defaultOpenKeys = JSON.parse(openKeys)
|
||||
// }
|
||||
// }
|
||||
// if (openKeys) {
|
||||
// // 存在即赋值
|
||||
// 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 }) {
|
||||
this.currSlecteKey =[]
|
||||
console.log(item, key, keyPath)
|
||||
this.currSlecteKey = []
|
||||
window.sessionStorage.setItem('currMenu_alarm', key)
|
||||
// var parentPath = item._props.parentMenu._props.eventKey;
|
||||
// var parentTitle = parentPath.substring(parentPath.lastIndexOf("/") + 1, parentPath.length)
|
||||
|
@ -155,8 +155,8 @@ export default {
|
|||
})
|
||||
},
|
||||
initDefaultKeys(data) {
|
||||
this.currSlecteKey=[]
|
||||
console.log("datadefaultOpenKeys",data);
|
||||
this.currSlecteKey = []
|
||||
console.log('datadefaultOpenKeys', data)
|
||||
this.defaultOpenKeys.push(data.path)
|
||||
data.children.some((f) => {
|
||||
if (f.children) {
|
||||
|
@ -192,7 +192,7 @@ export default {
|
|||
background: none;
|
||||
}
|
||||
}
|
||||
::v-deep .ant-card-body{
|
||||
::v-deep .ant-card-body {
|
||||
height: 100%;
|
||||
}
|
||||
.ant-menu {
|
||||
|
|
|
@ -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">
|
||||
|
@ -784,7 +784,12 @@ export default {
|
|||
channel,
|
||||
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,28 +37,35 @@ 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) {
|
||||
if (result) {
|
||||
this.content = result
|
||||
}
|
||||
} else {
|
||||
|
@ -78,42 +85,42 @@ export default {
|
|||
this.currTab = key
|
||||
},
|
||||
handleOk() {
|
||||
this.fileName=""
|
||||
let text = ""
|
||||
this.fileName = ''
|
||||
let text = ''
|
||||
if (this.currTab == 1) {
|
||||
text=this.content.sample.join('\n')
|
||||
text = this.content.sample.join('\n')
|
||||
} else if (this.currTab == 2) {
|
||||
text=this.content.gasBg.join('\n')
|
||||
}else if (this.currTab == 3) {
|
||||
text=this.content.detBg.join('\n')
|
||||
}else if (this.currTab == 4) {
|
||||
text=this.content.qc.join('\n')
|
||||
text = this.content.gasBg.join('\n')
|
||||
} else if (this.currTab == 3) {
|
||||
text = this.content.detBg.join('\n')
|
||||
} else if (this.currTab == 4) {
|
||||
text = this.content.qc.join('\n')
|
||||
}
|
||||
if (text) {
|
||||
let strData = new Blob([text], { type: 'text/plain;charset=utf-8' });
|
||||
if (text) {
|
||||
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,24 +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下表现不同,但都能将目标值排到第一个
|
||||
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,
|
||||
})
|
||||
})
|
||||
})
|
||||
|
@ -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>
|
||||
|
@ -821,7 +826,7 @@ export default {
|
|||
// 操作栏
|
||||
&-operators {
|
||||
user-select: none;
|
||||
pointer-events:all;
|
||||
pointer-events: all;
|
||||
height: 200px;
|
||||
|
||||
img {
|
||||
|
|
|
@ -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,16 +281,18 @@ export default {
|
|||
this.$message.success({ content: 'Loaded!', key, duration: 2 })
|
||||
}
|
||||
res.result.forEach((item) => {
|
||||
arr.forEach((el) => {
|
||||
if (
|
||||
parseInt(item.id) == el.stationId &&
|
||||
el.stationType != 'Nuclear Facility' &&
|
||||
el.stationType != 'NRL'
|
||||
) {
|
||||
item.stationType = el.stationType
|
||||
item.stationId = el.stationId
|
||||
}
|
||||
})
|
||||
if (Object.prototype.toString.call(item) == '[object Object]') {
|
||||
arr.forEach((el) => {
|
||||
if (
|
||||
parseInt(item.id) == el.stationId &&
|
||||
el.stationType != 'Nuclear Facility' &&
|
||||
el.stationType != 'NRL'
|
||||
) {
|
||||
item.stationType = el.stationType
|
||||
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