Commit 22c5fa4d by lichengming

修改了报告编制生成报告

parent d43f0059
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
fixed="right"> fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<VXEIconList <VXEIconList
:msg="scope.row.type === 'jpg'||scope.row.type === 'jpeg'||scope.row.type === 'pdf'||scope.row.type === 'png'||scope.row.type === 'xlsx'||scope.row.type === 'docx'||scope.row.type === 'bmp' ?iconMsgJpg:iconMsg" :msg="scope.row.type === 'jpg'||scope.row.type === 'jpeg'||scope.row.type === 'pdf'||scope.row.type === 'png'||scope.row.type === 'xlsx'||scope.row.type === 'docx'||scope.row.type === 'bmp'||scope.row.type === 'webp' ?iconMsgJpg:iconMsg"
@on-result-change="_iconClick" :rowData="scope.row"></VXEIconList> @on-result-change="_iconClick" :rowData="scope.row"></VXEIconList>
</template> </template>
</vxe-table-column> </vxe-table-column>
...@@ -180,7 +180,29 @@ export default { ...@@ -180,7 +180,29 @@ export default {
contractId: undefined, contractId: undefined,
entrustId: undefined entrustId: undefined
}, },
format: ['jpg', 'bmp', 'jpeg', 'png'], format: [
'jpg',
'bmp',
'jpeg',
'png',
'tif',
'gif',
'pcx',
'tga',
'exif',
'fpx',
'svg',
'psd',
'cdr',
'pcd',
'dxf',
'ufo',
'eps',
'ai',
'raw',
'WMF',
'webp'
],
viewVal: 1, viewVal: 1,
viewStyle: 1, viewStyle: 1,
menusList: [ menusList: [
...@@ -271,6 +293,7 @@ export default { ...@@ -271,6 +293,7 @@ export default {
fileList[i].type === 'jpg' || fileList[i].type === 'jpg' ||
fileList[i].type === 'jpeg' || fileList[i].type === 'jpeg' ||
fileList[i].type === 'bmp' || fileList[i].type === 'bmp' ||
fileList[i].type === 'webp' ||
fileList[i].type === 'png' fileList[i].type === 'png'
) { ) {
list.push(result.records[i]) list.push(result.records[i])
...@@ -355,6 +378,12 @@ export default { ...@@ -355,6 +378,12 @@ export default {
this.imgViewList = jpegViewList this.imgViewList = jpegViewList
this.imgViewIndex = 0 this.imgViewIndex = 0
break break
case 'webp':
const webpViewList = []
webpViewList.push(global.baseURL + this.downloadFileUrlFile + data.id)
this.imgViewList = webpViewList
this.imgViewIndex = 0
break
case 'pdf': case 'pdf':
this.$pdfView(data.objectKey) this.$pdfView(data.objectKey)
break break
......
...@@ -15,11 +15,9 @@ ...@@ -15,11 +15,9 @@
:on-success="_handelsuccess" :on-success="_handelsuccess"
:before-upload="_beupload" :before-upload="_beupload"
:on-progress="_handelprogress" :on-progress="_handelprogress"
:on-format-error="_formatError"
:data="dataObj" :data="dataObj"
:with-credentials="true" :with-credentials="true"
:show-upload-list="false" :show-upload-list="false"
:format="format"
style="float: left"> style="float: left">
<Button>上传</Button> <Button>上传</Button>
</Upload> </Upload>
...@@ -62,7 +60,7 @@ ...@@ -62,7 +60,7 @@
fixed="right"> fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<VXEIconList <VXEIconList
:msg="scope.row.type === 'jpg'||scope.row.type === 'jpeg'||scope.row.type === 'pdf'||scope.row.type === 'png'||scope.row.type === 'xlsx'||scope.row.type === 'docx'||scope.row.type === 'bmp' ?iconMsgJpg:iconMsg" :msg="scope.row.type === 'jpg'||scope.row.type === 'jpeg'||scope.row.type === 'pdf'||scope.row.type === 'png'||scope.row.type === 'xlsx'||scope.row.type === 'docx'||scope.row.type === 'bmp'||scope.row.type === 'webp' ?iconMsgJpg:iconMsg"
@on-result-change="_iconClick" :rowData="scope.row"></VXEIconList> @on-result-change="_iconClick" :rowData="scope.row"></VXEIconList>
</template> </template>
</vxe-table-column> </vxe-table-column>
...@@ -180,7 +178,6 @@ export default { ...@@ -180,7 +178,6 @@ export default {
contractId: undefined, contractId: undefined,
entrustId: undefined entrustId: undefined
}, },
format: ['xls', 'xlsx', 'xlsm', 'doc', 'docx', 'pdf', 'txt'],
viewVal: 1, viewVal: 1,
viewStyle: 1, viewStyle: 1,
menusList: [ menusList: [
...@@ -222,13 +219,6 @@ export default { ...@@ -222,13 +219,6 @@ export default {
this.$refs.batchUpload._open(this.id) this.$refs.batchUpload._open(this.id)
} }
}, },
_formatError(file) {
this.$Notice.error({
title: '文件格式不正确',
duration: 10,
desc: '文件格式不正确,请上传格式为jpg, bmp, jpeg, png的文件!'
})
},
_setUploadData(data, idsObj, idKey) { _setUploadData(data, idsObj, idKey) {
this.selectIds = [] this.selectIds = []
this.imgViewIndex = null this.imgViewIndex = null
...@@ -263,23 +253,7 @@ export default { ...@@ -263,23 +253,7 @@ export default {
) )
if (result) { if (result) {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
const list = []
const fileList = result.records
for (let i = 0; i < fileList.length; i++) {
if (
fileList[i].type === 'xlsx' ||
fileList[i].type === 'xlsm' ||
fileList[i].type === 'xls' ||
fileList[i].type === 'doc' ||
fileList[i].type === 'docx' ||
fileList[i].type === 'txt' ||
fileList[i].type === 'pdf'
) {
list.push(result.records[i])
}
}
this.getPage = result this.getPage = result
this.getPage.records = list
} }
}, },
// _page: async function() { // _page: async function() {
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<Input v-model="formObj.latitude" name="latitude" placeholder="请输入纬度"/> <Input v-model="formObj.latitude" name="latitude" placeholder="请输入纬度"/>
</Form-item> </Form-item>
<Form-item label="水深(米)" prop="waterDepth" class="width-48"> <Form-item label="水深(米)" prop="waterDepth" class="width-48">
<Input v-model="formObj.waterDepth" @keydown.native="channelInputLimit" type="number" name="waterDepth" placeholder="请输入深度"/> <Input v-model="formObj.waterDepth" name="waterDepth" placeholder="请输入深度"/>
</Form-item> </Form-item>
<Form-item label="平均容重" prop="projectNo" class="width-48"> <Form-item label="平均容重" prop="projectNo" class="width-48">
<Input v-model="formObj.projectNo" name="projectNo" placeholder="请输入平均容重"/> <Input v-model="formObj.projectNo" name="projectNo" placeholder="请输入平均容重"/>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
></Input> ></Input>
</div> </div>
<div v-else-if="item.key==='sampleCode'"> <div v-else-if="item.key==='sampleCode'">
{{scope.row[item.key]+'--'}}{{Number(scope.row.index)+1}} {{scope.row[item.key]+'-'}}{{Number(scope.row.index)+1}}
</div> </div>
<span v-else> <span v-else>
{{ scope.row[item.key] }} {{ scope.row[item.key] }}
......
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