feat: 1.对接全域布控下菜单的增删查改功能,以及用户操作流程优化。2.对接人力情报采集系统采集流转列表,搜索,新增接口

This commit is contained in:
jy
2025-06-04 17:27:57 +08:00
parent 2b3da38702
commit d8bee57f6b
44 changed files with 8479 additions and 594 deletions

View File

@ -0,0 +1,407 @@
<template>
<el-dialog
:title="titleValue"
width="1500px"
:model-value="modelValue"
append-to-body
@close="closed"
>
<div class="table_class">
<div style="width: 48%">
<el-tabs v-model="activeTab" type="card" @tab-click="handleTabClick">
<el-tab-pane
v-for="tab in tabs"
:key="tab.dm"
:label="tab.label"
:name="tab.dm"
>
<!-- 添加 v-if 条件 -->
<template v-if="activeTab !== '03'">
<el-button
v-for="(it, idx) in props.dic.D_GS_BQ_LB"
:key="idx"
:type="type == it.zdmc ? 'success' : ''"
@click="chooseListType(it.zdmc)"
>
<span style="vertical-align: middle">{{ it.zdmc }}</span>
</el-button>
</template>
<el-table
v-loading="loading"
ref="multipleUserRef"
@selection-change="handleSelectionChange"
:data="tableData"
border
:row-key="keyid"
style="width: 100%"
>
<el-table-column
type="selection"
width="55"
:reserve-selection="true"
/>
<el-table-column prop="bqDm" align="center" label="标签代码" />
<el-table-column prop="bqLb" align="center" label="标签类别">
<template #default="{ row }">
<DictTag
:value="row.bqLb"
:tag="false"
:options="props.dic.D_GS_BQ_LB"
/>
</template>
</el-table-column>
<el-table-column prop="bqLx" align="center" label="标签类型">
<template #default="{ row }">
<DictTag
:value="row.bqLx"
:tag="false"
:options="props.dic.D_GS_BQ_LX"
/>
</template>
</el-table-column>
<el-table-column prop="bqMc" align="center" label="标签名称" />
<el-table-column prop="bqZl" align="center" label="标签种类">
<template #default="{ row }">
<DictTag
:value="row.bqZl"
:tag="false"
:options="props.dic.D_GS_BQ_ZL"
/>
</template>
</el-table-column>
</el-table>
<div class="fenye">
<el-pagination
class="pagination"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="listQuery.current"
:page-sizes="[10, 20, 50, 100]"
:page-size="listQuery.size"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
></el-pagination>
</div>
</el-tab-pane>
</el-tabs>
</div>
<div style="width: 48%">
<div class="selected-tabBox">
<el-table
:data="selectedData"
border
:row-key="keyid"
style="width: 100%"
>
<el-table-column prop="bqDm" align="center" label="标签代码" />
<el-table-column prop="bqLb" align="center" label="标签类别">
<template #default="{ row }">
<DictTag
:value="row.bqLb"
:tag="false"
:options="props.dic.D_GS_BQ_LB"
/>
</template>
</el-table-column>
<el-table-column prop="bqLx" align="center" label="标签类型">
<template #default="{ row }">
<DictTag
:value="row.bqLx"
:tag="false"
:options="props.dic.D_GS_BQ_LX"
/>
</template>
</el-table-column>
<el-table-column prop="bqMc" align="center" label="标签名称" />
<el-table-column prop="bqZl" align="center" label="标签种类">
<template #default="{ row }">
<DictTag
:value="row.bqZl"
:tag="false"
:options="props.dic.D_GS_BQ_ZL"
/>
</template>
</el-table-column>
<el-table-column label="操作">
<template #default="{ row }">
<el-button
type="danger"
@click="handleRemoveFromSelectedData(row)"
>移除</el-button
>
</template>
</el-table-column>
</el-table>
</div>
<div class="fenye">
<el-pagination
class="pagination"
@size-change="handleSizeChangeRight"
@current-change="handleCurrentChangeRight"
:current-page="listQuery.current"
:page-sizes="[10, 20, 50, 100]"
:page-size="listQuery.sizeRight"
layout="total, sizes, prev, pager, next, jumper"
:total="selectedData.length"
></el-pagination>
</div>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="closed">取消</el-button>
<el-button type="primary" @click="onComfirm">确认</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { defineProps, ref, onMounted, nextTick } from "vue";
import { qcckGet } from "@/api/qcckApi.js";
const props = defineProps({
modelValue: {
type: Boolean,
required: true
},
dic: {
type: Object,
default: () => {}
},
bqDl: {
type: String,
default: "01"
},
bqLx: {
type: String,
default: "01"
},
titleValue: {
type: String,
default: "选择大类"
},
LeaderType: {
type: String,
default: ""
},
// 是否单选
Single: {
type: Boolean,
default: false
},
roleIds: {
type: Array,
default: []
}
});
const tabs = ref([]);
const activeTab = ref("");
const total = ref(0);
const listQuery = ref({
current: 1,
size: 20,
bqZl: activeTab.value
});
const loading = ref(false);
const tableData = ref([]);
const selectedData = ref([]);
const multipleUserRef = ref(null);
const emits = defineEmits(["update:modelValue", "chooseDate"]);
const type = ref("标签大类");
onMounted(() => {
console.log(props.dic.D_GS_BQ_ZL, "props.dic.D_GS_BQ_ZL");
tabs.value = props.dic.D_GS_BQ_ZL;
activeTab.value = tabs.value?.[0]?.dm || "01";
handleFilter();
});
// 选择列表的大类和细类
const chooseListType = (val) => {
type.value = val;
listQuery.current = 1;
getDataList();
};
const closed = () => {
emits("update:modelValue", false);
};
const reset = () => {
listQuery.value = { current: 1, size: 20, bqZl: activeTab.value };
getDataList();
};
const keyid = (row) => {
return row.id;
};
// 为用户分配角色
const onComfirm = () => {
emits("chooseDate", selectedData.value);
let data = { type: props.LeaderType, userList: selectedData.value };
emits("chooseDateLeader", data);
closed();
};
//数据回显
const setValues = (list) => {
selectedData.value = list.map((item) => {
// 统一id字段处理逻辑
if (item.bqId) {
return { ...item, id: item.bqId };
}
return item;
});
nextTick(() => {
multipleUser();
});
};
/**
* pageSize 改变触发
*/
const handleSizeChange = (currentSize) => {
listQuery.value.size = currentSize;
getDataList();
};
/**
* 页码改变触发
*/
const handleCurrentChange = (currentPage) => {
listQuery.value.current = currentPage;
getDataList();
};
// 查询标签组合列表
const getDataList = () => {
listQuery.value.bqZl = activeTab.value;
loading.value = true;
//根据顶部标签切换不同的接口
let url =
activeTab.value == "01"
? "/mosty-gsxt/tbGsxtBqgl/selectPage"
: activeTab.value == "02"
? "/mosty-gsxt/tbGsxtBqgl/selectPage"
: "/mosty-gsxt/tbGsxtBqzh/selectPage";
let params = {};
console.log(activeTab.value, "activeTab.value");
if (activeTab.value === "01") {
params.bqLx = "01";
} else if (activeTab.value === "02") {
params.bqLx = "02";
} // activeTab.value 等于 "03" 时不传递参数
if (type.value === "标签大类") {
params.bqLb = "01";
} else if (type.value === "标签细类") {
params.bqLb = "02";
}
qcckGet(params, url).then((res) => {
// 添加 bqZl 字段
tableData.value = res?.records?.map((item) => ({
bqDm: item.bqDm,
bqId: item.id ? item.id : item.bqId ? item.bqId : row.bqDlId,
bqLb: item.bqLb,
bqLx: item.bqLx,
bqMc: item.bqMc,
bqZl: activeTab.value
}));
total.value = Number(res.total);
loading.value = false;
//确保在这里调用 multipleUser
multipleUser();
});
};
// 修改 multipleUser 函数
function multipleUser() {
nextTick(() => {
if (multipleUserRef.value && tableData.value.length > 0) {
tableData.value.forEach((item) => {
if (selectedData.value.some((selected) => selected.bqId == item.bqId)) {
// 因为 multipleUserRef 是数组,需要确定正确的索引
// 如果你只有一个表格,可以使用 [0]
multipleUserRef.value[0]?.toggleRowSelection(item, true);
}
});
}
});
}
const handleFilter = () => {
listQuery.value.current = 1;
getDataList();
};
const handleTabClick = () => {
reset();
};
const handleAddToSelectedData = (row) => {
console.log(row, selectedData.value, "handleAddToSelectedData row");
if (selectedData.value.some((item) => item.bqId === row.bqId)) {
return;
}
if (props.Single && selectedData.value.length > 0) {
selectedData.value = [];
}
selectedData.value.push({
bqDm: row.bqDm,
bqId: row.id ? row.id : row.bqId ? row.bqId : row.bqDlId,
bqLb: row.bqLb,
bqLx: row.bqLx,
bqMc: row.bqMc,
bqZl: activeTab.value
});
};
const handleRemoveFromSelectedData = (row) => {
const index = selectedData.value.findIndex((item) => item.bqId === row.bqId);
if (index !== -1) {
selectedData.value.splice(index, 1);
}
// 取消左侧表格中对应行的选中状态
multipleUserRef.value.toggleRowSelection(row, false);
};
const multipleSelectionUser = ref([]);
const handleSelectionChange = (val) => {
multipleSelectionUser.value = val;
multipleSelectionUser.value.forEach((row) => {
handleAddToSelectedData(row);
});
};
// 必须暴露方法父组件才能调用
defineExpose({
setValues
});
</script>
<style lang="scss" scoped>
@import "@/assets/css/layout.scss";
@import "@/assets/css/element-plus.scss";
.selected-tabBox {
margin-top: 56px;
}
</style>
<style>
.tabBoxRadio .el-checkbox__inner {
border-radius: 50% !important;
}
.tabBoxRadio .el-table__header-wrapper .el-checkbox {
display: none;
}
:deep(.el-dialog) {
background: #fff !important;
border-radius: 8px !important;
/* 其他样式 */
}
.table_class {
display: flex;
justify-content: space-between;
}
</style>

View File

@ -1,51 +1,305 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">重点群体管理 </span>
<span class="title">{{ title }}重点管理</span>
<div>
<el-button type="primary" size="small" :loading="loading" @click="submit" >保存</el-button>
<el-button
type="primary"
size="small"
:loading="loading"
@click="submit"
>保存</el-button
>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<FormMessage :formList="formData" ref="elform" :rules="rules"></FormMessage>
<FormMessage
v-model="listQuery"
:formList="formData"
ref="elform"
:rules="rules"
>
<!-- 人员标签模型-->
<template #bqList>
<el-button @click="openDialog('01')">选择</el-button>
<div class="boxlist">
<MyTable
:tableData="tableDate.bqList"
:tableColumn="tableDate.tableColumn"
:tableHeight="tableDate.tableHeight"
:key="tableDate.keyCount"
:tableConfiger="tableDate.tableConfiger"
:controlsWidth="tableDate.controlsWidth"
>
<template #bqLb="{ row }">
<DictTag :value="row.bqLb" :tag="false" :options="D_GS_BQ_LB" />
</template>
<template #bqLx="{ row }">
<DictTag :value="row.bqLx" :tag="false" :options="D_GS_BQ_LX" />
</template>
<template #bqZl="{ row }">
<DictTag :value="row.bqZl" :tag="false" :options="D_GS_BQ_ZL" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link type="danger" @click="delDictItem(row.bqId)"
>删除</el-link
>
</template>
</MyTable>
</div>
</template>
<!-- 管辖单位代码 -->
<template #gxSsbmdm>
<el-select
v-model="listQuery.gxSsbmdm"
placeholder="请选择管辖单位代码"
style="width: 240px"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
<!-- 户籍派出所代码 -->
<template #hjdPcsdm>
<el-select
v-model="listQuery.hjdPcsdm"
placeholder="请选择户籍派出所代码"
style="width: 240px"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
<!-- 诉求单位代码 -->
<template #sqSsbmdm>
<el-select
v-model="listQuery.sqSsbmdm"
placeholder="请选择户籍派出所代码"
style="width: 240px"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
<!-- 现住地派出所代码 -->
<template #xzdPcsdm>
<el-select
v-model="listQuery.xzdPcsdm"
placeholder="请选择现住地派出所代码"
style="width: 240px"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
<!-- 责任单位代码 -->
<template #zrSsbmdm>
<el-select
v-model="listQuery.zrSsbmdm"
placeholder="请选择责任单位代码"
style="width: 240px"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
</FormMessage>
<!-- 列表弹窗 -->
<TagSelectorDialog
v-model="chooseShow"
ref="tagDialog"
@chooseDate="handleTagSelect"
:dic="{ D_GS_BQ_ZL, D_GS_BQ_LB, D_GS_BQ_LX }"
/>
</div>
</div>
</template>
<script setup>
import FormMessage from '@/components/aboutTable/FormMessage.vue'
import MyTable from "@/components/aboutTable/MyTable.vue";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
import TagSelectorDialog from "./TagSelectorDialog.vue";
import * as rule from "@/utils/rules.js";
import { ref, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, nextTick } from "vue";
import {
ref,
defineExpose,
reactive,
onMounted,
defineEmits,
getCurrentInstance,
nextTick
} from "vue";
import { selectUserDeptPage } from "@/api/user-manage";
const emit = defineEmits(["updateDate"]);
const props = defineProps({
dic: Object
});
const { proxy } = getCurrentInstance();
const {
D_GS_BK_SSJZ,
D_GS_ZDR_RYJB,
D_GS_SSYJ,
D_GS_BQ_DJ,
D_BZ_XZQHDM,
D_BZ_MZ,
D_BZ_XB,
D_GS_ZDR_CZZT,
D_GS_BQ_ZL,
D_GS_BQ_LB,
D_GS_BQ_LX,
D_GS_ZDR_YJDJ
} = proxy.$dict(
"D_GS_BK_SSJZ",
"D_GS_ZDR_RYJB",
"D_GS_SSYJ",
"D_GS_BQ_DJ",
"D_BZ_XZQHDM",
"D_BZ_MZ",
"D_BZ_XB",
"D_GS_ZDR_CZZT",
"D_GS_BQ_ZL",
"D_GS_BQ_LB",
"D_GS_BQ_LX",
"D_GS_ZDR_YJDJ"
); //获取字典数据
const tagDialog = ref();
const dialogForm = ref(false); //弹窗
const formData = ref([
{ label: "姓名", prop: "xm", type: "input", },
{ label: "身份证号", prop: "sfzh", type: "input" },
{ label: "户籍地", prop: "hjd", type: "input"},
{ label: "户籍地派出所", prop: "hjdpcs", type: "input" },
{ label: "入库开始时间", prop: "kssj", type: "datetime"},
{ label: "入库结束时间", prop: "jssj", type: "datetime"},
{ label: "人员级别", prop: "ryjb", type: "select",options:[] },
{ label: "所属警种", prop: "ssjz", type: "input" },
{ label: "管辖单位", prop: "gxdw", type: "input" },
{ label: "涉及警种", prop: "sjjz", type: "input" },
{ label: "管控民警姓名", prop: "njxm", type: "input" },
{ label: "管控民警警号", prop: "mjjh", type: "input" },
{ label: "管控原因", prop: "gkyy", type: "textarea",width: '100%' },
{ label: "被管控人联系方式", prop: "lxfs", type: "input",},
{ label: "责任单位", prop: "zedw", type: "input",},
{ label: "人员标签大类", prop: "bqdl", type: "select",options:[]},
{ label: "人员标签细类", prop: "bqxl", type: "select",options:[]},
{ label: "姓名", prop: "ryXm", type: "input" },
{ label: "身份证号", prop: "rySfzh", type: "input" },
{ label: "户籍地派出所名称", prop: "hjdPcsmc", type: "input" },
{
label: "户籍地派出所代码",
prop: "hjdPcsdm",
type: "slot"
},
{ label: "管辖单位", prop: "gxSsbmmc", type: "input" },
{
label: "管辖单位代码",
prop: "gxSsbmdm",
type: "slot"
},
{ label: "户籍地区划", prop: "hjdQh", type: "select", options: D_BZ_XZQHDM },
{ label: "户籍地详址", prop: "hjdXz", type: "input" },
{ label: "人员出生日期", prop: "ryCsrq", type: "date" },
{ label: "人员籍贯", prop: "ryJg", type: "select", options: D_BZ_XZQHDM },
{ label: "人员联系电话", prop: "ryLxdh", type: "input" },
{ label: "人员民族", prop: "ryMz", type: "select", options: D_BZ_MZ },
{ label: "人员性别", prop: "ryXb", type: "select", options: D_BZ_XB },
{ label: "诉求单位名称", prop: "sqSsbmmc", type: "input" },
{
label: "诉求单位代码",
prop: "sqSsbmdm",
type: "slot"
},
{ label: "现住地派出所名称", prop: "xzdPcsmc", type: "input" },
{
label: "现住地派出所代码",
prop: "xzdPcsdm",
type: "slot"
},
{ label: "现住地区划", prop: "xzdQh", type: "select", options: D_BZ_XZQHDM },
{ label: "现住地详址", prop: "xzdXz", type: "input" },
{
label: "重点人处置状态",
prop: "zdrCzzt",
type: "select",
options: D_GS_ZDR_CZZT
},
{ label: "入库开始时间", prop: "zdrRkkssj", type: "datetime" },
{ label: "入库结束时间", prop: "zdrRkjssj", type: "datetime" },
{
label: "人员级别",
prop: "zdrRyjb",
type: "select",
options: D_GS_ZDR_RYJB
},
{ label: "所属警种", prop: "zdrSsjz", type: "select", options: D_GS_BK_SSJZ },
{
label: "涉及警种",
prop: "zdrSjjz",
type: "select",
options: D_GS_BK_SSJZ,
multiple: true
},
{
label: "重点人预警等级",
prop: "zdrYjdj",
type: "select",
options: D_GS_ZDR_YJDJ
},
{ label: "管控民警姓名", prop: "gkMjXm", type: "input" },
{ label: "管控民警警号", prop: "gkMjJh", type: "input" },
{ label: "管控原因", prop: "zdrLkyy", type: "textarea", width: "100%" },
{ label: "责任单位", prop: "zrSsbmmc", type: "input" },
{
label: "责任单位代码",
prop: "zrSsbmdm",
type: "slot"
},
// { label: "人员标签大类", prop: "bqdl", type: "select", options: [] },
// { label: "人员标签细类", prop: "bqxl", type: "select", options: [] },
{ label: "标签列表", prop: "bqList", type: "slot", width: "80%" }
]);
const listQuery = ref({
sfbqdj: []
}); //表单
const listQuery = ref({}); //表单
const deptList = ref([]); //部门列表
const chooseShow = ref(false); //选择弹窗
const tableDate = reactive({
bqList: [], //表格数据
keyCount: 0,
rykeyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false
},
total: 0,
tableHeight: 225,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
}, //分页
controlsWidth: 90, //操作栏宽度
tableColumn: [
{ label: "标签代码", prop: "bqDm" },
{ label: "标签类别", prop: "bqLb", showSolt: true },
{ label: "标签类型", prop: "bqLx", showSolt: true },
{ label: "标签名称", prop: "bqMc" },
{ label: "标签种类", prop: "bqZl", showSolt: true }
]
});
const loading = ref(false);
const elform = ref();
const title = ref("");
@ -53,47 +307,112 @@ const rules = reactive({
xsbt: [{ required: true, message: "请输入线索标题", trigger: "blur" }]
});
const editpeo = ref();
onMounted(() => {});
onMounted(() => {
getdepartmentList();
});
// 初始化数据
const init = (type, row,) => {
const init = (type, row) => {
dialogForm.value = true;
title.value = type == 'add' ? "新增" : "编辑";
title.value = type == "add" ? "新增" : type == "info" ? "详情" : "编辑";
if (row) getDataById(row.id);
};
// 根据id查询详情
const getDataById = (id) => {
// qcckGet({}, '/mosty-gsxt/tbGsxtBqgl/'+id).then((res) => {
// listQuery.value = res;
// });
qcckGet({}, "/mosty-gsxt/tbGsxtZdry/selectVoById/" + id).then((res) => {
listQuery.value = res;
listQuery.value.zdrSjjz = listQuery.value.zdrSjjz.split(",");
tableDate.bqList = res.bqList;
});
};
// 获取部门列表
const getdepartmentList = () => {
selectUserDeptPage().then((res) => {
deptList.value = res?.records.map((item) => ({
label: item.deptName,
value: item.deptId
}));
});
};
// 提交
const submit = () => {
elform.value.submit((data)=>{
// let url = title.value == "新增" ? '/mosty-gsxt/tbGsxtBqgl/save':'/mosty-gsxt/tbGsxtBqgl/update';
// let params = { ...data }
// qcckPost(params, url).then((res) => {
// proxy.$message({ type: "success", message: title.value + "成功" });
// emit("updateDate");
// close();
// }).catch(() => {});
elform.value.submit((data) => {
data.zdrSjjz = data.zdrSjjz.join(",");
let url =
title.value == "新增"
? "/mosty-gsxt/tbGsxtZdry/save"
: "/mosty-gsxt/tbGsxtZdry/update";
let params = { ...data };
qcckPost(params, url)
.then((res) => {
proxy.$message({ type: "success", message: title.value + "成功" });
emit("onSearch");
close();
})
.catch(() => {});
});
};
// 打开弹窗
const openDialog = (type) => {
chooseShow.value = true;
nextTick(() => {
tagDialog.value.setValues(listQuery.value.bqList);
});
};
const handleTagSelect = (selectedTags) => {
console.log("已选标签:", selectedTags);
tableDate.bqList = selectedTags.map((item) => ({
bqDm: item.bqDm || "",
bqId: item.bqId || "",
bqLb: item.bqLb || "",
bqLx: item.bqLx || "",
bqMc: item.bqMc || "",
bqZl: item.bqZl || ""
}));
listQuery.value.bqList = tableDate.bqList;
// 每个标签包含: bqDm, bqId, bqLb, bqLx, bqMc, bqZl 属性
};
// 接收父组件传入的数据并回显
const setFormData = (data) => {
tableDate.bqList = data.bqList ?? [];
listQuery.value = {
...data // 假设 data 包含所有需要的字段
};
};
// 关闭
const close = () => {
listQuery.value = {};
dialogForm.value = false;
loading.value = false;
};
defineExpose({ init });
// 删除
const delDictItem = (bqId) => {
tableDate.bqList = tableDate.bqList.filter((item) => item.bqId !== bqId);
listQuery.value.bqList = tableDate.bqList;
};
// 2. 暴露获取数据的方法
const getFormData = () => {
// 可以在这里添加验证逻辑
return {
formData: listQuery.value
};
};
defineExpose({ init, setFormData });
</script>
<style lang="scss" scoped>
@import "~@/assets/css/layout.scss";
@import "~@/assets/css/element-plus.scss";
::v-deep .el-tabs--card>.el-tabs__header .el-tabs__item.is-active{
::v-deep .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
color: #0072ff;
background: rgba(0, 114, 255, 0.3);
}
.boxlist {
width: 99%;
height: 225px;
margin-top: 10px;
overflow: hidden;
}
</style>

View File

@ -0,0 +1,492 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">{{ title }}重点人管理</span>
<div>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<FormMessage
v-model="listQuery"
:formList="formData"
ref="elform"
:rules="rules"
>
<!-- 人员标签模型-->
<template #bqList>
<!-- <el-button @click="openDialog('01')">选择</el-button> -->
<div class="boxlist">
<MyTable
:tableData="tableDate.bqList"
:tableColumn="tableDate.tableColumn"
:tableHeight="tableDate.tableHeight"
:key="tableDate.keyCount"
:tableConfiger="tableDate.tableConfiger"
:controlsWidth="tableDate.controlsWidth"
>
<template #bqLb="{ row }">
<DictTag :value="row.bqLb" :tag="false" :options="D_GS_BQ_LB" />
</template>
<template #bqLx="{ row }">
<DictTag :value="row.bqLx" :tag="false" :options="D_GS_BQ_LX" />
</template>
<template #bqZl="{ row }">
<DictTag :value="row.bqZl" :tag="false" :options="D_GS_BQ_ZL" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link type="danger" @click="delDictItem(row.bqId)"
>删除</el-link
>
</template>
</MyTable>
</div>
</template>
<!-- 管辖单位代码 -->
<template #gxSsbmdm>
<el-select
v-model="listQuery.gxSsbmdm"
placeholder="请选择管辖单位代码"
style="width: 240px"
:disabled="true"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
<!-- 户籍派出所代码 -->
<template #hjdPcsdm>
<el-select
v-model="listQuery.hjdPcsdm"
placeholder="请选择户籍派出所代码"
style="width: 240px"
:disabled="true"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
<!-- 诉求单位代码 -->
<template #sqSsbmdm>
<el-select
v-model="listQuery.sqSsbmdm"
placeholder="请选择户籍派出所代码"
style="width: 240px"
:disabled="true"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
<!-- 现住地派出所代码 -->
<template #xzdPcsdm>
<el-select
v-model="listQuery.xzdPcsdm"
placeholder="请选择现住地派出所代码"
style="width: 240px"
:disabled="true"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
<!-- 责任单位代码 -->
<template #zrSsbmdm>
<el-select
v-model="listQuery.zrSsbmdm"
placeholder="请选择责任单位代码"
style="width: 240px"
:disabled="true"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
</FormMessage>
<!-- 列表弹窗 -->
<TagSelectorDialog
v-model="chooseShow"
ref="tagDialog"
@chooseDate="handleTagSelect"
:dic="{ D_GS_BQ_ZL, D_GS_BQ_LB, D_GS_BQ_LX }"
/>
</div>
</div>
</template>
<script setup>
import MyTable from "@/components/aboutTable/MyTable.vue";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
import TagSelectorDialog from "./TagSelectorDialog.vue";
import * as rule from "@/utils/rules.js";
import {
ref,
defineExpose,
reactive,
onMounted,
defineEmits,
getCurrentInstance,
nextTick
} from "vue";
import { selectUserDeptPage } from "@/api/user-manage";
const emit = defineEmits(["updateDate"]);
const props = defineProps({
dic: Object
});
const { proxy } = getCurrentInstance();
const {
D_GS_BK_SSJZ,
D_GS_ZDR_RYJB,
D_GS_SSYJ,
D_GS_BQ_DJ,
D_BZ_XZQHDM,
D_BZ_MZ,
D_BZ_XB,
D_GS_ZDR_CZZT,
D_GS_BQ_ZL,
D_GS_BQ_LB,
D_GS_BQ_LX,
D_GS_ZDR_YJDJ
} = proxy.$dict(
"D_GS_BK_SSJZ",
"D_GS_ZDR_RYJB",
"D_GS_SSYJ",
"D_GS_BQ_DJ",
"D_BZ_XZQHDM",
"D_BZ_MZ",
"D_BZ_XB",
"D_GS_ZDR_CZZT",
"D_GS_BQ_ZL",
"D_GS_BQ_LB",
"D_GS_BQ_LX",
"D_GS_ZDR_YJDJ"
); //获取字典数据
const tagDialog = ref();
const dialogForm = ref(false); //弹窗
const formData = ref([
{ label: "姓名", prop: "ryXm", type: "input", disabled: true },
{ label: "身份证号", prop: "rySfzh", type: "input", disabled: true },
{
label: "户籍地派出所名称",
prop: "hjdPcsmc",
type: "input",
disabled: true
},
{
label: "户籍地派出所代码",
prop: "hjdPcsdm",
type: "slot",
disabled: true
},
{ label: "管辖单位", prop: "gxSsbmmc", type: "input", disabled: true },
{
label: "管辖单位代码",
prop: "gxSsbmdm",
type: "slot",
disabled: true
},
{
label: "户籍地区划",
prop: "hjdQh",
type: "select",
options: D_BZ_XZQHDM,
disabled: true
},
{ label: "户籍地详址", prop: "hjdXz", type: "input", disabled: true },
{ label: "人员出生日期", prop: "ryCsrq", type: "date", disabled: true },
{
label: "人员籍贯",
prop: "ryJg",
type: "select",
options: D_BZ_XZQHDM,
disabled: true
},
{ label: "人员联系电话", prop: "ryLxdh", type: "input", disabled: true },
{
label: "人员民族",
prop: "ryMz",
type: "select",
options: D_BZ_MZ,
disabled: true
},
{
label: "人员性别",
prop: "ryXb",
type: "select",
options: D_BZ_XB,
disabled: true
},
{ label: "诉求单位名称", prop: "sqSsbmmc", type: "input", disabled: true },
{
label: "诉求单位代码",
prop: "sqSsbmdm",
type: "slot",
disabled: true
},
{
label: "现住地派出所名称",
prop: "xzdPcsmc",
type: "input",
disabled: true
},
{
label: "现住地派出所代码",
prop: "xzdPcsdm",
type: "slot",
disabled: true
},
{
label: "现住地区划",
prop: "xzdQh",
type: "select",
options: D_BZ_XZQHDM,
disabled: true
},
{ label: "现住地详址", prop: "xzdXz", type: "input", disabled: true },
{
label: "重点人处置状态",
prop: "zdrCzzt",
type: "select",
options: D_GS_ZDR_CZZT,
disabled: true
},
{
label: "入库开始时间",
prop: "zdrRkkssj",
type: "datetime",
disabled: true
},
{
label: "入库结束时间",
prop: "zdrRkjssj",
type: "datetime",
disabled: true
},
{
label: "人员级别",
prop: "zdrRyjb",
type: "select",
options: D_GS_ZDR_RYJB,
disabled: true
},
{
label: "所属警种",
prop: "zdrSsjz",
type: "select",
options: D_GS_BK_SSJZ,
disabled: true
},
{
label: "涉及警种",
prop: "zdrSjjz",
type: "select",
options: D_GS_BK_SSJZ,
multiple: true,
disabled: true
},
{
label: "重点人预警等级",
prop: "zdrYjdj",
type: "select",
options: D_GS_ZDR_YJDJ,
disabled: true
},
{ label: "管控民警姓名", prop: "gkMjXm", type: "input", disabled: true },
{ label: "管控民警警号", prop: "gkMjJh", type: "input", disabled: true },
{
label: "管控原因",
prop: "zdrLkyy",
type: "textarea",
width: "100%",
disabled: true
},
{ label: "责任单位", prop: "zrSsbmmc", type: "input", disabled: true },
{
label: "责任单位代码",
prop: "zrSsbmdm",
type: "slot",
disabled: true
},
// { label: "人员标签大类", prop: "bqdl", type: "select", options: [] },
// { label: "人员标签细类", prop: "bqxl", type: "select", options: [] },
{ label: "标签列表", prop: "bqList", type: "slot", width: "80%" }
]);
const listQuery = ref({}); //表单
const deptList = ref([]); //部门列表
const chooseShow = ref(false); //选择弹窗
const tableDate = reactive({
bqList: [], //表格数据
keyCount: 0,
rykeyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false
},
total: 0,
tableHeight: 225,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
}, //分页
controlsWidth: 90, //操作栏宽度
tableColumn: [
{ label: "标签代码", prop: "bqDm" },
{ label: "标签类别", prop: "bqLb", showSolt: true },
{ label: "标签类型", prop: "bqLx", showSolt: true },
{ label: "标签名称", prop: "bqMc" },
{ label: "标签种类", prop: "bqZl", showSolt: true }
]
});
const chooseType = ref("01"); //选择弹窗类型
const chooseTitle = ref(""); //选择弹窗
const loading = ref(false);
const elform = ref();
const title = ref("");
const rules = reactive({
xsbt: [{ required: true, message: "请输入线索标题", trigger: "blur" }]
});
const editpeo = ref();
onMounted(() => {
getdepartmentList();
});
// 初始化数据
const init = (type, row) => {
dialogForm.value = true;
title.value = type == "add" ? "新增" : type == "info" ? "详情" : "编辑";
if (row) getDataById(row.id);
};
// 根据id查询详情
const getDataById = (id) => {
qcckGet({}, "/mosty-gsxt/tbGsxtZdry/selectVoById/" + id).then((res) => {
listQuery.value = res;
listQuery.value.zdrSjjz = listQuery.value.zdrSjjz.split(",");
tableDate.bqList = res.bqList;
});
};
// 获取部门列表
const getdepartmentList = () => {
selectUserDeptPage().then((res) => {
deptList.value = res?.records.map((item) => ({
label: item.deptName,
value: item.deptId
}));
});
};
// 提交
const submit = () => {
elform.value.submit((data) => {
data.zdrSjjz = data.zdrSjjz.join(",");
let url =
title.value == "新增"
? "/mosty-gsxt/tbGsxtZdry/save"
: "/mosty-gsxt/tbGsxtZdry/update";
let params = { ...data };
qcckPost(params, url)
.then((res) => {
proxy.$message({ type: "success", message: title.value + "成功" });
emit("onSearch");
close();
})
.catch(() => {});
});
};
// 打开弹窗
const openDialog = (type) => {
chooseShow.value = true;
chooseType.value = type;
chooseTitle.value = "请选择标签";
nextTick(() => {
tagDialog.value.setValues(listQuery.value.bqList);
});
};
const handleTagSelect = (selectedTags) => {
console.log("已选标签:", selectedTags);
tableDate.bqList = selectedTags.map((item) => ({
bqDm: item.bqDm || "",
bqId: item.bqId || "",
bqLb: item.bqLb || "",
bqLx: item.bqLx || "",
bqMc: item.bqMc || "",
bqZl: item.bqZl || ""
}));
listQuery.value.bqList = tableDate.bqList;
// 每个标签包含: bqDm, bqId, bqLb, bqLx, bqMc, bqZl 属性
};
// 接收父组件传入的数据并回显
const setFormData = (data) => {
tableDate.bqList = data.bqList ?? [];
listQuery.value = {
...data // 假设 data 包含所有需要的字段
};
};
// 关闭
const close = () => {
listQuery.value = {};
dialogForm.value = false;
loading.value = false;
};
// 删除
const delDictItem = (bqId) => {
tableDate.bqList = tableDate.bqList.filter((item) => item.bqId !== bqId);
listQuery.value.bqList = tableDate.bqList;
};
// 2. 暴露获取数据的方法
const getFormData = () => {
// 可以在这里添加验证逻辑
return {
formData: listQuery.value
};
};
defineExpose({ init, setFormData });
</script>
<style lang="scss" scoped>
@import "~@/assets/css/layout.scss";
@import "~@/assets/css/element-plus.scss";
::v-deep .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
color: #0072ff;
background: rgba(0, 114, 255, 0.3);
}
.boxlist {
width: 99%;
height: 225px;
margin-top: 10px;
overflow: hidden;
}
</style>

View File

@ -2,7 +2,9 @@
<div>
<div class="titleBox">
<PageTitle title="重点人管理">
<el-button type="primary" size="small" v-for="it in btns" :key="it"> {{ it }}</el-button>
<el-button type="primary" size="small" v-for="it in btns" :key="it">
{{ it }}</el-button
>
<el-button type="primary" size="small" @click="addEdit('add', '')">
<el-icon style="vertical-align: middle"><CirclePlus /></el-icon>
<span style="vertical-align: middle">新增</span>
@ -32,41 +34,85 @@
:controlsWidth="pageData.controlsWidth"
@chooseData="chooseData"
>
<template #ryxx>
<div>
<img src="" alt="">
<ul>
<li>姓名</li>
<li>性别</li>
<li>籍贯</li>
<li>身份证</li>
<li>出生日期</li>
<li>民族</li>
</ul>
</div>
<div class="flex">
<el-button type="primary" size="small"> 涉恐人员</el-button>
<el-button type="primary" size="small"> 涉稳人员</el-button>
<el-button type="primary" size="small"> 在逃人员</el-button>
</div>
</template>
<template #jzxx="{row}">
<div>户籍地区化</div>
<div>户籍派出所</div>
<div>户籍地详址</div>
</template>
<template #gxdw="{row}">
<div>管辖单位</div>
<div>人类类别</div>
<div>人员级别</div>
<div>管控原因</div>
<div>管控状态</div>
</template>
<template #ryxx="{ row }">
<div>
<img src="" alt="" />
<ul>
<li>姓名{{ row.rySfzh }}</li>
<li class="rowClass">
性别
<DictTag :tag="false" :value="row.ryXb" :options="D_BZ_XB" />
</li>
<li class="rowClass">
籍贯
<DictTag
:tag="false"
:value="row.ryJg"
:options="D_BZ_XZQHDM"
/>
</li>
<li>身份证{{ row.rySfzh }}</li>
<li>出生日期{{ row.ryCsrq }}</li>
<li class="rowClass">
民族
<DictTag :tag="false" :value="row.ryMz" :options="D_BZ_MZ" />
</li>
</ul>
</div>
<div class="flex">
<el-button type="primary" size="small"> 涉恐人员</el-button>
<el-button type="primary" size="small"> 涉稳人员</el-button>
<el-button type="primary" size="small"> 在逃人员</el-button>
</div>
</template>
<template #jzxx="{ row }">
<div class="rowClass">
户籍地区划
<DictTag :tag="false" :value="row.hjdQh" :options="D_BZ_XZQHDM" />
</div>
<div>户籍派出所{{ row.hjdPcsmc }}</div>
<div>户籍地详址{{ row.hjdXz }}</div>
</template>
<template #gxdw="{ row }">
<div>管辖单位{{ row.gxSsbmmc }}</div>
<div class="rowClass">
人员级别
<DictTag
:tag="false"
:value="row.zdrRyjb"
:options="D_GS_ZDR_RYJB"
/>
</div>
<div>管控原因{{ zdrLkyy }}</div>
<div class="rowClass">
管控状态
<DictTag
:tag="false"
:value="row.zdrBkZt"
:options="D_GS_ZDR_BK_ZT"
/>
</div>
</template>
<template #zdrCzzt="{ row }">
<DictTag :tag="false" :value="row.zdrCzzt" :options="D_GS_ZDR_CZZT" />
</template>
<template #xtSjzt="{ row }">
<div>
{{ row.xtSjzt == 0 ? "注销" : row.xtSjzt == 1 ? "正常" : "封存" }}
</div>
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link size="small" type="success" @click="addEdit('edit', row)">编辑</el-link>
<el-link size="small" type="primary">查看</el-link>
<el-link size="small" type="danger" @click="deleteRow(row)">删除</el-link>
<el-link size="small" type="success" @click="addEdit('edit', row)"
>编辑</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
>
</template>
</MyTable>
<Pages
@ -80,56 +126,189 @@
></Pages>
</div>
<!-- 详情 -->
<addForm ref="addFormDiloag" />
<DetailForm ref="detailDiloag" />
</div>
</template>
<script setup>
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";
import DetailForm from "./components/addForm.vue";
import addForm from "./components/addForm.vue";
import DetailForm from "./components/infoForm.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
import AddForm from "./components/addForm.vue";
const { proxy } = getCurrentInstance();
const {
D_GS_BK_SSJZ,
D_GS_ZDR_RYJB,
D_BZ_XB,
D_BZ_MZ,
D_BZ_XZQHDM,
D_GS_ZDR_BK_ZT,
D_GS_ZDR_CZZT
} = proxy.$dict(
"D_GS_BK_SSJZ",
"D_GS_ZDR_RYJB",
"D_BZ_XB",
"D_BZ_MZ",
"D_BZ_XZQHDM",
"D_GS_ZDR_BK_ZT",
"D_GS_ZDR_CZZT"
); //获取字典数据
const detailDiloag = ref();
const addFormDiloag = ref();
const searchBox = ref(); //搜索框
const btns = reactive(['一键布控','维护群体','矛盾化解','转指令','转线索','转督导','转合成','移交管控','批量导入','导出'])
const btns = reactive([
"一键布控",
"维护群体",
"矛盾化解",
"转指令",
"转线索",
"转督导",
"转合成",
"移交管控",
"批量导入",
"导出"
]);
const searchConfiger = ref([
{
label: "姓名",
prop: "Name",
prop: "ryXm",
placeholder: "请输入姓名",
showType: "input"
},
{
label: "身份证",
prop: "sfz",
prop: "rySfzh",
placeholder: "请输入身份证",
showType: "input"
},
{
label: "户籍地",
prop: "hjdXz",
placeholder: "请输入户籍地",
showType: "input"
},
{
label: "户籍地派出所",
prop: "hjdPcsdm",
placeholder: "请输入户籍地派出所",
showType: "input"
},
{
label: "现居地",
prop: "xzdXz",
placeholder: "请输入现居地",
showType: "input"
},
{
label: "现居地派出所",
prop: "xzdPcsmc",
placeholder: "请输入现居地派出所",
showType: "input"
},
{
label: "入库开始时间",
prop: "startTime",
placeholder: "请选择入库开始时间",
showType: "date"
},
{
label: "入库结束时间",
prop: "endTime",
placeholder: "请输入入库结束时间",
showType: "date"
},
{
label: "人员级别",
prop: "zdrRyjb",
placeholder: "请输入人员级别",
showType: "select",
options: D_GS_ZDR_RYJB
},
{
label: "所属警种",
prop: "zdrSsjz",
placeholder: "请选择所属警种",
showType: "select",
options: D_GS_BK_SSJZ
},
{
label: "管辖单位",
prop: "gxSsbmmc",
placeholder: "请选择管辖单位",
showType: "input"
},
{
label: "涉及警种",
prop: "zdrSjjz",
placeholder: "请选择涉及警种",
showType: "select",
options: D_GS_BK_SSJZ,
multiple: true
},
{
label: "管辖民警姓名",
prop: "gkMjXm",
placeholder: "请输入管辖民警姓名",
showType: "input"
},
{
label: "管辖民警警号",
prop: "gkMjJh",
placeholder: "请输入管辖民警警号",
showType: "input"
},
{
label: "管辖民警联系方式",
prop: "gkMjLxfs",
placeholder: "请输入管辖民警联系方式",
showType: "input"
},
{
label: "管辖原因",
prop: "zdrLkyy",
placeholder: "请输入管辖原因",
showType: "input"
},
{
label: "被管控人联系方式",
prop: "ryLxdh",
placeholder: "请输入被管控人联系方式",
showType: "input"
},
{
label: "责任单位",
prop: "zrSsbmmc",
placeholder: "请选择责任单位",
showType: "input"
},
{
label: "人员标签大类",
prop: "bqdl",
prop: "bqDl",
placeholder: "请选择人员标签大类",
showType: "select"
},
{
label: "人员标签细类",
prop: "bqxl",
prop: "bqXl",
placeholder: "请选择人员标签细类",
showType: "select"
},
}
]);
const pageData = reactive({
tableData: [
{
img:'',
img: "",
jbxx: "",
wkrs:'1/5'
},
wkrs: "1/5"
}
],
keyCount: 0,
tableConfiger: {
@ -144,11 +323,11 @@ const pageData = reactive({
},
controlsWidth: 220,
tableColumn: [
{ label: "重点人员信息", prop: "ryxx",showSolt: true },
{ label: "户籍居住信息", prop: "jzxx",showSolt: true },
{ label: "管辖单位", prop: "gxdw" ,showSolt: true },
{ label: "处置状态", prop: "czzt"},
{ label: "状态", prop: "status" }
{ label: "重点人员信息", prop: "ryxx", showSolt: true },
{ label: "户籍居住信息", prop: "jzxx", showSolt: true },
{ label: "管辖单位", prop: "gxdw", showSolt: true },
{ label: "处置状态", prop: "zdrCzzt", showSolt: true },
{ label: "状态", prop: "xtSjzt", showSolt: true }
]
});
@ -183,21 +362,28 @@ const changeSize = (val) => {
// 获取列表
const getList = (val) => {
// pageData.tableConfiger.loading = true;
pageData.tableConfiger.loading = true;
let data = { ...pageData.pageConfiger, ...queryFrom.value };
// let url = '/mosty-lzcj/tbDwMbkf/queryList';
// qcckPost(data,url).then(res=>{
// pageData.tableData = res.records || [];
// pageData.total = res.total;
// pageData.tableConfiger.loading = false;
// }).catch(()=>{ pageData.tableConfiger.loading = false; })
let url = "/mosty-gsxt/tbGsxtZdry/selectPage";
qcckGet(data, url)
.then((res) => {
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
})
.catch(() => {
pageData.tableConfiger.loading = false;
});
};
// 详情
//新增编辑
const addEdit = (type, row) => {
addFormDiloag.value.init(type, row);
};
// 详情
const infoList = (type, row) => {
detailDiloag.value.init(type, row);
};
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight =
@ -207,12 +393,14 @@ const tabHeightFn = () => {
};
};
</script>
<style>
<style>
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
.rowClass {
display: flex;
align-items: center;
justify-content: center;
}
</style>