Commit 44da5294 by lichengming

修改了查看样品和报告

parent f6af2692
......@@ -23,5 +23,6 @@ export default {
originalRecordGetById: data =>
http.get('soil/v1/original_record/' + data).then(res => res),
expReportGetById: data =>
http.get('soil/v1/exp_report/' + data).then(res => res)
http.get('soil/v1/exp_report/' + data).then(res => res),
reportGetById: data => http.get('soil/v1/report/' + data).then(res => res)
}
......@@ -159,5 +159,6 @@ export default {
pageExperimentReport: data =>
http.post('soil/v1/exp_report/page', data).then(res => res),
deleteReport: data =>
http.delete('soil/v1/exp_report/?ids=' + data).then(res => res)
http.delete('soil/v1/exp_report/?ids=' + data).then(res => res),
reportPage: data => http.post('soil/v1/report/page', data).then(res => res)
}
......@@ -6,7 +6,10 @@
<div>
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="样品台账" name="sample">
<ReportMakeBySample ref="sampleTabs" @on-result-change="_sampleTabResult"></ReportMakeBySample>
<ReportMakeBySample ref="sampleTabs"></ReportMakeBySample>
</el-tab-pane>
<el-tab-pane label="汇总报告台账" name="summary">
<SummaryInfo ref="summaryTabs"></SummaryInfo>
</el-tab-pane>
<el-tab-pane label="试验项目报告台账" name="report">
<ReportInfoMake ref="reportTabs"></ReportInfoMake>
......@@ -19,11 +22,13 @@
<script>
import ReportInfoMake from './tabs/ReportInfoMake'
import ReportMakeBySample from './tabs/ReportMakeBySample'
import SummaryInfo from './tabs/SummaryInfo'
export default {
components: {
ReportMakeBySample,
ReportInfoMake
ReportInfoMake,
SummaryInfo
},
data() {
return {
......@@ -93,6 +98,9 @@ export default {
console.log(this.entrustId)
this.$refs.sampleTabs._open(this.entrustId)
},
_summary() {
this.$refs.summaryTabs._open(this.entrustId)
},
_changeTabs(tab, event) {
switch (tab.name) {
case 'sample':
......@@ -101,14 +109,17 @@ export default {
case 'report':
this._report()
break
}
},
_sampleTabResult(msg) {
if (msg === 'changeTab') {
this.activeName = 'report'
this.$refs.reportTabs._open(this.contractId, this.personal)
case 'summary':
this._summary()
break
}
}
// _sampleTabResult(msg) {
// if (msg === 'changeTab') {
// this.activeName = 'report'
// this.$refs.reportTabs._open(this.contractId, this.personal)
// }
// }
}
}
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment