更新数据

This commit is contained in:
2025-07-08 14:12:52 +08:00
parent 9ccca009ef
commit c9fa01cfe7
2 changed files with 442 additions and 41 deletions

View File

@ -0,0 +1,201 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">流线索</span>
<div>
<el-button type="primary" :loading="loading" @click="submit">保存</el-button>
<el-button @click="close">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<FormMessage v-model="listQuery" :formList="formData" ref="elform" :rules="rules">
<template #gapdive>
<div style="width: 100%;height: 10px;" class="mb20">
<el-divider content-position="left">基础信息</el-divider>
</div>
</template>
<template #gapline>
<div style="width: 100%;height: 10px;" class="mb20">
<el-divider content-position="left">线索内容</el-divider>
</div>
</template>
<template #scfj>
<div style="width: 100%;padding-left: 50px;">
<div>上传附件:<span class="f12">可附电子表格Word文档图像音视频文件</span> </div>
<div><MOSTY.Upload :showBtn="true" :limit="10" v-model="fjdz" /> </div>
</div>
</template>
</FormMessage>
<el-divider content-position="left"><span class="mr20">相关人员</span> </el-divider>
<MyTable
:tableData="pageForm.tableData"
:tableColumn="pageForm.tableColumn"
:tableHeight="pageForm.tableHeight"
:key="pageForm.keyCount"
:tableConfiger="pageForm.tableConfiger"
:controlsWidth="pageForm.controlsWidth"
>
<template #xb="{row}">
<DictTag :value="row.xb" :tag="false" :options="props.dic.D_BZ_XB" />
</template>
<template #bqList="{row}">
<div v-if="row.bqList">
<el-tag type="success" v-for="(it,idx) in row.bqList" :key="idx">{{ it.bqMc }}</el-tag >
</div>
</template>
</MyTable>
</div>
</div>
</template>
<script setup>
import * as MOSTY from "@/components/MyComponents/index";
import MyTable from "@/components/aboutTable/MyTable.vue";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { qcckPost } from "@/api/qcckApi.js";
import { ref, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, nextTick } from "vue";
const emit = defineEmits(["change"]);
const props = defineProps({
dic: Object
});
const { proxy } = getCurrentInstance();
const dialogForm = ref(false); //弹窗
const rules = reactive({
xsMc: [{ required: true, message: "请输入线索名称", trigger: "blur" }],
xlLx: [{ required: true, message: "请选择线索类型", trigger: "change" }],
qbLy: [{ required: true, message: "请选择情报来源", trigger: "change" }],
});
const formData = ref([
{ prop: "gapdive", type: "slot",width:'100%' },
{ label: "线索名称", prop: "xsMc", type: "input" },
{ label: "线索类型", prop: "xlLx", type: "select", options:props.dic.D_GS_XS_LX },
{ label: "情报来源", prop: "qbLy", type: "select", options:props.dic.D_GS_XS_LY},
{ label: "指向开始时间", prop: "zxkssj", type: "datetime"},
{ label: "指向结束时间", prop: "zxjssj", type: "datetime"},
{ label: "指向地点", prop: "zxdz", type: "input"},
{ label: "所属专题", prop: "sszt", type: "select",options:props.dic.D_BZ_SSZT},
{ prop: "gapline", type: "slot",width:'100%' },
{ prop: "scfj", type: "slot",width:'100%'},
{ label: "线索内容", prop: "xsNr", type: "textarea",width:'100%'},
{ label: "群体类型", prop: "qtlx", type: "select",options:props.dic.D_GS_XS_QTLX },
{ label: "群体名称", prop: "qtmc", type: "input"},
{ label: "涉及人数", prop: "sjrs", type: "inputNumber"},
{ label: "线索报送单位", prop: "ssbmdm", type: "department"},
]);
const fjdz = ref()
const listQuery = ref({}); //表单
const loading = ref(false);
const elform = ref();
const pageForm = reactive({
tableData: [],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false,
haveControls:false
},
controlsWidth: 220,
tableColumn: [
{ label: "姓名", prop: "xm" },
{ label: "性别", prop: "xb",showSolt:true },
{ label: "身份证号", prop: "sfzh" },
{ label: "户籍地", prop: "hjdz" },
{ label: "户籍地派出所", prop: "hjdpcs" },
{ label: "标签", prop: "bqList",showSolt:true }
]
});
onMounted(()=>{
tabHeightFn()
})
// 初始化数据
const init = (list) => {
fjdz.value = []
tabHeightFn()
dialogForm.value = true;
let peo = []
list.forEach(item => {
if(item.zdryList) peo = peo.concat(item.zdryList);
});
pageForm.tableData = peo.map((it) => {
return {
xm: it.ryXm,
xb: it.ryXb,
sfzh: it.rySfzh,
hjdz: it.xzdXz,
hjdpcs: it.hjdPcsmc,
hjdpcsdm: it.hjdPcsdm,
bqList: it.bqList || []
};
});
pageForm.keyCount++;
};
// 提交
const submit = () => {
elform.value.submit((data) => {
let params = { ...data ,ryList:pageForm.tableData,cjLx:'0'};
params.fjdz = fjdz.value.length > 0 ? fjdz.value.join(','):'';
loading.value = true;
qcckPost(params, '/mosty-gsxt/qbcj/add').then((res) => {
loading.value = false;
proxy.$message({ type: "success", message: "成功" });
emit("change");
close();
}).catch(() => {
loading.value = false;
});
});
};
// 关闭
const close = () => {
fjdz.value = []
listQuery.value = {};
dialogForm.value = false;
loading.value = false;
};
// 表格高度计算
const tabHeightFn = () => {
pageForm.tableHeight = window.innerHeight - 720;
window.onresize = function () {
tabHeightFn();
};
};
defineExpose({ init });
</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;
}
::v-deep .avatar-uploader{
display: flex;
align-items: center;
}
::v-deep .el-upload-list{
margin-left: 20px;
display: flex;
align-items: center;
}
::v-deep .el-upload-list__item-name .el-icon{
top: 3px;
}
</style>

View File

@ -2,23 +2,50 @@
<div> <div>
<div class="titleBox"> <div class="titleBox">
<PageTitle title="重点人管理"> <PageTitle title="重点人管理">
<el-popover placement="bottom" :visible="visible" :width="400" trigger="click"> <el-popover
placement="bottom"
:visible="visible"
:width="400"
trigger="click"
>
<template #reference> <template #reference>
<el-button type="primary" @click="visible =!visible" size="small">布控申请 <el-button
type="primary"
@click="(visible = !visible), (visiblefp = false)"
size="small"
>布控申请
</el-button> </el-button>
</template> </template>
<div class="flex just-center"> <div class="flex just-center">
<el-button size="small" type="primary">列控申请</el-button> <el-button
<el-button size="small" type="primary">变更申请</el-button> size="small"
<el-button size="small" type="primary">管控申请</el-button> type="primary"
<el-button size="small" type="primary">协控申请</el-button> v-for="it in D_GS_BK_SQLX"
:key="it.dm"
@click="handleApplication(it)"
>{{ it.zdmc }}</el-button
>
</div> </div>
</el-popover> </el-popover>
<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">
<el-button size="small" type="primary">移交管控</el-button> <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-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> <span style="vertical-align: middle">新增</span>
</el-button> </el-button>
</PageTitle> </PageTitle>
@ -43,39 +70,81 @@
<img src="" alt="" /> <img src="" alt="" />
<ul> <ul>
<li>姓名{{ row.ryXm }}</li> <li>姓名{{ row.ryXm }}</li>
<li class="rowClass"> 性别<DictTag :tag="false" :value="row.ryXb" :options="D_BZ_XB" /></li> <li class="rowClass">
<li class="rowClass">籍贯<DictTag :tag="false" :value="row.ryJg" :options="D_BZ_XZQHDM"/> </li> 性别
<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.rySfzh }}</li>
<li>出生日期{{ row.ryCsrq }}</li> <li>出生日期{{ row.ryCsrq }}</li>
<li class="rowClass">民族<DictTag :tag="false" :value="row.ryMz" :options="D_BZ_MZ" /></li> <li class="rowClass">
民族
<DictTag :tag="false" :value="row.ryMz" :options="D_BZ_MZ" />
</li>
</ul> </ul>
</div> </div>
<div class="flex"> <div class="flex">
<el-button :key="index" type="primary" size="small" v-for="(item, index) in row.bqList">{{ item.bqMc }}</el-button> <el-button
:key="index"
type="primary"
size="small"
v-for="(item, index) in row.bqList"
>{{ item.bqMc }}</el-button
>
</div> </div>
</template> </template>
<template #jzxx="{ row }"> <template #jzxx="{ row }">
<div class="rowClass">户籍地区划<DictTag :tag="false" :value="row.hjdQh" :options="D_BZ_XZQHDM" /></div> <div class="rowClass">
户籍地区划
<DictTag :tag="false" :value="row.hjdQh" :options="D_BZ_XZQHDM" />
</div>
<div>户籍派出所{{ row.hjdPcsmc }}</div> <div>户籍派出所{{ row.hjdPcsmc }}</div>
<div>户籍地详址{{ row.hjdXz }}</div> <div>户籍地详址{{ row.hjdXz }}</div>
</template> </template>
<template #gxdw="{ row }"> <template #gxdw="{ row }">
<div>管辖单位{{ row.gxSsbmmc }}</div> <div>管辖单位{{ row.gxSsbmmc }}</div>
<div class="rowClass">人员级别 <DictTag :tag="false" :value="row.zdrRyjb" :options="D_GS_ZDR_RYJB"/> </div> <div class="rowClass">
人员级别
<DictTag
:tag="false"
:value="row.zdrRyjb"
:options="D_GS_ZDR_RYJB"
/>
</div>
<div>管控原因{{ zdrLkyy }}</div> <div>管控原因{{ zdrLkyy }}</div>
<div class="rowClass">管控状态<DictTag :tag="false" :value="row.zdrBkZt" :options="D_GS_ZDR_BK_ZT"/></div> <div class="rowClass">
管控状态
<DictTag
:tag="false"
:value="row.zdrBkZt"
:options="D_GS_ZDR_BK_ZT"
/>
</div>
</template> </template>
<template #zdrCzzt="{ row }"> <template #zdrCzzt="{ row }">
<DictTag :tag="false" :value="row.zdrCzzt" :options="D_GS_ZDR_CZZT" /> <DictTag :tag="false" :value="row.zdrCzzt" :options="D_GS_ZDR_CZZT" />
</template> </template>
<template #xtSjzt="{ row }"> <template #xtSjzt="{ row }">
<div>{{ row.xtSjzt == 0 ? "注销" : row.xtSjzt == 1 ? "正常" : "封存" }}</div> <div>
{{ row.xtSjzt == 0 ? "注销" : row.xtSjzt == 1 ? "正常" : "封存" }}
</div>
</template> </template>
<!-- 操作 --> <!-- 操作 -->
<template #controls="{ row }"> <template #controls="{ row }">
<el-link size="small" type="success" @click="addEdit('edit', row)">编辑</el-link > <el-link size="small" type="success" @click="addEdit('edit', row)"
<el-link size="small" type="danger" @click="deleteRow(row)" >删除</el-link> >编辑</el-link
>
<el-link size="small" type="danger" @click="deleteRow(row)"
>删除</el-link
>
</template> </template>
</MyTable> </MyTable>
<Pages <Pages
@ -89,23 +158,91 @@
></Pages> ></Pages>
</div> </div>
<!-- 详情 --> <!-- 详情 -->
<AddForm ref="addFormDiloag" v-if="show" :dic="{D_GS_ZDR_RYJB,D_BZ_XB,D_BZ_MZ,D_BZ_XZQHDM,D_GS_ZDR_BK_ZT,D_GS_ZDR_CZZT,D_GS_BQ_ZL,D_GS_BQ_LB,D_GS_BQ_LX,D_GS_ZDR_YJDJ,D_GS_BK_SSJZ}" /> <AddForm
ref="addFormDiloag"
v-if="show"
:dic="{
D_GS_ZDR_RYJB,
D_BZ_XB,
D_BZ_MZ,
D_BZ_XZQHDM,
D_GS_ZDR_BK_ZT,
D_GS_ZDR_CZZT,
D_GS_BQ_ZL,
D_GS_BQ_LB,
D_GS_BQ_LX,
D_GS_ZDR_YJDJ,
D_GS_BK_SSJZ
}"
/>
<!-- 选择用户 -->
<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> </div>
</template> </template>
<script setup> <script setup>
import { ElMessage } from "element-plus";
import ChooseUser from "@/components/MyComponents/ChooseUser/index.vue";
import ZxsForm from "./components/zxsForm.vue";
import PageTitle from "@/components/aboutTable/PageTitle.vue"; import PageTitle from "@/components/aboutTable/PageTitle.vue";
import MyTable from "@/components/aboutTable/MyTable.vue"; import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue"; import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue"; import Search from "@/components/aboutTable/Search.vue";
import AddForm from "./components/addForm.vue"; import AddForm from "./components/addForm.vue";
import { qcckGet } from "@/api/qcckApi.js"; import { qcckGet,qcckPost } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance } from "vue"; import { reactive, ref, onMounted, getCurrentInstance,nextTick } from "vue";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const {D_GS_ZDR_RYJB,D_BZ_XB,D_BZ_MZ,D_BZ_XZQHDM,D_GS_ZDR_BK_ZT,D_GS_ZDR_CZZT,D_GS_BQ_ZL,D_GS_BQ_LB,D_GS_BQ_LX,D_GS_ZDR_YJDJ,D_GS_BK_SSJZ } = proxy.$dict("D_GS_ZDR_RYJB","D_BZ_XB","D_BZ_MZ","D_BZ_XZQHDM","D_GS_ZDR_BK_ZT","D_GS_ZDR_CZZT","D_GS_BQ_ZL","D_GS_BQ_LB","D_GS_BQ_LX","D_GS_ZDR_YJDJ","D_GS_BK_SSJZ"); const {
D_GS_ZDR_RYJB,
D_BZ_XB,
D_BZ_MZ,
D_BZ_XZQHDM,
D_GS_ZDR_BK_ZT,
D_GS_ZDR_CZZT,
D_GS_BQ_ZL,
D_GS_BQ_LB,
D_GS_BQ_LX,
D_GS_ZDR_YJDJ,
D_GS_BK_SSJZ,
D_GS_BK_SQLX,
D_BZ_SF,
D_GS_XS_LY,
D_BZ_SSZT,
D_GS_XS_LX,
D_GS_XS_QTLX
} = proxy.$dict(
"D_GS_ZDR_RYJB",
"D_BZ_XB",
"D_BZ_MZ",
"D_BZ_XZQHDM",
"D_GS_ZDR_BK_ZT",
"D_GS_ZDR_CZZT",
"D_GS_BQ_ZL",
"D_GS_BQ_LB",
"D_GS_BQ_LX",
"D_GS_ZDR_YJDJ",
"D_GS_BK_SSJZ",
"D_GS_BK_SQLX",
"D_BZ_SF",
"D_GS_XS_LY",
"D_BZ_SSZT",
'D_GS_XS_LX',
'D_GS_XS_QTLX'
);
const obj = ref({
fpmc: ""
});
const showzxs = ref(false);
const zxsDilof = ref();
const show = ref(false); const show = ref(false);
const addFormDiloag = ref(); const addFormDiloag = ref();
const searchBox = ref(); //搜索框 const searchBox = ref(); //搜索框
const chooseUserVisible = ref(false); //审批流程
const visible = ref(false);
const visiblefp = ref(false);
const searchConfiger = ref([ const searchConfiger = ref([
{ {
label: "姓名", label: "姓名",
@ -131,7 +268,7 @@ const searchConfiger = ref([
placeholder: "请输入人员级别", placeholder: "请输入人员级别",
showType: "select", showType: "select",
options: D_GS_ZDR_RYJB options: D_GS_ZDR_RYJB
}, }
]); ]);
const pageData = reactive({ const pageData = reactive({
@ -139,7 +276,7 @@ const pageData = reactive({
keyCount: 0, keyCount: 0,
tableConfiger: { tableConfiger: {
rowHieght: 61, rowHieght: 61,
showSelectType: "null", showSelectType: "checkBox",
loading: false loading: false
}, },
total: 0, total: 0,
@ -181,14 +318,16 @@ const changeSize = (val) => {
}; };
// 获取列表 // 获取列表
const getList = (val) => { const getList = () => {
pageData.tableConfiger.loading = true; pageData.tableConfiger.loading = true;
let data = { ...pageData.pageConfiger, ...queryFrom.value }; let data = { ...pageData.pageConfiger, ...queryFrom.value };
qcckGet(data, "/mosty-gsxt/tbGsxtZdry/selectPage").then((res) => { qcckGet(data, "/mosty-gsxt/tbGsxtZdry/selectPage")
.then((res) => {
pageData.tableData = res.records || []; pageData.tableData = res.records || [];
pageData.total = res.total; pageData.total = res.total;
pageData.tableConfiger.loading = false; pageData.tableConfiger.loading = false;
}).catch(() => { })
.catch(() => {
pageData.tableConfiger.loading = false; pageData.tableConfiger.loading = false;
}); });
}; };
@ -203,17 +342,78 @@ const addEdit = (type, row) => {
// 表格高度计算 // 表格高度计算
const tabHeightFn = () => { const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250; pageData.tableHeight =
window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () { window.onresize = function () {
tabHeightFn(); tabHeightFn();
}; };
}; };
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/tbGsxtZdry/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/tbGsxtZdry/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/tbGsxtZdry/addSfyj").then(() => {
ElMessage.success("移交管控成功");
getList();
}).catch(() => {
ElMessage.error("移交管控失败");
});
})
};
const handleZxs = () => {
if (ids.value.length === 0) return ElMessage.error("请先选择需要转线索的重点群体");
showzxs.value = true;
nextTick(() => {
zxsDilof.value.init(choosList.value);
});
};
</script> </script>
<style> <style>
.el-loading-mask { .el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important; background: rgba(0, 0, 0, 0.5) !important;
} }
.rowClass { .rowClass {
display: flex; display: flex;
align-items: center; align-items: center;