From 0e196c9b58cb9392320be9df16413e783b8220c3 Mon Sep 17 00:00:00 2001 From: kun <1422840143@qq.com> Date: Fri, 28 Jul 2023 15:03:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qualityControl/components/orderAdd.vue | 40 +++--- .../safetyManagement/components/orderAdd.vue | 24 ++++ .../historyDataAnalysis/index.scss | 35 ++++- .../historyDataAnalysis/index.vue | 121 +++++++++++++++++- 4 files changed, 196 insertions(+), 24 deletions(-) diff --git a/src/views/goverment/huizhou/projectMonitoring/qualityControl/components/orderAdd.vue b/src/views/goverment/huizhou/projectMonitoring/qualityControl/components/orderAdd.vue index f54bfa0..9539ec6 100644 --- a/src/views/goverment/huizhou/projectMonitoring/qualityControl/components/orderAdd.vue +++ b/src/views/goverment/huizhou/projectMonitoring/qualityControl/components/orderAdd.vue @@ -700,30 +700,30 @@ const allSubmit = async () => { ElMessage.error("请选择工程/项目"); return; } - if (!basicData.value.selectedMember) { - ElMessage.error("请选择检查人员"); - return; - } + // if (!basicData.value.selectedMember) { + // ElMessage.error("请选择检查人员"); + // return; + // } if (!basicData.value.deadline) { ElMessage.error("请选择整改期限"); return; } - if (basicData.value.opSignature.length == 0) { - ElMessage.error("请上传施工单位责任人签名"); - return; - } - if (basicData.value.supervisorSignature.length == 0) { - ElMessage.error("请上传监理单位责任人签名"); - return; - } - if (basicData.value.inspectSignature.length == 0) { - ElMessage.error("请上传检查人员责任人签名"); - return; - } - if (basicData.value.otherSignature.length == 0) { - ElMessage.error("请上传其他单位责任人签名"); - return; - } + // if (basicData.value.opSignature.length == 0) { + // ElMessage.error("请上传施工单位责任人签名"); + // return; + // } + // if (basicData.value.supervisorSignature.length == 0) { + // ElMessage.error("请上传监理单位责任人签名"); + // return; + // } + // if (basicData.value.inspectSignature.length == 0) { + // ElMessage.error("请上传检查人员责任人签名"); + // return; + // } + // if (basicData.value.otherSignature.length == 0) { + // ElMessage.error("请上传其他单位责任人签名"); + // return; + // } recordData.value.map(item => { item.image = JSON.stringify(item.image); }); diff --git a/src/views/goverment/huizhou/projectMonitoring/safetyManagement/components/orderAdd.vue b/src/views/goverment/huizhou/projectMonitoring/safetyManagement/components/orderAdd.vue index 2180711..24ca870 100644 --- a/src/views/goverment/huizhou/projectMonitoring/safetyManagement/components/orderAdd.vue +++ b/src/views/goverment/huizhou/projectMonitoring/safetyManagement/components/orderAdd.vue @@ -653,10 +653,34 @@ const submitForm = async () => { }; // 全部提交 const allSubmit = async () => { + if (!(projectSelectedData.value.projectName || projectSelectedData.value.engineeringName)) { + ElMessage.error("请选择工程/项目"); + return; + } + // if (!basicData.value.selectedMember) { + // ElMessage.error("请选择检查人员"); + // return; + // } if (!basicData.value.deadline) { ElMessage.error("请选择整改期限"); return; } + // if (basicData.value.opSignature.length == 0) { + // ElMessage.error("请上传施工单位责任人签名"); + // return; + // } + // if (basicData.value.supervisorSignature.length == 0) { + // ElMessage.error("请上传监理单位责任人签名"); + // return; + // } + // if (basicData.value.inspectSignature.length == 0) { + // ElMessage.error("请上传检查人员责任人签名"); + // return; + // } + // if (basicData.value.otherSignature.length == 0) { + // ElMessage.error("请上传其他单位责任人签名"); + // return; + // } recordData.value.map(item => { item.image = JSON.stringify(item.image); }); diff --git a/src/views/goverment/huizhou/siteSupervision/historyDataAnalysis/index.scss b/src/views/goverment/huizhou/siteSupervision/historyDataAnalysis/index.scss index 31e07bb..5065554 100644 --- a/src/views/goverment/huizhou/siteSupervision/historyDataAnalysis/index.scss +++ b/src/views/goverment/huizhou/siteSupervision/historyDataAnalysis/index.scss @@ -65,7 +65,7 @@ .el-card { border-radius: 8px; width: 100%; - background-color: var(--el-menu-bg-color); + background-color: #092945; } } .topCard { @@ -76,7 +76,38 @@ align-items: center; } span { - color: var(--el-menu-text-color); + color: white; + } + } + } + .echarts-content { + height: calc(100% - 100px); + background-color: #092945; + box-shadow: none; + margin-top: 20px; + padding-bottom: 20px; + border-radius: 8px; + padding: 20px; + display: flex; + flex-direction: column; + position: relative; + .echarts-option { + padding: 10px; + border: 1px solid #216876; + border-radius: 8px; + .top-search { + display: flex; + align-items: center; + > span { + font-size: 18px; + color: white; + margin-right: auto; + } + } + .card { + width: 100%; + height: 300px; + padding: 0; } } } diff --git a/src/views/goverment/huizhou/siteSupervision/historyDataAnalysis/index.vue b/src/views/goverment/huizhou/siteSupervision/historyDataAnalysis/index.vue index 86a2106..7e1b587 100644 --- a/src/views/goverment/huizhou/siteSupervision/historyDataAnalysis/index.vue +++ b/src/views/goverment/huizhou/siteSupervision/historyDataAnalysis/index.vue @@ -30,7 +30,7 @@
- 分组 + 分组 @@ -43,6 +43,30 @@
+
+
+ +
+
+
@@ -54,7 +78,19 @@ import { GlobalStore } from "@/stores"; import LeftMenu from "@/components/LeftMenu/LeftMenu.vue"; import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government/AIwaring"; import { sendIframeMessage } from "@/utils/util"; -const radio = ref(1); +import * as echarts from "echarts"; +const statusList = ref([ + { label: "半小时", value: 0.5 }, + { label: "一小时", value: 1 }, + { label: "一天", value: 24 }, + { label: "七天", value: 24 * 7 }, + { label: "十五天", value: 24 * 15 }, + { label: "一个月", value: 24 * 31 }, + { label: "半年", value: 24 * 31 * 6 }, + { label: "一年", value: 24 * 31 * 12 } +]); +const value1 = ref(null); +const value2 = ref(null); const checkList = ref([]); const pages = ref({ pageNo: 1, @@ -87,6 +123,86 @@ const searchSn = ref(""); // 项目或者工程名字 const searchName = ref(""); +// 绘制折线图 +const drawEcharts = () => { + let chartDom = document.getElementById("echarts1"); + let myChart: echarts.ECharts = echarts.init(chartDom); + let option; + option = { + tooltip: { + trigger: "axis", + axisPointer: { + type: "cross", + crossStyle: { + color: "fff" + } + } + }, + grid: { + left: 60, + top: 60, + width: "95%" + }, + // legend: { + // right: 0, + // top: 0, + // textStyle: { + // color: "#c4c4c4", + // fontSize: 16 + // }, + // data: ["出勤总数(人)", "在职总数(人)", "出勤率(%)"] + // }, + xAxis: [ + { + type: "category", + data: ["1月", "2月", "3月", "4月", "5月", "6月", "7月"], + axisPointer: { + type: "shadow" + }, + axisLabel: { + color: "#fff", + fontSize: 14 + } + } + ], + yAxis: [ + { + type: "value", + name: "单位(人)", + nameTextStyle: { + align: "right", + color: "#fff", + fontSize: 14 + }, + axisLabel: { + color: "#fff", + fontSize: 16 + }, + min: 0, + max: 250, + interval: 50 + } + ], + series: [ + { + name: "出勤总数(人)", + type: "line", + barWidth: 18, + itemStyle: { + borderRadius: [11, 11, 11, 11] + }, + tooltip: { + valueFormatter: function (value) { + return value + " ml"; + } + }, + data: [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3] + } + ] + }; + + option && myChart.setOption(option); +}; // 页面的项目名称和工程名称的div点击事件 const onSearch = async (params: ResAiProjectPage | ResAiEngineerPage) => { const { result } = await getAIQuestionPage( @@ -168,6 +284,7 @@ watch( } ); onMounted(async () => { + drawEcharts(); await getProPage(); onSearch(records.value[0]); searchSn.value = (records.value as ResAiProjectPage[])[0].projectSn;