Commit 44da5294 by lichengming

修改了查看样品和报告

parent f6af2692
...@@ -23,5 +23,6 @@ export default { ...@@ -23,5 +23,6 @@ export default {
originalRecordGetById: data => originalRecordGetById: data =>
http.get('soil/v1/original_record/' + data).then(res => res), http.get('soil/v1/original_record/' + data).then(res => res),
expReportGetById: data => 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 { ...@@ -159,5 +159,6 @@ export default {
pageExperimentReport: data => pageExperimentReport: data =>
http.post('soil/v1/exp_report/page', data).then(res => res), http.post('soil/v1/exp_report/page', data).then(res => res),
deleteReport: data => 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 @@ ...@@ -6,7 +6,10 @@
<div> <div>
<el-tabs v-model="activeName" @tab-click="_changeTabs"> <el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="样品台账" name="sample"> <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>
<el-tab-pane label="试验项目报告台账" name="report"> <el-tab-pane label="试验项目报告台账" name="report">
<ReportInfoMake ref="reportTabs"></ReportInfoMake> <ReportInfoMake ref="reportTabs"></ReportInfoMake>
...@@ -19,11 +22,13 @@ ...@@ -19,11 +22,13 @@
<script> <script>
import ReportInfoMake from './tabs/ReportInfoMake' import ReportInfoMake from './tabs/ReportInfoMake'
import ReportMakeBySample from './tabs/ReportMakeBySample' import ReportMakeBySample from './tabs/ReportMakeBySample'
import SummaryInfo from './tabs/SummaryInfo'
export default { export default {
components: { components: {
ReportMakeBySample, ReportMakeBySample,
ReportInfoMake ReportInfoMake,
SummaryInfo
}, },
data() { data() {
return { return {
...@@ -93,6 +98,9 @@ export default { ...@@ -93,6 +98,9 @@ export default {
console.log(this.entrustId) console.log(this.entrustId)
this.$refs.sampleTabs._open(this.entrustId) this.$refs.sampleTabs._open(this.entrustId)
}, },
_summary() {
this.$refs.summaryTabs._open(this.entrustId)
},
_changeTabs(tab, event) { _changeTabs(tab, event) {
switch (tab.name) { switch (tab.name) {
case 'sample': case 'sample':
...@@ -101,14 +109,17 @@ export default { ...@@ -101,14 +109,17 @@ export default {
case 'report': case 'report':
this._report() this._report()
break break
} case 'summary':
}, this._summary()
_sampleTabResult(msg) { break
if (msg === 'changeTab') {
this.activeName = 'report'
this.$refs.reportTabs._open(this.contractId, this.personal)
} }
} }
// _sampleTabResult(msg) {
// if (msg === 'changeTab') {
// this.activeName = 'report'
// this.$refs.reportTabs._open(this.contractId, this.personal)
// }
// }
} }
} }
</script> </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