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

This commit is contained in:
nieziyan 2024-03-12 15:12:43 +08:00
commit 84cd9ffa35
11 changed files with 111 additions and 96 deletions

View File

@ -1,7 +1,7 @@
const sample = { const sample = {
state: { state: Object.freeze({
sampleList: [] // [{ inputFileName: String; data: Object; }] sampleList: [] // [{ inputFileName: String; data: Object; }]
}, }),
mutations: { mutations: {
SET_SAMPLE_LIST: (state, sampleList) => { SET_SAMPLE_LIST: (state, sampleList) => {
state.sampleList = sampleList state.sampleList = sampleList

View File

@ -15,11 +15,12 @@
:canSelect="false" :canSelect="false"
> >
<template slot="info" slot-scope="{ record }"> <template slot="info" slot-scope="{ record }">
<div class="info-alarm">{{ record.alarmValue }}{{ JSON.parse(record.operator).units }}</div> <a-popover>
<div> <template slot="content">
{{ JSON.parse(record.operator).name }} {{ JSON.parse(record.operator).operator }} {{ JSON.parse(record.alarmInfo) }}{{ JSON.parse(record.operator).units }}
{{ JSON.parse(record.operator).threshold }}{{ JSON.parse(record.operator).units }} </template>
</div> {{ JSON.parse(record.alarmInfo) }}{{ JSON.parse(record.operator).units }}
</a-popover>
</template> </template>
</custom-table> </custom-table>
</div> </div>
@ -91,6 +92,7 @@ const columns = [
{ {
title: 'ALARM INFO', title: 'ALARM INFO',
align: 'left', align: 'left',
ellipsis: true,
dataIndex: 'alarmInfo', dataIndex: 'alarmInfo',
scopedSlots: { scopedSlots: {
customRender: 'info', customRender: 'info',

View File

@ -41,6 +41,7 @@ export default {
pieData: [], pieData: [],
pieColors: ['#00bcd4', '#14b2a3', '#97b94b', '#47b55d'], pieColors: ['#00bcd4', '#14b2a3', '#97b94b', '#47b55d'],
pieTotal: 0, pieTotal: 0,
sourceChart: null,
} }
}, },
mounted() { mounted() {
@ -113,6 +114,8 @@ export default {
this.pieData = res.result.pieData this.pieData = res.result.pieData
this.pieTotal = res.result.pieTotal this.pieTotal = res.result.pieTotal
this.drawRightChart() this.drawRightChart()
} else {
this.sourceChart.clear()
} }
} else { } else {
this.$message.warning('This operation fails. Contact your system administrator') this.$message.warning('This operation fails. Contact your system administrator')
@ -247,7 +250,7 @@ export default {
}) })
}, },
drawRightChart() { drawRightChart() {
let myChart = echarts.init(document.getElementById('chartRight')) this.sourceChart = echarts.init(document.getElementById('chartRight'))
let options = { let options = {
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
@ -308,9 +311,9 @@ export default {
}, },
], ],
} }
myChart.setOption(options) this.sourceChart.setOption(options)
window.addEventListener('resize', function () { window.addEventListener('resize', function () {
myChart.resize() this.sourceChart.resize()
}) })
}, },
}, },

View File

@ -10,13 +10,15 @@
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:canSelect="false" :canSelect="false"
:scroll="{ y: 655 }"
> >
<template slot="info" slot-scope="{ record }"> <template slot="info" slot-scope="{ record }">
<div class="info-alarm">{{ record.alarmValue }}{{ JSON.parse(record.operator).units }}</div> <a-popover>
<div> <template slot="content">
{{ JSON.parse(record.operator).name }} {{ JSON.parse(record.operator).operator }} {{ JSON.parse(record.alarmInfo) }}{{ JSON.parse(record.operator).units }}
{{ JSON.parse(record.operator).threshold }}{{ JSON.parse(record.operator).units }} </template>
</div> {{ JSON.parse(record.alarmInfo) }}{{ JSON.parse(record.operator).units }}
</a-popover>
</template> </template>
</TableList> </TableList>
<a-pagination <a-pagination
@ -60,6 +62,7 @@ const columns = [
{ {
title: 'ALARM INFO', title: 'ALARM INFO',
align: 'left', align: 'left',
ellipsis: true,
dataIndex: 'alarmInfo', dataIndex: 'alarmInfo',
scopedSlots: { scopedSlots: {
customRender: 'info', customRender: 'info',
@ -162,7 +165,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.server-main { .server-main {
width: 100%; // width: 100%;
height: calc(100% - 50px); height: calc(100% - 50px);
overflow: hidden; overflow: hidden;
padding-top: 15px; padding-top: 15px;
@ -177,7 +180,7 @@ export default {
} }
.info-alarm { .info-alarm {
font-family: ArialMT; font-family: ArialMT;
font-size: 18px; font-size: 16px;
color: #f62424; // color: #f62424;
} }
</style> </style>

View File

@ -10,13 +10,15 @@
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:canSelect="false" :canSelect="false"
:scroll="{ y: 655 }"
> >
<template slot="info" slot-scope="{ record }"> <template slot="info" slot-scope="{ record }">
<div class="info-alarm">{{ record.alarmValue }}{{ JSON.parse(record.operator).units }}</div> <a-popover>
<div> <template slot="content">
{{ JSON.parse(record.operator).name }} {{ JSON.parse(record.operator).operator }} {{ JSON.parse(record.alarmInfo) }}{{ JSON.parse(record.operator).units }}
{{ JSON.parse(record.operator).threshold }}{{ JSON.parse(record.operator).units }} </template>
</div> {{ JSON.parse(record.alarmInfo) }}{{ JSON.parse(record.operator).units }}
</a-popover>
</template> </template>
</TableList> </TableList>
<a-pagination <a-pagination
@ -60,6 +62,7 @@ const columns = [
{ {
title: 'ALARM INFO', title: 'ALARM INFO',
align: 'left', align: 'left',
ellipsis: true,
dataIndex: 'alarmInfo', dataIndex: 'alarmInfo',
scopedSlots: { scopedSlots: {
customRender: 'info', customRender: 'info',
@ -162,7 +165,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.server-main { .server-main {
width: 100%; // width: 100%;
height: calc(100% - 50px); height: calc(100% - 50px);
overflow: hidden; overflow: hidden;
padding-top: 15px; padding-top: 15px;

View File

@ -10,13 +10,15 @@
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:canSelect="false" :canSelect="false"
:scroll="{ y: 655 }"
> >
<template slot="info" slot-scope="{ record }"> <template slot="info" slot-scope="{ record }">
<div class="info-alarm">{{ record.alarmValue }}{{ JSON.parse(record.operator).units }}</div> <a-popover>
<div> <template slot="content">
{{ JSON.parse(record.operator).name }} {{ JSON.parse(record.operator).operator }} {{ JSON.parse(record.alarmInfo) }}{{ JSON.parse(record.operator).units }}
{{ JSON.parse(record.operator).threshold }}{{ JSON.parse(record.operator).units }} </template>
</div> {{ JSON.parse(record.alarmInfo) }}{{ JSON.parse(record.operator).units }}
</a-popover>
</template> </template>
</TableList> </TableList>
<a-pagination <a-pagination
@ -60,6 +62,7 @@ const columns = [
{ {
title: 'ALARM INFO', title: 'ALARM INFO',
align: 'left', align: 'left',
ellipsis: true,
dataIndex: 'alarmInfo', dataIndex: 'alarmInfo',
scopedSlots: { scopedSlots: {
customRender: 'info', customRender: 'info',
@ -162,7 +165,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.server-main { .server-main {
width: 100%; // width: 100%;
height: calc(100% - 50px); height: calc(100% - 50px);
overflow: hidden; overflow: hidden;
padding-top: 15px; padding-top: 15px;

View File

@ -307,8 +307,8 @@ export default {
const { dbName, sampleId, inputFileName, analyst } = this.sample const { dbName, sampleId, inputFileName, analyst } = this.sample
try { try {
this.isLoading = true
this.cancelLastRequest() this.cancelLastRequest()
this.isLoading = true
const cancelToken = this.createCancelToken() const cancelToken = this.createCancelToken()
const { success, result, message } = await getAction( const { success, result, message } = await getAction(
'/spectrumAnalysis/getDBSpectrumChart', '/spectrumAnalysis/getDBSpectrumChart',
@ -320,6 +320,7 @@ export default {
cancelToken cancelToken
) )
if (success) { if (success) {
this.isLoading = false
this.sampleDetail = result this.sampleDetail = result
this.changeChartByType('sample') this.changeChartByType('sample')
this.emitGetFiles(result) this.emitGetFiles(result)
@ -334,9 +335,11 @@ export default {
} }
} catch (error) { } catch (error) {
console.error(error) console.error(error)
} finally { const isCancel = axios.isCancel(error)
if(!isCancel) {
this.isLoading = false this.isLoading = false
} }
}
}, },
emitGetFiles(result) { emitGetFiles(result) {
@ -356,8 +359,8 @@ export default {
qcFileName: this.sample.qcFileStatus ? this.sample.qcFileName : '', qcFileName: this.sample.qcFileStatus ? this.sample.qcFileName : '',
} }
try { try {
this.isLoading = true
this.cancelLastRequest() this.cancelLastRequest()
this.isLoading = true
const cancelToken = this.createCancelToken() const cancelToken = this.createCancelToken()
const { success, result, message } = await getAction( const { success, result, message } = await getAction(
'/spectrumAnalysis/getFileSpectrumChart', '/spectrumAnalysis/getFileSpectrumChart',
@ -379,12 +382,17 @@ export default {
} }
} catch (error) { } catch (error) {
console.error(error) console.error(error)
const isCancel = axios.isCancel(error)
if(!isCancel) {
this.isLoading = false
}
} }
}, },
cancelLastRequest() { cancelLastRequest() {
if (this._cancelToken && typeof this._cancelToken == 'function') { if (this._cancelToken && typeof this._cancelToken == 'function') {
this._cancelToken() this._cancelToken()
this._cancelToken = undefined
} }
}, },
@ -653,6 +661,8 @@ export default {
this.resultDisplay = [] this.resultDisplay = []
const sampleData = await this.$store.dispatch('GET_SAMPLE_DATA', newVal.inputFileName) const sampleData = await this.$store.dispatch('GET_SAMPLE_DATA', newVal.inputFileName)
if (sampleData) { if (sampleData) {
this.cancelLastRequest()
this.isLoading = false
const { data, from } = sampleData const { data, from } = sampleData
this.sampleDetail = data this.sampleDetail = data
this.changeChartByType('sample') this.changeChartByType('sample')

View File

@ -163,6 +163,36 @@ export default {
StripModal, StripModal,
}, },
data() { data() {
this.channelData = {
peakGroup: [],
spectrumLine: null,
baseLine: null,
lcLine: null,
scacLine: null,
all: null,
baseLineCP: [],
compareLine: null,
stripSumOrCutLine: null,
stripReferenceLine: null,
}
this.energyData = {
peakGroup: [],
spectrumLine: null,
baseLine: null,
lcLine: null,
scacLine: null,
all: null,
baseLineCP: [],
compareLine: null,
stripSumOrCutLine: null,
stripReferenceLine: null,
}
;(this.peakList = []), // Peak
(this.baseCtrls = {}) // BaseCtrls
return { return {
abc: false, abc: false,
isLoading: false, isLoading: false,
@ -183,35 +213,6 @@ export default {
qcFlagsVisible: false, qcFlagsVisible: false,
}, },
channelData: {
peakGroup: [],
spectrumLine: null,
baseLine: null,
lcLine: null,
scacLine: null,
all: null,
baseLineCP: [],
compareLine: null,
stripSumOrCutLine: null,
stripReferenceLine: null,
},
energyData: {
peakGroup: [],
spectrumLine: null,
baseLine: null,
lcLine: null,
scacLine: null,
all: null,
baseLineCP: [],
compareLine: null,
stripSumOrCutLine: null,
stripReferenceLine: null,
},
peakList: [], // Peak
baseCtrls: {}, // BaseCtrls
nuclideLibraryList: [], // channel nuclideLibraryList: [], // channel
peakInfomationTooltip: { peakInfomationTooltip: {
// Peak Infomation // Peak Infomation
@ -251,6 +252,8 @@ export default {
window.addEventListener('keydown', this.handleKeyboardEvent) window.addEventListener('keydown', this.handleKeyboardEvent)
window.addEventListener('click', this.closePeakInfomationTooltip) window.addEventListener('click', this.closePeakInfomationTooltip)
console.log('%c [ this.channelData ]-256', 'font-size:13px; background:#e2a49d; color:#ffe8e1;', this.channelData)
}, },
destroyed() { destroyed() {
this.cancelLastRequest() this.cancelLastRequest()
@ -502,9 +505,9 @@ export default {
async getSampleDetail() { async getSampleDetail() {
const { dbName, sampleId, analyst } = this.sample const { dbName, sampleId, analyst } = this.sample
try { try {
this.isLoading = true
// const { success, result, message } = Response // const { success, result, message } = Response
this.cancelLastRequest() this.cancelLastRequest()
this.isLoading = true
const cancelToken = this.createCancelToken() const cancelToken = this.createCancelToken()
const { success, result, message } = await getAction( const { success, result, message } = await getAction(
@ -516,7 +519,6 @@ export default {
}, },
cancelToken cancelToken
) )
console.log('%c [ result ]-243', 'font-size:13px; background:pink; color:#bf2c9f;', result)
if (success) { if (success) {
this.dataProcess(result, 'db') this.dataProcess(result, 'db')
} else { } else {
@ -535,10 +537,9 @@ export default {
async getSampleDetail_file() { async getSampleDetail_file() {
const { inputFileName: fileName } = this.sample const { inputFileName: fileName } = this.sample
try { try {
this.isLoading = true
// const { success, result, message } = Response // const { success, result, message } = Response
this.cancelLastRequest() this.cancelLastRequest()
this.isLoading = true
const cancelToken = this.createCancelToken() const cancelToken = this.createCancelToken()
const { success, result, message } = await getAction( const { success, result, message } = await getAction(
@ -548,7 +549,6 @@ export default {
}, },
cancelToken cancelToken
) )
console.log('%c [ result ]-243', 'font-size:13px; background:pink; color:#bf2c9f;', result)
if (success) { if (success) {
this.dataProcess(result, 'file') this.dataProcess(result, 'file')
} else { } else {
@ -557,8 +557,11 @@ export default {
} }
} catch (error) { } catch (error) {
console.error(error) console.error(error)
const isCancel = axios.isCancel(error)
if (!isCancel) {
this.isLoading = false this.isLoading = false
} }
}
}, },
cancelLastRequest() { cancelLastRequest() {
@ -658,6 +661,8 @@ export default {
baseLineCP: shapeEnergyData, baseLineCP: shapeEnergyData,
} }
console.log('%c [ this.channelData ]-664', 'font-size:13px; background:#9bcb26; color:#dfff6a;', this.channelData)
this.resetThumbnailChartDataMax() this.resetThumbnailChartDataMax()
// Spectrum Line // Spectrum Line
@ -2190,5 +2195,6 @@ export default {
pointer-events: none; pointer-events: none;
background-color: #55a9fe; background-color: #55a9fe;
border-color: #55a9fe; border-color: #55a9fe;
user-select: none;
} }
</style> </style>

View File

@ -642,7 +642,6 @@ export default {
// //
async loadSelectedSample(sample) { async loadSelectedSample(sample) {
console.log('%c [ sample ]-381', 'font-size:13px; background:pink; color:red;', sample)
// Bbeta-gamma P Ggamma // Bbeta-gamma P Ggamma
if (sample.sampleType == 'B') { if (sample.sampleType == 'B') {
this.analysisType = ANALYZE_TYPE.BETA_GAMMA this.analysisType = ANALYZE_TYPE.BETA_GAMMA

View File

@ -169,18 +169,16 @@
<div class="route-form-item"> <div class="route-form-item">
<div class="label">Start Date</div> <div class="label">Start Date</div>
<custom-date-picker <custom-date-picker
show-time format="YYYY-MM-DD"
format="YYYY/MM/DD HH:mm:ss" valueFormat="YYYY-MM-DD"
valueFormat="YYYY/MM/DD HH:mm:ss"
v-model="routeParams.startDate" v-model="routeParams.startDate"
></custom-date-picker> ></custom-date-picker>
</div> </div>
<div class="route-form-item"> <div class="route-form-item">
<div class="label">End Date</div> <div class="label">End Date</div>
<custom-date-picker <custom-date-picker
show-time format="YYYY-MM-DD"
format="YYYY/MM/DD HH:mm:ss" valueFormat="YYYY-MM-DD"
valueFormat="YYYY/MM/DD HH:mm:ss"
v-model="routeParams.endDate" v-model="routeParams.endDate"
></custom-date-picker> ></custom-date-picker>
</div> </div>

View File

@ -183,19 +183,6 @@ export default {
ScrollContainer, ScrollContainer,
DataListItem, DataListItem,
}, },
watch: {
$route: {
handler: function (val, oldVal) {
console.log('fasdfasde12312', val)
console.log('8765432', oldVal)
if (val.name === 'station-operation') {
this.getDataProvisionEfficiency(this.markerList_clone)
}
},
deep: true,
// immediate: true,
},
},
deactivated() { deactivated() {
// //
console.log('切换出发了3') console.log('切换出发了3')
@ -205,6 +192,8 @@ export default {
}, },
activated() { activated() {
this.getFollowedStationList() this.getFollowedStationList()
this.getStationList()
this.getStationTree()
}, },
data() { data() {
return { return {
@ -246,9 +235,7 @@ export default {
} }
}, },
created() { created() {
this.getStationList()
this.getStationTypeList() this.getStationTypeList()
this.getStationTree()
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.timer) clearInterval(this.timer)
@ -270,7 +257,7 @@ export default {
this.markerList = cloneDeep(res).filter((stationInfo) => stationInfo.stationType !== MarkerType.NuclearFacility) // this.markerList = cloneDeep(res).filter((stationInfo) => stationInfo.stationType !== MarkerType.NuclearFacility) //
this.markerList_clone = cloneDeep(res) this.markerList_clone = cloneDeep(res)
this.getDataProvisionEfficiency(this.markerList_clone, 'one') this.getDataProvisionEfficiency(this.markerList_clone)
// this.timer = setInterval(() => { // this.timer = setInterval(() => {
// setTimeout(() => { // setTimeout(() => {
// this.getDataProvisionEfficiency(this.markerList_clone) // this.getDataProvisionEfficiency(this.markerList_clone)
@ -287,17 +274,18 @@ export default {
}, },
// //
async getDataProvisionEfficiency(arr, str) { async getDataProvisionEfficiency(arr) {
this.httpNum++ this.httpNum++
if (str && this.$route.path == '/station-operation') { if (!this.loaded && this.$route.path == '/station-operation') {
this.$message.loading({ content: 'Loading station data, please wait...', key, duration: 0 }) this.$message.loading({ content: 'Loading station data, please wait...', key, duration: 0 })
} }
getAction('/stationOperation/getDataProvisionEfficiency') getAction('/stationOperation/getDataProvisionEfficiency')
.then((res) => { .then((res) => {
if (res.success) { if (res.success) {
this.$message.destroy() this.$message.destroy()
if (str && this.$route.path == '/station-operation') { if (!this.loaded && this.$route.path == '/station-operation') {
this.$message.success({ content: 'Loaded!', key, duration: 2 }) this.$message.success({ content: 'Loaded!', key, duration: 2 })
this.loaded = true
} }
res.result.forEach((item) => { res.result.forEach((item) => {
if (Object.prototype.toString.call(item) == '[object Object]') { if (Object.prototype.toString.call(item) == '[object Object]') {