2025-04-12 14:54:02 +08:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<div class="titleBox">
|
2025-07-10 17:59:39 +08:00
|
|
|
<PageTitle title="我的布控">
|
|
|
|
<el-button type="primary" @click="sendControl('add',null)">发起布控</el-button>
|
|
|
|
<el-button type="primary">导出</el-button>
|
|
|
|
</PageTitle>
|
2025-04-12 14:54:02 +08:00
|
|
|
</div>
|
|
|
|
<!-- 搜索 -->
|
|
|
|
<div ref="searchBox">
|
2025-07-08 20:10:24 +08:00
|
|
|
<Search :searchArr="searchConfiger" @submit="onSearch" />
|
2025-04-12 14:54:02 +08:00
|
|
|
</div>
|
2025-04-15 15:21:20 +08:00
|
|
|
<!-- 按钮组 -->
|
|
|
|
<div class="content">
|
|
|
|
<!-- 表格 -->
|
|
|
|
<div class="tabBox">
|
|
|
|
<MyTable
|
|
|
|
:tableData="pageData.tableData"
|
|
|
|
:tableColumn="pageData.tableColumn"
|
|
|
|
:tableHeight="pageData.tableHeight"
|
|
|
|
:key="pageData.keyCount"
|
|
|
|
:tableConfiger="pageData.tableConfiger"
|
|
|
|
:controlsWidth="pageData.controlsWidth"
|
|
|
|
>
|
2025-07-09 21:12:24 +08:00
|
|
|
<template #bkZt="{ row }">
|
|
|
|
<DictTag :tag="false" :value="row.bkZt" :options="D_GS_BK_ZT" />
|
|
|
|
</template>
|
|
|
|
<template #bkDj="{ row }">
|
|
|
|
<DictTag :tag="false" :value="row.bkDj" :options="D_GS_BK_DJ" />
|
|
|
|
</template>
|
2025-07-10 17:59:39 +08:00
|
|
|
<template #bkDx="{ row }">
|
|
|
|
<DictTag :tag="false" :value="row.bkDx" :options="D_GS_BK_DX" />
|
|
|
|
</template>
|
2025-07-09 21:12:24 +08:00
|
|
|
<template #bkDxxx="{ row }">
|
|
|
|
<span v-if="row.bkDxxx"><span v-for="(it,idx) in row.bkDxxx" :key="idx"> {{ it.ryXm }} 、</span></span>
|
|
|
|
<span v-else>暂无</span>
|
|
|
|
</template>
|
|
|
|
<template #sjrs="{ row }">
|
|
|
|
<span v-if="row.bkDxxx"> {{ row.bkDxxx.length }} </span>
|
|
|
|
<span v-else>0</span>
|
|
|
|
</template>
|
|
|
|
<template #qyList="{ row }">
|
|
|
|
<span v-for="(it,idx) in row.qyList" :key="idx"> {{ it.qymc }} 、</span>
|
|
|
|
</template>
|
2025-07-09 14:01:00 +08:00
|
|
|
<template #yjcs="{row}">
|
2025-07-09 21:12:24 +08:00
|
|
|
<span @click="openWarning(row)" style="color: #00ffff;" class="mr5 pointer">{{ row.yjcs || 0}}</span>次
|
2025-07-09 14:01:00 +08:00
|
|
|
</template>
|
2025-04-15 15:21:20 +08:00
|
|
|
<!-- 操作 -->
|
|
|
|
<template #controls="{ row }">
|
2025-07-10 17:59:39 +08:00
|
|
|
<el-link type="primary" size="small" @click="sendControl('detail',row)">详情</el-link>
|
2025-07-08 20:10:24 +08:00
|
|
|
<el-link type="primary" size="small">续控</el-link>
|
2025-07-10 17:59:39 +08:00
|
|
|
<el-link type="danger" size="small" @click="handleRow(row.id)">删除</el-link>
|
2025-04-15 15:21:20 +08:00
|
|
|
</template>
|
|
|
|
</MyTable>
|
2025-07-08 19:50:28 +08:00
|
|
|
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
|
|
|
...pageData.pageConfiger,
|
|
|
|
total: pageData.total
|
|
|
|
}"></Pages>
|
2025-04-15 15:21:20 +08:00
|
|
|
</div>
|
2025-04-12 14:54:02 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2025-07-08 20:10:24 +08:00
|
|
|
<!-- 布控对象 -->
|
2025-07-10 17:59:39 +08:00
|
|
|
<AddBkdx ref="addBkdxForm" @change="getList" :dic="{D_GS_BK_DX,D_GS_BK_BKYS,D_BZ_XB,D_GS_BK_CZYQ,D_GS_BK_DJ,D_GS_BK_CZJSDWLX,D_GS_BK_TJFS}" />
|
2025-07-09 14:01:00 +08:00
|
|
|
<!-- 预警弹窗 -->
|
|
|
|
<YjDialog ref="warningkdxForm"></YjDialog>
|
2025-04-12 14:54:02 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
2025-07-08 20:10:24 +08:00
|
|
|
import AddBkdx from "./components/addBkdx.vue";
|
2025-07-09 14:01:00 +08:00
|
|
|
import YjDialog from "./components/yjDialog.vue";
|
2025-05-26 21:03:06 +08:00
|
|
|
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 { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
|
|
|
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
|
|
|
|
const { proxy } = getCurrentInstance();
|
2025-07-10 12:09:51 +08:00
|
|
|
const { D_GS_BK_BKYS,D_BZ_XB,D_GS_BK_SJLX,D_GS_BK_DJ, D_GS_BK_DX, D_GS_BK_ZT,D_GS_BK_CZYQ,D_GS_BK_CZJSDWLX,D_GS_BK_TJFS } = proxy.$dict("D_GS_BK_BKYS","D_BZ_XB","D_GS_BK_SJLX","D_GS_BK_DJ","D_GS_BK_DX","D_GS_BK_ZT","D_GS_BK_CZYQ","D_GS_BK_CZJSDWLX","D_GS_BK_TJFS"); //获取字典数据
|
2025-07-08 20:10:24 +08:00
|
|
|
const addBkdxForm = ref(null); //布控对象组件
|
2025-07-09 14:01:00 +08:00
|
|
|
const warningkdxForm = ref(); //布控对象组件
|
2025-05-26 21:03:06 +08:00
|
|
|
const searchBox = ref(); //搜索框
|
|
|
|
const searchConfiger = ref([
|
|
|
|
{
|
2025-07-08 20:10:24 +08:00
|
|
|
label: "布控级别",
|
|
|
|
prop: "bqjb",
|
|
|
|
placeholder: "请选择布控级别",
|
2025-05-26 21:03:06 +08:00
|
|
|
showType: "select",
|
|
|
|
options: D_GS_BK_DJ
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "布控对象",
|
|
|
|
prop: "bkDx",
|
|
|
|
placeholder: "请选择布控对象",
|
|
|
|
showType: "select",
|
|
|
|
options: D_GS_BK_DX
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "布控状态",
|
|
|
|
prop: "bkZt",
|
|
|
|
placeholder: "请选择布控状态",
|
|
|
|
showType: "select",
|
|
|
|
options: D_GS_BK_ZT
|
|
|
|
},
|
2025-07-09 21:12:24 +08:00
|
|
|
{
|
|
|
|
label: "布控时间类型",
|
|
|
|
prop: "bkSjLx",
|
2025-05-26 21:03:06 +08:00
|
|
|
placeholder: "请选择布控时间",
|
2025-07-09 21:12:24 +08:00
|
|
|
showType: "date",
|
|
|
|
options: D_GS_BK_SJLX
|
2025-05-26 21:03:06 +08:00
|
|
|
},
|
|
|
|
]);
|
|
|
|
const queryFrom = ref({});
|
|
|
|
const pageData = reactive({
|
2025-07-09 21:12:24 +08:00
|
|
|
tableData: [], //表格数据
|
2025-05-26 21:03:06 +08:00
|
|
|
keyCount: 0,
|
|
|
|
tableConfiger: {
|
|
|
|
rowHieght: 61,
|
2025-07-09 21:12:24 +08:00
|
|
|
showSelectType: "null", //选择类型
|
2025-05-26 21:03:06 +08:00
|
|
|
loading: false
|
|
|
|
},
|
|
|
|
total: 0,
|
|
|
|
pageConfiger: {
|
|
|
|
pageSize: 20,
|
|
|
|
pageCurrent: 1
|
|
|
|
}, //分页
|
2025-07-08 20:10:24 +08:00
|
|
|
controlsWidth: 150, //操作栏宽度
|
2025-04-12 14:54:02 +08:00
|
|
|
|
2025-05-26 21:03:06 +08:00
|
|
|
tableColumn: [
|
|
|
|
{ label: "布控级别", prop: "bkDj", showSolt: true },
|
|
|
|
{ label: "布控标题", prop: "bkBt" },
|
2025-07-10 17:59:39 +08:00
|
|
|
{ label: "布控对象", prop: "bkDx",showSolt: true },
|
2025-07-09 21:12:24 +08:00
|
|
|
{ label: "布控对象信息", prop: "bkDxxx",showSolt: true },
|
|
|
|
{ label: "布控范围", prop: "qyList", showSolt: true },
|
|
|
|
{ label: "涉及人数", prop: "sjrs",showSolt: true },
|
2025-07-09 14:01:00 +08:00
|
|
|
{ label: "预警次数", prop: "yjcs",showSolt: true },
|
2025-07-09 21:12:24 +08:00
|
|
|
{ label: "开始时间", prop: "bkSjKs"},
|
|
|
|
{ label: "结束时间", prop: "bkSjJs"},
|
|
|
|
{ label: "布控发起人", prop: "bkfqrXm"},
|
|
|
|
{ label: "布控状态", prop: "bkZt",showSolt: true},
|
2025-05-26 21:03:06 +08:00
|
|
|
]
|
|
|
|
});
|
2025-05-27 10:01:47 +08:00
|
|
|
|
2025-05-26 21:03:06 +08:00
|
|
|
onMounted(() => {
|
|
|
|
getList();
|
|
|
|
tabHeightFn();
|
|
|
|
});
|
2025-05-27 10:01:47 +08:00
|
|
|
|
2025-05-26 21:03:06 +08:00
|
|
|
// 搜索
|
|
|
|
const onSearch = (val) => {
|
|
|
|
queryFrom.value = { ...val };
|
|
|
|
pageData.pageConfiger.pageCurrent = 1;
|
|
|
|
getList();
|
|
|
|
};
|
2025-04-12 14:54:02 +08:00
|
|
|
|
2025-05-26 21:03:06 +08:00
|
|
|
const changeNo = (val) => {
|
|
|
|
pageData.pageConfiger.pageNum = val;
|
|
|
|
getList();
|
|
|
|
};
|
|
|
|
const changeSize = (val) => {
|
|
|
|
pageData.pageConfiger.pageSize = val;
|
|
|
|
getList();
|
|
|
|
};
|
2025-04-12 14:54:02 +08:00
|
|
|
|
2025-05-26 21:03:06 +08:00
|
|
|
// 获取列表
|
2025-07-09 21:12:24 +08:00
|
|
|
const getList = () => {
|
|
|
|
pageData.tableConfiger.loading = true;
|
|
|
|
let data = {
|
|
|
|
...pageData.pageConfiger,
|
|
|
|
...queryFrom.value,
|
|
|
|
bkcxlx:'01'
|
|
|
|
};
|
|
|
|
qcckGet(data, "/mosty-gsxt/tbGsxtBk/selectPage").then((res) => {
|
|
|
|
pageData.tableData = res.records || [];
|
|
|
|
pageData.total = res.total;
|
|
|
|
pageData.tableConfiger.loading = false;
|
|
|
|
}).catch(() => {
|
|
|
|
pageData.tableConfiger.loading = false;
|
|
|
|
});
|
2025-05-26 21:03:06 +08:00
|
|
|
};
|
2025-07-09 21:12:24 +08:00
|
|
|
|
2025-07-09 14:01:00 +08:00
|
|
|
// 打开预警
|
|
|
|
const openWarning = (val) =>{
|
|
|
|
warningkdxForm.value.init(val)
|
|
|
|
}
|
2025-04-12 14:54:02 +08:00
|
|
|
|
2025-07-10 17:59:39 +08:00
|
|
|
const sendControl = (type,row) => {
|
|
|
|
addBkdxForm.value.init(type,row);
|
2025-05-26 21:03:06 +08:00
|
|
|
};
|
2025-07-10 17:59:39 +08:00
|
|
|
|
|
|
|
// 删除
|
|
|
|
const handleRow = (id) => {
|
|
|
|
proxy.$confirm("确定要删除", "警告", { type: "warning" }).then(() => {
|
|
|
|
qcckDelete({}, "/mosty-gsxt/tbGsxtBk/"+id).then(() => {
|
|
|
|
proxy.$message({ type: "success", message: "删除成功" });
|
|
|
|
getList();
|
|
|
|
});
|
|
|
|
})
|
|
|
|
};
|
|
|
|
|
2025-05-26 21:03:06 +08:00
|
|
|
// 表格高度计算
|
|
|
|
const tabHeightFn = () => {
|
2025-07-10 17:59:39 +08:00
|
|
|
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 270;
|
2025-05-26 21:03:06 +08:00
|
|
|
window.onresize = function () {
|
|
|
|
tabHeightFn();
|
2025-04-12 14:54:02 +08:00
|
|
|
};
|
2025-07-10 17:59:39 +08:00
|
|
|
};</script>
|
2025-04-12 14:54:02 +08:00
|
|
|
|
2025-04-15 15:21:20 +08:00
|
|
|
<style lang="scss" scoped>
|
2025-05-26 21:03:06 +08:00
|
|
|
.el-loading-mask {
|
|
|
|
background: rgba(0, 0, 0, 0.5) !important;
|
|
|
|
}
|
2025-07-08 19:50:28 +08:00
|
|
|
|
2025-04-15 15:21:20 +08:00
|
|
|
</style>
|