Commit 4d3b7751 by lichengming

修改了试验项目原始记录查看

parent 365a29c1
......@@ -45,5 +45,9 @@ export default {
saveItem: data =>
http
.post('soil/v1/original_record/save_original_record', data)
.then(res => res)
.then(res => res),
recordPage: data =>
http.post('soil/v1/original_record/page', data).then(res => res),
pageTest: data =>
http.post('soil/v1/experiment/page_test', data).then(res => res)
}
......@@ -11,6 +11,9 @@
<el-tab-pane label="按样品录入" name="waitScan">
<WaitScan ref="waitScanModal"></WaitScan>
</el-tab-pane>
<el-tab-pane label="查看原始记录" name="viewRecord">
<OriginalRecordView ref="recordModal"></OriginalRecordView>
</el-tab-pane>
</el-tabs>
<!-- <keep-alive>-->
<!-- &lt;!&ndash; eslint-disable-next-line vue/require-component-is &ndash;&gt;-->
......@@ -23,11 +26,13 @@
<script>
import WaitReceive from './item-tabs/ItemTabs'
import WaitScan from './sample-tabs/SampleTabs'
import OriginalRecordView from './OriginalRecordView'
export default {
components: {
WaitReceive,
WaitScan
WaitScan,
OriginalRecordView
},
data() {
return {
......@@ -69,8 +74,9 @@ export default {
this.$refs.alreadyIssuedModal._open(this.contractId, this.type)
},
_changeTabs(tab, event) {
if (tab.name === 'alreadyIssued') {
if (tab.name === 'viewRecord') {
// this._issuedPage()
this.$refs.recordModal._open(this.entrustId)
} else if (tab.name === 'waitReceive') {
// this._waitPage()
this.$refs.waitScanModal._clearTable()
......
......@@ -306,8 +306,9 @@ export default {
this.$refs.refModal._open(tempData, 'planDate')
}
},
_open(data) {
_open(id, data) {
this.getPage.records = []
console.log(id)
this.sampleIds = data
if (data.length === 0) {
this.$set(this.getPage, 'records', [])
......@@ -338,7 +339,7 @@ export default {
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.formObj.sampleIds = this.sampleIds
const result = await soilTest.pageAllot(this.$serializeForm(this.formObj))
const result = await soilTest.pageTest(this.$serializeForm(this.formObj))
if (result) {
this.$refs.pageTable._hideLoading()
this.$refs.pageTable._checkAll()
......
......@@ -23,16 +23,19 @@ export default {
ItemRightList
},
data() {
return {}
return {
id: ''
}
},
methods: {
_leftResult(data) {
this.$refs.SamplerightModal._open(data)
this.$refs.SamplerightModal._open(this.id, data)
},
_rightResult() {
this.$refs.SampleleftModal._page()
},
_open(id) {
this.id = id
this.$refs.SampleleftModal._open(id)
// this.$refs.rightModal._getColumn()
},
......
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