fix: Compare和Strip增加状态样式
This commit is contained in:
parent
35b315421a
commit
7f443f55a9
|
@ -1433,13 +1433,17 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 显示比较弹窗
|
// 显示比较弹窗
|
||||||
showCompareModal(isStrip) {
|
showCompareModal(isStrip, isOperating) {
|
||||||
if (this.isLoading) {
|
if (this.isLoading) {
|
||||||
this.$message.warn('Sample is Loading')
|
this.$message.warn('Sample is Loading')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.handleResetChart()
|
this.handleResetChart()
|
||||||
this.clearCompareLine()
|
this.clearCompareLine()
|
||||||
|
if(isOperating) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.isStrip = isStrip
|
this.isStrip = isStrip
|
||||||
if (FilePicker.canUse()) {
|
if (FilePicker.canUse()) {
|
||||||
this.chooseFileFromFS()
|
this.chooseFileFromFS()
|
||||||
|
@ -1512,6 +1516,8 @@ export default {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.thumbnailOption.yAxis.max = getAxisMax(this.getChart(), 'yAxis')
|
this.thumbnailOption.yAxis.max = getAxisMax(this.getChart(), 'yAxis')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.$emit('compareSuccess', this.isStrip)
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,13 @@
|
||||||
<template v-for="(child, index) in operation.children">
|
<template v-for="(child, index) in operation.children">
|
||||||
<component v-if="child.show !== false" :is="child.type" :key="index" v-bind="child.attrs" v-on="child.on">
|
<component v-if="child.show !== false" :is="child.type" :key="index" v-bind="child.attrs" v-on="child.on">
|
||||||
<template v-for="item in child.children">
|
<template v-for="item in child.children">
|
||||||
<component v-if="item.show !== false" :is="item.type" :key="item.title" @click="item.handler">
|
<component
|
||||||
|
v-if="item.show !== false"
|
||||||
|
:is="item.type"
|
||||||
|
:key="item.title"
|
||||||
|
v-bind="item.attrs"
|
||||||
|
@click="item.handler"
|
||||||
|
>
|
||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -40,6 +46,7 @@
|
||||||
:currSampleDet="currSampleDet"
|
:currSampleDet="currSampleDet"
|
||||||
:updateFlag="updateFlag"
|
:updateFlag="updateFlag"
|
||||||
@reAnalyed="handleReAnalyed"
|
@reAnalyed="handleReAnalyed"
|
||||||
|
@compareSuccess="handleCompareSuccess"
|
||||||
/>
|
/>
|
||||||
<!-- Gamma 分析 -->
|
<!-- Gamma 分析 -->
|
||||||
|
|
||||||
|
@ -430,6 +437,9 @@ export default {
|
||||||
analysedFileName: '', //分析完成的文件名称
|
analysedFileName: '', //分析完成的文件名称
|
||||||
currSampleDet: [], // DetailedInformation
|
currSampleDet: [], // DetailedInformation
|
||||||
allSampleDet: {}, // DetailedInformation all
|
allSampleDet: {}, // DetailedInformation all
|
||||||
|
|
||||||
|
isComparing: false,
|
||||||
|
isStriping: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -963,6 +973,16 @@ export default {
|
||||||
this.colorConfig = colorConfig
|
this.colorConfig = colorConfig
|
||||||
this.$refs.gammaAnalysisRef.handleColorChange(colorConfig)
|
this.$refs.gammaAnalysisRef.handleColorChange(colorConfig)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Compare 或 Strip 了
|
||||||
|
handleCompareSuccess(isStrip) {
|
||||||
|
console.log('%c [ isStrip ]-973', 'font-size:13px; background:pink; color:#bf2c9f;', isStrip)
|
||||||
|
if (isStrip) {
|
||||||
|
this.isStriping = true
|
||||||
|
} else {
|
||||||
|
this.isComparing = true
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 顶部菜单栏配置
|
// 顶部菜单栏配置
|
||||||
|
@ -988,13 +1008,35 @@ export default {
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'Compare',
|
title: 'Compare',
|
||||||
show: this.isGamma,
|
show: this.isGamma,
|
||||||
handler: () => this.$refs.gammaAnalysisRef.showCompareModal(false),
|
handler: () => {
|
||||||
|
this.isStriping = false
|
||||||
|
this.$refs.gammaAnalysisRef.showCompareModal(false, this.isComparing)
|
||||||
|
if (this.isComparing) {
|
||||||
|
this.isComparing = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
attrs: {
|
||||||
|
style: {
|
||||||
|
color: this.isComparing ? 'red' : '#fff',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'Strip',
|
title: 'Strip',
|
||||||
show: this.isGamma,
|
show: this.isGamma,
|
||||||
handler: () => this.$refs.gammaAnalysisRef.showCompareModal(true),
|
handler: () => {
|
||||||
|
this.isComparing = false
|
||||||
|
this.$refs.gammaAnalysisRef.showCompareModal(true, this.isStriping)
|
||||||
|
if (this.isStriping) {
|
||||||
|
this.isStriping = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
attrs: {
|
||||||
|
style: {
|
||||||
|
color: this.isStriping ? 'red' : '#fff',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user