Commit 31582de9 by lichengming

修改了报告编制

parent fcda5bdf
......@@ -84,5 +84,9 @@ export default {
reportMake: data =>
https
.post('soil/v1/report/make_report', JSON.stringify(data))
.then(res => res)
.then(res => res),
getReport: data =>
http.get('soil/v1/report/get_report_' + data).then(res => res),
getToken: data =>
http.get('/print/url/get_access_token', data).then(res => res)
}
......@@ -237,6 +237,7 @@ export default {
title: '提示',
content: '确定这' + this.selectIds.length + '条数据生成报告',
onOk: () => {
this.openTooltip()
this._reportMakeOk()
}
})
......@@ -252,6 +253,13 @@ export default {
this._page()
}
},
openTooltip() {
this.$notify.info({
title: '提示',
message: '正在生成,请稍后',
duration: 3000
})
},
// 设置填写人乙
_setAnotherTester() {
if (this.selectIds.length === 0) {
......
......@@ -85,7 +85,7 @@
</div>
</template>
<script>
import { soilStatistics } from '../../../../api'
import { soilSample, soilStatistics } from '../../../../api'
import SampleByMakeModal from '../SampleByMakeModal'
import Operation from '../../../../components/operation/Operation'
import OriginalRecordView from '../OriginalRecordView'
......@@ -107,6 +107,7 @@ export default {
{ title: '委托编号', key: 'entrustCode', width: 180 },
{ title: '报告编号', key: 'reportCode', width: 180 },
{ title: '水深', key: 'waterDepth', width: 180 },
{ title: '报告是否编制', key: 'reported', width: 180 },
{ title: '状态', key: 'status', width: 110, status: true },
{ title: '委托日期', key: 'entrustDate', width: 180, date: true },
{ title: '进度', key: 'progress', width: 110, status: true },
......@@ -124,6 +125,11 @@ export default {
id: '',
name: '查看原始记录'
},
{
type: 'ios-book',
id: '',
name: '编辑报告'
},
// {
// type: 'ios-document-outline',
// id: '',
......@@ -217,6 +223,9 @@ export default {
case '查看原始记录':
this.$refs.originalRecordView._open(data.id)
break
case '编辑报告':
this._viewReport(data.id)
break
case '检测项目':
this.$refs.refModal._open(data)
break
......@@ -229,6 +238,20 @@ export default {
}
})
},
_viewReport: async function(id) {
const result = await soilSample.getReport(id)
if (result) {
this._reportEdit(result, id)
}
},
_reportEdit(data, id) {
this.$openWindowModeless({
objectKey: data.objectKey,
id: id,
idType: 11,
isReport: 4
})
},
_operationRecord(id) {
// 操作日志
this.$refs.operation._open(id)
......
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