Commit d65af13a by lichengming

修改了报告编制查看样品和报告台账

parent 2629549b
...@@ -82,7 +82,8 @@ ...@@ -82,7 +82,8 @@
<script> <script>
import global from '../../../../api/config' import global from '../../../../api/config'
import http from '../../../../api/http' import http from '../../../../api/http'
import { soilReport } from '../../../../api' import { soilReport, soilTest } from '../../../../api'
import Global from '../../../../api/config'
/** /**
* 报告编制的-待办-报告台账 * 报告编制的-待办-报告台账
...@@ -212,7 +213,8 @@ export default { ...@@ -212,7 +213,8 @@ export default {
this.$refs.refModal._open(data) this.$refs.refModal._open(data)
break break
case '预览/编辑报告': case '预览/编辑报告':
this._viewReport(data) this._reportView(data)
// this._viewReport(data)
break break
case '操作记录': case '操作记录':
this._record(data.id) this._record(data.id)
...@@ -238,16 +240,57 @@ export default { ...@@ -238,16 +240,57 @@ export default {
_upload(id) { _upload(id) {
this.$refs.refModal._open(id) this.$refs.refModal._open(id)
}, },
_reportView(data) {
if (data.objectKey) {
this._reportMakeLook(data)
} else {
this._recordView(data.originalRecordId)
}
},
_reportMakeLook: async function(data) {
console.log(data)
const result = await soilReport.expReportGetById(data.id)
// this._viewReport(data)
// const result = await soilReport.getExcelOriginalRecord(data.id)
if (result) {
console.log('result')
this._viewReport(result)
}
},
_viewReport(data) { _viewReport(data) {
if (data) { if (data) {
this.$openWindowModeless({ this.$openWindowModeless({
objectKey: data.objectKey, objectKey: data.objectKey,
idType: 10, idType: 11,
id: data.id, id: data.id,
isReport: 4 isReport: 4
}) })
} }
}, },
_recordView(originalRecordId) {
let recordUrl = ''
if (process.env.NODE_ENV === 'production') {
recordUrl = 'http://record.patzn.com'
} else {
recordUrl = Global.recordURL
}
// eslint-disable-next-line no-undef
layx.iframe(
'labRecordWriteOriView',
'原始记录预览',
recordUrl + '/print/v1/form/' + originalRecordId + '?type=ENVTESTMAKE',
{
event: {
onload: {
after: function(layxWindow, winform) {
// eslint-disable-next-line no-undef
layx.max(winform.id)
}
}
}
}
)
},
_tableResultChange(msg, data) { _tableResultChange(msg, data) {
switch (msg) { switch (msg) {
case 'page': case 'page':
...@@ -283,7 +326,7 @@ export default { ...@@ -283,7 +326,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())
const result = await soilReport.reportPage( const result = await soilTest.expReportPage(
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
) )
if (result) { if (result) {
......
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