对接’我的布控的增删查改‘,布控审核送审
This commit is contained in:
parent
64bbcd2a06
commit
65947c2eb4
|
@ -44,7 +44,11 @@
|
|||
style="width: 100%"
|
||||
height="450"
|
||||
>
|
||||
<el-table-column type="selection" width="55" :reserve-selection="true" />
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
:reserve-selection="true"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="loginName"
|
||||
align="center"
|
||||
|
@ -131,7 +135,7 @@ const props = defineProps({
|
|||
roleIds: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
}
|
||||
});
|
||||
const total = ref(0);
|
||||
const listQuery = ref({
|
||||
|
@ -163,16 +167,17 @@ const keyid = (row) => {
|
|||
// 为用户分配角色
|
||||
const onComfirm = () => {
|
||||
const userList = multipleSelectionUser.value;
|
||||
let list = []
|
||||
let listId = []
|
||||
userList.forEach(val=>{
|
||||
if(listId.indexOf(val.id) == -1) {
|
||||
let list = [];
|
||||
let listId = [];
|
||||
userList.forEach((val) => {
|
||||
if (listId.indexOf(val.id) == -1) {
|
||||
list.push(val);
|
||||
listId.push(val.id);
|
||||
}
|
||||
})
|
||||
});
|
||||
emits("choosedUsers", list);
|
||||
let data = { type: props.LeaderType, userList: userList };
|
||||
|
||||
emits("choosedUsersLeader", data);
|
||||
closed();
|
||||
};
|
||||
|
@ -193,20 +198,20 @@ const handleCurrentChange = (currentPage) => {
|
|||
};
|
||||
const getListData = () => {
|
||||
const params = listQuery.value;
|
||||
selectUserDeptPage(params).then(res=>{
|
||||
selectUserDeptPage(params).then((res) => {
|
||||
tableData.value = res?.records;
|
||||
total.value = Number(res.total);
|
||||
multipleUser()
|
||||
multipleUser();
|
||||
});
|
||||
};
|
||||
|
||||
//列表回显
|
||||
function multipleUser() {
|
||||
tableData.value.forEach(item=>{
|
||||
if(props.roleIds.some(id=>id == item.id)){
|
||||
tableData.value.forEach((item) => {
|
||||
if (props.roleIds.some((id) => id == item.id)) {
|
||||
multipleUserRef.value.toggleRowSelection(item, true);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
const handleFilter = () => {
|
||||
|
@ -226,7 +231,6 @@ const handleSelectionChange = (val) => {
|
|||
} else {
|
||||
multipleSelectionUser.value = val;
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -241,10 +245,8 @@ const handleSelectionChange = (val) => {
|
|||
.tabBoxRadio .el-table__header-wrapper .el-checkbox {
|
||||
display: none;
|
||||
}
|
||||
.el-dialog{
|
||||
background: #050e33;
|
||||
}
|
||||
.el-dialog__title{
|
||||
|
||||
.el-dialog__title {
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,38 +1,147 @@
|
|||
<template>
|
||||
<el-form ref="elform" :model="listQuery" :label-width="props.labelWidth" :rules="props.rules" :inline="true" label-position="right">
|
||||
<el-form-item v-for="item in props.formList" :style="{ width: item.width }" :prop="item.prop" :label="item.label" :label-width="item.labelWidth" :key="item">
|
||||
<el-form
|
||||
ref="elform"
|
||||
:model="listQuery"
|
||||
:label-width="props.labelWidth"
|
||||
:rules="props.rules"
|
||||
:inline="true"
|
||||
label-position="right"
|
||||
>
|
||||
<el-form-item
|
||||
v-for="item in props.formList"
|
||||
:style="item.width && { width: item.width }"
|
||||
:prop="item.prop"
|
||||
:label="item.label"
|
||||
:label-width="item.labelWidth"
|
||||
:key="item"
|
||||
>
|
||||
<!-- input表单 input-->
|
||||
<MOSTY.Other v-if="item.type == 'input'" width="100%" clearable v-model="listQuery[item.prop]" :placeholder="`请输入${item.label}`"/>
|
||||
<el-input v-model="listQuery[item.prop]" v-else-if="item.type == 'textarea'" type="textarea" :rows="3" :placeholder="`请输入${item.label}`" />
|
||||
<MOSTY.Other
|
||||
v-if="item.type == 'input'"
|
||||
width="100%"
|
||||
clearable
|
||||
v-model="listQuery[item.prop]"
|
||||
:placeholder="`请输入${item.label}`"
|
||||
/>
|
||||
<el-input
|
||||
v-model="listQuery[item.prop]"
|
||||
v-else-if="item.type == 'textarea'"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
:placeholder="`请输入${item.label}`"
|
||||
/>
|
||||
<!-- 数值 inputNumber-->
|
||||
<el-input type="number" v-model="listQuery[item.prop]" v-else-if="item.type == 'inputNumber'" :placeholder="`请输入${item.label}`" />
|
||||
<el-input
|
||||
type="number"
|
||||
v-model="listQuery[item.prop]"
|
||||
v-else-if="item.type == 'inputNumber'"
|
||||
:placeholder="`请输入${item.label}`"
|
||||
/>
|
||||
<!-- 数值 number-->
|
||||
<el-input-number v-model="listQuery[item.prop]" v-else-if="item.type == 'number'" style="width:100%" :min="item.min || 0" :max="item.max || 1000" />
|
||||
<el-input-number
|
||||
v-model="listQuery[item.prop]"
|
||||
v-else-if="item.type == 'number'"
|
||||
style="width: 100%"
|
||||
:min="item.min || 0"
|
||||
:max="item.max || 1000"
|
||||
/>
|
||||
<!--选择 select-->
|
||||
<MOSTY.Select v-else-if="item.type == 'select'" filterable :multiple="item.multiple" v-model="listQuery[item.prop]" :dictEnum="item.options" width="100%" clearable :placeholder="`请选择${item.label}`"/>
|
||||
<MOSTY.Select
|
||||
v-else-if="item.type == 'select'"
|
||||
filterable
|
||||
:multiple="item.multiple"
|
||||
v-model="listQuery[item.prop]"
|
||||
:dictEnum="item.options"
|
||||
width="100%"
|
||||
clearable
|
||||
:placeholder="`请选择${item.label}`"
|
||||
/>
|
||||
<!-- 部门department -->
|
||||
<template v-else-if="item.type === 'department'">
|
||||
<MOSTY.Department clearable v-model="listQuery[item.prop]" />
|
||||
</template>
|
||||
|
||||
<!-- 上传 upload -->
|
||||
<MOSTY.Upload v-else-if="item.type == 'upload'" width="100%" v-model="listQuery[item.prop]"/>
|
||||
<MOSTY.Upload
|
||||
v-else-if="item.type == 'upload'"
|
||||
width="100%"
|
||||
v-model="listQuery[item.prop]"
|
||||
:isImg="item.isImg"
|
||||
/>
|
||||
<!--选择checkbox -->
|
||||
<MOSTY.CheckBox v-else-if="item.type == 'checkbox'" width="100%" clearable v-model="listQuery[item.prop]" :checkList="item.options" :placeholder="`请选择${item.label}`"/>
|
||||
<MOSTY.CheckBox
|
||||
v-else-if="item.type == 'checkbox'"
|
||||
width="100%"
|
||||
clearable
|
||||
v-model="listQuery[item.prop]"
|
||||
:checkList="item.options"
|
||||
:placeholder="`请选择${item.label}`"
|
||||
/>
|
||||
|
||||
<!-- 单选radio -->
|
||||
<el-radio-group v-model="listQuery[item.prop]" v-else-if="item.type == 'radio'">
|
||||
<el-radio v-for="obj in item.options" :key="obj.value" :label="obj.value" >{{ obj.label }}</el-radio>
|
||||
<el-radio-group
|
||||
v-model="listQuery[item.prop]"
|
||||
v-else-if="item.type == 'radio'"
|
||||
>
|
||||
<el-radio
|
||||
v-for="obj in item.options"
|
||||
:key="obj.value"
|
||||
:label="obj.value"
|
||||
>{{ obj.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
|
||||
<!-- 时间选择 -->
|
||||
<el-time-picker v-else-if="item.type == 'time'" v-model="listQuery[item.prop]" placeholder="选择时间" style="width:100%;" />
|
||||
<el-date-picker v-else-if="item.type == 'date'" v-model="listQuery[item.prop]" type="date" value-format="YYYY-MM-DD" placeholder="请选择日期" style="width:100%;" />
|
||||
<el-date-picker v-else-if="item.type == 'datetime'" v-model="listQuery[item.prop]" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择时间" style="width:100%;" />
|
||||
<el-date-picker v-else-if="item.type == 'datetimerange'" v-model="listQuery[item.prop]" type="datetimerange" :shortcuts="shortcuts" range-separator="To" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="选择开始时间" end-placeholder="选择结束时间" style="width:100%;" />
|
||||
<el-date-picker v-else-if="item.type == 'daterange'" v-model="listQuery[item.prop]" type="daterange" range-separator="To" value-format="YYYY-MM-DD" start-placeholder="选择开始日期" end-placeholder="选择开始日期" style="width:100%;" />
|
||||
<el-time-picker
|
||||
v-else-if="item.type == 'time'"
|
||||
v-model="listQuery[item.prop]"
|
||||
placeholder="选择时间"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-else-if="item.type == 'date'"
|
||||
v-model="listQuery[item.prop]"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择日期"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-else-if="item.type == 'datetime'"
|
||||
v-model="listQuery[item.prop]"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="请选择时间"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-else-if="item.type == 'datetimerange'"
|
||||
v-model="listQuery[item.prop]"
|
||||
type="datetimerange"
|
||||
:shortcuts="shortcuts"
|
||||
range-separator="To"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
start-placeholder="选择开始时间"
|
||||
end-placeholder="选择结束时间"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-else-if="item.type == 'daterange'"
|
||||
v-model="listQuery[item.prop]"
|
||||
type="daterange"
|
||||
range-separator="To"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="选择开始日期"
|
||||
end-placeholder="选择开始日期"
|
||||
style="width: 100%"
|
||||
/>
|
||||
|
||||
<el-switch v-else-if="item.type == 'switch'" v-model="listQuery[item.prop]" class="ml-2" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"/>
|
||||
<el-switch
|
||||
v-else-if="item.type == 'switch'"
|
||||
v-model="listQuery[item.prop]"
|
||||
class="ml-2"
|
||||
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
|
||||
/>
|
||||
|
||||
<template v-else-if="item.type === 'slot'">
|
||||
<slot :name="item.prop"></slot>
|
||||
|
@ -40,7 +149,7 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<script setup>
|
||||
<script setup>
|
||||
import * as MOSTY from "@/components/MyComponents/index";
|
||||
import { ref, defineProps, defineEmits, defineExpose, watch } from "vue";
|
||||
const props = defineProps({
|
||||
|
@ -60,7 +169,7 @@ const props = defineProps({
|
|||
modelValue: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
}
|
||||
});
|
||||
const elform = ref();
|
||||
const listQuery = ref({});
|
||||
|
@ -73,16 +182,24 @@ const submit = (resfun) => {
|
|||
});
|
||||
};
|
||||
|
||||
watch(() => listQuery.value,(newVal) => {
|
||||
emits('update:modelValue', newVal)
|
||||
},{ immediate: true, deep: true }
|
||||
watch(
|
||||
() => listQuery.value,
|
||||
(newVal) => {
|
||||
emits("update:modelValue", newVal);
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
|
||||
watch(() => props.modelValue,(newVal) => {
|
||||
listQuery.value = newVal; //赋值
|
||||
},{ immediate: true, deep: true }
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(newVal) => {
|
||||
// 只有在新值确实变化时才更新(避免空值覆盖)
|
||||
if (newVal && Object.keys(newVal).length > 0) {
|
||||
listQuery.value = { ...newVal };
|
||||
}
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
|
||||
defineExpose({ submit });
|
||||
</script>
|
||||
|
|
@ -29,7 +29,8 @@ export const privateRoutes = [
|
|||
{
|
||||
path: "/user/department-ist",
|
||||
name: "departmentList",
|
||||
component: () => import("@/views/backOfficeSystem/systemConfig/department-list/index"),
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/department-list/index"),
|
||||
meta: {
|
||||
title: "部门管理",
|
||||
icon: "article-ranking"
|
||||
|
@ -39,7 +40,8 @@ export const privateRoutes = [
|
|||
{
|
||||
path: "/user/userList",
|
||||
name: "userList",
|
||||
component: () => import("@/views/backOfficeSystem/systemConfig/user-list/index"),
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/user-list/index"),
|
||||
meta: {
|
||||
title: "用户管理",
|
||||
icon: "article-ranking"
|
||||
|
@ -48,7 +50,8 @@ export const privateRoutes = [
|
|||
{
|
||||
path: "/user/role",
|
||||
name: "userRoleIndex",
|
||||
component: () => import("@/views/backOfficeSystem/systemConfig/role-list/index"),
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/role-list/index"),
|
||||
meta: {
|
||||
title: "角色列表",
|
||||
icon: "article-ranking"
|
||||
|
@ -57,7 +60,8 @@ export const privateRoutes = [
|
|||
{
|
||||
path: "/user/menuList",
|
||||
name: "menuList",
|
||||
component: () => import("@/views/backOfficeSystem/systemConfig/menu-list/index"),
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/menu-list/index"),
|
||||
meta: {
|
||||
title: "菜单管理",
|
||||
icon: "article-ranking"
|
||||
|
@ -67,7 +71,8 @@ export const privateRoutes = [
|
|||
{
|
||||
path: "/dict/detail",
|
||||
name: "dictDetail",
|
||||
component: () => import("@/views/backOfficeSystem/systemConfig/dict/detail"),
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/dict/detail"),
|
||||
meta: {
|
||||
title: "字典数据"
|
||||
}
|
||||
|
@ -75,7 +80,8 @@ export const privateRoutes = [
|
|||
{
|
||||
path: "/dict/index",
|
||||
name: "dictIndex",
|
||||
component: () => import("@/views/backOfficeSystem/systemConfig/dict/index"),
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/dict/index"),
|
||||
meta: {
|
||||
title: "字典列表",
|
||||
icon: "article-ranking"
|
||||
|
@ -85,7 +91,10 @@ export const privateRoutes = [
|
|||
{
|
||||
path: "/user/deptAllocationUser/:id",
|
||||
name: "deptAllocationUser",
|
||||
component: () => import("@/views/backOfficeSystem/systemConfig/department-list/deptAllocationUser"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/systemConfig/department-list/deptAllocationUser"
|
||||
),
|
||||
meta: {
|
||||
title: "管理用户"
|
||||
}
|
||||
|
@ -93,7 +102,10 @@ export const privateRoutes = [
|
|||
{
|
||||
path: "/user/allocationUser/:id",
|
||||
name: "allocationUser",
|
||||
component: () => import("@/views/backOfficeSystem/systemConfig/role-list/allocationUser"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/systemConfig/role-list/allocationUser"
|
||||
),
|
||||
meta: {
|
||||
title: "分配用户"
|
||||
}
|
||||
|
@ -102,7 +114,10 @@ export const privateRoutes = [
|
|||
{
|
||||
path: "/user/systemConfig",
|
||||
name: "systemConfig",
|
||||
component: () => import("@/views/backOfficeSystem/systemConfig/system-config-list/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/systemConfig/system-config-list/index"
|
||||
),
|
||||
meta: {
|
||||
title: "系统配置",
|
||||
icon: "article-ranking"
|
||||
|
@ -144,7 +159,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/IdentityManage",
|
||||
name: "IdentityManage",
|
||||
component: () => import("@/views/backOfficeSystem/fourColorManage/IdentityManage/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/fourColorManage/IdentityManage/index"
|
||||
),
|
||||
meta: {
|
||||
title: "身份标签管理",
|
||||
icon: "article"
|
||||
|
@ -153,7 +171,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/BehaviorLabels",
|
||||
name: "BehaviorLabels",
|
||||
component: () => import("@/views/backOfficeSystem/fourColorManage/BehaviorLabels/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/fourColorManage/BehaviorLabels/index"
|
||||
),
|
||||
meta: {
|
||||
title: "行为标签管理",
|
||||
icon: "article"
|
||||
|
@ -162,7 +183,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/tagManage",
|
||||
name: "tagManage",
|
||||
component: () => import("@/views/backOfficeSystem/fourColorManage/tagManage/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/fourColorManage/tagManage/index"
|
||||
),
|
||||
meta: {
|
||||
title: "标签组合管理",
|
||||
icon: "article"
|
||||
|
@ -178,7 +202,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/warningControl",
|
||||
name: "warningControl",
|
||||
component: () => import("@/views/backOfficeSystem/IntelligentControl/warningControl/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/IntelligentControl/warningControl/index"
|
||||
),
|
||||
meta: {
|
||||
title: "预警布控",
|
||||
icon: "article"
|
||||
|
@ -187,7 +214,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/myControl",
|
||||
name: "myControl",
|
||||
component: () => import("@/views/backOfficeSystem/IntelligentControl/myControl/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/IntelligentControl/myControl/index"
|
||||
),
|
||||
meta: {
|
||||
title: "我的布控",
|
||||
icon: "article"
|
||||
|
@ -196,7 +226,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/ControlApproval",
|
||||
name: "ControlApproval",
|
||||
component: () => import("@/views/backOfficeSystem/IntelligentControl/ControlApproval/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/IntelligentControl/ControlApproval/index"
|
||||
),
|
||||
meta: {
|
||||
title: "布控审批",
|
||||
icon: "article"
|
||||
|
@ -212,7 +245,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/DatAcquisition",
|
||||
name: "DatAcquisition",
|
||||
component: () => import("@/views/backOfficeSystem/ResearchJudgment/DatAcquisition/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/ResearchJudgment/DatAcquisition/index"
|
||||
),
|
||||
meta: {
|
||||
title: "情报数据采集",
|
||||
icon: "article"
|
||||
|
@ -221,7 +257,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/MoralAnalysis",
|
||||
name: "MoralAnalysis",
|
||||
component: () => import("@/views/backOfficeSystem/ResearchJudgment/MoralAnalysis/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/ResearchJudgment/MoralAnalysis/index"
|
||||
),
|
||||
meta: {
|
||||
title: "情报语义分析",
|
||||
icon: "article"
|
||||
|
@ -230,7 +269,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/IntelligenceManagement",
|
||||
name: "IntelligenceManagement",
|
||||
component: () => import("@/views/backOfficeSystem/ResearchJudgment/IntelligenceManagement/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/ResearchJudgment/IntelligenceManagement/index"
|
||||
),
|
||||
meta: {
|
||||
title: "情报管理",
|
||||
icon: "article"
|
||||
|
@ -246,7 +288,9 @@ export const publicRoutes = [
|
|||
path: "/InformationFlow",
|
||||
name: "InformationFlow",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/ResearchJudgment/InformationFlows/InformationFlow/index"),
|
||||
import(
|
||||
"@/views/backOfficeSystem/ResearchJudgment/InformationFlows/InformationFlow/index"
|
||||
),
|
||||
meta: {
|
||||
title: "情报信息流转",
|
||||
icon: "article"
|
||||
|
@ -256,7 +300,9 @@ export const publicRoutes = [
|
|||
path: "/InstructionInformation",
|
||||
name: "InstructionInformation",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/ResearchJudgment/InformationFlows/InstructionInformation/index"),
|
||||
import(
|
||||
"@/views/backOfficeSystem/ResearchJudgment/InformationFlows/InstructionInformation/index"
|
||||
),
|
||||
meta: {
|
||||
title: "指令信息",
|
||||
icon: "article"
|
||||
|
@ -266,7 +312,9 @@ export const publicRoutes = [
|
|||
path: "/StatisticalAnalysis",
|
||||
name: "StatisticalAnalysis",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/ResearchJudgment/InformationFlows/StatisticalAnalysis/index"),
|
||||
import(
|
||||
"@/views/backOfficeSystem/ResearchJudgment/InformationFlows/StatisticalAnalysis/index"
|
||||
),
|
||||
meta: {
|
||||
title: "情报统计分析",
|
||||
icon: "article"
|
||||
|
@ -277,7 +325,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/RecordsOperations",
|
||||
name: "RecordsOperations",
|
||||
component: () => import("@/views/backOfficeSystem/ResearchJudgment/RecordsOperations/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/ResearchJudgment/RecordsOperations/index"
|
||||
),
|
||||
meta: {
|
||||
title: "操作记录",
|
||||
icon: "article"
|
||||
|
@ -293,7 +344,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/RlStatisticalAnalysis",
|
||||
name: "RlStatisticalAnalysis",
|
||||
component: () => import("@/views/backOfficeSystem/HumanIntelligence/RlStatisticalAnalysis/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/HumanIntelligence/RlStatisticalAnalysis/index"
|
||||
),
|
||||
meta: {
|
||||
title: "人力情报统计分析",
|
||||
icon: "article"
|
||||
|
@ -302,7 +356,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/CollectCrculate",
|
||||
name: "CollectCrculate",
|
||||
component: () => import("@/views/backOfficeSystem/HumanIntelligence/CollectCrculate/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/HumanIntelligence/CollectCrculate/index"
|
||||
),
|
||||
meta: {
|
||||
title: "人力情报信息采集流转",
|
||||
icon: "article"
|
||||
|
@ -311,7 +368,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/TaskScheduling",
|
||||
name: "TaskScheduling",
|
||||
component: () => import("@/views/backOfficeSystem/HumanIntelligence/TaskScheduling/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/HumanIntelligence/TaskScheduling/index"
|
||||
),
|
||||
meta: {
|
||||
title: "人力情报信息搜索任务调度",
|
||||
icon: "article"
|
||||
|
@ -320,7 +380,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/ConstructionManagement",
|
||||
name: "ConstructionManagement",
|
||||
component: () => import("@/views/backOfficeSystem/HumanIntelligence/ConstructionManagement/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/HumanIntelligence/ConstructionManagement/index"
|
||||
),
|
||||
meta: {
|
||||
title: "社会信息人员建设管理",
|
||||
icon: "article"
|
||||
|
@ -336,7 +399,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/ZdryFjyp",
|
||||
name: "ZdryFjyp",
|
||||
component: () => import("@/views/backOfficeSystem/ExcavationResearch/ZdryFjyp/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/ExcavationResearch/ZdryFjyp/index"
|
||||
),
|
||||
meta: {
|
||||
title: "重点人员发掘研判",
|
||||
icon: "article"
|
||||
|
@ -345,7 +411,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/PreliminaryExcavations",
|
||||
name: "PreliminaryExcavations",
|
||||
component: () => import("@/views/backOfficeSystem/ExcavationResearch/PreliminaryExcavations/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/ExcavationResearch/PreliminaryExcavations/index"
|
||||
),
|
||||
meta: {
|
||||
title: "重点人员初步发掘",
|
||||
icon: "article"
|
||||
|
@ -354,7 +423,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/LandingAudit",
|
||||
name: "LandingAudit",
|
||||
component: () => import("@/views/backOfficeSystem/ExcavationResearch/LandingAudit/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/ExcavationResearch/LandingAudit/index"
|
||||
),
|
||||
meta: {
|
||||
title: "重点人员落地审核",
|
||||
icon: "article"
|
||||
|
@ -363,7 +435,10 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/WarningModel",
|
||||
name: "WarningModel",
|
||||
component: () => import("@/views/backOfficeSystem/ExcavationResearch/WarningModel/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/ExcavationResearch/WarningModel/index"
|
||||
),
|
||||
meta: {
|
||||
title: "重点人员预警模型",
|
||||
icon: "article"
|
||||
|
@ -383,21 +458,25 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/ResearchHome",
|
||||
name: "ResearchHome",
|
||||
component: () => import("@/views/backOfficeSystem/ResearchJudgment/ResearchHome/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/ResearchJudgment/ResearchHome/index"
|
||||
),
|
||||
meta: {
|
||||
title: "研判首页",
|
||||
icon: "article"
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/MeetingRoom",
|
||||
name: "MeetingRoom",
|
||||
component: () => import("@/views/backOfficeSystem/MeetingRoom/index"),
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/MeetingRoom/index"),
|
||||
meta: {
|
||||
title: "网上会商室",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -412,23 +491,51 @@ export const publicRoutes = [
|
|||
{
|
||||
path: "/mpvGroup",
|
||||
name: "mpvGroup",
|
||||
component: () => import("@/views/backOfficeSystem/DeploymentDisposal/mpvGroup/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/DeploymentDisposal/mpvGroup/index"
|
||||
),
|
||||
meta: {
|
||||
title: "重点群体管理",
|
||||
icon: "article"
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/mpvPeo",
|
||||
name: "mpvPeo",
|
||||
component: () => import("@/views/backOfficeSystem/DeploymentDisposal/mpvPeo/index"),
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/DeploymentDisposal/mpvPeo/index"
|
||||
),
|
||||
meta: {
|
||||
title: "重点人管理",
|
||||
icon: "article"
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/BasicManagement",
|
||||
name: "BasicManagement",
|
||||
meta: {
|
||||
title: "基础管理",
|
||||
icon: "article"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/surveillanceControl",
|
||||
name: "surveillanceControl",
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/BasicManagement/surveillanceControl/index"
|
||||
),
|
||||
meta: {
|
||||
title: "布控监视",
|
||||
icon: "article"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
@ -441,7 +548,7 @@ const router = createRouter({
|
|||
export function resetRouter() {
|
||||
if (store.getters?.routeReady && store.getters?.userInfo?.permission?.menus) {
|
||||
const menus = store.getters.userInfo.permission.menus;
|
||||
menus.forEach(menu => {
|
||||
menus.forEach((menu) => {
|
||||
router.removeRoute(menu);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -0,0 +1,209 @@
|
|||
<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: () => {}
|
||||
},
|
||||
|
||||
|
||||
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 };
|
||||
getListData();
|
||||
};
|
||||
|
||||
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;
|
||||
getListData();
|
||||
};
|
||||
|
||||
/**
|
||||
* 页码改变触发
|
||||
*/
|
||||
const handleCurrentChange = (currentPage) => {
|
||||
listQuery.value.current = currentPage;
|
||||
getListData();
|
||||
};
|
||||
const getListData = () => {
|
||||
const data = listQuery.value;
|
||||
loading.value = true;
|
||||
qcckGet(data, "/mosty-gsxt/tbGsxtBqgl/selectPage")
|
||||
.then((res) => {
|
||||
tableData.value = res?.records;
|
||||
total.value = Number(res.total);
|
||||
loading.value = false;
|
||||
multipleUser();
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
//列表回显
|
||||
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;
|
||||
getListData();
|
||||
};
|
||||
|
||||
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>
|
|
@ -0,0 +1,242 @@
|
|||
<template>
|
||||
<div class="dialog" v-if="dialogForm">
|
||||
<div class="head_box">
|
||||
<span class="title">设备来源范围{{ 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
|
||||
v-model="listQuery"
|
||||
:formList="formData"
|
||||
ref="elform"
|
||||
:rules="rules"
|
||||
>
|
||||
<!-- 身份标签细类 -->
|
||||
<template #sxtList>
|
||||
<el-button @click="openDialog('01')">选择</el-button>
|
||||
<div class="boxlist">
|
||||
<MyTable
|
||||
:tableData="tableDate.sxtList"
|
||||
: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>
|
||||
<!-- 列表弹窗 -->
|
||||
<DialogList
|
||||
:Single="false"
|
||||
:roleIds="roleIds"
|
||||
v-if="chooseShow"
|
||||
:dic="props.dic"
|
||||
@chooseDate="chooseDate"
|
||||
:titleValue="chooseTitle"
|
||||
v-model="chooseShow"
|
||||
:bqLx="chooseType"
|
||||
bqDl="02"
|
||||
></DialogList>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||
import DialogList from "@/views/backOfficeSystem/BasicManagement/components/dialogList.vue";
|
||||
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
||||
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
|
||||
import {
|
||||
ref,
|
||||
defineExpose,
|
||||
defineProps,
|
||||
reactive,
|
||||
defineEmits,
|
||||
getCurrentInstance
|
||||
} from "vue";
|
||||
const emit = defineEmits(["updateDate"]);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const props = defineProps({
|
||||
dic: Object
|
||||
});
|
||||
const roleIds = ref([]); //角色id
|
||||
const chooseType = ref("01"); //选择弹窗类型
|
||||
const chooseShow = ref(false); //选择弹窗
|
||||
const chooseTitle = ref(""); //选择弹窗
|
||||
const dialogForm = ref(false); //弹窗
|
||||
const formData = reactive([
|
||||
{ label: "集合名称", prop: "jhMc", type: "input" },
|
||||
{ label: "集合说明", prop: "jhSm", type: "input" },
|
||||
|
||||
{ label: "摄像头列表", prop: "sxtList", type: "slot", width: "100%" }
|
||||
]);
|
||||
const rules = reactive({
|
||||
jhMc: [{ required: true, message: "请输入集合名称", trigger: "blur" }],
|
||||
jhSm: [{ required: true, message: "请输入集合说明", trigger: "blur" }]
|
||||
});
|
||||
|
||||
const tableDate = reactive({
|
||||
sxtList: [
|
||||
{
|
||||
csmc: "产商名称",
|
||||
csmc: "厂商名称",
|
||||
ipdz: "IP地址",
|
||||
ipv6dz: "IPV6地址",
|
||||
jd: "集合名称",
|
||||
jkdbgbh: "监控点国标编号",
|
||||
sbbh: "设备编号",
|
||||
sbmc: "设备名称",
|
||||
sjly: "数据来源",
|
||||
sjlyid: " 数据来源ID",
|
||||
sxtId: "摄像头ID",
|
||||
wd: "地球纬度"
|
||||
}
|
||||
], //表格数据
|
||||
xwbqIdList: [], //表格数据
|
||||
keyCount: 0,
|
||||
tableConfiger: {
|
||||
rowHieght: 61,
|
||||
showSelectType: "null",
|
||||
loading: false
|
||||
},
|
||||
total: 0,
|
||||
tableHeight: 225,
|
||||
pageConfiger: {
|
||||
pageSize: 20,
|
||||
pageCurrent: 1
|
||||
}, //分页
|
||||
controlsWidth: 90, //操作栏宽度
|
||||
tableColumn: [
|
||||
{ label: "产商名称", prop: "csmc", showOverflowTooltip: true },
|
||||
{ label: "厂商名称", prop: "csmc" },
|
||||
{ label: "IP地址", prop: "ipdz" },
|
||||
{ label: "IPV6地址", prop: "ipv6dz" },
|
||||
{ label: "集合名称", prop: "jd" },
|
||||
{ label: "监控点国标编号", prop: "jkdbgbh" },
|
||||
{ label: "设备编号", prop: "sbbh" },
|
||||
{ label: "设备名称", prop: "sbmc" },
|
||||
{ label: "数据来源(1 海康 2 旷视)", prop: "sjly" },
|
||||
{ label: "数据来源ID", prop: "sjlyid" },
|
||||
{ label: "摄像头ID", prop: "sxtId" },
|
||||
{ label: "地球纬度", prop: "wd" }
|
||||
]
|
||||
});
|
||||
const listQuery = ref({}); //表单
|
||||
const loading = ref(false);
|
||||
const elform = ref();
|
||||
const title = ref("");
|
||||
// 初始化数据
|
||||
const init = (type, row) => {
|
||||
dialogForm.value = true;
|
||||
title.value = type == "add" ? "新增" : "编辑";
|
||||
if (row) getDataById(row.id);
|
||||
};
|
||||
// 根据id查询详情
|
||||
const getDataById = (id) => {
|
||||
qcckGet({}, "/mosty-gsxt/tbGsxtGzyJh/selectVoById/" + id).then((res) => {
|
||||
listQuery.value = res;
|
||||
tableDate.sxtList = res.sxtList;
|
||||
listQuery.value.sxtList = res.sxtList.map((item) => item.id);
|
||||
tableDate.keyCount++;
|
||||
});
|
||||
};
|
||||
|
||||
// 提交
|
||||
const submit = () => {
|
||||
elform.value.submit((data) => {
|
||||
let url =
|
||||
title.value == "新增"
|
||||
? "/mosty-gsxt/tbGsxtGzyJh/save"
|
||||
: "/mosty-gsxt/tbGsxtGzyJh/update";
|
||||
let params = { ...data };
|
||||
params.sxtList = [
|
||||
{
|
||||
csmc: "产商名称",
|
||||
csmc: "厂商名称",
|
||||
ipdz: "IP地址",
|
||||
ipv6dz: "IPV6地址",
|
||||
jd: 29.6510453, //经度
|
||||
jkdbgbh: "监控点国标编号",
|
||||
sbbh: "设备编号",
|
||||
sbmc: "设备名称",
|
||||
sjly: "数据来源",
|
||||
sjlyid: " 数据来源ID",
|
||||
sxtId: "摄像头ID",
|
||||
wd: 94.3602321 //维度
|
||||
}
|
||||
];
|
||||
loading.value = true;
|
||||
qcckPost(params, url)
|
||||
.then((res) => {
|
||||
proxy.$message({ type: "success", message: title.value + "成功" });
|
||||
emit("updateDate");
|
||||
loading.value = false;
|
||||
close();
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
});
|
||||
};
|
||||
// 打开弹窗
|
||||
const openDialog = (type) => {
|
||||
chooseShow.value = true;
|
||||
chooseType.value = type;
|
||||
chooseTitle.value = "选择摄像头列表";
|
||||
roleIds.value = tableDate.sxtList.map((item) => item.id);
|
||||
};
|
||||
// 选择数据
|
||||
const chooseDate = (data) => {
|
||||
if (chooseType.value == "01") {
|
||||
tableDate.sxtList = data;
|
||||
listQuery.value.sxtList = tableDate.sxtList.map((item) => item.id);
|
||||
} else {
|
||||
tableDate.xwbqIdList = data;
|
||||
listQuery.value.xwbqIdList = tableDate.xwbqIdList.map((item) => item.id);
|
||||
}
|
||||
};
|
||||
|
||||
// 删除
|
||||
const delDictItem = (id, type) => {
|
||||
tableDate.sxtList = tableDate.sxtList.filter((item) => item.id !== id);
|
||||
listQuery.value.sxtList = tableDate.sxtList.map((item) => item.id);
|
||||
};
|
||||
// 关闭
|
||||
const close = () => {
|
||||
listQuery.value = {};
|
||||
tableDate.sxtList = [];
|
||||
dialogForm.value = false;
|
||||
loading.value = false;
|
||||
};
|
||||
defineExpose({ init });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/assets/css/layout.scss";
|
||||
@import "~@/assets/css/element-plus.scss";
|
||||
.boxlist {
|
||||
width: 99%;
|
||||
height: 225px;
|
||||
margin-top: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,193 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="titleBox">
|
||||
<PageTitle title="布控监视管理">
|
||||
<!-- <el-button>
|
||||
<span style="vertical-align: middle">调级</span>
|
||||
</el-button>
|
||||
<el-button>
|
||||
<span style="vertical-align: middle">导出</span>
|
||||
</el-button>
|
||||
<el-button>
|
||||
<span style="vertical-align: middle">导入</span>
|
||||
</el-button> -->
|
||||
<el-button type="primary" @click="addEdit('add', '')">
|
||||
<el-icon style="vertical-align: middle"><CirclePlus /></el-icon>
|
||||
<span style="vertical-align: middle">新增</span>
|
||||
</el-button>
|
||||
</PageTitle>
|
||||
</div>
|
||||
<!-- 搜索 -->
|
||||
<div ref="searchBox">
|
||||
<Search
|
||||
:searchArr="searchConfiger"
|
||||
@submit="onSearch"
|
||||
:key="pageData.keyCount"
|
||||
></Search>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<div class="tabBox">
|
||||
<MyTable
|
||||
:tableData="pageData.tableData"
|
||||
:tableColumn="pageData.tableColumn"
|
||||
:tableHeight="pageData.tableHeight"
|
||||
:key="pageData.keyCount"
|
||||
:tableConfiger="pageData.tableConfiger"
|
||||
:controlsWidth="pageData.controlsWidth"
|
||||
>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link type="primary" @click="addEdit('edit', row)">编辑</el-link>
|
||||
<el-link type="danger" @click="delDictItem(row.id)">删除</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
<Pages
|
||||
@changeNo="changeNo"
|
||||
@changeSize="changeSize"
|
||||
:tableHeight="pageData.tableHeight"
|
||||
:pageConfiger="{
|
||||
...pageData.pageConfiger,
|
||||
total: pageData.total
|
||||
}"
|
||||
></Pages>
|
||||
</div>
|
||||
<!-- 编辑详情 -->
|
||||
<EditAddForm
|
||||
v-if="show"
|
||||
ref="detailDiloag"
|
||||
:dic="{ D_GS_BQ_LX, D_GS_BQ_DJ, D_GS_SSYJ, D_GS_BQ_LB }"
|
||||
@updateDate="getList"
|
||||
/>
|
||||
</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 EditAddForm from "./components/editAddForm.vue";
|
||||
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_GS_BQ_DJ, D_GS_SSYJ, D_GS_BQ_LB, D_GS_BQ_LX } = proxy.$dict(
|
||||
"D_GS_BQ_DJ",
|
||||
"D_GS_SSYJ",
|
||||
"D_GS_BQ_LB",
|
||||
"D_GS_BQ_LX"
|
||||
); //获取字典数据
|
||||
const detailDiloag = ref();
|
||||
const show = ref(false);
|
||||
const searchBox = ref(); //搜索框
|
||||
const searchConfiger = ref([
|
||||
{
|
||||
label: "集合名称",
|
||||
prop: "jhMc",
|
||||
placeholder: "请输入集合名称",
|
||||
showType: "input"
|
||||
},
|
||||
{
|
||||
label: "集合说明",
|
||||
prop: "jhSm",
|
||||
placeholder: "请输入集合说明",
|
||||
showType: "input"
|
||||
},
|
||||
|
||||
]);
|
||||
const queryFrom = ref({});
|
||||
const pageData = reactive({
|
||||
tableData: [], //表格数据
|
||||
keyCount: 0,
|
||||
tableConfiger: {
|
||||
rowHieght: 61,
|
||||
showSelectType: "null",
|
||||
loading: false
|
||||
},
|
||||
total: 0,
|
||||
pageConfiger: {
|
||||
pageSize: 20,
|
||||
pageCurrent: 1
|
||||
}, //分页
|
||||
controlsWidth: 160, //操作栏宽度
|
||||
tableColumn: [
|
||||
{
|
||||
label: "集合名称",
|
||||
prop: "jhMc"
|
||||
},
|
||||
{
|
||||
label: "集合说明",
|
||||
prop: "jhSm"
|
||||
},
|
||||
|
||||
]
|
||||
});
|
||||
onMounted(() => {
|
||||
tabHeightFn();
|
||||
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 = () => {
|
||||
pageData.tableConfiger.loading = true;
|
||||
qcckGet(queryFrom.value, "/mosty-gsxt/tbGsxtGzyJh/selectPage")
|
||||
.then((res) => {
|
||||
pageData.tableData = res.records;
|
||||
pageData.total = res.total;
|
||||
pageData.tableConfiger.loading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
pageData.tableConfiger.loading = false;
|
||||
});
|
||||
};
|
||||
|
||||
// 删除
|
||||
const delDictItem = (id) => {
|
||||
proxy
|
||||
.$confirm("确定要删除", "警告", { type: "warning" })
|
||||
.then(() => {
|
||||
qcckDelete({}, "/mosty-gsxt/tbGsxtBqzh/" + id).then(() => {
|
||||
proxy.$message({ type: "success", message: "删除成功" });
|
||||
getList();
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
// 新增
|
||||
const addEdit = (type, row) => {
|
||||
show.value = true;
|
||||
nextTick(() => {
|
||||
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>
|
|
@ -8,16 +8,22 @@
|
|||
<div ref="searchBox">
|
||||
<!-- 顶部主导航 -->
|
||||
<div class="main-nav">
|
||||
<el-button :class="['nav-btn', activeMainNav === 'todo' ? 'active' : '']" @click="activeMainNav = 'todo'">
|
||||
<el-button
|
||||
:class="['nav-btn', activeMainNav === 'todo' ? 'active' : '']"
|
||||
@click="activeMainNav = 'todo'"
|
||||
>
|
||||
我的待办
|
||||
</el-button>
|
||||
<el-button :class="['nav-btn', activeMainNav === 'done' ? 'active' : '']" @click="activeMainNav = 'done'">
|
||||
<el-button
|
||||
:class="['nav-btn', activeMainNav === 'done' ? 'active' : '']"
|
||||
@click="activeMainNav = 'done'"
|
||||
>
|
||||
我的已办
|
||||
</el-button>
|
||||
</div>
|
||||
<!-- 子导航 -->
|
||||
<div class="sub-nav">
|
||||
<el-tabs v-model="activeSubNav">
|
||||
<el-tabs v-model="activeSubNav" @click="handleType">
|
||||
<el-tab-pane label="我的发起" name="myInitiate"></el-tab-pane>
|
||||
<el-tab-pane label="我的审核" name="myAudit"></el-tab-pane>
|
||||
<el-tab-pane label="我的审批" name="myApprove"></el-tab-pane>
|
||||
|
@ -25,7 +31,11 @@
|
|||
<el-tab-pane label="我的处置" name="myHandle"></el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount">
|
||||
<Search
|
||||
:searchArr="searchConfiger"
|
||||
@submit="onSearch"
|
||||
:key="pageData.keyCount"
|
||||
>
|
||||
<template #defaultSlot>
|
||||
<div>
|
||||
<el-input-number v-model="queryFrom.xqy"></el-input-number>
|
||||
|
@ -42,8 +52,14 @@
|
|||
<el-button>批量处理</el-button>
|
||||
<el-button>导出</el-button>
|
||||
</div>
|
||||
<el-input v-model="input2" style="max-width: 300px" placeholder="请输入关键字">
|
||||
<template #append><el-button type="primary" icon="Search"></el-button></template>
|
||||
<el-input
|
||||
v-model="input2"
|
||||
style="max-width: 300px"
|
||||
placeholder="请输入关键字"
|
||||
>
|
||||
<template #append
|
||||
><el-button type="primary" icon="Search"></el-button
|
||||
></template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
|
@ -58,7 +74,9 @@
|
|||
>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-button size="small" @click="addEdit('detail', row)">详情</el-button>
|
||||
<el-button size="small" @click="addEdit('detail', row)"
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button size="small">从业人员</el-button>
|
||||
<el-button size="small">转区域</el-button>
|
||||
</template>
|
||||
|
@ -79,22 +97,26 @@
|
|||
</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/detailForm.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 = ref();
|
||||
// 主导航激活状态
|
||||
const activeMainNav = ref("todo");
|
||||
// 子导航激活状态
|
||||
const activeSubNav = ref("myAudit");
|
||||
const searchConfiger = ref([
|
||||
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/detailForm.vue";
|
||||
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
|
||||
import { setItem, getItem, removeAllItem } from "@/utils/storage";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const detailDiloag = ref();
|
||||
const searchBox = ref(); //搜索框
|
||||
const btns = ref();
|
||||
const userId = getItem("USERID");
|
||||
|
||||
// 主导航激活状态
|
||||
const activeMainNav = ref("todo");
|
||||
// 子导航激活状态
|
||||
const activeSubNav = ref("myAudit");
|
||||
const searchConfiger = ref([
|
||||
{
|
||||
label: "布控类别",
|
||||
prop: "category",
|
||||
|
@ -116,7 +138,12 @@
|
|||
showType: "select",
|
||||
options: [{ label: "在业", value: "在业" }]
|
||||
},
|
||||
{ label: "布控时间", prop: "dateRange", placeholder: "请输入布控时间", showType: "daterange" },
|
||||
{
|
||||
label: "布控时间",
|
||||
prop: "dateRange",
|
||||
placeholder: "请输入布控时间",
|
||||
showType: "daterange"
|
||||
},
|
||||
{
|
||||
label: "预计布控类型",
|
||||
prop: "controlType",
|
||||
|
@ -145,9 +172,10 @@
|
|||
showType: "select",
|
||||
options: [{ label: "在业", value: "在业" }]
|
||||
}
|
||||
]);
|
||||
const queryFrom = ref({});
|
||||
const pageData = reactive({
|
||||
]);
|
||||
const queryFrom = ref({});
|
||||
const userInfo = ref({});
|
||||
const pageData = reactive({
|
||||
tableData: [
|
||||
[
|
||||
{
|
||||
|
@ -189,69 +217,93 @@
|
|||
{ label: "最近预警时间", prop: "lastAlertTime" },
|
||||
{ label: "布控发起人", prop: "creator" }
|
||||
]
|
||||
});
|
||||
onMounted(() => {
|
||||
// getList()
|
||||
});
|
||||
onMounted(() => {
|
||||
tabHeightFn();
|
||||
});
|
||||
getUserInfo();
|
||||
});
|
||||
|
||||
//选择类型
|
||||
const handleType = val => {
|
||||
const getUserInfo = async () => {
|
||||
console.log(userId, "userId");
|
||||
await qcckGet({}, `/mosty-base/sysUser/getUserInfo/${userId}`).then((res) => {
|
||||
console.log(res, "res");
|
||||
userInfo.value = res;
|
||||
setItem("userInfo", res);
|
||||
getList();
|
||||
});
|
||||
};
|
||||
|
||||
//选择类型
|
||||
const handleType = (val) => {
|
||||
pageData.keyCount++;
|
||||
pageData.pageConfiger.pageCurrent = 1;
|
||||
getList();
|
||||
};
|
||||
// 搜索
|
||||
const onSearch = val => {
|
||||
};
|
||||
// 搜索
|
||||
const onSearch = (val) => {
|
||||
queryFrom.value = { ...val };
|
||||
pageData.pageConfiger.pageCurrent = 1;
|
||||
getList();
|
||||
};
|
||||
};
|
||||
|
||||
const changeNo = val => {
|
||||
const changeNo = (val) => {
|
||||
pageData.pageConfiger.pageNum = val;
|
||||
getList();
|
||||
};
|
||||
const changeSize = val => {
|
||||
};
|
||||
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/tbDwKscs/queryList';
|
||||
// qcckPost(data,url).then(res=>{
|
||||
// pageData.tableData = res.records || [];
|
||||
// pageData.total = res.total;
|
||||
// pageData.tableConfiger.loading = false;
|
||||
// }).catch(()=>{ pageData.tableConfiger.loading = false; })
|
||||
// 获取列表
|
||||
const getList = (val) => {
|
||||
pageData.tableConfiger.loading = true;
|
||||
let data = {
|
||||
...pageData.pageConfiger,
|
||||
...queryFrom.value,
|
||||
bkfqrSfzh: userInfo.value.idEntityCard
|
||||
};
|
||||
console.log(activeSubNav.value, "activeSubNav.value");
|
||||
let url = "/mosty-gsxt/tbGsxtBk/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) => {
|
||||
// 详情
|
||||
const addEdit = (type, row) => {
|
||||
detailDiloag.value.init(type, row);
|
||||
};
|
||||
};
|
||||
|
||||
// 表格高度计算
|
||||
const tabHeightFn = () => {
|
||||
// 表格高度计算
|
||||
const tabHeightFn = () => {
|
||||
console.log("btns.value.offsetHeight", btns.value.offsetHeight);
|
||||
|
||||
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - btns.value.offsetHeight - 30 - 250;
|
||||
pageData.tableHeight =
|
||||
window.innerHeight -
|
||||
searchBox.value.offsetHeight -
|
||||
btns.value.offsetHeight -
|
||||
30 -
|
||||
250;
|
||||
window.onresize = function () {
|
||||
tabHeightFn();
|
||||
};
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.main-nav {
|
||||
.main-nav {
|
||||
padding: 16px;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-btn {
|
||||
.nav-btn {
|
||||
margin-right: 10px;
|
||||
border: none;
|
||||
background: none;
|
||||
|
@ -259,27 +311,27 @@
|
|||
background-color: #409eff;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sub-nav {
|
||||
.sub-nav {
|
||||
background-color: #fff;
|
||||
padding: 0 16px;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-tabs__header) {
|
||||
:deep(.el-tabs__header) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-tabs__nav-wrap::after) {
|
||||
:deep(.el-tabs__nav-wrap::after) {
|
||||
height: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-table--fit) {
|
||||
:deep(.el-table--fit) {
|
||||
top: 52px !important;
|
||||
}
|
||||
.btns {
|
||||
}
|
||||
.btns {
|
||||
height: 52px;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -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>
|
|
@ -3,44 +3,99 @@
|
|||
<div class="head_box">
|
||||
<span class="title">发起布控</span>
|
||||
<div>
|
||||
<el-button size="small" @click="submit">保存</el-button>
|
||||
|
||||
<el-button size="small" @click="close">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cntinfo">
|
||||
<div class="title-item">布控信息</div>
|
||||
<ControlInfo></ControlInfo>
|
||||
<ControlInfo ref="controlInfoRef" />
|
||||
<div class="title-item">布控范围</div>
|
||||
<ControlArea></ControlArea>
|
||||
<ControlArea ref="controlAreaRef" />
|
||||
<div class="title-item">审批信息</div>
|
||||
<ApprovalInfo></ApprovalInfo>
|
||||
<ApprovalInfo ref="approvalInfoRef" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from "vue";
|
||||
import ControlInfo from "./ui/controlInfo.vue";
|
||||
import ControlArea from "./ui/controlArea.vue";
|
||||
import ApprovalInfo from "./ui/approvalInfo.vue";
|
||||
import { ref, reactive, nextTick } 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";
|
||||
|
||||
const dialogForm = ref(false);
|
||||
const listQuery = ref({});
|
||||
const dialogForm = ref(false);
|
||||
|
||||
// 初始化数据
|
||||
const init = (type, row) => {
|
||||
const router = useRouter();
|
||||
const listQuery = ref({});
|
||||
|
||||
// 获取子组件引用
|
||||
const controlInfoRef = ref(null);
|
||||
const controlAreaRef = ref(null);
|
||||
const approvalInfoRef = ref(null);
|
||||
|
||||
// 初始化数据
|
||||
const init = async (type, row) => {
|
||||
dialogForm.value = true;
|
||||
await nextTick(); // 等待子组件挂载
|
||||
// 根据type和row初始化表单数据
|
||||
// 如果是编辑模式,将数据传递给子组件
|
||||
if (type === "edit" && row) {
|
||||
controlInfoRef.value?.setFormData?.(row); // 回显布控信息
|
||||
controlAreaRef.value?.setFormData?.(row); // 回显布控范围
|
||||
approvalInfoRef.value?.setFormData?.(row); // 回显审批信息
|
||||
} else {
|
||||
// 如果是新增模式,清空表单(可选)
|
||||
controlInfoRef.value?.resetForm?.();
|
||||
controlAreaRef.value?.resetForm?.();
|
||||
approvalInfoRef.value?.resetForm?.();
|
||||
}
|
||||
};
|
||||
const submit = async () => {
|
||||
try {
|
||||
// 1. 分别获取各子组件数据
|
||||
const controlInfoData = controlInfoRef.value?.getFormData?.();
|
||||
const controlAreaData = controlAreaRef.value?.getFormData?.();
|
||||
const approvalInfoData = approvalInfoRef.value?.getFormData?.();
|
||||
// 2. 合并数据
|
||||
const formData = {
|
||||
...controlInfoData.formData,
|
||||
...controlAreaData.formData,
|
||||
...approvalInfoData.formData
|
||||
};
|
||||
|
||||
const close = () => {
|
||||
console.log("合并数据:", formData);
|
||||
// 根据是否有 id 判断是新增还是编辑
|
||||
const url = formData.id
|
||||
? "/mosty-gsxt/tbGsxtBk/update" // 编辑接口
|
||||
: "/mosty-gsxt/tbGsxtBk/save"; // 新增接口
|
||||
// 提交数据
|
||||
await qcckPost(formData, url);
|
||||
ElMessage.success(formData.id ? "编辑成功" : "新增成功");
|
||||
close();
|
||||
router.push("@/views/backOfficeSystem/IntelligentControl/myControl/index");
|
||||
// qcckPost(formData, "/mosty-gsxt/tbGsxtBk/save").then((res) => {
|
||||
// router.push(
|
||||
// "@/views/backOfficeSystem/IntelligentControl/myControl/index"
|
||||
// );
|
||||
// });
|
||||
} catch (error) {
|
||||
console.error("提交失败:", error);
|
||||
ElMessage.error(error.message || "提交失败");
|
||||
}
|
||||
};
|
||||
const close = () => {
|
||||
dialogForm.value = false;
|
||||
};
|
||||
};
|
||||
|
||||
defineExpose({ init });
|
||||
defineExpose({ init });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.dialog {
|
||||
.dialog {
|
||||
padding: 20px;
|
||||
|
||||
.cntinfo {
|
||||
|
@ -61,10 +116,14 @@
|
|||
left: 0;
|
||||
width: 78px;
|
||||
height: 4px;
|
||||
background: linear-gradient(90deg, #3597f9c4 0%, rgba(53, 150, 249, 0) 100%);
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
#3597f9c4 0%,
|
||||
rgba(53, 150, 249, 0) 100%
|
||||
);
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<el-form :model="formData" label-width="auto" label-position="left">
|
||||
<!-- 处置接收单位 -->
|
||||
<el-form-item label="处置接收单位">
|
||||
<!-- <el-form-item label="处置接收单位">
|
||||
<div class="unit-selection">
|
||||
<el-select v-model="formData.receivingUnit" placeholder="请选择单位" style="width: 200px">
|
||||
<el-option label="巴宜区公安局" value="巴宜区公安局" />
|
||||
|
@ -32,54 +32,174 @@
|
|||
value-format="YYYY-MM-DD HH:mm"
|
||||
/> </el-form-item
|
||||
></el-col>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
<FormMessage
|
||||
v-model="listQuery"
|
||||
:formList="formData"
|
||||
ref="elform"
|
||||
:rules="rules"
|
||||
>
|
||||
</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">
|
||||
<div class="description-item">{{ item.fqr }}</div>
|
||||
<!-- 使用方案1 + 方案2 -->
|
||||
<div
|
||||
class="description-item"
|
||||
:class="{ 'disabled-item': item.default }"
|
||||
@click="!item.default && handleSelectStep(index)"
|
||||
>
|
||||
{{ item.fqr }}
|
||||
</div>
|
||||
<div class="description-item">{{ item.fqbm }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ChooseUser
|
||||
v-model="chooseUserVisible"
|
||||
@choosedUsers="handleUserSelected"
|
||||
:roleIds="roleIds"
|
||||
/>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
|
||||
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
||||
import ChooseUser from "@/components/MyComponents/ChooseUser/index.vue";
|
||||
import DialogList from "@/views/backOfficeSystem/IntelligentControl/myControl/components/dialogList.vue";
|
||||
import { qcckPost, qcckPut } from "@/api/qcckApi.js";
|
||||
import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||
import { fa } from "element-plus/es/locale.mjs";
|
||||
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 chooseUserVisible = ref(false); //审批流程
|
||||
const roleIds = ref([]); //角色id
|
||||
let currentSelectedIndex = null;
|
||||
const formData = ref([
|
||||
{
|
||||
label: "处置接收单位",
|
||||
prop: "czJsdwlx",
|
||||
type: "select",
|
||||
options: D_GS_BK_CZJSDWLX
|
||||
},
|
||||
|
||||
const formData = ref({
|
||||
receivingUnit: "",
|
||||
unitTypes: [],
|
||||
submitMethods: [],
|
||||
receiveTime: "",
|
||||
initiator: "",
|
||||
initiatingDepartment: "",
|
||||
reviewer: "",
|
||||
reviewDepartment: "",
|
||||
approver: "",
|
||||
approveDepartment: ""
|
||||
});
|
||||
const step = ref([
|
||||
{ fqr: "发起人", fqbm: "发起部门", title: "发起申请" },
|
||||
{ fqr: "发起人", fqbm: "发起部门", title: "审核确认" },
|
||||
{ fqr: "发起人", fqbm: "发起部门", title: "审批确认" }
|
||||
]);
|
||||
{
|
||||
label: "提交方式",
|
||||
prop: "bkTjfs",
|
||||
type: "radio",
|
||||
options: D_GS_BK_TJFS
|
||||
},
|
||||
{
|
||||
label: "签收时间",
|
||||
prop: "bkSjQs",
|
||||
type: "datetime"
|
||||
}
|
||||
]);
|
||||
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 }
|
||||
]);
|
||||
|
||||
// 处理选择的人员数据
|
||||
const handleUserSelected = (userData) => {
|
||||
if (currentSelectedIndex !== null) {
|
||||
step.value[currentSelectedIndex] = {
|
||||
...step.value[currentSelectedIndex],
|
||||
fqr: userData[0].userName,
|
||||
fqbm: userData[0].deptName,
|
||||
userId: userData[0].id,
|
||||
rawData: userData[0] // 保留原始数据(可选)
|
||||
};
|
||||
if (currentSelectedIndex == 1) {
|
||||
// 同时更新listQuery(如果需要)
|
||||
listQuery.value = {
|
||||
...listQuery.value,
|
||||
bkshrSfzh: userData[0].idEntityCard,
|
||||
bkshrSsbmdm: userData[0].deptId,
|
||||
bkshrSsbmmc: userData[0].deptName,
|
||||
bkshrXm: userData[0].userName
|
||||
};
|
||||
} else if (currentSelectedIndex == 2) {
|
||||
// 同时更新listQuery(如果需要)
|
||||
listQuery.value = {
|
||||
...listQuery.value,
|
||||
bksprSfzh: userData[0].idEntityCard,
|
||||
bksprSsbmdm: userData[0].deptId,
|
||||
bksprSsbmmc: userData[0].deptName,
|
||||
bksprXm: userData[0].userName
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
chooseUserVisible.value = false;
|
||||
};
|
||||
|
||||
// 点击步骤触发
|
||||
const handleSelectStep = (index) => {
|
||||
currentSelectedIndex = index;
|
||||
chooseUserVisible.value = true;
|
||||
};
|
||||
|
||||
// 2. 暴露获取数据的方法
|
||||
const getFormData = () => {
|
||||
// 可以在这里添加验证逻辑
|
||||
return {
|
||||
formData: listQuery.value
|
||||
};
|
||||
};
|
||||
// 接收父组件传入的数据并回显
|
||||
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({
|
||||
getFormData,
|
||||
setFormData
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.step {
|
||||
.step {
|
||||
// position: relative;
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
|
@ -107,17 +227,17 @@
|
|||
border: 1px dashed rgb(196, 219, 240);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.unit-selection {
|
||||
.unit-selection {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
}
|
||||
.description {
|
||||
}
|
||||
.description {
|
||||
gap: 10px;
|
||||
}
|
||||
.description-item {
|
||||
}
|
||||
.description-item {
|
||||
width: 300px;
|
||||
height: 30px;
|
||||
padding: 0 20px;
|
||||
|
@ -126,5 +246,10 @@
|
|||
border-radius: 4px;
|
||||
color: rgb(131, 132, 135);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
.disabled-item {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.6;
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,24 +1,53 @@
|
|||
<template>
|
||||
<div class="control-area">
|
||||
<div class="map"></div>
|
||||
<el-form :model="formData" label-width="auto" label-position="left">
|
||||
<!-- 布控类型 -->
|
||||
<el-form-item label="布控类型">
|
||||
<el-radio-group v-model="formData.controlType">
|
||||
<el-radio-button label="人员布控">人员布控</el-radio-button>
|
||||
<el-radio-button label="车辆布控">车辆布控</el-radio-button>
|
||||
<el-radio-button label="电话布控信息">电话布控信息</el-radio-button>
|
||||
<el-radio-button label="网络信息">网络信息</el-radio-button>
|
||||
<el-radio-button label="人像布控">人像布控</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<FormMessage
|
||||
v-model="listQuery"
|
||||
:formList="formData"
|
||||
ref="elform"
|
||||
:rules="rules"
|
||||
>
|
||||
<!-- 布控范围-->
|
||||
<template #bkfwList="{ row }">
|
||||
<el-button @click="openDialog('01')">选择</el-button>
|
||||
<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>
|
||||
|
||||
<!-- 时间选择 -->
|
||||
<el-row :gutter="20">
|
||||
<!-- 列表弹窗 -->
|
||||
<DialogList
|
||||
:Single="false"
|
||||
:roleIds="roleIds"
|
||||
v-if="chooseShow"
|
||||
@chooseDate="chooseDate"
|
||||
:titleValue="chooseTitle"
|
||||
v-model="chooseShow"
|
||||
:bqLx="chooseType"
|
||||
:dic="{ D_GS_SSYJ }"
|
||||
bqDl="02"
|
||||
></DialogList>
|
||||
|
||||
<!-- <div class="map"></div> -->
|
||||
<!-- <el-form :model="formData" label-width="auto" label-position="left">
|
||||
时间选择 -->
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="布控开始时间">
|
||||
<el-date-picker
|
||||
v-model="formData.startTime"
|
||||
v-model="formData.bkSjKs"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
|
@ -30,7 +59,7 @@
|
|||
<el-col :span="6">
|
||||
<el-form-item label="布控结束时间">
|
||||
<el-date-picker
|
||||
v-model="formData.endTime"
|
||||
v-model="formData.bkSjJs"
|
||||
type="datetime"
|
||||
placeholder="选择结束时间"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
|
@ -39,85 +68,241 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
|
||||
<!-- 布控要求和级别 -->
|
||||
<el-row :gutter="20">
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="处置要求">
|
||||
<el-select v-model="formData.requirement" placeholder="请选择">
|
||||
<el-option label="实时跟踪" value="track" />
|
||||
<!-- 添加更多选项 -->
|
||||
<el-select v-model="formData.czYq" placeholder="请选择">
|
||||
<el-option
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
v-for="item in D_GS_BK_CZYQ"
|
||||
:key="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="布控等级">
|
||||
<el-select v-model="formData.level" placeholder="请选择">
|
||||
<el-option label="请选择" value="" />
|
||||
<!-- 添加更多选项 -->
|
||||
<el-select v-model="formData.bkDj" placeholder="请选择">
|
||||
<el-option
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
v-for="item in D_GS_BK_DJ"
|
||||
:key="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="布控要旨">
|
||||
<el-select v-model="formData.purpose" placeholder="请选择">
|
||||
<el-option label="请选择" value="" />
|
||||
<!-- 添加更多选项 -->
|
||||
<el-select v-model="formData.bkYz" placeholder="请选择">
|
||||
<el-option
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
v-for="item in D_GS_BK_YZ"
|
||||
:key="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="布控地址">
|
||||
<el-select v-model="formData.location" placeholder="请选择">
|
||||
<el-option label="请选择" value="" />
|
||||
<!-- 添加更多选项 -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
|
||||
<!-- 布控事由 -->
|
||||
<el-form-item label="布控事由">
|
||||
<el-input v-model="formData.reason" type="textarea" :rows="4" placeholder="请输入布控事由" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="布控事由">
|
||||
<el-input
|
||||
v-model="formData.bkSy"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
placeholder="请输入布控事由"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
|
||||
<!-- 上传附件 -->
|
||||
<el-form-item label="上传附件">
|
||||
<el-upload action="#" :auto-upload="false" :on-change="handleFileChange" :file-list="fileList">
|
||||
<!-- <el-form-item label="上传附件">
|
||||
<el-upload
|
||||
action="#"
|
||||
:auto-upload="false"
|
||||
:on-change="handleFileChange"
|
||||
:file-list="fileList"
|
||||
>
|
||||
<el-button type="primary">
|
||||
<el-icon><Plus /></el-icon>
|
||||
支持jpg、png、pdf等上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-form> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
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";
|
||||
import DialogList from "@/views/backOfficeSystem/IntelligentControl/myControl/components/ui/dialogList.vue";
|
||||
|
||||
const formData = ref({
|
||||
controlType: "人员布控",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
requirement: "",
|
||||
level: "",
|
||||
purpose: "",
|
||||
location: "",
|
||||
reason: ""
|
||||
});
|
||||
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 fileList = ref([]);
|
||||
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
|
||||
},
|
||||
{
|
||||
label: "布控开始时间",
|
||||
prop: "bkSjKs",
|
||||
type: "datetime"
|
||||
},
|
||||
{
|
||||
label: "布控结束时间",
|
||||
prop: "bkSjJs",
|
||||
type: "datetime"
|
||||
},
|
||||
{
|
||||
label: "布控失效时间",
|
||||
prop: "bkSjSx",
|
||||
type: "datetime"
|
||||
},
|
||||
|
||||
const handleFileChange = (file, fileList) => {
|
||||
{
|
||||
label: "处置要求",
|
||||
prop: "czYq",
|
||||
type: "select",
|
||||
options: D_GS_BK_CZYQ
|
||||
},
|
||||
{
|
||||
label: "布控等级",
|
||||
prop: "bkDj",
|
||||
type: "select",
|
||||
options: D_GS_BK_DJ
|
||||
},
|
||||
{
|
||||
label: "布控要旨",
|
||||
prop: "bkYz",
|
||||
type: "select",
|
||||
options: D_GS_BK_YZ
|
||||
},
|
||||
{
|
||||
label: "布控事由",
|
||||
prop: "bkSy",
|
||||
type: "textarea"
|
||||
},
|
||||
{
|
||||
label: "上传附件",
|
||||
prop: "bkFj",
|
||||
type: "upload",
|
||||
isImg: false
|
||||
}
|
||||
]);
|
||||
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 openDialog = (type) => {
|
||||
chooseShow.value = true;
|
||||
chooseType.value = type;
|
||||
chooseTitle.value = type == "01" ? "请选择布控范围" : "请选择人员标签";
|
||||
console.log(tableDate.bkfwList, "tableDate.bkfwList");
|
||||
roleIds.value =
|
||||
type == "01"
|
||||
? tableDate.bkfwList.map((item) => item.id)
|
||||
: tableDate.rybqList.map((item) => item.id);
|
||||
};
|
||||
|
||||
// 选择数据
|
||||
const chooseDate = (data) => {
|
||||
if (chooseType.value == "01") {
|
||||
tableDate.bkfwList = data;
|
||||
listQuery.value.bkfwList = tableDate.bkfwList.map((item) => item.id);
|
||||
} else {
|
||||
tableDate.rybqList = data;
|
||||
listQuery.value.rybqList = tableDate.rybqList.map((item) => item.id);
|
||||
}
|
||||
};
|
||||
const handleFileChange = (file, fileList) => {
|
||||
console.log(file, fileList);
|
||||
};
|
||||
|
||||
// 2. 暴露获取数据的方法
|
||||
const getFormData = () => {
|
||||
// 可以在这里添加验证逻辑
|
||||
return {
|
||||
formData: listQuery.value
|
||||
};
|
||||
};
|
||||
// 接收父组件传入的数据并回显
|
||||
const setFormData = (data) => {
|
||||
tableDate.bkfwList = data.bkfwList;
|
||||
tableDate.rybqList = data.rybqList;
|
||||
listQuery.value = {
|
||||
...data // 假设 data 包含所有需要的字段
|
||||
};
|
||||
};
|
||||
// 3. 暴露方法给父组件
|
||||
defineExpose({
|
||||
getFormData,
|
||||
setFormData
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.control-area {
|
||||
.control-area {
|
||||
.map {
|
||||
height: 200px;
|
||||
border: 1px solid #ccc;
|
||||
|
@ -133,5 +318,11 @@
|
|||
:deep(.el-textarea__inner) {
|
||||
font-family: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
.boxlist {
|
||||
width: 99%;
|
||||
height: 225px;
|
||||
margin-top: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,32 +1,78 @@
|
|||
<template>
|
||||
<div class="info-container">
|
||||
<!-- 布控信息 -->
|
||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||
<!-- <el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||
<el-form-item label="布控标题">
|
||||
<el-input v-model="formInline.user" placeholder="Approved by" clearable />
|
||||
<el-input
|
||||
v-model="formInline.bkBt"
|
||||
placeholder="请输入布控标题"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预警标签模型">
|
||||
<el-select v-model="formInline.region" placeholder="Activity zone" clearable>
|
||||
<el-select
|
||||
v-model="formInline.region"
|
||||
placeholder="Activity zone"
|
||||
clearable
|
||||
>
|
||||
<el-option label="Zone one" value="shanghai" />
|
||||
<el-option label="Zone two" value="beijing" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属警钟">
|
||||
<el-select v-model="formInline.region" placeholder="Activity zone" clearable>
|
||||
<el-select
|
||||
v-model="formInline.bkSsjz"
|
||||
placeholder="Activity zone"
|
||||
clearable
|
||||
>
|
||||
<el-option label="Zone one" value="shanghai" />
|
||||
<el-option label="Zone two" value="beijing" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="布控对象">
|
||||
<el-select v-model="formInline.person" placeholder="Activity zone" clearable>
|
||||
<el-select
|
||||
v-model="formInline.person"
|
||||
placeholder="Activity zone"
|
||||
clearable
|
||||
>
|
||||
<el-option label="Zone one" value="shanghai" />
|
||||
<el-option label="Zone two" value="beijing" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-form> -->
|
||||
<FormMessage v-model="listQuery" :formList="formData" ref="elform">
|
||||
<!-- 预警标签模型-->
|
||||
<template #yjbqList>
|
||||
<el-button @click="openDialog('01')">选择</el-button>
|
||||
<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>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link type="danger" @click="delDictItem(row.id, '预警标签')"
|
||||
>删除</el-link
|
||||
>
|
||||
</template>
|
||||
</MyTable>
|
||||
</div>
|
||||
</template>
|
||||
</FormMessage>
|
||||
<!-- 按钮 -->
|
||||
|
||||
<div class="btns">
|
||||
<el-button type="primary">新增</el-button>
|
||||
<el-button type="primary" @click="handleAdd()">新增</el-button>
|
||||
<el-button type="danger">批量删除</el-button>
|
||||
</div>
|
||||
<MyTable
|
||||
|
@ -37,43 +83,209 @@
|
|||
:controlsWidth="pageData.controlsWidth"
|
||||
@chooseData="chooseData"
|
||||
>
|
||||
<template #photo="{ row }">
|
||||
<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" link>编辑</el-button>
|
||||
<el-button size="small" type="danger" 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>
|
||||
<!-- 列表弹窗 -->
|
||||
<DialogList
|
||||
:Single="false"
|
||||
:roleIds="roleIds"
|
||||
v-if="chooseShow"
|
||||
@chooseDate="chooseDate"
|
||||
:titleValue="chooseTitle"
|
||||
v-model="chooseShow"
|
||||
:bqLx="chooseType"
|
||||
:dic="{ D_GS_SSYJ }"
|
||||
bqDl="02"
|
||||
></DialogList>
|
||||
|
||||
<el-dialog v-model="dialogFormVisible" :title="dialogTitle" width="800px">
|
||||
<FormMessage
|
||||
v-model="formForData"
|
||||
:formList="formDataModel"
|
||||
ref="formRef"
|
||||
label-width="120px"
|
||||
>
|
||||
<!-- 自定义插槽(人员标签) -->
|
||||
<template #rybqList>
|
||||
<el-button @click="openDialog('02')">选择</el-button>
|
||||
<div class="boxlist">
|
||||
<MyTable
|
||||
:tableData="tableDate.rybqList"
|
||||
:tableColumn="tableDate.tableColumn"
|
||||
:tableHeight="tableDate.tableHeight"
|
||||
:key="tableDate.rykeyCount"
|
||||
: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>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link type="danger" @click="delDictItem(row.id, '人员标签')"
|
||||
>删除</el-link
|
||||
>
|
||||
</template>
|
||||
</MyTable>
|
||||
</div>
|
||||
</template>
|
||||
</FormMessage>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">关闭</el-button>
|
||||
<el-button type="primary" @click="submitForm"> 确定 </el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { reactive } from "vue";
|
||||
import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||
import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
|
||||
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
||||
import DialogList from "@/views/backOfficeSystem/IntelligentControl/myControl/components/dialogList.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 formInline = reactive({
|
||||
user: "",
|
||||
region: "",
|
||||
date: ""
|
||||
});
|
||||
const pageData = reactive({
|
||||
tableData: [
|
||||
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%" },
|
||||
{
|
||||
photo: "",
|
||||
name: "某三",
|
||||
gender: "男",
|
||||
idNumber: "500352199705022365",
|
||||
currentAddress: "西藏特警...",
|
||||
phoneNumber: "1525421452",
|
||||
uploadStatus: "smsj",
|
||||
carNumber: "藏A12345",
|
||||
vehicleNumber: "AKBC123",
|
||||
specialLicense: "已同步上传",
|
||||
personTag: "网络延迟"
|
||||
}
|
||||
], //表格数据
|
||||
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",
|
||||
|
@ -88,39 +300,236 @@
|
|||
}, //分页
|
||||
controlsWidth: 220, //操作栏宽度
|
||||
tableColumn: [
|
||||
{ label: "照片", prop: "photo", showSolt: true },
|
||||
{ label: "姓名", prop: "name" },
|
||||
{ label: "性别", prop: "gender" },
|
||||
{ label: "身份证号", prop: "idNumber" },
|
||||
{ label: "户籍地", prop: "户籍地" },
|
||||
{ label: "现居住地", prop: "currentAddress" },
|
||||
{ label: "手机号", prop: "phoneNumber" },
|
||||
{ label: "同步上传", prop: "uploadStatus" },
|
||||
{ label: "车牌号", prop: "carNumber" },
|
||||
{ label: "车号", prop: "vehicleNumber" },
|
||||
{ label: "特许证号", prop: "specialLicense" },
|
||||
{ label: "人员标签", prop: "personTag" }
|
||||
{ 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"
|
||||
},
|
||||
|
||||
const onSubmit = () => {
|
||||
console.log("submit!");
|
||||
{
|
||||
label: "所属警钟",
|
||||
prop: "bkSsjz",
|
||||
type: "select",
|
||||
options: D_GS_BK_SSJZ
|
||||
},
|
||||
{
|
||||
label: "布控对象",
|
||||
prop: "bkDx",
|
||||
type: "select",
|
||||
options: D_GS_BK_DX
|
||||
},
|
||||
{ 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" }
|
||||
// ]
|
||||
// });
|
||||
|
||||
// 2. 暴露获取数据的方法
|
||||
const getFormData = () => {
|
||||
// 可以在这里添加验证逻辑
|
||||
return {
|
||||
formData: listQuery.value
|
||||
};
|
||||
// 选择
|
||||
const chooseData = () => {};
|
||||
};
|
||||
// 打开弹窗
|
||||
const openDialog = (type) => {
|
||||
chooseShow.value = true;
|
||||
chooseType.value = type;
|
||||
chooseTitle.value = type == "01" ? "请选择预警标签模型" : "请选择人员标签";
|
||||
roleIds.value =
|
||||
type == "01"
|
||||
? tableDate.yjbqList.map((item) => item.id)
|
||||
: tableDate.rybqList.map((item) => item.id);
|
||||
};
|
||||
const handleAdd = () => {
|
||||
dialogFormVisible.value = true;
|
||||
dialogTitle.value = "新增信息";
|
||||
};
|
||||
|
||||
// 选择数据
|
||||
const chooseDate = (data) => {
|
||||
if (chooseType.value == "01") {
|
||||
tableDate.yjbqList = data;
|
||||
listQuery.value.yjbqList = tableDate.yjbqList.map((item) => item.id);
|
||||
} else {
|
||||
tableDate.rybqList = data;
|
||||
listQuery.value.rybqList = tableDate.rybqList.map((item) => item.id);
|
||||
}
|
||||
};
|
||||
const submitForm = () => {
|
||||
// 正确调用子组件的submit方法
|
||||
formRef.value.submit(
|
||||
// 成功回调
|
||||
(validData) => {
|
||||
// 处理编辑情况
|
||||
if (dialogTitle.value === "编辑信息") {
|
||||
// 确保 currentEditIndex 有效
|
||||
if (
|
||||
currentEditIndex.value >= 0 &&
|
||||
currentEditIndex.value < pageData.tableData.length
|
||||
) {
|
||||
pageData.tableData[currentEditIndex.value] = {
|
||||
...pageData.tableData[currentEditIndex.value],
|
||||
ryXm: validData.ryXm,
|
||||
ryXb: validData.ryXb,
|
||||
rySfzh: validData.rySfzh,
|
||||
ryHjd: validData.ryHjd,
|
||||
ryXjd: validData.ryXjd,
|
||||
rySjhm: validData.rySjhm,
|
||||
qtTbsc: validData.qtTbsc,
|
||||
clCph: validData.clCph,
|
||||
clCjh: validData.clCjh,
|
||||
qtTxzh: validData.qtTxzh,
|
||||
bkLx: validData.bkLx,
|
||||
bkLx: validData.bkLx,
|
||||
fjZp: validData.fjZp
|
||||
};
|
||||
} else {
|
||||
console.error("无效的编辑索引:", currentEditIndex.value);
|
||||
}
|
||||
}
|
||||
// 处理新增情况
|
||||
else {
|
||||
// 根据 chooseType 处理不同类型的布控
|
||||
if (chooseType.value === "01") {
|
||||
// 预警标签类型
|
||||
const newItem = {
|
||||
...validData,
|
||||
yjbqList: tableDate.yjbqList.map((item) => item.id)
|
||||
};
|
||||
pageData.tableData.push(newItem);
|
||||
} else {
|
||||
// 人员标签类型
|
||||
const newItem = {
|
||||
...validData,
|
||||
rybqList: tableDate.rybqList.map((item) => item.id)
|
||||
};
|
||||
pageData.tableData.push(newItem);
|
||||
}
|
||||
}
|
||||
//赋值子组件数据传递给父组件
|
||||
listQuery.value.bkdxList = pageData.tableData;
|
||||
// 关闭弹窗并重置表单
|
||||
dialogFormVisible.value = false;
|
||||
},
|
||||
// 错误回调(可选)
|
||||
(errors) => {
|
||||
console.error("表单验证失败:", errors);
|
||||
ElMessage.error("请检查表单填写是否正确");
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
// 接收父组件传入的数据并回显
|
||||
const setFormData = (data) => {
|
||||
tableDate.yjbqList = data.yjbqList;
|
||||
listQuery.value = {
|
||||
...data // 假设 data 包含所有需要的字段
|
||||
};
|
||||
pageData.tableData = data.bkdxList;
|
||||
console.log(listQuery.value);
|
||||
};
|
||||
|
||||
// 打开编辑弹窗
|
||||
const editData = (rowData) => {
|
||||
// 找到当前行在tableData中的索引
|
||||
currentEditIndex.value = pageData.tableData.findIndex(
|
||||
(item) => item.rySfzh === rowData.rySfzh // 使用身份证号作为唯一标识
|
||||
);
|
||||
// 1. 使用解构提取原始值(避免响应式代理)
|
||||
const rawData = { ...rowData }; // 浅拷贝解除响应式
|
||||
|
||||
// 2. 手动指定需要更新的字段
|
||||
const safeUpdate = {
|
||||
ryXm: rowData.ryXm, // 姓名
|
||||
ryXb: rowData.ryXb, // 性别
|
||||
rySfzh: rowData.rySfzh, // 身份证号
|
||||
ryHjd: rowData.ryHjd, // 户籍地
|
||||
ryXjd: rowData.ryXjd, // 现居住地
|
||||
rySjhm: rowData.rySjhm, // 手机号
|
||||
qtTbsc: rowData.qtTbsc, // 同步上传
|
||||
clCph: rowData.clCph, // 车牌号
|
||||
clCjh: rowData.clCjh, // 车号
|
||||
qtTxzh: rowData.qtTxzh, // 特许证号
|
||||
bkLx: rowData.bkLx, // 布控类型
|
||||
bkLx: rowData.bkLx, // 人员标签
|
||||
fjZp: rowData.fjZp // 照片
|
||||
};
|
||||
// 3. 一次性赋值
|
||||
formForData.value = safeUpdate;
|
||||
// 4. 延迟打开弹窗
|
||||
nextTick(() => {
|
||||
dialogFormVisible.value = true;
|
||||
dialogTitle.value = "编辑信息";
|
||||
});
|
||||
};
|
||||
|
||||
// 根据索引删除数据
|
||||
const deleteData = (index) => {
|
||||
pageData.tableData.splice(index, 1);
|
||||
};
|
||||
// 删除
|
||||
const delDictItem = (id, type) => {
|
||||
switch (type) {
|
||||
case "人员标签":
|
||||
tableDate.rybqList = tableDate.rybqList.filter((item) => item.id !== id);
|
||||
listQuery.value.rybqList = tableDate.rybqList.map((item) => item.id);
|
||||
break;
|
||||
case "预警标签":
|
||||
tableDate.yjbqList = tableDate.yjbqList.filter((item) => item.id !== id);
|
||||
listQuery.value.yjbqList = tableDate.yjbqList.map((item) => item.id);
|
||||
break;
|
||||
}
|
||||
};
|
||||
// 根据id查询详情
|
||||
|
||||
// 选择
|
||||
const chooseData = () => {};
|
||||
|
||||
// 3. 暴露方法给父组件
|
||||
defineExpose({
|
||||
getFormData,
|
||||
setFormData
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// .demo-form-inline .el-input {
|
||||
// --el-input-width: 220px;
|
||||
// }
|
||||
// .demo-form-inline .el-input {
|
||||
// --el-input-width: 220px;
|
||||
// }
|
||||
|
||||
// .demo-form-inline .el-select {
|
||||
// --el-select-width: 220px;
|
||||
// }
|
||||
.info-container {
|
||||
// .demo-form-inline .el-select {
|
||||
// --el-select-width: 220px;
|
||||
// }
|
||||
.info-container {
|
||||
.btns {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.boxlist {
|
||||
width: 99%;
|
||||
height: 225px;
|
||||
margin-top: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -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>
|
|
@ -5,7 +5,11 @@
|
|||
</div>
|
||||
<!-- 搜索 -->
|
||||
<div ref="searchBox">
|
||||
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount" />
|
||||
<Search
|
||||
:searchArr="searchConfiger"
|
||||
@submit="onSearch"
|
||||
:key="pageData.keyCount"
|
||||
/>
|
||||
</div>
|
||||
<!-- 按钮组 -->
|
||||
<div class="content">
|
||||
|
@ -15,11 +19,21 @@
|
|||
<el-button type="primary">导出</el-button>
|
||||
<el-button type="danger">批量删除</el-button>
|
||||
<el-button type="primary" icon="CirclePlus">添加标签模型</el-button>
|
||||
<el-button type="primary" icon="CirclePlus" @click="drawerModel">添加范围模型</el-button>
|
||||
<el-button type="primary" icon="CirclePlus" @click="personNum">涉及人数</el-button>
|
||||
<el-button type="primary" icon="CirclePlus" @click="drawerModel"
|
||||
>添加范围模型</el-button
|
||||
>
|
||||
<el-button type="primary" icon="CirclePlus" @click="personNum"
|
||||
>涉及人数</el-button
|
||||
>
|
||||
</div>
|
||||
<el-input v-model="input2" style="max-width: 300px" placeholder="请输入关键字">
|
||||
<template #append><el-button type="primary" icon="Search"></el-button></template>
|
||||
<el-input
|
||||
v-model="input2"
|
||||
style="max-width: 300px"
|
||||
placeholder="请输入关键字"
|
||||
>
|
||||
<template #append
|
||||
><el-button type="primary" icon="Search"></el-button
|
||||
></template>
|
||||
</el-input>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
|
@ -33,9 +47,33 @@
|
|||
:controlsWidth="pageData.controlsWidth"
|
||||
@chooseData="chooseData"
|
||||
>
|
||||
<template #bkDj="{ row }">
|
||||
<DictTag :tag="false" :value="row.bkDj" :options="D_GS_BK_DJ" />
|
||||
</template>
|
||||
<template #bkDx="{ row }">
|
||||
<DictTag :tag="false" :value="row.bkDx" :options="D_GS_BK_DX" />
|
||||
</template>
|
||||
<template #bkZt="{ row }">
|
||||
<DictTag :tag="false" :value="row.bkZt" :options="D_GS_BK_ZT" />
|
||||
</template>
|
||||
<template #czYq="{ row }">
|
||||
<DictTag :tag="false" :value="row.czYq" :options="D_GS_BK_CZYQ" />
|
||||
</template>
|
||||
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-button size="small" @click="addEdit('detail', row)">详情</el-button>
|
||||
<el-button size="small" @click="editControl('edit', row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="row.bkZt == '01'"
|
||||
size="small"
|
||||
@click="openDetail(row)"
|
||||
>送审</el-button
|
||||
>
|
||||
<el-button size="small" @click="addEdit('detail', row)"
|
||||
>详情</el-button
|
||||
>
|
||||
</template>
|
||||
</MyTable>
|
||||
<Pages
|
||||
|
@ -48,6 +86,20 @@
|
|||
}"
|
||||
></Pages>
|
||||
</div>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="发起送审"
|
||||
width="500px"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<span>是否要发起送审</span>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="autoEdit()"> 确定 </el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<!-- 详情 -->
|
||||
|
@ -62,45 +114,61 @@
|
|||
</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/detailForm.vue";
|
||||
import SendControl from "./components/sendControl.vue";
|
||||
import PersonNum from "./components/personNum.vue";
|
||||
import DrawerAreaModel from "./components/drawerAreaModel.vue";
|
||||
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/detailForm.vue";
|
||||
import SendControl from "./components/sendControl.vue";
|
||||
import PersonNum from "./components/personNum.vue";
|
||||
import DrawerAreaModel from "./components/drawerAreaModel.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 sendControlRef = ref();
|
||||
const personNumRef = ref();
|
||||
const searchConfiger = ref([
|
||||
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_GS_BK_DJ, D_GS_BK_DX, D_GS_BK_ZT, D_GS_BK_SJLX, D_GS_BK_CZYQ } =
|
||||
proxy.$dict(
|
||||
"D_GS_BK_DJ",
|
||||
"D_GS_BK_DX",
|
||||
"D_GS_BK_ZT",
|
||||
"D_GS_BK_SJLX",
|
||||
"D_GS_BK_CZYQ"
|
||||
); //获取字典数据
|
||||
const detailDiloag = ref();
|
||||
const dialogVisible = ref(false);
|
||||
const searchBox = ref(); //搜索框
|
||||
const sendControlRef = ref();
|
||||
const personNumRef = ref();
|
||||
const autoId = ref();
|
||||
const searchConfiger = ref([
|
||||
{
|
||||
label: "布控级别",
|
||||
prop: "jyzt",
|
||||
placeholder: "请选择经营状况",
|
||||
label: "布控等级",
|
||||
prop: "bqDj",
|
||||
placeholder: "请选择布控等级",
|
||||
showType: "select",
|
||||
options: [{ label: "在业", value: "在业" }]
|
||||
options: D_GS_BK_DJ
|
||||
},
|
||||
{
|
||||
label: "布控对象",
|
||||
prop: "jyzt",
|
||||
placeholder: "请选择经营状况",
|
||||
prop: "bkDx",
|
||||
placeholder: "请选择布控对象",
|
||||
showType: "select",
|
||||
options: [{ label: "在业", value: "在业" }]
|
||||
options: D_GS_BK_DX
|
||||
},
|
||||
{
|
||||
label: "布控状态",
|
||||
prop: "jyzt",
|
||||
placeholder: "请选择经营状况",
|
||||
prop: "bkZt",
|
||||
placeholder: "请选择布控状态",
|
||||
showType: "select",
|
||||
options: [{ label: "在业", value: "在业" }]
|
||||
options: D_GS_BK_ZT
|
||||
},
|
||||
{
|
||||
label: "布控时间类型",
|
||||
prop: "bkSjLx",
|
||||
placeholder: "请选择布控时间",
|
||||
showType: "date",
|
||||
options: D_GS_BK_SJLX
|
||||
},
|
||||
{ label: "布控时间", prop: "checkDate", placeholder: "布控时间", showType: "date" },
|
||||
{
|
||||
label: "预计标签模型",
|
||||
prop: "jyzt",
|
||||
|
@ -108,7 +176,12 @@
|
|||
showType: "select",
|
||||
options: [{ label: "在业", value: "在业" }]
|
||||
},
|
||||
{ label: "最近预警时间", prop: "checkDate", placeholder: "最近预警时间", showType: "date" },
|
||||
{
|
||||
label: "最近预警时间",
|
||||
prop: "checkDate",
|
||||
placeholder: "最近预警时间",
|
||||
showType: "date"
|
||||
},
|
||||
{
|
||||
label: "布控对象信息",
|
||||
prop: "jyzt",
|
||||
|
@ -123,10 +196,10 @@
|
|||
showType: "select",
|
||||
options: [{ label: "在业", value: "在业" }]
|
||||
}
|
||||
]);
|
||||
const drawerModelRef = ref();
|
||||
const queryFrom = ref({});
|
||||
const pageData = reactive({
|
||||
]);
|
||||
const drawerModelRef = ref();
|
||||
const queryFrom = ref({});
|
||||
const pageData = reactive({
|
||||
tableData: [
|
||||
{
|
||||
name: "1",
|
||||
|
@ -148,102 +221,134 @@
|
|||
pageSize: 20,
|
||||
pageCurrent: 1
|
||||
}, //分页
|
||||
controlsWidth: 120, //操作栏宽度
|
||||
controlsWidth: "240", //操作栏宽度
|
||||
|
||||
tableColumn: [
|
||||
{ label: "布控级别", prop: "bkjb" },
|
||||
{ label: "布控标题", prop: "bkbt" },
|
||||
{ label: "布控对象", prop: "bkdx" },
|
||||
{ label: "布控对象信息", prop: "bkdx" },
|
||||
{ label: "布控级别", prop: "bkDj", showSolt: true },
|
||||
{ label: "布控标题", prop: "bkBt" },
|
||||
{ label: "布控对象", prop: "bkDx", showSolt: true },
|
||||
{ label: "布控对象信息", prop: "bkDxxx" },
|
||||
{ label: "预警标签模型", prop: "yjbqmx" },
|
||||
{ label: "布控范围", prop: "bkfw" },
|
||||
{ label: "预警信息", prop: "yjxx" },
|
||||
{ label: "处置接收单位", prop: "czjsdw" },
|
||||
{ label: "处置要求", prop: "czyq" },
|
||||
{ label: "开始时间", prop: "kssj" },
|
||||
{ label: "结束时间", prop: "jssj" },
|
||||
{ label: "处置要求", prop: "czYq", showSolt: true },
|
||||
{ label: "开始时间", prop: "bkSjKs" },
|
||||
{ label: "结束时间", prop: "bkSjJs" },
|
||||
{ label: "最近预警时间", prop: "zjyjsj" },
|
||||
{ label: "失效时间", prop: "sxsj" },
|
||||
{ label: "布控发起人", prop: "bkfqr" },
|
||||
{ label: "布控状态", prop: "bkzt" }
|
||||
{ label: "失效时间", prop: "bkSjSx" },
|
||||
{ label: "布控发起人", prop: "bkfqrXm" },
|
||||
{ label: "布控状态", prop: "bkZt", showSolt: true }
|
||||
]
|
||||
});
|
||||
onMounted(() => {
|
||||
// getList()
|
||||
});
|
||||
onMounted(() => {
|
||||
getList();
|
||||
tabHeightFn();
|
||||
});
|
||||
|
||||
//选择类型
|
||||
const handleType = val => {
|
||||
});
|
||||
const openDetail = (row) => {
|
||||
console.log(row);
|
||||
autoId.value = row.id;
|
||||
dialogVisible.value = true;
|
||||
};
|
||||
//选择类型
|
||||
const handleType = (val) => {
|
||||
pageData.keyCount++;
|
||||
pageData.pageConfiger.pageCurrent = 1;
|
||||
getList();
|
||||
};
|
||||
// 搜索
|
||||
const onSearch = val => {
|
||||
};
|
||||
// 搜索
|
||||
const onSearch = (val) => {
|
||||
queryFrom.value = { ...val };
|
||||
pageData.pageConfiger.pageCurrent = 1;
|
||||
getList();
|
||||
};
|
||||
};
|
||||
|
||||
const changeNo = val => {
|
||||
const changeNo = (val) => {
|
||||
pageData.pageConfiger.pageNum = val;
|
||||
getList();
|
||||
};
|
||||
const changeSize = val => {
|
||||
};
|
||||
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 getList = (val) => {
|
||||
pageData.tableConfiger.loading = true;
|
||||
let data = { ...pageData.pageConfiger, ...queryFrom.value };
|
||||
let url = "/mosty-gsxt/tbGsxtBk/selectPage";
|
||||
qcckGet(data, url)
|
||||
.then((res) => {
|
||||
console.log(res, "4");
|
||||
pageData.tableData = res.records || [];
|
||||
pageData.total = res.total;
|
||||
pageData.tableConfiger.loading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
pageData.tableConfiger.loading = false;
|
||||
});
|
||||
};
|
||||
|
||||
// 详情
|
||||
const addEdit = (type, row) => {
|
||||
// 详情
|
||||
const addEdit = (type, row) => {
|
||||
detailDiloag.value.init(type, row);
|
||||
};
|
||||
// 发起
|
||||
const sendControl = () => {
|
||||
sendControlRef.value.init();
|
||||
};
|
||||
// 涉及人数
|
||||
const personNum = () => {
|
||||
personNumRef.value.init();
|
||||
};
|
||||
// 添加范围模型
|
||||
};
|
||||
|
||||
// 侧边栏
|
||||
const drawerModel = () => {
|
||||
//送审
|
||||
const autoEdit = () => {
|
||||
dialogVisible.value = false;
|
||||
let url = `/mosty-gsxt/tbGsxtBk/subExamine/${autoId.value}`;
|
||||
qcckPost({}, url)
|
||||
.then((res) => {
|
||||
ElMessage.success("提交成功");
|
||||
getList();
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage.error("提交失败");
|
||||
});
|
||||
};
|
||||
// 发起
|
||||
const sendControl = () => {
|
||||
sendControlRef.value.init();
|
||||
};
|
||||
//编辑
|
||||
// 发起
|
||||
const editControl = (type, row) => {
|
||||
sendControlRef.value.init(type, row);
|
||||
};
|
||||
|
||||
|
||||
|
||||
// 涉及人数
|
||||
const personNum = () => {
|
||||
personNumRef.value.init();
|
||||
};
|
||||
// 添加范围模型
|
||||
|
||||
// 侧边栏
|
||||
const drawerModel = () => {
|
||||
drawerModelRef.value.init();
|
||||
};
|
||||
// 表格高度计算
|
||||
const tabHeightFn = () => {
|
||||
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 292;
|
||||
};
|
||||
// 表格高度计算
|
||||
const tabHeightFn = () => {
|
||||
pageData.tableHeight =
|
||||
window.innerHeight - searchBox.value.offsetHeight - 292;
|
||||
window.onresize = function () {
|
||||
tabHeightFn();
|
||||
};
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-loading-mask {
|
||||
.el-loading-mask {
|
||||
background: rgba(0, 0, 0, 0.5) !important;
|
||||
}
|
||||
.content {
|
||||
}
|
||||
.content {
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
padding-top: 10px;
|
||||
.btns {
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,28 +1,63 @@
|
|||
<template>
|
||||
<el-dialog :title="titleValue" width="900px" :model-value="modelValue" append-to-body @close="closed" >
|
||||
<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-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" />
|
||||
<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="bqLx" align="center" label="标签类型">
|
||||
<template #default="{ row }">
|
||||
<DictTag :value="row.bqLx" :tag="false" :options="props.dic.D_GS_BQ_LX" />
|
||||
<DictTag
|
||||
:value="row.bqLx"
|
||||
:tag="false"
|
||||
:options="props.dic.D_GS_BQ_LX"
|
||||
/>
|
||||
</template>
|
||||
</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" />
|
||||
<DictTag
|
||||
:value="row.bqYs"
|
||||
:tag="false"
|
||||
:options="props.dic.D_GS_SSYJ"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -102,7 +137,7 @@ const closed = () => {
|
|||
emits("update:modelValue", false);
|
||||
};
|
||||
const reset = () => {
|
||||
listQuery.value = { current: 1, size: 20, };
|
||||
listQuery.value = { current: 1, size: 20 };
|
||||
getListData();
|
||||
};
|
||||
|
||||
|
@ -142,17 +177,19 @@ const handleCurrentChange = (currentPage) => {
|
|||
};
|
||||
const getListData = () => {
|
||||
const data = listQuery.value;
|
||||
data.bqLx = props.bqLx //01 身份标签, 02 行为标签
|
||||
data.bqLx = props.bqLx; //01 身份标签, 02 行为标签
|
||||
data.bqLb = props.bqDl; //01 大类, 02 细类类
|
||||
loading.value = true;
|
||||
qcckGet(data,'/mosty-gsxt/tbGsxtBqgl/selectPage').then(res=>{
|
||||
qcckGet(data, "/mosty-gsxt/tbGsxtBqgl/selectPage")
|
||||
.then((res) => {
|
||||
tableData.value = res?.records;
|
||||
total.value = Number(res.total);
|
||||
loading.value = false;
|
||||
multipleUser();
|
||||
}).catch(()=>{loading.value = false;})
|
||||
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
//列表回显
|
||||
|
@ -196,4 +233,3 @@ const handleSelectionChange = (val) => {
|
|||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -3,12 +3,23 @@
|
|||
<div class="head_box">
|
||||
<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 v-model="listQuery" :formList="formData" ref="elform" :rules="rules">
|
||||
<FormMessage
|
||||
v-model="listQuery"
|
||||
:formList="formData"
|
||||
ref="elform"
|
||||
:rules="rules"
|
||||
>
|
||||
<!-- 身份标签细类 -->
|
||||
<template #sfbqIdList>
|
||||
<el-button @click="openDialog('01')">选择</el-button>
|
||||
|
@ -22,26 +33,46 @@
|
|||
:controlsWidth="tableDate.controlsWidth"
|
||||
>
|
||||
<template #bqLx="{ row }">
|
||||
<DictTag :value="row.bqLx" :tag="false" :options="props.dic.D_GS_BQ_LX" />
|
||||
<DictTag
|
||||
:value="row.bqLx"
|
||||
:tag="false"
|
||||
:options="props.dic.D_GS_BQ_LX"
|
||||
/>
|
||||
</template>
|
||||
<template #bqLb="{ row }">
|
||||
<DictTag :value="row.bqLb" :tag="false" :options="props.dic.D_GS_BQ_LB" />
|
||||
<DictTag
|
||||
:value="row.bqLb"
|
||||
:tag="false"
|
||||
:options="props.dic.D_GS_BQ_LB"
|
||||
/>
|
||||
</template>
|
||||
<template #bqYs="{ row }">
|
||||
<DictTag :value="row.bqYs" :tag="false" :options="props.dic.D_GS_SSYJ" />
|
||||
<DictTag
|
||||
:value="row.bqYs"
|
||||
:tag="false"
|
||||
:options="props.dic.D_GS_SSYJ"
|
||||
/>
|
||||
</template>
|
||||
<template #bqDj="{ row }">
|
||||
<DictTag :tag="false" :value="row.bqDj" :options="props.dic.D_GS_BQ_DJ" />
|
||||
<DictTag
|
||||
:tag="false"
|
||||
:value="row.bqDj"
|
||||
:options="props.dic.D_GS_BQ_DJ"
|
||||
/>
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link type="danger" @click="delDictItem(row.id,'身份标签细类')">删除</el-link>
|
||||
<el-link
|
||||
type="danger"
|
||||
@click="delDictItem(row.id, '身份标签细类')"
|
||||
>删除</el-link
|
||||
>
|
||||
</template>
|
||||
</MyTable>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 行为标签细类 -->
|
||||
<template #xwbqIdList >
|
||||
<template #xwbqIdList>
|
||||
<el-button @click="openDialog('02')">选择</el-button>
|
||||
<div class="boxlist">
|
||||
<MyTable
|
||||
|
@ -53,20 +84,40 @@
|
|||
:controlsWidth="tableDate.controlsWidth"
|
||||
>
|
||||
<template #bqLx="{ row }">
|
||||
<DictTag :value="row.bqLx" :tag="false" :options="props.dic.D_GS_BQ_LX" />
|
||||
<DictTag
|
||||
:value="row.bqLx"
|
||||
:tag="false"
|
||||
:options="props.dic.D_GS_BQ_LX"
|
||||
/>
|
||||
</template>
|
||||
<template #bqLb="{ row }">
|
||||
<DictTag :value="row.bqLb" :tag="false" :options="props.dic.D_GS_BQ_LB" />
|
||||
<DictTag
|
||||
:value="row.bqLb"
|
||||
:tag="false"
|
||||
:options="props.dic.D_GS_BQ_LB"
|
||||
/>
|
||||
</template>
|
||||
<template #bqYs="{ row }">
|
||||
<DictTag :value="row.bqYs" :tag="false" :options="props.dic.D_GS_SSYJ" />
|
||||
<DictTag
|
||||
:value="row.bqYs"
|
||||
:tag="false"
|
||||
:options="props.dic.D_GS_SSYJ"
|
||||
/>
|
||||
</template>
|
||||
<template #bqDj="{ row }">
|
||||
<DictTag :tag="false" :value="row.bqDj" :options="props.dic.D_GS_BQ_DJ" />
|
||||
<DictTag
|
||||
:tag="false"
|
||||
:value="row.bqDj"
|
||||
:options="props.dic.D_GS_BQ_DJ"
|
||||
/>
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link type="danger" @click="delDictItem(row.id,'行为标签细类')">删除</el-link>
|
||||
<el-link
|
||||
type="danger"
|
||||
@click="delDictItem(row.id, '行为标签细类')"
|
||||
>删除</el-link
|
||||
>
|
||||
</template>
|
||||
</MyTable>
|
||||
</div>
|
||||
|
@ -74,42 +125,73 @@
|
|||
</FormMessage>
|
||||
</div>
|
||||
<!-- 列表弹窗 -->
|
||||
<DialogList :Single="false" :roleIds="roleIds" v-if="chooseShow" :dic="props.dic" @chooseDate="chooseDate" :titleValue="chooseTitle" v-model="chooseShow" :bqLx="chooseType" bqDl="02"></DialogList>
|
||||
<DialogList
|
||||
:Single="false"
|
||||
:roleIds="roleIds"
|
||||
v-if="chooseShow"
|
||||
:dic="props.dic"
|
||||
@chooseDate="chooseDate"
|
||||
:titleValue="chooseTitle"
|
||||
v-model="chooseShow"
|
||||
:bqLx="chooseType"
|
||||
bqDl="02"
|
||||
></DialogList>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||
import DialogList from '@/views/backOfficeSystem/fourColorManage/components/dialogList.vue'
|
||||
import FormMessage from '@/components/aboutTable/FormMessage.vue'
|
||||
import DialogList from "@/views/backOfficeSystem/fourColorManage/components/dialogList.vue";
|
||||
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
||||
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
|
||||
import { ref, defineExpose,defineProps, reactive, defineEmits, getCurrentInstance } from "vue";
|
||||
import {
|
||||
ref,
|
||||
defineExpose,
|
||||
defineProps,
|
||||
reactive,
|
||||
defineEmits,
|
||||
getCurrentInstance
|
||||
} from "vue";
|
||||
const emit = defineEmits(["updateDate"]);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const props = defineProps({
|
||||
dic: Object
|
||||
});
|
||||
const roleIds =ref([]);//角色id
|
||||
const chooseType = ref('01');//选择弹窗类型
|
||||
const chooseShow = ref(false);//选择弹窗
|
||||
const chooseTitle = ref('');//选择弹窗
|
||||
const roleIds = ref([]); //角色id
|
||||
const chooseType = ref("01"); //选择弹窗类型
|
||||
const chooseShow = ref(false); //选择弹窗
|
||||
const chooseTitle = ref(""); //选择弹窗
|
||||
const dialogForm = ref(false); //弹窗
|
||||
const formData = reactive([
|
||||
{ label: "组合标签名称", prop: "bqMc", type: "input"},
|
||||
{ label: "组合标签代码", prop: "bqDm", type: "input"},
|
||||
{ label: "标签等级", prop: "bqDj", type: "select", options: props.dic.D_GS_BQ_DJ },
|
||||
{ label: "标签颜色", prop: "bqYs", type: "select", options: props.dic.D_GS_SSYJ },
|
||||
{ label: "组合标签分值", prop: "bqFz", type: "input"},
|
||||
{ label: "组合标签说明", prop: "bqSm", type: "input"},
|
||||
{ label: "身份标签细类", prop: "sfbqIdList", type: "slot",width: '100%', },
|
||||
{ label: "行为标签细类", prop: "xwbqIdList", type: "slot" ,width: '100%', },
|
||||
{ label: "组合标签名称", prop: "bqMc", type: "input" },
|
||||
{ label: "组合标签代码", prop: "bqDm", type: "input" },
|
||||
{
|
||||
label: "标签等级",
|
||||
prop: "bqDj",
|
||||
type: "select",
|
||||
options: props.dic.D_GS_BQ_DJ
|
||||
},
|
||||
{
|
||||
label: "标签颜色",
|
||||
prop: "bqYs",
|
||||
type: "select",
|
||||
options: props.dic.D_GS_SSYJ
|
||||
},
|
||||
{ label: "组合标签分值", prop: "bqFz", type: "input" },
|
||||
{ label: "组合标签说明", prop: "bqSm", type: "input" },
|
||||
{ label: "身份标签细类", prop: "sfbqIdList", type: "slot", width: "100%" },
|
||||
{ label: "行为标签细类", prop: "xwbqIdList", type: "slot", width: "100%" }
|
||||
]);
|
||||
const rules = reactive({
|
||||
bqMc: [{ required: true, message: "请输入组合标签名称", trigger: "blur" }],
|
||||
bqDm: [{ required: true, message: "请输入组合标签代码", trigger: "blur" }],
|
||||
zhbqjf: [{ required: true, message: "请输入组合标签积分", trigger: "blur" }],
|
||||
sfbqIdList: [{ required: true, message: "请选择身份标签细类", trigger: "change" }],
|
||||
xwbqIdList : [{ required: true, message: "请选择行为标签细类", trigger: "change" }],
|
||||
sfbqIdList: [
|
||||
{ required: true, message: "请选择身份标签细类", trigger: "change" }
|
||||
],
|
||||
xwbqIdList: [
|
||||
{ required: true, message: "请选择行为标签细类", trigger: "change" }
|
||||
]
|
||||
});
|
||||
|
||||
const tableDate = reactive({
|
||||
|
@ -129,13 +211,13 @@ const tableDate = reactive({
|
|||
}, //分页
|
||||
controlsWidth: 90, //操作栏宽度
|
||||
tableColumn: [
|
||||
{ label: "标签名称", prop: "bqMc",showOverflowTooltip:true},
|
||||
{ label: "标签名称", prop: "bqMc", showOverflowTooltip: true },
|
||||
{ label: "标签代码", prop: "bqDm" },
|
||||
{ label: "标签大类名称", prop: "bqDlMc" },
|
||||
{ label: "标签类型", prop: "bqLx",showSolt: true },
|
||||
{ label: "标签类别", prop: "bqLb",showSolt: true },
|
||||
{ label: "标签颜色", prop: "bqYs",showSolt: true },
|
||||
{ label: "标签等级", prop: "bqDj",showSolt: true },
|
||||
{ label: "标签类型", prop: "bqLx", showSolt: true },
|
||||
{ label: "标签类别", prop: "bqLb", showSolt: true },
|
||||
{ label: "标签颜色", prop: "bqYs", showSolt: true },
|
||||
{ label: "标签等级", prop: "bqDj", showSolt: true }
|
||||
]
|
||||
});
|
||||
const listQuery = ref({}); //表单
|
||||
|
@ -143,14 +225,14 @@ const loading = ref(false);
|
|||
const elform = ref();
|
||||
const title = ref("");
|
||||
// 初始化数据
|
||||
const init = (type, row,) => {
|
||||
const init = (type, row) => {
|
||||
dialogForm.value = true;
|
||||
title.value = type == 'add' ? "新增" : "编辑";
|
||||
title.value = type == "add" ? "新增" : "编辑";
|
||||
if (row) getDataById(row.id);
|
||||
};
|
||||
// 根据id查询详情
|
||||
const getDataById = (id) => {
|
||||
qcckGet({}, '/mosty-gsxt/tbGsxtBqzh/selectVoById/'+id).then((res) => {
|
||||
qcckGet({}, "/mosty-gsxt/tbGsxtBqzh/selectVoById/" + id).then((res) => {
|
||||
listQuery.value = res;
|
||||
tableDate.sfbqIdList = res.sfbqList;
|
||||
listQuery.value.sfbqIdList = res.sfbqList.map((item) => item.id);
|
||||
|
@ -162,54 +244,68 @@ const getDataById = (id) => {
|
|||
|
||||
// 提交
|
||||
const submit = () => {
|
||||
elform.value.submit((data)=>{
|
||||
let url = title.value == "新增" ? '/mosty-gsxt/tbGsxtBqzh/save':'/mosty-gsxt/tbGsxtBqzh/update';
|
||||
let params = { ...data }
|
||||
elform.value.submit((data) => {
|
||||
let url =
|
||||
title.value == "新增"
|
||||
? "/mosty-gsxt/tbGsxtBqzh/save"
|
||||
: "/mosty-gsxt/tbGsxtBqzh/update";
|
||||
let params = { ...data };
|
||||
loading.value = true;
|
||||
qcckPost(params, url).then((res) => {
|
||||
qcckPost(params, url)
|
||||
.then((res) => {
|
||||
proxy.$message({ type: "success", message: title.value + "成功" });
|
||||
emit("updateDate");
|
||||
loading.value = false
|
||||
loading.value = false;
|
||||
close();
|
||||
}).catch(() => {loading.value = false});
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
});
|
||||
};
|
||||
// 打开弹窗
|
||||
const openDialog = (type) => {
|
||||
chooseShow.value = true
|
||||
chooseShow.value = true;
|
||||
chooseType.value = type;
|
||||
chooseTitle.value = type == '01'? '选择身份标签细类':'选择行为标签细类';
|
||||
roleIds.value = type == '01' ? tableDate.sfbqIdList.map((item) => item.id):tableDate.xwbqIdList.map((item) => item.id);
|
||||
chooseTitle.value = type == "01" ? "选择身份标签细类" : "选择行为标签细类";
|
||||
roleIds.value =
|
||||
type == "01"
|
||||
? tableDate.sfbqIdList.map((item) => item.id)
|
||||
: tableDate.xwbqIdList.map((item) => item.id);
|
||||
};
|
||||
// 选择数据
|
||||
const chooseDate = (data) => {
|
||||
if(chooseType.value == '01'){
|
||||
if (chooseType.value == "01") {
|
||||
tableDate.sfbqIdList = data;
|
||||
listQuery.value.sfbqIdList = tableDate.sfbqIdList.map((item) => item.id);
|
||||
}else{
|
||||
} else {
|
||||
tableDate.xwbqIdList = data;
|
||||
listQuery.value.xwbqIdList = tableDate.xwbqIdList.map((item) => item.id);
|
||||
}
|
||||
};
|
||||
|
||||
// 删除
|
||||
const delDictItem = (id,type) => {
|
||||
switch(type){
|
||||
case '身份标签细类':
|
||||
tableDate.sfbqIdList = tableDate.sfbqIdList.filter((item) => item.id !== id);
|
||||
const delDictItem = (id, type) => {
|
||||
switch (type) {
|
||||
case "身份标签细类":
|
||||
tableDate.sfbqIdList = tableDate.sfbqIdList.filter(
|
||||
(item) => item.id !== id
|
||||
);
|
||||
listQuery.value.sfbqIdList = tableDate.sfbqIdList.map((item) => item.id);
|
||||
break;
|
||||
case '行为标签细类':
|
||||
tableDate.xwbqIdList = tableDate.xwbqIdList.filter((item) => item.id !== id);
|
||||
case "行为标签细类":
|
||||
tableDate.xwbqIdList = tableDate.xwbqIdList.filter(
|
||||
(item) => item.id !== id
|
||||
);
|
||||
listQuery.value.xwbqIdList = tableDate.xwbqIdList.map((item) => item.id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
// 关闭
|
||||
const close = () => {
|
||||
listQuery.value = {};
|
||||
tableDate.sfbqIdList = []
|
||||
tableDate.xwbqIdList = []
|
||||
tableDate.sfbqIdList = [];
|
||||
tableDate.xwbqIdList = [];
|
||||
dialogForm.value = false;
|
||||
loading.value = false;
|
||||
};
|
||||
|
@ -219,7 +315,7 @@ defineExpose({ init });
|
|||
<style lang="scss" scoped>
|
||||
@import "~@/assets/css/layout.scss";
|
||||
@import "~@/assets/css/element-plus.scss";
|
||||
.boxlist{
|
||||
.boxlist {
|
||||
width: 99%;
|
||||
height: 225px;
|
||||
margin-top: 10px;
|
||||
|
|
|
@ -152,6 +152,7 @@ onMounted(() => {
|
|||
// 按钮切换
|
||||
const handleBtns = (val) => {
|
||||
btnsActive.value = val;
|
||||
|
||||
switch (val) {
|
||||
case "预警布控":
|
||||
router.push("/warningControl");
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
<template>
|
||||
<div class="login-container">
|
||||
<el-form class="login-form" ref="loginFromRef" :model="loginForm" :rules="loginRules" @submit.native.prevent>
|
||||
<el-form
|
||||
class="login-form"
|
||||
ref="loginFromRef"
|
||||
:model="loginForm"
|
||||
:rules="loginRules"
|
||||
@submit.native.prevent
|
||||
>
|
||||
<div class="title-container">
|
||||
<h3 class="title">用户登录</h3>
|
||||
</div>
|
||||
|
@ -8,22 +14,41 @@
|
|||
<span class="svg-container">
|
||||
<svg-icon icon="user" />
|
||||
</span>
|
||||
<el-input placeholder="请输入账号" name="userName" type="text" v-model="loginForm.userName" />
|
||||
<el-input
|
||||
placeholder="请输入账号"
|
||||
name="userName"
|
||||
type="text"
|
||||
v-model="loginForm.userName"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="password1">
|
||||
<span class="svg-container">
|
||||
<svg-icon icon="password" />
|
||||
</span>
|
||||
<el-input placeholder="请输入密码" name="password" :type="passwordType" v-model="loginForm.password"/>
|
||||
<el-input
|
||||
placeholder="请输入密码"
|
||||
name="password"
|
||||
:type="passwordType"
|
||||
v-model="loginForm.password"
|
||||
/>
|
||||
<span class="show-pwd">
|
||||
<svg-icon @click="onChangePwdType" :icon="passwordType === 'password' ? 'eye' : 'eye-open'"/>
|
||||
<svg-icon
|
||||
@click="onChangePwdType"
|
||||
:icon="passwordType === 'password' ? 'eye' : 'eye-open'"
|
||||
/>
|
||||
</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="isShowKaptCha" prop="kaptcha">
|
||||
<span class="svg-container"><svg-icon icon="kaptcha" /></span>
|
||||
<el-input @keydown.enter="handleLogin()" v-model="loginForm.kaptcha" placeholder="请输入验证码" name="kaptcha" type="text"/>
|
||||
<el-input
|
||||
@keydown.enter="handleLogin()"
|
||||
v-model="loginForm.kaptcha"
|
||||
placeholder="请输入验证码"
|
||||
name="kaptcha"
|
||||
type="text"
|
||||
/>
|
||||
<span @click="getKaptchaImg">
|
||||
<el-image class="show-kaptcha" :src="kaptchaUrl" fit="cover">
|
||||
<template #error>
|
||||
|
@ -35,12 +60,28 @@
|
|||
|
||||
<!---登录按钮-->
|
||||
<el-form-item style="height: 49px" v-if="!loginDialog">
|
||||
<el-button @click="handleLogin" type="primary" style="width: 520px; height: 49px" :loading="loading" native-type="submit">登录</el-button>
|
||||
<el-button
|
||||
@click="handleLogin"
|
||||
type="primary"
|
||||
style="width: 520px; height: 49px"
|
||||
:loading="loading"
|
||||
native-type="submit"
|
||||
>登录</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item class="choosedept-wrap" v-if="loginDialog">
|
||||
<el-select v-model="deptId" @change="refreshToken" placeholder="请选择部门">
|
||||
<el-option v-for="item in deptList" :key="item.deptId" :label="item.deptName" :value="item.deptId"></el-option>
|
||||
<el-select
|
||||
v-model="deptId"
|
||||
@change="refreshToken"
|
||||
placeholder="请选择部门"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in deptList"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -49,7 +90,7 @@
|
|||
|
||||
<script>
|
||||
export default {
|
||||
name: "login",
|
||||
name: "login"
|
||||
};
|
||||
</script>
|
||||
<script setup>
|
||||
|
@ -79,18 +120,24 @@ const isShowKaptCha = ref(false);
|
|||
// 验证规则
|
||||
const loginRules = ref({
|
||||
userName: [{ required: true, trigger: "blur", message: "用户名为必填项" }],
|
||||
password: [{ required: true, trigger: "blur", validator: validatePassword() }],
|
||||
password: [
|
||||
{ required: true, trigger: "blur", validator: validatePassword() }
|
||||
],
|
||||
kaptcha: [{ required: true, trigger: "blur", message: "验证码为必填项" }]
|
||||
});
|
||||
|
||||
const handleClose = () => {};
|
||||
const refreshToken = (e) => {
|
||||
store.dispatch("user/refreshToken", { deptId: e, jwtToken: authorization.value}).then((res) => {
|
||||
store
|
||||
.dispatch("user/refreshToken", { deptId: e, jwtToken: authorization.value })
|
||||
.then((res) => {
|
||||
loading.value = false;
|
||||
store.commit("user/setDeptId", e);
|
||||
|
||||
// window.location.href = '/'// 登录后操作
|
||||
router.push("/");
|
||||
}).catch(() => {
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
@ -112,18 +159,25 @@ const handleLogin = () => {
|
|||
loginFromRef.value.validate((valid) => {
|
||||
if (!valid) return false;
|
||||
loading.value = true;
|
||||
store.dispatch("user/login", loginForm.value).then((res) => {
|
||||
store
|
||||
.dispatch("user/login", loginForm.value)
|
||||
.then((res) => {
|
||||
loading.value = false;
|
||||
// 登录后操作
|
||||
if (res.deptList.length === 1) {
|
||||
window.location.href = '/'
|
||||
window.location.href = "/";
|
||||
} else {
|
||||
deptList.value = [...res.deptList];
|
||||
loginDialog.value = true;
|
||||
authorization.value = res.jwtToken;
|
||||
ElNotification({title: "提示",message: "请选择部门",duration: 3000});
|
||||
ElNotification({
|
||||
title: "提示",
|
||||
message: "请选择部门",
|
||||
duration: 3000
|
||||
});
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
});
|
||||
|
@ -131,11 +185,11 @@ const handleLogin = () => {
|
|||
const logout = () => {
|
||||
store.dispatch("user/logout");
|
||||
};
|
||||
onMounted(() => {
|
||||
|
||||
});
|
||||
onMounted(() => {});
|
||||
const getKaptchaImg = () => {
|
||||
const res =`${process.env.VUE_APP_GATEWAY_BASE_URL}/mosty-api/mosty-base/kaptcha?date=` + new Date();
|
||||
const res =
|
||||
`${process.env.VUE_APP_GATEWAY_BASE_URL}/mosty-api/mosty-base/kaptcha?date=` +
|
||||
new Date();
|
||||
kaptchaUrl.value = res;
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue
Block a user