|
@@ -131,39 +131,48 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div style="flex:1; min-width:0;">
|
|
<div style="flex:1; min-width:0;">
|
|
|
<div style="font-weight:bold; font-size:14px; padding-bottom:8px; border-bottom:1px solid #e4e7ed; margin-bottom:12px;">基本档案</div>
|
|
<div style="font-weight:bold; font-size:14px; padding-bottom:8px; border-bottom:1px solid #e4e7ed; margin-bottom:12px;">基本档案</div>
|
|
|
- <el-table :data="detailList" border size="small" height="400" style="width:100%">
|
|
|
|
|
|
|
+ <el-table :data="detailList" border size="small" height="400" style="width:100%" @selection-change="(rows) => { detailSelectedIds.value = rows.map(r => r.guid) }">
|
|
|
|
|
+ <el-table-column type="selection" width="50" align="center" />
|
|
|
<el-table-column label="序号" align="center" type="index" width="50" />
|
|
<el-table-column label="序号" align="center" type="index" width="50" />
|
|
|
- <el-table-column label="发生事故单位" align="center" min-width="140" :show-overflow-tooltip="true">
|
|
|
|
|
|
|
+ <el-table-column label="事故类别" align="center" prop="acciCate" width="100" />
|
|
|
|
|
+ <el-table-column label="发生时间" align="center" prop="occuTime" width="160" />
|
|
|
|
|
+ <el-table-column label="死亡人数(人)" align="center" prop="casNum" width="100" />
|
|
|
|
|
+ <el-table-column label="重伤人数(人)" align="center" prop="serInjNum" width="100" />
|
|
|
|
|
+ <el-table-column label="直接经济损失(万元)" align="center" prop="econLoss" width="140" />
|
|
|
|
|
+ <el-table-column label="上报状态" align="center" width="100">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- {{ scope.row.acciWiunName || '--' }}
|
|
|
|
|
- <el-tag size="small">{{ scope.row.acciWiunType === '1' ? '直属' : scope.row.acciWiunType === '2' ? '下级' : scope.row.acciWiunType === '3' ? '流域' : '' }}</el-tag>
|
|
|
|
|
|
|
+ <el-tag size="small" :type="scope.row.montStat === '1' || scope.row.repAct === '1' ? 'success' : 'warning'">
|
|
|
|
|
+ {{ scope.row.montStat === '1' || scope.row.repAct === '1' ? '已上报' : '未上报' }}
|
|
|
|
|
+ </el-tag>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="死亡人数(人)" align="center" prop="casNum" width="100" />
|
|
|
|
|
- <el-table-column label="重伤人数(人)" align="center" prop="serInjNum" width="100" />
|
|
|
|
|
- <el-table-column label="直接经济损失(万元)" align="center" prop="econLoss" width="140" />
|
|
|
|
|
- <el-table-column label="事故类别" align="center" prop="acciCate" width="90" />
|
|
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<div class="pagination">
|
|
<div class="pagination">
|
|
|
<el-pagination v-show="detailTotal > 0" v-model:current-page="detailQuery.pageNum" v-model:page-size="detailQuery.pageSize" :total="detailTotal" layout="total, prev, pager, next" @size-change="loadDetailList" @current-change="loadDetailList" />
|
|
<el-pagination v-show="detailTotal > 0" v-model:current-page="detailQuery.pageNum" v-model:page-size="detailQuery.pageSize" :total="detailTotal" layout="total, prev, pager, next" @size-change="loadDetailList" @current-change="loadDetailList" />
|
|
|
</div>
|
|
</div>
|
|
|
- <div style="margin-top:12px; padding-top:8px; border-top:1px solid #e4e7ed;">
|
|
|
|
|
- <span style="font-weight:bold;">相关资料:</span>
|
|
|
|
|
- <span v-if="detailList.length === 0" style="color:#999;">暂无</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <template #footer>
|
|
|
|
|
- <el-button @click="detailOpen = false">关 闭</el-button>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <div style="margin-top:12px; padding-top:8px; border-top:1px solid #e4e7ed;">
|
|
|
|
|
+ <span style="font-weight:bold;">附件上传:</span>
|
|
|
|
|
+ <span v-if="uploadFileList.length === 0" style="color:#999;">暂无</span>
|
|
|
|
|
+ <el-upload :action="uploadUrl" :headers="uploadHeaders" :file-list="uploadFileList" :on-success="handleUploadSuccess" :on-remove="handleUploadRemove" :limit="5" :on-exceed="() => proxy.$modal.msgWarning('最多上传5个文件')" multiple accept=".pdf,.doc,.docx,.xls,.xlsx,.jpg,.png" style="display:inline-block; margin-left:8px;">
|
|
|
|
|
+ <el-button size="small" type="primary">添加文件</el-button>
|
|
|
|
|
+ <template #tip><div style="color:#999;font-size:12px;">支持 pdf/doc/xls/jpg 格式,最多5个</div></template>
|
|
|
|
|
+ </el-upload>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <el-button type="primary" @click="handleDetailSubmit" :disabled="detailSelectedIds.value.length === 0">上报</el-button>
|
|
|
|
|
+ <el-button @click="detailOpen = false">关闭</el-button>
|
|
|
|
|
+ </template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup name="AcciMonth">
|
|
<script setup name="AcciMonth">
|
|
|
import { Refresh, Document } from '@element-plus/icons-vue'
|
|
import { Refresh, Document } from '@element-plus/icons-vue'
|
|
|
-import { listBisAcciMont, getAcciTreeData, getAcciMontSummary, revokeBisAcciMont, returnBisAcciMont, updateBisAcciMont, batchUnlockAcciMont, urgeAcciMont } from "@/api/slaj/acci"
|
|
|
|
|
-import { listObjAcci } from "@/api/slaj/acci"
|
|
|
|
|
|
|
+import { listBisAcciMont, getAcciTreeData, getAcciMontSummary, revokeBisAcciMont, returnBisAcciMont, updateBisAcciMont, batchUnlockAcciMont, urgeAcciMont, submitBisAcciMont } from "@/api/slaj/acci"
|
|
|
|
|
+import { addAttMedBase, listAttMedBase, delAttMedBase } from "@/api/slaj/hidd"
|
|
|
|
|
+import { getToken } from "@/utils/auth"
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance()
|
|
const { proxy } = getCurrentInstance()
|
|
|
|
|
|
|
@@ -208,6 +217,7 @@ const detailTree = ref([])
|
|
|
const detailTreeProps = { children: 'children', label: 'orgName' }
|
|
const detailTreeProps = { children: 'children', label: 'orgName' }
|
|
|
const detailList = ref([]); const detailTotal = ref(0)
|
|
const detailList = ref([]); const detailTotal = ref(0)
|
|
|
const detailQuery = reactive({ pageNum: 1, pageSize: 10 })
|
|
const detailQuery = reactive({ pageNum: 1, pageSize: 10 })
|
|
|
|
|
+const detailSelectedIds = ref([]); const detailCurOrgGuid = ref(''); const uploadFileList = ref([]); const uploadUrl = `${import.meta.env.VITE_APP_BASE_URL}system/file/upload`; const uploadHeaders = { Authorization: 'Bearer ' + getToken() }
|
|
|
|
|
|
|
|
const monthOptions = ref([])
|
|
const monthOptions = ref([])
|
|
|
function buildMonthOptions() {
|
|
function buildMonthOptions() {
|
|
@@ -228,6 +238,8 @@ function handleMonthChange(val) {
|
|
|
selectedMonth.value = val
|
|
selectedMonth.value = val
|
|
|
loadStats()
|
|
loadStats()
|
|
|
loadPromptStats()
|
|
loadPromptStats()
|
|
|
|
|
+ // 联动左侧树:高亮所选月份节点
|
|
|
|
|
+ treeRef.value?.setCurrentKey(val)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function loadTree() {
|
|
function loadTree() {
|
|
@@ -294,26 +306,67 @@ function loadStats() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function handleReport() {
|
|
function handleReport() {
|
|
|
- if (!selectedMonth.value) { proxy.$modal.msgWarning('请先在左侧选择月份'); return }
|
|
|
|
|
- proxy.$router.push({ path: '/slaj/acci/monthDetail', query: { month: selectedMonth.value, year: selectedYear.value } })
|
|
|
|
|
|
|
+ if (!selectedMonth.value) { proxy.$modal.msgWarning('请先选择月份'); return }
|
|
|
|
|
+ // 打开上报弹窗:左侧单位树 + 右侧月报记录列表 + 附件上传 + 上报按钮
|
|
|
|
|
+ detailOpen.value = true
|
|
|
|
|
+ detailTree.value = [{ guid: 'root', orgName: '全部单位', children: treeData.value }]
|
|
|
|
|
+ detailList.value = []
|
|
|
|
|
+ detailTotal.value = 0
|
|
|
|
|
+ uploadFileList.value = []
|
|
|
|
|
+ detailCurOrgGuid.value = ''
|
|
|
|
|
+ loadDetailList()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function handleOrgDetail(row) {
|
|
function handleOrgDetail(row) {
|
|
|
detailOpen.value = true
|
|
detailOpen.value = true
|
|
|
- detailTree.value = [{ guid: row.orgGuid || '0', orgName: row.orgName || '本单位', children: [] }]
|
|
|
|
|
|
|
+ detailTree.value = [{ guid: 'root', orgName: '全部单位', children: treeData.value }]
|
|
|
|
|
+ detailList.value = []
|
|
|
|
|
+ detailTotal.value = 0
|
|
|
|
|
+ uploadFileList.value = []
|
|
|
|
|
+ detailCurOrgGuid.value = row.orgGuid || ''
|
|
|
loadDetailList()
|
|
loadDetailList()
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+function handleDetailSubmit() {
|
|
|
|
|
+ if (detailSelectedIds.value.length === 0) { proxy.$modal.msgWarning('请先勾选需要上报的记录'); return }
|
|
|
|
|
+ const unreported = detailList.value.filter(r => detailSelectedIds.value.includes(r.guid) && r.repAct !== '1')
|
|
|
|
|
+ if (unreported.length === 0) { proxy.$modal.msgWarning('勾选的记录已全部上报'); return }
|
|
|
|
|
+ proxy.$modal.confirm('确认上报选中的' + unreported.length + '条事故月报记录?').then(() => {
|
|
|
|
|
+ const reqs = unreported.map(r => submitBisAcciMont({ guid: r.guid }))
|
|
|
|
|
+ Promise.all(reqs).then(() => {
|
|
|
|
|
+ proxy.$modal.msgSuccess('上报成功')
|
|
|
|
|
+ detailOpen.value = false
|
|
|
|
|
+ loadStats(); loadPromptStats()
|
|
|
|
|
+ }).catch(() => { proxy.$modal.msgError('上报失败,请重试') })
|
|
|
|
|
+ }).catch(() => {})
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function handleUploadSuccess(response, file) {
|
|
|
|
|
+ if (response.code === 200) {
|
|
|
|
|
+ addAttMedBase({ medName: file.name, medPath: response.fileName, bizType: 'acci_month' }).then(() => {
|
|
|
|
|
+ proxy.$modal.msgSuccess('附件上传成功')
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function handleUploadRemove(file) {
|
|
|
|
|
+ if (file.guid) {
|
|
|
|
|
+ delAttMedBase(file.guid)
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
function loadDetailList() {
|
|
function loadDetailList() {
|
|
|
- listObjAcci({ mont: selectedMonth.value, pageNum: detailQuery.pageNum, pageSize: detailQuery.pageSize }).then(res => {
|
|
|
|
|
|
|
+ // 加载本月已生成、未上报的月报记录(bis_acci_mont)
|
|
|
|
|
+ const params = { mont: selectedMonth.value, pageNum: detailQuery.pageNum, pageSize: detailQuery.pageSize }
|
|
|
|
|
+ if (detailCurOrgGuid.value) { params.orgGuid = detailCurOrgGuid.value }
|
|
|
|
|
+ listBisAcciMont(params).then(res => {
|
|
|
detailList.value = res.rows || []; detailTotal.value = res.total || 0
|
|
detailList.value = res.rows || []; detailTotal.value = res.total || 0
|
|
|
- })
|
|
|
|
|
|
|
+ }).catch(() => {})
|
|
|
}
|
|
}
|
|
|
function handleDetailTreeClick(data) {
|
|
function handleDetailTreeClick(data) {
|
|
|
- listObjAcci({ orgGuid: data.guid, mont: selectedMonth.value, pageNum: detailQuery.pageNum, pageSize: detailQuery.pageSize }).then(res => {
|
|
|
|
|
- detailList.value = res.rows || []; detailTotal.value = res.total || 0
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if (!data.guid || data.guid === "root") { detailCurOrgGuid.value = ""; loadDetailList(); return }
|
|
|
|
|
+ detailCurOrgGuid.value = data.guid
|
|
|
|
|
+ loadDetailList()
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
function handleRevocApply(row) {
|
|
function handleRevocApply(row) {
|
|
|
revocForm.value = { guid: row.guid, revocDesc: '' }
|
|
revocForm.value = { guid: row.guid, revocDesc: '' }
|
|
|
revocOpen.value = true
|
|
revocOpen.value = true
|
|
@@ -322,7 +375,7 @@ function handleRevocApply(row) {
|
|
|
function submitRevoc() {
|
|
function submitRevoc() {
|
|
|
proxy.$refs.revocRef.validate(valid => {
|
|
proxy.$refs.revocRef.validate(valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- revokeBisAcciMont({ guid: revocForm.value.guid, revocationAudit: '0', revocationAuditResult: revocForm.value.revocDesc, repAct: '4' }).then(() => {
|
|
|
|
|
|
|
+ revokeBisAcciMont({ guid: revocForm.value.guid, revocationAudit: '0', revocationAuditResult: revocForm.value.revocDesc }).then(() => {
|
|
|
proxy.$modal.msgSuccess('撤回申请已提交')
|
|
proxy.$modal.msgSuccess('撤回申请已提交')
|
|
|
revocOpen.value = false
|
|
revocOpen.value = false
|
|
|
loadStats(); loadPromptStats()
|
|
loadStats(); loadPromptStats()
|
|
@@ -369,7 +422,7 @@ function handleBatchUnlock() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function handlePendingApproval() {
|
|
function handlePendingApproval() {
|
|
|
- listBisAcciMont({ montStat: '4', pageSize: 999 }).then(res => {
|
|
|
|
|
|
|
+ listBisAcciMont({ monthlyAudit: '1', pageSize: 999 }).then(res => {
|
|
|
pendingList.value = res.rows || []
|
|
pendingList.value = res.rows || []
|
|
|
pendingCount.value = pendingList.value.length
|
|
pendingCount.value = pendingList.value.length
|
|
|
pendingOpen.value = true
|
|
pendingOpen.value = true
|
|
@@ -377,7 +430,7 @@ function handlePendingApproval() {
|
|
|
}
|
|
}
|
|
|
function handleApprove(row) {
|
|
function handleApprove(row) {
|
|
|
proxy.$modal.confirm('同意该申请后,该单位可进行上报、撤销操作。确认同意?').then(() => {
|
|
proxy.$modal.confirm('同意该申请后,该单位可进行上报、撤销操作。确认同意?').then(() => {
|
|
|
- updateBisAcciMont({ guid: row.guid, repAct: '0', revocationAudit: '1', revocationAuditResult: '同意' }).then(() => {
|
|
|
|
|
|
|
+ updateBisAcciMont({ guid: row.guid, monthlyAuditResult: '1', repAct: '1' }).then(() => {
|
|
|
proxy.$modal.msgSuccess('已同意')
|
|
proxy.$modal.msgSuccess('已同意')
|
|
|
pendingList.value = pendingList.value.filter(r => r.guid !== row.guid)
|
|
pendingList.value = pendingList.value.filter(r => r.guid !== row.guid)
|
|
|
pendingCount.value = pendingList.value.length
|
|
pendingCount.value = pendingList.value.length
|
|
@@ -387,7 +440,7 @@ function handleApprove(row) {
|
|
|
}
|
|
}
|
|
|
function handleReject(row) {
|
|
function handleReject(row) {
|
|
|
proxy.$modal.confirm('驳回后该单位不能进行上报、撤销操作。确认驳回?').then(() => {
|
|
proxy.$modal.confirm('驳回后该单位不能进行上报、撤销操作。确认驳回?').then(() => {
|
|
|
- updateBisAcciMont({ guid: row.guid, repAct: '3', revocationAudit: '2', revocationAuditResult: '驳回' }).then(() => {
|
|
|
|
|
|
|
+ updateBisAcciMont({ guid: row.guid, monthlyAuditResult: '0', returninfo: '驳回' }).then(() => {
|
|
|
proxy.$modal.msgSuccess('已驳回')
|
|
proxy.$modal.msgSuccess('已驳回')
|
|
|
pendingList.value = pendingList.value.filter(r => r.guid !== row.guid)
|
|
pendingList.value = pendingList.value.filter(r => r.guid !== row.guid)
|
|
|
pendingCount.value = pendingList.value.length
|
|
pendingCount.value = pendingList.value.length
|
|
@@ -523,3 +576,10 @@ onMounted(() => { loadTree(); buildMonthOptions() })
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|