This commit is contained in:
2025-07-08 13:51:06 +08:00
parent b0b4644c2b
commit 9ccca009ef
3 changed files with 341 additions and 26 deletions

View File

@ -4,21 +4,34 @@
<PageTitle title="重点群体管理">
<el-popover placement="bottom" :visible="visible" :width="400" trigger="click">
<template #reference>
<el-button type="primary" @click="visible = !visible" size="small">布控申请
<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">列控申请</el-button>
<el-button size="small" type="primary">变更申请</el-button>
<el-button size="small" type="primary">管控申请</el-button>
<el-button size="small" type="primary">协控申请</el-button>
<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-button size="small" type="primary">指定分配</el-button>
<el-button size="small" type="primary">转线索</el-button>
<el-button size="small" type="primary">移交管控</el-button>
<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', '')">
<el-icon style="vertical-align: middle"><CirclePlus /></el-icon>
<el-icon style="vertical-align: middle">
<CirclePlus />
</el-icon>
<span style="vertical-align: middle">新增</span>
</el-button>
</PageTitle>
@ -37,7 +50,6 @@
<img src="" alt="" />
<ul>
<li>群体名称{{ row.qtMc }}</li>
<!-- <li>所属辖区</li> -->
<li class="rowClass">
风险等级
<DictTag :tag="false" :value="row.qtFxdj" :options="D_GS_ZDQT_FXDJ" />
@ -69,7 +81,8 @@
<!-- 操作 -->
<template #controls="{ row }">
<el-link size="small" v-if="row.qtZt == '01' || row.qtZt == '03' || row.qtZt == '06'" @click="openDetail(row)">送审</el-link>
<el-link size="small" v-if="row.qtZt == '01' || row.qtZt == '03' || row.qtZt == '06'"
@click="openDetail(row)">送审</el-link>
<el-link size="small" type="success" @click="addEdit('edit', row)" v-if="row.qtZt !== '05'">编辑</el-link>
<el-link size="small" type="primary" @click="infoList('info', row)">查看</el-link>
<el-link size="small" type="danger" @click="deleteRow(row)">删除</el-link>
@ -85,18 +98,27 @@
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="autoEdit()"> 确定 </el-button>
<el-button type="primary" @click="autoEdit"> 确定 </el-button>
</div>
</template>
</el-dialog>
<!-- 编辑 - 新增-->
<EditForm v-if="show" @updateDate="getList" ref="editFormDiloag" />
<!-- 详情 -->
<DetailForm ref="detailDiloag" />
<!-- 选择用户 -->
<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>
import ZxsForm from "./components/zxsForm.vue";
import ChooseUser from "@/components/MyComponents/ChooseUser/index.vue";
import DetailForm from "./components/infoForm.vue";
import PageTitle from "@/components/aboutTable/PageTitle.vue";
import MyTable from "@/components/aboutTable/MyTable.vue";
@ -107,28 +129,50 @@ import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { ElMessage } from "element-plus";
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
const { proxy } = getCurrentInstance();
const showzxs = ref(false);
const {
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_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_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_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 show = ref(false);
const chooseUserVisible = ref(false); //审批流程
const roleIds = ref([]); //角色id
const editFormDiloag = ref();
const detailDiloag = ref();
const searchBox = ref(); //搜索框
const autoId = ref();
const dialogVisible = ref(false);
const visible = ref(false);
const visiblefp = ref(false);
const zxsDilof = ref();
const obj = ref({
fpmc: ""
});
const searchConfiger = ref([
{
label: "群体名称",
@ -211,12 +255,14 @@ const openDetail = (row) => {
const autoEdit = () => {
dialogVisible.value = false;
let url = `/mosty-gsxt/tbGsxtZdqt/subExamine/${autoId.value}`;
qcckPost({}, url).then((res) => {
ElMessage.success("提交成功");
getList();
}).catch(() => {
ElMessage.error("提交失败");
});
qcckPost({}, url)
.then((res) => {
ElMessage.success("提交成功");
getList();
})
.catch(() => {
ElMessage.error("提交失败");
});
};
// 搜索
@ -239,7 +285,7 @@ const changeSize = (val) => {
};
// 获取列表
const getList = (val) => {
const getList = () => {
pageData.tableConfiger.loading = true;
let data = { ...pageData.pageConfiger, ...queryFrom.value };
let url = "/mosty-gsxt/tbGsxtZdqt/selectPage";
@ -254,17 +300,88 @@ const getList = (val) => {
});
};
// 详情editFormDiloag
// 详情
const addEdit = (type, row) => {
show.value = true;
visible.value = false;
nextTick(() => {
editFormDiloag.value.init(type, row);
});
};
const ids = ref([]);
const choosList = ref([]);
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 = () => {
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
pageData.tableHeight =
window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () {
tabHeightFn();
};