Merge branch 'main' of http://192.168.110.2:3000/taoge/mk_system into fs
This commit is contained in:
		| @ -5,7 +5,7 @@ VITE_APP_TITLE = 煤科建管平台 | |||||||
| VITE_APP_ENV = 'development' | VITE_APP_ENV = 'development' | ||||||
|  |  | ||||||
| # 开发环境 | # 开发环境 | ||||||
| VITE_APP_BASE_API = 'http://192.168.110.213:8899' | VITE_APP_BASE_API = 'http://192.168.110.180:8899' | ||||||
|  |  | ||||||
| # 无人机接口地址 | # 无人机接口地址 | ||||||
|  |  | ||||||
|  | |||||||
							
								
								
									
										55
									
								
								public/image/convert_tif.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								public/image/convert_tif.bat
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,55 @@ | |||||||
|  | @echo off | ||||||
|  | setlocal | ||||||
|  |  | ||||||
|  | REM 源文件 | ||||||
|  | set SRC=odm_orthophoto.tif | ||||||
|  |  | ||||||
|  | REM 中间文件:去掩膜 + 保留 4 波段 | ||||||
|  | set TMP1=tmp_nomask.tif | ||||||
|  |  | ||||||
|  | REM 中间文件:gdalwarp 处理透明通道 | ||||||
|  | set TMP2=tmp_nomask_alpha.tif | ||||||
|  |  | ||||||
|  | REM 最终输出文件(性能优化:缩放 + 压缩) | ||||||
|  | set FINAL=clean_no_mask_optimized.tif | ||||||
|  |  | ||||||
|  | REM 配置参数 | ||||||
|  | REM -tr 0.25x 分辨率控制(0.25 倍像素,或者每个像素大小扩大4倍),视你项目需要可调 | ||||||
|  | REM -co 压缩参数:LZW 是无损压缩方式,TILED=YES 支持分块加载 | ||||||
|  | REM -r average 使用平均值重采样可保持图像质量 | ||||||
|  |  | ||||||
|  | echo [1/4] gdal_translate:去除掩膜并保留RGBA四波段... | ||||||
|  | gdal_translate -b 1 -b 2 -b 3 -b 4 -mask none -co PHOTOMETRIC=RGB -co ALPHA=YES %SRC% %TMP1% | ||||||
|  | if errorlevel 1 ( | ||||||
|  |     echo ❌ gdal_translate 失败 | ||||||
|  |     exit /b 1 | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | echo [2/4] gdalwarp:强制生成 Alpha 通道... | ||||||
|  | gdalwarp -dstalpha %TMP1% %TMP2% | ||||||
|  | if errorlevel 1 ( | ||||||
|  |     echo ❌ gdalwarp 失败 | ||||||
|  |     exit /b 1 | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | echo [3/4] gdalwarp:降采样并启用压缩优化... | ||||||
|  | gdalwarp ^ | ||||||
|  |   -r average ^ | ||||||
|  |   -tr 2 2 ^ | ||||||
|  |   -co COMPRESS=LZW ^ | ||||||
|  |   -co TILED=YES ^ | ||||||
|  |   -co PHOTOMETRIC=RGB ^ | ||||||
|  |   -co ALPHA=YES ^ | ||||||
|  |   %TMP2% %FINAL% | ||||||
|  | if errorlevel 1 ( | ||||||
|  |     echo ❌ gdalwarp 压缩优化失败 | ||||||
|  |     exit /b 1 | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | echo [4/4] 清理临时文件... | ||||||
|  | del %TMP1% | ||||||
|  | del %TMP2% | ||||||
|  |  | ||||||
|  | echo ✅ 完成!优化后的 GeoTIFF 已生成:%FINAL% | ||||||
|  | endlocal | ||||||
|  | pause | ||||||
| @ -61,3 +61,23 @@ export const delDesignChange = (id: string | number | Array<string | number>) => | |||||||
|     method: 'delete' |     method: 'delete' | ||||||
|   }); |   }); | ||||||
| }; | }; | ||||||
|  | /** | ||||||
|  |  * 获取卷册号 | ||||||
|  |  * @param id | ||||||
|  |  */ | ||||||
|  | export const blueprintList = (id) => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/design/designChange/blueprint/' + id, | ||||||
|  |     method: 'get' | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  | /** | ||||||
|  |  * 获取卷册列表 | ||||||
|  |  * @param id | ||||||
|  |  */ | ||||||
|  | export const catalogList = (id) => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/design/designChange/catalogList/' + id, | ||||||
|  |     method: 'get' | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  | |||||||
| @ -82,3 +82,14 @@ export const volumeFileViewerList = (id) => { | |||||||
|     method: 'get' |     method: 'get' | ||||||
|   }); |   }); | ||||||
| }; | }; | ||||||
|  | /** | ||||||
|  |  * 查阅图纸列表 | ||||||
|  |  * @param id | ||||||
|  |  */ | ||||||
|  | export const joinList = (params) => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/design/volumeFile/joinList', | ||||||
|  |     method: 'get', | ||||||
|  |     params | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  | |||||||
| @ -65,7 +65,7 @@ export const addVolumeCatalog = (data: VolumeCatalogForm) => { | |||||||
|  * 修改卷册目录 |  * 修改卷册目录 | ||||||
|  * @param data |  * @param data | ||||||
|  */ |  */ | ||||||
| export const updateVolumeCatalog = (data: VolumeCatalogForm) => { | export const updateVolumeCatalog = (data) => { | ||||||
|   return request({ |   return request({ | ||||||
|     url: '/design/volumeCatalog', |     url: '/design/volumeCatalog', | ||||||
|     method: 'put', |     method: 'put', | ||||||
|  | |||||||
| @ -130,3 +130,16 @@ export const listSelectCailiaoshebei = (query?: any): AxiosPromise<Cailiaoshebei | |||||||
|     params: query |     params: query | ||||||
|   }); |   }); | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 查询字典数据 | ||||||
|  |  * @param dictType | ||||||
|  |  * @returns {*} | ||||||
|  |  */ | ||||||
|  | export const getDictList = (query: any): AxiosPromise<any[]> => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/cailiaoshebei/purchaseDoc/engineeringList', | ||||||
|  |     method: 'get', | ||||||
|  |     params: query | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  | |||||||
| @ -121,3 +121,10 @@ export const logisticsDetial = (id) => { | |||||||
|     method: 'get' |     method: 'get' | ||||||
|   }); |   }); | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | export const getDetailBASE = (id) => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/cailiaoshebei/purchaseDoc/pic/' + id, | ||||||
|  |     method: 'get' | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  | |||||||
							
								
								
									
										63
									
								
								src/api/patch/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								src/api/patch/index.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,63 @@ | |||||||
|  | import request from '@/utils/request'; | ||||||
|  | import { AxiosPromise } from 'axios'; | ||||||
|  | import { MasterVO, MasterForm, MasterQuery } from '@/api/patch/master/types'; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 查询派单列表 | ||||||
|  |  * @param query | ||||||
|  |  * @returns {*} | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | export const listMaster = (query?: MasterQuery): AxiosPromise<MasterVO[]> => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/patch/list', | ||||||
|  |     method: 'get', | ||||||
|  |     params: query | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 查询派单详细 | ||||||
|  |  * @param id | ||||||
|  |  */ | ||||||
|  | export const getMaster = (id: string | number): AxiosPromise<MasterVO> => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/patch/' + id, | ||||||
|  |     method: 'get' | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 新增派单 | ||||||
|  |  * @param data | ||||||
|  |  */ | ||||||
|  | export const addMaster = (data: MasterForm) => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/patch/', | ||||||
|  |     method: 'post', | ||||||
|  |     data: data | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 修改派单 | ||||||
|  |  * @param data | ||||||
|  |  */ | ||||||
|  | export const updateMaster = (data: MasterForm) => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/patch/', | ||||||
|  |     method: 'put', | ||||||
|  |     data: data | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 删除派单 | ||||||
|  |  * @param id | ||||||
|  |  */ | ||||||
|  | export const delMaster = (id: string | number | Array<string | number>) => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/patch/' + id, | ||||||
|  |     method: 'delete' | ||||||
|  |   }); | ||||||
|  | }; | ||||||
							
								
								
									
										141
									
								
								src/api/patch/types.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										141
									
								
								src/api/patch/types.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,141 @@ | |||||||
|  | export interface MasterVO { | ||||||
|  |   /** | ||||||
|  |    * 主键ID | ||||||
|  |    */ | ||||||
|  |   id: string | number; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 项目ID | ||||||
|  |    */ | ||||||
|  |   projectId: string | number; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 任务名称 | ||||||
|  |    */ | ||||||
|  |   taskName: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 任务描述 | ||||||
|  |    */ | ||||||
|  |   describe: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 计划完成时间 | ||||||
|  |    */ | ||||||
|  |   pcd: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 实际完成时间 | ||||||
|  |    */ | ||||||
|  |   act: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 完成进度 | ||||||
|  |    */ | ||||||
|  |   completionProgress: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 任务状态 | ||||||
|  |    */ | ||||||
|  |   taskStatus: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 备注 | ||||||
|  |    */ | ||||||
|  |   remark: string; | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | export interface MasterForm extends BaseEntity { | ||||||
|  |   /** | ||||||
|  |    * 主键ID | ||||||
|  |    */ | ||||||
|  |   id?: string | number; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 项目ID | ||||||
|  |    */ | ||||||
|  |   projectId?: string | number; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 任务名称 | ||||||
|  |    */ | ||||||
|  |   taskName?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 任务描述 | ||||||
|  |    */ | ||||||
|  |   describe?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 计划完成时间 | ||||||
|  |    */ | ||||||
|  |   pcd?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 实际完成时间 | ||||||
|  |    */ | ||||||
|  |   act?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 完成进度 | ||||||
|  |    */ | ||||||
|  |   completionProgress?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 任务状态 | ||||||
|  |    */ | ||||||
|  |   taskStatus?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 备注 | ||||||
|  |    */ | ||||||
|  |   remark?: string; | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | export interface MasterQuery extends PageQuery { | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 项目ID | ||||||
|  |    */ | ||||||
|  |   projectId?: string | number; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 任务名称 | ||||||
|  |    */ | ||||||
|  |   taskName?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 任务描述 | ||||||
|  |    */ | ||||||
|  |   describe?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 计划完成时间 | ||||||
|  |    */ | ||||||
|  |   pcd?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 实际完成时间 | ||||||
|  |    */ | ||||||
|  |   act?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 完成进度 | ||||||
|  |    */ | ||||||
|  |   completionProgress?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 任务状态 | ||||||
|  |    */ | ||||||
|  |   taskStatus?: string; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 日期范围参数 | ||||||
|  |      */ | ||||||
|  |     params?: any; | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
							
								
								
									
										63
									
								
								src/api/plan/plan/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								src/api/plan/plan/index.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,63 @@ | |||||||
|  | import request from '@/utils/request'; | ||||||
|  | import { AxiosPromise } from 'axios'; | ||||||
|  | import { PlanVO, PlanForm, PlanQuery } from '@/api/plan/plan/types'; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 查询招标计划列表 | ||||||
|  |  * @param query | ||||||
|  |  * @returns {*} | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | export const listPlan = (query?: PlanQuery): AxiosPromise<PlanVO[]> => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/plan/plan/list', | ||||||
|  |     method: 'get', | ||||||
|  |     params: query | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 查询招标计划详细 | ||||||
|  |  * @param id | ||||||
|  |  */ | ||||||
|  | export const getPlan = (id: string | number): AxiosPromise<PlanVO> => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/plan/plan/' + id, | ||||||
|  |     method: 'get' | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 新增招标计划 | ||||||
|  |  * @param data | ||||||
|  |  */ | ||||||
|  | export const addPlan = (data: PlanForm) => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/plan/plan', | ||||||
|  |     method: 'post', | ||||||
|  |     data: data | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 修改招标计划 | ||||||
|  |  * @param data | ||||||
|  |  */ | ||||||
|  | export const updatePlan = (data: PlanForm) => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/plan/plan', | ||||||
|  |     method: 'put', | ||||||
|  |     data: data | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 删除招标计划 | ||||||
|  |  * @param id | ||||||
|  |  */ | ||||||
|  | export const delPlan = (id: string | number | Array<string | number>) => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/plan/plan/' + id, | ||||||
|  |     method: 'delete' | ||||||
|  |   }); | ||||||
|  | }; | ||||||
							
								
								
									
										161
									
								
								src/api/plan/plan/types.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										161
									
								
								src/api/plan/plan/types.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,161 @@ | |||||||
|  | export interface PlanVO { | ||||||
|  |   /** | ||||||
|  |    * 招标计划ID | ||||||
|  |    */ | ||||||
|  |   id: string | number; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 分包类型 | ||||||
|  |    */ | ||||||
|  |   subpackageType: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 分包名称 | ||||||
|  |    */ | ||||||
|  |   subpackageName: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 分包内容 | ||||||
|  |    */ | ||||||
|  |   subpackageContext: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 限价 | ||||||
|  |    */ | ||||||
|  |   limitPrice: number; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 计划招标时间 | ||||||
|  |    */ | ||||||
|  |   planTenderTime: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 招标方式 | ||||||
|  |    */ | ||||||
|  |   tenderMethod: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 招标文件(多个) | ||||||
|  |    */ | ||||||
|  |   tenderFile: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 中标文件(单个) | ||||||
|  |    */ | ||||||
|  |   bidFile: string | number; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 合同额 | ||||||
|  |    */ | ||||||
|  |   contract: number; | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | export interface PlanForm extends BaseEntity { | ||||||
|  |   /** | ||||||
|  |    * 招标计划ID | ||||||
|  |    */ | ||||||
|  |   id?: string | number; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 分包类型 | ||||||
|  |    */ | ||||||
|  |   subpackageType?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 分包名称 | ||||||
|  |    */ | ||||||
|  |   subpackageName?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 分包内容 | ||||||
|  |    */ | ||||||
|  |   subpackageContext?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 限价 | ||||||
|  |    */ | ||||||
|  |   limitPrice?: number; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 计划招标时间 | ||||||
|  |    */ | ||||||
|  |   planTenderTime?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 招标方式 | ||||||
|  |    */ | ||||||
|  |   tenderMethod?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 招标文件(多个) | ||||||
|  |    */ | ||||||
|  |   tenderFile?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 中标文件(单个) | ||||||
|  |    */ | ||||||
|  |   bidFile?: string | number; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 合同额 | ||||||
|  |    */ | ||||||
|  |   contract?: number; | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | export interface PlanQuery extends PageQuery { | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 分包类型 | ||||||
|  |    */ | ||||||
|  |   subpackageType?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 分包名称 | ||||||
|  |    */ | ||||||
|  |   subpackageName?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 分包内容 | ||||||
|  |    */ | ||||||
|  |   subpackageContext?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 限价 | ||||||
|  |    */ | ||||||
|  |   limitPrice?: number; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 计划招标时间 | ||||||
|  |    */ | ||||||
|  |   planTenderTime?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 招标方式 | ||||||
|  |    */ | ||||||
|  |   tenderMethod?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 招标文件(多个) | ||||||
|  |    */ | ||||||
|  |   tenderFile?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 中标文件(单个) | ||||||
|  |    */ | ||||||
|  |   bidFile?: string | number; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 合同额 | ||||||
|  |    */ | ||||||
|  |   contract?: number; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 日期范围参数 | ||||||
|  |      */ | ||||||
|  |     params?: any; | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| @ -174,3 +174,15 @@ export const getChildProject = (id: string | number): AxiosPromise<childProjectQ | |||||||
|     method: 'get' |     method: 'get' | ||||||
|   }); |   }); | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 上传项目文件 | ||||||
|  |  * @param data | ||||||
|  |  */ | ||||||
|  | export const uploadProjectFile = (data: any) => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/project/project/save/tender/file', | ||||||
|  |     method: 'put', | ||||||
|  |     data: data | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  | |||||||
| @ -8,6 +8,7 @@ export interface ProjectVO { | |||||||
|    * 项目名称 |    * 项目名称 | ||||||
|    */ |    */ | ||||||
|   projectName: string; |   projectName: string; | ||||||
|  |   tenderFiles: string; | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 项目简称 |    * 项目简称 | ||||||
| @ -128,10 +129,10 @@ export interface locationType { | |||||||
|   projectSite: string; |   projectSite: string; | ||||||
| } | } | ||||||
|  |  | ||||||
| export interface childProjectQuery{ | export interface childProjectQuery { | ||||||
|   projectName:string; |   projectName: string; | ||||||
|   pid:string; |   pid: string; | ||||||
|   id?:string |   id?: string; | ||||||
| } | } | ||||||
|  |  | ||||||
| export interface ProjectForm extends BaseEntity { | export interface ProjectForm extends BaseEntity { | ||||||
|  | |||||||
							
								
								
									
										63
									
								
								src/api/supplierInput/supplierInput/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								src/api/supplierInput/supplierInput/index.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,63 @@ | |||||||
|  | import request from '@/utils/request'; | ||||||
|  | import { AxiosPromise } from 'axios'; | ||||||
|  | import { SupplierInputVO, SupplierInputForm, SupplierInputQuery } from '@/api/supplierInput/supplierInput/types'; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 查询供应商入库列表 | ||||||
|  |  * @param query | ||||||
|  |  * @returns {*} | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | export const listSupplierInput = (query?: SupplierInputQuery): AxiosPromise<SupplierInputVO[]> => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/supplierInput/supplierInput/list', | ||||||
|  |     method: 'get', | ||||||
|  |     params: query | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 查询供应商入库详细 | ||||||
|  |  * @param id | ||||||
|  |  */ | ||||||
|  | export const getSupplierInput = (id: string | number): AxiosPromise<SupplierInputVO> => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/supplierInput/supplierInput/' + id, | ||||||
|  |     method: 'get' | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 新增供应商入库 | ||||||
|  |  * @param data | ||||||
|  |  */ | ||||||
|  | export const addSupplierInput = (data: SupplierInputForm) => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/supplierInput/supplierInput', | ||||||
|  |     method: 'post', | ||||||
|  |     data: data | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 修改供应商入库 | ||||||
|  |  * @param data | ||||||
|  |  */ | ||||||
|  | export const updateSupplierInput = (data: SupplierInputForm) => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/supplierInput/supplierInput', | ||||||
|  |     method: 'put', | ||||||
|  |     data: data | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 删除供应商入库 | ||||||
|  |  * @param id | ||||||
|  |  */ | ||||||
|  | export const delSupplierInput = (id: string | number | Array<string | number>) => { | ||||||
|  |   return request({ | ||||||
|  |     url: '/supplierInput/supplierInput/' + id, | ||||||
|  |     method: 'delete' | ||||||
|  |   }); | ||||||
|  | }; | ||||||
							
								
								
									
										55
									
								
								src/api/supplierInput/supplierInput/types.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								src/api/supplierInput/supplierInput/types.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,55 @@ | |||||||
|  | export interface SupplierInputVO { | ||||||
|  |   /** | ||||||
|  |    * | ||||||
|  |    */ | ||||||
|  |   id: string | number; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 供应商类型 | ||||||
|  |    */ | ||||||
|  |   supplierType: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 入库资料 | ||||||
|  |    */ | ||||||
|  |   inputFile: string; | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | export interface SupplierInputForm extends BaseEntity { | ||||||
|  |   /** | ||||||
|  |    * | ||||||
|  |    */ | ||||||
|  |   id?: string | number; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 供应商类型 | ||||||
|  |    */ | ||||||
|  |   supplierType?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 入库资料 | ||||||
|  |    */ | ||||||
|  |   inputFile?: string; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | export interface SupplierInputQuery extends PageQuery { | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 供应商类型 | ||||||
|  |    */ | ||||||
|  |   supplierType?: string; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 入库资料 | ||||||
|  |    */ | ||||||
|  |   inputFile?: string; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 日期范围参数 | ||||||
|  |      */ | ||||||
|  |     params?: any; | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| @ -315,6 +315,11 @@ const uploadedSuccessfully = (res: any) => { | |||||||
|     fileList.value = []; |     fileList.value = []; | ||||||
|     emit('update:modelValue', ''); // 同步到外部 v-model |     emit('update:modelValue', ''); // 同步到外部 v-model | ||||||
|   } |   } | ||||||
|  |   // if (props.autoUpload && props.limit === fileList.value.length) { | ||||||
|  |   //   fileUploadRef.value?.clearFiles(); | ||||||
|  |   //   fileList.value = []; | ||||||
|  |   //   emit('update:modelValue', ''); // 同步到外部 v-model | ||||||
|  |   // } | ||||||
|   props.onUploadSuccess?.(fileList.value, res); |   props.onUploadSuccess?.(fileList.value, res); | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | |||||||
| @ -34,7 +34,7 @@ | |||||||
|     </el-form> |     </el-form> | ||||||
|     <template #footer> |     <template #footer> | ||||||
|       <span class="dialog-footer"> |       <span class="dialog-footer"> | ||||||
|         <el-button :disabled="buttonDisabled" type="primary" @click="handleCompleteTask"> 通过 </el-button> |         <el-button :disabled="buttonDisabled" type="primary" @click="handleCompleteTask"> 提交 </el-button> | ||||||
|         <el-button v-if="task.flowStatus === 'waiting' && buttonObj.trust" :disabled="buttonDisabled" type="primary" @click="openDelegateTask"> |         <el-button v-if="task.flowStatus === 'waiting' && buttonObj.trust" :disabled="buttonDisabled" type="primary" @click="openDelegateTask"> | ||||||
|           委托 |           委托 | ||||||
|         </el-button> |         </el-button> | ||||||
| @ -304,7 +304,6 @@ const emits = defineEmits(['submitCallback', 'cancelCallback']); | |||||||
| const handleCompleteTask = async () => { | const handleCompleteTask = async () => { | ||||||
|   form.value.taskId = taskId.value; |   form.value.taskId = taskId.value; | ||||||
|   form.value.variables = props.taskVariables; |   form.value.variables = props.taskVariables; | ||||||
|  |  | ||||||
|   let verify = false; |   let verify = false; | ||||||
|   if (buttonObj.value.pop && nestNodeList.value && nestNodeList.value.length > 0) { |   if (buttonObj.value.pop && nestNodeList.value && nestNodeList.value.length > 0) { | ||||||
|     nestNodeList.value.forEach((e) => { |     nestNodeList.value.forEach((e) => { | ||||||
| @ -353,13 +352,13 @@ const handleCompleteTask = async () => { | |||||||
|   } |   } | ||||||
| }; | }; | ||||||
| const handleShowSubmit = async () => { | const handleShowSubmit = async () => { | ||||||
|   await completeTask(form.value).finally(() => { |   detailFormTeRef.value.submit(businessId.value, () => { | ||||||
|     // 提交设计验证 |     completeTask(form.value).finally(() => { | ||||||
|     detailFormTeRef.value.submit(businessId.value); |       dialog.visible = false; | ||||||
|  |       emits('submitCallback'); | ||||||
|  |       proxy?.$modal.msgSuccess('操作成功'); | ||||||
|  |     }); | ||||||
|   }); |   }); | ||||||
|   dialog.visible = false; |  | ||||||
|   emits('submitCallback'); |  | ||||||
|   proxy?.$modal.msgSuccess('操作成功'); |  | ||||||
| }; | }; | ||||||
| /** 驳回弹窗打开 */ | /** 驳回弹窗打开 */ | ||||||
| const handleBackProcessOpen = async () => { | const handleBackProcessOpen = async () => { | ||||||
| @ -525,15 +524,15 @@ const handleTermination = async () => { | |||||||
|     taskId: taskId.value, |     taskId: taskId.value, | ||||||
|     comment: form.value.message |     comment: form.value.message | ||||||
|   }; |   }; | ||||||
|   await terminationTask(params).finally(() => { |   detailFormTeRef.value.submit(businessId.value, () => { | ||||||
|     // 提交设计验证 |     terminationTask(params).finally(() => { | ||||||
|     detailFormTeRef.value.submit(businessId.value); |       loading.value = false; | ||||||
|     loading.value = false; |       buttonDisabled.value = false; | ||||||
|     buttonDisabled.value = false; |       dialog.visible = false; | ||||||
|  |       emits('submitCallback'); | ||||||
|  |       proxy?.$modal.msgSuccess('操作成功'); | ||||||
|  |     }); | ||||||
|   }); |   }); | ||||||
|   dialog.visible = false; |  | ||||||
|   emits('submitCallback'); |  | ||||||
|   proxy?.$modal.msgSuccess('操作成功'); |  | ||||||
| }; | }; | ||||||
| //终止任务 | //终止任务 | ||||||
| const handleTerminationTask = async () => { | const handleTerminationTask = async () => { | ||||||
|  | |||||||
| @ -293,4 +293,17 @@ const handleAddApp = (row) => { | |||||||
| onMounted(() => { | onMounted(() => { | ||||||
|   getList(); |   getList(); | ||||||
| }); | }); | ||||||
|  |  | ||||||
|  | //监听项目id刷新数据 | ||||||
|  | const listeningProject = watch( | ||||||
|  |   () => currentProject.value?.id, | ||||||
|  |   (nid, oid) => { | ||||||
|  |     queryParams.value.projectId = nid; | ||||||
|  |     getList(); | ||||||
|  |   } | ||||||
|  | ); | ||||||
|  |  | ||||||
|  | onUnmounted(() => { | ||||||
|  |   listeningProject(); | ||||||
|  | }); | ||||||
| </script> | </script> | ||||||
|  | |||||||
| @ -20,28 +20,17 @@ | |||||||
|         </div> |         </div> | ||||||
|         <div class="p-6"> |         <div class="p-6"> | ||||||
|           <div class="appWidth mx-auto bg-white rounded-xl shadow-sm overflow-hidden transition-all duration-300 hover:shadow-md"> |           <div class="appWidth mx-auto bg-white rounded-xl shadow-sm overflow-hidden transition-all duration-300 hover:shadow-md"> | ||||||
|             <!-- 表单内容区域 --> |             <!-- 主表单:基础信息校验 --> | ||||||
|             <el-form :disabled="disableAll" ref="mainFormRef" :model="form" :rules="mainRules" label-width="120px" class="p-6"> |             <el-form :disabled="disableAll" ref="mainFormRef" :model="form" :rules="mainRules" label-width="120px" class="p-6"> | ||||||
|               <!-- 基本信息区域 --> |               <!-- 基本信息区域 --> | ||||||
|               <div class="bg-blue-50 p-4 rounded-lg mb-6"> |               <div class="bg-blue-50 p-4 rounded-lg mb-6"> | ||||||
|                 <h3 class="text-lg font-semibold text-blue-700 mb-4">基本信息</h3> |                 <h3 class="text-lg font-semibold text-blue-700 mb-4">基本信息</h3> | ||||||
|                 <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> |                 <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> | ||||||
|                   <el-form-item label="提资人" prop="userId" class="mb-4"> |                   <el-form-item label="提资人" class="mb-4"> | ||||||
|                     <el-select |                     <el-input placeholder="请输入提资人" disabled v-model="userInfo.nickName" autocomplete="off" /> | ||||||
|                       v-model="form.userId" |  | ||||||
|                       placeholder="请选择提资人" |  | ||||||
|                       class="w-full transition-all duration-300 border-gray-300 focus:border-blue-400 focus:ring-1 focus:ring-blue-400" |  | ||||||
|                     > |  | ||||||
|                       <el-option v-for="item in userList" :key="item.userId" :label="item.nickName" :value="item.userId" /> |  | ||||||
|                     </el-select> |  | ||||||
|                   </el-form-item> |                   </el-form-item> | ||||||
|                   <el-form-item label="专业" prop="user_major" class="mb-4"> |                   <el-form-item label="专业" prop="user_major" class="mb-4"> | ||||||
|                     <el-select |                     <el-select v-model="form.user_major" placeholder="请选择专业" class="transition-all duration-300 border-gray-300"> | ||||||
|                       v-model="form.user_major" |  | ||||||
|                       placeholder="请选择专业" |  | ||||||
|                       class="transition-all duration-300 border-gray-300" |  | ||||||
|                       :rules="{ required: true, message: '请选择专业', trigger: 'change' }" |  | ||||||
|                     > |  | ||||||
|                       <el-option v-for="item in des_user_major" :key="item.value" :label="item.label" :value="item.value" /> |                       <el-option v-for="item in des_user_major" :key="item.value" :label="item.label" :value="item.value" /> | ||||||
|                     </el-select> |                     </el-select> | ||||||
|                   </el-form-item> |                   </el-form-item> | ||||||
| @ -53,13 +42,14 @@ | |||||||
|                   </el-form-item> |                   </el-form-item> | ||||||
|                 </div> |                 </div> | ||||||
|               </div> |               </div> | ||||||
|               <!-- 资料文件区域 --> |  | ||||||
|  |               <!-- 资料文件区域:单独表单校验 --> | ||||||
|               <div class="mb-6"> |               <div class="mb-6"> | ||||||
|                 <div class="flex items-center justify-between mb-4"> |                 <div class="flex items-center justify-between mb-4"> | ||||||
|                   <h3 class="text-lg font-semibold text-blue-700">资料文件清单</h3> |                   <h3 class="text-lg font-semibold text-blue-700">资料文件清单</h3> | ||||||
|                   <el-button type="primary" size="small" @click="addDocumentItem" icon="Plus"> 添加资料 </el-button> |                   <el-button type="primary" size="small" @click="addDocumentItem" icon="Plus"> 添加资料 </el-button> | ||||||
|                 </div> |                 </div> | ||||||
|                 <el-form :disabled="disableAll" ref="documentsFormRef" :model="form" class="space-y-4"> |                 <el-form :disabled="disableAll" ref="documentsFormRef" :model="form" class="space-y-4" label-width="120px"> | ||||||
|                   <div |                   <div | ||||||
|                     v-for="(item, index) in form.documents" |                     v-for="(item, index) in form.documents" | ||||||
|                     :key="item.id" |                     :key="item.id" | ||||||
| @ -67,7 +57,6 @@ | |||||||
|                   > |                   > | ||||||
|                     <div class="flex justify-between items-start mb-2"> |                     <div class="flex justify-between items-start mb-2"> | ||||||
|                       <span class="text-sm font-medium text-gray-600">资料 {{ index + 1 }}</span> |                       <span class="text-sm font-medium text-gray-600">资料 {{ index + 1 }}</span> | ||||||
|  |  | ||||||
|                       <el-button |                       <el-button | ||||||
|                         type="text" |                         type="text" | ||||||
|                         size="small" |                         size="small" | ||||||
| @ -80,10 +69,14 @@ | |||||||
|                       </el-button> |                       </el-button> | ||||||
|                     </div> |                     </div> | ||||||
|                     <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> |                     <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> | ||||||
|  |                       <!-- 资料名称:补充验证规则 --> | ||||||
|                       <el-form-item |                       <el-form-item | ||||||
|                         label="资料名称" |                         label="资料名称" | ||||||
|                         :prop="`documents.${index}.catalogueName`" |                         :prop="`documents.${index}.volumeCatalogId`" | ||||||
|                         :rules="[{ required: true, message: '请输入文件资料名称', trigger: 'blur' }]" |                         :rules="[ | ||||||
|  |                           { required: true, message: '请选择资料名称', trigger: 'change' }, | ||||||
|  |                           { required: true, message: '请选择资料名称', trigger: 'blur' } | ||||||
|  |                         ]" | ||||||
|                         class="mb-4" |                         class="mb-4" | ||||||
|                       > |                       > | ||||||
|                         <el-select |                         <el-select | ||||||
| @ -93,7 +86,7 @@ | |||||||
|                           clearable |                           clearable | ||||||
|                           filterable |                           filterable | ||||||
|                           @change="handleSelect($event, item)" |                           @change="handleSelect($event, item)" | ||||||
|                           style="width: 150px; margin-right: 20px" |                           style="width: 100%" | ||||||
|                         > |                         > | ||||||
|                           <el-option |                           <el-option | ||||||
|                             v-for="project in volumeCatalogList" |                             v-for="project in volumeCatalogList" | ||||||
| @ -114,8 +107,10 @@ | |||||||
|           </div> |           </div> | ||||||
|         </div> |         </div> | ||||||
|       </el-card> |       </el-card> | ||||||
|       <!-- 提交组件 --> |  | ||||||
|  |       <!-- 提交验证组件 --> | ||||||
|       <submitVerify ref="submitVerifyRef" :task-variables="taskVariables" @submit-callback="submitCallback" /> |       <submitVerify ref="submitVerifyRef" :task-variables="taskVariables" @submit-callback="submitCallback" /> | ||||||
|  |       <!-- 审批记录组件 --> | ||||||
|       <approvalRecord ref="approvalRecordRef"></approvalRecord> |       <approvalRecord ref="approvalRecordRef"></approvalRecord> | ||||||
|       <!-- 流程选择对话框 --> |       <!-- 流程选择对话框 --> | ||||||
|       <el-dialog |       <el-dialog | ||||||
| @ -154,88 +149,101 @@ import SubmitVerify from '@/components/Process/submitVerify.vue'; | |||||||
| import ApprovalRecord from '@/components/Process/approvalRecord.vue'; | import ApprovalRecord from '@/components/Process/approvalRecord.vue'; | ||||||
| import ApprovalButton from '@/components/Process/approvalButton.vue'; | import ApprovalButton from '@/components/Process/approvalButton.vue'; | ||||||
| import { StartProcessBo } from '@/api/workflow/workflowCommon/types'; | import { StartProcessBo } from '@/api/workflow/workflowCommon/types'; | ||||||
| const { proxy } = getCurrentInstance() as ComponentInternalInstance; | import { ComponentInternalInstance, nextTick, ref, reactive, computed, toRefs, onMounted } from 'vue'; | ||||||
| import { useUserStoreHook } from '@/store/modules/user'; | import { useUserStoreHook } from '@/store/modules/user'; | ||||||
| import { systemUserList } from '@/api/design/appointment'; | import { systemUserList } from '@/api/design/appointment'; | ||||||
| import { extractBatch, extractDetail } from '@/api/design/Professional'; | import { extractBatch, extractDetail } from '@/api/design/Professional'; | ||||||
| import { listVolumeCatalog } from '@/api/design/volumeCatalog'; | import { listVolumeCatalog } from '@/api/design/volumeCatalog'; | ||||||
| // 获取用户 store | import { catalogList } from '@/api/design/designChange'; | ||||||
|  | import { getUser } from '@/api/system/user'; | ||||||
|  | import { ElFormInstance, ElMessage } from 'element-plus'; | ||||||
|  |  | ||||||
|  | // 类型定义 | ||||||
|  | interface DialogOption { | ||||||
|  |   visible: boolean; | ||||||
|  |   title: string; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | interface DocumentItem { | ||||||
|  |   id: number; | ||||||
|  |   catalogueName: string; | ||||||
|  |   remark: string; | ||||||
|  |   volumeCatalogId: string; | ||||||
|  |   num?: number; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | interface FormData { | ||||||
|  |   projectId: string | undefined; | ||||||
|  |   userId: string; | ||||||
|  |   user_major: string; | ||||||
|  |   phone: string; | ||||||
|  |   email: string; | ||||||
|  |   id: string; | ||||||
|  |   status: string; | ||||||
|  |   documents: DocumentItem[]; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // 获取组件实例 | ||||||
|  | const { proxy } = getCurrentInstance() as ComponentInternalInstance; | ||||||
|  | // 用户状态管理 | ||||||
| const userStore = useUserStoreHook(); | const userStore = useUserStoreHook(); | ||||||
| // 从 store 中获取项目列表和当前选中的项目 |  | ||||||
| const currentProject = computed(() => userStore.selectedProject); | const currentProject = computed(() => userStore.selectedProject); | ||||||
|  | const userId = computed(() => userStore.userId); | ||||||
|  |  | ||||||
|  | // 基础数据 | ||||||
|  | const userInfo = ref({ | ||||||
|  |   nickName: '', | ||||||
|  |   email: '', | ||||||
|  |   phonenumber: '', | ||||||
|  |   userId: '' | ||||||
|  | }); | ||||||
| const { des_user_major } = toRefs<any>(proxy?.useDict('des_user_major')); | const { des_user_major } = toRefs<any>(proxy?.useDict('des_user_major')); | ||||||
| const buttonLoading = ref(false); | const buttonLoading = ref(false); | ||||||
| const loading = ref(true); | const loading = ref(true); | ||||||
| const disableAll = ref(false); | const disableAll = ref(false); | ||||||
| const volumeCatalogList = ref([]); | const volumeCatalogList = ref([]); | ||||||
| let volumeMap = new Map(); | const volumeMap = new Map(); | ||||||
| //路由参数 |  | ||||||
| const routeParams = ref<Record<string, any>>({}); | const routeParams = ref<Record<string, any>>({}); | ||||||
|  |  | ||||||
|  | // 流程相关 | ||||||
| const flowCodeOptions = [ | const flowCodeOptions = [ | ||||||
|   { |   { | ||||||
|     value: currentProject.value?.id + '_extract', |     value: currentProject.value?.id + '_extract', | ||||||
|     label: '互提资料清单' |     label: '互提资料清单' | ||||||
|   } |   } | ||||||
| ]; | ]; | ||||||
|  |  | ||||||
| const flowCode = ref<string>(''); | const flowCode = ref<string>(''); | ||||||
| const status = ref<string>(''); | const status = ref<string>(''); | ||||||
| const dialogVisible = reactive<DialogOption>({ | const dialogVisible = reactive<DialogOption>({ | ||||||
|   visible: false, |   visible: false, | ||||||
|   title: '流程定义' |   title: '流程定义' | ||||||
| }); | }); | ||||||
| //提交组件 |  | ||||||
| const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>(); |  | ||||||
| //审批记录组件 |  | ||||||
| const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>(); |  | ||||||
| //按钮组件 |  | ||||||
| const approvalButtonRef = ref<InstanceType<typeof ApprovalButton>>(); |  | ||||||
|  |  | ||||||
| const leaveFormRef = ref<ElFormInstance>(); | // 组件引用 | ||||||
| const dialog = reactive({ | const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>(); | ||||||
|   visible: false, | const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>(); | ||||||
|   title: '', | const mainFormRef = ref<ElFormInstance>(); // 主表单引用 | ||||||
|   isEdit: false | const documentsFormRef = ref<ElFormInstance>(); // 资料列表表单引用 | ||||||
| }); |  | ||||||
| const submitFormData = ref<StartProcessBo>({ |  | ||||||
|   businessId: '', |  | ||||||
|   flowCode: '', |  | ||||||
|   variables: {} |  | ||||||
| }); |  | ||||||
| const taskVariables = ref<Record<string, any>>({}); |  | ||||||
| // 用户列表 |  | ||||||
| const userList = ref([]); |  | ||||||
| const userMap = new Map(); |  | ||||||
| // 表单引用 |  | ||||||
| const mainFormRef = ref(); |  | ||||||
| const handleClose = () => { |  | ||||||
|   dialogVisible.visible = false; |  | ||||||
|   flowCode.value = ''; |  | ||||||
|   buttonLoading.value = false; |  | ||||||
| }; |  | ||||||
| // 表单数据 | // 表单数据 | ||||||
| const form = reactive({ | const form = reactive<FormData>({ | ||||||
|   projectId: currentProject.value?.id, |   projectId: currentProject.value?.id, | ||||||
|   userId: '', // 收资人 |   userId: '', | ||||||
|   user_major: '', // 专业 |   user_major: '', | ||||||
|   phone: '', // 电话 |   phone: '', | ||||||
|   email: '', // 邮箱 |   email: '', | ||||||
|   id: '', |   id: '', | ||||||
|   status: '', |   status: '', | ||||||
|   documents: [ |   documents: [ | ||||||
|     { |     { | ||||||
|       id: Date.now(), |       id: Date.now(), | ||||||
|       catalogueName: '', // 卷册目录名称 |       catalogueName: '', | ||||||
|       remark: '', // 备注 |       remark: '', | ||||||
|       volumeCatalogId: '' //卷册目录ID |       volumeCatalogId: '' | ||||||
|     } |     } | ||||||
|   ] as Array<{ |   ] | ||||||
|     id: number; |  | ||||||
|     catalogueName: string; |  | ||||||
|     remark: string; |  | ||||||
|     volumeCatalogId: string; |  | ||||||
|   }> |  | ||||||
| }); | }); | ||||||
|  |  | ||||||
| // 主表单验证规则 | // 主表单验证规则 | ||||||
| const mainRules = reactive({ | const mainRules = reactive({ | ||||||
|   userId: [{ required: true, message: '请输入收资人', trigger: 'blur' }], |   userId: [{ required: true, message: '请输入收资人', trigger: 'blur' }], | ||||||
| @ -249,11 +257,22 @@ const mainRules = reactive({ | |||||||
|     { type: 'email', message: '请输入正确的邮箱格式', trigger: 'blur' } |     { type: 'email', message: '请输入正确的邮箱格式', trigger: 'blur' } | ||||||
|   ] |   ] | ||||||
| }); | }); | ||||||
|  |  | ||||||
|  | // 用户列表相关 | ||||||
|  | const userList = ref([]); | ||||||
|  | const userMap = new Map(); | ||||||
|  | // 流程提交数据 | ||||||
|  | const submitFormData = ref<StartProcessBo>({ | ||||||
|  |   businessId: '', | ||||||
|  |   flowCode: '', | ||||||
|  |   variables: {} | ||||||
|  | }); | ||||||
|  | const taskVariables = ref<Record<string, any>>({}); | ||||||
|  |  | ||||||
| /** 表单重置 */ | /** 表单重置 */ | ||||||
| const reset = () => { | const reset = () => { | ||||||
|   if (mainFormRef.value) { |   mainFormRef.value?.resetFields(); | ||||||
|     mainFormRef.value.resetFields(); |   documentsFormRef.value?.resetFields(); | ||||||
|   } |  | ||||||
|   // 重置资料列表,保留一个空项 |   // 重置资料列表,保留一个空项 | ||||||
|   form.documents = [ |   form.documents = [ | ||||||
|     { |     { | ||||||
| @ -263,9 +282,9 @@ const reset = () => { | |||||||
|       volumeCatalogId: '' |       volumeCatalogId: '' | ||||||
|     } |     } | ||||||
|   ]; |   ]; | ||||||
|   leaveFormRef.value?.resetFields(); |  | ||||||
| }; | }; | ||||||
| // 添加资料项 |  | ||||||
|  | /** 添加资料项 */ | ||||||
| const addDocumentItem = () => { | const addDocumentItem = () => { | ||||||
|   form.documents.push({ |   form.documents.push({ | ||||||
|     id: Date.now(), |     id: Date.now(), | ||||||
| @ -275,198 +294,256 @@ const addDocumentItem = () => { | |||||||
|   }); |   }); | ||||||
| }; | }; | ||||||
|  |  | ||||||
| // 删除资料项 | /** 删除资料项 */ | ||||||
| const removeDocumentItem = (index: number) => { | const removeDocumentItem = (index: number) => { | ||||||
|   form.documents.splice(index, 1); |   form.documents.splice(index, 1); | ||||||
| }; | }; | ||||||
| /** 提交按钮 */ |  | ||||||
|  | /** 关闭流程选择对话框 */ | ||||||
|  | const handleClose = () => { | ||||||
|  |   dialogVisible.visible = false; | ||||||
|  |   flowCode.value = ''; | ||||||
|  |   buttonLoading.value = false; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 提交表单(主逻辑) */ | ||||||
| const submitForm = (status1: string) => { | const submitForm = (status1: string) => { | ||||||
|   status.value = status1; |   status.value = status1; | ||||||
|   buttonLoading.value = true; |   buttonLoading.value = true; | ||||||
|   dialog.visible = false; |  | ||||||
|   // 验证表单数据 |   // 1. 校验主表单(基础信息) | ||||||
|   mainFormRef.value.validate(async (valid) => { |   mainFormRef.value?.validate(async (mainValid) => { | ||||||
|     if (valid) { |     if (!mainValid) { | ||||||
|       console.log('验证成功'); |       proxy?.$modal.msgError('请完善基础必填信息'); | ||||||
|  |       buttonLoading.value = false; | ||||||
|  |       return; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     // 2. 校验资料列表表单(资料名称) | ||||||
|  |     documentsFormRef.value?.validate(async (docsValid) => { | ||||||
|  |       if (!docsValid) { | ||||||
|  |         proxy?.$modal.msgError('请完善所有资料的“资料名称”'); | ||||||
|  |         buttonLoading.value = false; | ||||||
|  |         return; | ||||||
|  |       } | ||||||
|  |  | ||||||
|  |       // 3. 表单校验通过,处理资料序号 | ||||||
|       form.documents.map((item, i) => { |       form.documents.map((item, i) => { | ||||||
|         item.num = i + 1; |         item.num = i + 1; | ||||||
|       }); |       }); | ||||||
|       let body = { |  | ||||||
|  |       // 4. 提交数据到后端 | ||||||
|  |       const body = { | ||||||
|         desExtractBo: { |         desExtractBo: { | ||||||
|           projectId: currentProject.value?.id, |           projectId: currentProject.value?.id, | ||||||
|           userId: form.userId, // 收资人 |           userId: form.userId, | ||||||
|           userMajor: form.user_major, // 专业 |           userMajor: form.user_major, | ||||||
|           id: form.id, |           id: form.id, | ||||||
|           phone: form.phone, // 电话 |           phone: form.phone, | ||||||
|           email: form.email, // 邮箱 |           email: form.email, | ||||||
|           userName: userMap.get(form.userId) |           userName: userMap.get(form.userId) | ||||||
|         }, |         }, | ||||||
|         catalogueList: form.documents |         catalogueList: form.documents | ||||||
|       }; |       }; | ||||||
|       let res = await extractBatch(body); |  | ||||||
|       if (res.code == 200) { |       try { | ||||||
|  |         const res = await extractBatch(body); | ||||||
|  |         if (res.code === 200) { | ||||||
|  |           form.id = res.data; | ||||||
|  |           await submit(status.value, form); // 执行暂存/提交流程 | ||||||
|  |         } else { | ||||||
|  |           ElMessage.error(res.msg); | ||||||
|  |         } | ||||||
|  |       } catch (err) { | ||||||
|  |         ElMessage.error('提交失败,请重试'); | ||||||
|  |       } finally { | ||||||
|         buttonLoading.value = false; |         buttonLoading.value = false; | ||||||
|         dialog.visible = false; |  | ||||||
|       } else { |  | ||||||
|         ElMessage.error(res.msg); |  | ||||||
|       } |       } | ||||||
|       // 表单验证通过,执行提交逻辑 |     }); | ||||||
|       form.id = res.data; |  | ||||||
|       submit(status.value, form); |  | ||||||
|     } else { |  | ||||||
|       // 表单验证失败,提示用户并关闭加载状态 |  | ||||||
|       proxy?.$modal.msgError('请完善必填信息后再提交'); |  | ||||||
|       buttonLoading.value = false; |  | ||||||
|       return false; |  | ||||||
|     } |  | ||||||
|   }); |   }); | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | /** 提交流程选择 */ | ||||||
| const submitFlow = async () => { | const submitFlow = async () => { | ||||||
|   handleStartWorkFlow(form); |   await handleStartWorkFlow(form); | ||||||
|   dialogVisible.visible = false; |   dialogVisible.visible = false; | ||||||
| }; | }; | ||||||
| //提交申请 |  | ||||||
|  | /** 启动工作流 */ | ||||||
| const handleStartWorkFlow = async (data: LeaveForm) => { | const handleStartWorkFlow = async (data: LeaveForm) => { | ||||||
|   try { |   try { | ||||||
|     submitFormData.value.flowCode = flowCode.value; |     submitFormData.value.flowCode = flowCode.value; | ||||||
|     submitFormData.value.businessId = data.id; |     submitFormData.value.businessId = data.id; | ||||||
|     //流程变量 |     // 流程变量配置 | ||||||
|     taskVariables.value = { |     taskVariables.value = { | ||||||
|       // leave4/5 使用的流程变量 |  | ||||||
|       userList: ['1', '3', '4'] |       userList: ['1', '3', '4'] | ||||||
|     }; |     }; | ||||||
|     submitFormData.value.variables = taskVariables.value; |     submitFormData.value.variables = taskVariables.value; | ||||||
|  |  | ||||||
|     const resp = await startWorkFlow(submitFormData.value); |     const resp = await startWorkFlow(submitFormData.value); | ||||||
|     if (submitVerifyRef.value) { |     if (submitVerifyRef.value) { | ||||||
|       buttonLoading.value = false; |  | ||||||
|       submitVerifyRef.value.openDialog(resp.data.taskId); |       submitVerifyRef.value.openDialog(resp.data.taskId); | ||||||
|     } |     } | ||||||
|  |   } catch (err) { | ||||||
|  |     ElMessage.error('启动流程失败'); | ||||||
|   } finally { |   } finally { | ||||||
|     buttonLoading.value = false; |     buttonLoading.value = false; | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
| //审批记录 |  | ||||||
|  | /** 打开审批记录 */ | ||||||
| const handleApprovalRecord = () => { | const handleApprovalRecord = () => { | ||||||
|   approvalRecordRef.value.init(form.id); |   approvalRecordRef.value?.init(form.id); | ||||||
| }; | }; | ||||||
| //提交回调 |  | ||||||
|  | /** 提交回调:关闭页面返回上一级 */ | ||||||
| const submitCallback = async () => { | const submitCallback = async () => { | ||||||
|   await proxy.$tab.closePage(proxy.$route); |   await proxy.$tab.closePage(proxy.$route); | ||||||
|   proxy.$router.go(-1); |   proxy.$router.go(-1); | ||||||
| }; | }; | ||||||
| //审批 |  | ||||||
|  | /** 打开审批验证弹窗 */ | ||||||
| const approvalVerifyOpen = async () => { | const approvalVerifyOpen = async () => { | ||||||
|   submitVerifyRef.value.openDialog(routeParams.value.taskId); |   submitVerifyRef.value?.openDialog(routeParams.value.taskId); | ||||||
| }; | }; | ||||||
| const submit = async (status, data) => { |  | ||||||
|  | /** 暂存/提交分支逻辑 */ | ||||||
|  | const submit = async (status: string, data: FormData) => { | ||||||
|   if (status === 'draft') { |   if (status === 'draft') { | ||||||
|     buttonLoading.value = false; |  | ||||||
|     proxy?.$modal.msgSuccess('暂存成功'); |     proxy?.$modal.msgSuccess('暂存成功'); | ||||||
|     proxy.$tab.closePage(proxy.$route); |     await proxy.$tab.closePage(proxy.$route); | ||||||
|     proxy.$router.go(-1); |     proxy.$router.go(-1); | ||||||
|   } else { |   } else { | ||||||
|     if ((form.status === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') { |     // 新增/草稿状态下,默认选择第一个流程并弹窗 | ||||||
|  |     if ((data.status === 'draft' && !flowCode.value) || routeParams.value.type === 'add') { | ||||||
|       flowCode.value = flowCodeOptions[0].value; |       flowCode.value = flowCodeOptions[0].value; | ||||||
|       dialogVisible.visible = true; |       dialogVisible.visible = true; | ||||||
|       return; |       return; | ||||||
|     } |     } | ||||||
|     //说明启动过先随意穿个参数 |     // 已有流程时默认填充占位值 | ||||||
|     if (flowCode.value === '' || flowCode.value === null) { |     if (!flowCode.value) { | ||||||
|       flowCode.value = 'xx'; |       flowCode.value = 'xx'; | ||||||
|     } |     } | ||||||
|     await handleStartWorkFlow(data); |     await handleStartWorkFlow(data); | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
| /** 查询当前部门的所有用户 */ |  | ||||||
|  | /** 获取部门用户列表 */ | ||||||
| const getDeptAllUser = async (deptId: any) => { | const getDeptAllUser = async (deptId: any) => { | ||||||
|   try { |   try { | ||||||
|     const res = await systemUserList({ deptId }); |     const res = await systemUserList({ deptId }); | ||||||
|     // 实际项目中使用接口返回的数据 |  | ||||||
|     userList.value = res.rows; |     userList.value = res.rows; | ||||||
|     userList.value.forEach((user) => { |     userList.value.forEach((user) => { | ||||||
|       userMap.set(user.userId, user.nickName); |       userMap.set(user.userId, user.nickName); | ||||||
|     }); |     }); | ||||||
|   } catch (error) { |   } catch (err) { | ||||||
|     ElMessage.error('获取用户列表失败'); |     ElMessage.error('获取用户列表失败'); | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
| // 查询数据 再次回显 |  | ||||||
|  | /** 回显表单数据(编辑/查看/审批场景) */ | ||||||
| const byProjectIdAll = async () => { | const byProjectIdAll = async () => { | ||||||
|   loading.value = true; |   loading.value = true; | ||||||
|   buttonLoading.value = false; |   try { | ||||||
|   // 调用接口获取数据 |     const res = await extractDetail(routeParams.value.id); | ||||||
|   const res = await extractDetail(routeParams.value.id); |     if (res.code === 200 && res.data) { | ||||||
|   if (res.code === 200 && res.data) { |       const data = res.data; | ||||||
|     const data = res.data; |       // 回显基础信息 | ||||||
|     // 回显基本信息 |       form.userId = data.userId || ''; | ||||||
|     form.userId = data.userId || ''; |       form.user_major = data.userMajor || ''; | ||||||
|     form.user_major = data.userMajor || ''; |       form.phone = data.phone || ''; | ||||||
|     form.phone = data.phone || ''; |       form.email = data.email || ''; | ||||||
|     form.email = data.email || ''; |       form.id = data.id || ''; | ||||||
|     form.id = data.id || ''; |       form.status = data.status || ''; | ||||||
|     form.status = data.status || ''; |  | ||||||
|     if (data.status != 'draft') { |  | ||||||
|       disableAll.value = true; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     // 回显资料文件列表 |       // 非草稿状态禁用表单 | ||||||
|     if (data.catalogueList && data.catalogueList.length > 0) { |       if (data.status !== 'draft') { | ||||||
|       // 清空现有列表 |         disableAll.value = true; | ||||||
|       form.documents = []; |       } | ||||||
|       // 填充新数据 |  | ||||||
|       data.catalogueList.forEach((item: any, index: number) => { |       // 回显资料列表 | ||||||
|         form.documents.push({ |       if (data.catalogueList && data.catalogueList.length > 0) { | ||||||
|           id: item.id || Date.now() + index, // 确保id唯一 |         form.documents = data.catalogueList.map((item: any, index: number) => ({ | ||||||
|  |           id: item.id || Date.now() + index, | ||||||
|           catalogueName: item.catalogueName || '', |           catalogueName: item.catalogueName || '', | ||||||
|           remark: item.remark || '', |           remark: item.remark || '', | ||||||
|           volumeCatalogId: item.volumeCatalogId |           volumeCatalogId: item.volumeCatalogId || '' | ||||||
|         }); |         })); | ||||||
|       }); |       } else { | ||||||
|     } else { |         form.documents = [ | ||||||
|       // 如果没有资料,保持一个空项 |           { | ||||||
|       form.documents = [ |             id: Date.now(), | ||||||
|         { |             catalogueName: '', | ||||||
|           id: Date.now(), |             remark: '', | ||||||
|           catalogueName: '', |             volumeCatalogId: '' | ||||||
|           remark: '', |           } | ||||||
|           volumeCatalogId: '' |         ]; | ||||||
|         } |       } | ||||||
|       ]; |  | ||||||
|     } |     } | ||||||
|  |   } catch (err) { | ||||||
|  |     ElMessage.error('获取表单数据失败'); | ||||||
|  |   } finally { | ||||||
|  |     loading.value = false; | ||||||
|  |     buttonLoading.value = false; | ||||||
|   } |   } | ||||||
|   loading.value = false; |  | ||||||
|   buttonLoading.value = false; |  | ||||||
| }; | }; | ||||||
| /** 查询卷册目录列表 */ |  | ||||||
|  | /** 获取当前用户详情 */ | ||||||
|  | const getUserDetail = async () => { | ||||||
|  |   try { | ||||||
|  |     const res = await getUser(userId.value); | ||||||
|  |     userInfo.value = res.data.user; | ||||||
|  |     form.userId = userInfo.value.userId; | ||||||
|  |     form.phone = userInfo.value.phonenumber; | ||||||
|  |     form.email = userInfo.value.email; | ||||||
|  |   } catch (err) { | ||||||
|  |     ElMessage.error('获取用户信息失败'); | ||||||
|  |   } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 获取卷册目录列表 */ | ||||||
| const getList = async () => { | const getList = async () => { | ||||||
|   const res = await listVolumeCatalog({ projectId: currentProject.value?.id, auditStatus: 'finish' }); |   try { | ||||||
|   volumeCatalogList.value = res.rows; |     const res = await catalogList(currentProject.value?.id); | ||||||
|   volumeCatalogList.value.forEach((e) => { |     volumeCatalogList.value = res.data; | ||||||
|     volumeMap.set(e.design, e); |     volumeCatalogList.value.forEach((e) => { | ||||||
|   }); |       volumeMap.set(e.design, e); | ||||||
|  |     }); | ||||||
|  |   } catch (err) { | ||||||
|  |     ElMessage.error('获取卷册目录失败'); | ||||||
|  |   } | ||||||
| }; | }; | ||||||
| const handleSelect = (val, item) => { |  | ||||||
|   item.catalogueName = volumeMap.get(val).documentName; | /** 选择资料名称后回显目录名称 */ | ||||||
|  | const handleSelect = (val: string, item: DocumentItem) => { | ||||||
|  |   item.catalogueName = volumeMap.get(val)?.documentName || ''; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | /** 页面挂载初始化 */ | ||||||
| onMounted(() => { | onMounted(() => { | ||||||
|   nextTick(async () => { |   nextTick(async () => { | ||||||
|     routeParams.value = proxy.$route.query; |     routeParams.value = proxy.$route.query; | ||||||
|     reset(); |     reset(); | ||||||
|     loading.value = false; |     loading.value = false; | ||||||
|     getList(); // 获取卷册目录 |  | ||||||
|     if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') { |     // 初始化基础数据 | ||||||
|       getDeptAllUser(userStore.deptId).then(() => { |     await getList(); | ||||||
|         byProjectIdAll(); |     await getUserDetail(); | ||||||
|       }); |  | ||||||
|  |     // 编辑/查看/审批场景:加载已有数据 | ||||||
|  |     const { type } = routeParams.value; | ||||||
|  |     if (type === 'update' || type === 'view' || type === 'approval') { | ||||||
|  |       await getDeptAllUser(userStore.deptId); | ||||||
|  |       await byProjectIdAll(); | ||||||
|     } else { |     } else { | ||||||
|       getDeptAllUser(userStore.deptId); |       await getDeptAllUser(userStore.deptId); | ||||||
|     } |     } | ||||||
|   }); |   }); | ||||||
| }); | }); | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
| <style scoped lang="scss"> | <style scoped lang="scss"> | ||||||
| /* 全局样式 */ | /* 全局变量 */ | ||||||
| :root { | :root { | ||||||
|   --primary: #409eff; |   --primary: #409eff; | ||||||
|   --primary-light: #66b1ff; |   --primary-light: #66b1ff; | ||||||
| @ -543,10 +620,6 @@ onMounted(() => { | |||||||
| /* 卡片样式优化 */ | /* 卡片样式优化 */ | ||||||
| .el-card { | .el-card { | ||||||
|   transition: all 0.3s ease; |   transition: all 0.3s ease; | ||||||
|  |  | ||||||
|   &:hover { |  | ||||||
|     /* transform: translateY(-2px); */ |  | ||||||
|   } |  | ||||||
| } | } | ||||||
|  |  | ||||||
| /* 对话框样式优化 */ | /* 对话框样式优化 */ | ||||||
|  | |||||||
| @ -510,7 +510,6 @@ const submitForm = async () => { | |||||||
|   try { |   try { | ||||||
|     // 1. 基础表单验证 |     // 1. 基础表单验证 | ||||||
|     await leaveFormRef.value.validate(); |     await leaveFormRef.value.validate(); | ||||||
|  |  | ||||||
|     // 2. 提交前二次校验:「专业+人员」组合唯一性 |     // 2. 提交前二次校验:「专业+人员」组合唯一性 | ||||||
|     let hasDuplicate = false; |     let hasDuplicate = false; | ||||||
|     const allKeys: string[] = []; |     const allKeys: string[] = []; | ||||||
| @ -568,7 +567,6 @@ const submitForm = async () => { | |||||||
|         ) |         ) | ||||||
|       ] |       ] | ||||||
|     }; |     }; | ||||||
|  |  | ||||||
|     // 4. 数据处理(保持原有逻辑不变) |     // 4. 数据处理(保持原有逻辑不变) | ||||||
|     const arr = []; |     const arr = []; | ||||||
|     userList.value.forEach((item) => { |     userList.value.forEach((item) => { | ||||||
| @ -596,6 +594,7 @@ const submitForm = async () => { | |||||||
|     }); |     }); | ||||||
|     if (res.code == 200) { |     if (res.code == 200) { | ||||||
|       disabledForm.value = true; |       disabledForm.value = true; | ||||||
|  |       loading.close(); | ||||||
|       ElMessage.success('提交成功'); |       ElMessage.success('提交成功'); | ||||||
|     } else { |     } else { | ||||||
|       ElMessage.error(res.msg || '提交失败'); |       ElMessage.error(res.msg || '提交失败'); | ||||||
| @ -603,7 +602,7 @@ const submitForm = async () => { | |||||||
|   } catch (error) { |   } catch (error) { | ||||||
|     ElMessage.error('请完善表单信息后再提交'); |     ElMessage.error('请完善表单信息后再提交'); | ||||||
|   } finally { |   } finally { | ||||||
|     ElLoading.service().close(); |     // ElLoading.service().close(); | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | |||||||
| @ -93,7 +93,7 @@ | |||||||
|               link |               link | ||||||
|               icon="View" |               icon="View" | ||||||
|               v-hasPermi="['design:designChange:query']" |               v-hasPermi="['design:designChange:query']" | ||||||
|               v-if="scope.row.status == 'back' || scope.row.status == 'termination'" |               v-if="scope.row.status != 'draft'" | ||||||
|               @click="handleViewHistory(scope.row)" |               @click="handleViewHistory(scope.row)" | ||||||
|               >查看单据</el-button |               >查看单据</el-button | ||||||
|             > |             > | ||||||
| @ -107,13 +107,7 @@ | |||||||
|       <el-table v-if="fileList.length > 0" :data="fileList" style="width: 100%" border> |       <el-table v-if="fileList.length > 0" :data="fileList" style="width: 100%" border> | ||||||
|         <el-table-column prop="fileName" label="文件名称" align="center"> |         <el-table-column prop="fileName" label="文件名称" align="center"> | ||||||
|           <template #default="scope"> |           <template #default="scope"> | ||||||
|             <el-link |             <el-link :key="scope.row.fileId" :href="scope.row.fileUrl" target="_blank" type="primary" :underline="false"> | ||||||
|               :key="scope.row.fileId" |  | ||||||
|               :href="scope.row.fileUrl" |  | ||||||
|               target="_blank" |  | ||||||
|               :type="scope.row.status == '1' ? 'primary' : 'info'" |  | ||||||
|               :underline="false" |  | ||||||
|             > |  | ||||||
|               {{ scope.row.originalName }} |               {{ scope.row.originalName }} | ||||||
|             </el-link> |             </el-link> | ||||||
|           </template> |           </template> | ||||||
|  | |||||||
| @ -74,26 +74,22 @@ | |||||||
|                 ></el-col> |                 ></el-col> | ||||||
|                 <el-col :span="24"> |                 <el-col :span="24"> | ||||||
|                   <el-form-item label="原设计处置" prop="designDisposal"> |                   <el-form-item label="原设计处置" prop="designDisposal"> | ||||||
|                     <el-radio-group v-model="form.extendDetail.designDisposal"> |                     <el-radio-group v-model="form.extendDetail.designDisposal" @change="handleRadio"> | ||||||
|                       <el-radio value="1" size="large">原图作废</el-radio> |                       <el-radio value="1" size="large">原图作废</el-radio> | ||||||
|                       <el-radio value="2" size="large">原图保留,部分修改</el-radio> |                       <el-radio value="2" :disabled="!designId" size="large">原图保留,部分修改</el-radio> | ||||||
|                       <el-radio value="3" size="large">原图保留,补充设计</el-radio> |                       <el-radio value="3" size="large">原图保留,补充设计</el-radio> | ||||||
|                     </el-radio-group> |                     </el-radio-group> | ||||||
|                   </el-form-item></el-col |                   </el-form-item></el-col | ||||||
|                 > |                 > | ||||||
|                 <el-col :span="24" v-if="form.extendDetail.designDisposal == 2 && form.volumeNo"> |                 <el-col :span="24" v-if="form.extendDetail.designDisposal == 2"> | ||||||
|                   <el-form-item label="选择保留文件" prop="designPhase"> |                   <el-form-item label="保留文件" prop="saveFile"> | ||||||
|                     <el-select |                     <el-checkbox-group v-model="form.saveFile"> | ||||||
|                       id="projectSelect" |                       <el-checkbox v-for="dict in blueprintListAll" :key="dict.id" :value="dict.id"> | ||||||
|                       v-model="form.saveFile" |                         {{ dict.fileName }} | ||||||
|                       placeholder="请选择保留文件" |                       </el-checkbox> | ||||||
|                       multiple |                     </el-checkbox-group> | ||||||
|                       style="width: 150px; margin-right: 20px" |                   </el-form-item></el-col | ||||||
|                     > |                 > | ||||||
|                       <el-option v-for="project in fileVoList" :key="project.id" :label="project.fileName" :value="project.id" /> |  | ||||||
|                     </el-select> |  | ||||||
|                   </el-form-item> |  | ||||||
|                 </el-col> |  | ||||||
|                 <el-col :span="12"> |                 <el-col :span="12"> | ||||||
|                   <el-form-item label="设计阶段" prop="designPhase"> |                   <el-form-item label="设计阶段" prop="designPhase"> | ||||||
|                     <el-input v-model="form.extendDetail.designPhase" placeholder="请输入设计阶段" /> </el-form-item |                     <el-input v-model="form.extendDetail.designPhase" placeholder="请输入设计阶段" /> </el-form-item | ||||||
| @ -179,8 +175,7 @@ | |||||||
| <script setup name="Leave" lang="ts"> | <script setup name="Leave" lang="ts"> | ||||||
| const { proxy } = getCurrentInstance() as ComponentInternalInstance; | const { proxy } = getCurrentInstance() as ComponentInternalInstance; | ||||||
| import { useUserStoreHook } from '@/store/modules/user'; | import { useUserStoreHook } from '@/store/modules/user'; | ||||||
| import { addDesignChange, getDesignChange } from '@/api/design/designChange'; | import { addDesignChange, getDesignChange, catalogList, blueprintList } from '@/api/design/designChange'; | ||||||
| import { listVolumeCatalog } from '@/api/design/volumeCatalog'; |  | ||||||
| const { design_change_reason_type } = toRefs<any>(proxy?.useDict('design_change_reason_type')); | const { design_change_reason_type } = toRefs<any>(proxy?.useDict('design_change_reason_type')); | ||||||
| const route = useRoute(); | const route = useRoute(); | ||||||
| const router = useRouter(); | const router = useRouter(); | ||||||
| @ -190,6 +185,7 @@ const userStore = useUserStoreHook(); | |||||||
| const currentProject = computed(() => userStore.selectedProject); | const currentProject = computed(() => userStore.selectedProject); | ||||||
| const buttonLoading = ref(false); | const buttonLoading = ref(false); | ||||||
| const volumeCatalogList = ref([]); | const volumeCatalogList = ref([]); | ||||||
|  | const blueprintListAll = ref([]); | ||||||
| let volumeMap = new Map(); | let volumeMap = new Map(); | ||||||
| //路由参数 | //路由参数 | ||||||
| const routeParams = ref<Record<string, any>>({}); | const routeParams = ref<Record<string, any>>({}); | ||||||
| @ -200,6 +196,7 @@ const dialog = reactive({ | |||||||
|   isEdit: false |   isEdit: false | ||||||
| }); | }); | ||||||
| const fileVoList = ref([]); | const fileVoList = ref([]); | ||||||
|  | const designId = ref(''); | ||||||
| const initFormData = { | const initFormData = { | ||||||
|   id: undefined, |   id: undefined, | ||||||
|   projectId: currentProject.value?.id, |   projectId: currentProject.value?.id, | ||||||
| @ -219,7 +216,7 @@ const initFormData = { | |||||||
|   fileId: undefined, |   fileId: undefined, | ||||||
|   status: undefined, |   status: undefined, | ||||||
|   remark: undefined, |   remark: undefined, | ||||||
|   saveFile: undefined, |   saveFile: [], | ||||||
|   extendDetail: { |   extendDetail: { | ||||||
|     changeCategory: undefined, |     changeCategory: undefined, | ||||||
|     ImpProcedure: undefined, |     ImpProcedure: undefined, | ||||||
| @ -287,16 +284,27 @@ const submitForm = () => { | |||||||
| }; | }; | ||||||
| /** 查询卷册目录列表 */ | /** 查询卷册目录列表 */ | ||||||
| const getList = async () => { | const getList = async () => { | ||||||
|   const res = await listVolumeCatalog({ projectId: currentProject.value?.id, auditStatus: 'finish' }); |   const res = await catalogList(currentProject.value?.id); | ||||||
|   volumeCatalogList.value = res.rows; |   volumeCatalogList.value = res.data; | ||||||
|   volumeCatalogList.value.forEach((e) => { |   volumeCatalogList.value.forEach((e) => { | ||||||
|     volumeMap.set(e.volumeNumber, e); |     volumeMap.set(e.volumeNumber, e); | ||||||
|   }); |   }); | ||||||
| }; | }; | ||||||
|  | // 获取图纸列表 | ||||||
|  | const getBlueprintList = async () => { | ||||||
|  |   const res = await blueprintList(designId.value); | ||||||
|  |   blueprintListAll.value = res.data; | ||||||
|  | }; | ||||||
|  | const handleRadio = (val) => { | ||||||
|  |   form.value.saveFile = []; | ||||||
|  |   if (val == 2) { | ||||||
|  |     getBlueprintList(); | ||||||
|  |   } | ||||||
|  | }; | ||||||
| const handleSelect = (val) => { | const handleSelect = (val) => { | ||||||
|   let obj = volumeMap.get(val); |   let obj = volumeMap.get(val); | ||||||
|   console.log(obj); |  | ||||||
|   fileVoList.value = obj.fileVoList; |   fileVoList.value = obj.fileVoList; | ||||||
|  |   designId.value = obj.design; | ||||||
|   form.value.volumeName = obj.volumeName; |   form.value.volumeName = obj.volumeName; | ||||||
|   form.value.specialty = obj.specialty; |   form.value.specialty = obj.specialty; | ||||||
|   form.value.specialtyName = obj.specialtyName; |   form.value.specialtyName = obj.specialtyName; | ||||||
|  | |||||||
| @ -1,77 +1,78 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="p-2 volumeCatalog"> |   <div class="p-2 volumeCatalog drawing"> | ||||||
|     <el-card shadow="never"> |     <div class="file-category"> | ||||||
|       <template #header> |       <span style="color: #757575; display: inline-block; margin-bottom: 15px">文件分类</span> | ||||||
|         <el-row :gutter="10" class="mb8"> |       <!-- 优化了图标与文字的对齐和间距 --> | ||||||
|           <el-form ref="queryFormRef" :model="queryParams" :inline="true"> |       <div v-for="(item, i) of FolderList" :key="i" :class="{ active: currentActive === i }" @click="handleClick(item, i)" class="category-item"> | ||||||
|             <el-form-item label="卷册号" prop="volumeNumber"> |         <el-icon :size="20" class="folder-icon"> | ||||||
|               <el-input v-model="queryParams.volumeNumber" placeholder="请输入卷册号" clearable @keyup.enter="handleQuery" /> |           <Folder /> | ||||||
|             </el-form-item> |         </el-icon> | ||||||
|             <el-form-item label="资料名称" prop="documentName"> |         <span class="folder-name"> | ||||||
|               <el-input v-model="queryParams.documentName" placeholder="请输入资料名称" clearable @keyup.enter="handleQuery" /> |           {{ item.catalogueName }} | ||||||
|             </el-form-item> |  | ||||||
|             <el-form-item> |  | ||||||
|               <el-button type="primary" icon="Search" @click="handleQuery" v-hasPermi="['design:volumeCatalog:query']">搜索</el-button> |  | ||||||
|               <el-button icon="Refresh" @click="resetQuery" v-hasPermi="['design:volumeCatalog:query']">重置</el-button> |  | ||||||
|             </el-form-item> |  | ||||||
|           </el-form> |  | ||||||
|           <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> |  | ||||||
|         </el-row> |  | ||||||
|       </template> |  | ||||||
|       <el-table v-loading="loading" :data="volumeCatalogList"> |  | ||||||
|         <el-table-column label="序号" type="index" width="60" align="center" /> |  | ||||||
|         <el-table-column label="子项名称" align="center" prop="designSubitem" /> |  | ||||||
|         <el-table-column label="专业" align="center" prop="specialtyName"> </el-table-column> |  | ||||||
|         <el-table-column label="设计人员" align="center" prop="principalName" /> |  | ||||||
|         <el-table-column label="卷册号" align="center" prop="volumeNumber" /> |  | ||||||
|         <el-table-column label="资料名称" align="center" prop="documentName" /> |  | ||||||
|         <el-table-column label="图纸文件" align="center" prop="remark" width="150"> |  | ||||||
|           <template #default="scope"> |  | ||||||
|             <el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['design:volumeFile:query']">查看文件</el-button> |  | ||||||
|           </template> |  | ||||||
|         </el-table-column> |  | ||||||
|       </el-table> |  | ||||||
|       <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" /> |  | ||||||
|     </el-card> |  | ||||||
|     <!-- 查看文件列表 --> |  | ||||||
|     <el-dialog draggable title="文件列表" v-model="viewVisible" width="800px"> |  | ||||||
|       <el-table :data="fileList" style="width: 100%" border> |  | ||||||
|         <el-table-column prop="fileName" label="文件" align="center"> |  | ||||||
|           <template #default="scope"> |  | ||||||
|             <el-link |  | ||||||
|               :key="scope.row.fileId" |  | ||||||
|               :href="scope.row.fileUrl" |  | ||||||
|               target="_blank" |  | ||||||
|               :type="scope.row.status == '1' ? 'primary' : 'info'" |  | ||||||
|               :underline="false" |  | ||||||
|               @click="handleBookFile(scope.row)" |  | ||||||
|             > |  | ||||||
|               {{ scope.row.fileName }} |  | ||||||
|             </el-link> |  | ||||||
|           </template> |  | ||||||
|         </el-table-column> |  | ||||||
|         <el-table-column prop="size" label="状态" width="120" align="center"> |  | ||||||
|           <template #default="scope"> |  | ||||||
|             <el-tag :type="scope.row.status == 1 ? 'success' : 'info'">{{ scope.row.status == 1 ? '使用中' : '已作废' }}</el-tag> |  | ||||||
|           </template> |  | ||||||
|         </el-table-column> |  | ||||||
|         <el-table-column label="操作" width="240" align="center"> |  | ||||||
|           <template #default="scope"> |  | ||||||
|             <el-button link type="primary" icon="view" @click="handleViewHis(scope.row)">查阅记录</el-button> |  | ||||||
|             <el-button type="danger" link icon="Download" @click="handleDownload(scope.row)"> 下载 </el-button> |  | ||||||
|           </template> |  | ||||||
|         </el-table-column> |  | ||||||
|       </el-table> |  | ||||||
|       <template #footer> |  | ||||||
|         <span> |  | ||||||
|           <el-button type="primary" @click="viewVisible = false">关闭</el-button> |  | ||||||
|         </span> |         </span> | ||||||
|       </template> |       </div> | ||||||
|     </el-dialog> |     </div> | ||||||
|     <el-dialog draggable title="文件列表" v-model="viewVisible1" width="500px"> |     <div class="boxs"> | ||||||
|  |       <el-card shadow="never"> | ||||||
|  |         <template #header> | ||||||
|  |           <el-row :gutter="10" class="mb8"> | ||||||
|  |             <el-form ref="queryFormRef" :model="queryParams" :inline="true"> | ||||||
|  |               <el-form-item label="卷册号" prop="volumeNumber"> | ||||||
|  |                 <el-input v-model="queryParams.volumeNumber" placeholder="请输入卷册号" clearable @keyup.enter="handleQuery" /> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item label="资料名称" prop="documentName"> | ||||||
|  |                 <el-input v-model="queryParams.documentName" placeholder="请输入资料名称" clearable @keyup.enter="handleQuery" /> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item> | ||||||
|  |                 <el-button type="primary" icon="Search" @click="handleQuery" v-hasPermi="['design:volumeCatalog:query']">搜索</el-button> | ||||||
|  |                 <el-button icon="Refresh" @click="resetQuery" v-hasPermi="['design:volumeCatalog:query']">重置</el-button> | ||||||
|  |               </el-form-item> | ||||||
|  |             </el-form> | ||||||
|  |             <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> | ||||||
|  |           </el-row> | ||||||
|  |         </template> | ||||||
|  |         <el-table v-loading="loading" :data="volumeCatalogList"> | ||||||
|  |           <el-table-column label="序号" type="index" width="60" align="center" /> | ||||||
|  |           <el-table-column label="卷册号" align="center" prop="volumeNumber" /> | ||||||
|  |           <el-table-column label="资料名称" align="center" prop="documentName" /> | ||||||
|  |           <el-table-column label="子项名称" align="center" prop="designSubitem" /> | ||||||
|  |           <el-table-column label="专业" align="center" prop="specialtyName"> </el-table-column> | ||||||
|  |           <el-table-column label="设计人员" align="center" prop="principalName" /> | ||||||
|  |           <el-table-column label="版本号" align="center" prop="version" /> | ||||||
|  |           <el-table-column label="图纸文件" align="center" prop="remark" width="300"> | ||||||
|  |             <template #default="scope"> | ||||||
|  |               <el-link | ||||||
|  |                 :key="scope.row.fileId" | ||||||
|  |                 :href="scope.row.fileUrl" | ||||||
|  |                 target="_blank" | ||||||
|  |                 type="primary" | ||||||
|  |                 :underline="false" | ||||||
|  |                 @click="handleBookFile(scope.row)" | ||||||
|  |               > | ||||||
|  |                 {{ scope.row.fileName }} | ||||||
|  |               </el-link> | ||||||
|  |             </template> | ||||||
|  |           </el-table-column> | ||||||
|  |           <el-table-column label="操作" align="center" prop="remark" width="300"> | ||||||
|  |             <template #default="scope"> | ||||||
|  |               <el-button link type="primary" icon="view" @click="handleViewHis(scope.row)">查阅记录</el-button> | ||||||
|  |               <el-button type="danger" link icon="Download" @click="handleDownload(scope.row)"> 下载 </el-button> | ||||||
|  |             </template> | ||||||
|  |           </el-table-column> | ||||||
|  |         </el-table> | ||||||
|  |         <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" /> | ||||||
|  |       </el-card> | ||||||
|  |     </div> | ||||||
|  |     <el-dialog draggable title="查阅记录" v-model="viewVisible1" width="500px"> | ||||||
|       <el-table :data="histroyList" style="width: 100%" border> |       <el-table :data="histroyList" style="width: 100%" border> | ||||||
|         <el-table-column type="index" label="序号" align="center" width="80"> </el-table-column> |         <el-table-column type="index" label="序号" align="center" width="80"> </el-table-column> | ||||||
|         <el-table-column prop="userName" label="用户名称" align="center"> </el-table-column> |         <el-table-column prop="userName" label="用户名称" align="center"> </el-table-column> | ||||||
|  |         <el-table-column label="下载或查看" align="center"> | ||||||
|  |           <template #default="scope"> | ||||||
|  |             <el-tag type="primary" v-if="scope.row.status == 2">下载</el-tag> | ||||||
|  |             <el-tag type="success" v-else>查看</el-tag> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|         <el-table-column prop="createTime" label="查阅时间" align="center"> </el-table-column> |         <el-table-column prop="createTime" label="查阅时间" align="center"> </el-table-column> | ||||||
|       </el-table> |       </el-table> | ||||||
|       <template #footer> |       <template #footer> | ||||||
| @ -87,7 +88,7 @@ | |||||||
| import { listVolumeCatalog, addVolumeCatalog, updateVolumeCatalog } from '@/api/design/volumeCatalog'; | import { listVolumeCatalog, addVolumeCatalog, updateVolumeCatalog } from '@/api/design/volumeCatalog'; | ||||||
| import { VolumeCatalogVO } from '@/api/design/volumeCatalog/types'; | import { VolumeCatalogVO } from '@/api/design/volumeCatalog/types'; | ||||||
| import { useUserStoreHook } from '@/store/modules/user'; | import { useUserStoreHook } from '@/store/modules/user'; | ||||||
| import { volumeFileViewer, volumeFileViewerList } from '@/api/design/drawing'; | import { volumeFileViewer, volumeFileViewerList, joinList } from '@/api/design/drawing'; | ||||||
| const fileList = ref([]); | const fileList = ref([]); | ||||||
| const { proxy } = getCurrentInstance() as ComponentInternalInstance; | const { proxy } = getCurrentInstance() as ComponentInternalInstance; | ||||||
| const volumeCatalogList = ref<VolumeCatalogVO[]>([]); | const volumeCatalogList = ref<VolumeCatalogVO[]>([]); | ||||||
| @ -101,12 +102,17 @@ const userStore = useUserStoreHook(); | |||||||
| const currentProject = computed(() => userStore.selectedProject); | const currentProject = computed(() => userStore.selectedProject); | ||||||
| const queryFormRef = ref<ElFormInstance>(); | const queryFormRef = ref<ElFormInstance>(); | ||||||
| const volumeCatalogFormRef = ref<ElFormInstance>(); | const volumeCatalogFormRef = ref<ElFormInstance>(); | ||||||
|  | const catalogueId = ref(3); | ||||||
|  |  | ||||||
| const dialog = reactive<DialogOption>({ | const dialog = reactive<DialogOption>({ | ||||||
|   visible: false, |   visible: false, | ||||||
|   title: '' |   title: '' | ||||||
| }); | }); | ||||||
|  | const FolderList = [ | ||||||
|  |   { id: 3, catalogueName: '蓝图' }, | ||||||
|  |   { id: 1, catalogueName: '过程图纸' }, | ||||||
|  |   { id: 4, catalogueName: '废弃图纸' } | ||||||
|  | ]; | ||||||
| const uploadForm = reactive({ | const uploadForm = reactive({ | ||||||
|   userIds: [], |   userIds: [], | ||||||
|   volumeCatalogId: undefined, |   volumeCatalogId: undefined, | ||||||
| @ -150,7 +156,7 @@ const histroyList = ref([]); | |||||||
| const getList = async () => { | const getList = async () => { | ||||||
|   loading.value = true; |   loading.value = true; | ||||||
|   try { |   try { | ||||||
|     const res = await listVolumeCatalog(queryParams.value); |     const res = await joinList({ type: catalogueId.value, ...queryParams.value }); | ||||||
|     volumeCatalogList.value = res.rows; |     volumeCatalogList.value = res.rows; | ||||||
|     total.value = res.total; |     total.value = res.total; | ||||||
|   } finally { |   } finally { | ||||||
| @ -203,25 +209,34 @@ const submitForm = () => { | |||||||
|     } |     } | ||||||
|   }); |   }); | ||||||
| }; | }; | ||||||
|  |  | ||||||
| const handleDownload = (row: any) => { | const handleDownload = (row: any) => { | ||||||
|   getCheck(row); |   getCheck(row, 2); | ||||||
|   proxy?.$download.oss(row.fileId); |   proxy?.$download.oss(row.fileId); | ||||||
| }; | }; | ||||||
| const handleBookFile = (row: any) => { | const handleBookFile = (row: any) => { | ||||||
|   getCheck(row); |   getCheck(row, 1); | ||||||
| }; | }; | ||||||
| // 调用查阅接口 | // 调用查阅接口 | ||||||
| const getCheck = async (row) => { | const getCheck = async (row, status) => { | ||||||
|   volumeFileViewer({ volumeFileId: row.fileId }); |   volumeFileViewer({ volumeFileId: row.id, status }); | ||||||
| }; | }; | ||||||
| const handleViewHis = async (row) => { | const handleViewHis = async (row) => { | ||||||
|   viewVisible1.value = true; |   viewVisible1.value = true; | ||||||
|   let res = await volumeFileViewerList(row.fileId); |   let res = await volumeFileViewerList(row.id); | ||||||
|   if (res.code == 200) { |   if (res.code == 200) { | ||||||
|     histroyList.value = res.rows; |     histroyList.value = res.rows; | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
|  | const currentActive = ref(0); | ||||||
|  | // 点击事件处理函数 | ||||||
|  | const handleClick = (item, index) => { | ||||||
|  |   console.log(item.id); | ||||||
|  |   currentActive.value = index; | ||||||
|  |   catalogueId.value = item.id; | ||||||
|  |   // 重新获取数据 | ||||||
|  |   getList(); | ||||||
|  | }; | ||||||
|  |  | ||||||
| onMounted(() => { | onMounted(() => { | ||||||
|   getList(); |   getList(); | ||||||
| }); | }); | ||||||
| @ -240,3 +255,99 @@ onUnmounted(() => { | |||||||
|   listeningProject(); |   listeningProject(); | ||||||
| }); | }); | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
|  | <style lang="scss"> | ||||||
|  | .drawing { | ||||||
|  |   display: flex; | ||||||
|  |   .el-tabs__header { | ||||||
|  |     height: 90vh !important; | ||||||
|  |   } | ||||||
|  |   .file-category { | ||||||
|  |     width: 200px; | ||||||
|  |     display: flex; | ||||||
|  |     flex-direction: column; | ||||||
|  |     /* 移除固定宽度,让容器根据内容自适应 */ | ||||||
|  |     background-color: #ffffff; | ||||||
|  |     padding: 10px; | ||||||
|  |     border-radius: 6px; | ||||||
|  |     /* 限制最大宽度,防止内容过长 */ | ||||||
|  |     /* max-width: 200px; */ | ||||||
|  |     margin-right: 10px; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   .file-category > div { | ||||||
|  |     cursor: pointer; | ||||||
|  |     padding: 8px 12px; | ||||||
|  |     margin-bottom: 4px; | ||||||
|  |     border-radius: 4px; | ||||||
|  |     display: flex; | ||||||
|  |     /* 文本不换行,确保宽度由内容决定 */ | ||||||
|  |     white-space: nowrap; | ||||||
|  |     transition: all 0.2s ease; | ||||||
|  |     > span { | ||||||
|  |       margin-left: 6px; | ||||||
|  |       /* color: #676767; | ||||||
|  |       font-size: 18px; */ | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   .file-category { | ||||||
|  |     width: 200px; | ||||||
|  |     display: flex; | ||||||
|  |     flex-direction: column; | ||||||
|  |     background-color: #ffffff; | ||||||
|  |     padding: 10px; | ||||||
|  |     border-radius: 8px; | ||||||
|  |     margin-right: 10px; | ||||||
|  |     box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   // 分类项样式优化 | ||||||
|  |   .category-item { | ||||||
|  |     cursor: pointer; | ||||||
|  |     padding: 10px 12px; | ||||||
|  |     margin-bottom: 4px; | ||||||
|  |     border-radius: 6px; | ||||||
|  |     display: inline-flex; | ||||||
|  |     align-items: center; /* 垂直居中对齐 */ | ||||||
|  |     white-space: nowrap; | ||||||
|  |     transition: all 0.25s ease; | ||||||
|  |     font-size: 14px; | ||||||
|  |     color: #334155; | ||||||
|  |     line-height: 1; /* 确保行高一致 */ | ||||||
|  |  | ||||||
|  |     &:hover { | ||||||
|  |       background-color: #f1f5f9; | ||||||
|  |       transform: translateX(2px); | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   // 图标样式 | ||||||
|  |   .folder-icon { | ||||||
|  |     color: #94a3b8; | ||||||
|  |     transition: color 0.25s ease; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   // 文件夹名称样式 | ||||||
|  |   .folder-name { | ||||||
|  |     margin-left: 8px; /* 增加图标与文字间距 */ | ||||||
|  |     overflow: hidden; | ||||||
|  |     text-overflow: ellipsis; | ||||||
|  |     max-width: calc(100% - 30px); /* 限制最大宽度,防止溢出 */ | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   // 活跃状态样式 | ||||||
|  |   .category-item.active { | ||||||
|  |     background-color: #eff6ff; | ||||||
|  |     color: #2563eb; | ||||||
|  |     font-weight: 500; | ||||||
|  |  | ||||||
|  |     .folder-icon { | ||||||
|  |       color: #2563eb; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |   .boxs { | ||||||
|  |     width: calc(100% - 220px); | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </style> | ||||||
|  | |||||||
| @ -10,6 +10,7 @@ | |||||||
|       <el-row :gutter="20" class="section-content"> |       <el-row :gutter="20" class="section-content"> | ||||||
|         <el-col :span="12"> |         <el-col :span="12"> | ||||||
|           <el-form-item label="编号" prop="num"> |           <el-form-item label="编号" prop="num"> | ||||||
|  |             <!-- prop="num" 需与 rules 中键名一致 --> | ||||||
|             <el-input v-model="formData.num" placeholder="请输入编号" /> |             <el-input v-model="formData.num" placeholder="请输入编号" /> | ||||||
|           </el-form-item> |           </el-form-item> | ||||||
|         </el-col> |         </el-col> | ||||||
| @ -269,21 +270,16 @@ const setFormData = (data: Partial<FormData>) => { | |||||||
| }; | }; | ||||||
|  |  | ||||||
| // 提交表单 | // 提交表单 | ||||||
| const submit = async (businessId) => { | const submit = async (businessId, cb) => { | ||||||
|   try { |   // 先验证表单 | ||||||
|     // 先验证表单 |   await formRef.value?.validate(); | ||||||
|     const isValid = await validate(); |   cb(); | ||||||
|     if (isValid) { |   formData.subprojectName = subProjectMap.get(formData.subprojectId); | ||||||
|       formData.subprojectName = subProjectMap.get(formData.subprojectId); |   formData.drawingreviewId = businessId; | ||||||
|       formData.drawingreviewId = businessId; |   const res = await drawingreviewReceipts(formData); | ||||||
|       const res = await drawingreviewReceipts(formData); |   if (res.code === 200) { | ||||||
|       if (res.code === 200) { |     // // 提交成功处理逻辑 | ||||||
|         // // 提交成功处理逻辑 |     // console.log('提交成功'); | ||||||
|         // console.log('提交成功'); |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   } catch (error) { |  | ||||||
|     console.error('提交失败:', error); |  | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
| onMounted(() => { | onMounted(() => { | ||||||
|  | |||||||
| @ -3,13 +3,7 @@ | |||||||
|     <!-- 文件名称列 --> |     <!-- 文件名称列 --> | ||||||
|     <el-table-column prop="fileName" label="文件" align="center"> |     <el-table-column prop="fileName" label="文件" align="center"> | ||||||
|       <template #default="scope"> |       <template #default="scope"> | ||||||
|         <el-link |         <el-link :key="scope.row.fileId" :href="scope.row.fileUrl" target="_blank" type="primary" :underline="false"> | ||||||
|           :key="scope.row.fileId" |  | ||||||
|           :href="scope.row.fileUrl" |  | ||||||
|           target="_blank" |  | ||||||
|           :type="scope.row.status == '1' ? 'primary' : 'info'" |  | ||||||
|           :underline="false" |  | ||||||
|         > |  | ||||||
|           {{ scope.row.fileName }} |           {{ scope.row.fileName }} | ||||||
|         </el-link> |         </el-link> | ||||||
|       </template> |       </template> | ||||||
| @ -21,13 +15,18 @@ | |||||||
|       </template> |       </template> | ||||||
|     </el-table-column> |     </el-table-column> | ||||||
|     <!-- 审核状态列 --> |     <!-- 审核状态列 --> | ||||||
|     <el-table-column label="审核状态" align="center" prop="auditStatus" width="100"> |     <el-table-column label="审核状态" align="center" width="100"> | ||||||
|       <template #default="scope"> |       <template #default="scope"> | ||||||
|         <dict-tag :options="wfBusinessStatus" :value="scope.row.auditStatus" /> |         <dict-tag v-if="scope.row.status == 1 && scope.row.type != 4" :options="wfBusinessStatus" :value="scope.row.auditStatus" /> | ||||||
|  |       </template> | ||||||
|  |     </el-table-column> | ||||||
|  |     <el-table-column label="是否变更" align="center" prop="auditStatus" width="100"> | ||||||
|  |       <template #default="scope"> | ||||||
|  |         <span>{{ scope.row.status == 1 ? '否' : '是' }}</span> | ||||||
|       </template> |       </template> | ||||||
|     </el-table-column> |     </el-table-column> | ||||||
|     <!-- 操作列 - 通过slot接收不同标签页的操作按钮 --> |     <!-- 操作列 - 通过slot接收不同标签页的操作按钮 --> | ||||||
|     <el-table-column label="操作" width="240" align="center"> |     <el-table-column label="操作" width="300" align="center"> | ||||||
|       <template #default="scope"> |       <template #default="scope"> | ||||||
|         <slot name="operation" :row="scope.row"></slot> |         <slot name="operation" :row="scope.row"></slot> | ||||||
|       </template> |       </template> | ||||||
|  | |||||||
| @ -63,23 +63,15 @@ | |||||||
|             <el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['design:volumeFile:query']">查看文件</el-button> |             <el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['design:volumeFile:query']">查看文件</el-button> | ||||||
|           </template> |           </template> | ||||||
|         </el-table-column> |         </el-table-column> | ||||||
|         <el-table-column label="上传说明" align="center" prop="explainText"> |         <el-table-column label="外部意见" align="center"> | ||||||
|           <template #default="scope"> |           <template #default="scope"> | ||||||
|             {{ scope.row.fileVoList[0]?.explainText }} |             <el-link v-if="scope.row.opinion" :href="scope.row.opinion" target="_blank" type="primary"> 查看文件 </el-link> | ||||||
|           </template> |           </template> | ||||||
|         </el-table-column> |         </el-table-column> | ||||||
|         <el-table-column label="备注" align="center" prop="remark" /> |         <el-table-column label="备注" align="center" prop="remark" /> | ||||||
|         <el-table-column label="操作" align="center" fixed="right" width="200"> |         <el-table-column label="操作" align="center" fixed="right" width="200"> | ||||||
|           <template #default="scope"> |           <template #default="scope"> | ||||||
|             <el-button |             <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['design:volumeFile:edit']">修改</el-button> | ||||||
|               link |  | ||||||
|               type="primary" |  | ||||||
|               v-if="scope.row.auditStatus != 'finish' && scope.row.auditStatus != 'termination' && scope.row.auditStatus != 'waiting'" |  | ||||||
|               icon="Edit" |  | ||||||
|               @click="handleUpdate(scope.row)" |  | ||||||
|               v-hasPermi="['design:volumeFile:edit']" |  | ||||||
|               >修改</el-button |  | ||||||
|             > |  | ||||||
|             <el-button |             <el-button | ||||||
|               link |               link | ||||||
|               type="primary" |               type="primary" | ||||||
| @ -89,6 +81,7 @@ | |||||||
|               v-hasPermi="['design:volumeFile:add']" |               v-hasPermi="['design:volumeFile:add']" | ||||||
|               >上传图纸</el-button |               >上传图纸</el-button | ||||||
|             > |             > | ||||||
|  |             <el-button link type="primary" icon="Upload" @click="handleOpinion(scope.row)">外部意见</el-button> | ||||||
|           </template> |           </template> | ||||||
|         </el-table-column> |         </el-table-column> | ||||||
|       </el-table> |       </el-table> | ||||||
| @ -156,21 +149,28 @@ | |||||||
|       </div> |       </div> | ||||||
|     </el-dialog> |     </el-dialog> | ||||||
|     <!-- 查看文件列表 --> |     <!-- 查看文件列表 --> | ||||||
|     <el-dialog draggable title="图纸列表" v-model="viewVisible" width="45%"> |     <el-dialog draggable title="图纸列表" v-model="viewVisible" width="1000px"> | ||||||
|       <el-tabs type="border-card" v-model="activeName" class="demo-tabs" @tab-click="handleClick"> |       <el-tabs type="border-card" v-model="activeName" class="demo-tabs" @tab-click="handleClick"> | ||||||
|         <el-tab-pane label="蓝图" name="3" |         <el-tab-pane label="蓝图" name="3" | ||||||
|           ><TableContent :data="fileList" :wf-business-status="wf_business_status"> |           ><TableContent :data="fileList" :wf-business-status="wf_business_status"> | ||||||
|             <template #operation="{ row }"> |             <template #operation="{ row }"> | ||||||
|               <el-button link type="primary" icon="edit" @click="handleAuditLantu(row)" v-if="row.auditStatus == 'draft' || row.auditStatus == 'back'" |               <el-button | ||||||
|  |                 link | ||||||
|  |                 type="primary" | ||||||
|  |                 icon="edit" | ||||||
|  |                 @click="handleAuditLantu(row)" | ||||||
|  |                 v-if="(row.status != '2' && row.auditStatus == 'draft') || row.auditStatus == 'back'" | ||||||
|                 >审核</el-button |                 >审核</el-button | ||||||
|               > |               > | ||||||
|               <el-button link type="primary" icon="View" v-if="row.auditStatus != 'draft'" @click="handleAuditViewLantu(row)">查看流程</el-button> |               <el-button link type="primary" icon="View" v-if="row.status != '2' && row.auditStatus != 'draft'" @click="handleAuditViewLantu(row)" | ||||||
|  |                 >查看流程</el-button | ||||||
|  |               > | ||||||
|               <el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载 </el-button> |               <el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载 </el-button> | ||||||
|               <el-button |               <el-button | ||||||
|                 type="warning" |                 type="warning" | ||||||
|                 link |                 link | ||||||
|                 icon="View" |                 icon="View" | ||||||
|                 v-if="row.auditStatus == 'back' || row.auditStatus == 'termination' || row.auditStatus == 'finish'" |                 v-if="(row.status != '2' && row.auditStatus == 'back') || row.auditStatus == 'termination' || row.auditStatus == 'finish'" | ||||||
|                 @click="handleViewHistory(row)" |                 @click="handleViewHistory(row)" | ||||||
|                 >查看单据</el-button |                 >查看单据</el-button | ||||||
|               > |               > | ||||||
| @ -196,17 +196,10 @@ | |||||||
|             </template> |             </template> | ||||||
|           </TableContent></el-tab-pane |           </TableContent></el-tab-pane | ||||||
|         > |         > | ||||||
|         <el-tab-pane label="变更" name="2" |  | ||||||
|           ><TableContent :data="fileList" :wf-business-status="wf_business_status"> |  | ||||||
|             <template #operation="{ row }"> |  | ||||||
|               <el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载 </el-button> |  | ||||||
|             </template> |  | ||||||
|           </TableContent></el-tab-pane |  | ||||||
|         > |  | ||||||
|         <el-tab-pane label="作废 " name="4" |         <el-tab-pane label="作废 " name="4" | ||||||
|           ><TableContent :data="fileList" :wf-business-status="wf_business_status"> |           ><TableContent :data="fileList" :wf-business-status="wf_business_status"> | ||||||
|             <template #operation="{ row }"> |             <template #operation="{ row }"> | ||||||
|               <el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载1 </el-button> |               <el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载 </el-button> | ||||||
|             </template> |             </template> | ||||||
|           </TableContent></el-tab-pane |           </TableContent></el-tab-pane | ||||||
|         > |         > | ||||||
| @ -220,6 +213,18 @@ | |||||||
|     <el-dialog draggable title="单据" v-model="dialogHistory" width="800px"> |     <el-dialog draggable title="单据" v-model="dialogHistory" width="800px"> | ||||||
|       <histroy ref="histroyRef"></histroy> |       <histroy ref="histroyRef"></histroy> | ||||||
|     </el-dialog> |     </el-dialog> | ||||||
|  |     <el-dialog draggable title="上传外部意见" v-model="uploadOpinionVisible" width="500px" append-to-body> | ||||||
|  |       <el-form :model="updateRow" label-width="80px" :inline="false"> | ||||||
|  |         <el-form-item label="外部意见"> | ||||||
|  |           <file-upload :fileType="['pdf']" :isShowTip="false" :fileSize="100" :onUploadSuccess="onUploadSuccess" v-model="opinion"></file-upload> | ||||||
|  |         </el-form-item> | ||||||
|  |       </el-form> | ||||||
|  |       <span style="font-size: 12px; color: #999999">注意:请上传pdf格式文件</span> | ||||||
|  |       <div style="display: flex; justify-content: flex-end"> | ||||||
|  |         <el-button type="primary" @click="onSubmitOpinion">确定</el-button> | ||||||
|  |         <el-button @click="uploadOpinionVisible = false">取消</el-button> | ||||||
|  |       </div> | ||||||
|  |     </el-dialog> | ||||||
|   </div> |   </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @ -253,9 +258,14 @@ const TableContentRef = ref<InstanceType<typeof TableContentRef>>(); | |||||||
| const single = ref(true); | const single = ref(true); | ||||||
| const multiple = ref(true); | const multiple = ref(true); | ||||||
| const activeName = ref('3'); | const activeName = ref('3'); | ||||||
|  | const uploadOpinionVisible = ref(false); | ||||||
| const design = ref(''); | const design = ref(''); | ||||||
| const total = ref(0); | const total = ref(0); | ||||||
| const dialogHistory = ref(false); | const dialogHistory = ref(false); | ||||||
|  | const opinion = ref(''); | ||||||
|  | const updateRow = ref({ | ||||||
|  |   opinion: [] | ||||||
|  | }); | ||||||
| // 获取用户 store | // 获取用户 store | ||||||
| const userStore = useUserStoreHook(); | const userStore = useUserStoreHook(); | ||||||
| // 从 store 中获取项目列表和当前选中的项目 | // 从 store 中获取项目列表和当前选中的项目 | ||||||
| @ -415,6 +425,7 @@ const handleAdd = () => { | |||||||
| const handleView = (row?: any) => { | const handleView = (row?: any) => { | ||||||
|   fileList.value = row.fileVoList; |   fileList.value = row.fileVoList; | ||||||
|   design.value = row.design; |   design.value = row.design; | ||||||
|  |   activeName.value = '3'; | ||||||
|   getVolumeFileList('3'); |   getVolumeFileList('3'); | ||||||
|   viewVisible.value = true; |   viewVisible.value = true; | ||||||
| }; | }; | ||||||
| @ -422,7 +433,34 @@ const handleView = (row?: any) => { | |||||||
| /** 上传文件按钮操作 */ | /** 上传文件按钮操作 */ | ||||||
| const uploadVisible = ref(false); | const uploadVisible = ref(false); | ||||||
| const viewVisible = ref(false); | const viewVisible = ref(false); | ||||||
|  | // 上传外部意见 | ||||||
|  | const handleOpinion = (row) => { | ||||||
|  |   uploadOpinionVisible.value = true; | ||||||
|  |   updateRow.value = row; | ||||||
|  |   opinion.value = ''; | ||||||
|  | }; | ||||||
|  | const onSubmitOpinion = async () => { | ||||||
|  |   // 提交外部意见 | ||||||
|  |   if (opinion.value.length == 0) { | ||||||
|  |     proxy.$modal.msgError('请上传外部意见'); | ||||||
|  |     return; | ||||||
|  |   } | ||||||
|  |   await updateVolumeCatalog({ ...updateRow.value }); | ||||||
|  |   proxy?.$modal.msgSuccess('操作成功'); | ||||||
|  |   uploadOpinionVisible.value = false; | ||||||
|  |   await getList(); | ||||||
|  | }; | ||||||
|  | const onUploadSuccess = (fileList, res) => { | ||||||
|  |   if (res.code == 200) { | ||||||
|  |     updateRow.value.opinion = res.data.url; | ||||||
|  |   } | ||||||
|  | }; | ||||||
| const handleUpload = async (row?: any) => { | const handleUpload = async (row?: any) => { | ||||||
|  |   // 判断是否有专业和设计人员 | ||||||
|  |   if (!row?.principalName || !row?.specialtyName) { | ||||||
|  |     proxy?.$modal.warning('请先选择专业和设计人员'); | ||||||
|  |     return; | ||||||
|  |   } | ||||||
|   resetUploadForm(); |   resetUploadForm(); | ||||||
|   uploadForm.volumeCatalogId = row.design; |   uploadForm.volumeCatalogId = row.design; | ||||||
|   userList.value = row.noViewerList; |   userList.value = row.noViewerList; | ||||||
|  | |||||||
| @ -82,7 +82,7 @@ | |||||||
|             <el-table-column label="质量标准" align="center" prop="qs" /> |             <el-table-column label="质量标准" align="center" prop="qs" /> | ||||||
|             <el-table-column label="规格型号" align="center" prop="specification" /> |             <el-table-column label="规格型号" align="center" prop="specification" /> | ||||||
|             <el-table-column label="计量单位" align="center" prop="unit" width="80" /> |             <el-table-column label="计量单位" align="center" prop="unit" width="80" /> | ||||||
|             <el-table-column label="需求数量" align="center" prop="demandQuantity" /> |             <el-table-column label="需求数量" align="center" prop="quantity" /> | ||||||
|             <el-table-column label="需求到货时间" align="center" prop="arrivalTime" width="250" /> |             <el-table-column label="需求到货时间" align="center" prop="arrivalTime" width="250" /> | ||||||
|             <el-table-column label="备注" align="center" prop="remark" /> |             <el-table-column label="备注" align="center" prop="remark" /> | ||||||
|           </el-table> |           </el-table> | ||||||
| @ -123,22 +123,25 @@ | |||||||
|         <el-table :data="form.planList"> |         <el-table :data="form.planList"> | ||||||
|           <el-table-column prop="name" align="center" label="物资名称"> |           <el-table-column prop="name" align="center" label="物资名称"> | ||||||
|             <template #default="scope"> |             <template #default="scope"> | ||||||
|               <el-input v-model="scope.row.name" placeholder="请输入物资" /> |               <!-- <el-input v-model="scope.row.name" placeholder="请输入物资" /> --> | ||||||
|  |               <el-select v-model="scope.row.suppliespriceId" placeholder="请选择" @change="(val) => selectName(val, scope.row)"> | ||||||
|  |                 <el-option v-for="item in nameList" :key="item.id" :label="item.name" :value="item.id" /> | ||||||
|  |               </el-select> | ||||||
|             </template> |             </template> | ||||||
|           </el-table-column> |           </el-table-column> | ||||||
|           <el-table-column prop="specification" align="center" label="规格型号" width="150"> |           <el-table-column prop="specification" align="center" label="规格型号" width="150"> | ||||||
|             <template #default="scope"> |             <template #default="scope"> | ||||||
|               <el-input v-model="scope.row.specification" placeholder="请输入规格型号" /> |               <el-input v-model="scope.row.specification" placeholder="请输入规格型号" disabled /> | ||||||
|             </template> |             </template> | ||||||
|           </el-table-column> |           </el-table-column> | ||||||
|           <el-table-column prop="unit" align="center" label="单位" width="130"> |           <el-table-column prop="unit" align="center" label="单位" width="130"> | ||||||
|             <template #default="scope"> |             <template #default="scope"> | ||||||
|               <el-input v-model="scope.row.unit" placeholder="请输入单位" /> |               <el-input v-model="scope.row.unit" placeholder="请输入单位" disabled /> | ||||||
|             </template> |             </template> | ||||||
|           </el-table-column> |           </el-table-column> | ||||||
|           <el-table-column prop="demandQuantity" align="center" label="数量" width="130"> |           <el-table-column prop="quantity" align="center" label="数量" width="130"> | ||||||
|             <template #default="scope"> |             <template #default="scope"> | ||||||
|               <el-input v-model="scope.row.demandQuantity" placeholder="请输入数量" type="number" min="0" /> |               <el-input v-model="scope.row.quantity" placeholder="请输入数量" type="number" min="0" disabled /> | ||||||
|             </template> |             </template> | ||||||
|           </el-table-column> |           </el-table-column> | ||||||
|           <el-table-column prop="qs" align="center" label="质量标准" width="150"> |           <el-table-column prop="qs" align="center" label="质量标准" width="150"> | ||||||
| @ -153,7 +156,7 @@ | |||||||
|           </el-table-column> |           </el-table-column> | ||||||
|           <el-table-column prop="remark" align="center" label="备注" width="150"> |           <el-table-column prop="remark" align="center" label="备注" width="150"> | ||||||
|             <template #default="scope"> |             <template #default="scope"> | ||||||
|               <el-input v-model="scope.row.remark" placeholder="请输入备注" /> |               <el-input v-model="scope.row.remark" placeholder="请输入备注" disabled /> | ||||||
|             </template> |             </template> | ||||||
|           </el-table-column> |           </el-table-column> | ||||||
|           <el-table-column prop="remark" align="center" label="操作" width="150"> |           <el-table-column prop="remark" align="center" label="操作" width="150"> | ||||||
| @ -175,7 +178,15 @@ | |||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script setup name="Cailiaoshebei" lang="ts"> | <script setup name="Cailiaoshebei" lang="ts"> | ||||||
| import { getCailiaoshebei, updateCailiaoshebei, listBatch, getBatch, delBatch, listSelectCailiaoshebei } from '@/api/materials/batchPlan'; | import { | ||||||
|  |   getCailiaoshebei, | ||||||
|  |   updateCailiaoshebei, | ||||||
|  |   listBatch, | ||||||
|  |   getBatch, | ||||||
|  |   delBatch, | ||||||
|  |   listSelectCailiaoshebei, | ||||||
|  |   getDictList | ||||||
|  | } from '@/api/materials/batchPlan'; | ||||||
| import { CailiaoshebeiVO, CailiaoshebeiQuery, CailiaoshebeiForm } from '@/api/materials/batchPlan/types'; | import { CailiaoshebeiVO, CailiaoshebeiQuery, CailiaoshebeiForm } from '@/api/materials/batchPlan/types'; | ||||||
| import { useUserStoreHook } from '@/store/modules/user'; | import { useUserStoreHook } from '@/store/modules/user'; | ||||||
|  |  | ||||||
| @ -221,7 +232,7 @@ const initFormData: any = { | |||||||
|       name: undefined, |       name: undefined, | ||||||
|       specification: undefined, |       specification: undefined, | ||||||
|       unit: undefined, |       unit: undefined, | ||||||
|       demandQuantity: undefined, |       quantity: undefined, | ||||||
|       qs: undefined, |       qs: undefined, | ||||||
|       arrivalTime: undefined, |       arrivalTime: undefined, | ||||||
|       remark: undefined |       remark: undefined | ||||||
| @ -254,7 +265,7 @@ const data = reactive({ | |||||||
| }); | }); | ||||||
| const batchNumber = ref(''); | const batchNumber = ref(''); | ||||||
| const { queryParams, form, rules } = toRefs(data); | const { queryParams, form, rules } = toRefs(data); | ||||||
|  | const nameList = ref([]); | ||||||
| /** 查询物资-材料设备列表 */ | /** 查询物资-材料设备列表 */ | ||||||
| const getList = async (type?: string) => { | const getList = async (type?: string) => { | ||||||
|   loading.value = true; |   loading.value = true; | ||||||
| @ -271,6 +282,19 @@ const getList = async (type?: string) => { | |||||||
|   getMainList(); |   getMainList(); | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | const selectName = (val: any, row: any) => { | ||||||
|  |   const selected = nameList.value.find((item) => item.id === val); | ||||||
|  |   if (selected) { | ||||||
|  |     row.name = selected.name; | ||||||
|  |     row.specification = selected.specification; | ||||||
|  |     row.unit = selected.unit; | ||||||
|  |     row.qs = selected.qs; | ||||||
|  |     row.quantity = selected.quantity; | ||||||
|  |     row.remark = selected.remark; | ||||||
|  |     row.arrivalTime = selected.arrivalTime; | ||||||
|  |   } | ||||||
|  | }; | ||||||
|  |  | ||||||
| /** 节点单击事件 */ | /** 节点单击事件 */ | ||||||
| const handleNodeClick = (data: any) => { | const handleNodeClick = (data: any) => { | ||||||
|   queryParams.value.mainData.mrpBaseId = data.id; |   queryParams.value.mainData.mrpBaseId = data.id; | ||||||
| @ -304,7 +328,7 @@ const addRow = () => { | |||||||
|     name: undefined, |     name: undefined, | ||||||
|     specification: undefined, |     specification: undefined, | ||||||
|     unit: undefined, |     unit: undefined, | ||||||
|     demandQuantity: undefined, |     quantity: undefined, | ||||||
|     qs: undefined, |     qs: undefined, | ||||||
|     arrivalTime: undefined, |     arrivalTime: undefined, | ||||||
|     remark: undefined |     remark: undefined | ||||||
| @ -328,7 +352,7 @@ const reset = () => { | |||||||
|       name: undefined, |       name: undefined, | ||||||
|       specification: undefined, |       specification: undefined, | ||||||
|       unit: undefined, |       unit: undefined, | ||||||
|       demandQuantity: undefined, |       quantity: undefined, | ||||||
|       qs: undefined, |       qs: undefined, | ||||||
|       arrivalTime: undefined, |       arrivalTime: undefined, | ||||||
|       remark: undefined |       remark: undefined | ||||||
| @ -383,6 +407,7 @@ const handleUpdata = () => { | |||||||
| /** 提交数据 */ | /** 提交数据 */ | ||||||
| const submitTransferForm = async () => { | const submitTransferForm = async () => { | ||||||
|   const result = validateAndClean(form.value.planList); |   const result = validateAndClean(form.value.planList); | ||||||
|  |   console.log('🚀 ~ submitTransferForm ~ form.value.planList:', form.value.planList); | ||||||
|   if (!result.valid) { |   if (!result.valid) { | ||||||
|     proxy?.$modal.msgError('验证失败,主要信息存在部分字段缺失的数据项'); |     proxy?.$modal.msgError('验证失败,主要信息存在部分字段缺失的数据项'); | ||||||
|     return; |     return; | ||||||
| @ -448,9 +473,15 @@ const handleAudit = async () => { | |||||||
|   }); |   }); | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | const getNameList = () => { | ||||||
|  |   getDictList({ projectId: currentProject.value?.id }).then((res) => { | ||||||
|  |     nameList.value = res.data; | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  |  | ||||||
| onMounted(() => { | onMounted(() => { | ||||||
|   getList(); |   getList(); | ||||||
|   // getSupplierList(); |   getNameList(); | ||||||
| }); | }); | ||||||
|  |  | ||||||
| //监听项目id刷新数据 | //监听项目id刷新数据 | ||||||
| @ -458,9 +489,8 @@ const listeningProject = watch( | |||||||
|   () => currentProject.value?.id, |   () => currentProject.value?.id, | ||||||
|   (nid, oid) => { |   (nid, oid) => { | ||||||
|     queryParams.value.mainData.projectId = nid; |     queryParams.value.mainData.projectId = nid; | ||||||
|  |     queryParams.value.batchData.projectId = nid; | ||||||
|     form.value.mrpBaseBo.projectId = nid; |     form.value.mrpBaseBo.projectId = nid; | ||||||
|  |  | ||||||
|     getList(); |     getList(); | ||||||
|   } |   } | ||||||
| ); | ); | ||||||
|  | |||||||
| @ -145,8 +145,13 @@ | |||||||
|               <div v-for="(item, index) in form.itemList" :key="index" class="detail-item"> |               <div v-for="(item, index) in form.itemList" :key="index" class="detail-item"> | ||||||
|                 <el-row> |                 <el-row> | ||||||
|                   <el-col :span="12"> |                   <el-col :span="12"> | ||||||
|                     <el-form-item label="名称" :prop="`itemList.${index}.name`" :rules="{ required: true, message: '名称不能为空', trigger: 'blur' }"> |                     <el-form-item | ||||||
|                       <el-input v-model="item.name" placeholder="请输入名称" /> |                       disabled | ||||||
|  |                       label="名称" | ||||||
|  |                       :prop="`itemList.${index}.name`" | ||||||
|  |                       :rules="{ required: true, message: '名称不能为空', trigger: 'blur' }" | ||||||
|  |                     > | ||||||
|  |                       <el-input disabled v-model="item.name" placeholder="请输入名称" /> | ||||||
|                     </el-form-item> |                     </el-form-item> | ||||||
|                   </el-col> |                   </el-col> | ||||||
|                   <el-col :span="12"> |                   <el-col :span="12"> | ||||||
| @ -155,12 +160,12 @@ | |||||||
|                       :prop="`itemList.${index}.specification`" |                       :prop="`itemList.${index}.specification`" | ||||||
|                       :rules="{ required: true, message: '规格不能为空', trigger: 'blur' }" |                       :rules="{ required: true, message: '规格不能为空', trigger: 'blur' }" | ||||||
|                     > |                     > | ||||||
|                       <el-input v-model="item.specification" placeholder="请输入规格" /> |                       <el-input disabled v-model="item.specification" placeholder="请输入规格" /> | ||||||
|                     </el-form-item> |                     </el-form-item> | ||||||
|                   </el-col> |                   </el-col> | ||||||
|                   <el-col :span="12"> |                   <el-col :span="12"> | ||||||
|                     <el-form-item label="单位" :prop="`itemList.${index}.unit`" :rules="{ required: true, message: '单位不能为空', trigger: 'blur' }"> |                     <el-form-item label="单位" :prop="`itemList.${index}.unit`" :rules="{ required: true, message: '单位不能为空', trigger: 'blur' }"> | ||||||
|                       <el-input v-model="item.unit" placeholder="请输入单位" /> |                       <el-input disabled v-model="item.unit" placeholder="请输入单位" /> | ||||||
|                     </el-form-item> |                     </el-form-item> | ||||||
|                   </el-col> |                   </el-col> | ||||||
|                   <el-col :span="12"> |                   <el-col :span="12"> | ||||||
| @ -169,7 +174,7 @@ | |||||||
|                       :prop="`itemList.${index}.quantity`" |                       :prop="`itemList.${index}.quantity`" | ||||||
|                       :rules="{ required: true, message: '数量不能为空', trigger: 'blur' }" |                       :rules="{ required: true, message: '数量不能为空', trigger: 'blur' }" | ||||||
|                     > |                     > | ||||||
|                       <el-input type="number" v-model="item.quantity" placeholder="请输入数量" /> |                       <el-input disabled type="number" v-model="item.quantity" placeholder="请输入数量" /> | ||||||
|                     </el-form-item> |                     </el-form-item> | ||||||
|                   </el-col> |                   </el-col> | ||||||
|                   <el-col :span="12"> |                   <el-col :span="12"> | ||||||
| @ -178,7 +183,7 @@ | |||||||
|                       :prop="`itemList.${index}.acceptedQuantity`" |                       :prop="`itemList.${index}.acceptedQuantity`" | ||||||
|                       :rules="{ required: true, message: '验收数量不能为空', trigger: 'blur' }" |                       :rules="{ required: true, message: '验收数量不能为空', trigger: 'blur' }" | ||||||
|                     > |                     > | ||||||
|                       <el-input type="number" v-model="item.acceptedQuantity" placeholder="请输入验收" /> |                       <el-input  type="number" v-model="item.acceptedQuantity" placeholder="请输入验收" /> | ||||||
|                     </el-form-item> |                     </el-form-item> | ||||||
|                   </el-col> |                   </el-col> | ||||||
|                   <el-col :span="12"> |                   <el-col :span="12"> | ||||||
| @ -345,7 +350,20 @@ const data = reactive({ | |||||||
|     supplierUnit: undefined, |     supplierUnit: undefined, | ||||||
|     params: {} |     params: {} | ||||||
|   }, |   }, | ||||||
|   rules: {} |   rules: { | ||||||
|  |     // 物资采购单 | ||||||
|  |     docId: [{ required: true, message: '请选择物资采购单', trigger: 'change' }], | ||||||
|  |     // 材料来源 | ||||||
|  |     materialSource: [{ required: true, message: '请选择材料来源', trigger: 'change' }], | ||||||
|  |     // 表单编号 | ||||||
|  |     formCode: [{ required: true, message: '请输入表单编号', trigger: 'blur' }], | ||||||
|  |     // 采购单编号 | ||||||
|  |     docCode: [{ required: true, message: '请输入采购单编号', trigger: 'blur' }], | ||||||
|  |     // 供货单位 | ||||||
|  |     supplierUnit: [{ required: true, message: '请输入供货单位', trigger: 'blur' }], | ||||||
|  |     // 订货单位 | ||||||
|  |     orderingUnit: [{ required: true, message: '请输入订货单位', trigger: 'blur' }] | ||||||
|  |   } | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const { queryParams, form, rules } = toRefs(data); | const { queryParams, form, rules } = toRefs(data); | ||||||
|  | |||||||
| @ -391,6 +391,7 @@ | |||||||
| <script setup> | <script setup> | ||||||
| import { ref, reactive, onMounted, toRaw, getCurrentInstance } from 'vue'; | import { ref, reactive, onMounted, toRaw, getCurrentInstance } from 'vue'; | ||||||
| import { materialsUsageDetails, materialsSonAdd, materialsSonDel, materialsSonEdit } from '@/api/materials/usageMaterials/index'; | import { materialsUsageDetails, materialsSonAdd, materialsSonDel, materialsSonEdit } from '@/api/materials/usageMaterials/index'; | ||||||
|  | import { routerRename } from '@/api/air'; | ||||||
| const { proxy } = getCurrentInstance(); | const { proxy } = getCurrentInstance(); | ||||||
| const dialogVisible2 = ref(false); | const dialogVisible2 = ref(false); | ||||||
| const dialogType2 = ref('addSon'); // add 或 edit | const dialogType2 = ref('addSon'); // add 或 edit | ||||||
|  | |||||||
							
								
								
									
										277
									
								
								src/views/patch/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										277
									
								
								src/views/patch/index.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,277 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="p-2"> | ||||||
|  |     <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> | ||||||
|  |       <div v-show="showSearch" class="mb-[10px]"> | ||||||
|  |         <el-card shadow="hover"> | ||||||
|  |           <el-form ref="queryFormRef" :model="queryParams" :inline="true"> | ||||||
|  |             <el-form-item label="项目ID" prop="projectId"> | ||||||
|  |               <el-input v-model="queryParams.projectId" placeholder="请输入项目ID" clearable @keyup.enter="handleQuery" /> | ||||||
|  |             </el-form-item> | ||||||
|  |             <el-form-item label="任务名称" prop="taskName"> | ||||||
|  |               <el-input v-model="queryParams.taskName" placeholder="请输入任务名称" clearable @keyup.enter="handleQuery" /> | ||||||
|  |             </el-form-item> | ||||||
|  |             <el-form-item label="任务描述" prop="describe"> | ||||||
|  |               <el-input v-model="queryParams.describe" placeholder="请输入任务描述" clearable @keyup.enter="handleQuery" /> | ||||||
|  |             </el-form-item> | ||||||
|  |             <el-form-item label="计划完成时间" prop="pcd"> | ||||||
|  |               <el-date-picker clearable v-model="queryParams.pcd" type="date" value-format="YYYY-MM-DD" placeholder="请选择计划完成时间" /> | ||||||
|  |             </el-form-item> | ||||||
|  |             <el-form-item label="实际完成时间" prop="act"> | ||||||
|  |               <el-date-picker clearable v-model="queryParams.act" type="date" value-format="YYYY-MM-DD" placeholder="请选择实际完成时间" /> | ||||||
|  |             </el-form-item> | ||||||
|  |             <el-form-item label="完成进度" prop="completionProgress"> | ||||||
|  |               <el-input v-model="queryParams.completionProgress" placeholder="请输入完成进度" clearable @keyup.enter="handleQuery" /> | ||||||
|  |             </el-form-item> | ||||||
|  |             <el-form-item> | ||||||
|  |               <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> | ||||||
|  |               <el-button icon="Refresh" @click="resetQuery">重置</el-button> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-form> | ||||||
|  |         </el-card> | ||||||
|  |       </div> | ||||||
|  |     </transition> | ||||||
|  |  | ||||||
|  |     <el-card shadow="never"> | ||||||
|  |       <template #header> | ||||||
|  |         <el-row :gutter="10" class="mb8"> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['patch:patch:add']">新增</el-button> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['patch:patch:edit']">修改</el-button> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['patch:patch:remove']" | ||||||
|  |               >删除</el-button | ||||||
|  |             > | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['patch:patch:export']">导出</el-button> | ||||||
|  |           </el-col> | ||||||
|  |           <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> | ||||||
|  |         </el-row> | ||||||
|  |       </template> | ||||||
|  |  | ||||||
|  |       <el-table v-loading="loading" :data="masterList" @selection-change="handleSelectionChange"> | ||||||
|  |         <el-table-column type="selection" width="55" align="center" /> | ||||||
|  |         <el-table-column label="主键ID" align="center" prop="id" v-if="true" /> | ||||||
|  |         <el-table-column label="项目ID" align="center" prop="projectId" /> | ||||||
|  |         <el-table-column label="任务名称" align="center" prop="taskName" /> | ||||||
|  |         <el-table-column label="任务描述" align="center" prop="describe" /> | ||||||
|  |         <el-table-column label="计划完成时间" align="center" prop="pcd" width="180"> | ||||||
|  |           <template #default="scope"> | ||||||
|  |             <span>{{ parseTime(scope.row.pcd, '{y}-{m}-{d}') }}</span> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|  |         <el-table-column label="实际完成时间" align="center" prop="act" width="180"> | ||||||
|  |           <template #default="scope"> | ||||||
|  |             <span>{{ parseTime(scope.row.act, '{y}-{m}-{d}') }}</span> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|  |         <el-table-column label="完成进度" align="center" prop="completionProgress" /> | ||||||
|  |         <el-table-column label="任务状态" align="center" prop="taskStatus" /> | ||||||
|  |         <el-table-column label="备注" align="center" prop="remark" /> | ||||||
|  |         <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||||||
|  |           <template #default="scope"> | ||||||
|  |             <el-tooltip content="修改" placement="top"> | ||||||
|  |               <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['patch:patch:edit']"></el-button> | ||||||
|  |             </el-tooltip> | ||||||
|  |             <el-tooltip content="删除" placement="top"> | ||||||
|  |               <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['patch:patch:remove']"></el-button> | ||||||
|  |             </el-tooltip> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|  |       </el-table> | ||||||
|  |  | ||||||
|  |       <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" /> | ||||||
|  |     </el-card> | ||||||
|  |     <!-- 添加或修改派单对话框 --> | ||||||
|  |     <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body> | ||||||
|  |       <el-form ref="masterFormRef" :model="form" :rules="rules" label-width="80px"> | ||||||
|  |         <el-form-item label="项目ID" prop="projectId"> | ||||||
|  |           <el-input v-model="form.projectId" placeholder="请输入项目ID" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="任务名称" prop="taskName"> | ||||||
|  |           <el-input v-model="form.taskName" placeholder="请输入任务名称" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="任务描述" prop="describe"> | ||||||
|  |           <el-input v-model="form.describe" placeholder="请输入任务描述" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="计划完成时间" prop="pcd"> | ||||||
|  |           <el-date-picker clearable v-model="form.pcd" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择计划完成时间"> | ||||||
|  |           </el-date-picker> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="实际完成时间" prop="act"> | ||||||
|  |           <el-date-picker clearable v-model="form.act" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择实际完成时间"> | ||||||
|  |           </el-date-picker> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="完成进度" prop="completionProgress"> | ||||||
|  |           <el-input v-model="form.completionProgress" placeholder="请输入完成进度" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="备注" prop="remark"> | ||||||
|  |           <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> | ||||||
|  |         </el-form-item> | ||||||
|  |       </el-form> | ||||||
|  |       <template #footer> | ||||||
|  |         <div class="dialog-footer"> | ||||||
|  |           <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> | ||||||
|  |           <el-button @click="cancel">取 消</el-button> | ||||||
|  |         </div> | ||||||
|  |       </template> | ||||||
|  |     </el-dialog> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script setup name="Master" lang="ts"> | ||||||
|  | import { listMaster, getMaster, delMaster, addMaster, updateMaster } from '@/api/patch'; | ||||||
|  | import { MasterVO, MasterQuery, MasterForm } from '@/api/patch/types'; | ||||||
|  |  | ||||||
|  | const { proxy } = getCurrentInstance() as ComponentInternalInstance; | ||||||
|  |  | ||||||
|  | const masterList = ref<MasterVO[]>([]); | ||||||
|  | const buttonLoading = ref(false); | ||||||
|  | const loading = ref(true); | ||||||
|  | const showSearch = ref(true); | ||||||
|  | const ids = ref<Array<string | number>>([]); | ||||||
|  | const single = ref(true); | ||||||
|  | const multiple = ref(true); | ||||||
|  | const total = ref(0); | ||||||
|  |  | ||||||
|  | const queryFormRef = ref<ElFormInstance>(); | ||||||
|  | const masterFormRef = ref<ElFormInstance>(); | ||||||
|  |  | ||||||
|  | const dialog = reactive<DialogOption>({ | ||||||
|  |   visible: false, | ||||||
|  |   title: '' | ||||||
|  | }); | ||||||
|  |  | ||||||
|  | const initFormData: MasterForm = { | ||||||
|  |   id: undefined, | ||||||
|  |   projectId: undefined, | ||||||
|  |   taskName: undefined, | ||||||
|  |   describe: undefined, | ||||||
|  |   pcd: undefined, | ||||||
|  |   act: undefined, | ||||||
|  |   completionProgress: undefined, | ||||||
|  |   taskStatus: undefined, | ||||||
|  |   remark: undefined | ||||||
|  | }; | ||||||
|  | const data = reactive<PageData<MasterForm, MasterQuery>>({ | ||||||
|  |   form: { ...initFormData }, | ||||||
|  |   queryParams: { | ||||||
|  |     pageNum: 1, | ||||||
|  |     pageSize: 10, | ||||||
|  |     projectId: undefined, | ||||||
|  |     taskName: undefined, | ||||||
|  |     describe: undefined, | ||||||
|  |     pcd: undefined, | ||||||
|  |     act: undefined, | ||||||
|  |     completionProgress: undefined, | ||||||
|  |     taskStatus: undefined, | ||||||
|  |     params: {} | ||||||
|  |   }, | ||||||
|  |   rules: { | ||||||
|  |     id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }] | ||||||
|  |   } | ||||||
|  | }); | ||||||
|  |  | ||||||
|  | const { queryParams, form, rules } = toRefs(data); | ||||||
|  |  | ||||||
|  | /** 查询派单列表 */ | ||||||
|  | const getList = async () => { | ||||||
|  |   loading.value = true; | ||||||
|  |   const res = await listMaster(queryParams.value); | ||||||
|  |   masterList.value = res.rows; | ||||||
|  |   total.value = res.total; | ||||||
|  |   loading.value = false; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 取消按钮 */ | ||||||
|  | const cancel = () => { | ||||||
|  |   reset(); | ||||||
|  |   dialog.visible = false; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 表单重置 */ | ||||||
|  | const reset = () => { | ||||||
|  |   form.value = { ...initFormData }; | ||||||
|  |   masterFormRef.value?.resetFields(); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 搜索按钮操作 */ | ||||||
|  | const handleQuery = () => { | ||||||
|  |   queryParams.value.pageNum = 1; | ||||||
|  |   getList(); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 重置按钮操作 */ | ||||||
|  | const resetQuery = () => { | ||||||
|  |   queryFormRef.value?.resetFields(); | ||||||
|  |   handleQuery(); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 多选框选中数据 */ | ||||||
|  | const handleSelectionChange = (selection: MasterVO[]) => { | ||||||
|  |   ids.value = selection.map((item) => item.id); | ||||||
|  |   single.value = selection.length != 1; | ||||||
|  |   multiple.value = !selection.length; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 新增按钮操作 */ | ||||||
|  | const handleAdd = () => { | ||||||
|  |   reset(); | ||||||
|  |   dialog.visible = true; | ||||||
|  |   dialog.title = '添加派单'; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 修改按钮操作 */ | ||||||
|  | const handleUpdate = async (row?: MasterVO) => { | ||||||
|  |   reset(); | ||||||
|  |   const _id = row?.id || ids.value[0]; | ||||||
|  |   const res = await getMaster(_id); | ||||||
|  |   Object.assign(form.value, res.data); | ||||||
|  |   dialog.visible = true; | ||||||
|  |   dialog.title = '修改派单'; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 提交按钮 */ | ||||||
|  | const submitForm = () => { | ||||||
|  |   masterFormRef.value?.validate(async (valid: boolean) => { | ||||||
|  |     if (valid) { | ||||||
|  |       buttonLoading.value = true; | ||||||
|  |       if (form.value.id) { | ||||||
|  |         await updateMaster(form.value).finally(() => (buttonLoading.value = false)); | ||||||
|  |       } else { | ||||||
|  |         await addMaster(form.value).finally(() => (buttonLoading.value = false)); | ||||||
|  |       } | ||||||
|  |       proxy?.$modal.msgSuccess('操作成功'); | ||||||
|  |       dialog.visible = false; | ||||||
|  |       await getList(); | ||||||
|  |     } | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 删除按钮操作 */ | ||||||
|  | const handleDelete = async (row?: MasterVO) => { | ||||||
|  |   const _ids = row?.id || ids.value; | ||||||
|  |   await proxy?.$modal.confirm('是否确认删除派单编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false)); | ||||||
|  |   await delMaster(_ids); | ||||||
|  |   proxy?.$modal.msgSuccess('删除成功'); | ||||||
|  |   await getList(); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 导出按钮操作 */ | ||||||
|  | const handleExport = () => { | ||||||
|  |   proxy?.download( | ||||||
|  |     'patch/patch/export', | ||||||
|  |     { | ||||||
|  |       ...queryParams.value | ||||||
|  |     }, | ||||||
|  |     `master_${new Date().getTime()}.xlsx` | ||||||
|  |   ); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | onMounted(() => { | ||||||
|  |   getList(); | ||||||
|  | }); | ||||||
|  | </script> | ||||||
| @ -149,6 +149,9 @@ | |||||||
|  |  | ||||||
|               <el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['project:project:edit']">修改 </el-button> |               <el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['project:project:edit']">修改 </el-button> | ||||||
|               <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['project:project:remove']">删除 </el-button> |               <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['project:project:remove']">删除 </el-button> | ||||||
|  |               <el-button link type="primary" icon="upload" @click="handleUpload(scope.row)" v-hasPermi="['project:project:saveTenderFile']" | ||||||
|  |                 >招标文件上传 | ||||||
|  |               </el-button> | ||||||
|             </el-space> |             </el-space> | ||||||
|           </template> |           </template> | ||||||
|         </el-table-column> |         </el-table-column> | ||||||
| @ -190,9 +193,9 @@ | |||||||
|               </el-form-item> |               </el-form-item> | ||||||
|             </el-col> |             </el-col> | ||||||
|             <el-col :span="12" :offset="0"> |             <el-col :span="12" :offset="0"> | ||||||
|               <el-form-item label="项目类别" prop="projectCategory" label-width="100px"> |               <el-form-item label="项目阶段" prop="projectStage" label-width="100px"> | ||||||
|                 <el-select v-model="form.projectCategory" placeholder="请选择项目类别" clearable> |                 <el-select v-model="form.projectStage" placeholder="请选择项目类别" clearable> | ||||||
|                   <el-option v-for="dict in project_category_type" :key="dict.value" :label="dict.label" :value="dict.value" /> |                   <el-option v-for="dict in project_stage" :key="dict.value" :label="dict.label" :value="dict.value" /> | ||||||
|                 </el-select> |                 </el-select> | ||||||
|               </el-form-item> |               </el-form-item> | ||||||
|             </el-col> |             </el-col> | ||||||
| @ -359,6 +362,15 @@ | |||||||
|         </span> |         </span> | ||||||
|       </template> |       </template> | ||||||
|     </el-dialog> |     </el-dialog> | ||||||
|  |     <el-dialog title="上传文件" v-model="fileVisble" width="400"> | ||||||
|  |       <file-upload v-model="fileForm.tenderFiles" :limit="10" :file-type="['pdf']" :file-size="50" /> | ||||||
|  |       <template #footer> | ||||||
|  |         <div class="dialog-footer"> | ||||||
|  |           <el-button v-loading="buttonLoading" type="primary" @click="uploadSubmit"> 提交</el-button> | ||||||
|  |           <el-button @click="fileVisble = false">取消</el-button> | ||||||
|  |         </div> | ||||||
|  |       </template> | ||||||
|  |     </el-dialog> | ||||||
|   </div> |   </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @ -370,7 +382,7 @@ import { | |||||||
|   addProjectPilePoint, |   addProjectPilePoint, | ||||||
|   addProjectSquare, |   addProjectSquare, | ||||||
|   delProject, |   delProject, | ||||||
|   getChildProject, |   uploadProjectFile, | ||||||
|   getProject, |   getProject, | ||||||
|   listProject, |   listProject, | ||||||
|   updateProject |   updateProject | ||||||
| @ -378,8 +390,8 @@ import { | |||||||
| import { ProjectForm, ProjectQuery, ProjectVO, childProjectQuery, locationType } from '@/api/project/project/types'; | import { ProjectForm, ProjectQuery, ProjectVO, childProjectQuery, locationType } from '@/api/project/project/types'; | ||||||
| import amap from '@/components/amap/index.vue'; | import amap from '@/components/amap/index.vue'; | ||||||
| const { proxy } = getCurrentInstance() as ComponentInternalInstance; | const { proxy } = getCurrentInstance() as ComponentInternalInstance; | ||||||
| const { sys_normal_disable, project_category_type, project_type } = toRefs<any>( | const { sys_normal_disable, project_category_type, project_type, project_stage } = toRefs<any>( | ||||||
|   proxy?.useDict('sys_normal_disable', 'project_category_type', 'project_type') |   proxy?.useDict('sys_normal_disable', 'project_category_type', 'project_type', 'project_stage') | ||||||
| ); | ); | ||||||
| const projectList = ref<ProjectVO[]>([]); | const projectList = ref<ProjectVO[]>([]); | ||||||
| const buttonLoading = ref(false); | const buttonLoading = ref(false); | ||||||
| @ -408,6 +420,11 @@ const dialog = reactive<DialogOption>({ | |||||||
|   visible: false, |   visible: false, | ||||||
|   title: '' |   title: '' | ||||||
| }); | }); | ||||||
|  | const fileVisble = ref(false); | ||||||
|  | const fileForm = ref({ | ||||||
|  |   id: '', | ||||||
|  |   tenderFiles: '' | ||||||
|  | }); | ||||||
| const jsonData = ref(null); | const jsonData = ref(null); | ||||||
| const fullscreenLoading = ref(false); | const fullscreenLoading = ref(false); | ||||||
|  |  | ||||||
| @ -521,48 +538,6 @@ const setPoi = (location: locationType) => { | |||||||
| const setCheckedNodes = (nodeList: any) => { | const setCheckedNodes = (nodeList: any) => { | ||||||
|   nodes.value = nodeList; |   nodes.value = nodeList; | ||||||
| }; | }; | ||||||
| //上传节点 |  | ||||||
| // const addFacilities = async () => { |  | ||||||
| //   if (!layerType.value) { |  | ||||||
| //     return proxy?.$modal.msgError('请选择图层类型'); |  | ||||||
| //   } |  | ||||||
| //   if (!nodes.value.length) { |  | ||||||
| //     return proxy?.$modal.msgError('请选择需要上传的图层'); |  | ||||||
| //   } |  | ||||||
| //   const data = { |  | ||||||
| //     projectId: projectId.value, |  | ||||||
| //     nameGeoJson: null, |  | ||||||
| //     locationGeoJson: null, |  | ||||||
| //     pointGeoJson: null |  | ||||||
| //   }; |  | ||||||
| //   loading.value = true; |  | ||||||
| //   if (layerType.value == 1) { |  | ||||||
| //     if (nodes.value[0].option == '名称') { |  | ||||||
| //       data.nameGeoJson = jsonData.value[nodes.value[0].location.index]; |  | ||||||
| //       data.locationGeoJson = jsonData.value[nodes.value[1].location.index]; |  | ||||||
| //     } else { |  | ||||||
| //       data.nameGeoJson = jsonData.value[nodes.value[1].location.index]; |  | ||||||
| //       data.locationGeoJson = jsonData.value[nodes.value[0].location.index]; |  | ||||||
| //     } |  | ||||||
| //     await addProjectFacilities(data); |  | ||||||
| //     await proxy?.$modal.msgSuccess('添加成功'); |  | ||||||
| //   } else if (layerType.value == 2) { |  | ||||||
| //     data.pointGeoJson = jsonData.value[nodes.value[0].location.index]; |  | ||||||
| //     await addProjectPilePoint(data); |  | ||||||
| //     await proxy?.$modal.msgSuccess('添加成功'); |  | ||||||
| //   } else if (layerType.value == 3) { |  | ||||||
| //     if (nodes.value[0].option == '名称') { |  | ||||||
| //       data.nameGeoJson = jsonData.value[nodes.value[0].location.index]; |  | ||||||
| //       data.locationGeoJson = jsonData.value[nodes.value[1].location.index]; |  | ||||||
| //     } else { |  | ||||||
| //       data.nameGeoJson = jsonData.value[nodes.value[1].location.index]; |  | ||||||
| //       data.locationGeoJson = jsonData.value[nodes.value[0].location.index]; |  | ||||||
| //     } |  | ||||||
| //     await addProjectSquare(data); |  | ||||||
| //     await proxy?.$modal.msgSuccess('添加成功'); |  | ||||||
| //   } |  | ||||||
| //   loading.value = false; |  | ||||||
| // }; |  | ||||||
| /** 搜索按钮操作 */ | /** 搜索按钮操作 */ | ||||||
| const handleQuery = () => { | const handleQuery = () => { | ||||||
|   queryParams.value.pageNum = 1; |   queryParams.value.pageNum = 1; | ||||||
| @ -643,6 +618,24 @@ const submitForm = () => { | |||||||
|   }); |   }); | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | /** 上传文件 */ | ||||||
|  | const handleUpload = async (row?: ProjectVO) => { | ||||||
|  |   fileForm.value.id = row.id; | ||||||
|  |   fileForm.value.tenderFiles = row.tenderFiles; | ||||||
|  |  | ||||||
|  |   fileVisble.value = true; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | const uploadSubmit = async () => { | ||||||
|  |   if (!fileForm.value.tenderFiles) return proxy.$modal.msgError('请上传文件'); | ||||||
|  |   let res = await uploadProjectFile(fileForm.value); | ||||||
|  |   if (res.code == 200) { | ||||||
|  |     proxy.$modal.msgSuccess('上传成功'); | ||||||
|  |     fileVisble.value = false; | ||||||
|  |     await getList(); | ||||||
|  |   } | ||||||
|  | }; | ||||||
|  |  | ||||||
| /** 删除按钮操作 */ | /** 删除按钮操作 */ | ||||||
| const handleDelete = async (row?: ProjectVO) => { | const handleDelete = async (row?: ProjectVO) => { | ||||||
|   const _ids = row?.id || ids.value; |   const _ids = row?.id || ids.value; | ||||||
|  | |||||||
							
								
								
									
										285
									
								
								src/views/tender/plan/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										285
									
								
								src/views/tender/plan/index.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,285 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="p-2"> | ||||||
|  |     <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> | ||||||
|  |       <div v-show="showSearch" class="mb-[10px]"> | ||||||
|  |         <el-card shadow="hover"> | ||||||
|  |           <el-form ref="queryFormRef" :model="queryParams" :inline="true"> | ||||||
|  |             <el-form-item label="分包名称" prop="subpackageName"> | ||||||
|  |               <el-input v-model="queryParams.subpackageName" placeholder="请输入分包名称" clearable @keyup.enter="handleQuery" /> | ||||||
|  |             </el-form-item> | ||||||
|  |             <el-form-item label="分包内容" prop="subpackageContext"> | ||||||
|  |               <el-input v-model="queryParams.subpackageContext" placeholder="请输入分包内容" clearable @keyup.enter="handleQuery" /> | ||||||
|  |             </el-form-item> | ||||||
|  |             <el-form-item label="限价" prop="limitPrice"> | ||||||
|  |               <el-input v-model="queryParams.limitPrice" placeholder="请输入限价" clearable @keyup.enter="handleQuery" /> | ||||||
|  |             </el-form-item> | ||||||
|  |             <el-form-item label="计划招标时间" prop="planTenderTime"> | ||||||
|  |               <el-date-picker clearable | ||||||
|  |                 v-model="queryParams.planTenderTime" | ||||||
|  |                 type="date" | ||||||
|  |                 value-format="YYYY-MM-DD" | ||||||
|  |                 placeholder="请选择计划招标时间" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |             <el-form-item label="招标方式" prop="tenderMethod"> | ||||||
|  |               <el-input v-model="queryParams.tenderMethod" placeholder="请输入招标方式" clearable @keyup.enter="handleQuery" /> | ||||||
|  |             </el-form-item> | ||||||
|  |             <el-form-item label="合同额" prop="contract"> | ||||||
|  |               <el-input v-model="queryParams.contract" placeholder="请输入合同额" clearable @keyup.enter="handleQuery" /> | ||||||
|  |             </el-form-item> | ||||||
|  |             <el-form-item> | ||||||
|  |               <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> | ||||||
|  |               <el-button icon="Refresh" @click="resetQuery">重置</el-button> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-form> | ||||||
|  |         </el-card> | ||||||
|  |       </div> | ||||||
|  |     </transition> | ||||||
|  |  | ||||||
|  |     <el-card shadow="never"> | ||||||
|  |       <template #header> | ||||||
|  |         <el-row :gutter="10" class="mb8"> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['plan:plan:add']">新增</el-button> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['plan:plan:edit']">修改</el-button> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['plan:plan:remove']">删除</el-button> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['plan:plan:export']">导出</el-button> | ||||||
|  |           </el-col> | ||||||
|  |           <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> | ||||||
|  |         </el-row> | ||||||
|  |       </template> | ||||||
|  |  | ||||||
|  |       <el-table v-loading="loading" :data="planList" @selection-change="handleSelectionChange"> | ||||||
|  |         <el-table-column type="selection" width="55" align="center" /> | ||||||
|  |         <el-table-column label="招标计划ID" align="center" prop="id" v-if="true" /> | ||||||
|  |         <el-table-column label="分包类型" align="center" prop="subpackageType" /> | ||||||
|  |         <el-table-column label="分包名称" align="center" prop="subpackageName" /> | ||||||
|  |         <el-table-column label="分包内容" align="center" prop="subpackageContext" /> | ||||||
|  |         <el-table-column label="限价" align="center" prop="limitPrice" /> | ||||||
|  |         <el-table-column label="计划招标时间" align="center" prop="planTenderTime" width="180"> | ||||||
|  |           <template #default="scope"> | ||||||
|  |             <span>{{ parseTime(scope.row.planTenderTime, '{y}-{m}-{d}') }}</span> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|  |         <el-table-column label="招标方式" align="center" prop="tenderMethod" /> | ||||||
|  |         <el-table-column label="招标文件(多个)" align="center" prop="tenderFile" /> | ||||||
|  |         <el-table-column label="中标文件(单个)" align="center" prop="bidFile" /> | ||||||
|  |         <el-table-column label="合同额" align="center" prop="contract" /> | ||||||
|  |         <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||||||
|  |           <template #default="scope"> | ||||||
|  |             <el-tooltip content="修改" placement="top"> | ||||||
|  |               <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['plan:plan:edit']"></el-button> | ||||||
|  |             </el-tooltip> | ||||||
|  |             <el-tooltip content="删除" placement="top"> | ||||||
|  |               <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['plan:plan:remove']"></el-button> | ||||||
|  |             </el-tooltip> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|  |       </el-table> | ||||||
|  |  | ||||||
|  |       <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" /> | ||||||
|  |     </el-card> | ||||||
|  |     <!-- 添加或修改招标计划对话框 --> | ||||||
|  |     <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body> | ||||||
|  |       <el-form ref="planFormRef" :model="form" :rules="rules" label-width="80px"> | ||||||
|  |         <el-form-item label="分包名称" prop="subpackageName"> | ||||||
|  |           <el-input v-model="form.subpackageName" placeholder="请输入分包名称" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="分包内容" prop="subpackageContext"> | ||||||
|  |           <el-input v-model="form.subpackageContext" placeholder="请输入分包内容" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="限价" prop="limitPrice"> | ||||||
|  |           <el-input v-model="form.limitPrice" placeholder="请输入限价" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="计划招标时间" prop="planTenderTime"> | ||||||
|  |           <el-date-picker clearable | ||||||
|  |             v-model="form.planTenderTime" | ||||||
|  |             type="datetime" | ||||||
|  |             value-format="YYYY-MM-DD HH:mm:ss" | ||||||
|  |             placeholder="请选择计划招标时间"> | ||||||
|  |           </el-date-picker> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="招标方式" prop="tenderMethod"> | ||||||
|  |           <el-input v-model="form.tenderMethod" placeholder="请输入招标方式" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="招标文件(多个)" prop="tenderFile"> | ||||||
|  |           <file-upload v-model="form.tenderFile"/> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="中标文件(单个)" prop="bidFile"> | ||||||
|  |           <file-upload v-model="form.bidFile"/> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="合同额" prop="contract"> | ||||||
|  |           <el-input v-model="form.contract" placeholder="请输入合同额" /> | ||||||
|  |         </el-form-item> | ||||||
|  |       </el-form> | ||||||
|  |       <template #footer> | ||||||
|  |         <div class="dialog-footer"> | ||||||
|  |           <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> | ||||||
|  |           <el-button @click="cancel">取 消</el-button> | ||||||
|  |         </div> | ||||||
|  |       </template> | ||||||
|  |     </el-dialog> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script setup name="Plan" lang="ts"> | ||||||
|  | import { listPlan, getPlan, delPlan, addPlan, updatePlan } from '@/api/plan/plan'; | ||||||
|  | import { PlanVO, PlanQuery, PlanForm } from '@/api/plan/plan/types'; | ||||||
|  |  | ||||||
|  | const { proxy } = getCurrentInstance() as ComponentInternalInstance; | ||||||
|  |  | ||||||
|  | const planList = ref<PlanVO[]>([]); | ||||||
|  | const buttonLoading = ref(false); | ||||||
|  | const loading = ref(true); | ||||||
|  | const showSearch = ref(true); | ||||||
|  | const ids = ref<Array<string | number>>([]); | ||||||
|  | const single = ref(true); | ||||||
|  | const multiple = ref(true); | ||||||
|  | const total = ref(0); | ||||||
|  |  | ||||||
|  | const queryFormRef = ref<ElFormInstance>(); | ||||||
|  | const planFormRef = ref<ElFormInstance>(); | ||||||
|  |  | ||||||
|  | const dialog = reactive<DialogOption>({ | ||||||
|  |   visible: false, | ||||||
|  |   title: '' | ||||||
|  | }); | ||||||
|  |  | ||||||
|  | const initFormData: PlanForm = { | ||||||
|  |   id: undefined, | ||||||
|  |   subpackageType: undefined, | ||||||
|  |   subpackageName: undefined, | ||||||
|  |   subpackageContext: undefined, | ||||||
|  |   limitPrice: undefined, | ||||||
|  |   planTenderTime: undefined, | ||||||
|  |   tenderMethod: undefined, | ||||||
|  |   tenderFile: undefined, | ||||||
|  |   bidFile: undefined, | ||||||
|  |   contract: undefined, | ||||||
|  | } | ||||||
|  | const data = reactive<PageData<PlanForm, PlanQuery>>({ | ||||||
|  |   form: {...initFormData}, | ||||||
|  |   queryParams: { | ||||||
|  |     pageNum: 1, | ||||||
|  |     pageSize: 10, | ||||||
|  |     subpackageType: undefined, | ||||||
|  |     subpackageName: undefined, | ||||||
|  |     subpackageContext: undefined, | ||||||
|  |     limitPrice: undefined, | ||||||
|  |     planTenderTime: undefined, | ||||||
|  |     tenderMethod: undefined, | ||||||
|  |     tenderFile: undefined, | ||||||
|  |     bidFile: undefined, | ||||||
|  |     contract: undefined, | ||||||
|  |     params: { | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   rules: { | ||||||
|  |     id: [ | ||||||
|  |       { required: true, message: "招标计划ID不能为空", trigger: "blur" } | ||||||
|  |     ], | ||||||
|  |   } | ||||||
|  | }); | ||||||
|  |  | ||||||
|  | const { queryParams, form, rules } = toRefs(data); | ||||||
|  |  | ||||||
|  | /** 查询招标计划列表 */ | ||||||
|  | const getList = async () => { | ||||||
|  |   loading.value = true; | ||||||
|  |   const res = await listPlan(queryParams.value); | ||||||
|  |   planList.value = res.rows; | ||||||
|  |   total.value = res.total; | ||||||
|  |   loading.value = false; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 取消按钮 */ | ||||||
|  | const cancel = () => { | ||||||
|  |   reset(); | ||||||
|  |   dialog.visible = false; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 表单重置 */ | ||||||
|  | const reset = () => { | ||||||
|  |   form.value = {...initFormData}; | ||||||
|  |   planFormRef.value?.resetFields(); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 搜索按钮操作 */ | ||||||
|  | const handleQuery = () => { | ||||||
|  |   queryParams.value.pageNum = 1; | ||||||
|  |   getList(); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 重置按钮操作 */ | ||||||
|  | const resetQuery = () => { | ||||||
|  |   queryFormRef.value?.resetFields(); | ||||||
|  |   handleQuery(); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 多选框选中数据 */ | ||||||
|  | const handleSelectionChange = (selection: PlanVO[]) => { | ||||||
|  |   ids.value = selection.map(item => item.id); | ||||||
|  |   single.value = selection.length != 1; | ||||||
|  |   multiple.value = !selection.length; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 新增按钮操作 */ | ||||||
|  | const handleAdd = () => { | ||||||
|  |   reset(); | ||||||
|  |   dialog.visible = true; | ||||||
|  |   dialog.title = "添加招标计划"; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 修改按钮操作 */ | ||||||
|  | const handleUpdate = async (row?: PlanVO) => { | ||||||
|  |   reset(); | ||||||
|  |   const _id = row?.id || ids.value[0] | ||||||
|  |   const res = await getPlan(_id); | ||||||
|  |   Object.assign(form.value, res.data); | ||||||
|  |   dialog.visible = true; | ||||||
|  |   dialog.title = "修改招标计划"; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 提交按钮 */ | ||||||
|  | const submitForm = () => { | ||||||
|  |   planFormRef.value?.validate(async (valid: boolean) => { | ||||||
|  |     if (valid) { | ||||||
|  |       buttonLoading.value = true; | ||||||
|  |       if (form.value.id) { | ||||||
|  |         await updatePlan(form.value).finally(() =>  buttonLoading.value = false); | ||||||
|  |       } else { | ||||||
|  |         await addPlan(form.value).finally(() =>  buttonLoading.value = false); | ||||||
|  |       } | ||||||
|  |       proxy?.$modal.msgSuccess("操作成功"); | ||||||
|  |       dialog.visible = false; | ||||||
|  |       await getList(); | ||||||
|  |     } | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 删除按钮操作 */ | ||||||
|  | const handleDelete = async (row?: PlanVO) => { | ||||||
|  |   const _ids = row?.id || ids.value; | ||||||
|  |   await proxy?.$modal.confirm('是否确认删除招标计划编号为"' + _ids + '"的数据项?').finally(() => loading.value = false); | ||||||
|  |   await delPlan(_ids); | ||||||
|  |   proxy?.$modal.msgSuccess("删除成功"); | ||||||
|  |   await getList(); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 导出按钮操作 */ | ||||||
|  | const handleExport = () => { | ||||||
|  |   proxy?.download('plan/plan/export', { | ||||||
|  |     ...queryParams.value | ||||||
|  |   }, `plan_${new Date().getTime()}.xlsx`) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | onMounted(() => { | ||||||
|  |   getList(); | ||||||
|  | }); | ||||||
|  | </script> | ||||||
							
								
								
									
										368
									
								
								src/views/tender/supplierInput/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										368
									
								
								src/views/tender/supplierInput/index.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,368 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="p-2"> | ||||||
|  |     <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> | ||||||
|  |       <div v-show="showSearch" class="mb-[10px]"> | ||||||
|  |         <el-card shadow="hover"> | ||||||
|  |           <el-form ref="queryFormRef" :model="queryParams" :inline="true"> | ||||||
|  |             <el-form-item> | ||||||
|  |               <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> | ||||||
|  |               <el-button icon="Refresh" @click="resetQuery">重置</el-button> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-form> | ||||||
|  |         </el-card> | ||||||
|  |       </div> | ||||||
|  |     </transition> | ||||||
|  |  | ||||||
|  |     <el-card shadow="never"> | ||||||
|  |       <template #header> | ||||||
|  |         <el-row :gutter="10" class="mb8"> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['supplierInput:supplierInput:add']">新增</el-button> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['supplierInput:supplierInput:edit']" | ||||||
|  |               >修改</el-button | ||||||
|  |             > | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button | ||||||
|  |               type="danger" | ||||||
|  |               plain | ||||||
|  |               icon="Delete" | ||||||
|  |               :disabled="multiple" | ||||||
|  |               @click="handleDelete()" | ||||||
|  |               v-hasPermi="['supplierInput:supplierInput:remove']" | ||||||
|  |               >删除</el-button | ||||||
|  |             > | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['supplierInput:supplierInput:export']">导出</el-button> | ||||||
|  |           </el-col> | ||||||
|  |           <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> | ||||||
|  |         </el-row> | ||||||
|  |       </template> | ||||||
|  |  | ||||||
|  |       <el-table v-loading="loading" :data="supplierInputList" @selection-change="handleSelectionChange"> | ||||||
|  |         <el-table-column type="selection" width="55" align="center" /> | ||||||
|  |         <el-table-column label="" align="center" prop="id" v-if="true" /> | ||||||
|  |         <el-table-column label="供应商类型" align="center" prop="supplierType" /> | ||||||
|  |         <el-table-column label="入库资料" align="center" prop="inputFile" /> | ||||||
|  |         <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||||||
|  |           <template #default="scope"> | ||||||
|  |             <el-tooltip content="修改" placement="top"> | ||||||
|  |               <el-button | ||||||
|  |                 link | ||||||
|  |                 type="primary" | ||||||
|  |                 icon="Edit" | ||||||
|  |                 @click="handleUpdate(scope.row)" | ||||||
|  |                 v-hasPermi="['supplierInput:supplierInput:edit']" | ||||||
|  |               ></el-button> | ||||||
|  |             </el-tooltip> | ||||||
|  |             <el-tooltip content="删除" placement="top"> | ||||||
|  |               <el-button | ||||||
|  |                 link | ||||||
|  |                 type="primary" | ||||||
|  |                 icon="Delete" | ||||||
|  |                 @click="handleDelete(scope.row)" | ||||||
|  |                 v-hasPermi="['supplierInput:supplierInput:remove']" | ||||||
|  |               ></el-button> | ||||||
|  |             </el-tooltip> | ||||||
|  |           </template> | ||||||
|  |         </el-table-column> | ||||||
|  |       </el-table> | ||||||
|  |  | ||||||
|  |       <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" /> | ||||||
|  |     </el-card> | ||||||
|  |     <!-- 添加或修改供应商入库对话框 --> | ||||||
|  |     <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body> | ||||||
|  |       <el-form ref="supplierInputFormRef" :model="form" :rules="rules" label-width="100px"> | ||||||
|  |         <!-- 新增的供应商类型下拉框 --> | ||||||
|  |         <el-form-item label="供应商类型" prop="supplierType"> | ||||||
|  |           <el-select v-model="form.supplierType" placeholder="请选择供应商类型"> | ||||||
|  |             <el-option label="劳务" value="劳务"></el-option> | ||||||
|  |             <el-option label="技术服务" value="技术服务"></el-option> | ||||||
|  |             <el-option label="物资设备" value="物资设备"></el-option> | ||||||
|  |           </el-select> | ||||||
|  |         </el-form-item> | ||||||
|  |  | ||||||
|  |         <el-form-item label="入库资料" prop="inputFile" l> | ||||||
|  |           <file-upload | ||||||
|  |             v-model="form.inputFile" | ||||||
|  |             :fileType="['doc', 'docx', 'pdf']" | ||||||
|  |             :autoUpload="false" | ||||||
|  |             ref="fileUploadRef" | ||||||
|  |             :method="form.id ? 'put' : 'post'" | ||||||
|  |             :data="{ supplierType: form.supplierType }" | ||||||
|  |             uploadUrl="/supplierInput/supplierInput" | ||||||
|  |             :limit="1" | ||||||
|  |             :onUploadSuccess="handleUploadSuccess" | ||||||
|  |             @handleChange="change" | ||||||
|  |             showFileList | ||||||
|  |           > | ||||||
|  |             <div> | ||||||
|  |               <el-button type="primary">上传文件</el-button><br /> | ||||||
|  |               <transition-group | ||||||
|  |                 class="upload-file-list el-upload-list el-upload-list--text" | ||||||
|  |                 name="el-fade-in-linear" | ||||||
|  |                 tag="ul" | ||||||
|  |                 @click.stop | ||||||
|  |                 v-if="fileUrl" | ||||||
|  |               > | ||||||
|  |                 <li style="margin-top: 10px" class="el-upload-list__item ele-upload-list__item-content"> | ||||||
|  |                   <el-link :href="`${fileUrl}`" :underline="false" target="_blank"> | ||||||
|  |                     <el-button class="el-icon-document"> 下载文件 </el-button> | ||||||
|  |                   </el-link> | ||||||
|  |                 </li> | ||||||
|  |               </transition-group> | ||||||
|  |             </div> | ||||||
|  |           </file-upload> | ||||||
|  |         </el-form-item> | ||||||
|  |       </el-form> | ||||||
|  |       <template #footer> | ||||||
|  |         <div class="dialog-footer"> | ||||||
|  |           <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> | ||||||
|  |           <el-button @click="cancel">取 消</el-button> | ||||||
|  |         </div> | ||||||
|  |       </template> | ||||||
|  |     </el-dialog> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script setup name="SupplierInput" lang="ts"> | ||||||
|  | import { listSupplierInput, getSupplierInput, delSupplierInput, addSupplierInput, updateSupplierInput } from '@/api/supplierInput/supplierInput'; | ||||||
|  | import { SupplierInputVO, SupplierInputQuery, SupplierInputForm } from '@/api/supplierInput/supplierInput/types'; | ||||||
|  |  | ||||||
|  | const { proxy } = getCurrentInstance() as ComponentInternalInstance; | ||||||
|  | const fileUploadRef = ref(null); | ||||||
|  | const supplierInputList = ref<SupplierInputVO[]>([]); | ||||||
|  | const buttonLoading = ref(false); | ||||||
|  | const loading = ref(true); | ||||||
|  | const showSearch = ref(true); | ||||||
|  | const ids = ref<Array<string | number>>([]); | ||||||
|  | const single = ref(true); | ||||||
|  | const multiple = ref(true); | ||||||
|  | const total = ref(0); | ||||||
|  |  | ||||||
|  | const queryFormRef = ref<ElFormInstance>(); | ||||||
|  | const supplierInputFormRef = ref<ElFormInstance>(); | ||||||
|  | const fileUrl = ref(''); | ||||||
|  | const dialog = reactive<DialogOption>({ | ||||||
|  |   visible: false, | ||||||
|  |   title: '' | ||||||
|  | }); | ||||||
|  |  | ||||||
|  | const initFormData: SupplierInputForm = { | ||||||
|  |   id: undefined, | ||||||
|  |   supplierType: undefined, | ||||||
|  |   inputFile: undefined | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | const data = reactive<PageData<SupplierInputForm, SupplierInputQuery>>({ | ||||||
|  |   form: { ...initFormData }, | ||||||
|  |   queryParams: { | ||||||
|  |     pageNum: 1, | ||||||
|  |     pageSize: 10, | ||||||
|  |     supplierType: undefined, | ||||||
|  |     inputFile: undefined, | ||||||
|  |     params: {} | ||||||
|  |   }, | ||||||
|  |   rules: { | ||||||
|  |     // 添加供应商类型的验证规则 | ||||||
|  |     supplierType: [{ required: true, message: '请选择供应商类型', trigger: 'change' }], | ||||||
|  |     id: [{ required: true, message: '不能为空', trigger: 'blur' }] | ||||||
|  |   } | ||||||
|  | }); | ||||||
|  |  | ||||||
|  | const { queryParams, form, rules } = toRefs(data); | ||||||
|  |  | ||||||
|  | /** 查询供应商入库列表 */ | ||||||
|  | const getList = async () => { | ||||||
|  |   loading.value = true; | ||||||
|  |   const res = await listSupplierInput(queryParams.value); | ||||||
|  |   supplierInputList.value = res.rows; | ||||||
|  |   total.value = res.total; | ||||||
|  |   loading.value = false; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 取消按钮 */ | ||||||
|  | const cancel = () => { | ||||||
|  |   reset(); | ||||||
|  |   dialog.visible = false; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 表单重置 */ | ||||||
|  | const reset = () => { | ||||||
|  |   form.value = { ...initFormData }; | ||||||
|  |   fileUrl.value = ''; | ||||||
|  |   supplierInputFormRef.value?.resetFields(); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 搜索按钮操作 */ | ||||||
|  | const handleQuery = () => { | ||||||
|  |   queryParams.value.pageNum = 1; | ||||||
|  |   getList(); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 重置按钮操作 */ | ||||||
|  | const resetQuery = () => { | ||||||
|  |   queryFormRef.value?.resetFields(); | ||||||
|  |   handleQuery(); | ||||||
|  | }; | ||||||
|  | const handleUploadSuccess = () => { | ||||||
|  |   proxy?.$modal.msgSuccess('操作成功'); | ||||||
|  |   dialog.visible = false; | ||||||
|  |   buttonLoading.value = false; | ||||||
|  |   getList(); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | const change = (fileList) => { | ||||||
|  |   fileUrl.value = ''; | ||||||
|  | }; | ||||||
|  | /** 多选框选中数据 */ | ||||||
|  | const handleSelectionChange = (selection: SupplierInputVO[]) => { | ||||||
|  |   ids.value = selection.map((item) => item.id); | ||||||
|  |   single.value = selection.length != 1; | ||||||
|  |   multiple.value = !selection.length; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 新增按钮操作 */ | ||||||
|  | const handleAdd = () => { | ||||||
|  |   reset(); | ||||||
|  |   dialog.visible = true; | ||||||
|  |   dialog.title = '添加供应商入库'; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 修改按钮操作 */ | ||||||
|  | const handleUpdate = async (row?: SupplierInputVO) => { | ||||||
|  |   reset(); | ||||||
|  |   const _id = row?.id || ids.value[0]; | ||||||
|  |   const res = await getSupplierInput(_id); | ||||||
|  |   // Object.assign(form.value, res.data); | ||||||
|  |   form.value = { | ||||||
|  |     ...form.value, | ||||||
|  |     ...res.data, | ||||||
|  |     inputFile: '' | ||||||
|  |   }; | ||||||
|  |   fileUrl.value = res.data.inputFile; | ||||||
|  |   dialog.visible = true; | ||||||
|  |   dialog.title = '修改供应商入库'; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 提交按钮 */ | ||||||
|  | const submitForm = () => { | ||||||
|  |   supplierInputFormRef.value?.validate(async (valid: boolean) => { | ||||||
|  |     if (valid) { | ||||||
|  |       buttonLoading.value = true; | ||||||
|  |       fileUploadRef.value.submitUpload().then(() => { | ||||||
|  |         proxy?.$modal.msgSuccess('操作成功'); | ||||||
|  |         dialog.visible = false; | ||||||
|  |         getList(); | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 删除按钮操作 */ | ||||||
|  | const handleDelete = async (row?: SupplierInputVO) => { | ||||||
|  |   const _ids = row?.id || ids.value; | ||||||
|  |   await proxy?.$modal.confirm('是否确认删除供应商入库编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false)); | ||||||
|  |   await delSupplierInput(_ids); | ||||||
|  |   proxy?.$modal.msgSuccess('删除成功'); | ||||||
|  |   await getList(); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 导出按钮操作 */ | ||||||
|  | const handleExport = () => { | ||||||
|  |   proxy?.download( | ||||||
|  |     'supplierInput/supplierInput/export', | ||||||
|  |     { | ||||||
|  |       ...queryParams.value | ||||||
|  |     }, | ||||||
|  |     `supplierInput_${new Date().getTime()}.xlsx` | ||||||
|  |   ); | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | onMounted(() => { | ||||||
|  |   getList(); | ||||||
|  | }); | ||||||
|  | </script> | ||||||
|  | <style scoped lang="scss"> | ||||||
|  | .pdf { | ||||||
|  |   display: flex; | ||||||
|  |   justify-content: center; | ||||||
|  |   align-items: center; | ||||||
|  |   flex-direction: column; | ||||||
|  |   border-radius: 6px; | ||||||
|  |   position: relative; | ||||||
|  |   width: 100%; | ||||||
|  |   img { | ||||||
|  |     width: 40%; | ||||||
|  |   } | ||||||
|  |   &:hover { | ||||||
|  |     .Shadow { | ||||||
|  |       opacity: 1; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |   > span { | ||||||
|  |     width: 100%; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .upload-file-list { | ||||||
|  |   margin: 0; | ||||||
|  |   .el-upload-list__item { | ||||||
|  |     border: 1px solid #e4e7ed; | ||||||
|  |     line-height: 2; | ||||||
|  |     margin-bottom: 0; | ||||||
|  |     position: relative; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .upload-file-list .ele-upload-list__item-content { | ||||||
|  |   display: flex; | ||||||
|  |   justify-content: space-between; | ||||||
|  |   align-items: center; | ||||||
|  |   color: inherit; | ||||||
|  | } | ||||||
|  | .Shadow { | ||||||
|  |   align-items: center; | ||||||
|  |   background-color: rgba(0, 0, 0, 0.5); | ||||||
|  |   color: #fff; | ||||||
|  |   cursor: default; | ||||||
|  |   display: inline-flex; | ||||||
|  |   font-size: 20px; | ||||||
|  |   height: 100%; | ||||||
|  |   justify-content: center; | ||||||
|  |   left: 0; | ||||||
|  |   opacity: 0; | ||||||
|  |   position: absolute; | ||||||
|  |   top: 0; | ||||||
|  |   transition: opacity 0.3s; | ||||||
|  |   width: 100%; | ||||||
|  |   z-index: 1; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .ele-upload-list__item-content-action .el-link { | ||||||
|  |   margin-right: 10px; | ||||||
|  | } | ||||||
|  | .el-icon.avatar-uploader-icon { | ||||||
|  |   border: 1px dashed #cdd0d6; | ||||||
|  |   border-radius: 6px; | ||||||
|  |   cursor: pointer; | ||||||
|  |   position: relative; | ||||||
|  |   overflow: hidden; | ||||||
|  |   transition: 0.3s; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .el-icon.avatar-uploader-icon:hover { | ||||||
|  |   border-color: #409eff; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .el-icon.avatar-uploader-icon { | ||||||
|  |   font-size: 28px; | ||||||
|  |   color: #8c939d; | ||||||
|  |   width: 200px; | ||||||
|  |   height: 178px; | ||||||
|  |   text-align: center; | ||||||
|  | } | ||||||
|  | </style> | ||||||
		Reference in New Issue
	
	Block a user