feat: 完成Compare From DB和Strip From DB功能
This commit is contained in:
parent
dca4b320d8
commit
a538ae66b0
|
@ -8,7 +8,7 @@
|
|||
</search-form>
|
||||
<custom-table
|
||||
size="middle"
|
||||
rowKey="analysitId"
|
||||
:rowKey="this.loadType == 'db' ? 'analysitId' : 'sampleId'"
|
||||
:columns="columns"
|
||||
:list="dataSource"
|
||||
:pagination="ipagination"
|
||||
|
@ -225,6 +225,10 @@ export default {
|
|||
this.loadType = loadType
|
||||
this.visible = true
|
||||
this.columns = cloneDeep(columns)
|
||||
if (loadType !== this.loadType) {
|
||||
this.dataSource = []
|
||||
}
|
||||
|
||||
if (loadType != 'db') {
|
||||
this.columns.splice(10, 1)
|
||||
|
||||
|
@ -232,13 +236,13 @@ export default {
|
|||
|
||||
this.queryParam.menuTypes = 'G'
|
||||
if (!this.queryParam.checkboxGroup.includes('AllUsers')) {
|
||||
// 选中All Users
|
||||
this.queryParam.checkboxGroup.push('AllUsers')
|
||||
}
|
||||
|
||||
this.queryParam.detectorsName = undefined
|
||||
this.queryParam.sampleType = sampleType
|
||||
this.queryParam.dbName = 'auto'
|
||||
this.dataSource = []
|
||||
|
||||
const index = inputFileName.indexOf('_')
|
||||
setTimeout(() => {
|
||||
// 防止AllUsers变化时触发getStationAndDetectorList方法导致stationName置空
|
||||
|
@ -250,7 +254,7 @@ export default {
|
|||
/**
|
||||
* 加载
|
||||
*/
|
||||
async handleLoad() {
|
||||
handleLoad() {
|
||||
if (!this.selectedRowKeys.length) {
|
||||
this.$message.warn('Please Select Sample To Load')
|
||||
return
|
||||
|
@ -516,7 +520,7 @@ export default {
|
|||
name: 'checkboxGroup',
|
||||
props: {
|
||||
options: [
|
||||
{ label: 'All User', value: 'AllUsers', disabled: true },
|
||||
{ label: 'All User', value: 'AllUsers', disabled: this.loadType !== 'db' },
|
||||
{ label: 'Collect Stop', value: 'CollectStopB' },
|
||||
{ label: 'Acq.Start', value: 'AcqStartB' },
|
||||
],
|
||||
|
|
|
@ -6,7 +6,12 @@
|
|||
<div v-if="item.children" :key="index">
|
||||
<a-menu class="multi-level-menu-sub-menu">
|
||||
<template v-for="child in item.children">
|
||||
<a-menu-item v-if="child.show !== false" :key="child.key" v-bind="child.attrs" @click="handleSubMenuClick(item, child)">
|
||||
<a-menu-item
|
||||
v-if="child.show !== false"
|
||||
:key="child.key"
|
||||
v-bind="child.attrs"
|
||||
@click="handleSubMenuClick($event, item, child)"
|
||||
>
|
||||
{{ child.title }}
|
||||
</a-menu-item>
|
||||
</template>
|
||||
|
@ -35,7 +40,8 @@ export default {
|
|||
this.$emit('menuClick', item)
|
||||
// }
|
||||
},
|
||||
handleSubMenuClick(item, child) {
|
||||
handleSubMenuClick(event, item, child) {
|
||||
event.domEvent.stopPropagation()
|
||||
this.$emit('submenuClick', { item, child })
|
||||
},
|
||||
},
|
||||
|
|
|
@ -1478,16 +1478,13 @@ export default {
|
|||
},
|
||||
|
||||
// 显示比较弹窗
|
||||
showCompareModal(isStrip, isOperating) {
|
||||
showCompareModal(isStrip) {
|
||||
if (this.isLoading) {
|
||||
this.$message.warn('Sample is Loading')
|
||||
return
|
||||
}
|
||||
this.handleResetChart()
|
||||
this.clearCompareLine()
|
||||
if (isOperating) {
|
||||
return
|
||||
}
|
||||
|
||||
this.isStrip = isStrip
|
||||
if (FilePicker.canUse()) {
|
||||
|
|
|
@ -516,19 +516,14 @@ export default {
|
|||
const willAddList = sampleList.filter((item) => !ids.includes(item.sampleId))
|
||||
this.callInitValue(willAddList)
|
||||
this.sampleList = this.sampleList.concat(willAddList)
|
||||
} else if (loadType == 'compare') {
|
||||
} else {
|
||||
const sample = sampleList[0]
|
||||
this.isStriping = false
|
||||
this.$refs.gammaAnalysisRef.handleDBFileSelect(sample.sampleId, false, this.isComparing)
|
||||
if (this.isComparing) {
|
||||
this.isComparing = false
|
||||
}
|
||||
} else if (loadType == 'strip') {
|
||||
const sample = sampleList[0]
|
||||
this.isComparing = false
|
||||
this.$refs.gammaAnalysisRef.handleDBFileSelect(sample.sampleId, true, this.isStriping)
|
||||
if (this.isStriping) {
|
||||
if (loadType == 'compare') {
|
||||
this.isStriping = false
|
||||
this.$refs.gammaAnalysisRef.handleDBFileSelect(sample.sampleId, false)
|
||||
} else if (loadType == 'strip') {
|
||||
this.isComparing = false
|
||||
this.$refs.gammaAnalysisRef.handleDBFileSelect(sample.sampleId, true)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1077,6 +1072,18 @@ export default {
|
|||
case 'loadFromFile':
|
||||
this.loadFromFileModalVisible = true
|
||||
break
|
||||
case 'compare':
|
||||
if(this.isComparing) {
|
||||
this.$refs.gammaAnalysisRef.clearCompareLine()
|
||||
this.isComparing = false
|
||||
}
|
||||
break
|
||||
case 'strip':
|
||||
if(this.isStriping) {
|
||||
this.$refs.gammaAnalysisRef.clearCompareLine()
|
||||
this.isStriping = false
|
||||
}
|
||||
break
|
||||
case 'fTransit':
|
||||
this.ftransltModalVisible = true
|
||||
break
|
||||
|
@ -1089,20 +1096,14 @@ export default {
|
|||
switch (key) {
|
||||
case 'compareFromFile':
|
||||
this.isStriping = false
|
||||
this.$refs.gammaAnalysisRef.showCompareModal(false, this.isComparing)
|
||||
if (this.isComparing) {
|
||||
this.isComparing = false
|
||||
}
|
||||
this.$refs.gammaAnalysisRef.showCompareModal(false)
|
||||
break
|
||||
case 'compareFromDB':
|
||||
this.$refs.loadFromDBModalRef.show('compare')
|
||||
break
|
||||
case 'stripFromFile':
|
||||
this.isComparing = false
|
||||
this.$refs.gammaAnalysisRef.showCompareModal(true, this.isStriping)
|
||||
if (this.isStriping) {
|
||||
this.isStriping = false
|
||||
}
|
||||
this.$refs.gammaAnalysisRef.showCompareModal(true)
|
||||
break
|
||||
case 'stripFromDB':
|
||||
this.$refs.loadFromDBModalRef.show('strip')
|
||||
|
|
Loading…
Reference in New Issue
Block a user