Commit b1461a2b by lichengming

修改了复核审核查看原始记录

parent dab034c5
......@@ -56,7 +56,7 @@
</template>
<script>
import Global from '../../../../api/config'
import { soilTest } from '../../../../api'
import { soilReport, soilTest } from '../../../../api'
import AssignPerson from '../../../../components/user-info-single/assignPerson'
import EquipManage from '../EquipManage'
// import SelectOriTempRecord from '../SelectOriTempRecord'
......@@ -176,9 +176,8 @@ export default {
this.$nextTick(() => {
switch (res) {
case '查看原始记录':
console.log(data)
if (data.recordId) {
this._viewRecord(data.recordId)
if (data.recorded === '是') {
this._recordLook(data)
} else {
this.$Message.warning('尚未填写原始记录')
}
......@@ -192,6 +191,29 @@ export default {
}
})
},
_recordLook(data) {
if (data.objectKey) {
this._reportMakeLook(data)
} else {
this._viewRecord(data.recordId)
}
},
_reportMakeLook: async function(data) {
const result = await soilReport.getExcelOriginalRecord(data.id)
if (result) {
this._viewReport(result)
}
},
_viewReport(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.objectKey,
idType: 10,
id: data.id,
isReport: 4
})
}
},
_equipManage(data) {
this.$refs.equipModal._open(data)
},
......
......@@ -55,7 +55,7 @@
</template>
<script>
import Global from '../../../../api/config'
import { soilTest } from '../../../../api'
import { soilReport, soilTest } from '../../../../api'
import AssignPerson from '../../../../components/user-info-single/assignPerson'
import IndexManage from '../IndexManage'
import Reason from '../../../../components/base/Reason'
......@@ -437,9 +437,8 @@ export default {
this.$nextTick(() => {
switch (res) {
case '查看原始记录':
console.log(data)
if (data.recordId) {
this._viewRecord(data.recordId)
if (data.recorded === '是') {
this._recordLook(data)
} else {
this.$Message.warning('尚未填写原始记录')
}
......@@ -453,6 +452,29 @@ export default {
}
})
},
_recordLook(data) {
if (data.objectKey) {
this._reportMakeLook(data)
} else {
this._viewRecord(data.recordId)
}
},
_reportMakeLook: async function(data) {
const result = await soilReport.getExcelOriginalRecord(data.id)
if (result) {
this._viewReport(result)
}
},
_viewReport(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.objectKey,
idType: 10,
id: data.id,
isReport: 4
})
}
},
_equipManage(data) {
this.$refs.equipModal._open(data)
},
......
......@@ -56,7 +56,7 @@
</template>
<script>
import Global from '../../../../api/config'
import { soilTest } from '../../../../api'
import { soilReport, soilTest } from '../../../../api'
import AssignPerson from '../../../../components/user-info-single/assignPerson'
import EquipManage from '../EquipManage'
// import SelectOriTempRecord from '../SelectOriTempRecord'
......@@ -176,9 +176,8 @@ export default {
this.$nextTick(() => {
switch (res) {
case '查看原始记录':
console.log(data)
if (data.recordId) {
this._viewRecord(data.recordId)
if (data.recorded === '是') {
this._recordLook(data)
} else {
this.$Message.warning('尚未填写原始记录')
}
......@@ -192,6 +191,29 @@ export default {
}
})
},
_recordLook(data) {
if (data.objectKey) {
this._reportMakeLook(data)
} else {
this._viewRecord(data.recordId)
}
},
_reportMakeLook: async function(data) {
const result = await soilReport.getExcelOriginalRecord(data.id)
if (result) {
this._viewReport(result)
}
},
_viewReport(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.objectKey,
idType: 10,
id: data.id,
isReport: 4
})
}
},
_equipManage(data) {
this.$refs.equipModal._open(data)
},
......
......@@ -55,7 +55,7 @@
</template>
<script>
import Global from '../../../../api/config'
import { soilTest } from '../../../../api'
import { soilReport, soilTest } from '../../../../api'
import AssignPerson from '../../../../components/user-info-single/assignPerson'
import IndexManage from '../IndexManage'
import Reason from '../../../../components/base/Reason'
......@@ -430,9 +430,8 @@ export default {
this.$nextTick(() => {
switch (res) {
case '查看原始记录':
console.log(data)
if (data.recordId) {
this._viewRecord(data.recordId)
if (data.recorded === '是') {
this._recordLook(data)
} else {
this.$Message.warning('尚未填写原始记录')
}
......@@ -446,6 +445,29 @@ export default {
}
})
},
_recordLook(data) {
if (data.objectKey) {
this._reportMakeLook(data)
} else {
this._viewRecord(data.recordId)
}
},
_reportMakeLook: async function(data) {
const result = await soilReport.getExcelOriginalRecord(data.id)
if (result) {
this._viewReport(result)
}
},
_viewReport(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.objectKey,
idType: 10,
id: data.id,
isReport: 4
})
}
},
_equipManage(data) {
this.$refs.equipModal._open(data)
},
......
......@@ -227,7 +227,6 @@ export default {
}
},
_reportMakeLook: async function(data) {
console.log(data)
const result = await soilReport.getExcelOriginalRecord(data.id)
if (result) {
this._viewReport(result)
......@@ -256,6 +255,7 @@ export default {
ids: this.selectIds.join(','),
templateId: data.id
})
this.$refs.pageTable._hideLoading()
if (result) {
await this._page()
if (result === null || result === undefined) {
......
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