gamma功能的configureSave接口 增加 applyAll字段

Reprocessing all 请求接口的时候改为依次调用分析接口
分析全部需要隐藏单个文件的进度弹窗;
分析全部的时候增加进度条弹窗;
beta的Statistics功能模块增加一个字段 xeResultFlag
This commit is contained in:
任珮宇 2023-11-16 18:19:24 +08:00
parent f6450af8b2
commit 709a0c069a
5 changed files with 153 additions and 50 deletions

View File

@ -177,6 +177,7 @@ export default {
dateTime_Conc, dateTime_Conc,
checkBox_updateCal, checkBox_updateCal,
checkBox_keepPeak, checkBox_keepPeak,
group_calPS,
} = this.model } = this.model
const param = { const param = {
@ -196,6 +197,7 @@ export default {
refTime_conc: dateTime_Conc, refTime_conc: dateTime_Conc,
updateCalibration: checkBox_updateCal, updateCalibration: checkBox_updateCal,
keepCalPeakSearchPeaks: checkBox_keepPeak, keepCalPeakSearchPeaks: checkBox_keepPeak,
applyAll: group_calPS || false,
} }
const { success, message } = await postAction('/gamma/configureSave', param) const { success, message } = await postAction('/gamma/configureSave', param)

View File

@ -61,7 +61,7 @@
<template slot="title"> <template slot="title">
<a-checkbox v-model="queryParams.filterGrpbox">Filter</a-checkbox> <a-checkbox v-model="queryParams.filterGrpbox">Filter</a-checkbox>
</template> </template>
<a-checkbox :disabled="filterDisabled">Xe Result Flag</a-checkbox> <a-checkbox :disabled="filterDisabled" v-model="queryParams.xeResFlag">Xe Result Flag</a-checkbox>
<!-- 配置详情 --> <!-- 配置详情 -->
<div class="filter-options"> <div class="filter-options">
<div class="filter-option"> <div class="filter-option">
@ -157,7 +157,7 @@ const initialOption = {
right: 10, right: 10,
left: 40, left: 40,
top: 20, top: 20,
bottom: 60 bottom: 60,
}, },
legend: { legend: {
show: false, show: false,
@ -166,62 +166,62 @@ const initialOption = {
right: 20, right: 20,
z: 999, z: 999,
textStyle: { textStyle: {
color: '#fff' color: '#fff',
}, },
backgroundColor: '#022024', backgroundColor: '#022024',
borderColor: '#0b8c82', borderColor: '#0b8c82',
borderWidth: 1, borderWidth: 1,
itemWidth: 50 itemWidth: 50,
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: 'rgba(119, 181, 213, .3)' color: 'rgba(119, 181, 213, .3)',
} },
}, },
axisLabel: { axisLabel: {
color: '#ade6ee', color: '#ade6ee',
fontSize: 12, fontSize: 12,
rotate: 45, rotate: 45,
margin: 10, margin: 10,
formatter: value => { formatter: (value) => {
return moment(value).format('YYYY/MM/DD') return moment(value).format('YYYY/MM/DD')
}, },
interval: 4 interval: 4,
}, },
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
color: 'rgba(119, 181, 213, .3)' color: 'rgba(119, 181, 213, .3)',
} },
}, },
axisTick: { axisTick: {
show: false show: false,
}, },
data: [] data: [],
}, },
yAxis: { yAxis: {
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: 'rgba(119, 181, 213, .3)' color: 'rgba(119, 181, 213, .3)',
} },
}, },
axisLabel: { axisLabel: {
color: '#ade6ee', color: '#ade6ee',
fontSize: 12 fontSize: 12,
}, },
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
color: 'rgba(119, 181, 213, .3)' color: 'rgba(119, 181, 213, .3)',
} },
}, },
axisTick: { axisTick: {
show: false show: false,
} },
}, },
series: [] series: [],
} }
// //
@ -244,7 +244,7 @@ const initialFilterOption = {
xeVolumeLine: 0.87, xeVolumeLine: 0.87,
mdcLine: 0, mdcLine: 0,
concLine: 0, concLine: 0,
nuclidesList: [] nuclidesList: [],
} }
export default { export default {
components: { TitleOverBorder, CustomChart }, components: { TitleOverBorder, CustomChart },
@ -254,8 +254,10 @@ export default {
option: cloneDeep(initialOption), option: cloneDeep(initialOption),
initialMDC: {}, // initialMDC: {}, //
queryParams: {}, queryParams: {
detectorList: [] // xeResFlag: false,
},
detectorList: [], //
} }
}, },
methods: { methods: {
@ -265,7 +267,7 @@ export default {
const { sampleId, inputFileName: sampleFileName } = this.sampleData const { sampleId, inputFileName: sampleFileName } = this.sampleData
const { success, message, result } = await getAction('/spectrumAnalysis/viewMDC', { const { success, message, result } = await getAction('/spectrumAnalysis/viewMDC', {
sampleId, sampleId,
sampleFileName sampleFileName,
}) })
if (success) { if (success) {
this.setStationAndDetector(result) this.setStationAndDetector(result)
@ -303,7 +305,7 @@ export default {
this.queryParams.stationName = stationName this.queryParams.stationName = stationName
this.detectorList = detectorList.map(({ detectorCode, detectorId }) => ({ this.detectorList = detectorList.map(({ detectorCode, detectorId }) => ({
label: detectorCode, label: detectorCode,
value: detectorId || '' value: detectorId || '',
})) }))
this.queryParams.detectorName = detectorList[0].detectorCode this.queryParams.detectorName = detectorList[0].detectorCode
this.queryParams.detectorId = detectorList[0].detectorId || '' this.queryParams.detectorId = detectorList[0].detectorId || ''
@ -315,7 +317,7 @@ export default {
this.queryParams.stationName = this.initialMDC.stationName this.queryParams.stationName = this.initialMDC.stationName
this.detectorList = this.initialMDC.detectorList.map(({ detectorCode, detectorId }) => ({ this.detectorList = this.initialMDC.detectorList.map(({ detectorCode, detectorId }) => ({
label: detectorCode, label: detectorCode,
value: detectorId || '' value: detectorId || '',
})) }))
}, },
@ -327,29 +329,28 @@ export default {
} }
try { try {
const find = this.detectorList.find(item => item.value == this.queryParams.detectorId) const find = this.detectorList.find((item) => item.value == this.queryParams.detectorId)
const { success, message, result } = await postAction('/spectrumAnalysis/statisticsQuery', { const { success, message, result } = await postAction('/spectrumAnalysis/statisticsQuery', {
detectorCode: find? find.label: '', detectorCode: find ? find.label : '',
...this.queryParams ...this.queryParams,
}) })
if (success) { if (success) {
if (result) { if (result) {
this.option.xAxis.data = result[0].m_Keys this.option.xAxis.data = result[0].m_Keys
this.option.legend.show = true this.option.legend.show = true
this.option.series = result.map(item => { this.option.series = result.map((item) => {
return { return {
type: 'line', type: 'line',
name: item.m_strGraphName, name: item.m_strGraphName,
data: item.m_Values, data: item.m_Values,
itemStyle: { itemStyle: {
color: item.m_GraphPen color: item.m_GraphPen,
}, },
lineStyle: { lineStyle: {
color: item.m_GraphPen color: item.m_GraphPen,
}, },
symbol: 'circle' symbol: 'circle',
} }
}) })
} else { } else {
@ -375,17 +376,17 @@ export default {
this.queryParams = { this.queryParams = {
...initialFilterOption, ...initialFilterOption,
startTime: moment().format('YYYY-MM-DD'), startTime: moment().format('YYYY-MM-DD'),
endTime: moment().format('YYYY-MM-DD') endTime: moment().format('YYYY-MM-DD'),
} }
this.option = cloneDeep(initialOption) this.option = cloneDeep(initialOption)
} },
}, },
computed: { computed: {
filterDisabled() { filterDisabled() {
return !this.queryParams.filterGrpbox return !this.queryParams.filterGrpbox
} },
} },
} }
</script> </script>

View File

@ -0,0 +1,48 @@
<template>
<custom-modal v-model="visible" centered :width="420" title="Processing Monitor" class="processing-monitor">
<div class="processing-monitor-content">
<div class="processing-monitor-content-bar" :style="{ width: `${350 * percent}px` }">
<span class="processing-monitor-content-bar-percent">{{ percent * 100 }}%</span>
</div>
</div>
<div style="margin-top: 15px; font-size: 12px">{{ analysedFileName[0] }}</div>
<div slot="custom-footer">
<a-button @click="visible = false">Cancel</a-button>
</div>
</custom-modal>
</template>
<script>
import ModalMixin from '@/mixins/ModalMixin'
export default {
mixins: [ModalMixin],
props: {
percent: {
type: Number,
},
analysedFileName: {
type: Array,
},
},
}
</script>
<style lang="less" scoped>
.processing-monitor {
&-content {
width: 350px;
height: 16px;
background: url(~@/assets/images/abnormalAlarm/green-bg.png) repeat;
&-bar {
position: relative;
height: 100%;
background: url(~@/assets/images/abnormalAlarm/green.png) repeat;
&-percent {
position: absolute;
right: -10px;
top: -1px;
}
}
}
}
</style>

View File

@ -1534,9 +1534,10 @@ export default {
try { try {
this.isLoading = true this.isLoading = true
const str = `&processKey=${userId}_${this.timerStamp}`
const { inputFileName: fileName } = this.sample const { inputFileName: fileName } = this.sample
const { success, result, message } = await postAction( const { success, result, message } = await postAction(
`/gamma/Reprocessing?fileName=${fileName}&processKey=${userId}_${this.timerStamp}` `/gamma/Reprocessing?fileName=${fileName}${showMessage ? str : ''}`
) )
if (success) { if (success) {
this.reprocessingModalVisible = false //便 ws this.reprocessingModalVisible = false //便 ws
@ -1546,6 +1547,7 @@ export default {
this.handleResetState() this.handleResetState()
result.DetailedInformation = this.detailedInfomation result.DetailedInformation = this.detailedInfomation
this.dataProcess(result) this.dataProcess(result)
return success
} else { } else {
this.isLoading = false this.isLoading = false
if (showMessage) { if (showMessage) {

View File

@ -93,6 +93,13 @@
@senInfo="getUpdateFlag" @senInfo="getUpdateFlag"
/> />
<!-- 分析-设置弹窗结束 --> <!-- 分析-设置弹窗结束 -->
<!-- 全部分析-进度弹窗开始 -->
<processing-monitor-modal
v-model="analyzeAllModalVisible"
:percent="percentBar"
:analysedFileName="analysedFileName"
/>
<!-- 全部分析-进度弹窗结束 -->
<!-- 分析工具弹窗开始 --> <!-- 分析工具弹窗开始 -->
<analyze-interactive-tool-modal <analyze-interactive-tool-modal
@ -224,6 +231,7 @@ import NuclideActivityAndMdcModal from './components/Modals/NuclideActivityAndMD
import MultiLevelMenu from './components/MultiLevelMenu.vue' import MultiLevelMenu from './components/MultiLevelMenu.vue'
import SaveSettingModal from './components/Modals/SaveSettingModal.vue' import SaveSettingModal from './components/Modals/SaveSettingModal.vue'
import AnalyzeSettingModal from './components/Modals/AnalyzeSettingModal.vue' import AnalyzeSettingModal from './components/Modals/AnalyzeSettingModal.vue'
import ProcessingMonitorModal from './components/Modals/ProcessingMonitorModal.vue'
import AnalyzeInteractiveToolModal from './components/Modals/AnalyzeInteractiveToolModal/index.vue' import AnalyzeInteractiveToolModal from './components/Modals/AnalyzeInteractiveToolModal/index.vue'
import KorsumModal from './components/Modals/KorsumModal.vue' import KorsumModal from './components/Modals/KorsumModal.vue'
import ZeroTimeModal from './components/Modals/ZeroTimeModal.vue' import ZeroTimeModal from './components/Modals/ZeroTimeModal.vue'
@ -275,6 +283,7 @@ export default {
MultiLevelMenu, MultiLevelMenu,
SaveSettingModal, SaveSettingModal,
AnalyzeSettingModal, AnalyzeSettingModal,
ProcessingMonitorModal,
AnalyzeInteractiveToolModal, AnalyzeInteractiveToolModal,
KorsumModal, KorsumModal,
ZeroTimeModal, ZeroTimeModal,
@ -333,6 +342,7 @@ export default {
saveSettingModalVisible: false, // saveSettingModalVisible: false, //
analyzeConfigureModalVisible: false, // analyzeConfigureModalVisible: false, //
analyzeAllModalVisible: false, //
analyzeInteractiveToolModalVisible: false, // analyzeInteractiveToolModalVisible: false, //
zeroTimeModalVisible: false, // Zero Time zeroTimeModalVisible: false, // Zero Time
korsumModalShow: false, // Korsum korsumModalShow: false, // Korsum
@ -413,6 +423,10 @@ export default {
colorConfig: {}, // colorConfig: {}, //
sampleInfo: {}, sampleInfo: {},
gammaSampleNum: 0,
finishCont: 0,
percentBar: 0,
analysedFileName: '', //
} }
}, },
created() { created() {
@ -780,23 +794,59 @@ export default {
}, },
handleReprocessAll() { handleReprocessAll() {
this.analyzeAllModalVisible = true
const { inputFileName, sampleType } = this.sampleData const { inputFileName, sampleType } = this.sampleData
// gamma list
const gammaSampleList = this.sampleList.filter((sample) => sample.sampleType !== 'B')
this.gammaSampleNum = gammaSampleList.length
const gammaInputFileNames = gammaSampleList.map((item) => item.inputFileName)
// if (gammaInputFileNames.length > 0) {
const otherSampleList = this.sampleList.filter((sample) => sample.inputFileName !== inputFileName) this.fetchReprocessing(gammaInputFileNames, inputFileName, sampleType)
}
const betaSamples = otherSampleList.filter((sample) => sample.sampleType == 'B') // //
const gammaSamples = otherSampleList.filter((sample) => sample.sampleType !== 'B') // const otherSampleList = this.sampleList.filter((sample) => sample.inputFileName !== inputFileName)
gammaSamples.forEach((gammaSample) => {
postAction(`/gamma/Reprocessing?fileName=${gammaSample.inputFileName}`)
})
// reprocessing // const betaSamples = otherSampleList.filter((sample) => sample.sampleType == 'B')
if (inputFileName && sampleType !== 'B') { // const gammaSamples = otherSampleList.filter((sample) => sample.sampleType !== 'B')
this.$refs.gammaAnalysisRef.reProcessing(false) // gammaSamples.forEach((gammaSample) => {
// postAction(`/gamma/Reprocessing?fileName=${gammaSample.inputFileName}`)
// })
// // reprocessing
// if (inputFileName && sampleType !== 'B') {
// this.$refs.gammaAnalysisRef.reProcessing(false)
// }
},
async fetchReprocessing(fileNames, currFileName, sampleType) {
if (fileNames[0] == currFileName && sampleType !== 'B') {
this.$refs.gammaAnalysisRef.reProcessing(false).then((res) => {
if (res) {
this.finishCont++
this.percentBar = this.finishCont / this.gammaSampleNum
this.analysedFileName = fileNames.splice(0, 1)
if (fileNames.length > 0) {
this.fetchReprocessing(fileNames, currFileName, sampleType)
}
}
})
} else {
try {
const { success, result, message } = await postAction(`/gamma/Reprocessing?fileName=${fileNames[0]}`)
if (success) {
this.finishCont++
this.percentBar = this.finishCont / this.gammaSampleNum
this.analysedFileName = fileNames.splice(0, 1)
if (fileNames.length > 0) {
this.fetchReprocessing(fileNames, currFileName, sampleType)
}
}
} catch (error) {
console.error(error)
}
} }
}, },
// Comments // Comments
handleViewComments() { handleViewComments() {
// gamma // gamma