处理RLR弹窗点击下载关闭的问题
This commit is contained in:
parent
a289c1de9c
commit
e1c30fd326
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<custom-modal v-model="visible" :width="1280" title="NG Lab Report" :destroyOnClose="true" :okHandler="handleOk">
|
||||
<custom-modal v-model="visible" :width="1280" title="NG Lab Report" :destroyOnClose="true" @cancel="handleCancel">
|
||||
<div class="rlr">
|
||||
<div class="rlr-tabs">
|
||||
<div
|
||||
|
@ -44,6 +44,12 @@
|
|||
</a-spin>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="custom-footer" style="text-align: center">
|
||||
<a-space :size="20">
|
||||
<a-button type="primary" @click="handleOk">Save</a-button>
|
||||
<a-button @click="handleCancel">Cancel</a-button>
|
||||
</a-space>
|
||||
</div>
|
||||
</custom-modal>
|
||||
</template>
|
||||
|
||||
|
@ -173,7 +179,9 @@ export default {
|
|||
getNewVal_addInfo(val) {
|
||||
this.addInfo = val
|
||||
},
|
||||
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleOk() {
|
||||
let params = {
|
||||
laboratory: this.newDetail.laboratory || '',
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
<template>
|
||||
<custom-modal v-model="visible" :width="1280" title="Mini Radionuclide Laboratory Reports" :destroyOnClose="true" @cancel="handleCancel">
|
||||
<custom-modal
|
||||
v-model="visible"
|
||||
:width="1280"
|
||||
title="Mini Radionuclide Laboratory Reports"
|
||||
:destroyOnClose="true"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-spin :spinning="isLoading">
|
||||
<div class="rlr">
|
||||
<div class="rlr-tabs">
|
||||
|
@ -68,7 +74,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</a-spin>
|
||||
<div slot="custom-footer" style="text-align: center;">
|
||||
<div slot="custom-footer" style="text-align: center">
|
||||
<a-space :size="20">
|
||||
<a-button type="primary" @click="handleSave">Save</a-button>
|
||||
<a-button @click="handleCancel">Cancel</a-button>
|
||||
|
@ -115,7 +121,7 @@ const tabs = [
|
|||
'g_CoincidenceCorrection',
|
||||
'MDA',
|
||||
'Conclusions',
|
||||
'Comment'
|
||||
'Comment',
|
||||
]
|
||||
|
||||
export default {
|
||||
|
@ -137,7 +143,7 @@ export default {
|
|||
Mda,
|
||||
Conclusions,
|
||||
Comment,
|
||||
Custom
|
||||
Custom,
|
||||
},
|
||||
data() {
|
||||
this.tabs = tabs
|
||||
|
@ -162,11 +168,11 @@ export default {
|
|||
mdaList: [],
|
||||
conclusionVal: {},
|
||||
commentVal: {},
|
||||
fileName: ''
|
||||
fileName: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
sessionStorage.removeItem("isCellEmpty")
|
||||
sessionStorage.removeItem('isCellEmpty')
|
||||
},
|
||||
methods: {
|
||||
getNewVal_header(val) {
|
||||
|
@ -221,9 +227,8 @@ export default {
|
|||
this.commentVal = val
|
||||
},
|
||||
handleSave() {
|
||||
let val = sessionStorage.getItem("isCellEmpty")
|
||||
if (!val||val=="false") {
|
||||
this.visible = false
|
||||
let val = sessionStorage.getItem('isCellEmpty')
|
||||
if (!val || val == 'false') {
|
||||
// 下载保存文件
|
||||
let params = {
|
||||
header_msg_id: this.healderVal.msgId || this.allInfo.header_msg_id,
|
||||
|
@ -277,63 +282,63 @@ export default {
|
|||
Conclusion_Res: this.conclusionVal.conclusionRes || this.allInfo.Conclusion_Res,
|
||||
Comment: this.commentVal.comment || this.allInfo.Comment,
|
||||
}
|
||||
postAction("/gamma/exportRLR", params).then(res => {
|
||||
postAction('/gamma/exportRLR', params).then((res) => {
|
||||
const blob = new Blob([res])
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
title: 'Please enter file name',
|
||||
content: h => <a-input v-model={_this.fileName} />,
|
||||
content: (h) => <a-input v-model={_this.fileName} />,
|
||||
okText: 'Cancle',
|
||||
cancelText: 'Save',
|
||||
okButtonProps: {style: {backgroundColor: "#b98326", color: "#fff", borderColor: "transparent"}},
|
||||
cancelButtonProps: {style: {color: "#fff", backgroundColor: "#31aab0", borderColor: "transparent"}},
|
||||
okButtonProps: { style: { backgroundColor: '#b98326', color: '#fff', borderColor: 'transparent' } },
|
||||
cancelButtonProps: { style: { color: '#fff', backgroundColor: '#31aab0', borderColor: 'transparent' } },
|
||||
onOk() {
|
||||
console.log('Cancel');
|
||||
console.log('Cancel')
|
||||
},
|
||||
onCancel() {
|
||||
if (_this.fileName) {
|
||||
saveAs(blob, `${_this.fileName}.RLR`)
|
||||
}
|
||||
},
|
||||
});
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.warning("Please finishi ti edit new inserted row first.")
|
||||
this.$message.warning('Please finishi ti edit new inserted row first.')
|
||||
}
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
sessionStorage.removeItem("isCellEmpty")
|
||||
sessionStorage.removeItem('isCellEmpty')
|
||||
},
|
||||
handleChangeView(index) {
|
||||
let val = sessionStorage.getItem("isCellEmpty")
|
||||
if (val=="false"||!val) {
|
||||
let val = sessionStorage.getItem('isCellEmpty')
|
||||
if (val == 'false' || !val) {
|
||||
this.activeKey = index
|
||||
} else {
|
||||
this.$message.warning("Please finishi ti edit new inserted row first.")
|
||||
this.$message.warning('Please finishi ti edit new inserted row first.')
|
||||
}
|
||||
},
|
||||
beforeModalOpen() {
|
||||
this.activeKey = 0
|
||||
this.getGammaViewRLR();
|
||||
this.getGammaViewRLR()
|
||||
},
|
||||
getGammaViewRLR() {
|
||||
this.isLoading = true
|
||||
const { sampleId, inputFileName: fileName } = this.sampleData
|
||||
let params = {
|
||||
sampleId,
|
||||
fileName
|
||||
fileName,
|
||||
}
|
||||
getAction("/gamma/viewRLR", params).then(res => {
|
||||
getAction('/gamma/viewRLR', params).then((res) => {
|
||||
this.isLoading = false
|
||||
if (res.success) {
|
||||
this.allInfo = res.result
|
||||
} else {
|
||||
this.$message.warning("This operation fails. Contact your system administrator")
|
||||
this.$message.warning('This operation fails. Contact your system administrator')
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user