|
@@ -176,7 +176,9 @@
|
|
|
{{ companyList.label }}
|
|
|
</el-form-item>
|
|
|
<el-form-item label="场地图片" :label-width="formLabelWidth">
|
|
|
- <img width="50%" :src="companyList.sitePhotoAddress" alt />
|
|
|
+ <div :key="index" v-for="(item, index) in companyList.sitePhotoAddress">
|
|
|
+ <img style="float:left" v-if="item" :src="item" class="avatar">
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
<h3 style="margin-left: 30px">联系方式</h3>
|
|
|
<div
|
|
@@ -291,18 +293,21 @@
|
|
|
<el-button v-else class="button-new-tag" size="small" @click="showInput">添加</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="场地图片(图片清晰,最多9张)" :label-width="formLabelWidth" prop="sitePhotoAddress">
|
|
|
+ <div :key="index" v-for="(item, index) in companyList1.sitePhotoAddress">
|
|
|
+ <img style="float:left" v-if="item" :src="item" class="avatar">
|
|
|
+ </div>
|
|
|
<el-upload
|
|
|
action="https://www.zthymaoyi.com/upload/admin"
|
|
|
- list-type="picture-card"
|
|
|
+ :show-file-list="false"
|
|
|
:limit="9"
|
|
|
- :on-preview="handlePictureCardPreview"
|
|
|
+ :on-success="handlePictureCardPreview"
|
|
|
:on-remove="handleRemove"
|
|
|
>
|
|
|
- <i class="el-icon-plus"></i>
|
|
|
+ <i class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
</el-upload>
|
|
|
- <el-dialog :visible.sync="dialogVisible3">
|
|
|
+ <!-- <el-dialog :visible.sync="dialogVisible3">
|
|
|
<img width="100%" :src="companyList1.sitePhotoAddress" alt="" />
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog> -->
|
|
|
</el-form-item>
|
|
|
<h3 style="margin-left: 30px">联系方式</h3>
|
|
|
|
|
@@ -461,9 +466,19 @@ export default {
|
|
|
handleRemove(file, fileList) {
|
|
|
console.log(file, fileList)
|
|
|
},
|
|
|
- handlePictureCardPreview(file) {
|
|
|
- this.companyList1.sitePhotoAddress = file.url
|
|
|
- this.dialogVisible3 = true
|
|
|
+ handlePictureCardPreview(res, file) {
|
|
|
+ let url = file.response.url;
|
|
|
+ if(this.companyList1.sitePhotoAddress.length>9){
|
|
|
+ this.$message({
|
|
|
+ message: '最多上传九张图片!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.companyList1.sitePhotoAddress.push(url)
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
close(index) {
|
|
|
this.addressUrls.splice(index, 1)
|
|
@@ -523,6 +538,9 @@ export default {
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
this.companyList = response
|
|
|
+ if(response.sitePhotoAddress!=null){
|
|
|
+ this.companyList.sitePhotoAddress=response.sitePhotoAddress.split(',')
|
|
|
+ }
|
|
|
this.id=response.id
|
|
|
this.dialogFormVisible1 = true
|
|
|
})
|
|
@@ -533,7 +551,6 @@ export default {
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
this.companyList1 = response
|
|
|
- console.log(this.companyList1,211)
|
|
|
this.id=response.id
|
|
|
if(response.mainBusinessType!=null){
|
|
|
this.companyList1.mainBusinessType=response.mainBusinessType.split(',')
|
|
@@ -547,6 +564,12 @@ export default {
|
|
|
if(response.sitePhotoAddress!=null){
|
|
|
this.companyList1.sitePhotoAddress=response.sitePhotoAddress.split(',')
|
|
|
}
|
|
|
+ else{
|
|
|
+ this.companyList1.sitePhotoAddress=[]
|
|
|
+ }
|
|
|
+ if(response.settledCompanyContacts.length==0){
|
|
|
+ this.companyList1.settledCompanyContacts.push({})
|
|
|
+ }
|
|
|
this.dialogFormVisible2 = true
|
|
|
})
|
|
|
},
|
|
@@ -687,8 +710,8 @@ export default {
|
|
|
title: '成功',
|
|
|
message: '提交成功',
|
|
|
})
|
|
|
- this.getList()
|
|
|
this.dialogFormVisible2 = false
|
|
|
+ this.getList()
|
|
|
})
|
|
|
.catch((response) => {
|
|
|
EventBus.$emit('error', response.message)
|
|
@@ -845,7 +868,6 @@ export default {
|
|
|
handleInputConfirm() {
|
|
|
let label = this.label;
|
|
|
if (label) {
|
|
|
- console.log(this.companyList1.label,11)
|
|
|
this.companyList1.label.push(label)
|
|
|
}
|
|
|
this.inputVisible = false
|