Merge branch 'feature-spectrum-analysis' into feature-analysis-RLR-renpy
# Conflicts: # src/views/spectrumAnalysis/gamma-analysis.vue
This commit is contained in:
commit
76c46d54cc
33
src/utils/file.js
Normal file
33
src/utils/file.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
import { Modal } from 'ant-design-vue'
|
||||
import { saveAs } from 'file-saver'
|
||||
|
||||
/**
|
||||
* 弹窗填入文件名保存文件
|
||||
* @param {Blob} data 数据
|
||||
* @param {string} ext 扩展名,不带.
|
||||
*/
|
||||
export const showSaveFileModal = (data, ext) => {
|
||||
let fileName = ''
|
||||
const handleClick = event => {
|
||||
fileName = event.target.value
|
||||
}
|
||||
|
||||
Modal.confirm({
|
||||
title: 'Please enter file name',
|
||||
content: h => <a-input onChange={handleClick} />,
|
||||
okText: 'Cancle',
|
||||
cancelText: 'Save',
|
||||
okButtonProps: { style: { backgroundColor: '#b98326', color: '#fff', borderColor: 'transparent' } },
|
||||
cancelButtonProps: { style: { color: '#fff', backgroundColor: '#31aab0', borderColor: 'transparent' } },
|
||||
onOk() {
|
||||
console.log('Cancel')
|
||||
},
|
||||
onCancel() {
|
||||
if (fileName) {
|
||||
saveAs(data, `${fileName}.${ext}`)
|
||||
} else {
|
||||
throw new Error()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
|
@ -159,6 +159,9 @@ export default {
|
|||
props: {
|
||||
channel: {
|
||||
type: Number
|
||||
},
|
||||
nuclide: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -265,13 +268,17 @@ export default {
|
|||
}
|
||||
|
||||
this.handleResData(result)
|
||||
this.isLoading = false
|
||||
|
||||
if (this.nuclide && this.nuclideList.length) {
|
||||
this.currNuclide = this.nuclide
|
||||
this.getInfoByNuclide()
|
||||
}
|
||||
} else {
|
||||
this.$message.error(message)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
this.isLoading = false
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -307,7 +314,6 @@ export default {
|
|||
fileName: inputFileName
|
||||
})
|
||||
if (success) {
|
||||
console.log('%c [ ]-301', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
||||
const { chart, halfLife, halfLifeErr, lines, name, table } = result
|
||||
|
||||
this.info = {
|
||||
|
|
|
@ -1317,6 +1317,7 @@ export default {
|
|||
const [xPixel] = chart.convertToPixel('grid', [xAxis, yAxis])
|
||||
// 保持x轴不变
|
||||
this.position[0] = xPixel
|
||||
this.redrawBaseLine()
|
||||
},
|
||||
ondragend: ({ offsetY }) => {
|
||||
this.setGraphicDraggable(false)
|
||||
|
@ -1348,6 +1349,11 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
// 重新生成基线
|
||||
redrawBaseLine() {
|
||||
console.log('%c [ 重新生成基线 ]-1355', 'font-size:13px; background:pink; color:#bf2c9f;', )
|
||||
},
|
||||
|
||||
// 根据数据绘制 + 号
|
||||
buildGraphicPlusByData() {
|
||||
this.option.graphic[1].children.forEach(item => {
|
||||
|
|
|
@ -41,7 +41,11 @@ export default {
|
|||
const res = await getAction(this.type == 1 ? '/gamma/viewAutomaticAnalysisLog' : '/gamma/viewAutomaticAnalysisLog', { // 自动分析日志接口暂用都是gammam,beta暂时没有
|
||||
sampleId
|
||||
})
|
||||
this.content = ""
|
||||
if(typeof res == 'string') {
|
||||
this.content = res
|
||||
} else if(typeof res == 'object') {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
|
||||
<div class="config-user-library-btns">
|
||||
<div>
|
||||
<a-button type="primary">Default</a-button>
|
||||
<a-button type="primary" @click="handleDefault">Default</a-button>
|
||||
<a-button type="primary">Load</a-button>
|
||||
</div>
|
||||
<div>
|
||||
<a-button type="primary">Save</a-button>
|
||||
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
||||
<a-button type="primary">Apply</a-button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -33,14 +33,17 @@
|
|||
|
||||
<script>
|
||||
import ModalMixin from '@/mixins/ModalMixin'
|
||||
import { getAction } from '@/api/manage'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import SampleDataMixin from '../../SampleDataMixin'
|
||||
import { cloneDeep } from 'lodash'
|
||||
|
||||
export default {
|
||||
mixins: [ModalMixin, SampleDataMixin],
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
targetKeys: []
|
||||
targetKeys: [],
|
||||
isSaving: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -66,6 +69,8 @@ export default {
|
|||
}))
|
||||
|
||||
this.targetKeys = UserNuclides.map(item => item)
|
||||
|
||||
this.initialTargetKeys = cloneDeep(this.targetKeys)
|
||||
} else {
|
||||
this.$message.error(message)
|
||||
}
|
||||
|
@ -76,6 +81,32 @@ export default {
|
|||
|
||||
beforeModalOpen() {
|
||||
this.getInfo()
|
||||
},
|
||||
|
||||
// 默认
|
||||
handleDefault() {
|
||||
this.targetKeys = cloneDeep(this.initialTargetKeys)
|
||||
},
|
||||
|
||||
// 保存
|
||||
async handleSave() {
|
||||
try {
|
||||
this.isSaving = true
|
||||
const { inputFileName: fileName } = this.sampleData
|
||||
const { success, result, message } = await postAction('/gamma/saveUserLibrary', {
|
||||
fileName,
|
||||
userLibraryName: this.targetKeys
|
||||
})
|
||||
if (success) {
|
||||
this.$message.success('Save Success')
|
||||
} else {
|
||||
this.$message.error(message)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
this.isSaving = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<div class="operators">
|
||||
<div>
|
||||
<a-button type="primary">Call</a-button>
|
||||
<a-button type="primary">Save</a-button>
|
||||
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
||||
</div>
|
||||
<div>
|
||||
<a-select v-model="funcId" @change="recalculate">
|
||||
|
@ -111,6 +111,7 @@ import { getAction, postAction } from '@/api/manage'
|
|||
import { cloneDeep } from 'lodash'
|
||||
import { buildLineSeries } from '@/utils/chartHelper'
|
||||
import SampleDataMixin from '../../SampleDataMixin'
|
||||
import { showSaveFileModal } from '@/utils/file'
|
||||
|
||||
const columns = [
|
||||
{
|
||||
|
@ -240,6 +241,8 @@ export default {
|
|||
|
||||
return {
|
||||
isLoading: false,
|
||||
isSaving: false,
|
||||
|
||||
equation: '',
|
||||
dataSourceList: [],
|
||||
list: [],
|
||||
|
@ -264,11 +267,11 @@ export default {
|
|||
const { success, result, message } = await getAction('/gamma/EfficiencyCalibration', {
|
||||
sampleId,
|
||||
fileName,
|
||||
currentText
|
||||
currentText,
|
||||
width: 922
|
||||
})
|
||||
this.isLoading = false
|
||||
if (success) {
|
||||
console.log('%c [ ]-220', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
||||
const { list_dataSource, ECutAnalysis_Low, G_energy_span } = result
|
||||
this.dataSourceList = list_dataSource
|
||||
if (!currentText) {
|
||||
|
@ -450,7 +453,8 @@ export default {
|
|||
m_vCurEffi: this.list.map(item => item.efficiency),
|
||||
m_vCurUncert: this.uncert,
|
||||
m_curParam: this.param,
|
||||
funcId: this.funcId
|
||||
funcId: this.funcId,
|
||||
width: 922
|
||||
})
|
||||
if (success) {
|
||||
this.handleResult(result)
|
||||
|
@ -464,6 +468,29 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
// 保存
|
||||
async handleSave() {
|
||||
try {
|
||||
this.isSaving = true
|
||||
const res = await postAction('/gamma/saveDataEfficiency', {
|
||||
m_vCurEnergy: this.list.map(item => item.energy),
|
||||
m_vCurEffi: this.list.map(item => item.efficiency),
|
||||
m_vCurUncert: this.uncert,
|
||||
funcId: this.funcId
|
||||
})
|
||||
if (typeof res == 'string') {
|
||||
const blob = new Blob([res], { type: 'text/plain' })
|
||||
showSaveFileModal(blob, 'ent')
|
||||
} else if (typeof res == 'object') {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
this.isSaving = false
|
||||
}
|
||||
},
|
||||
|
||||
// 应用
|
||||
async handleApply() {
|
||||
try {
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<div class="operators">
|
||||
<div>
|
||||
<a-button type="primary">Call</a-button>
|
||||
<a-button type="primary">Save</a-button>
|
||||
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
||||
</div>
|
||||
<div>
|
||||
<a-button type="primary" @click="handleApply">Apply</a-button>
|
||||
|
@ -106,6 +106,7 @@ import { getAction, postAction } from '@/api/manage'
|
|||
import { cloneDeep } from 'lodash'
|
||||
import { buildLineSeries } from '@/utils/chartHelper'
|
||||
import SampleDataMixin from '../../SampleDataMixin'
|
||||
import { showSaveFileModal } from '@/utils/file'
|
||||
|
||||
const columns = [
|
||||
{
|
||||
|
@ -202,6 +203,8 @@ export default {
|
|||
this.columns = columns
|
||||
return {
|
||||
isLoading: false,
|
||||
isSaving: false,
|
||||
|
||||
equation: '',
|
||||
dataSourceList: [],
|
||||
list: [],
|
||||
|
@ -226,7 +229,8 @@ export default {
|
|||
const { success, result, message } = await getAction('/gamma/energyCalibration', {
|
||||
sampleId,
|
||||
fileName,
|
||||
currentText
|
||||
currentText,
|
||||
width: 922
|
||||
})
|
||||
this.isLoading = false
|
||||
if (success) {
|
||||
|
@ -409,7 +413,8 @@ export default {
|
|||
m_vCurCentroid: this.list.map(item => item.channel),
|
||||
m_vCurEnergy: this.list.map(item => item.energy),
|
||||
m_vCurUncert: this.uncert,
|
||||
m_curParam: this.param
|
||||
m_curParam: this.param,
|
||||
width: 922
|
||||
})
|
||||
if (success) {
|
||||
this.handleResult(result)
|
||||
|
@ -423,6 +428,28 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
// 保存
|
||||
async handleSave() {
|
||||
try {
|
||||
this.isSaving = true
|
||||
const res = await postAction('/gamma/saveDataEnergy', {
|
||||
m_vCurCentroid: this.list.map(item => item.channel),
|
||||
m_vCurEnergy: this.list.map(item => item.energy),
|
||||
m_vCurUncert: this.uncert
|
||||
})
|
||||
if (typeof res == 'string') {
|
||||
const blob = new Blob([res], { type: 'text/plain' })
|
||||
showSaveFileModal(blob, 'ent')
|
||||
} else if (typeof res == 'object') {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
this.isSaving = false
|
||||
}
|
||||
},
|
||||
|
||||
// 应用
|
||||
async handleApply() {
|
||||
try {
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<div class="operators">
|
||||
<div>
|
||||
<a-button type="primary">Call</a-button>
|
||||
<a-button type="primary">Save</a-button>
|
||||
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
||||
</div>
|
||||
<div>
|
||||
<a-button type="primary" @click="handleApply">Apply</a-button>
|
||||
|
@ -106,6 +106,7 @@ import { getAction, postAction } from '@/api/manage'
|
|||
import { cloneDeep } from 'lodash'
|
||||
import { buildLineSeries } from '@/utils/chartHelper'
|
||||
import SampleDataMixin from '../../SampleDataMixin'
|
||||
import { showSaveFileModal } from '@/utils/file'
|
||||
|
||||
const columns = [
|
||||
{
|
||||
|
@ -202,6 +203,8 @@ export default {
|
|||
this.columns = columns
|
||||
return {
|
||||
isLoading: false,
|
||||
isSaving: false,
|
||||
|
||||
equation: '',
|
||||
dataSourceList: [],
|
||||
list: [],
|
||||
|
@ -225,11 +228,11 @@ export default {
|
|||
const { success, result, message } = await getAction('/gamma/resolutionCalibration', {
|
||||
sampleId,
|
||||
fileName,
|
||||
currentText
|
||||
currentText,
|
||||
width: 922
|
||||
})
|
||||
this.isLoading = false
|
||||
if (success) {
|
||||
console.log('%c [ ]-220', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
||||
const { list_dataSource, ECutAnalysis_Low, G_energy_span } = result
|
||||
this.dataSourceList = list_dataSource
|
||||
if (!currentText) {
|
||||
|
@ -423,6 +426,28 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
// 保存
|
||||
async handleSave() {
|
||||
try {
|
||||
this.isSaving = true
|
||||
const res = await postAction('/gamma/saveDataResolution', {
|
||||
m_vCurEnergy: this.list.map(item => item.energy),
|
||||
m_vCurReso: this.list.map(item => item.fwhm),
|
||||
m_vCurUncert: this.uncert
|
||||
})
|
||||
if (typeof res == 'string') {
|
||||
const blob = new Blob([res], { type: 'text/plain' })
|
||||
showSaveFileModal(blob, 'ent')
|
||||
} else if (typeof res == 'object') {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
this.isSaving = false
|
||||
}
|
||||
},
|
||||
|
||||
// 应用
|
||||
async handleApply() {
|
||||
try {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="nuclear-library">
|
||||
<div class="nuclear-library-item" v-for="(item, index) in list" :key="index">
|
||||
<div class="nuclear-library-item" v-for="(item, index) in list" :key="index" @dblclick="handleDblClick(item)">
|
||||
{{ item }}
|
||||
</div>
|
||||
<div v-if="!list.length" class="is-empty">
|
||||
|
@ -15,22 +15,33 @@ export default {
|
|||
list: {
|
||||
type: Array
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleDblClick(item) {
|
||||
this.$emit('dblclick', item)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.nuclear-library {
|
||||
width: 230px;
|
||||
max-height: 200px;
|
||||
height: 160px;
|
||||
overflow: auto;
|
||||
|
||||
&-item {
|
||||
padding: 4px 14px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: #055565;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
.is-empty {
|
||||
padding: 20px 0;
|
||||
padding: 15px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -40,44 +40,3 @@ export default {
|
|||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.pop-over-with-icon {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border: 1px solid #0a544e;
|
||||
height: 100%;
|
||||
padding: 0 11px;
|
||||
cursor: pointer;
|
||||
|
||||
.text {
|
||||
font-family: MicrosoftYaHei;
|
||||
color: #ade6ee;
|
||||
letter-spacing: 1px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
img {
|
||||
margin-left: 5px;
|
||||
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&.ant-popover-open {
|
||||
img {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="less">
|
||||
.popover-with-icon {
|
||||
.ant-popover-inner-content {
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -20,10 +20,21 @@
|
|||
@reset="handleReset"
|
||||
/>
|
||||
</pop-over-with-icon>
|
||||
<pop-over-with-icon>
|
||||
Nuclide Library
|
||||
<nuclear-library slot="content" :list="nuclideLibraryList" />
|
||||
</pop-over-with-icon>
|
||||
<a-popover
|
||||
overlayClassName="popover-with-icon"
|
||||
:visible="nuclideLibraryVisible"
|
||||
@click="handleChangeNuclideVisible"
|
||||
placement="bottom"
|
||||
>
|
||||
<div class="pop-over-with-icon">
|
||||
<span class="text"> Nuclide Library </span>
|
||||
<img src="@/assets/images/global/select-down.png" alt="" />
|
||||
</div>
|
||||
<a-spin slot="content" :spinning="isLoadingNuclide">
|
||||
<nuclide-library :list="nuclideLibraryList" @dblclick="handleNuclideDblClick" />
|
||||
</a-spin>
|
||||
</a-popover>
|
||||
|
||||
<div class="peak-info">
|
||||
<button-with-switch-icon @change="handlePeakInfoChange" @click="handleTogglePeak"></button-with-switch-icon>
|
||||
</div>
|
||||
|
@ -69,6 +80,13 @@
|
|||
</div>
|
||||
<!-- 主体部分结束 -->
|
||||
</a-spin>
|
||||
|
||||
<nuclide-review-modal
|
||||
v-model="nuclideReview.visible"
|
||||
:sampleId="sample.sampleId"
|
||||
:channel="currChannel"
|
||||
:nuclide="nuclideReview.nuclide"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -78,13 +96,14 @@ import PopOverWithIcon from './components/SubOperators/PopOverWithIcon.vue'
|
|||
import DetailedInfomation from './components/SubOperators/DetailedInfomation.vue'
|
||||
import QcFlags from './components/SubOperators/QcFlags.vue'
|
||||
import GraphAssistance from './components/SubOperators/GraphAssistance.vue'
|
||||
import NuclearLibrary from './components/SubOperators/NuclearLibrary.vue'
|
||||
import NuclideLibrary from './components/SubOperators/NuclideLibrary.vue'
|
||||
import ButtonWithSwitchIcon from './components/SubOperators/ButtonWithSwitchIcon.vue'
|
||||
import { getAction } from '@/api/manage'
|
||||
import Response from './response.json'
|
||||
import { buildLineSeries, findSeriesByName, getXAxisAndYAxisByPosition, rangeNumber } from '@/utils/chartHelper'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import axios from 'axios'
|
||||
import NuclideReviewModal from './components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewModal.vue'
|
||||
|
||||
// 初始配置
|
||||
const initialOption = {
|
||||
|
@ -246,12 +265,14 @@ export default {
|
|||
DetailedInfomation,
|
||||
QcFlags,
|
||||
GraphAssistance,
|
||||
NuclearLibrary,
|
||||
NuclideLibrary,
|
||||
ButtonWithSwitchIcon,
|
||||
NuclideReviewModal,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoading: false,
|
||||
isLoadingNuclide: false,
|
||||
option: cloneDeep(initialOption),
|
||||
opts: {
|
||||
notMerge: false,
|
||||
|
@ -261,6 +282,7 @@ export default {
|
|||
detailedInfomation: [],
|
||||
qcFlags: [],
|
||||
graphAssistance: cloneDeep(graphAssistance),
|
||||
nuclideLibraryVisible: false,
|
||||
|
||||
channelPeakGroup: [],
|
||||
energyPeakGroup: [],
|
||||
|
@ -273,6 +295,12 @@ export default {
|
|||
top: 0,
|
||||
left: 0,
|
||||
},
|
||||
|
||||
nuclideReview: {
|
||||
visible: false,
|
||||
nuclide: '',
|
||||
},
|
||||
currChannel: -1,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -609,10 +637,10 @@ export default {
|
|||
this.thumbnailOption.series[0].symbol = 'none'
|
||||
break
|
||||
case 'Scatter':
|
||||
this.option.series[0].type = 'scatterGL'
|
||||
this.option.series[0].type = 'scatter'
|
||||
this.option.series[0].symbol = 'circle'
|
||||
|
||||
this.thumbnailOption.series[0].type = 'scatterGL'
|
||||
this.thumbnailOption.series[0].type = 'scatter'
|
||||
this.thumbnailOption.series[0].symbol = 'circle'
|
||||
break
|
||||
}
|
||||
|
@ -643,6 +671,10 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
handleChangeNuclideVisible() {
|
||||
this.nuclideLibraryVisible = !this.nuclideLibraryVisible
|
||||
},
|
||||
|
||||
// 根据seriesName重绘线
|
||||
redrawLineBySeriesName(seriesName, energyData, channelData, isShow = true) {
|
||||
const series = findSeriesByName(this.option.series, seriesName)
|
||||
|
@ -722,8 +754,10 @@ export default {
|
|||
|
||||
// 获取 Nuclide Library 数据
|
||||
async getSelPosNuclide(channel) {
|
||||
this.currChannel = channel
|
||||
|
||||
try {
|
||||
this.loading = true
|
||||
this.isLoadingNuclide = true
|
||||
const { sampleId, inputFileName: fileName } = this.sample
|
||||
|
||||
const { success, result, message } = await getAction('/gamma/getSelPosNuclide', {
|
||||
|
@ -732,8 +766,8 @@ export default {
|
|||
fileName,
|
||||
})
|
||||
if (success) {
|
||||
const { identify } = result
|
||||
this.nuclideLibraryList = identify
|
||||
const { possible } = result
|
||||
this.nuclideLibraryList = possible
|
||||
} else {
|
||||
this.$message.error(message)
|
||||
}
|
||||
|
@ -741,10 +775,17 @@ export default {
|
|||
this.list = []
|
||||
console.error(error)
|
||||
} finally {
|
||||
this.loading = false
|
||||
this.isLoadingNuclide = false
|
||||
}
|
||||
},
|
||||
|
||||
// Nuclide Library 单项双击
|
||||
handleNuclideDblClick(nuclide) {
|
||||
this.nuclideLibraryVisible = false
|
||||
this.nuclideReview.nuclide = nuclide
|
||||
this.nuclideReview.visible = true
|
||||
},
|
||||
|
||||
resize() {
|
||||
this.$refs.chartRef.resize()
|
||||
this.$refs.thumbnailChartRef.resize()
|
||||
|
@ -821,19 +862,25 @@ export default {
|
|||
const max = item.pointlist.find((point) => point.y == Math.max(...allY))
|
||||
return max.x
|
||||
})
|
||||
|
||||
let find = null
|
||||
if (direction == 'right') {
|
||||
// 找到第一个比prevAxis大的xAxis
|
||||
const find = maxXAxises.find((xAxis) => xAxis > prevAxis)
|
||||
find = maxXAxises.find((xAxis) => xAxis > prevAxis)
|
||||
if (find) {
|
||||
this.option.series[0].markLine.data[0].xAxis = find
|
||||
}
|
||||
} else if (direction == 'left') {
|
||||
// 找到第一个比prevAxis小的xAxis
|
||||
const find = maxXAxises.reverse().find((xAxis) => xAxis < prevAxis)
|
||||
find = maxXAxises.reverse().find((xAxis) => xAxis < prevAxis)
|
||||
if (find) {
|
||||
this.option.series[0].markLine.data[0].xAxis = find
|
||||
}
|
||||
}
|
||||
|
||||
if (find) {
|
||||
this.getSelPosNuclide(find)
|
||||
}
|
||||
},
|
||||
|
||||
// 鼠标按下时开启可刷选状态
|
||||
|
|
|
@ -1183,6 +1183,43 @@ export default {
|
|||
// 主体部分结束
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped>
|
||||
::v-deep {
|
||||
.pop-over-with-icon {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border: 1px solid #0a544e;
|
||||
height: 100%;
|
||||
padding: 0 11px;
|
||||
cursor: pointer;
|
||||
|
||||
.text {
|
||||
font-family: MicrosoftYaHei;
|
||||
color: #ade6ee;
|
||||
letter-spacing: 1px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
img {
|
||||
margin-left: 5px;
|
||||
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
flex-shrink: 0;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
&.ant-popover-open {
|
||||
img {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="less">
|
||||
.spectrum-analysis-operators-dropdown-overlay {
|
||||
background-color: #03353f;
|
||||
|
@ -1265,4 +1302,11 @@ export default {
|
|||
color: yellow;
|
||||
}
|
||||
}
|
||||
|
||||
.popover-with-icon {
|
||||
z-index: 999;
|
||||
.ant-popover-inner-content {
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue
Block a user