更新页面

This commit is contained in:
Esacpe 2025-05-21 10:38:41 +08:00
parent 2b3f8a4ce8
commit 2f9762a1fa
2 changed files with 312 additions and 8 deletions

View File

@ -0,0 +1,99 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">重点群体管理 </span>
<div>
<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>
</div>
</div>
</template>
<script setup>
import FormMessage from '@/components/aboutTable/FormMessage.vue'
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
import * as rule from "@/utils/rules.js";
import { ref, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, nextTick } from "vue";
const emit = defineEmits(["updateDate"]);
const props = defineProps({
dic: Object
});
const { proxy } = getCurrentInstance();
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:[]},
]);
const listQuery = ref({
sfbqdj: []
}); //
const loading = ref(false);
const elform = ref();
const title = ref("");
const rules = reactive({
xsbt: [{ required: true, message: "请输入线索标题", trigger: "blur" }]
});
const editpeo = ref();
onMounted(() => {});
//
const init = (type, row,) => {
dialogForm.value = true;
title.value = type == 'add' ? "新增" : "编辑";
if (row) getDataById(row.id);
};
// id
const getDataById = (id) => {
// qcckGet({}, '/mosty-gsxt/tbGsxtBqgl/'+id).then((res) => {
// listQuery.value = res;
// });
};
//
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(() => {});
});
};
//
const close = () => {
listQuery.value = {};
dialogForm.value = false;
loading.value = false;
};
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);
}
</style>

View File

@ -1,13 +1,218 @@
<template>
<div>重点人管理</div>
<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" @click="addEdit('add', '')">
<el-icon style="vertical-align: middle"><CirclePlus /></el-icon>
<span style="vertical-align: middle">新增</span>
</el-button>
<el-button type="danger" size="small" @click="addEdit('add', '')">
<el-icon style="vertical-align: middle"><Dete /></el-icon>
<span style="vertical-align: middle">批量删除</span>
</el-button>
</PageTitle>
</div>
<!-- 搜索 -->
<div ref="searchBox">
<Search
:searchArr="searchConfiger"
@submit="onSearch"
:key="pageData.keyCount"
/>
</div>
<!-- 表格 -->
<div class="tabBox">
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
: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 #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>
</template>
</MyTable>
<Pages
@changeNo="changeNo"
@changeSize="changeSize"
:tableHeight="pageData.tableHeight"
:pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"
></Pages>
</div>
<!-- 详情 -->
<DetailForm ref="detailDiloag" />
</div>
</template>
<script>
export default {
<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 { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
const { proxy } = getCurrentInstance();
const detailDiloag = ref();
const searchBox = ref(); //
const btns = reactive(['一键布控','维护群体','矛盾化解','转指令','转线索','转督导','转合成','移交管控','批量导入','导出'])
const searchConfiger = ref([
{
label: "姓名",
prop: "Name",
placeholder: "请输入姓名",
showType: "input"
},
{
label: "身份证",
prop: "sfz",
placeholder: "请输入身份证",
showType: "input"
},
{
label: "人员标签大类",
prop: "bqdl",
placeholder: "请选择人员标签大类",
showType: "select"
},
{
label: "人员标签细类",
prop: "bqxl",
placeholder: "请选择人员标签细类",
showType: "select"
},
]);
}
const pageData = reactive({
tableData: [
{
img:'',
jbxx: "",
wkrs:'1/5'
},
],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "checkBox",
loading: false
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
},
controlsWidth: 220,
tableColumn: [
{ label: "重点人员信息", prop: "ryxx",showSolt: true },
{ label: "户籍居住信息", prop: "jzxx",showSolt: true },
{ label: "管辖单位", prop: "gxdw" ,showSolt: true },
{ label: "处置状态", prop: "czzt"},
{ label: "状态", prop: "status" }
]
});
const queryFrom = ref({});
onMounted(() => {
getList();
tabHeightFn();
});
//
const handleType = (val) => {
pageData.keyCount++;
pageData.pageConfiger.pageCurrent = 1;
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();
};
//
const getList = (val) => {
// 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; })
};
//
const addEdit = (type, row) => {
detailDiloag.value.init(type, row);
};
//
const tabHeightFn = () => {
pageData.tableHeight =
window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () {
tabHeightFn();
};
};
</script>
<style>
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
</style>