Commit 4d3b7751 by lichengming

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

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