Merge remote-tracking branch 'origin/main'

This commit is contained in:
LHD_HY 2025-11-17 19:33:04 +08:00
commit 82bab0ea11
6 changed files with 46 additions and 20 deletions

View File

@ -11,8 +11,14 @@
<!-- 图片类型 --> <!-- 图片类型 -->
<div v-else-if="imageUrl" class="image-display" @click="handleImageClick"> <div v-else-if="imageUrl" class="image-display" @click="handleImageClick">
<el-image :src="imageUrl" :preview-src-list="finalPreviewList" class="license-image" fit="cover" <el-image
hide-on-click-modal> :src="imageUrl"
:preview-src-list="finalPreviewList"
class="license-image"
fit="fill"
hide-on-click-modal
:style="imageStyle"
>
<div slot="error" class="image-error"> <div slot="error" class="image-error">
<i class="el-icon-picture"></i> <i class="el-icon-picture"></i>
<span>图片加载失败</span> <span>图片加载失败</span>
@ -94,6 +100,16 @@ export default {
fileTypeValue: { fileTypeValue: {
type: [Number, String], type: [Number, String],
default: '2' default: '2'
},
//
imageWidth: {
type: [Number, String],
default: 600
},
//
imageHeight: {
type: [Number, String],
default: 400
} }
}, },
computed: { computed: {
@ -112,7 +128,15 @@ export default {
// //
finalPreviewList() { finalPreviewList() {
return this.previewSrcList.length > 0 ? this.previewSrcList : [this.imageUrl] 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: { methods: {
// //
@ -215,10 +239,10 @@ export default {
} }
.license-image { .license-image {
width: 60%; width: auto;
height: 60%; height: auto;
max-width: 60%; max-width: 100%;
max-height: 60%; max-height: 100%;
display: block; display: block;
border-radius: 8px; border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

View File

@ -169,13 +169,12 @@ export default {
watch: { watch: {
fileList: { fileList: {
handler(newVal) { handler(newVal) {
if (this.files.length === 0 && newVal.length > 0) { if (newVal.length > 0) {
this.$nextTick(() => { this.$nextTick(() => {
this.files = this.formatFileList(newVal) this.files = this.formatFileList(newVal)
this.handlePreviewFromExternal(newVal) this.handlePreviewFromExternal(newVal)
}) })
} }else{
if(newVal.length === 0){
this.$nextTick(() => { this.$nextTick(() => {
this.files = []; this.files = [];
this.handlePreviewFromExternal(newVal) this.handlePreviewFromExternal(newVal)

View File

@ -113,7 +113,7 @@ import EnterpriseDetail from '@/assets/enterpriseLibrary/enterprise/enterprise-d
import EnterpriseEdit from '@/assets/enterpriseLibrary/enterprise/enterprise-edit.png'; import EnterpriseEdit from '@/assets/enterpriseLibrary/enterprise/enterprise-edit.png';
import EnterpriseDelete from '@/assets/enterpriseLibrary/enterprise/enterprise-delete.png'; import EnterpriseDelete from '@/assets/enterpriseLibrary/enterprise/enterprise-delete.png';
import { encryptWithSM4 } from '@/utils/sm' import { encryptWithSM4 } from '@/utils/sm'
import { listAPI, delAPI } from '@/api/enterpriseLibrary/enterprise/enterprise' import { listAPI, delDataAPI } from '@/api/enterpriseLibrary/enterprise/enterprise'
export default { export default {
name: 'Enterprise', name: 'Enterprise',
components: { components: {
@ -193,7 +193,7 @@ export default {
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
customClass: 'delete-confirm-dialog' customClass: 'delete-confirm-dialog'
}).then(() => { }).then(() => {
delAPI({enterpriseId: item.enterpriseId}).then(res => { delDataAPI({enterpriseId: item.enterpriseId}).then(res => {
if(res.code === 200){ if(res.code === 200){
this.$message.success('删除成功'); this.$message.success('删除成功');
this.getList(); this.getList();

View File

@ -344,6 +344,7 @@ export default {
this.isProjectChiefEngineer ? Promise.resolve(EMPTY_OBJECT) : this.qualificationInfoRef?.validate?.() || Promise.resolve(EMPTY_OBJECT), this.isProjectChiefEngineer ? Promise.resolve(EMPTY_OBJECT) : this.qualificationInfoRef?.validate?.() || Promise.resolve(EMPTY_OBJECT),
this.$refs.otherInfoPersonnel.validate() this.$refs.otherInfoPersonnel.validate()
]) ])
console.log(basicInfoData, qualificationData, otherData);
// //
const formData = this.assembleFormData(basicInfoData, qualificationData, otherData) const formData = this.assembleFormData(basicInfoData, qualificationData, otherData)

View File

@ -359,6 +359,8 @@ export default {
this.$set(this.personnelCertificateId, 0, this.getFormData(item.fileUploadType, 'personnelCertificateId')); this.$set(this.personnelCertificateId, 0, this.getFormData(item.fileUploadType, 'personnelCertificateId'));
} else if (Object.keys(item).length > 0 && item.fileUploadType !== fileUploadType) { // BC } else if (Object.keys(item).length > 0 && item.fileUploadType !== fileUploadType) { // BC
this.form.fileList2 = this.getFileList(item.fileUploadType); this.form.fileList2 = this.getFileList(item.fileUploadType);
console.log(this.form.fileList2);
this.form.registerProfessional = this.getFormData(item.fileUploadType, 'registerProfessional'); this.form.registerProfessional = this.getFormData(item.fileUploadType, 'registerProfessional');
this.form.certificateCode2 = this.getFormData(item.fileUploadType, 'certificateCode'); this.form.certificateCode2 = this.getFormData(item.fileUploadType, 'certificateCode');
this.form.certificateValidityPeriod2 = this.getFormData(item.fileUploadType, 'certificateValidityPeriod').split(' - '); this.form.certificateValidityPeriod2 = this.getFormData(item.fileUploadType, 'certificateValidityPeriod').split(' - ');
@ -453,12 +455,12 @@ export default {
}, },
detailData: { detailData: {
handler(newVal) { handler(newVal) {
console.log(newVal);
if (Object.keys(newVal).length > 0) { if (Object.keys(newVal).length > 0) {
const { enterprisePersonnel: { personnelPosition } = {} } = newVal; const { enterprisePersonnel: { personnelPosition } = {} } = newVal;
if (personnelPosition !== 'project_chief_engineer') { if (personnelPosition !== 'project_chief_engineer') {
this.setFormData(); this.$nextTick(() => {
this.setFormData();
})
} }
} }
}, },

View File

@ -174,8 +174,8 @@ export default {
console.log('初始化完成') console.log('初始化完成')
}, },
/** 删除操作 */ /** 删除操作 */
handleDelete(row) { handleDelete(raw) {
this.$confirm(`确定要删除方案类型"${raw.technicalSolutionName}"吗?删除后将无法恢复!`, '操作提示', { this.$confirm(`确定要删除方案名称"${raw.technicalName}"吗?删除后将无法恢复!`, '操作提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@ -185,7 +185,7 @@ export default {
delDataAPI( delDataAPI(
{ {
technicalSolutionTypeId: raw.technicalSolutionTypeId, technicalSolutionTypeId: raw.technicalSolutionTypeId,
technicalSolutionId: row.technicalSolutionId technicalSolutionId: raw.technicalSolutionId
} }
).then(res => { ).then(res => {
if (res.code === 200) { if (res.code === 200) {