|
@@ -82,6 +82,31 @@
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="社区模型">
|
|
|
+ <el-radio v-model="ruleForm.model" :label="1">3D图</el-radio>
|
|
|
+ <el-radio v-model="ruleForm.model" :label="2">数字孪生</el-radio>
|
|
|
+ <div class="clickUpload">
|
|
|
+ <div class="clickUpText">
|
|
|
+ <img class="dataImg" v-if="!!ruleForm.modelPictureUrl" :src="ruleForm.modelPictureUrl" />
|
|
|
+ <template v-else>
|
|
|
+ <div class="addImg"><i class="el-icon-plus"></i></div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ <el-upload
|
|
|
+ v-if="!islooks"
|
|
|
+ :headers="token"
|
|
|
+ ref="uploadPic"
|
|
|
+ limit="1"
|
|
|
+ action="/sc-community/upload/uploadFile"
|
|
|
+ :on-success="uploadsuccess2"
|
|
|
+ :before-upload="beforeAvatarUpload2"
|
|
|
+ :auto-upload="true"
|
|
|
+ name="file"
|
|
|
+ >
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
</div>
|
|
|
<div class="formContent-item">
|
|
|
<div class="formContent-item_title">负责人</div>
|
|
@@ -145,6 +170,8 @@ export default {
|
|
|
parkingArea: '', //车位面积
|
|
|
phone: '', //负责人手机号
|
|
|
pictureUrl: '', //社区图片
|
|
|
+ modelPictureUrl: '',
|
|
|
+ model: 1,
|
|
|
provinceId: '',
|
|
|
regionId: '', //所在地区
|
|
|
remarks: '', //备注
|
|
@@ -230,7 +257,24 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ uploadsuccess2(response) {
|
|
|
+ this.$refs.uploadPic.clearFiles();
|
|
|
+ if (0 === response.status) {
|
|
|
+ this.ruleForm.modelPictureUrl = response.data;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ beforeAvatarUpload2(file) {
|
|
|
+ const isJPG = file.type == 'image/jpg' || file.type == 'image/png' || 'image/jpeg';
|
|
|
+ const isLt2M = file.size / 1024 / 1024 < 2;
|
|
|
|
|
|
+ if (!isJPG) {
|
|
|
+ this.$message.error('上传图片只能是 JPG PNG JPEG格式!');
|
|
|
+ }
|
|
|
+ // if (!isLt2M) {
|
|
|
+ // this.$message.error('上传头像图片大小不能超过 2MB!');
|
|
|
+ // }
|
|
|
+ return isJPG;
|
|
|
+ },
|
|
|
uploadsuccess(response, file, fileList) {
|
|
|
this.$refs.uploaduserlogo.clearFiles();
|
|
|
if (0 === response.status) {
|