|
|
@ -198,24 +198,24 @@ |
|
|
|
" |
|
|
|
ref="upload" |
|
|
|
class="avatar-uploader" |
|
|
|
:action="uploadUrl" |
|
|
|
:class="{ 'z-full': fmData[item.keyName].length >= item.limit }" |
|
|
|
:action="item.uploadUrl || uploadUrl" |
|
|
|
:data="{ customerId: customerId }" |
|
|
|
:show-file-list="true" |
|
|
|
:list-type="item.listType || 'picture'" |
|
|
|
:limit="item.limit || 100" |
|
|
|
:file-list="fmData[item.keyName]" |
|
|
|
:on-success="(res, file) => handleImgSuccess(res, file, item)" |
|
|
|
:on-error="(res, file) => handleImgError(res, file, item)" |
|
|
|
:on-remove="(res) => handleImgRemove(res, item)" |
|
|
|
:on-exceed="(res) => handleImgExceed(res, item)" |
|
|
|
:before-upload="(file) => beforeImgUpload(file, item)" |
|
|
|
> |
|
|
|
<a |
|
|
|
><i class="el-icon-plus avatar-uploader-icon"></i> 点击上传</a |
|
|
|
> |
|
|
|
<a><i class="el-icon-plus"></i> 点击上传</a> |
|
|
|
</el-upload> |
|
|
|
<el-image |
|
|
|
v-else-if="fmData[item.keyName].length > 0" |
|
|
|
style="width: 100px; height: 50px" |
|
|
|
style="width: 100px; height: 100px" |
|
|
|
:src="fmData[item.keyName][0].url" |
|
|
|
fit="cover" |
|
|
|
:preview-src-list="fmData[item.keyName].map((item) => item.url)" |
|
|
@ -504,7 +504,7 @@ export default { |
|
|
|
|
|
|
|
beforeImgUpload(file, item) { |
|
|
|
if (typeof item.beforeImgUpload == "function") { |
|
|
|
return item.beforeImgUpload(file, item, this); |
|
|
|
if (!item.beforeImgUpload(file, item, this)) return false; |
|
|
|
} |
|
|
|
return true; |
|
|
|
}, |
|
|
@ -532,7 +532,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
handleImgExceed(res, item) { |
|
|
|
console.log(e); |
|
|
|
console.log(res); |
|
|
|
// this.$message({ |
|
|
|
// type: "warning", |
|
|
|
// message: "文件数量最多不超过三个", |
|
|
@ -575,6 +575,10 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
handleImgError(res, file, item) { |
|
|
|
console.log(res); |
|
|
|
}, |
|
|
|
|
|
|
|
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义 |
|
|
|
initMap(item) { |
|
|
|
let { latitude, longitude } = this.$store.state.user; |
|
|
@ -874,7 +878,28 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.avatar-uploader { |
|
|
|
&.z-full { |
|
|
|
/deep/ .el-upload.el-upload--picture-card { |
|
|
|
display: none !important; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
a { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
color: #65a5f9; |
|
|
|
i { |
|
|
|
margin-right: 4px; |
|
|
|
color: #65a5f9; |
|
|
|
font-size: 18px; |
|
|
|
} |
|
|
|
&:hover { |
|
|
|
text-decoration: none; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.item-rich-text { |
|
|
|
width: 600px; |
|
|
|
height: 500px; |
|
|
|