Merge branch 'bjxz-rain' into bjxz-dev
This commit is contained in:
commit
3605ad2c65
@ -104,6 +104,7 @@ export default {
|
||||
created() {
|
||||
this.projectSn = this.$store.state.projectSn;
|
||||
this.getAssessmentList();
|
||||
this.$message.success("1111"); //编辑成功!
|
||||
},
|
||||
methods: {
|
||||
// 批量同步 || 同步
|
||||
|
||||
@ -343,7 +343,7 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('message.laborMange.photosOfQualification')" prop="enterpriseQualificationUrl">
|
||||
<el-upload class="upload-demo" :action="uploadUrl" :on-remove="(file, flexList) => handleRemove(file, flexList, 1)
|
||||
<el-upload class="upload-demo" :limit="1" accept=".png, .jpg, .jpeg" :action="uploadUrl" :on-remove="(file, flexList) => handleRemove(file, flexList, 1)
|
||||
" :on-success="(file) => handleSuccess(file, 1)" :on-error="(file) => handleError(file, 1)"
|
||||
:on-preview="(file) => handlePreview(file, 1)" :before-upload="(file) => handleBeforeUpload(file, 1)"
|
||||
name="files" :file-list="aptitudeFileList">
|
||||
@ -355,7 +355,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="logo" prop="logo">
|
||||
<el-upload class="upload-demo" :action="uploadUrl" :on-remove="(file, flexList) => handleRemove(file, flexList, 2)
|
||||
<el-upload class="upload-demo" :limit="1" accept=".png, .jpg, .jpeg" :action="uploadUrl" :on-remove="(file, flexList) => handleRemove(file, flexList, 2)
|
||||
" :on-success="(file) => handleSuccess(file, 2)" :on-error="(file) => handleError(file, 2)"
|
||||
:on-preview="(file) => handlePreview(file, 2)" :before-upload="(file) => handleBeforeUpload(file, 2)"
|
||||
name="files" :file-list="logoFileList">
|
||||
@ -460,7 +460,7 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目面积(m²)" prop="enterpriseEmail">
|
||||
<el-input v-model="enterpriseForm.projectEnterprise.projectAcreage"
|
||||
<el-input type="number" v-model="enterpriseForm.projectEnterprise.projectAcreage"
|
||||
placeholder="请输入项目面积(m²)"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -497,18 +497,19 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="projectTel">
|
||||
<el-input v-model="enterpriseForm.projectEnterprise.projectTel" placeholder="请输入联系电话"></el-input>
|
||||
<el-input type="number" oninput="if(value.length>11)value=value.slice(0,11)" v-model="enterpriseForm.projectEnterprise.projectTel" placeholder="请输入联系电话"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="现场施工图" prop="constructionMapUrl">
|
||||
<el-upload class="upload-demo" :limit="1" :action="uploadUrl" :on-remove="(file, flexList) => handleRemove(file, flexList, 4)
|
||||
<el-upload class="upload-demo" :limit="1" accept=".png, .jpg, .jpeg" :action="uploadUrl" :on-remove="(file, flexList) => handleRemove(file, flexList, 4)
|
||||
" :on-success="(file) => handleSuccess(file, 4)" :on-error="(file) => handleError(file, 4)"
|
||||
:on-preview="(file) => handlePreview(file, 4)" :before-upload="(file) => handleBeforeUpload(file, 4)"
|
||||
lis name="files" :file-list="constructionMapUrlList">
|
||||
<el-button size="small" type="primary">{{
|
||||
$t('message.laborMange.clickOnTheUpload')
|
||||
}}</el-button>
|
||||
<!-- <div slot="tip" class="el-upload__tip">只能上传一张</div> -->
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -516,7 +517,7 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="现场布置图" prop="layoutImage">
|
||||
<el-upload class="upload-demo" :limit="1" :action="uploadUrl" :on-remove="(file, flexList) => handleRemove(file, flexList, 3)
|
||||
<el-upload class="upload-demo" :limit="1" accept=".png, .jpg, .jpeg" :action="uploadUrl" :on-remove="(file, flexList) => handleRemove(file, flexList, 3)
|
||||
" :on-success="(file) => handleSuccess(file, 3)" :on-error="(file) => handleError(file, 3)"
|
||||
:on-preview="(file) => handlePreview(file, 3)" :before-upload="(file) => handleBeforeUpload(file, 3)"
|
||||
name="files" :file-list="layoutImageList">
|
||||
@ -747,6 +748,16 @@ export default {
|
||||
this.getDictionaryByStructure();
|
||||
this.getDicProjectTypeList();
|
||||
},
|
||||
watch: {
|
||||
addEnterpriseDialog: {
|
||||
handler(newVal) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['enterpriseForm'] && this.$refs['enterpriseForm'].clearValidate();
|
||||
})
|
||||
},
|
||||
deep:true,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//获取经纬度
|
||||
toGetLocalFn() {
|
||||
@ -940,7 +951,7 @@ export default {
|
||||
enterpriseEmail: '', //企业邮箱
|
||||
enterpriseLegalPerson: '', //法定代表人
|
||||
enterpriseName: '', //企业名称
|
||||
companyTypeName: this.enterpriseForm.companyTypeName,
|
||||
companyTypeName: "",
|
||||
enterpriseProperty: '', //单位性质 1.国有企业 2三资企业 3集体企业 4私营企业
|
||||
enterpriseQualificationUrl: '', //企业资质图片地址
|
||||
enterpriseSafeAllow: '', //企业安全生产许可证
|
||||
@ -975,7 +986,7 @@ export default {
|
||||
}
|
||||
|
||||
}
|
||||
// console.log('==========',this.enterpriseForm.companyTypeName)
|
||||
console.log('==========',this.enterpriseForm.companyTypeName)
|
||||
this.aptitudeFileList = [];
|
||||
this.logoFileList = [];
|
||||
this.layoutImageList = [];
|
||||
@ -1004,6 +1015,7 @@ export default {
|
||||
this.aptitudeFileList = []
|
||||
this.logoFileList = []
|
||||
this.enterpriseForm = { ...JSON.parse(JSON.stringify(value)) }
|
||||
this.enterpriseForm.enterpriseTypeId = !value.enterpriseTypeId || value.enterpriseTypeId == 0 ? '' : value.enterpriseTypeId;
|
||||
let aptitude = this.enterpriseForm.enterpriseQualificationUrl
|
||||
? this.enterpriseForm.enterpriseQualificationUrl.split(',')
|
||||
: []
|
||||
@ -1036,11 +1048,11 @@ export default {
|
||||
this.enterpriseForm.projectEnterprise = {
|
||||
...projectEnterprise
|
||||
};
|
||||
this.layoutImageList = JSON.parse(this.enterpriseForm.projectEnterprise.layoutImage);
|
||||
this.constructionMapUrlList = JSON.parse(this.enterpriseForm.projectEnterprise.constructionMapUrl);
|
||||
this.layoutImageList = this.enterpriseForm.projectEnterprise.layoutImage && this.enterpriseForm.projectEnterprise.layoutImage != 'null' ? JSON.parse(this.enterpriseForm.projectEnterprise.layoutImage) : [];
|
||||
this.constructionMapUrlList = this.enterpriseForm.projectEnterprise.constructionMapUrl && this.enterpriseForm.projectEnterprise.constructionMapUrl != 'null' ? JSON.parse(this.enterpriseForm.projectEnterprise.constructionMapUrl) : [];
|
||||
}
|
||||
}).finally(() => {
|
||||
this.addEnterpriseDialog = true
|
||||
this.addEnterpriseDialog = true;
|
||||
})
|
||||
},
|
||||
|
||||
@ -1069,8 +1081,8 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.enterpriseForm.projectTel) {
|
||||
if (!checkPhone(this.enterpriseForm.projectTel)) {
|
||||
if (this.enterpriseForm.projectEnterprise.projectTel) {
|
||||
if (!checkPhone(this.enterpriseForm.projectEnterprise.projectTel)) {
|
||||
this.$message.error('请输入正确的联系电话')
|
||||
return
|
||||
}
|
||||
@ -1280,7 +1292,7 @@ export default {
|
||||
//文件上传成功
|
||||
handleSuccess(file, type) {
|
||||
this.$message.success(this.$t('message.laborMange.uploadSuccessful'))
|
||||
let data = { name: file.data[0].filename, url: file.data[0].imageUrl }
|
||||
let data = { name: file.data[0].fileInfo.originalFilename ? file.data[0].fileInfo.originalFilename : file.data[0].filename, url: file.data[0].imageUrl }
|
||||
console.log(file);
|
||||
if (type == 1) {
|
||||
this.aptitudeFileList.push(data)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user