From 19dc66d53d4bc40616739d803d5dd2a6aafc7743 Mon Sep 17 00:00:00 2001 From: wangchengming <15110151257@163.com> Date: Wed, 20 Aug 2025 23:50:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/ruoyi.scss | 29 ++-- src/components/FileUpload/PdfPreview.vue | 1 + src/components/FileUpload/multiFileUpload.vue | 6 +- .../FileUpload/supplierDetailFile.vue | 157 ++++++++++++++++++ src/views/pitchPrice/index.vue | 4 +- src/views/supplier/supplierDetail.vue | 28 +++- src/views/supplier/supplierForm.vue | 16 +- 7 files changed, 214 insertions(+), 27 deletions(-) create mode 100644 src/components/FileUpload/supplierDetailFile.vue diff --git a/src/assets/styles/ruoyi.scss b/src/assets/styles/ruoyi.scss index 687462e..687e674 100644 --- a/src/assets/styles/ruoyi.scss +++ b/src/assets/styles/ruoyi.scss @@ -742,17 +742,12 @@ h6 { transform: none; } -.searchPanelForm .filterSelect .el-select__placeholder, -.searchSmallPanelForm .filterSelect .el-select__placeholder { - font-family: Microsoft YaHei; - font-weight: 400; - font-size: 16px; - color: #FFFFFF; - +// 处理带过滤的下拉框 +.searchPanelForm .filterSelect .el-select__input-wrapper, +.searchSmallPanelForm .filterSelect .el-select__input-wrapper { // 添加这三行,select中设置最小宽度,可以依据选择内容自适应 position: absolute; - top: 50%; - transform: translateY(-50%); + } .searchPanelForm .filterSelect .el-select__input, @@ -761,8 +756,8 @@ h6 { font-weight: 400; font-size: 16px; color: #FFFFFF; - // width: 70px; - line-height: 34px; + min-width: 30px; + line-height: 34px; } .searchPanelForm .el-select__input, @@ -775,7 +770,7 @@ h6 { line-height: 34px; width: 100%; } - + .searchPanelForm .el-select__caret, .searchSmallPanelForm .el-select__caret { color: #FFFFFF; @@ -1190,6 +1185,16 @@ h6 { background: #EDF2F960; } +// 文件类lable +.myDetailForm .filesItemContent .el-form-item__label { + min-height: 104px; + line-height: 104px; +} +// 文件类content +.myDetailForm .filesItemContent .item__content { + line-height: 80px; +} + .my_detailform_label .el-form-item__label { line-height: 20px; padding-top: 10px; diff --git a/src/components/FileUpload/PdfPreview.vue b/src/components/FileUpload/PdfPreview.vue index d6c2edf..3d19083 100644 --- a/src/components/FileUpload/PdfPreview.vue +++ b/src/components/FileUpload/PdfPreview.vue @@ -60,6 +60,7 @@ const zoomOut = () => { overflow: auto; transform-origin: top left; } + .pdf-controls { display: flex; diff --git a/src/components/FileUpload/multiFileUpload.vue b/src/components/FileUpload/multiFileUpload.vue index a797173..5be6dee 100644 --- a/src/components/FileUpload/multiFileUpload.vue +++ b/src/components/FileUpload/multiFileUpload.vue @@ -41,7 +41,7 @@ - + Preview Image
@@ -124,6 +124,7 @@ const requestUpload = async (options) => { formData.append('file', file) try { + proxy.$modal.loading('正在上传文件,请耐心等待...') const res = await uploadFile(formData) if (res.code === 200) { fileList.value.push({ @@ -146,9 +147,12 @@ const requestUpload = async (options) => { size: res.size, suffix: res.suffix }] + proxy.$modal.closeLoading() emit('setFormFile', fileList.value) } } catch (error) { + proxy.$modal.closeLoading() + proxy.$modal.msgError("上传失败") console.error('上传失败:', error) } } diff --git a/src/components/FileUpload/supplierDetailFile.vue b/src/components/FileUpload/supplierDetailFile.vue new file mode 100644 index 0000000..a266134 --- /dev/null +++ b/src/components/FileUpload/supplierDetailFile.vue @@ -0,0 +1,157 @@ + + + + + \ No newline at end of file diff --git a/src/views/pitchPrice/index.vue b/src/views/pitchPrice/index.vue index f834189..0452bed 100644 --- a/src/views/pitchPrice/index.vue +++ b/src/views/pitchPrice/index.vue @@ -4,8 +4,8 @@ + placeholder="请输入" remote-show-suffix clearable + style="min-width: 70px;"> diff --git a/src/views/supplier/supplierDetail.vue b/src/views/supplier/supplierDetail.vue index 2d48976..da827c2 100644 --- a/src/views/supplier/supplierDetail.vue +++ b/src/views/supplier/supplierDetail.vue @@ -70,8 +70,8 @@
- - + + @@ -218,8 +218,8 @@
- - + + @@ -249,8 +249,8 @@
- - + + @@ -282,10 +282,18 @@ import { onMounted, defineEmits, ref } from 'vue' import { Close } from '@element-plus/icons-vue' import { getBusSupplier } from "@/api/supplier" +import supplierDetailFile from '../../components/FileUpload/supplierDetailFile.vue'; const emit = defineEmits(['handleShowList']); const detailForm = ref({}) const activeNames = ref(['1', '2', '3', '4']) +const businessLicenseRef = ref(null) +const otherFileRef = ref(null) +const mediaRightsRef = ref(null) +const businessLicenseList = ref([]) +const otherFileList = ref([]) +const mediaRightsList = ref([]) + const handleClose = () => { emit('handleShowList') } @@ -299,6 +307,14 @@ const handleOpenMedio = () => { const getSupplierInfo = (_supplierId) => { getBusSupplier(_supplierId).then(res => { detailForm.value = res.data + if (detailForm.value.busSupplierFileList && detailForm.value.busSupplierFileList.length > 0) { + businessLicenseList.value = detailForm.value.busSupplierFileList.filter(item => item.fileType == 1) + mediaRightsList.value = detailForm.value.busSupplierFileList.filter(item => item.fileType == 2) + otherFileList.value = detailForm.value.busSupplierFileList.filter(item => item.fileType == 9) + businessLicenseRef.value?.setFileInfo(businessLicenseList.value) + otherFileRef.value?.setFileInfo(otherFileList.value) + mediaRightsRef.value?.setFileInfo(mediaRightsList.value) + } }) } // 暴露方法\属性给父组件 diff --git a/src/views/supplier/supplierForm.vue b/src/views/supplier/supplierForm.vue index 4b04401..f1a349b 100644 --- a/src/views/supplier/supplierForm.vue +++ b/src/views/supplier/supplierForm.vue @@ -438,14 +438,13 @@ const getCountyList2 = (value) => { // 人员规模选择 const handleChangeSize = (val) => { - console.log('选择', val, personnel_size.value) const curSizeInfo = personnel_size.value.filter(item => item.value == val)[0] ruleForm.value.renyuanSize = val ruleForm.value.renyuanGuimo = curSizeInfo?.label } // 业务部门选择 -const handleChangeDept = (val) => { +const handleChangeDept = (val) => { const curDepInfo = deptList.value.filter(item => item.deptId == val)[0] ruleForm.value.yewuDeptId = val ruleForm.value.yewuDept = curDepInfo?.deptName @@ -482,7 +481,6 @@ const handleSubmit = () => { if (valid) { // 使用扩展运算符合并数组 const mergedArray = [...businessLicenseList.value, ...otherFileList.value, ...mediaRightsList.value]; - console.log('营业资质', mergedArray) ruleForm.value.busSupplierFileList = mergedArray if (ruleForm.value.supplierId != undefined) { updateBusSupplier(ruleForm.value).then(response => { @@ -506,6 +504,14 @@ const handleClose = () => { const getSupplierInfo = () => { getBusSupplier(ruleForm.value.supplierId).then(res => { ruleForm.value = res.data + if (ruleForm.value.busSupplierFileList && ruleForm.value.busSupplierFileList.length > 0) { + businessLicenseList.value = ruleForm.value.busSupplierFileList.filter(item => item.fileType == 1) + mediaRightsList.value = ruleForm.value.busSupplierFileList.filter(item => item.fileType == 2) + otherFileList.value = ruleForm.value.busSupplierFileList.filter(item => item.fileType == 9) + businessLicenseRef.value?.setFileInfo(businessLicenseList.value) + otherFileRef.value?.setFileInfo(otherFileList.value) + mediaRightsRef.value?.setFileInfo(mediaRightsList.value) + } handleResponse(res) }) } @@ -534,9 +540,7 @@ const initForm = (_formTitle, _ruleForm) => { businessLicenseRef.value._fileType = 1 otherFileRef.value._fileType = 9 mediaRightsRef.value._fileType = 2 - // businessLicenseRef.value?.setFileInfo(ruleForm.value.beforeCondition.certificatePhoto) - // otherFileRef.value?.setFileInfo(ruleForm.value.beforeCondition.qualificationForm) - // mediaRightsRef.value?.setFileInfo(ruleForm.value.beforeCondition.shFile) + }); } // 暴露方法\属性给父组件