From 9de47f6e4fbcbfa4e5b071a2b7fbb6069a6f190f Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Thu, 30 Oct 2025 17:34:15 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8A=80=E6=9C=AF=E6=96=B9=E6=A1=88?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../enterpriseLibrary/technical/technical.js | 60 ++- src/api/enterpriseLibrary/tool/tool.js | 46 ++ src/components/TableModel2/index.vue | 2 +- src/router/index.js | 2 +- src/views/common/UploadMoreFile.vue | 6 +- .../technical/components/LeftType.vue | 70 ++- .../technical/components/RightTable.vue | 38 +- .../technical/components/TechnicalDetail.vue | 401 ++++++++++++++++++ .../technical/components/TechnicalForm.vue | 42 +- .../technical/components/TypeForm.vue | 31 +- .../technical/components/child/BasicInfo.vue | 24 +- .../components/child/BasicInfoDetail.vue | 126 ++++++ .../technical/components/child/FileInfo.vue | 33 +- .../components/child/FileInfoDetail.vue | 142 +++++++ .../technical/components/config.js | 12 +- .../enterpriseLibrary/technical/index.vue | 21 +- 16 files changed, 953 insertions(+), 103 deletions(-) create mode 100644 src/api/enterpriseLibrary/tool/tool.js create mode 100644 src/views/enterpriseLibrary/technical/components/TechnicalDetail.vue create mode 100644 src/views/enterpriseLibrary/technical/components/child/BasicInfoDetail.vue create mode 100644 src/views/enterpriseLibrary/technical/components/child/FileInfoDetail.vue diff --git a/src/api/enterpriseLibrary/technical/technical.js b/src/api/enterpriseLibrary/technical/technical.js index 36fc235..7875abc 100644 --- a/src/api/enterpriseLibrary/technical/technical.js +++ b/src/api/enterpriseLibrary/technical/technical.js @@ -1,45 +1,83 @@ import request from '@/utils/request' -// 人员库->查询列表 -export function listAPI(params) { +// 技术方案库->查询类别列表 +export function typeListAPI(params) { return request({ - url: '/smartBid/mainDatabase/personnel/getList', + url: '/smartBid/mainDatabase/technical/getTypeList', method: 'GET', params }) } -/* 人员库->新增人员库 */ +/* 技术方案库->新增技术方案类别库 */ +export function addTypeDataAPI(data) { + return request({ + url: '/smartBid/mainDatabase/technical/addTypeData', + method: 'POST', + data + }) +} + +/* 技术方案库->修改技术方案类别库 */ +export function editTypeDataAPI(data) { + return request({ + url: '/smartBid/mainDatabase/technical/editTypeData', + method: 'POST', + data + }) +} + +/* 技术方案库->删除技术方案类别库 */ +export function delTypeDataAPI(data) { + return request({ + url: '/smartBid/mainDatabase/technical/delTypeData', + method: 'POST', + data + }) +} + + + +// 技术方案库->查询列表 +export function listAPI(params) { + return request({ + url: '/smartBid/mainDatabase/technical/getDataList', + method: 'GET', + params + }) +} + +/* 技术方案库->新增技术方案库 */ export function addDataAPI(data) { return request({ - url: '/smartBid/mainDatabase/personnel/addData', + url: '/smartBid/mainDatabase/technical/addData', method: 'POST', data }) } -/* 人员库->修改人员库 */ +/* 技术方案库->修改技术方案库 */ export function editDataAPI(data) { return request({ - url: '/smartBid/mainDatabase/personnel/editData', + url: '/smartBid/mainDatabase/technical/editData', method: 'POST', data }) } -/* 人员库->删除人员库 */ +/* 技术方案库->删除技术方案库 */ export function delDataAPI(data) { return request({ - url: '/smartBid/mainDatabase/personnel/delData', + url: '/smartBid/mainDatabase/technical/delData', method: 'POST', data }) } -/* 人员库->查询详情 */ +/* 技术方案库->查询详情 */ export function getDetailDataAPI(params) { return request({ - url: '/smartBid/mainDatabase/personnel/getDetailData', + url: '/smartBid/mainDatabase/technical/detailData', method: 'GET', params }) diff --git a/src/api/enterpriseLibrary/tool/tool.js b/src/api/enterpriseLibrary/tool/tool.js new file mode 100644 index 0000000..a2b4e8a --- /dev/null +++ b/src/api/enterpriseLibrary/tool/tool.js @@ -0,0 +1,46 @@ +import request from '@/utils/request' + +// 工器具库->查询列表 +export function listAPI(params) { + return request({ + url: '/smartBid/mainDatabase/tool/getList', + method: 'GET', + params + }) +} + +/* 工器具库->新增工器具 */ +export function addDataAPI(data) { + return request({ + url: '/smartBid/mainDatabase/tool/addData', + method: 'POST', + data + }) +} + +/* 工器具库->修改工器具 */ +export function editDataAPI(data) { + return request({ + url: '/smartBid/mainDatabase/tool/editData', + method: 'POST', + data + }) +} + +/* 工器具库->删除工器具 */ +export function delDataAPI(data) { + return request({ + url: '/smartBid/mainDatabase/tool/delData', + method: 'POST', + data + }) +} + +/* 工器具库->查询详情 */ +export function getDetailDataAPI(params) { + return request({ + url: '/smartBid/mainDatabase/tool/getDetailData', + method: 'GET', + params + }) +} \ No newline at end of file diff --git a/src/components/TableModel2/index.vue b/src/components/TableModel2/index.vue index e09bebb..31ca6e2 100644 --- a/src/components/TableModel2/index.vue +++ b/src/components/TableModel2/index.vue @@ -271,7 +271,7 @@ export default { // 操作列最小宽度 dynamicWidth: 0, // 操作列固定宽度,防止列数过少导致过宽 - handleColWidth: 260, + handleColWidth: 200, // 自增id idCount: 1, // 日期查询条件 字段名称 diff --git a/src/router/index.js b/src/router/index.js index 0bb2521..cf84eb7 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -312,7 +312,7 @@ export const dynamicRoutes = [ { path: 'index', component: () => import('@/views/enterpriseLibrary/technical/components/TechnicalForm'), - name: 'TechnicalAdd', + name: 'TechnicalEdit', meta: { title: '修改方案', activeMenu: '/enterpriseLibrary/enterprise', noCache: true } } ] diff --git a/src/views/common/UploadMoreFile.vue b/src/views/common/UploadMoreFile.vue index 380691c..cfce0d6 100644 --- a/src/views/common/UploadMoreFile.vue +++ b/src/views/common/UploadMoreFile.vue @@ -3,7 +3,7 @@ + :auto-upload="autoUpload" :http-request="customUpload" :disabled="disabled">
@@ -59,6 +59,10 @@ export default { type: String, default: '', }, + disabled: { + type: Boolean, + default: false, + }, }, data() { return { diff --git a/src/views/enterpriseLibrary/technical/components/LeftType.vue b/src/views/enterpriseLibrary/technical/components/LeftType.vue index d0e0581..1733449 100644 --- a/src/views/enterpriseLibrary/technical/components/LeftType.vue +++ b/src/views/enterpriseLibrary/technical/components/LeftType.vue @@ -4,8 +4,9 @@ + 添加
-
+
{{ item.technicalSolutionName }} @@ -27,6 +28,7 @@ + + \ No newline at end of file diff --git a/src/views/enterpriseLibrary/technical/components/TechnicalForm.vue b/src/views/enterpriseLibrary/technical/components/TechnicalForm.vue index bcff310..e4594eb 100644 --- a/src/views/enterpriseLibrary/technical/components/TechnicalForm.vue +++ b/src/views/enterpriseLibrary/technical/components/TechnicalForm.vue @@ -14,11 +14,11 @@ - + - +
@@ -30,7 +30,7 @@ import { encryptWithSM4,decryptWithSM4 } from '@/utils/sm' import BasicInfo from './child/BasicInfo.vue' import FileInfo from './child/FileInfo.vue' import GlobalUploadAnimation from '@/views/common/GlobalUploadAnimation.vue' -import { addDataAPI, editDataAPI, getDetailDataAPI } from '@/api/enterpriseLibrary/enterprise/enterprise' +import { addDataAPI, editDataAPI, getDetailDataAPI } from '@/api/enterpriseLibrary/technical/technical' export default { name: 'TechnicalForm', @@ -42,6 +42,9 @@ export default { data() { return { enterpriseId: decryptWithSM4(this.$route.query.enterpriseId), + technicalSolutionTypeId: decryptWithSM4(this.$route.query.technicalSolutionTypeId), + technicalSolutionId: decryptWithSM4(this.$route.query.technicalSolutionId), + type: decryptWithSM4(this.$route.query.type), showUploadAnimation: false, showSaveAnimation: false, // 新增:保存动画状态 uploadQueue: 0, // 上传队列计数器 @@ -68,7 +71,8 @@ export default { // 获取详情 async getDetail() { if (this.type === 'edit') { - const res = await getDetailDataAPI({ enterpriseId: this.enterpriseId }) + const res = await getDetailDataAPI({ technicalSolutionTypeId: this.technicalSolutionTypeId, + technicalSolutionId: this.technicalSolutionId }) console.log('res:', res); this.detailData = res.data; } @@ -85,45 +89,39 @@ export default { try { // 并行校验所有表单 - const [basicInfoData, legalPersonData, accountData] = await Promise.all([ + const [basicInfoData, fileInfoData] = await Promise.all([ this.$refs.basicInfo.validate(), - this.$refs.legalPerson.validate(), - this.$refs.accountOpeningCertificate.validate() + this.$refs.fileInfo.validate() ]) // 所有校验通过,组装完整数据 let formData = { ...basicInfoData, - ...legalPersonData, - ...accountData, + ...fileInfoData, allFiles: [ - ...basicInfoData.fileList.map(file => JSON.parse(JSON.stringify(file))), - ...legalPersonData.fileList.map(file => JSON.parse(JSON.stringify(file))), - ...legalPersonData.fileList2.map(file => JSON.parse(JSON.stringify(file))), - ...accountData.fileList.map(file => JSON.parse(JSON.stringify(file))) + ...fileInfoData.fileList.map(file => JSON.parse(JSON.stringify(file))), ], delFiles: [ - ...basicInfoData.delFileList, - ...legalPersonData.delFileList, - ...accountData.delFileList + ...fileInfoData.delFileList ] } - console.log('所有表单校验通过,完整数据:', formData) - let allFiles = formData.allFiles.map(file => { return file?.response?.fileRes ? { ...file.response.fileRes, } : null; }).filter(item => item !== null); formData.files = allFiles; + formData.natureConstruction = formData.natureConstruction.join(','); + formData.enterpriseId = this.enterpriseId; + formData.technicalSolutionTypeId = this.technicalSolutionTypeId; // 删除不必要的属性 delete formData.fileList; delete formData.delFileList; delete formData.allFiles; - delete formData.fileList2; + console.log('所有表单校验通过,完整数据:', formData) // 保存请求 - const res = await this.saveEnterprise(formData) + const res = await this.saveData(formData) console.log('res:', res); if (res.code === 200) { this.$message.success('保存成功') @@ -140,7 +138,7 @@ export default { } }, // 保存接口 - async saveEnterprise(formData) { + async saveData(formData) { return new Promise((resolve, reject) => { if (this.type === 'add') { // 新增 addDataAPI(formData).then(res => { @@ -149,7 +147,7 @@ export default { reject(error) }) } else { // 修改 - formData.enterpriseId = this.enterpriseId; + formData.technicalSolutionId = this.technicalSolutionId; editDataAPI(formData).then(res => { resolve(res) }).catch(error => { diff --git a/src/views/enterpriseLibrary/technical/components/TypeForm.vue b/src/views/enterpriseLibrary/technical/components/TypeForm.vue index 958006e..ed1f375 100644 --- a/src/views/enterpriseLibrary/technical/components/TypeForm.vue +++ b/src/views/enterpriseLibrary/technical/components/TypeForm.vue @@ -19,7 +19,10 @@ + + \ No newline at end of file diff --git a/src/views/enterpriseLibrary/technical/components/child/FileInfo.vue b/src/views/enterpriseLibrary/technical/components/child/FileInfo.vue index 8b34a7d..c7adecf 100644 --- a/src/views/enterpriseLibrary/technical/components/child/FileInfo.vue +++ b/src/views/enterpriseLibrary/technical/components/child/FileInfo.vue @@ -9,7 +9,7 @@ + :fileUploadRule="fileUploadRule" :limitUploadNum="limitUploadNum" :disabled="disabled" />
@@ -26,7 +26,8 @@ const defaultParams = { fields_json: '', suffix: 'technical_solution_database' }, - limitUploadNum: 5 + limitUploadNum: 5, + disabled: false }; import UploadMoreFile from '@/views/common/UploadMoreFile.vue' export default { @@ -47,6 +48,7 @@ export default { maxFileTips: defaultParams.maxFileTips, fileUploadRule: defaultParams.fileUploadRule, limitUploadNum: defaultParams.limitUploadNum, + disabled: defaultParams.disabled, form: { fileList: [], delFileList: [] @@ -58,6 +60,18 @@ export default { } } }, + watch: { + detailData:{ + handler(newVal) { + if(Object.keys(newVal).length > 0){ + this.limitUploadNum = 1; + this.disabled = true; + this.setFormData(newVal) + } + }, + immediate: true + } + }, created() { }, methods: { @@ -89,7 +103,22 @@ export default { } }, setFormData() { + const fileList = this.getFileList(); + this.form = { + fileList: fileList, + delFileList: [] + } }, + getFileList(){ + return this.detailData.resourceFileVoList.map(item => { + return { + name: item.fileName, + filePath: item.filePath, + lsFilePath:item.lsFilePath, + fileType:item.fileType + }; + }); + } }, } diff --git a/src/views/enterpriseLibrary/technical/components/child/FileInfoDetail.vue b/src/views/enterpriseLibrary/technical/components/child/FileInfoDetail.vue new file mode 100644 index 0000000..c7adecf --- /dev/null +++ b/src/views/enterpriseLibrary/technical/components/child/FileInfoDetail.vue @@ -0,0 +1,142 @@ + + + + + \ No newline at end of file diff --git a/src/views/enterpriseLibrary/technical/components/config.js b/src/views/enterpriseLibrary/technical/components/config.js index 0ab0951..bd305e9 100644 --- a/src/views/enterpriseLibrary/technical/components/config.js +++ b/src/views/enterpriseLibrary/technical/components/config.js @@ -33,10 +33,10 @@ export const formLabel = [ ] export const columnsList = [ - { t_props: 'userName', t_label: '方案名称' }, - { t_props: 'nickName', t_label: '建设性质' }, - { t_props: 'phonenumberDes', t_label: '结构形式' }, - { t_props: 'phonenumberDes', t_label: '基础形式' }, - { t_props: 'phonenumberDes', t_label: '文件状态' }, - { t_slot: 'deptName', t_label: '创建时间' }, + { t_props: 'technicalName',t_width: 350, t_label: '方案名称' }, + { t_props: 'natureConstruction', t_label: '建设性质' }, + { t_props: 'structuralForm', t_label: '结构形式' }, + { t_props: 'basicForm', t_label: '基础形式' }, + { t_slot: 'technicalSolutionState', t_label: '文件状态' }, + { t_props: 'createTime',t_width: 180, t_label: '创建时间' }, ] \ No newline at end of file diff --git a/src/views/enterpriseLibrary/technical/index.vue b/src/views/enterpriseLibrary/technical/index.vue index 9623b4f..c593cb7 100644 --- a/src/views/enterpriseLibrary/technical/index.vue +++ b/src/views/enterpriseLibrary/technical/index.vue @@ -8,12 +8,12 @@
- + - - + @@ -34,7 +34,7 @@ export default { }, data() { return { - activeCategory: 'dev', + activeCategory: null, enterpriseId: decryptWithSM4(this.$route.query.enterpriseId), } }, @@ -81,6 +81,7 @@ export default { \ No newline at end of file From 991428f85a7e7ffb6a0d9b46347f4c651d505a56 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Thu, 30 Oct 2025 17:56:52 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8A=80=E6=9C=AF=E6=96=B9=E6=A1=88?= =?UTF-8?q?=E5=BA=93=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 4 +- .../technical/components/RightTable.vue | 14 +- .../technical/components/TechnicalDetail.vue | 230 +----------------- .../technical/components/TechnicalForm.vue | 87 ------- .../components/child/BasicInfoDetail.vue | 76 ++---- .../components/child/FileInfoDetail.vue | 87 ++----- 6 files changed, 55 insertions(+), 443 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index cf84eb7..49cca71 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -325,8 +325,8 @@ export const dynamicRoutes = [ children: [ { path: 'index', - component: () => import('@/views/enterpriseLibrary/technical/components/TechnicalForm'), - name: 'TechnicalAdd', + component: () => import('@/views/enterpriseLibrary/technical/components/TechnicalDetail'), + name: 'TechnicalDetail', meta: { title: '方案详情', activeMenu: '/enterpriseLibrary/enterprise', noCache: true } } ] diff --git a/src/views/enterpriseLibrary/technical/components/RightTable.vue b/src/views/enterpriseLibrary/technical/components/RightTable.vue index ec355be..5e93673 100644 --- a/src/views/enterpriseLibrary/technical/components/RightTable.vue +++ b/src/views/enterpriseLibrary/technical/components/RightTable.vue @@ -15,7 +15,7 @@ diff --git a/src/views/enterpriseLibrary/technical/components/child/FileInfoDetail.vue b/src/views/enterpriseLibrary/technical/components/child/FileInfoDetail.vue index c7adecf..1364c2f 100644 --- a/src/views/enterpriseLibrary/technical/components/child/FileInfoDetail.vue +++ b/src/views/enterpriseLibrary/technical/components/child/FileInfoDetail.vue @@ -4,36 +4,19 @@ 文件上传 文件上传
- - - - - - +
+ +