处理rlr弹窗数据问题,及增加loading效果

This commit is contained in:
renpy 2023-08-30 18:36:21 +08:00
parent 8e4b721414
commit 4a77ea8f82
2 changed files with 94 additions and 82 deletions

View File

@ -72,25 +72,35 @@ export default {
watch: { watch: {
allData: { allData: {
handler(val) { handler(val) {
console.log(val); this.model.msgId = val.header_msg_id;
this.model.dataType = val.header_data_type;
this.model.priorityLevel = val.header_priority_level;
this.model.stationCode = val.header_station_code;
this.model.srid = val.header_srid;
this.model.labCode = val.header_lab_code;
this.model.labDetector = val.header_lab_detector;
this.model.reportType = val.header_report_type;
this.model.reportnumber = val.header_report_number;
this.model.sampleCategory = val.header_sample_category;
this.model.transmission = val.header_transmission;
}, },
deep: true, deep: true,
immediate:true immediate:true
} }
}, },
mounted () { // mounted () {
this.model.msgId = this.allData.header_msg_id; // this.model.msgId = this.allData.header_msg_id;
this.model.dataType = this.allData.header_data_type; // this.model.dataType = this.allData.header_data_type;
this.model.priorityLevel = this.allData.header_priority_level; // this.model.priorityLevel = this.allData.header_priority_level;
this.model.stationCode = this.allData.header_station_code; // this.model.stationCode = this.allData.header_station_code;
this.model.srid = this.allData.header_srid; // this.model.srid = this.allData.header_srid;
this.model.labCode = this.allData.header_lab_code; // this.model.labCode = this.allData.header_lab_code;
this.model.labDetector = this.allData.header_lab_detector; // this.model.labDetector = this.allData.header_lab_detector;
this.model.reportType = this.allData.header_report_type; // this.model.reportType = this.allData.header_report_type;
this.model.reportnumber = this.allData.header_report_number; // this.model.reportnumber = this.allData.header_report_number;
this.model.sampleCategory = this.allData.header_sample_category; // this.model.sampleCategory = this.allData.header_sample_category;
this.model.transmission = this.allData.header_transmission; // this.model.transmission = this.allData.header_transmission;
}, // },
data() { data() {
this.priorityLevbelOptions = priorityLevbelOptions this.priorityLevbelOptions = priorityLevbelOptions
this.reportTypeOptions = reportTypeOptions this.reportTypeOptions = reportTypeOptions

View File

@ -1,71 +1,73 @@
<template> <template>
<custom-modal v-model="visible" :width="1280" title="Mini Radionuclide Laboratory Reports" :destroyOnClose="true"> <custom-modal v-model="visible" :width="1280" title="Mini Radionuclide Laboratory Reports" :destroyOnClose="true">
<div class="rlr"> <a-spin :spinning="isLoading">
<div class="rlr-tabs"> <div class="rlr">
<div <div class="rlr-tabs">
class="rlr-tabs-item" <div
:class="activeKey == index ? 'active' : ''" class="rlr-tabs-item"
v-for="(tab, index) in tabs" :class="activeKey == index ? 'active' : ''"
:key="index" v-for="(tab, index) in tabs"
@click="activeKey = index" :key="index"
> @click="activeKey = index"
{{ tab }} >
{{ tab }}
</div>
</div>
<div class="rlr-content">
<h4>{{ tabs[activeKey] }}</h4>
<div class="rlr-content-detail">
<template v-if="activeKey == 0">
<c-header :allData="allInfo" />
</template>
<template v-if="activeKey == 1">
<Objective :allData="allInfo" />
</template>
<template v-if="activeKey == 2">
<collection :allData="allInfo" />
</template>
<template v-if="activeKey == 3">
<sample-receipt :allData="allInfo" />
</template>
<template v-if="activeKey == 4">
<test :allData="allInfo" />
</template>
<template v-if="activeKey == 5">
<peaks-method :allData="allInfo" />
</template>
<template v-if="activeKey == 6">
<peak-fit :allData="allInfo" />
</template>
<template v-if="activeKey == 7">
<g-analysis-methods :allData="allInfo" />
</template>
<template v-if="activeKey == 8">
<peak-association :allData="allInfo" />
</template>
<template v-if="activeKey == 9">
<references :allData="allInfo" />
</template>
<template v-if="activeKey == 10">
<results :allData="allInfo" />
</template>
<template v-if="activeKey == 11">
<nuclide-ratios :allData="allInfo" />
</template>
<template v-if="activeKey == 12">
<g-coincidence-correction />
</template>
<template v-if="activeKey == 13">
<mda />
</template>
<template v-if="activeKey == 14">
<conclusions :allData="allInfo" />
</template>
<template v-if="activeKey == 15">
<comment :allData="allInfo" />
</template>
</div>
</div> </div>
</div> </div>
<div class="rlr-content"> </a-spin>
<h4>{{ tabs[activeKey] }}</h4>
<div class="rlr-content-detail">
<template v-if="activeKey == 0">
<c-header :allData="allInfo" />
</template>
<template v-if="activeKey == 1">
<Objective :allData="allInfo" />
</template>
<template v-if="activeKey == 2">
<collection :allData="allInfo" />
</template>
<template v-if="activeKey == 3">
<sample-receipt :allData="allInfo" />
</template>
<template v-if="activeKey == 4">
<test :allData="allInfo" />
</template>
<template v-if="activeKey == 5">
<peaks-method :allData="allInfo" />
</template>
<template v-if="activeKey == 6">
<peak-fit :allData="allInfo" />
</template>
<template v-if="activeKey == 7">
<g-analysis-methods :allData="allInfo" />
</template>
<template v-if="activeKey == 8">
<peak-association :allData="allInfo" />
</template>
<template v-if="activeKey == 9">
<references :allData="allInfo" />
</template>
<template v-if="activeKey == 10">
<results :allData="allInfo" />
</template>
<template v-if="activeKey == 11">
<nuclide-ratios :allData="allInfo" />
</template>
<template v-if="activeKey == 12">
<g-coincidence-correction />
</template>
<template v-if="activeKey == 13">
<mda />
</template>
<template v-if="activeKey == 14">
<conclusions :allData="allInfo" />
</template>
<template v-if="activeKey == 15">
<comment :allData="allInfo" />
</template>
</div>
</div>
</div>
</custom-modal> </custom-modal>
</template> </template>
@ -136,23 +138,23 @@ export default {
data() { data() {
this.tabs = tabs this.tabs = tabs
return { return {
isLoading: false,
activeKey: 0, activeKey: 0,
allInfo: {} allInfo: {}
} }
}, },
mounted () {
this.getGammaViewRLR();
},
methods: { methods: {
beforeModalOpen() { beforeModalOpen() {
this.activeKey = 0 this.activeKey = 0
this.getGammaViewRLR();
}, },
getGammaViewRLR() { getGammaViewRLR() {
this.isLoading = true
let params = { let params = {
sampleId: this.sampleId sampleId: this.sampleId
} }
getAction("/gamma/viewRLR", params).then(res => { getAction("/gamma/viewRLR", params).then(res => {
console.log(res); this.isLoading = false
if (res.success) { if (res.success) {
this.allInfo = res.result this.allInfo = res.result
} else { } else {