Files
sgxt_web/src/views/backOfficeSystem/DeploymentDisposal/mpvGroupSh/index.vue

404 lines
15 KiB
Vue
Raw Normal View History

<template>
<div>
<div class="titleBox">
2025-07-12 17:33:59 +08:00
<PageTitle title="重点群体审核">
2025-07-12 16:43:04 +08:00
<el-popover placement="bottom" :visible="visible" :width="400" trigger="click">
<template #reference>
<el-button type="primary" @click="(visible = !visible), (visiblefp = false)" size="small">布控申请
</el-button>
</template>
<div class="flex just-center">
<el-button size="small" type="primary" v-for="it in D_GS_BK_SQLX" :key="it.dm" @click="handleApplication(it)">{{it.zdmc }}</el-button>
</div>
</el-popover>
<el-popover placement="bottom" :visible="visiblefp" :width="400" trigger="click">
<template #reference>
<el-button size="small" type="primary" @click="(visiblefp = !visiblefp), (visible = false)">指定分配</el-button>
</template>
<div>
<el-input readonly v-model="obj.fpmc" @click="chooseUserVisible = true" placeholder="请选择民警"></el-input>
<div class="flex just-center mt10">
<el-button @click="(visiblefp = false), (obj = {})" size="small">取消</el-button>
<el-button type="primary" @click="handlefp" size="small">分配</el-button>
</div>
</div>
</el-popover>
<el-button size="small" type="primary" @click="handleZxs">转线索</el-button>
<el-button size="small" type="primary" @click="handleMove">移交管控</el-button>
<el-button type="primary" size="small" @click="addEdit('add', null)">
<el-icon style="vertical-align: middle">
<CirclePlus />
</el-icon>
<span style="vertical-align: middle">新增</span>
</el-button>
2025-07-08 10:18:56 +08:00
</PageTitle>
</div>
<!-- 搜索 -->
<div ref="searchBox">
2025-07-12 16:43:04 +08:00
<Search :searchArr="searchConfiger" @submit="onSearch" />
</div>
<!-- 表格 -->
<div class="tabBox">
2025-07-12 16:43:04 +08:00
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
2025-07-12 16:43:04 +08:00
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
@chooseData="chooseData"
>
<template #jbxx="{ row }">
2025-07-12 16:43:04 +08:00
<div class="flex">
<img src="" alt="" style="width: 80px;height: 90px;" />
<ul class="tl ml10" style="flex:1 0 0">
<li class="one_text_detail">群体名称{{ row.qtMc }}</li>
<li class="one_text_detail">群体级别{{ row.qtjb }}</li>
<li class="flex one_text_detail">风险等级
<DictTag :tag="false" :value="row.qtFxdj" :options="D_GS_ZDQT_FXDJ" />
</li>
2025-07-12 16:43:04 +08:00
<li class="one_text_detail">创建时间{{ row.xtCjsj }}</li>
</ul>
</div>
2025-07-12 16:43:04 +08:00
<div class="ww100 one_text_detail">
<el-button type="primary" size="small" v-for="(item, index) in row.bqList" :key="index">{{ item.bqMc }}</el-button>
</div>
</template>
<template #bgxx="{ row }">
2025-07-12 16:43:04 +08:00
<div class="flex one_text_detail">背景资料{{ row.qtBjzl }}</div>
<div class="flex one_text_detail">创建单位{{ row.xtCjbmmc }}</div>
</template>
<template #gkxx="{ row }">
2025-07-12 16:43:04 +08:00
<div class="flex one_text_detail">管辖单位{{ row.gxSsbmmc }}</div>
<div class="flex one_text_detail">列控原因{{ row.zdrLkyy }}</div>
<div class="flex one_text_detail">开始时间{{ row.zdrRkkssj }}</div>
<div class="flex one_text_detail">截至时间{{ row.zdrRkjssj }}</div>
</template>
2025-07-12 16:43:04 +08:00
<template #zdryList="{ row }">
<span style="color: #0072ff">{{ row.zdryList ? row.zdryList.length : 0 }}</span>
</template>
<template #qtZt="{ row }">
2025-07-12 16:43:04 +08:00
<DictTag :tag="false" :value="row.qtZt" :options="D_GS_ZDQT_ZT" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
2025-07-12 17:33:59 +08:00
<el-popover placement="left" :visible="row.visible" :width="400" trigger="manual">
<template #reference>
<el-link size="small" type="warning" v-if="row.qtZt == '02'" @click="row.visible = !row.visible,chooseRow.id = row.id">审核</el-link>
</template>
<el-form :model="chooseRow" ref="elRowForm" :inline="true" label-width="100px" :rules="rules">
<el-form-item label="是否通过" prop="sftg" class="mt10 mb10" style="width: 100%;">
<MOSTY.Select filterable v-model="chooseRow.sftg" :dictEnum="D_BZ_SF" width="100%" clearable placeholder="请选择是否通过"/>
</el-form-item>
<el-form-item label="不通过原因" prop="shBtgyy" v-if="chooseRow.sftg == 0" style="width: 100%;">
<MOSTY.Other style="width: 100%;" clearable v-model="chooseRow.shBtgyy" type="textarea" placeholder="请输入不通过原因"/>
</el-form-item>
</el-form>
<div class="flex just-center mt10">
<el-button @click.stop="cancelRow(row)">取消</el-button>
<el-button type="primary" @click.stop="handleSend(row)" v-loading="btnloading">确定</el-button>
</div>
</el-popover>
<el-popover placement="left" :visible="row.visible1" :width="400" trigger="manual">
<template #reference>
<el-link size="small" type="primary" v-if="row.qtZt == '04'" @click="row.visible1 = !row.visible1,chooseRow.id = row.id">审批</el-link>
</template>
<el-form :model="chooseRow" ref="elRowForm1" :inline="true" label-width="100px" :rules="rules">
<el-form-item label="是否通过" prop="sftg" class="mt10 mb10" style="width: 100%;">
<MOSTY.Select filterable v-model="chooseRow.sftg" :dictEnum="D_BZ_SF" width="100%" clearable placeholder="请选择是否通过"/>
</el-form-item>
<el-form-item label="不通过原因" prop="spBtgyy" v-if="chooseRow.sftg == 0" style="width: 100%;">
<MOSTY.Other style="width: 100%;" clearable v-model="chooseRow.spBtgyy" type="textarea" placeholder="请输入不通过原因"/>
</el-form-item>
</el-form>
<div class="flex just-center mt10">
<el-button @click.stop="cancelRowSp(row)">取消</el-button>
<el-button type="primary" @click.stop="handleSendSp(row)" v-loading="btnloading">确定</el-button>
</div>
</el-popover>
2025-07-12 16:43:04 +08:00
<el-link size="small" type="success" @click="addEdit('detail', row)">详情</el-link>
</template>
</MyTable>
2025-07-12 16:43:04 +08:00
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages>
</div>
2025-07-12 16:43:04 +08:00
<!-- 编辑 - 新增-->
<EditForm v-if="show" @updateDate="getList" ref="editFormDiloag" :dic="{D_BZ_XB,D_GS_ZDQT_LB,D_GS_ZDQT_FXDJ,D_GS_ZDR_CZZT}" />
<!-- 选择用户 -->
<ChooseUser v-model="chooseUserVisible" @choosedUsers="handleUserSelected" :roleIds="roleIds" /> <!-- 转线索 -->
<ZxsForm v-if="showzxs" ref="zxsDilof" @change="getList" :dic="{ D_BZ_SF, D_BZ_XB, D_GS_XS_LY, D_BZ_SSZT, D_GS_XS_LX, D_GS_XS_QTLX }"></ZxsForm>
</div>
</template>
<script setup>
2025-07-12 17:33:59 +08:00
import * as MOSTY from "@/components/MyComponents/index";
2025-07-12 16:43:04 +08:00
import ZxsForm from "../mpvGroup/components/zxsForm.vue";
import ChooseUser from "@/components/ChooseList/ChooseUser/index.vue";
import PageTitle from "@/components/aboutTable/PageTitle.vue";
import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
2025-07-12 16:43:04 +08:00
import EditForm from "../mpvGroup/components/addForm.vue";
import { qcckGet, qcckPost } from "@/api/qcckApi.js";
import { ElMessage } from "element-plus";
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
const { proxy } = getCurrentInstance();
2025-07-12 16:43:04 +08:00
const { D_GS_ZDR_CZZT,D_GS_BK_SQLX, D_GS_ZDQT_FXDJ, D_GS_ZDR_RYJB, D_GS_ZDQT_LB, D_GS_ZDR_BK_ZT, D_GS_BQ_LX, D_GS_ZDQT_ZT, D_BZ_SF, D_BZ_XB, D_GS_XS_LY, D_BZ_SSZT, D_GS_XS_LX, D_GS_XS_QTLX } = proxy.$dict("D_GS_ZDR_CZZT","D_GS_BK_SQLX", "D_GS_ZDQT_FXDJ", "D_GS_ZDR_RYJB", "D_GS_ZDQT_LB", "D_GS_ZDR_BK_ZT", "D_GS_BQ_LX", "D_GS_ZDQT_ZT", "D_BZ_SF", "D_BZ_XB", "D_GS_XS_LY", "D_BZ_SSZT", "D_GS_XS_LX", "D_GS_XS_QTLX"); //获取字典数据
const showzxs = ref(false);
2025-07-12 17:33:59 +08:00
const btnloading = ref(false)
2025-07-12 16:43:04 +08:00
const queryFrom = ref({});
2025-07-12 17:33:59 +08:00
const chooseRow = ref({})
2025-07-12 16:43:04 +08:00
const ids = ref([]);
2025-07-12 17:33:59 +08:00
const elRowForm = ref()
const elRowForm1 = ref()
2025-07-12 16:43:04 +08:00
const choosList = ref([]);
const show = ref(false);
const chooseUserVisible = ref(false); //审批流程
const roleIds = ref([]); //角色id
const editFormDiloag = ref();
const searchBox = ref(); //搜索框
2025-07-12 16:43:04 +08:00
const visible = ref(false);
const visiblefp = ref(false);
const zxsDilof = ref();
const obj = ref({});
2025-07-12 17:33:59 +08:00
const rules = reactive({
sftg: [{ required: true, message: "请选择是否通过", trigger: "change" }],
shBtgyy: [{ required: true, message: "请输入不通过原因", trigger: "blur" }],
spBtgyy: [{ required: true, message: "请输入不通过原因", trigger: "blur" }]
});
const searchConfiger = ref([
{
label: "群体名称",
prop: "qtMc",
placeholder: "请输入群体名称",
showType: "input"
},
{
label: "群体风险等级",
prop: "qtFxdj",
placeholder: "请选择群体风险等级",
showType: "select",
options: D_GS_ZDQT_FXDJ
},
{
label: "重点人人员级别",
prop: "zdrRyjb",
placeholder: "请选择重点人人员级别",
showType: "select",
options: D_GS_ZDR_RYJB
2025-07-12 16:43:04 +08:00
},
{
label: "群体类别",
prop: "qtLb",
placeholder: "请选择群体类别",
showType: "select",
options: D_GS_ZDQT_LB
},
{
label: "布控状态",
prop: "zdrBkZt",
placeholder: "请输入布控装态",
showType: "select",
options: D_GS_ZDR_BK_ZT
},
{
label: "布控类型",
prop: "bkzt",
placeholder: "请输入布控类型",
showType: "select",
options: D_GS_BQ_LX
}
]);
2025-07-12 16:43:04 +08:00
const pageData = reactive({
2025-07-12 16:43:04 +08:00
tableData: [],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
2025-07-12 16:43:04 +08:00
showSelectType: "checkBox",
loading: false
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
2025-07-12 16:43:04 +08:00
},
controlsWidth: 220,
tableColumn: [
2025-07-12 16:43:04 +08:00
{ label: "群体基本信息", prop: "jbxx", showSolt: true,width:300 },
{ label: "背景信息", prop: "bgxx", showSolt: true,width:300 },
{ label: "管控信息", prop: "gkxx", showSolt: true,width:300 },
{ label: "稳控人数", prop: "zdryList", showSolt: true },
{ label: "状态", prop: "qtZt", showSolt: true }
]
});
2025-07-12 16:43:04 +08:00
onMounted(() => {
tabHeightFn();
2025-07-12 16:43:04 +08:00
getList();
});
// 搜索
const onSearch = (val) => {
queryFrom.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
getList();
};
const changeNo = (val) => {
pageData.pageConfiger.pageNum = val;
getList();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
getList();
};
// 获取列表
2025-07-12 16:43:04 +08:00
const getList = () => {
pageData.tableConfiger.loading = true;
2025-07-12 16:43:04 +08:00
let data = { ...pageData.pageConfiger, ...queryFrom.value,qtZt:'02' };
qcckGet(data, "/mosty-gsxt/tbGsxtZdqt/selectPage").then((res) => {
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
}).catch(() => {
pageData.tableConfiger.loading = false;
});
};
2025-07-12 17:33:59 +08:00
const cancelRow = (row) => {
row.visible = false;
chooseRow.value = {};
btnloading.value = false;
elRowForm.value.resetFields()
};
// 审核
const handleSend = (val) =>{
elRowForm.value.validate((valid) => {
if(!valid) return;
btnloading.value = true;
qcckPost(chooseRow.value, "/mosty-gsxt/tbGsxtZdqt/toExamine").then(() => {
proxy.$message({ type: "success", message: "审核成功" });
val.visible = false;
btnloading.value = false;
chooseRow.value = {};
getList();
}).catch(()=>{
btnloading.value = false;
});
})
}
// 审批
const cancelRowSp = (row) =>{
row.visible1 = false;
chooseRow.value = {};
btnloading.value = false;
elRowForm1.value.resetFields()
}
// 审批
const handleSendSp = () =>{
elRowForm1.value.validate((valid) => {
if(!valid) return;
btnloading.value = true;
qcckPost(chooseRow.value, "/mosty-gsxt/tbGsxtZdqt/audits").then(() => {
proxy.$message({ type: "success", message: "审批成功" });
val.visible1 = false;
btnloading.value = false;
chooseRow.value = {};
getList();
}).catch(()=>{
btnloading.value = false;
});
})
}
// 详情
2025-07-12 16:43:04 +08:00
const addEdit = (type, row) => {
show.value = true;
visible.value = false;
nextTick(() => {
editFormDiloag.value.init(type, row);
});
};
const chooseData = (data) => {
ids.value = Array.isArray(data) ? data.map((item) => item.id) : [];
choosList.value = Array.isArray(data) ? data : [];
};
// 选择申请数据数据
const handleApplication = () => {
if (ids.value.length === 0)return ElMessage.error("请先选择需要布控的重点群体");
qcckPost({ ids: ids.value }, "/mosty-gsxt/tbGsxtZdqt/addBksq").then(() => {
ElMessage.success("申请成功");
visible.value = false;
getList();
}).catch(() => {
ElMessage.error("布控申请失败");
});
};
const handleUserSelected = (val) => {
obj.value.fpmc = val[0].userName;
obj.value.fpid = val[0].id;
};
const handlefp = () => {
if (ids.value.length === 0) return ElMessage.error("请先选择需要分配的重点群体");
qcckPost({ ids: ids.value, uid: obj.value.fpid },"/mosty-gsxt/tbGsxtZdqt/addGkmj").then(() => {
ElMessage.success("分配成功");
visible.value = false;
visiblefp.value = false;
getList();
}).catch(() => {
ElMessage.error("分配失败");
});
};
// 移交管控
const handleMove = () => {
if (ids.value.length === 0) return ElMessage.error("请先选择需要移交管控的重点群体");
proxy.$confirm("是否确定移交?", "警告", { type: "warning" }).then(() => {
qcckPost({ ids: ids.value }, "/mosty-gsxt/tbGsxtZdqt/addSfyj").then(() => {
ElMessage.success("移交管控成功");
getList();
}).catch(() => {
ElMessage.error("移交管控失败");
});
}).catch(() => { });
};
const handleZxs = () => {
if (ids.value.length === 0) return ElMessage.error("请先选择需要转线索的重点群体");
showzxs.value = true;
nextTick(() => {
zxsDilof.value.init(choosList.value);
});
};
// 表格高度计算
const tabHeightFn = () => {
2025-07-12 16:43:04 +08:00
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () {
tabHeightFn();
};
};
2025-07-12 16:43:04 +08:00
defineExpose({});
</script>
2025-07-12 16:43:04 +08:00
<style>
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
</style>