| | |
| | | <el-table-column label="生成时间" prop="createTime" align="center" /> |
| | | <el-table-column label="领用人" prop="createName" align="center" /> |
| | | <el-table-column label="领用时间" prop="useTime" align="center" /> |
| | | <el-table-column label="最后流转时间" prop="updateTime" align="center" /> |
| | | <el-table-column label="处理时间" prop="handleTime" align="center" /> |
| | | <!-- <el-table-column label="最后流转时间" prop="updateTime" align="center" />--> |
| | | <el-table-column label="处理时间" prop="updateTime" align="center" > |
| | | <template #default="scope"> |
| | | <span>{{scope.row.state === 1 ? scope.row.updateTime :'--'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="状态" prop="name" align="center" > |
| | | <template #default="scope"> |
| | | <span>{{scope.row.state === 0 ? '未处理':'已处理'}}</span> |
| | |
| | | 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(); |
| | |
| | | const classHourRef = ref(); |
| | | onMounted(()=>{ |
| | | getList() |
| | | getUnCount() |
| | | }) |
| | | |
| | | onUnmounted(()=>{ |
| | |
| | | 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) => { |
| | |
| | | state: null |
| | | } |
| | | getList() |
| | | getUnCount() |
| | | } |
| | | const handleDelete = (val) => { |
| | | ElMessageBox.confirm( |
| | |
| | | if(res.code == 200){ |
| | | ElMessage.success('数据删除成功') |
| | | await getList() |
| | | await getUnCount() |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | 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) |
| | | } |