21 changed files with 951 additions and 34 deletions
@ -0,0 +1,58 @@ |
|||||
|
<template> |
||||
|
<div class="body1"> |
||||
|
<p class="title">资产概况</p> |
||||
|
<div class="img_span1"> |
||||
|
<span v-for="(item,index) in img_data " :key="index" @click="onPreview(item.url)">{{item.name}}({{item.url.length}})</span> |
||||
|
<el-image-viewer |
||||
|
v-if="showViewer" |
||||
|
:on-close="closeViewer" |
||||
|
:url-list="img_url" |
||||
|
:z-index="9999" |
||||
|
/> |
||||
|
</div> |
||||
|
<p class="p_info">资产名称:{{contentDatas.asset_data.serial_name}}</p> |
||||
|
<p class="p_info">资产类型:{{contentDatas.asset_data.asset_type_id}}</p> |
||||
|
<p class="p_info">转让价格:¥{{contentDatas.asset_data.price}}元/{{contentDatas.asset_data.asset_unit}}</p> |
||||
|
<p class="p_info">涉及数量:{{contentDatas.asset_data.count}}</p> |
||||
|
<p class="p_info">资产转让有效期:{{contentDatas.asset_data.reg_money}}</p> |
||||
|
<p class="p_info">基本回报:{{contentDatas.asset_data.legal_name}}</p> |
||||
|
<p class="p_info">额外回报:{{contentDatas.asset_data.domicile}}</p> |
||||
|
<p class="p_info">其他:{{contentDatas.asset_data.establish_time }}</p> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
export default { |
||||
|
components: { |
||||
|
ElImageViewer: () => import('element-ui/packages/image/src/image-viewer') |
||||
|
}, |
||||
|
props:{ |
||||
|
contentDatas:{ |
||||
|
require: true |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return{ |
||||
|
img_data:[], |
||||
|
showViewer:false, |
||||
|
img_url:[] |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
onPreview(img) { |
||||
|
this.img_url = img |
||||
|
this.showViewer = true |
||||
|
}, |
||||
|
// 关闭查看器 |
||||
|
closeViewer() { |
||||
|
this.showViewer = false |
||||
|
}, |
||||
|
}, |
||||
|
created(){ |
||||
|
this.img_data=[{name:'资产图片',url:[this.contentDatas.asset_data.serial_img]} |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
@import url('../../../../assets/css/sidebar.css'); |
||||
|
</style> |
||||
@ -0,0 +1,90 @@ |
|||||
|
<template> |
||||
|
<div class="body1"> |
||||
|
<p class="title">营业执照(复印件)</p> |
||||
|
<img :src="contentDatas.bank_account_certificate" class="file_img"> |
||||
|
<div class="img_span"> |
||||
|
<span @click="onPreview([contentDatas.bank_account_certificate])">查看原图</span> |
||||
|
<el-upload |
||||
|
class="upload-demo" |
||||
|
:action="action" |
||||
|
:on-change="fileChange" |
||||
|
:show-file-list="false" |
||||
|
:on-error="handleAvatarError" |
||||
|
list-type="picture" |
||||
|
:on-success="(res)=>{handleAvatarSuccess(res,0)}" |
||||
|
> |
||||
|
<span class="upload_span">重新上传</span> |
||||
|
</el-upload> |
||||
|
</div> |
||||
|
<el-image-viewer |
||||
|
v-if="showViewer" |
||||
|
:on-close="closeViewer" |
||||
|
:url-list="img_url" |
||||
|
:z-index="9999" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import bus from '../../bus' |
||||
|
export default { |
||||
|
props:{ |
||||
|
contentDatas:{ |
||||
|
require: true |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
ElImageViewer: () => import('element-ui/packages/image/src/image-viewer') |
||||
|
}, |
||||
|
data() { |
||||
|
return{ |
||||
|
host:'http://wenhua.xingtongworld.com', |
||||
|
action:'http://wenhua.xingtongworld.com/api/Index/uploadimg', |
||||
|
showViewer:false, |
||||
|
img_url:[] |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
onPreview(img) { |
||||
|
this.img_url = img |
||||
|
this.showViewer = true |
||||
|
}, |
||||
|
// 关闭查看器 |
||||
|
closeViewer() { |
||||
|
this.showViewer = false |
||||
|
}, |
||||
|
handleAvatarError(){ |
||||
|
this.$message.error('文件上传失败!'); |
||||
|
}, |
||||
|
handleAvatarSuccess(res,type){ |
||||
|
console.info(res) |
||||
|
if(res.code==1){ |
||||
|
let upDate={ |
||||
|
url:this.host+res.data.img_url, |
||||
|
key:'bank_account_certificate' |
||||
|
} |
||||
|
bus.$emit('img', upDate); |
||||
|
this.$message.success('文件上传成功!'); |
||||
|
} |
||||
|
}, |
||||
|
fileChange(file){ |
||||
|
const typeArr = ['image/png', 'image/gif', 'image/jpeg', 'image/jpg']; |
||||
|
const isJPG = typeArr.indexOf(file.raw.type) !== -1; |
||||
|
const isLt3M = file.size / 1024 / 1024 < 3; |
||||
|
if (!isJPG) { |
||||
|
this.$message.error('只能是图片!'); |
||||
|
this.$refs.upload.clearFiles(); |
||||
|
return; |
||||
|
} |
||||
|
if (!isLt3M) { |
||||
|
this.$message.error('上传图片大小不能超过 3MB!'); |
||||
|
this.$refs.upload.clearFiles(); |
||||
|
// this.$set(this.query, 'goods_img', ''); |
||||
|
return; |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
@import url('../../../../assets/css/sidebar.css'); |
||||
|
</style> |
||||
@ -0,0 +1,90 @@ |
|||||
|
<template> |
||||
|
<div class="body1"> |
||||
|
<p class="title">营业执照(复印件)</p> |
||||
|
<img :src="contentDatas.legal_certificate" class="file_img"> |
||||
|
<div class="img_span"> |
||||
|
<span @click="onPreview([contentDatas.legal_certificate])">查看原图</span> |
||||
|
<el-upload |
||||
|
class="upload-demo" |
||||
|
:action="action" |
||||
|
:on-change="fileChange" |
||||
|
:show-file-list="false" |
||||
|
:on-error="handleAvatarError" |
||||
|
list-type="picture" |
||||
|
:on-success="(res)=>{handleAvatarSuccess(res,0)}" |
||||
|
> |
||||
|
<span class="upload_span">重新上传</span> |
||||
|
</el-upload> |
||||
|
</div> |
||||
|
<el-image-viewer |
||||
|
v-if="showViewer" |
||||
|
:on-close="closeViewer" |
||||
|
:url-list="img_url" |
||||
|
:z-index="9999" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import bus from '../../bus' |
||||
|
export default { |
||||
|
props:{ |
||||
|
contentDatas:{ |
||||
|
require: true |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
ElImageViewer: () => import('element-ui/packages/image/src/image-viewer') |
||||
|
}, |
||||
|
data() { |
||||
|
return{ |
||||
|
host:'http://wenhua.xingtongworld.com', |
||||
|
action:'http://wenhua.xingtongworld.com/api/Index/uploadimg', |
||||
|
showViewer:false, |
||||
|
img_url:[] |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
onPreview(img) { |
||||
|
this.img_url = img |
||||
|
this.showViewer = true |
||||
|
}, |
||||
|
// 关闭查看器 |
||||
|
closeViewer() { |
||||
|
this.showViewer = false |
||||
|
}, |
||||
|
handleAvatarError(){ |
||||
|
this.$message.error('文件上传失败!'); |
||||
|
}, |
||||
|
handleAvatarSuccess(res,type){ |
||||
|
console.info(res) |
||||
|
if(res.code==1){ |
||||
|
let upDate={ |
||||
|
url:this.host+res.data.img_url, |
||||
|
key:'legal_certificate' |
||||
|
} |
||||
|
bus.$emit('img', upDate); |
||||
|
this.$message.success('文件上传成功!'); |
||||
|
} |
||||
|
}, |
||||
|
fileChange(file){ |
||||
|
const typeArr = ['image/png', 'image/gif', 'image/jpeg', 'image/jpg']; |
||||
|
const isJPG = typeArr.indexOf(file.raw.type) !== -1; |
||||
|
const isLt3M = file.size / 1024 / 1024 < 3; |
||||
|
if (!isJPG) { |
||||
|
this.$message.error('只能是图片!'); |
||||
|
this.$refs.upload.clearFiles(); |
||||
|
return; |
||||
|
} |
||||
|
if (!isLt3M) { |
||||
|
this.$message.error('上传图片大小不能超过 3MB!'); |
||||
|
this.$refs.upload.clearFiles(); |
||||
|
// this.$set(this.query, 'goods_img', ''); |
||||
|
return; |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
@import url('../../../../assets/css/sidebar.css'); |
||||
|
</style> |
||||
@ -0,0 +1,35 @@ |
|||||
|
<template> |
||||
|
<div class="body1"> |
||||
|
<p class="title">文化大数据标准编号</p> |
||||
|
<p class="p_info dataNumber"> |
||||
|
<span>标准编号规则:T/CPRA + </span> |
||||
|
<el-input v-model="input" placeholder="字标准体系代码缩写" class="dataNumber_input"></el-input> |
||||
|
<el-input v-model="input" placeholder="标准分配序号" class="dataNumber_input"></el-input> |
||||
|
<el-input v-model="input" placeholder="." class="dataNumber_input1"></el-input> |
||||
|
<el-input v-model="input" placeholder="部分编号" class="dataNumber_input margin_right"></el-input> |
||||
|
<span>建议编号:T/CPRA3100.01</span> |
||||
|
<span class="span_blue span_left">生成标准编号</span> |
||||
|
</p> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
export default { |
||||
|
props:{ |
||||
|
contentDatas:{ |
||||
|
require: true |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return{ |
||||
|
input:'' |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
}, |
||||
|
created(){ |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
@import url('../../../../assets/css/sidebar.css'); |
||||
|
</style> |
||||
@ -0,0 +1,130 @@ |
|||||
|
<template> |
||||
|
<div class="body1"> |
||||
|
<p class="title">其他要求文件</p> |
||||
|
<div class="else_file"> |
||||
|
<div> |
||||
|
<img :src="contentDatas.else_file[0]" class="file_img"> |
||||
|
<div class="img_span"> |
||||
|
<span @click="onPreview([contentDatas.else_file[0]])">查看原图</span> |
||||
|
<el-upload |
||||
|
class="upload-demo" |
||||
|
:action="action" |
||||
|
:on-change="fileChange" |
||||
|
:show-file-list="false" |
||||
|
:on-error="handleAvatarError" |
||||
|
list-type="picture" |
||||
|
:on-success="(res)=>{handleAvatarSuccess(res,0,0)}" |
||||
|
> |
||||
|
<span class="upload_span">重新上传</span> |
||||
|
</el-upload> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="else_file_right" v-if="contentDatas.else_file.length>1"> |
||||
|
<div class="img_span else_files" v-for="(item,index) in contentDatas.else_file" :key="index"> |
||||
|
<template v-if="index!=0"> |
||||
|
<span>资质证明文件{{index}}</span> |
||||
|
<div class="img_span"> |
||||
|
<span @click="onPreview([item])">查看原图</span> |
||||
|
<el-upload |
||||
|
class="upload-demo" |
||||
|
:action="action" |
||||
|
:on-change="fileChange" |
||||
|
:show-file-list="false" |
||||
|
:on-error="handleAvatarError" |
||||
|
list-type="picture" |
||||
|
:on-success="(res)=>{handleAvatarSuccess(res,0,index)}" |
||||
|
> |
||||
|
<span class="upload_span">重新上传</span> |
||||
|
</el-upload> |
||||
|
</div> |
||||
|
</template> |
||||
|
</div> |
||||
|
<div class="img_span"> |
||||
|
<el-upload |
||||
|
class="upload-demo" |
||||
|
:action="action" |
||||
|
:on-change="fileChange" |
||||
|
:show-file-list="false" |
||||
|
:on-error="handleAvatarError" |
||||
|
list-type="picture" |
||||
|
:on-success="(res)=>{handleAvatarSuccess(res,1)}" |
||||
|
> |
||||
|
<span class="upload_span">+上传更多文件</span> |
||||
|
</el-upload> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<el-image-viewer |
||||
|
v-if="showViewer" |
||||
|
:on-close="closeViewer" |
||||
|
:url-list="img_url" |
||||
|
:z-index="9999" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import bus from '../../bus' |
||||
|
export default { |
||||
|
props:{ |
||||
|
contentDatas:{ |
||||
|
require: true, |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
ElImageViewer: () => import('element-ui/packages/image/src/image-viewer') |
||||
|
}, |
||||
|
data() { |
||||
|
return{ |
||||
|
host:'http://wenhua.xingtongworld.com', |
||||
|
action:'http://wenhua.xingtongworld.com/api/Index/uploadimg', |
||||
|
showViewer:false, |
||||
|
img_url:[] |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
onPreview(img) { |
||||
|
this.img_url = img |
||||
|
this.showViewer = true |
||||
|
}, |
||||
|
// 关闭查看器 |
||||
|
closeViewer() { |
||||
|
this.showViewer = false |
||||
|
}, |
||||
|
handleAvatarError(){ |
||||
|
this.$message.error('文件上传失败!'); |
||||
|
}, |
||||
|
handleAvatarSuccess(res,type,index){ |
||||
|
console.info(res) |
||||
|
if(res.code==1){ |
||||
|
let upDate={ |
||||
|
url:this.host+res.data.img_url, |
||||
|
key:'else_file', |
||||
|
index:index, |
||||
|
type:type |
||||
|
} |
||||
|
bus.$emit('img', upDate); |
||||
|
this.$message.success('文件上传成功!'); |
||||
|
} |
||||
|
}, |
||||
|
fileChange(file){ |
||||
|
const typeArr = ['image/png', 'image/gif', 'image/jpeg', 'image/jpg']; |
||||
|
const isJPG = typeArr.indexOf(file.raw.type) !== -1; |
||||
|
const isLt3M = file.size / 1024 / 1024 < 3; |
||||
|
if (!isJPG) { |
||||
|
this.$message.error('只能是图片!'); |
||||
|
this.$refs.upload.clearFiles(); |
||||
|
return; |
||||
|
} |
||||
|
if (!isLt3M) { |
||||
|
this.$message.error('上传图片大小不能超过 3MB!'); |
||||
|
this.$refs.upload.clearFiles(); |
||||
|
// this.$set(this.query, 'goods_img', ''); |
||||
|
return; |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
@import url('../../../../assets/css/sidebar.css'); |
||||
|
</style> |
||||
@ -0,0 +1,90 @@ |
|||||
|
<template> |
||||
|
<div class="body1"> |
||||
|
<p class="title">营业执照(复印件)</p> |
||||
|
<img :src="contentDatas.legal_authorization" class="file_img"> |
||||
|
<div class="img_span"> |
||||
|
<span @click="onPreview([contentDatas.legal_authorization])">查看原图</span> |
||||
|
<el-upload |
||||
|
class="upload-demo" |
||||
|
:action="action" |
||||
|
:on-change="fileChange" |
||||
|
:show-file-list="false" |
||||
|
:on-error="handleAvatarError" |
||||
|
list-type="picture" |
||||
|
:on-success="(res)=>{handleAvatarSuccess(res,0)}" |
||||
|
> |
||||
|
<span class="upload_span">重新上传</span> |
||||
|
</el-upload> |
||||
|
</div> |
||||
|
<el-image-viewer |
||||
|
v-if="showViewer" |
||||
|
:on-close="closeViewer" |
||||
|
:url-list="img_url" |
||||
|
:z-index="9999" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import bus from '../../bus' |
||||
|
export default { |
||||
|
props:{ |
||||
|
contentDatas:{ |
||||
|
require: true |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
ElImageViewer: () => import('element-ui/packages/image/src/image-viewer') |
||||
|
}, |
||||
|
data() { |
||||
|
return{ |
||||
|
host:'http://wenhua.xingtongworld.com', |
||||
|
action:'http://wenhua.xingtongworld.com/api/Index/uploadimg', |
||||
|
showViewer:false, |
||||
|
img_url:[] |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
onPreview(img) { |
||||
|
this.img_url = img |
||||
|
this.showViewer = true |
||||
|
}, |
||||
|
// 关闭查看器 |
||||
|
closeViewer() { |
||||
|
this.showViewer = false |
||||
|
}, |
||||
|
handleAvatarError(){ |
||||
|
this.$message.error('文件上传失败!'); |
||||
|
}, |
||||
|
handleAvatarSuccess(res,type){ |
||||
|
console.info(res) |
||||
|
if(res.code==1){ |
||||
|
let upDate={ |
||||
|
url:this.host+res.data.img_url, |
||||
|
key:'legal_authorization' |
||||
|
} |
||||
|
bus.$emit('img', upDate); |
||||
|
this.$message.success('文件上传成功!'); |
||||
|
} |
||||
|
}, |
||||
|
fileChange(file){ |
||||
|
const typeArr = ['image/png', 'image/gif', 'image/jpeg', 'image/jpg']; |
||||
|
const isJPG = typeArr.indexOf(file.raw.type) !== -1; |
||||
|
const isLt3M = file.size / 1024 / 1024 < 3; |
||||
|
if (!isJPG) { |
||||
|
this.$message.error('只能是图片!'); |
||||
|
this.$refs.upload.clearFiles(); |
||||
|
return; |
||||
|
} |
||||
|
if (!isLt3M) { |
||||
|
this.$message.error('上传图片大小不能超过 3MB!'); |
||||
|
this.$refs.upload.clearFiles(); |
||||
|
// this.$set(this.query, 'goods_img', ''); |
||||
|
return; |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
@import url('../../../../assets/css/sidebar.css'); |
||||
|
</style> |
||||
@ -0,0 +1,100 @@ |
|||||
|
<template> |
||||
|
<div class="body1 body2"> |
||||
|
<div class="idcard"> |
||||
|
<p class="title">身份证正面(照片面)</p> |
||||
|
<img :src="contentDatas.operator_card" class="file_img1"> |
||||
|
<div class="img_span"> |
||||
|
<span @click="onPreview([contentDatas.operator_card] )">查看原图</span> |
||||
|
<el-upload |
||||
|
class="upload-demo" |
||||
|
:action="action" |
||||
|
:on-change="fileChange" |
||||
|
:show-file-list="false" |
||||
|
:on-error="handleAvatarError" |
||||
|
list-type="picture" |
||||
|
:on-success="(res)=>{handleAvatarSuccess(res,0)}" |
||||
|
> |
||||
|
<span class="upload_span">重新上传</span> |
||||
|
</el-upload> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="idcard"> |
||||
|
<p class="title">身份证反面(发证机构面)</p> |
||||
|
<img :src=" contentDatas.operator_card " class="file_img1"> |
||||
|
<div class="img_span"> |
||||
|
<span @click="onPreview([contentDatas.operator_card] )">查看原图</span> |
||||
|
<span>重新上传</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
<el-image-viewer |
||||
|
v-if="showViewer" |
||||
|
:on-close="closeViewer" |
||||
|
:url-list="img_url" |
||||
|
:z-index="9999" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import bus from '../../bus' |
||||
|
export default { |
||||
|
props:{ |
||||
|
contentDatas:{ |
||||
|
require: true |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
ElImageViewer: () => import('element-ui/packages/image/src/image-viewer') |
||||
|
}, |
||||
|
data() { |
||||
|
return{ |
||||
|
host:'http://wenhua.xingtongworld.com', |
||||
|
action:'http://wenhua.xingtongworld.com/api/Index/uploadimg', |
||||
|
showViewer : false, |
||||
|
img_url:[] |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
onPreview(img) { |
||||
|
this.img_url = img |
||||
|
this.showViewer = true |
||||
|
}, |
||||
|
// 关闭查看器 |
||||
|
closeViewer() { |
||||
|
this.showViewer = false |
||||
|
}, |
||||
|
handleAvatarError(){ |
||||
|
this.$message.error('文件上传失败!'); |
||||
|
}, |
||||
|
handleAvatarSuccess(res,type){ |
||||
|
console.info(res) |
||||
|
if(res.code==1){ |
||||
|
let upDate={ |
||||
|
url:this.host+res.data.img_url, |
||||
|
key:'operator_card' |
||||
|
} |
||||
|
bus.$emit('img', upDate); |
||||
|
this.$message.success('文件上传成功!'); |
||||
|
} |
||||
|
}, |
||||
|
fileChange(file){ |
||||
|
const typeArr = ['image/png', 'image/gif', 'image/jpeg', 'image/jpg']; |
||||
|
const isJPG = typeArr.indexOf(file.raw.type) !== -1; |
||||
|
const isLt3M = file.size / 1024 / 1024 < 3; |
||||
|
if (!isJPG) { |
||||
|
this.$message.error('只能是图片!'); |
||||
|
this.$refs.upload.clearFiles(); |
||||
|
return; |
||||
|
} |
||||
|
if (!isLt3M) { |
||||
|
this.$message.error('上传图片大小不能超过 3MB!'); |
||||
|
this.$refs.upload.clearFiles(); |
||||
|
// this.$set(this.query, 'goods_img', ''); |
||||
|
return; |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
@import url('../../../../assets/css/sidebar.css'); |
||||
|
</style> |
||||
@ -0,0 +1,90 @@ |
|||||
|
<template> |
||||
|
<div class="body1"> |
||||
|
<p class="title">营业执照(复印件)</p> |
||||
|
<img :src="contentDatas.asset_certificate" class="file_img"> |
||||
|
<div class="img_span"> |
||||
|
<span @click="onPreview([contentDatas.asset_certificate])">查看原图</span> |
||||
|
<el-upload |
||||
|
class="upload-demo" |
||||
|
:action="action" |
||||
|
:on-change="fileChange" |
||||
|
:show-file-list="false" |
||||
|
:on-error="handleAvatarError" |
||||
|
list-type="picture" |
||||
|
:on-success="(res)=>{handleAvatarSuccess(res,0)}" |
||||
|
> |
||||
|
<span class="upload_span">重新上传</span> |
||||
|
</el-upload> |
||||
|
</div> |
||||
|
<el-image-viewer |
||||
|
v-if="showViewer" |
||||
|
:on-close="closeViewer" |
||||
|
:url-list="img_url" |
||||
|
:z-index="9999" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import bus from '../../bus' |
||||
|
export default { |
||||
|
props:{ |
||||
|
contentDatas:{ |
||||
|
require: true |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
ElImageViewer: () => import('element-ui/packages/image/src/image-viewer') |
||||
|
}, |
||||
|
data() { |
||||
|
return{ |
||||
|
host:'http://wenhua.xingtongworld.com', |
||||
|
action:'http://wenhua.xingtongworld.com/api/Index/uploadimg', |
||||
|
showViewer:false, |
||||
|
img_url:[] |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
onPreview(img) { |
||||
|
this.img_url = img |
||||
|
this.showViewer = true |
||||
|
}, |
||||
|
// 关闭查看器 |
||||
|
closeViewer() { |
||||
|
this.showViewer = false |
||||
|
}, |
||||
|
handleAvatarError(){ |
||||
|
this.$message.error('文件上传失败!'); |
||||
|
}, |
||||
|
handleAvatarSuccess(res,type){ |
||||
|
console.info(res) |
||||
|
if(res.code==1){ |
||||
|
let upDate={ |
||||
|
url:this.host+res.data.img_url, |
||||
|
key:'asset_certificate' |
||||
|
} |
||||
|
bus.$emit('img', upDate); |
||||
|
this.$message.success('文件上传成功!'); |
||||
|
} |
||||
|
}, |
||||
|
fileChange(file){ |
||||
|
const typeArr = ['image/png', 'image/gif', 'image/jpeg', 'image/jpg']; |
||||
|
const isJPG = typeArr.indexOf(file.raw.type) !== -1; |
||||
|
const isLt3M = file.size / 1024 / 1024 < 3; |
||||
|
if (!isJPG) { |
||||
|
this.$message.error('只能是图片!'); |
||||
|
this.$refs.upload.clearFiles(); |
||||
|
return; |
||||
|
} |
||||
|
if (!isLt3M) { |
||||
|
this.$message.error('上传图片大小不能超过 3MB!'); |
||||
|
this.$refs.upload.clearFiles(); |
||||
|
// this.$set(this.query, 'goods_img', ''); |
||||
|
return; |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
@import url('../../../../assets/css/sidebar.css'); |
||||
|
</style> |
||||
Loading…
Reference in new issue