|
@@ -104,6 +104,43 @@
|
|
></el-option> </el-select></el-form-item
|
|
></el-option> </el-select></el-form-item
|
|
></el-col>
|
|
></el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="企联职务" prop="position">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="formModel.position"
|
|
|
|
+ filterable
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ style="width: 200px"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="position in positionResult"
|
|
|
|
+ :key="position.value"
|
|
|
|
+ :label="position.name"
|
|
|
|
+ :value="position.value"
|
|
|
|
+ ></el-option> </el-select></el-form-item
|
|
|
|
+ ></el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item label="企业logo" prop="logoUrl">
|
|
|
|
+ <el-upload
|
|
|
|
+ class="avatar-uploader"
|
|
|
|
+ name="photoFile"
|
|
|
|
+ :action="uploadUrl"
|
|
|
|
+ :show-file-list="false"
|
|
|
|
+ :headers="headers"
|
|
|
|
+ :data="uploadData"
|
|
|
|
+ :on-success="handleAvatarSuccessLogo"
|
|
|
|
+ :before-upload="beforeAvatarUploadLogo"
|
|
|
|
+ accept="image/png,image/jpeg"
|
|
|
|
+ >
|
|
|
|
+ <img v-if="fileUrlLogo" :src="fileUrlLogo" class="avatar" />
|
|
|
|
+ <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
|
+ </el-upload>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
<el-form-item label="营业执照" prop="businessLicenseUrl">
|
|
<el-form-item label="营业执照" prop="businessLicenseUrl">
|
|
@@ -234,6 +271,8 @@ export default {
|
|
value: "id",
|
|
value: "id",
|
|
label: "industryName",
|
|
label: "industryName",
|
|
},
|
|
},
|
|
|
|
+ positionResult:[],
|
|
|
|
+ fileUrlLogo: "",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -274,6 +313,17 @@ export default {
|
|
var jsonData = response.data;
|
|
var jsonData = response.data;
|
|
this.regionResult = jsonData.data;
|
|
this.regionResult = jsonData.data;
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ dataDictionaryApi
|
|
|
|
+ .findByCatalogName({
|
|
|
|
+ catalogName: "企联职务",
|
|
|
|
+ })
|
|
|
|
+ .then((response) => {
|
|
|
|
+ var jsonData = response.data;
|
|
|
|
+ this.positionResult = jsonData.data;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
closeDialog() {
|
|
closeDialog() {
|
|
@@ -325,6 +375,26 @@ export default {
|
|
// const isJPG = file.type === "image/jpeg";
|
|
// const isJPG = file.type === "image/jpeg";
|
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
|
|
|
|
|
|
|
+ // if (!isJPG) {
|
|
|
|
+ // this.$message.error("上传图片只能是 JPG 格式!");
|
|
|
|
+ // }
|
|
|
|
+ if (!isLt2M) {
|
|
|
|
+ this.$message.error("上传图片大小不能超过 2MB!");
|
|
|
|
+ }
|
|
|
|
+ return isLt2M;
|
|
|
|
+ },
|
|
|
|
+ handleAvatarSuccessLogo(res, file) {
|
|
|
|
+ this.loading = false;
|
|
|
|
+ var self = this;
|
|
|
|
+ self.formModel.logoUrl = res.data;
|
|
|
|
+ self.fileUrlLogo =
|
|
|
|
+ res.data + "?x-oss-process=image/resize,m_lfit,w_200";
|
|
|
|
+ },
|
|
|
|
+ beforeAvatarUploadLogo(file) {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ // const isJPG = file.type === "image/jpeg";
|
|
|
|
+ const isLt2M = file.size / 1024 / 1024 < 2;
|
|
|
|
+
|
|
// if (!isJPG) {
|
|
// if (!isJPG) {
|
|
// this.$message.error("上传图片只能是 JPG 格式!");
|
|
// this.$message.error("上传图片只能是 JPG 格式!");
|
|
// }
|
|
// }
|
|
@@ -356,6 +426,12 @@ export default {
|
|
self.fileUrl =
|
|
self.fileUrl =
|
|
businessLicenseUrl + "?x-oss-process=image/resize,m_lfit,h_200";
|
|
businessLicenseUrl + "?x-oss-process=image/resize,m_lfit,h_200";
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ let logoUrl = self.formModel.logoUrl;
|
|
|
|
+ if (logoUrl != null) {
|
|
|
|
+ self.fileUrlLogo =
|
|
|
|
+ logoUrl + "?x-oss-process=image/resize,m_lfit,h_200";
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
self.$message.error(jsonData.message + "");
|
|
self.$message.error(jsonData.message + "");
|
|
}
|
|
}
|