From cd84a28754fc1b3fadb7027245333d6d3ff330a3 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: Mon, 19 Aug 2024 17:22:53 +0800
Subject: [PATCH] bug修改
---
src/views/hazardousChemicals/overdueWarning/index.vue | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/src/views/hazardousChemicals/overdueWarning/index.vue b/src/views/hazardousChemicals/overdueWarning/index.vue
index 4b06f26..18e9967 100644
--- a/src/views/hazardousChemicals/overdueWarning/index.vue
+++ b/src/views/hazardousChemicals/overdueWarning/index.vue
@@ -72,6 +72,7 @@
import {getCurrentInstance, onMounted, onUnmounted, reactive, ref, toRefs} from "vue";
import {ElMessage, ElMessageBox} from "element-plus";
import {delWarning, getWarning, handleWarning} from "@/api/hazardousChemicals/warning";
+import {unWarningCount} from "@/api/hazardousChemicals/count";
const { proxy } = getCurrentInstance();
const loading = ref(false);
const dialogRef = ref();
@@ -90,6 +91,7 @@
const classHourRef = ref();
onMounted(()=>{
getList()
+ getUnCount()
})
onUnmounted(()=>{
@@ -102,10 +104,20 @@
if(res.code == 200){
data.dataList = res.data.list
data.total = res.data.total
+
}else{
ElMessage.warning(res.message)
}
loading.value = false
+}
+const getUnCount = async () => {
+ const res = await unWarningCount()
+ if(res.code == 200){
+ data.untreatedTotal = res.data
+ }else{
+ ElMessage.warning(res.message)
+ }
+
}
const openDialog = (type, value) => {
@@ -120,6 +132,7 @@
state: null
}
getList()
+ getUnCount()
}
const handleDelete = (val) => {
ElMessageBox.confirm(
@@ -135,6 +148,7 @@
if(res.code == 200){
ElMessage.success('数据删除成功')
await getList()
+ await getUnCount()
}else{
ElMessage.warning(res.message)
}
@@ -151,10 +165,17 @@
type: 'warning',
})
.then( async() => {
- const res = await handleWarning(val.id)
+ console.log("val",val)
+ const param = {
+ id: val.id,
+ state: 1,
+ companyId: val.companyId,
+ }
+ const res = await handleWarning(param)
if(res.code == 200){
ElMessage.success('处理成功')
await getList()
+ await getUnCount()
}else{
ElMessage.warning(res.message)
}
--
Gitblit v1.9.2