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