feat: 数据整理-增加下发通知,和确认研判功能

This commit is contained in:
2025-12-10 17:36:35 +08:00
parent 6bfc6d4e94
commit d8518faf6b
2 changed files with 103 additions and 2 deletions

View File

@ -7,7 +7,7 @@
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<div style="padding-bottom: 40px;" class="form_cnt">
<FormMessage v-model="listQuery" :formList="formData" ref="elform" :rules="rules">
<template #bmList>
<div class="table-box">
@ -43,6 +43,11 @@
</template>
</FormMessage>
</div>
<!-- 底部按钮 -->
<div class="bottom-actions" v-if="title !== '新增' && listQuery.id">
<el-button type="primary" size="small" @click="sendNotice" :loading="noticeLoading">下发通知</el-button>
<el-button type="success" size="small" @click="confirmJudgment" :loading="confirmLoading">确认研判</el-button>
</div>
</div>
<!-- 修改状态弹框 -->
@ -69,7 +74,7 @@ import FormMessage from "@/components/aboutTable/FormMessage.vue";
import UploadFile from "@/components/MyComponents/Upload/index.vue";
// import ChooseUser from "@/components/ChooseList/ChooseUser/index.vue"
import { ref, defineExpose, reactive, defineEmits, getCurrentInstance, watch, computed } from "vue";
import { sjzlAddEntity, sjzlEditEntity, sjzlGetInfo, sjzlPerfectlnfo } from '@//api/yj.js'
import { sjzlAddEntity, sjzlEditEntity, sjzlGetInfo, sjzlPerfectlnfo, sjzlFstz, sjzlQryp } from '@//api/yj.js'
import { getItem } from '@//utils/storage.js'
const emit = defineEmits(["updateDate", "getList"]);
@ -102,6 +107,8 @@ const statusForm = ref({ fj: [] }) // 修改状态表单
const currentRow = ref({}) // 当前操作的行
/** 外面行数据 */
const outRow = ref({})
const noticeLoading = ref(false) // 下发通知加载状态
const confirmLoading = ref(false) // 确认研判加载状态
const rules = reactive({
// 可以在这里添加表单验证规则
@ -297,6 +304,47 @@ const closeStatusDialog = () => {
statusLoading.value = false
}
// 下发通知
const sendNotice = () => {
proxy.$confirm('确认下发通知?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
noticeLoading.value = true;
const res = await sjzlFstz(listQuery.value.id);
proxy.$message({ type: "success", message: "下发通知成功" });
close();
} catch (error) {
console.log(error);
} finally {
noticeLoading.value = false;
}
});
};
// 确认研判
const confirmJudgment = () => {
proxy.$confirm('确认研判完成?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
confirmLoading.value = true;
const res = await sjzlQryp(listQuery.value.id);
proxy.$message({ type: "success", message: "确认研判成功" });
close();
} catch (error) {
console.log(error);
} finally {
confirmLoading.value = false;
}
});
};
// 关闭
const close = () => {
listQuery.value = {};
@ -314,4 +362,22 @@ defineExpose({ init });
::v-deep .form-item-box {
width: 100% !important;
}
.bottom-actions {
position: absolute;
bottom: 0;
left: 50%;
display: flex;
justify-content: center;
gap: 10px;
width: 100%;
transform: translateX(-50%);
padding: 10px 20px;
border-radius: 4px;
background: white;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
// z-index: 1000;
}
</style>