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,86 @@
<template>
<el-dialog v-model="dialogTableVisible" title="添加范围模型" width="1000px" @close="close">
<div class="dialog-container">
<el-form :model="formData" label-width="auto" label-position="left">
<div class="form-row">
<el-form-item label="模型名称">
<el-input v-model="formData.modelName" placeholder="请输入模型名称" />
</el-form-item>
<el-form-item label="感知模型类型" prop="region">
<el-select v-model="formData.region" placeholder="重点区域类型">
<el-option label="Zone one" value="shanghai" />
<el-option label="Zone two" value="beijing" />
</el-select>
</el-form-item>
<el-form-item label="生成时间范围">
<el-date-picker
v-model="formData.dateRange"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
style="width: 100%"
/>
</el-form-item>
</div>
<el-form-item label="感知源信息">
<el-input v-model="formData.perceptionDomain" placeholder="请输入模型名称">
<template #append>
<el-button type="primary">选择感知源</el-button>
</template>
</el-input>
</el-form-item>
<el-form-item label="地图范围">
<el-input v-model="formData.mapRange" placeholder="请输入模型名称">
<template #append>
<el-button type="primary">选择地图范围</el-button>
</template>
</el-input>
</el-form-item>
</el-form>
<div class="map"></div>
</div>
</el-dialog>
</template>
<script setup>
import { ref } from "vue";
const formData = ref({
modelName: "",
perceptionDomain: "",
mapRange: "",
dateRange: [],
region: ""
});
const dialogTableVisible = ref(false);
// 初始化数据
const init = (type, row) => {
dialogTableVisible.value = true;
};
const close = () => {};
defineExpose({ init });
</script>
<style lang="scss" scoped>
.dialog-container {
height: 550px;
.map {
height: 400px;
border: 1px solid #ccc;
border-radius: 5px;
}
.form-row {
display: flex;
gap: 5px;
.el-form-item {
flex: 1;
}
}
}
</style>

View File

@ -0,0 +1,131 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">开锁业务信息详情</span>
<div>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="cntinfo">
<el-form :model="listQuery" :label-width="230" label-position="left">
<div class="form-row">
<el-form-item label="业务流水号码">
<el-input v-model="listQuery.ywlsh" placeholder="01131213"/>
</el-form-item>
<el-form-item label="开锁业务日期">
<el-input v-model="listQuery.ywrq" placeholder="2025/1/20 10:00:00"/>
</el-form-item>
</div>
<div class="form-row">
<el-form-item label="场所名称">
<el-input v-model="listQuery.csmc" placeholder="毛王开锁"/>
</el-form-item>
<el-form-item label="从业人员姓名">
<el-input v-model="listQuery.cyrxm" placeholder="张三"/>
</el-form-item>
</div>
<div class="form-row">
<el-form-item label="从业人员证件号码">
<el-input v-model="listQuery.cyrzjhm" placeholder="511123456789654125"/>
</el-form-item>
<el-form-item label="请求开锁人姓名">
<el-input v-model="listQuery.qqksrxm" placeholder="李四"/>
</el-form-item>
</div>
<div class="form-row">
<el-form-item label="请求开锁人证件号码">
<el-input v-model="listQuery.qqksrzjhm" placeholder="511111111111111111"/>
</el-form-item>
<el-form-item label="开锁业务地址">
<el-input v-model="listQuery.ywdz" placeholder="林芝市巴宜区xxxx路18号"/>
</el-form-item>
</div>
<div class="form-row">
<el-form-item label="开锁业务类型">
<el-input v-model="listQuery.ywlx" placeholder="开锁"/>
</el-form-item>
<el-form-item label="见证人姓名">
<el-input v-model="listQuery.jzrxm" placeholder="王五"/>
</el-form-item>
</div>
<div class="form-row">
<el-form-item label="见证人证件号">
<el-input v-model="listQuery.jzrzjh" placeholder="514154785965214741"/>
</el-form-item>
<el-form-item label="见证人联系方式">
<el-input v-model="listQuery.jzrlxfs" placeholder="15222222222"/>
</el-form-item>
</div>
</el-form>
</div>
</div>
</template>
<script setup>
import { ref, reactive } from 'vue';
const dialogForm = ref(false);
const listQuery = ref({});
// 初始化数据
const init = (type, row) => {
dialogForm.value = true;
// 根据type和row初始化表单数据
};
const close = () => {
dialogForm.value = false;
};
defineExpose({init})
</script>
<style lang="scss" scoped>
.dialog {
padding: 20px;
:deep(.el-form-item__label) {
background-color: #F7FAFB;
padding: 0px 8px;
color: #000;
font-weight: 500;
border: 1px solid #E3E7ED;
}
.head_box {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.cntinfo{
height: calc(100% - 70px);
overflow: hidden;
overflow-y: auto;
}
.form-row {
display: flex;
.el-form-item {
flex: 1;
}
}
::v-deep .el-input__inner{
height: 36px !important;
line-height: 36px !important;
border-radius: 0;
color: #777575;
}
}
.el-form-item--default{
margin-bottom: 0px;
}
</style>

View File

@ -0,0 +1,229 @@
<template>
<el-dialog
:title="titleValue"
width="900px"
:model-value="modelValue"
append-to-body
@close="closed"
>
<div>
<el-form :model="listQuery" class="mosty-from-wrap" :inline="true">
<el-form-item label="标签名称">
<el-input
placeholder="请输入标签名称"
v-model="listQuery.bqMc"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button type="success" @click="handleFilter">查询</el-button>
<el-button type="info" @click="reset()"> 重置 </el-button>
</el-form-item>
</el-form>
<div
class="tabBox"
:class="props.Single ? 'tabBoxRadio' : ''"
style="margin-top: 0px"
>
<el-table
v-loading="loading"
ref="multipleUserRef"
@selection-change="handleSelectionChange"
:data="tableData"
border
:row-key="keyid"
style="width: 100%"
height="450"
>
<el-table-column
type="selection"
width="55"
:reserve-selection="true"
/>
<el-table-column prop="bqMc" align="center" label="标签名称" />
<el-table-column prop="bqDm" align="center" label="标签代码" />
<el-table-column prop="bqDj" align="center" label="标签等级">
</el-table-column>
<el-table-column prop="bqYs" align="center" label="标签颜色">
<template #default="{ row }">
<DictTag
:value="row.bqYs"
:tag="false"
:options="props.dic.D_GS_SSYJ"
/>
</template>
</el-table-column>
</el-table>
</div>
<div class="fenye" :style="{ top: tableHeight + 'px' }">
<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>
</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 } 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: true
},
roleIds: {
type: Array,
default: []
}
});
const total = ref(0);
const listQuery = ref({
current: 1,
size: 20
});
const loading = ref(false);
const tableData = ref([]);
const emits = defineEmits(["update:modelValue", "chooseDate"]);
onMounted(() => {
handleFilter();
});
const closed = () => {
emits("update:modelValue", false);
};
const reset = () => {
listQuery.value = { current: 1, size: 20 };
getDataList();
};
const keyid = (row) => {
return row.id;
};
// 为用户分配角色
const onComfirm = () => {
const userList = multipleSelectionUser.value;
let list = [];
let listId = [];
userList.forEach((val) => {
if (listId.indexOf(val.id) == -1) {
list.push(val);
listId.push(val.id);
}
});
emits("chooseDate", list);
let data = { type: props.LeaderType, userList: userList };
emits("chooseDateLeader", data);
closed();
};
/**
* pageSize 改变触发
*/
const handleSizeChange = (currentSize) => {
listQuery.value.size = currentSize;
getDataList();
};
/**
* 页码改变触发
*/
const handleCurrentChange = (currentPage) => {
listQuery.value.current = currentPage;
getDataList();
};
// 查询标签组合列表
const getDataList = () => {
const data = listQuery.value;
loading.value = true;
qcckGet(data, "/mosty-gsxt/tbGsxtBqzh/selectPage").then((res) => {
tableData.value = res?.records;
total.value = Number(res.total);
loading.value = false;
multipleUser();
});
};
//列表回显
function multipleUser() {
tableData.value.forEach((item) => {
if (props.roleIds.some((id) => id == item.id)) {
multipleUserRef.value.toggleRowSelection(item, true);
}
});
}
const handleFilter = () => {
listQuery.value.current = 1;
getDataList();
};
const multipleUserRef = ref(null);
const multipleSelectionUser = ref([]);
const handleSelectionChange = (val) => {
if (props.Single) {
if (val.length > 1) {
let del_row = val.shift();
multipleUserRef.value.toggleRowSelection(del_row, false);
}
multipleSelectionUser.value = val;
} else {
multipleSelectionUser.value = val;
}
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/layout.scss";
@import "@/assets/css/element-plus.scss";
</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;
/* 其他样式 */
}
</style>

View File

@ -0,0 +1,168 @@
<template>
<div class="drawer-model">
<el-drawer v-model="drawer" title="范围模型(3)" direction="rtl" style="width: 300px">
<div class="project-list">
<!-- 搜索区域 -->
<div class="search-area">
<!-- 搜索区域 -->
<el-form :model="searchForm" label-width="auto" style="max-width: 600px">
<el-form-item label="模型名称">
<el-input v-model="searchForm.projectName" />
</el-form-item>
<el-form-item label="启用状态">
<el-select v-model="searchForm.status" placeholder="启用状态">
<el-option label="启用" value="shanghai" />
<el-option label="禁用" value="beijing" />
</el-select>
</el-form-item>
</el-form>
<div>
<el-button type="primary" icon="Search">查询</el-button>
<el-button type="primary" icon="CirclePlus" @click="areaModel">添加应用模型</el-button>
</div>
<!-- <Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount" /> -->
</div>
<!-- 列表区域 -->
<div class="list-area">
<div v-for="(item, index) in pageData.tableData" :key="index" class="list-item">
<div class="model-info">
<div class="model-name">巴宜区公路外国模型</div>
<div class="model-type">模型类型重点区域城规模型</div>
</div>
<el-divider border-style="dotted"></el-divider>
<div class="actions flexcb">
<el-checkbox v-model="item.checked" label="启用" />
<div class="btns">
<span class="set">设置</span>
<span class="delete">删除</span>
</div>
</div>
</div>
</div>
</div>
</el-drawer>
<!-- 添加范围模型 -->
<AreaModel ref="areaModelRef"></AreaModel>
</div>
</template>
<script setup>
import { ref, reactive } from "vue";
import Search from "@/components/aboutTable/Search.vue";
import AreaModel from "./areaModel.vue";
const areaModelRef = ref();
const areaModel = () => {
areaModelRef.value.init();
};
const searchConfiger = ref([
{
label: "项目名称",
prop: "name",
placeholder: "请选择经营状况",
showType: "input"
},
{
label: "启用状态",
prop: "jyzt",
placeholder: "请选择经营状况",
showType: "select",
options: [{ label: "在业", value: "在业" }]
}
]);
// 搜索
const onSearch = val => {
searchForm.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
getList();
};
const searchForm = ref({
projectName: "",
status: ""
});
// 获取列表
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 pageData = reactive({
tableData: [
{ checked: false },
{ checked: false },
{ checked: false },
{ checked: false },
{ checked: false },
{ checked: false }
], //表格数据
keyCount: 0,
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
} //分页
});
const drawer = ref(false);
// 初始化数据
const init = () => {
drawer.value = true;
// 根据type和row初始化表单数据
};
defineExpose({ init });
</script>
<style lang="scss" scoped>
.drawer-model {
header {
background: none;
}
:deep(.el-drawer) {
width: 400px !important;
}
}
.search-area {
margin-bottom: 20px;
}
.list-area {
display: flex;
flex-direction: column;
gap: 16px;
.model-name {
color: rgb(64, 158, 255);
font-size: 20px;
margin-bottom: 10px;
}
.model-type {
font-size: 18px;
color: #ccc;
}
}
.list-item {
border: 1px solid #e4e7ed;
border-radius: 4px;
padding: 16px;
.el-divider--horizontal {
margin: 10px 0;
}
}
.actions {
.btns {
.set {
color: rgb(64, 158, 255);
}
.delete {
margin-left: 10px;
color: rgb(245, 108, 108);
}
}
}
</style>

View File

@ -0,0 +1,125 @@
<template>
<el-dialog v-model="dialogTableVisible" title="XXXXXXX涉及人数" width="1000px" @close="close">
<div class="dialog-container">
<!-- 搜索 -->
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount" class="seacrh" />
</div>
<!-- 表格 -->
<div class="tabBox">
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
tableHeight="400px"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
@chooseData="chooseData"
>
<!-- 操作 -->
<template #controls="{ row }">
<el-button size="small" @click="addEdit('detail', row)">详情</el-button>
</template>
</MyTable>
<Pages
@changeNo="changeNo"
@changeSize="changeSize"
:tableHeight="pageData.tableHeight"
:pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"
></Pages>
</div>
</div>
</el-dialog>
</template>
<script setup>
import { ref, reactive } from "vue";
import Search from "@/components/aboutTable/Search.vue";
import MyTable from "@/components/aboutTable/MyTable.vue";
const dialogTableVisible = ref(false);
const searchConfiger = ref([
{
label: "姓名",
prop: "name",
placeholder: "请输入场所名称",
showType: "input"
},
{
label: "身份证号",
prop: "idCard",
placeholder: "请输入从业人姓名",
showType: "input"
},
{
label: "车牌号",
prop: "plateNumber",
placeholder: "请输入场所名称",
showType: "input"
},
{
label: "车牌号",
prop: "plateNumber2",
placeholder: "请输入从业人姓名",
showType: "input"
}
]);
const pageData = reactive({
tableData: [
{
name: "1"
}
], //表格数据
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
}, //分页
controlsWidth: 120, //操作栏宽度
tableColumn: [
{ label: "照片", prop: "photo", width: "80" },
{ label: "姓名", prop: "name", width: "100" },
{ label: "性别", prop: "gender", width: "80" },
{ label: "身份证号", prop: "idCard", width: "180" },
{ label: "户籍地", prop: "residence", width: "150" },
{ label: "现居住地", prop: "currentAddress", width: "150" },
{ label: "手机号", prop: "phone", width: "120" },
{ label: "虚拟身份", prop: "virtualId", width: "120" },
{ label: "车牌号", prop: "plateNumber", width: "120" },
{ label: "车牌号", prop: "plateNumber2", width: "120" },
{ label: "特征描述", prop: "features", width: "150" },
{ label: "人员标签", prop: "personTags", width: "150" }
]
});
// 初始化数据
const init = (type, row) => {
dialogTableVisible.value = true;
};
const close = () => {};
defineExpose({ init });
</script>
<style lang="scss" scoped>
.dialog-container {
// .box {
// flex-wrap: nowrap !important;
// }
.seacrh {
.box {
flex-wrap: nowrap !important;
}
}
}
</style>

View File

@ -0,0 +1,194 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">布控详情</span>
<div>
<el-button
size="small"
type="primary"
@click="autoClick"
v-if="typetext == 'auto'"
>审核</el-button
>
<el-button
size="small"
@click="autoClick"
type="primary"
v-if="typetext == 'approval'"
>审批</el-button
>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="cntinfo">
<div class="title-item">布控信息</div>
<ControlInfo ref="controlInfoRef" />
<div class="title-item">布控范围</div>
<ControlArea ref="controlAreaRef" />
<div class="title-item">审批信息</div>
<ApprovalInfo ref="approvalInfoRef" />
</div>
<el-dialog v-model="dialogVisible" title="审核" width="500px">
<FormMessage v-model="listQuery" :formList="formData" ref="elform">
<!-- 自定义原因字段渲染 -->
<template #bkshBtgyy>
<el-form-item
label="原因"
prop="bkshBtgyy"
v-if="listQuery.sftg === '0'"
>
<el-input
type="textarea"
v-model="listQuery.bkshBtgyy"
placeholder="请输入不通过原因"
/>
</el-form-item>
<div v-else></div>
</template>
</FormMessage>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="handleClose"> 确定 </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup>
import { ref, reactive, nextTick, getCurrentInstance, watch } from "vue";
import ControlInfo from "./ui/controlInfo.vue";
import ControlArea from "./ui/controlArea.vue";
import ApprovalInfo from "./ui/approvalInfo.vue";
import { qcckPost } from "@/api/qcckApi.js";
import { useRouter } from "vue-router";
import { ElMessage } from "element-plus";
import { info } from "sass";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
const { proxy } = getCurrentInstance();
const { D_BZ_SF } = proxy.$dict("D_BZ_SF"); //获取字典数据
const listQuery = ref({}); //表单
const dialogForm = ref(false);
const router = useRouter();
const dialogVisible = ref(false);
// 获取子组件引用
const controlInfoRef = ref(null);
const controlAreaRef = ref(null);
const approvalInfoRef = ref(null);
const infoData = ref({});
const typetext = ref("");
const formData = ref([
{
label: "是否通过",
prop: "sftg",
type: "radio",
options: D_BZ_SF
},
{
label: "",
prop: "bkshBtgyy",
type: "slot"
}
]);
// 初始化数据
const init = async (type, row) => {
listQuery.value = {
...listQuery.value, // 保留原有值
...row,
sftg: "0" // 设置新值
};
typetext.value = type;
dialogForm.value = true;
await nextTick(); // 等待子组件挂载
controlInfoRef.value?.setFormData?.(row); // 回显布控信息
controlAreaRef.value?.setFormData?.(row); // 回显布控范围
approvalInfoRef.value?.setFormData?.(row); // 回显审批信息
};
const autoClick = () => {
dialogVisible.value = true;
};
// 提交审核/审批
const handleClose = async () => {
try {
const data = {
id: listQuery.value.id, // 主键id (required)
sftg: listQuery.value.sftg // 是否通过 (required)
};
// 如果不通过,添加原因
if (data.sftg !== "1") {
data.bkshBtgyy = listQuery.value.bkshBtgyy; // 不通过原因
}
// 根据 typetext.value 决定调用哪个接口
const apiUrl =
typetext.value === "auto"
? "/mosty-gsxt/tbGsxtBk/toExamine" // 审核接口
: "/mosty-gsxt/tbGsxtBk/audits"; // 审批接口
// 调用接口
const res = await qcckPost(data, apiUrl);
if (res) {
ElMessage.success(typetext.value === "auto" ? "审核成功" : "审批成功");
dialogVisible.value = false;
router.push({ name: "myControl" });
} else {
ElMessage.error(
res.message || (typetext.value === "auto" ? "审核失败" : "审批失败")
);
}
} catch (error) {
console.error(typetext.value === "auto" ? "审核出错:" : "审批出错:", error);
ElMessage.error("请求过程中发生错误");
}
};
const close = () => {
dialogForm.value = false;
};
defineExpose({ init });
</script>
<style lang="scss" scoped>
.dialog {
padding: 20px;
.cntinfo {
color: #000;
height: calc(100% - 70px);
overflow: hidden;
overflow-y: auto;
.title-item {
font-size: 20px;
font-weight: 700;
margin-bottom: 20px;
position: relative;
&::after {
content: "";
position: absolute;
bottom: 2px;
left: 0;
width: 78px;
height: 4px;
background: linear-gradient(
90deg,
#3597f9c4 0%,
rgba(53, 150, 249, 0) 100%
);
border-radius: 4px 4px 4px 4px;
}
}
}
}
</style>

View File

@ -0,0 +1,205 @@
<template>
<el-form :model="formData" label-width="auto" label-position="left">
<!-- 处置接收单位 -->
<FormMessage
v-model="listQuery"
:formList="formData"
ref="elform"
:rules="rules"
>
<!-- 自定义插槽人员标签 -->
<template #czJsdwdm>
<el-select
v-model="listQuery.czJsdwdm"
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>
<!-- 审批流程 -->
<div class="approval-flow">
<div class="approval-flow">
<div class="step" v-for="(item, index) in step" :key="`${index}step`">
<div class="icon">
<div class="circle"></div>
<div class="line"></div>
</div>
<div>
<div>{{ item.title }}</div>
<div class="desc">
<div class="description flexcc">
<!-- 使用方案1 + 方案2 -->
<div
class="description-item"
:class="{ 'disabled-item': item.default }"
>
{{ item.fqr }}
</div>
<div class="description-item">{{ item.fqbm }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</el-form>
</template>
<script setup>
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { qcckPost, qcckPut } from "@/api/qcckApi.js";
import { fa } from "element-plus/es/locale.mjs";
import { selectUserDeptPage } from "@/api/user-manage";
const { proxy } = getCurrentInstance();
const { D_GS_BK_CZJSDWLX, D_GS_BK_TJFS } = proxy.$dict(
"D_GS_BK_CZJSDWLX",
"D_GS_BK_TJFS"
); //获取字典数据
const listQuery = ref({}); //表单
const deptList = ref([]); //部门列表
const formData = ref([
{
label: "处置接收单位",
prop: "czJsdwdm",
type: "slot"
},
{
label: "处置接收单位类型",
prop: "czJsdwlx",
type: "select",
options: D_GS_BK_CZJSDWLX,
disabled: true
},
// {
// label: "提交方式",
// prop: "bkTjfs",
// type: "radio",
// options: D_GS_BK_TJFS,
// disabled: true
// },
{
label: "签收时间",
prop: "bkSjQs",
type: "datetime",
disabled: true
}
]);
const rules = reactive({
bkBt: [{ required: true, message: "请选择处置接收单位", trigger: "blur" }],
// bkObj: [{ required: true, message: "请选择提交方式", trigger: "blur" }],
bkSjQs: [{ required: true, message: "请选择签收时间", trigger: "change" }]
});
const step = ref([
{ fqr: "发起人", fqbm: "发起部门", title: "发起申请", default: true },
{ fqr: "发起人", fqbm: "发起部门", title: "审核确认", default: false },
{ fqr: "发起人", fqbm: "发起部门", title: "审批确认", default: false }
]);
onMounted(() => {
getdepartmentList();
});
// 获取部门列表
const getdepartmentList = () => {
selectUserDeptPage().then((res) => {
deptList.value = res?.records.map((item) => ({
label: item.deptName,
value: item.deptId
}));
console.log(deptList.value, D_GS_BK_CZJSDWLX);
// tableData.value = res?.records;
});
};
// 接收父组件传入的数据并回显
const setFormData = (data) => {
listQuery.value = {
...data // 假设 data 包含所有需要的字段
};
step.value = [
{ fqr: "发起人", fqbm: "发起部门", title: "发起申请", default: true },
{
fqr: data.bkshrXm || "系统管理", // 审核人姓名
fqbm: data.bkshrSsbmmc || "西藏", // 审核部门
title: "审核确认"
},
{
fqr: data.bksprXm || "测试", // 审批人姓名
fqbm: data.bksprSsbmmc || "西藏", // 审批部门
title: "审批确认"
}
];
};
// 3. 暴露方法给父组件
defineExpose({
setFormData
});
</script>
<style lang="scss" scoped>
.step {
// position: relative;
display: flex;
gap: 5px;
box-sizing: border-box;
.desc {
margin: 5px;
color: #929090;
width: 350px;
}
.icon {
// position: absolute;
// top: 0;
// left: 0;
text-align: center;
.circle {
height: 14px;
width: 14px;
border-radius: 50%;
background-color: rgb(196, 219, 240);
}
.line {
margin: 0 auto;
width: 0;
height: calc(100% - 14px);
border: 1px dashed rgb(196, 219, 240);
}
}
}
.unit-selection {
display: flex;
align-items: center;
gap: 20px;
}
.description {
gap: 10px;
}
.description-item {
width: 300px;
height: 30px;
padding: 0 20px;
line-height: 30px;
border: 1px solid #ccc;
border-radius: 4px;
color: rgb(131, 132, 135);
box-sizing: border-box;
}
.disabled-item {
cursor: not-allowed;
opacity: 0.6;
pointer-events: none;
}
</style>

View File

@ -0,0 +1,192 @@
<template>
<div class="control-area">
<FormMessage
v-model="listQuery"
:formList="formData"
ref="elform"
:rules="rules"
>
<!-- 布控范围-->
<template #bkfwList="{ row }">
<div class="boxlist">
<MyTable
:tableData="tableDate.bkfwList"
:tableColumn="tableDate.tableColumn"
:tableHeight="tableDate.tableHeight"
:key="tableDate.keyCount"
:tableConfiger="tableDate.tableConfiger"
:controlsWidth="tableDate.controlsWidth"
>
<!-- 操作 -->
<template #controls="{ row }">
<el-link type="danger" @click="delDictItem(row.id)">删除</el-link>
</template>
</MyTable>
</div>
</template>
</FormMessage>
</div>
</template>
<script setup>
import {
reactive,
ref,
onMounted,
getCurrentInstance,
nextTick,
computed
} from "vue";
const { proxy } = getCurrentInstance();
import MyTable from "@/components/aboutTable/MyTable.vue";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { qcckPost, qcckPut } from "@/api/qcckApi.js";
const { D_GS_BK_CZYQ, D_GS_BK_CZJSDWLX, D_GS_BK_DJ, D_GS_BK_YZ, D_GS_BK_SJLX } =
proxy.$dict(
"D_GS_BK_CZYQ",
"D_GS_BK_CZJSDWLX",
"D_GS_BK_DJ",
"D_GS_BK_YZ",
"D_GS_BK_SJLX"
); //获取字典数据
const chooseShow = ref(false); //选择弹窗
const chooseTitle = ref(""); //选择弹窗
const dialogForm = ref(false); //弹窗
const chooseType = ref("01"); //选择弹窗类型
const roleIds = ref([]); //选择弹窗角色id
const fileList = ref([]); //上传附件
const tableDate = reactive({
bkfwList: [], //表格数据
rybqList: [], //内置表格数据
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: "jhMc" },
{ label: "集合说明", prop: "jhSm" }
]
});
const formData = ref([
{ label: "布控范围", prop: "bkfwList", type: "slot", width: "90%" },
{
label: "布控时间类型",
prop: "bkSjLx",
type: "select",
options: D_GS_BK_SJLX,
disabled: true
},
{
label: "布控开始时间",
prop: "bkSjKs",
type: "datetime",
disabled: true
},
{
label: "布控结束时间",
prop: "bkSjJs",
type: "datetime",
disabled: true
},
{
label: "布控失效时间",
prop: "bkSjSx",
type: "datetime",
disabled: true
},
{
label: "处置要求",
prop: "czYq",
type: "select",
options: D_GS_BK_CZYQ,
disabled: true
},
{
label: "布控等级",
prop: "bkDj",
type: "select",
options: D_GS_BK_DJ,
disabled: true
},
{
label: "布控要旨",
prop: "bkYz",
type: "select",
options: D_GS_BK_YZ,
disabled: true
},
{
label: "布控事由",
prop: "bkSy",
type: "textarea",
disabled: true
},
{
label: "上传附件",
prop: "bkFj",
type: "upload",
isImg: false,
disabled: true
}
]);
const rules = reactive({
// bkSjKs: [{ required: true, message: "请选择布控开始时间", trigger: "blur" }],
// bkSjJs: [{ required: true, message: "请选择布控结束时间", trigger: "blur" }],
czYq: [{ required: true, message: "请选择处置要求", trigger: "change" }],
bkDj: [{ required: true, message: "请选择布控等级", trigger: "change" }],
bkYz: [{ required: true, message: "请选择布控要旨", trigger: "change" }]
});
const listQuery = ref({});
// 接收父组件传入的数据并回显
const setFormData = (data) => {
tableDate.bkfwList = data.bkfwList;
tableDate.rybqList = data.rybqList;
listQuery.value = {
...data // 假设 data 包含所有需要的字段
};
};
// 3. 暴露方法给父组件
defineExpose({
setFormData
});
</script>
<style lang="scss" scoped>
.control-area {
.map {
height: 200px;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
margin: 10px 0;
}
.el-form {
/* max-width: 1200px;
margin: 20px auto; */
}
:deep(.el-textarea__inner) {
font-family: inherit;
}
}
.boxlist {
width: 99%;
height: 225px;
margin-top: 10px;
overflow: hidden;
}
</style>

View File

@ -0,0 +1,282 @@
<template>
<div class="info-container">
<!-- 布控信息 -->
<FormMessage v-model="listQuery" :formList="formData" ref="elform">
<!-- 预警标签模型-->
<template #yjbqList>
<div class="boxlist">
<MyTable
:tableData="tableDate.yjbqList"
:tableColumn="tableDate.tableColumn"
:tableHeight="tableDate.tableHeight"
:key="tableDate.keyCount"
:tableConfiger="tableDate.tableConfiger"
:controlsWidth="tableDate.controlsWidth"
>
<template #bqYs="{ row }">
<DictTag :value="row.bqYs" :tag="false" :options="D_GS_SSYJ" />
</template>
<template #bqDj="{ row }">
<DictTag :tag="false" :value="row.bqDj" :options="D_GS_BQ_DJ" />
</template>
</MyTable>
</div>
</template>
</FormMessage>
<!-- 按钮 -->
<div class="btns">
</div>
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
@chooseData="chooseData"
>
<template #fjZp="{ row }">
<img width="30" src="@/assets/images/icon100.png" alt="" />
</template>
<template #ryXb="{ row }">
<DictTag :tag="false" :value="row.ryXb" :options="D_BZ_XB" />
</template>
<template #qtTbsc="{ row }">
<div>
{{ row.qtTbsc == true ? "是" : "否" }}
</div>
</template>
<template #bkLx="{ row }">
<DictTag :tag="false" :value="row.bkLx" :options="D_GS_BK_LX" />
</template>
<!-- <template #controls="{ row }">
<el-button size="small" type="primary" link>查看档案</el-button>
<el-button size="small" type="primary" @click="editData(row)" link
>编辑</el-button
>
<el-button size="small" type="danger" @click="deleteData(row.id)" link
>删除</el-button
>
</template> -->
</MyTable>
<!-- 列表弹窗 -->
</div>
</template>
<script setup>
import MyTable from "@/components/aboutTable/MyTable.vue";
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { qcckPost, qcckPut } from "@/api/qcckApi.js";
import { add } from "lodash";
import { tr } from "element-plus/es/locale.mjs";
import { ElMessage } from "element-plus";
const { proxy } = getCurrentInstance();
const { D_GS_BK_DX, D_GS_BK_SSJZ, D_GS_SSYJ, D_GS_BQ_DJ, D_BZ_XB, D_GS_BK_LX } =
proxy.$dict(
"D_GS_BK_DX",
"D_GS_BK_SSJZ",
"D_GS_SSYJ",
"D_GS_BQ_DJ",
"D_BZ_XB",
"D_GS_BK_LX"
); //获取字典数据
const formRef = ref();
const dialogFormVisible = ref(false);
const chooseShow = ref(false); //选择弹窗
const chooseTitle = ref(""); //选择弹窗
const dialogForm = ref(false); //弹窗
const chooseType = ref("01"); //选择弹窗类型
const listQuery = ref({}); //表单
const roleIds = ref([]); //角色id
const dialogTitle = ref("新增信息"); //弹窗标题
// 表单数据
const formForData = ref({
ryXm: "", // 姓名
ryXb: "", // 性别
rySfzh: "", // 身份证号
ryHjd: "", // 户籍地
ryXjd: "", // 现居住地
rySjhm: "", // 手机号
qtTbsc: false, // 同步上传
clCph: "", // 车牌号
clCjh: "", // 车号
qtTxzh: "", // 特许证号
bkLx: "", // 人员标签
fjZp: "" // 照片
});
// 表单字段配置
const formDataModel = ref([
{ label: "姓名", prop: "ryXm", type: "input", width: "45%" },
{
label: "性别",
prop: "ryXb",
type: "select",
options: D_BZ_XB,
width: "45%"
},
{ label: "身份证号", prop: "rySfzh", type: "input", width: "45%" },
{ label: "户籍地", prop: "ryHjd", type: "input", width: "45%" },
{ label: "现居住地", prop: "ryXjd", type: "input", width: "45%" },
{ label: "手机号", prop: "rySjhm", type: "input", width: "45%" },
{ label: "同步上传", prop: "qtTbsc", type: "switch" },
{ label: "车牌号", prop: "clCph", type: "input", width: "45%" },
{ label: "车架号", prop: "clCjh", type: "input", width: "45%" },
{ label: "特许证号", prop: "qtTxzh", type: "input", width: "45%" },
{
label: "布控类型",
prop: "bkLx",
type: "radio",
width: "45%",
options: D_GS_BK_LX
},
{ label: "照片", prop: "fjZp", type: "upload" },
{ label: "人员标签", prop: "rybqList", type: "slot", width: "100%" } // 使用插槽自定义
]);
// 表单验证规则
// const rulesModel = {
// ryXm: [{ required: true, message: "请输入姓名", trigger: "blur" }],
// ryXb: [{ required: true, message: "请选择性别", trigger: "change" }],
// rySfzh: [
// { required: true, message: "请输入身份证号", trigger: "blur" },
// {
// pattern: /^\d{17}[\dXx]$/,
// message: "身份证号格式不正确",
// trigger: "blur"
// }
// ],
// rySjhm: [
// { required: true, message: "请输入手机号", trigger: "blur" },
// { pattern: /^1[3-9]\d{9}$/, message: "手机号格式不正确", trigger: "blur" }
// ]
// };
const tableDate = reactive({
yjbqList: [], //表格数据
rybqList: [], //内置表格数据
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: "bqMc", showOverflowTooltip: true },
{ label: "标签代码", prop: "bqDm" },
{ label: "标签等级", prop: "bqDj", showSolt: true },
{ label: "标签颜色", prop: "bqYs", showSolt: true }
]
});
const editFormRef = ref(null);
const currentEditIndex = ref(null);
const pageData = reactive({
tableData: [], //表格数据
rykeyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "checkBox",
loading: false,
size: "small",
border: false
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
}, //分页
controlsWidth: 220, //操作栏宽度
tableColumn: [
{ label: "照片", prop: "fjZp", showSolt: true },
{ label: "姓名", prop: "ryXm" },
{ label: "性别", prop: "ryXb", showSolt: true },
{ label: "身份证号", prop: "rySfzh" },
{ label: "户籍地", prop: "ryHjd" },
{ label: "现居住地", prop: "ryXjd" },
{ label: "手机号", prop: "rySjhm" },
{ label: "同步上传", prop: "qtTbsc", showSolt: true },
{ label: "车牌号", prop: "clCph" },
{ label: "车架号", prop: "clCjh" },
{ label: "特许证号", prop: "qtTxzh" },
{ label: "布控类型", prop: "bkLx", showSolt: true },
{ label: "人员标签", prop: "" }
]
});
const formData = ref([
{
label: "布控标题",
prop: "bkBt",
type: "input",
disabled: true
},
{
label: "所属警种",
prop: "bkSsjz",
type: "select",
options: D_GS_BK_SSJZ,
disabled: true
},
{
label: "布控对象",
prop: "bkDx",
type: "select",
options: D_GS_BK_DX,
disabled: true
},
{ label: "预警标签模型", prop: "yjbqList", type: "slot", width: "80%" }
]);
// const rules = reactive({
// bkBt: [{ required: true, message: "请输入布控标题", trigger: "blur" }],
// bkObj: [{ required: true, message: "请选择布控对象", trigger: "blur" }],
// yjbqList: [
// { required: true, message: "请选择预警标签模型", trigger: "change" }
// ]
// });
// 接收父组件传入的数据并回显
const setFormData = (data) => {
tableDate.yjbqList = data.yjbqList;
listQuery.value = {
...data // 假设 data 包含所有需要的字段
};
pageData.tableData = data.bkdxList;
console.log(listQuery.value);
};
// 3. 暴露方法给父组件
defineExpose({
setFormData
});
</script>
<style lang="scss" scoped>
.info-container {
.btns {
margin-bottom: 10px;
}
}
.boxlist {
width: 99%;
height: 225px;
margin-top: 10px;
overflow: hidden;
}
</style>

View File

@ -0,0 +1,215 @@
<template>
<el-dialog
:title="titleValue"
width="900px"
:model-value="modelValue"
append-to-body
@close="closed"
>
<div>
<el-form :model="listQuery" class="mosty-from-wrap" :inline="true">
<el-form-item label="集合名称">
<el-input
placeholder="请输入集合名称"
v-model="listQuery.jhMc"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button type="success" @click="handleFilter">查询</el-button>
<el-button type="info" @click="reset()"> 重置 </el-button>
</el-form-item>
</el-form>
<div
class="tabBox"
:class="props.Single ? 'tabBoxRadio' : ''"
style="margin-top: 0px"
>
<el-table
v-loading="loading"
ref="multipleUserRef"
@selection-change="handleSelectionChange"
:data="tableData"
border
:row-key="keyid"
style="width: 100%"
height="450"
>
<el-table-column
type="selection"
width="55"
:reserve-selection="true"
/>
<el-table-column prop="jhMc" align="center" label="集合名称" />
<el-table-column prop="jhSm" align="center" label="集合说明" />
</el-table>
</div>
<div class="fenye" :style="{ top: tableHeight + 'px' }">
<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>
</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 } 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: true
},
roleIds: {
type: Array,
default: []
}
});
const total = ref(0);
const listQuery = ref({
current: 1,
size: 20
});
const loading = ref(false);
const tableData = ref([]);
const emits = defineEmits(["update:modelValue", "chooseDate"]);
onMounted(() => {
handleFilter();
});
const closed = () => {
emits("update:modelValue", false);
};
const reset = () => {
listQuery.value = { current: 1, size: 20 };
getDataList();
};
const keyid = (row) => {
return row.id;
};
// 为用户分配角色
const onComfirm = () => {
const userList = multipleSelectionUser.value;
let list = [];
let listId = [];
userList.forEach((val) => {
if (listId.indexOf(val.id) == -1) {
list.push(val);
listId.push(val.id);
}
});
emits("chooseDate", list);
let data = { type: props.LeaderType, userList: userList };
emits("chooseDateLeader", data);
closed();
};
/**
* pageSize 改变触发
*/
const handleSizeChange = (currentSize) => {
listQuery.value.size = currentSize;
getDataList();
};
/**
* 页码改变触发
*/
const handleCurrentChange = (currentPage) => {
listQuery.value.current = currentPage;
getDataList();
};
// 查询标签组合列表
const getDataList = () => {
const data = listQuery.value;
loading.value = true;
qcckGet(data, "/mosty-gsxt/tbGsxtGzyJh/selectPage").then((res) => {
tableData.value = res?.records;
total.value = Number(res.total);
loading.value = false;
multipleUser();
});
};
//列表回显
function multipleUser() {
tableData.value.forEach((item) => {
if (props.roleIds.some((id) => id == item.id)) {
multipleUserRef.value.toggleRowSelection(item, true);
}
});
}
const handleFilter = () => {
listQuery.value.current = 1;
getDataList();
};
const multipleUserRef = ref(null);
const multipleSelectionUser = ref([]);
const handleSelectionChange = (val) => {
if (props.Single) {
if (val.length > 1) {
let del_row = val.shift();
multipleUserRef.value.toggleRowSelection(del_row, false);
}
multipleSelectionUser.value = val;
} else {
multipleSelectionUser.value = val;
}
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/layout.scss";
@import "@/assets/css/element-plus.scss";
</style>
<style>
.tabBoxRadio .el-checkbox__inner {
border-radius: 50% !important;
}
.tabBoxRadio .el-table__header-wrapper .el-checkbox {
display: none;
}
</style>