Commit b1461a2b by lichengming

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

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