Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
82bab0ea11
|
|
@ -11,8 +11,14 @@
|
|||
|
||||
<!-- 图片类型 -->
|
||||
<div v-else-if="imageUrl" class="image-display" @click="handleImageClick">
|
||||
<el-image :src="imageUrl" :preview-src-list="finalPreviewList" class="license-image" fit="cover"
|
||||
hide-on-click-modal>
|
||||
<el-image
|
||||
:src="imageUrl"
|
||||
:preview-src-list="finalPreviewList"
|
||||
class="license-image"
|
||||
fit="fill"
|
||||
hide-on-click-modal
|
||||
:style="imageStyle"
|
||||
>
|
||||
<div slot="error" class="image-error">
|
||||
<i class="el-icon-picture"></i>
|
||||
<span>图片加载失败</span>
|
||||
|
|
@ -94,6 +100,16 @@ export default {
|
|||
fileTypeValue: {
|
||||
type: [Number, String],
|
||||
default: '2'
|
||||
},
|
||||
// 固定图片宽度
|
||||
imageWidth: {
|
||||
type: [Number, String],
|
||||
default: 600
|
||||
},
|
||||
// 固定图片高度
|
||||
imageHeight: {
|
||||
type: [Number, String],
|
||||
default: 400
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -112,7 +128,15 @@ export default {
|
|||
// 最终预览列表
|
||||
finalPreviewList() {
|
||||
return this.previewSrcList.length > 0 ? this.previewSrcList : [this.imageUrl]
|
||||
}
|
||||
},
|
||||
imageStyle() {
|
||||
const width = typeof this.imageWidth === 'number' ? `${this.imageWidth}px` : this.imageWidth
|
||||
const height = typeof this.imageHeight === 'number' ? `${this.imageHeight}px` : this.imageHeight
|
||||
return {
|
||||
width,
|
||||
height
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 文件点击事件
|
||||
|
|
@ -215,10 +239,10 @@ export default {
|
|||
}
|
||||
|
||||
.license-image {
|
||||
width: 60%;
|
||||
height: 60%;
|
||||
max-width: 60%;
|
||||
max-height: 60%;
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
display: block;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
|
|
|
|||
|
|
@ -169,13 +169,12 @@ export default {
|
|||
watch: {
|
||||
fileList: {
|
||||
handler(newVal) {
|
||||
if (this.files.length === 0 && newVal.length > 0) {
|
||||
if (newVal.length > 0) {
|
||||
this.$nextTick(() => {
|
||||
this.files = this.formatFileList(newVal)
|
||||
this.handlePreviewFromExternal(newVal)
|
||||
})
|
||||
}
|
||||
if(newVal.length === 0){
|
||||
}else{
|
||||
this.$nextTick(() => {
|
||||
this.files = [];
|
||||
this.handlePreviewFromExternal(newVal)
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ import EnterpriseDetail from '@/assets/enterpriseLibrary/enterprise/enterprise-d
|
|||
import EnterpriseEdit from '@/assets/enterpriseLibrary/enterprise/enterprise-edit.png';
|
||||
import EnterpriseDelete from '@/assets/enterpriseLibrary/enterprise/enterprise-delete.png';
|
||||
import { encryptWithSM4 } from '@/utils/sm'
|
||||
import { listAPI, delAPI } from '@/api/enterpriseLibrary/enterprise/enterprise'
|
||||
import { listAPI, delDataAPI } from '@/api/enterpriseLibrary/enterprise/enterprise'
|
||||
export default {
|
||||
name: 'Enterprise',
|
||||
components: {
|
||||
|
|
@ -193,7 +193,7 @@ export default {
|
|||
dangerouslyUseHTMLString: true,
|
||||
customClass: 'delete-confirm-dialog'
|
||||
}).then(() => {
|
||||
delAPI({enterpriseId: item.enterpriseId}).then(res => {
|
||||
delDataAPI({enterpriseId: item.enterpriseId}).then(res => {
|
||||
if(res.code === 200){
|
||||
this.$message.success('删除成功');
|
||||
this.getList();
|
||||
|
|
|
|||
|
|
@ -344,7 +344,8 @@ export default {
|
|||
this.isProjectChiefEngineer ? Promise.resolve(EMPTY_OBJECT) : this.qualificationInfoRef?.validate?.() || Promise.resolve(EMPTY_OBJECT),
|
||||
this.$refs.otherInfoPersonnel.validate()
|
||||
])
|
||||
|
||||
console.log(basicInfoData, qualificationData, otherData);
|
||||
|
||||
// 组装完整数据
|
||||
const formData = this.assembleFormData(basicInfoData, qualificationData, otherData)
|
||||
|
||||
|
|
|
|||
|
|
@ -359,6 +359,8 @@ export default {
|
|||
this.$set(this.personnelCertificateId, 0, this.getFormData(item.fileUploadType, 'personnelCertificateId'));
|
||||
} else if (Object.keys(item).length > 0 && item.fileUploadType !== fileUploadType) { // 安全考核B证、安全考核C证、其他人员证书
|
||||
this.form.fileList2 = this.getFileList(item.fileUploadType);
|
||||
console.log(this.form.fileList2);
|
||||
|
||||
this.form.registerProfessional = this.getFormData(item.fileUploadType, 'registerProfessional');
|
||||
this.form.certificateCode2 = this.getFormData(item.fileUploadType, 'certificateCode');
|
||||
this.form.certificateValidityPeriod2 = this.getFormData(item.fileUploadType, 'certificateValidityPeriod').split(' - ');
|
||||
|
|
@ -366,7 +368,7 @@ export default {
|
|||
}
|
||||
})
|
||||
console.log(this.form);
|
||||
|
||||
|
||||
},
|
||||
|
||||
getFileList(businessType) {
|
||||
|
|
@ -453,12 +455,12 @@ export default {
|
|||
},
|
||||
detailData: {
|
||||
handler(newVal) {
|
||||
console.log(newVal);
|
||||
|
||||
if (Object.keys(newVal).length > 0) {
|
||||
const { enterprisePersonnel: { personnelPosition } = {} } = newVal;
|
||||
if (personnelPosition !== 'project_chief_engineer') {
|
||||
this.setFormData();
|
||||
this.$nextTick(() => {
|
||||
this.setFormData();
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -174,8 +174,8 @@ export default {
|
|||
console.log('初始化完成')
|
||||
},
|
||||
/** 删除操作 */
|
||||
handleDelete(row) {
|
||||
this.$confirm(`确定要删除方案类型"${raw.technicalSolutionName}"吗?删除后将无法恢复!`, '操作提示', {
|
||||
handleDelete(raw) {
|
||||
this.$confirm(`确定要删除方案名称"${raw.technicalName}"吗?删除后将无法恢复!`, '操作提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
|
|
@ -185,7 +185,7 @@ export default {
|
|||
delDataAPI(
|
||||
{
|
||||
technicalSolutionTypeId: raw.technicalSolutionTypeId,
|
||||
technicalSolutionId: row.technicalSolutionId
|
||||
technicalSolutionId: raw.technicalSolutionId
|
||||
}
|
||||
).then(res => {
|
||||
if (res.code === 200) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue