Merge branch 'master-dev' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
a330a34ee7
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="custom-top-menu">
|
<div class="custom-top-menu">
|
||||||
<a-menu mode="horizontal" v-model="selectedKeys" @click="onMenuSelect">
|
<a-menu mode="horizontal" v-model="selectedKeys" @click="onMenuSelect">
|
||||||
<a-menu-item v-for="(menu, index) in menus" :key="menu.name" :class="{ 'is-last': index === menus.length - 1}">
|
<a-menu-item v-for="(menu, index) in menus" :key="menu.name" :class="{ 'is-last': index === menus.length - 1 }">
|
||||||
<img
|
<img
|
||||||
v-show="menu.name === selectedKeys[0]"
|
v-show="menu.name === selectedKeys[0]"
|
||||||
class="menu-logo"
|
class="menu-logo"
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
<span v-html="menu.meta.title.split(' ').join('<br>')"></span>
|
<span v-html="menu.meta.title.split(' ').join('<br>')"></span>
|
||||||
<img v-if="index !== menus.length - 1" class="split-line" src="@/assets/images/header/split-line.png" alt="">
|
<img v-if="index !== menus.length - 1" class="split-line" src="@/assets/images/header/split-line.png" alt="" />
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
</div>
|
</div>
|
||||||
|
@ -26,12 +26,12 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
menus: {
|
menus: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => [],
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedKeys: []
|
selectedKeys: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -40,15 +40,15 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onMenuSelect({ key }) {
|
onMenuSelect({ key }) {
|
||||||
const childPath = this.getChildrenPath(this.menuItems.find(menu => menu.name === key))
|
const childPath = this.getChildrenPath(this.menuItems.find((menu) => menu.name === key))
|
||||||
if (key == "abnormal-alarm" ) {
|
if (key == 'abnormal-alarm') {
|
||||||
const selectedKeys = window.sessionStorage.getItem('currMenu_alarm')
|
const selectedKeys = window.sessionStorage.getItem('currMenu_alarm')
|
||||||
if (selectedKeys) {
|
if (selectedKeys) {
|
||||||
this.$router.push(selectedKeys)
|
this.$router.push(selectedKeys)
|
||||||
} else {
|
} else {
|
||||||
this.$router.push(childPath)
|
this.$router.push(childPath)
|
||||||
}
|
}
|
||||||
} else if (key == "istatistics") {
|
} else if (key == 'istatistics') {
|
||||||
const selectedKeys = window.sessionStorage.getItem('currMenu_web')
|
const selectedKeys = window.sessionStorage.getItem('currMenu_web')
|
||||||
if (selectedKeys) {
|
if (selectedKeys) {
|
||||||
this.$router.push(selectedKeys)
|
this.$router.push(selectedKeys)
|
||||||
|
@ -82,19 +82,19 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route(route) {
|
$route(route) {
|
||||||
const currTopMenu = this.findTopMenuByRouteName(this.menuItems, route.name)
|
const currTopMenu = this.findTopMenuByRouteName(this.menuItems, route.name)
|
||||||
this.selectedKeys = [currTopMenu.name]
|
this.selectedKeys = [currTopMenu.name]
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
menuItems() {
|
menuItems() {
|
||||||
return this.menus.filter(item => !item.hidden)
|
return this.menus.filter((item) => !item.hidden)
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -130,10 +130,12 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
$route: {
|
$route: {
|
||||||
handler: function (val, oldVal) {
|
handler: function (val, oldVal) {
|
||||||
this.currSlecteKey = []
|
|
||||||
console.log(val)
|
console.log(val)
|
||||||
this.currSlecteKey.push(val.path)
|
if (val.name === 'abnormal-alarm') {
|
||||||
window.sessionStorage.setItem('currMenu_alarm', val.path)
|
this.currSlecteKey = []
|
||||||
|
this.currSlecteKey.push(val.path)
|
||||||
|
window.sessionStorage.setItem('currMenu_alarm', val.path)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true,
|
immediate: true,
|
||||||
|
|
|
@ -4,19 +4,19 @@ import Vue from 'vue'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发起请求清理后端对sample的缓存
|
* 发起请求清理后端对sample的缓存
|
||||||
* @param {Array<any>} sampleList
|
* @param {Array<any>} sampleList
|
||||||
*/
|
*/
|
||||||
export const clearSampleCache = (sampleList) => {
|
export const clearSampleCache = sampleList => {
|
||||||
sampleList.forEach(sample => {
|
sampleList.forEach(sample => {
|
||||||
const { inputFileName: fileName, sampleFileName, qcFileName } = sample
|
const { inputFileName: fileName } = sample
|
||||||
let url = '/gamma/delPHDCache',
|
let url = '/gamma/delPHDCache',
|
||||||
params = { fileName }
|
params = { fileName }
|
||||||
if (sample.sampleType == 'B') {
|
if (sample.sampleType == 'B') {
|
||||||
url = '/spectrumAnalysis/deleteSpectrumCacheData'
|
url = '/spectrumAnalysis/deleteSpectrumCacheData'
|
||||||
params = { sampleFileName , qcFileName }
|
params = { sampleFileName: fileName }
|
||||||
}
|
}
|
||||||
deleteAction(url, params)
|
deleteAction(url, params)
|
||||||
store.commit('REMOVE_SAMPLE_DATA', fileName)
|
store.commit('REMOVE_SAMPLE_DATA', fileName)
|
||||||
Vue.ls.remove(`calibration-gamma:${fileName}`)
|
Vue.ls.remove(`calibration-gamma:${fileName}`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -696,7 +696,7 @@ export default {
|
||||||
this.cancelLastRequest()
|
this.cancelLastRequest()
|
||||||
const cancelToken = this.createCancelToken()
|
const cancelToken = this.createCancelToken()
|
||||||
this.isLoadingGammaGated = true
|
this.isLoadingGammaGated = true
|
||||||
const { sampleId, qcFileName } = this.newSampleData
|
const { sampleId, qcFileName, inputFileName: sampleFileName } = this.newSampleData
|
||||||
const {
|
const {
|
||||||
success,
|
success,
|
||||||
result: { data },
|
result: { data },
|
||||||
|
@ -709,6 +709,7 @@ export default {
|
||||||
chartHeight: this.gammaEnergy.length,
|
chartHeight: this.gammaEnergy.length,
|
||||||
channelWidth: this.gammaChannelWidth,
|
channelWidth: this.gammaChannelWidth,
|
||||||
qcFileName,
|
qcFileName,
|
||||||
|
sampleFileName
|
||||||
},
|
},
|
||||||
cancelToken
|
cancelToken
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user