|
|
@ -219,6 +219,38 @@
|
|
|
|
<el-input v-model="form.contactAddress" placeholder="请输入联系人地址"/>
|
|
|
|
<el-input v-model="form.contactAddress" placeholder="请输入联系人地址"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col span="12">
|
|
|
|
|
|
|
|
<el-form-item label="监控平台显示" prop="contactAddress">
|
|
|
|
|
|
|
|
<el-select v-model="form.tenantField" placeholder="请选择">
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
label="图片"
|
|
|
|
|
|
|
|
value="1">
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
label="地图"
|
|
|
|
|
|
|
|
value="2">
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col span="12" v-if="form.tenantField === '2'">
|
|
|
|
|
|
|
|
<el-form-item label="地图省份编码" prop="tenantMapCode">
|
|
|
|
|
|
|
|
<el-input-number v-model="form.tenantMapCode" controls-position="right"></el-input-number>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col span="12" v-if="form.tenantField === '1'">
|
|
|
|
|
|
|
|
<el-form-item label="首页图片" prop="tenantBoardPic">
|
|
|
|
|
|
|
|
<el-upload
|
|
|
|
|
|
|
|
class="avatar-uploader"
|
|
|
|
|
|
|
|
action="https://jsonplaceholder.typicode.com/posts/"
|
|
|
|
|
|
|
|
:show-file-list="false"
|
|
|
|
|
|
|
|
:on-success="handleAvatarSuccess"
|
|
|
|
|
|
|
|
:before-upload="beforeAvatarUpload">
|
|
|
|
|
|
|
|
<img v-if="form.tenantBoardPic" :src="form.tenantBoardPic" 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-form-item label="描述" prop="remark">
|
|
|
|
<el-form-item label="描述" prop="remark">
|
|
|
@ -430,9 +462,48 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
tenantTypeChange(tenantType) {
|
|
|
|
tenantTypeChange(tenantType) {
|
|
|
|
this.industryVisible = tenantType === this.TENANT_TYPE_ENTERPRISE;
|
|
|
|
this.industryVisible = tenantType === this.TENANT_TYPE_ENTERPRISE;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleAvatarSuccess(res, file) {
|
|
|
|
|
|
|
|
this.form.tenantBoardPic = URL.createObjectURL(file.raw);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
beforeAvatarUpload(file) {
|
|
|
|
|
|
|
|
const isJPG = file.type === 'image/jpeg';
|
|
|
|
|
|
|
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!isJPG) {
|
|
|
|
|
|
|
|
this.$message.error('上传头像图片只能是 JPG 格式!');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isLt2M) {
|
|
|
|
|
|
|
|
this.$message.error('上传头像图片大小不能超过 2MB!');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return isJPG && isLt2M;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
.avatar-uploader .el-upload {
|
|
|
|
|
|
|
|
border: 1px dashed #d9d9d9;
|
|
|
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar-uploader .el-upload:hover {
|
|
|
|
|
|
|
|
border-color: #409EFF;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar-uploader-icon {
|
|
|
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
|
|
|
color: #8c939d;
|
|
|
|
|
|
|
|
width: 178px;
|
|
|
|
|
|
|
|
height: 178px;
|
|
|
|
|
|
|
|
line-height: 178px;
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar {
|
|
|
|
|
|
|
|
width: 178px;
|
|
|
|
|
|
|
|
height: 178px;
|
|
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|