|
|
@@ -98,11 +98,10 @@
|
|
|
<el-table-column label="操作" fixed="right" width="330" align="center">
|
|
|
<template #default="scope">
|
|
|
<el-button v-hasPermi="['warning:warning:query']" link type="primary" @click="openDetail(scope.row)">详情</el-button>
|
|
|
- <el-button v-if="canReview(scope.row)" v-hasPermi="['warning:warning:handle']" link type="success" @click="openResolve(scope.row)">核查解除</el-button>
|
|
|
+ <WarningReviewAction :row="scope.row" @changed="loadList" />
|
|
|
<el-button v-if="canUpgrade(scope.row)" v-hasPermi="['warning:warning:handle']" link type="warning" @click="openUpgrade(scope.row)">升级</el-button>
|
|
|
<el-button v-if="canManage(scope.row)" v-hasPermi="['warning:warning:supervision']" link type="primary" @click="openSupervision(scope.row)">督办</el-button>
|
|
|
<el-button v-if="canManage(scope.row)" v-hasPermi="['warning:warning:instruction']" link type="info" @click="openInstruction(scope.row)">批示</el-button>
|
|
|
- <el-button v-if="canReview(scope.row)" v-hasPermi="['warning:warning:handle']" link type="danger" @click="openReturn(scope.row)">退回</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -158,21 +157,6 @@
|
|
|
</template>
|
|
|
</el-drawer>
|
|
|
|
|
|
- <el-dialog v-model="resolveVisible" title="预警解除" width="520px" append-to-body>
|
|
|
- <el-form label-width="100px">
|
|
|
- <el-form-item label="预警编号">
|
|
|
- <el-input :model-value="currentRow?.warningNo || '-'" disabled />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="核查说明">
|
|
|
- <el-input v-model="resolveForm.disposalContent" type="textarea" :rows="4" placeholder="请输入预警解除说明" />
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <template #footer>
|
|
|
- <el-button @click="resolveVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" :loading="submitLoading" @click="submitResolve">确 定</el-button>
|
|
|
- </template>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
<el-dialog v-model="upgradeVisible" title="预警升级" width="560px" append-to-body>
|
|
|
<el-form label-width="100px">
|
|
|
<el-form-item label="预警编号">
|
|
|
@@ -249,20 +233,6 @@
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog v-model="returnVisible" title="预警退回" width="520px" append-to-body>
|
|
|
- <el-form label-width="100px">
|
|
|
- <el-form-item label="预警编号">
|
|
|
- <el-input :model-value="currentRow?.warningNo || '-'" disabled />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="退回说明">
|
|
|
- <el-input v-model="returnForm.disposalContent" type="textarea" :rows="4" placeholder="请输入退回重办说明" />
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <template #footer>
|
|
|
- <el-button @click="returnVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" :loading="submitLoading" @click="submitReturn">确 定</el-button>
|
|
|
- </template>
|
|
|
- </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -274,9 +244,9 @@ import { computed, onMounted, reactive, ref } from "vue";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
import { Upload } from "@element-plus/icons-vue";
|
|
|
import { parseTime } from "@/utils/ruoyi";
|
|
|
-import useUserStore from "@/store/modules/user";
|
|
|
import { enabledAll } from "@/api/system/user";
|
|
|
import WarningItemSummary from '../components/WarningItemSummary.vue';
|
|
|
+import WarningReviewAction from '../components/WarningReviewAction.vue';
|
|
|
import WarningDisposalReasons from '../components/WarningDisposalReasons.vue';
|
|
|
import WarningAttachments from "../components/WarningAttachments.vue";
|
|
|
import { attachmentsForDisposal, unlinkedWarningAttachments } from "../warningAttachments";
|
|
|
@@ -285,14 +255,11 @@ import {
|
|
|
getWarningDetailData,
|
|
|
getdbyjlistData,
|
|
|
instructionWarningData,
|
|
|
- resolveWarningData,
|
|
|
- returnWarningData,
|
|
|
supervisionWarningData,
|
|
|
upgradeWarningData
|
|
|
} from "@/api/smxyjldczxt/yjxxfb/yjfb.js";
|
|
|
|
|
|
const loading = ref(false);
|
|
|
-const userStore = useUserStore();
|
|
|
const submitLoading = ref(false);
|
|
|
const usersLoading = ref(false);
|
|
|
const enabledUsers = ref([]);
|
|
|
@@ -306,11 +273,9 @@ const currentRow = ref(null);
|
|
|
const detailVisible = ref(false);
|
|
|
const detailData = ref({});
|
|
|
|
|
|
-const resolveVisible = ref(false);
|
|
|
const upgradeVisible = ref(false);
|
|
|
const supervisionVisible = ref(false);
|
|
|
const instructionVisible = ref(false);
|
|
|
-const returnVisible = ref(false);
|
|
|
|
|
|
const queryParams = reactive({
|
|
|
pageNum: 1,
|
|
|
@@ -325,10 +290,6 @@ const queryParams = reactive({
|
|
|
dateRange: []
|
|
|
});
|
|
|
|
|
|
-const resolveForm = reactive({
|
|
|
- disposalContent: ""
|
|
|
-});
|
|
|
-
|
|
|
const upgradeForm = reactive({
|
|
|
newLevel: "",
|
|
|
disposalContent: ""
|
|
|
@@ -346,10 +307,6 @@ const instructionForm = reactive({
|
|
|
instructionContent: ""
|
|
|
});
|
|
|
|
|
|
-const returnForm = reactive({
|
|
|
- disposalContent: ""
|
|
|
-});
|
|
|
-
|
|
|
const warningTypeLabelMap = computed(() => {
|
|
|
return warningTypeOptions.value.reduce((acc, item) => {
|
|
|
acc[item.dictValue] = item.dictLabel;
|
|
|
@@ -370,7 +327,6 @@ const upgradeLevelOptions = computed(() => warningLevelOptions.value.filter(
|
|
|
|
|
|
const canManage = row => ["PENDING", "RECEIVED", "PROCESSING", "HANDLED"].includes(row.status);
|
|
|
const canUpgrade = row => canManage(row) && Number(row.warningLevel) > 1 && Number(row.warningLevel) <= 4;
|
|
|
-const canReview = row => row.status === "HANDLED" && (row.reviewer || row.publisher) === userStore.name;
|
|
|
|
|
|
function formatDateTime(value) {
|
|
|
if (!value) return "-";
|
|
|
@@ -436,7 +392,6 @@ function normalizeWarningRow(item) {
|
|
|
}
|
|
|
|
|
|
function resetActionForms() {
|
|
|
- resolveForm.disposalContent = "";
|
|
|
upgradeForm.newLevel = "";
|
|
|
upgradeForm.disposalContent = "";
|
|
|
supervisionForm.supervisionUser = "";
|
|
|
@@ -446,7 +401,6 @@ function resetActionForms() {
|
|
|
supervisionFiles.value = [];
|
|
|
instructionForm.leaderName = "";
|
|
|
instructionForm.instructionContent = "";
|
|
|
- returnForm.disposalContent = "";
|
|
|
}
|
|
|
|
|
|
function filterSupervisionUser(keyword) {
|
|
|
@@ -520,12 +474,6 @@ async function openDetail(row) {
|
|
|
detailVisible.value = true;
|
|
|
}
|
|
|
|
|
|
-function openResolve(row) {
|
|
|
- currentRow.value = row;
|
|
|
- resetActionForms();
|
|
|
- resolveVisible.value = true;
|
|
|
-}
|
|
|
-
|
|
|
function openUpgrade(row) {
|
|
|
currentRow.value = row;
|
|
|
resetActionForms();
|
|
|
@@ -555,35 +503,6 @@ function openInstruction(row) {
|
|
|
instructionVisible.value = true;
|
|
|
}
|
|
|
|
|
|
-function openReturn(row) {
|
|
|
- currentRow.value = row;
|
|
|
- resetActionForms();
|
|
|
- returnVisible.value = true;
|
|
|
-}
|
|
|
-
|
|
|
-async function submitResolve() {
|
|
|
- if (!resolveForm.disposalContent) {
|
|
|
- ElMessage.warning("请输入解除说明");
|
|
|
- return;
|
|
|
- }
|
|
|
- submitLoading.value = true;
|
|
|
- try {
|
|
|
- const res = await resolveWarningData({
|
|
|
- warningId: currentRow.value.warningId,
|
|
|
- disposalContent: resolveForm.disposalContent
|
|
|
- });
|
|
|
- if (res.code !== 200) {
|
|
|
- ElMessage.error(res.msg || "解除失败");
|
|
|
- return;
|
|
|
- }
|
|
|
- ElMessage.success("解除成功");
|
|
|
- resolveVisible.value = false;
|
|
|
- loadList();
|
|
|
- } finally {
|
|
|
- submitLoading.value = false;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
async function submitUpgrade() {
|
|
|
if (!upgradeForm.newLevel) {
|
|
|
ElMessage.warning("请选择新预警级别");
|
|
|
@@ -680,29 +599,6 @@ async function submitInstruction() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-async function submitReturn() {
|
|
|
- if (!returnForm.disposalContent) {
|
|
|
- ElMessage.warning("请输入退回说明");
|
|
|
- return;
|
|
|
- }
|
|
|
- submitLoading.value = true;
|
|
|
- try {
|
|
|
- const res = await returnWarningData({
|
|
|
- warningId: currentRow.value.warningId,
|
|
|
- disposalContent: returnForm.disposalContent
|
|
|
- });
|
|
|
- if (res.code !== 200) {
|
|
|
- ElMessage.error(res.msg || "退回失败");
|
|
|
- return;
|
|
|
- }
|
|
|
- ElMessage.success("退回成功");
|
|
|
- returnVisible.value = false;
|
|
|
- loadList();
|
|
|
- } finally {
|
|
|
- submitLoading.value = false;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
onMounted(async () => {
|
|
|
await loadDicts();
|
|
|
await loadList();
|