调整新增字段,上传可以下载

This commit is contained in:
shen_yan_pu
2021-07-21 11:13:30 +08:00
parent 3673d37a8d
commit 58c00b6c72
4 changed files with 61 additions and 6 deletions
@@ -87,7 +87,7 @@
label="国家/地区"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.countryArea.indexOf(',') >= 0">
<span v-if="scope.row.countryArea !== null && scope.row.countryArea.indexOf(',') > 0">
<span>{{ scope.row.countryArea }}</span>
</span>
<span v-else>{{ countryAreaMap[scope.row.countryArea] }}</span>
@@ -138,7 +138,7 @@
label="更新时间"
align="center">
<template slot-scope="scope">
<div>{{ scope.row.updateTime ? $moment(scope.row.updateTime).format('YYYY-MM-DD hh:mm:ss') : scope.row.updateTime }}</div>
<div>{{ scope.row.updateTime ? $moment(scope.row.updateTime).format('YYYY-MM-DD') : scope.row.updateTime }}</div>
</template>
</el-table-column>
<el-table-column
@@ -70,6 +70,7 @@
:on-remove="delFileInfo"
:on-success="uploadBackSuccess"
:before-upload="beforeUpload"
:on-preview="handleOnPreview"
>
<el-button class="common-button-default" size="mini">
点击上传
@@ -225,17 +226,26 @@
prop="issueTime"
sortable
label="发布日期">
<template slot-scope="scope">
<span>{{ scope.row.issueTime ? $moment(scope.row.issueTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="xcxssrq"
prop="xcxssrqgj"
sortable
label="新车型实施日期">
<template slot-scope="scope">
<span>{{ scope.row.xcxssrqgj ? $moment(scope.row.xcxssrqgj).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="zccssrq"
prop="zccssrqgj"
sortable
label="在产车实施日期">
<template slot-scope="scope">
<span>{{ scope.row.zccssrqgj ? $moment(scope.row.zccssrqgj).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
@@ -376,6 +386,9 @@
width="210px"
align="center"
label="在产车实施日期">
<template slot-scope="scope">
<span>{{ scope.row.zccssrqgj ? $moment(scope.row.zccssrqgj).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="xcxssrqgj"
@@ -383,6 +396,9 @@
align="center"
width="210px"
label="新车型实施日期">
<template slot-scope="scope">
<span>{{ scope.row.xcxssrqgj ? $moment(scope.row.xcxssrqgj).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
@@ -554,6 +570,7 @@ export default {
nylxMap: {},
zrbmMap: {},
sycpxMap: {},
zrbmOptions: [],
selectSearch : [],
// 新增、编辑 基础信息字段
sarAccessEO: {
@@ -879,6 +896,14 @@ export default {
fileList.pop()
}
},
// 点击上传的文件进行下载
handleOnPreview(file) {
let attId = file.id
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
},
// 相关附件 上传之前钩子
beforeUpload (file) {
var filename = file.name
@@ -1257,6 +1282,19 @@ export default {
_this: this
}, res =>{
this.sarAccessInfoSearchList = res.data.list
this.sarAccessInfoSearchList.forEach(item => {
this.$set(item, 'zccssrqgj', item.attrInfoMap.ZCCSSRQGJ)
this.$set(item, 'xcxssrqgj', item.attrInfoMap.XCXSSRQGJ)
this.$set(item, 'sycpx', item.attrInfoMap.SYCPX)
this.$set(item, 'typeApplicable', item.attrInfoMap.CLLX)
this.$set(item, 'nylx', item.attrInfoMap.NYLX)
this.$set(item, 'zrbm', item.attrInfoMap.ZRBM)
this.$set(item, 'cycvppsbm', item.attrInfoMap.CYCVPPSBM)
this.$set(item, 'cycvppscn', item.attrInfoMap.CYCVPPSCN)
this.$set(item, 'kccvppsbm', item.attrInfoMap.KCCVPPSBM)
this.$set(item, 'kccvppscn', item.attrInfoMap.KCCVPPSCN)
})
console.log(this.sarAccessInfoSearchList)
}, e => {
})
},
@@ -1714,6 +1752,7 @@ export default {
_this: this
}, res => {
this.sarAccessInfoList = res.data
console.log(res.data)
}, e => {
})
},
@@ -55,6 +55,7 @@
:on-remove="delFileInfo"
:on-success="uploadBackSuccess"
:before-upload="beforeUpload"
:on-preview="handleOnPreview"
>
<el-button class="common-button-default" size="mini">
点击上传
@@ -1716,7 +1717,14 @@ export default {
this.$set(this.zrbmMap, item.value, item.label)
this.$set(this.sycpxMap, item.value, item.label)
})
}
},
// 点击上传的文件进行下载
handleOnPreview(file) {
let attId = file.id
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
},
},
watch: {
// 监听 清单类型
@@ -55,6 +55,7 @@
:on-remove="delFileInfo"
:on-success="uploadBackSuccess"
:before-upload="beforeUpload"
:on-preview="handleOnPreview"
>
<el-button class="common-button-default" size="mini">
点击上传
@@ -1716,7 +1717,14 @@ export default {
this.$set(this.zrbmMap, item.value, item.label)
this.$set(this.sycpxMap, item.value, item.label)
})
}
},
// 点击上传的文件进行下载
handleOnPreview(file) {
let attId = file.id
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
},
},
watch: {
// 监听 清单类型