diff --git a/src/assets/companyFile/defaultimage.png b/src/assets/companyFile/defaultimage.png new file mode 100644 index 0000000..63091ee Binary files /dev/null and b/src/assets/companyFile/defaultimage.png differ diff --git a/src/views/systemManagement/companyList/components/companyDataDialog.vue b/src/views/systemManagement/companyList/components/companyDataDialog.vue index 7bfcfe7..2367b0e 100644 --- a/src/views/systemManagement/companyList/components/companyDataDialog.vue +++ b/src/views/systemManagement/companyList/components/companyDataDialog.vue @@ -46,13 +46,20 @@ - +
点击上传企业封面图片
@@ -183,15 +190,15 @@ + + + - - - @@ -238,6 +245,7 @@ import { postCompanyList, putCompanyList, } from "@/api/systemManagement"; +import defaultImage from "@/assets/companyFile/defaultimage.png"; export default { name: "CompanyDataDialog", data() { @@ -283,6 +291,10 @@ export default { belongingArea: "", }, imageUrl: "", + upUrl:`http://172.18.113.50:8080/zhapi/safety/system/enterpriseList`, // 图片上传地址 + upheaders: { + Authorization: localStorage.getItem('AuthorizationToken') + } }; }, created() { @@ -300,6 +312,7 @@ export default { } else if (num === 3) { this.dialogTitle = "编辑"; console.log("item", item); + this.imageUrl = item.picUrl; this.form = Object.assign(this.form, item); } }, @@ -397,9 +410,19 @@ export default { } this.$emit("back"); }, + handleAvatarSuccess(res, file) { + console.log('resimg',res); + console.log('fileimg',file); + // this.imageUrl = URL.createObjectURL(file.raw); + this.$message.success('上传成功') + }, closeForm() { this.visible = false; - } + }, + setDefaultImage(e) { + // 加载失败默认图片 + e.target.src = defaultImage; + }, }, }; @@ -463,7 +486,7 @@ export default { /* 表单内容浮动布局,多行多列表单 */ width: 900px !important; display: flex; - justify-content: space-between; + justify-content: flex-start; flex-wrap: wrap; .el-form-item { /* 表单域名跟input浮动布局 */ @@ -502,6 +525,10 @@ export default { display: flex; .avatar-uploader { margin-left: 8%; + img { + width: 220px; + height: 220px; + } } .avatar-uploader .el-upload { border: 1px dashed #d9d9d9; @@ -534,7 +561,7 @@ export default { display: block; } .el-form.commerceMessage_form { - /* 表单内容浮动布局,多行多列表单 */ + /* 表单内容flex布局,多行多列表单 */ width: 600px !important; } } @@ -586,18 +613,25 @@ export default { } .el-form.company_position_form { .el-form-item { - width: 30%; + width: 31%; + margin-left: 15px; + .el-form-item__content { + .el-input__inner { + width: 170px; + } + } } } .el-form.jurisdiction_form { + margin-left: 15px; .el-form-item { - width: 30%; + width: 33%; .el-form-item__label { - width: 70%; + width: 50%; } .el-form-item__content { .el-input__inner { - width: 150px; + width: 170px; } } } diff --git a/src/views/systemManagement/companyList/index.vue b/src/views/systemManagement/companyList/index.vue index e2ff6a5..caa149d 100644 --- a/src/views/systemManagement/companyList/index.vue +++ b/src/views/systemManagement/companyList/index.vue @@ -13,7 +13,6 @@