From 24278cc3d9fc482e21be6c3255771b43a99d1df0 Mon Sep 17 00:00:00 2001 From: kun <1422840143@qq.com> Date: Tue, 5 Sep 2023 18:42:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=9B=91=E7=90=86=E6=9C=88=E6=8A=A5?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=96=B0=E5=A2=9E=E4=BB=A5=E5=8F=8ABUG?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- .env.production | 2 +- src/api/modules/enterpriseApi.ts | 6 + src/api/modules/project.ts | 6 + .../components/detailsDialog.vue | 26 +- .../components/transformInfo.vue | 1 + .../components/transformInfo.vue | 1 + .../components/transformInfo.vue | 1 + .../components/detailsDialog.vue | 2 +- .../components/orderAdd.vue | 1 + .../components/transformInfo.vue | 1 + .../safetySupervision/components/orderAdd.vue | 1 + .../components/transformInfo.vue | 1 + .../components/detailsDialog.vue | 26 +- .../components/transformInfo.vue | 1 + .../monthlyReport/components/monthlyAdd.vue | 699 ++++++++++++++++++ .../{add.vue => monthlyDetails.vue} | 168 +++-- src/views/project/monthlyReport/index.vue | 18 +- .../components/transformInfo.vue | 1 + .../components/transformInfo.vue | 1 + 20 files changed, 881 insertions(+), 86 deletions(-) create mode 100644 src/views/project/monthlyReport/components/monthlyAdd.vue rename src/views/project/monthlyReport/components/{add.vue => monthlyDetails.vue} (75%) diff --git a/.env.development b/.env.development index ffefc80..bd41f8a 100644 --- a/.env.development +++ b/.env.development @@ -2,9 +2,9 @@ NODE_ENV = 'development' # 本地环境接口地址(/api/index.ts文件中使用) -# VITE_API_URL = 'http://192.168.34.155:6688' +VITE_API_URL = 'http://192.168.34.155:6688' VITE_WPAPI_URL = "http://182.90.224.147:8081" -VITE_API_URL = "http://182.90.224.147:6688" +# VITE_API_URL = "http://182.90.224.147:6688" # 上传 # VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url=' diff --git a/.env.production b/.env.production index b18cc33..ec45824 100644 --- a/.env.production +++ b/.env.production @@ -3,7 +3,7 @@ NODE_ENV = "production" # 线上环境接口地址(easymock) # VITE_API_URL = "http://139.9.66.234:6688" -VITE_API_URL = "http://182.90.224.147:6688" +VITE_API_URL = "http://182.90.224.147:6677" # VITE_API_URL = "http://182.90.224.147:9012" VITE_WPAPI_URL = "http://182.90.224.147:8081" # VITE_API_URL = "http://101.43.164.214:6688" diff --git a/src/api/modules/enterpriseApi.ts b/src/api/modules/enterpriseApi.ts index 93a31cd..fdd37af 100644 --- a/src/api/modules/enterpriseApi.ts +++ b/src/api/modules/enterpriseApi.ts @@ -660,3 +660,9 @@ export const hoistEquipInstallApplyFile = (params: any) => { export const hoistEquipApplyUse = (params: any) => { return http.post(BASEURL + `/ent/liftingDevice/useApply`, params); }; + +// 监理月报 +// 提交月报 +export const submitMonthlyReport = (params: any) => { + return http.post(BASEURL + `/ent/monthlyReport/add`, params); +}; diff --git a/src/api/modules/project.ts b/src/api/modules/project.ts index 071938c..1dc1202 100644 --- a/src/api/modules/project.ts +++ b/src/api/modules/project.ts @@ -685,3 +685,9 @@ export const hoistEquipApplyFile = (params: any) => { export const hoistEquipInstallApplyFile = (params: any) => { return http.post(BASEURL + `/project/liftingDeviceUse/queryAnnexFile`, params); }; + +// 监理月报 +// 提交月报 +export const submitMonthlyReport = (params: any) => { + return http.post(BASEURL + `/project/monthlyReport/add`, params); +}; diff --git a/src/views/enterprise/engineeringAcceptance/acceptanceApply/components/detailsDialog.vue b/src/views/enterprise/engineeringAcceptance/acceptanceApply/components/detailsDialog.vue index 842b2d6..49bd1a3 100644 --- a/src/views/enterprise/engineeringAcceptance/acceptanceApply/components/detailsDialog.vue +++ b/src/views/enterprise/engineeringAcceptance/acceptanceApply/components/detailsDialog.vue @@ -60,7 +60,7 @@ { if (row.fileList.length > 0) { let arr: any = []; row.fileList.map(item => { + if (item.response) { + arr.push({ + response: { ...item.response, url: item.response.fileUrl }, + name: item.response.fileName, + url: item.response.fileUrl, + size: +item.response.fileSize, + type: item.response.contentType + }); + } else { + arr.push({ + response: { ...item, url: item.fileUrl }, + name: item.fileName, + url: item.fileUrl, + size: +item.fileSize, + type: item.contentType + }); + } delete item.response; - arr.push({ - response: { ...item, url: item.fileUrl }, - name: item.fileName, - url: item.fileUrl, - size: +item.fileSize, - type: item.contentType - }); }); current.value.files = arr; console.log(current.value.files); diff --git a/src/views/enterprise/engineeringAcceptance/acceptanceApply/components/transformInfo.vue b/src/views/enterprise/engineeringAcceptance/acceptanceApply/components/transformInfo.vue index e1ce118..faa2d51 100644 --- a/src/views/enterprise/engineeringAcceptance/acceptanceApply/components/transformInfo.vue +++ b/src/views/enterprise/engineeringAcceptance/acceptanceApply/components/transformInfo.vue @@ -493,6 +493,7 @@ onMounted(() => {}); box-shadow: 0px 4px 8px 0px rgba(48, 62, 100, 0.2); border-radius: 8px 8px 8px 8px; padding: 15px 20px; + overflow: hidden; .content-title { @include title; margin-top: 45px; diff --git a/src/views/enterprise/qualitySupervision/components/transformInfo.vue b/src/views/enterprise/qualitySupervision/components/transformInfo.vue index 91710b1..b22d5ac 100644 --- a/src/views/enterprise/qualitySupervision/components/transformInfo.vue +++ b/src/views/enterprise/qualitySupervision/components/transformInfo.vue @@ -488,6 +488,7 @@ onMounted(() => {}); box-shadow: 0px 4px 8px 0px rgba(48, 62, 100, 0.2); border-radius: 8px 8px 8px 8px; padding: 15px 20px; + overflow: hidden; .content-title { @include title; margin-top: 45px; diff --git a/src/views/enterprise/safetySupervision/components/transformInfo.vue b/src/views/enterprise/safetySupervision/components/transformInfo.vue index 1ea1e26..1501734 100644 --- a/src/views/enterprise/safetySupervision/components/transformInfo.vue +++ b/src/views/enterprise/safetySupervision/components/transformInfo.vue @@ -489,6 +489,7 @@ onMounted(() => {}); box-shadow: 0px 4px 8px 0px rgba(48, 62, 100, 0.2); border-radius: 8px 8px 8px 8px; padding: 15px 20px; + overflow: hidden; .content-title { @include title; margin-top: 45px; diff --git a/src/views/goverment/engineeringAcceptance/acceptanceApply/components/detailsDialog.vue b/src/views/goverment/engineeringAcceptance/acceptanceApply/components/detailsDialog.vue index c29c6c6..11963ba 100644 --- a/src/views/goverment/engineeringAcceptance/acceptanceApply/components/detailsDialog.vue +++ b/src/views/goverment/engineeringAcceptance/acceptanceApply/components/detailsDialog.vue @@ -41,7 +41,7 @@ { box-shadow: 0px 4px 8px 0px rgba(48, 62, 100, 0.2); border-radius: 8px 8px 8px 8px; padding: 15px 20px; + overflow: hidden; .content-title { @include title; margin-top: 45px; diff --git a/src/views/goverment/qualitySupervision/components/transformInfo.vue b/src/views/goverment/qualitySupervision/components/transformInfo.vue index 0a35e66..185539f 100644 --- a/src/views/goverment/qualitySupervision/components/transformInfo.vue +++ b/src/views/goverment/qualitySupervision/components/transformInfo.vue @@ -459,6 +459,7 @@ onMounted(() => {}); box-shadow: 0px 4px 8px 0px rgba(48, 62, 100, 0.2); border-radius: 8px 8px 8px 8px; padding: 15px 20px; + overflow: hidden; .content-title { @include title; margin-top: 45px; diff --git a/src/views/goverment/safetySupervision/components/orderAdd.vue b/src/views/goverment/safetySupervision/components/orderAdd.vue index 04ea91e..577e252 100644 --- a/src/views/goverment/safetySupervision/components/orderAdd.vue +++ b/src/views/goverment/safetySupervision/components/orderAdd.vue @@ -1010,6 +1010,7 @@ onMounted(() => { box-shadow: 0px 4px 8px 0px rgba(48, 62, 100, 0.2); border-radius: 8px 8px 8px 8px; padding: 15px 20px; + overflow: hidden; .content-title { @include title; margin-top: 45px; diff --git a/src/views/goverment/safetySupervision/components/transformInfo.vue b/src/views/goverment/safetySupervision/components/transformInfo.vue index fac8cd2..7095b9c 100644 --- a/src/views/goverment/safetySupervision/components/transformInfo.vue +++ b/src/views/goverment/safetySupervision/components/transformInfo.vue @@ -467,6 +467,7 @@ onMounted(() => {}); box-shadow: 0px 4px 8px 0px rgba(48, 62, 100, 0.2); border-radius: 8px 8px 8px 8px; padding: 15px 20px; + overflow: hidden; .content-title { @include title; margin-top: 45px; diff --git a/src/views/project/engineeringAcceptance/acceptanceApply/components/detailsDialog.vue b/src/views/project/engineeringAcceptance/acceptanceApply/components/detailsDialog.vue index 83660a5..6f7f696 100644 --- a/src/views/project/engineeringAcceptance/acceptanceApply/components/detailsDialog.vue +++ b/src/views/project/engineeringAcceptance/acceptanceApply/components/detailsDialog.vue @@ -60,7 +60,7 @@ { if (row.fileList.length > 0) { let arr: any = []; row.fileList.map(item => { + if (item.response) { + arr.push({ + response: { ...item.response, url: item.response.fileUrl }, + name: item.response.fileName, + url: item.response.fileUrl, + size: +item.response.fileSize, + type: item.response.contentType + }); + } else { + arr.push({ + response: { ...item, url: item.fileUrl }, + name: item.fileName, + url: item.fileUrl, + size: +item.fileSize, + type: item.contentType + }); + } delete item.response; - arr.push({ - response: { ...item, url: item.fileUrl }, - name: item.fileName, - url: item.fileUrl, - size: +item.fileSize, - type: item.contentType - }); }); current.value.files = arr; console.log(current.value.files); diff --git a/src/views/project/engineeringAcceptance/acceptanceApply/components/transformInfo.vue b/src/views/project/engineeringAcceptance/acceptanceApply/components/transformInfo.vue index 5d55fc9..0e08096 100644 --- a/src/views/project/engineeringAcceptance/acceptanceApply/components/transformInfo.vue +++ b/src/views/project/engineeringAcceptance/acceptanceApply/components/transformInfo.vue @@ -488,6 +488,7 @@ onMounted(() => {}); box-shadow: 0px 4px 8px 0px rgba(48, 62, 100, 0.2); border-radius: 8px 8px 8px 8px; padding: 15px 20px; + overflow: hidden; .content-title { @include title; margin-top: 45px; diff --git a/src/views/project/monthlyReport/components/monthlyAdd.vue b/src/views/project/monthlyReport/components/monthlyAdd.vue new file mode 100644 index 0000000..d9adc62 --- /dev/null +++ b/src/views/project/monthlyReport/components/monthlyAdd.vue @@ -0,0 +1,699 @@ + + + + + diff --git a/src/views/project/monthlyReport/components/add.vue b/src/views/project/monthlyReport/components/monthlyDetails.vue similarity index 75% rename from src/views/project/monthlyReport/components/add.vue rename to src/views/project/monthlyReport/components/monthlyDetails.vue index a674bf4..8d0e416 100644 --- a/src/views/project/monthlyReport/components/add.vue +++ b/src/views/project/monthlyReport/components/monthlyDetails.vue @@ -3,22 +3,18 @@ -
+
天地一号御花园工程项目
建设监理工作月报
- + {{ formData.stage }}1
天眼监理工程有限公司项目监理部(章)
@@ -39,7 +35,7 @@
项目监理部总监理工程师签认意见:
- + {{ formData.signOpinion }}
总监理工程师: @@ -67,13 +63,13 @@
实际完成
- + {{ formData.actualCompletion }}
原因分析
- + {{ formData.reasonAnalysis }}
@@ -84,51 +80,51 @@
专题报告例会纪要
- + {{ formData.meetingSummary }}
内容简要
- + {{ formData.meetingContentBriefly }}
工程质量签证
- + {{ formData.engineeringQualityVisa }}
内容简要
- + {{ formData.engineeringContentBriefly }}
向施工单位发出的通知、指示、指令
- + {{ formData.instructions }}
内容简要
- + {{ formData.instructionsContentBriefly }}
施工单位提出的各种报告
- + {{ formData.presentation }}
内容简要
- + {{ formData.presentationContentBriefly }}
工程付款签证
- + {{ formData.projectPaymentVisa }}
内容简要
- + {{ formData.projectPaymentContentBriefly }}
@@ -137,85 +133,72 @@
一、工程进度
本月完成情况:
- + {{ formData.thisMonthCompletion }}
下月计划完成:
- + {{ formData.nextMonthPlan }}
二、工程质量
- + {{ formData.constructionQuality }}
三、安全、环保、文明生产
- + {{ formData.civilizationContent }}
四、费用支付
- + {{ formData.costContent }}
五、合同管理
- + {{ formData.contractManagement }}
六、存在的问题
- + {{ formData.existingProblems }}
七、监理工作小结
- + {{ formData.workSummary }}
八、下月工作计划
- + {{ formData.nextMonthWorkPlan }}
九、本月大事记
- + {{ formData.thisMonthEventsRecord }}
-
九、本月大事记
+
十、工程照片
- - - -
- - - -
+
@@ -226,28 +209,82 @@ import { onMounted, ref, watch, reactive } from "vue"; import type { UploadProps } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus"; +import { submitMonthlyReport } from "@/api/modules/project"; +import printJS from "print-js"; +const fileList = ref([]); const baseUrl = import.meta.env.VITE_API_URL; const props = defineProps({ - addVisible: Boolean + detailVisible: Boolean, + searchSn: String, + activeValue: String }); -const emits = defineEmits(["update:addVisible"]); +const emits = defineEmits(["update:detailVisible"]); const formData = ref({ - number: "", - advice: "" + stage: "", + signOpinion: "", + actualCompletion: "", + reasonAnalysis: "", + meetingSummary: "", + meetingContentBriefly: "", + engineeringQualityVisa: "", + engineeringContentBriefly: "", + instructions: "", + instructionsContentBriefly: "", + presentation: "", + presentationContentBriefly: "", + projectPaymentVisa: "", + projectPaymentContentBriefly: "", + thisMonthCompletion: "", + nextMonthPlan: "", + constructionQuality: "", + civilizationContent: "", + costContent: "", + contractManagement: "", + existingProblems: "", + workSummary: "", + nextMonthWorkPlan: "", + thisMonthEventsRecord: "" }); const visible1 = ref(true); -// 图片上传成功后的钩子 -const handleAvatarSuccess: UploadProps["onSuccess"] = (response, uploadFile) => { - console.log(response.result.url); - console.log(response, uploadFile); +// 提交打印 +const submitPrint = async () => { + printJS({ + printable: "monthlyReport", + type: "html", + targetStyles: ["*"], + maxWidth: 2500, + style: "@page{size:auto; margin: 0;}" + "@media print { @page {size: landscape } }" + }); }; -const validatorPhone = (e: any, key: any) => { - // 校验正整数 - let pattern = /^\d+$/; - let dataValue = formData.value[key]; - if (!pattern.test(dataValue)) { - ElMessage.error("请输入正确的手机号码"); - formData.value[key] = ""; +// 提交月报 +const submitReport = async () => { + let requestData = { + ...formData.value + }; + if (!requestData.stage) { + ElMessage.error("请输入月报期数"); + return; + } + if (props.activeValue == "eng") { + requestData.engineeringSn = props.searchSn; + } else { + requestData.projectSn = props.searchSn; + } + if (fileList.value.length > 0) { + let str = ""; + fileList.value.map((item, index) => { + if (index == fileList.value.length) { + str += item.url; + } else { + str = str + item.url + ","; + } + }); + requestData.imageFiles = str; + } + const res = await submitMonthlyReport(requestData); + if (res.success) { + ElMessage.success("操作成功"); + visible1.value = false; } }; // 关闭两个对话框 @@ -255,7 +292,7 @@ const closeMain = () => { visible1.value = false; }; watch( - () => props.addVisible, + () => props.detailVisible, n => { if (n) { visible1.value = n; @@ -265,7 +302,7 @@ watch( watch( () => visible1, n => { - emits("update:addVisible", n); + emits("update:detailVisible", n); } ); onMounted(() => {}); @@ -373,6 +410,9 @@ onMounted(() => {}); div:nth-child(3) { @include flex; justify-content: flex-end; + span { + white-space: nowrap; + } span:first-child { margin-right: 120px; } diff --git a/src/views/project/monthlyReport/index.vue b/src/views/project/monthlyReport/index.vue index 105536b..f4f5f60 100644 --- a/src/views/project/monthlyReport/index.vue +++ b/src/views/project/monthlyReport/index.vue @@ -24,7 +24,19 @@ - + + +