From 9d129fae53bb796fa5313f24ebe53e408d55cba9 Mon Sep 17 00:00:00 2001 From: haha Date: Sat, 1 Mar 2025 16:11:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E9=9A=90=E6=82=A3=E6=95=B4?= =?UTF-8?q?=E6=94=B9=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/trouble/problemmodify/index.vue | 66 ++++++++++++++++--- 1 file changed, 57 insertions(+), 9 deletions(-) diff --git a/yanzhu-ui-vue3/src/views/trouble/problemmodify/index.vue b/yanzhu-ui-vue3/src/views/trouble/problemmodify/index.vue index 08cd5057..0928f0f1 100644 --- a/yanzhu-ui-vue3/src/views/trouble/problemmodify/index.vue +++ b/yanzhu-ui-vue3/src/views/trouble/problemmodify/index.vue @@ -22,14 +22,20 @@ + start-placeholder="开始日期" end-placeholder="结束日期" /> 搜索 重置 - + + + + + + + @@ -127,7 +133,9 @@ const data = reactive({ comId: [ { required: true, message: "租户ID不能为空", trigger: "blur" } ], - } + }, + activeName: 'a', + tabInfo: {} }); const { queryParams, form, rules } = toRefs(data); @@ -135,7 +143,19 @@ const { queryParams, form, rules } = toRefs(data); /** 查询安全隐患整改列表 */ function getList() { loading.value = true; - listProblemmodify(queryParams.value).then(response => { + let postData = { + infoType: 0, + problemType: queryParams.value.problemType, + dangerType: queryParams.value.dangerType, + lordSent: queryParams.value.lordSent, + createUser: queryParams.value.createUser, + projectName: " abcde".indexOf(data.activeName) + }; + if (queryParams.value.dataRange && queryParams.value.dataRange.length > 0) { + postData.createTime = queryParams.value.dataRange[0]; + postData.updateTime = queryParams.value.dataRange[1]; + } + listProblemmodify(postData).then(response => { problemmodifyList.value = response.rows; total.value = response.total; loading.value = false; @@ -254,13 +274,41 @@ function handleDelete(row) { }).catch(() => { }); } -/** 导出按钮操作 */ -function handleExport() { - proxy.download('trouble/problemmodify/export', { - ...queryParams.value - }, `problemmodify_${new Date().getTime()}.xlsx`) +function getCount() { + let postData = { + infoType: 0, + problemType: queryParams.value.problemType, + dangerType: queryParams.value.dangerType, + lordSent: queryParams.value.lordSent, + createUser: queryParams.value.createUser + }; + if (queryParams.value.dataRange && queryParams.value.dataRange.length > 0) { + postData.createTime = queryParams.value.dataRange[0]; + postData.updateTime = queryParams.value.dataRange[1]; + } + data.tabInfo = { + a: '全部数据(0)', + b: '待整改(0)', + c: '待复检(0)', + d: '整改完成(0)', + e: '整改超时(0)', + }; + getListCount(postData).then(response => { + let obj = { + a: '全部数据', + b: '待整改', + c: '待复检', + d: '整改完成', + e: '整改超时', + }; + (response.data || []).forEach(it => { + data.tabInfo[it.projectName] = obj[it.projectName] + `(${it.id || 0})` + }); + }); + handleQuery(); } +getCount();