This commit is contained in:
lcw
2026-04-15 16:04:50 +08:00
parent 763057ed9f
commit fbf259663b
41 changed files with 3651 additions and 2148 deletions

View File

@ -1,67 +1,89 @@
<template>
<div style="height:100%;width:100%" :id="echartsId"></div>
<div style="height: 100%; width: 100%" :id="echartsId"></div>
</template>
<script setup>
import * as echarts from "echarts";
import { onMounted, ref, reactive, defineProps, onUnmounted, watch, nextTick } from "vue";
import {
onMounted,
ref,
reactive,
defineProps,
onUnmounted,
watch,
nextTick,
onBeforeUnmount
} from "vue";
const props = defineProps({
echartsId:{
type:String,
default:'barId'
echartsId: {
type: String,
default: "barId"
},
data:{
type:Object,
default:{
title:'', // 图表标题
color:[], //['#EB00FF','#F57100']
list:[], //[{label:'总数',val:[80,70,60,50]}, {label:'已处置',val:[70,40,30,80]}, ]
xData:[] ,//['09-01','09-02','09-03','09-04']
labelColor:'#000', //横坐标颜色 - 纵坐标颜色 - 标题颜色
rotate:0, //横坐标旋转角度
interval:0, //横坐标间隔
isVertical:false,//是否竖排垂直展示
data: {
type: Object,
default: {
title: "", // 图表标题
color: [], //['#EB00FF','#F57100']
list: [], //[{label:'总数',val:[80,70,60,50]}, {label:'已处置',val:[70,40,30,80]}, ]
xData: [], //['09-01','09-02','09-03','09-04']
labelColor: "#000", //横坐标颜色 - 纵坐标颜色 - 标题颜色
rotate: 0, //横坐标旋转角度
interval: 0, //横坐标间隔
isVertical: false //是否竖排垂直展示
}
},
dataZoom:{
type:Boolean,
default:false
dataZoom: {
type: Boolean,
default: false
},
rotate:{
type:Number,
default:0
rotate: {
type: Number,
default: 0
}
});
watch(()=>props.data,val=>{
nextTick(()=>{
init(val)
})
},{immediate:true,deep:true})
// 保存图表实例和 resize 处理函数
let myChart = null;
const handleResize = () => {
myChart && myChart.resize();
};
watch(
() => props.data,
(val) => {
nextTick(() => {
init(val);
});
},
{ immediate: true, deep: true }
);
// 初始化
function init (val) {
function init(val) {
let color = val.color;
let list = val.list
let series = list.map((item ,idx)=>{
let list = val.list;
let series = list.map((item, idx) => {
return {
type: "bar",
name:item.label,
data:item.val,
itemStyle:{normal: { color: color[idx] }},
showSymbol:false,
barWidth: '30%', // 柱状图宽度
}
})
chartFn(series)
name: item.label,
data: item.val,
itemStyle: { normal: { color: color[idx] } },
showSymbol: false,
barWidth: "30%" // 柱状图宽度
};
});
chartFn(series);
}
function chartFn(series) {
var myChart = echarts.init(document.getElementById(props.echartsId));
// 复用已有的图表实例,避免重复创建
if (!myChart) {
myChart = echarts.init(document.getElementById(props.echartsId));
}
var option = {
title: {
text: props.data.title || '',
left: 'center',
text: props.data.title || "",
left: "center",
textStyle: {
color: props.data.color[0] || "#000",
fontSize: 14
@ -71,11 +93,13 @@ function chartFn(series) {
top: "25%",
right: "0%",
left: "0%",
bottom: "0%", // 增加底部空间为两行X轴标签留出空间
bottom: "0%",
containLabel: true
},
legend: {
data: props.data.list.map(v => { return v.label }),
data: props.data.list.map((v) => {
return v.label;
}),
textStyle: {
color: props.data.color[0] || "#409EFF",
fontSize: 12
@ -86,7 +110,7 @@ function chartFn(series) {
tooltip: {
trigger: "axis",
axisPointer: {
type: 'shadow'
type: "shadow"
},
backgroundColor: "rgba(255,255,255,1)",
padding: [5, 10],
@ -104,18 +128,17 @@ function chartFn(series) {
}
},
axisLabel: {
rotate: props.rotate, // 设置标签旋转角度
rotate: props.rotate,
show: true,
color: props.data.color[0] || "#409EFF",
fontSize: 10,
interval: props.data.interval || 0, // 强制显示所有标签
formatter: function(value, index) {
// 组合显示数量和年龄范围,数量在上,范围在下
interval: props.data.interval || 0,
formatter: function (value, index) {
const bottomValues = props.data.bottomValues || [];
const bottomValue = bottomValues[index] || '';
const bottomValue = bottomValues[index] || "";
return `${bottomValue}\n${value}`;
},
margin: 10 // 调整边距
margin: 10
}
},
yAxis: {
@ -123,12 +146,12 @@ function chartFn(series) {
axisLabel: {
color: props.data.color[0] || "#409EFF",
fontSize: 10,
formatter: '{value}%' // 显示百分比
formatter: "{value}%"
},
splitLine: {
show: true,
lineStyle: {
type: 'solid',
type: "solid",
color: props.data.color[0] || "#409EFF"
}
},
@ -144,9 +167,8 @@ function chartFn(series) {
...item,
label: {
show: true,
position: 'top',
formatter: function(params) {
// 显示顶部百分比标签
position: "top",
formatter: function (params) {
return `占比 ${params.value}%`;
},
color: props.data.color[0] || "#409EFF",
@ -157,29 +179,24 @@ function chartFn(series) {
color: item.itemStyle.normal.color
}
}
})),
// // 底部数值标签
// graphic: props.data.bottomValues ? props.data.bottomValues.map((value, idx) => {
// const percent = (idx + 0.5) / props.data.xData.length * 100;
// return {
// type: 'text',
// left: `${percent}%`,
// bottom: '5%', // 调整到底部显示在x轴标签下方
// style: {
// text: value,
// fill: '#000',
// fontSize: 12
// }
// };
// }) : []
}))
};
option && myChart.setOption(option);
window.addEventListener('resize', function() {
myChart.resize();
})
}
// 组件挂载时添加 resize 监听
onMounted(() => {
window.addEventListener("resize", handleResize);
});
// 组件卸载时清理资源
onBeforeUnmount(() => {
window.removeEventListener("resize", handleResize);
if (myChart) {
myChart.dispose();
myChart = null;
}
});
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@ -1,164 +1,191 @@
<template>
<div class="echratsBox">
<div class="chart-container" :id="props.id"></div>
<div class="legend-container">
<div class="legend-item" v-for="(item, i) in legendList" :key="i">
<span class="dot" :style="{ background: item.dotColor }"></span>
<span class="name">{{ item.name }}</span>
<span class="value">{{ item.value }}</span>
<span class="label">占比</span>
<span class="percent">{{ item.percent }}%</span>
</div>
</div>
<div class="echratsBox">
<div class="chart-container" :id="props.id"></div>
<div class="legend-container">
<div class="legend-item" v-for="(item, i) in legendList" :key="i">
<span class="dot" :style="{ background: item.dotColor }"></span>
<span class="name">{{ item.name }}</span>
<span class="value">{{ item.value }}</span>
<span class="label">占比</span>
<span class="percent">{{ item.percent }}%</span>
</div>
</div>
</div>
</template>
<script setup>
import { nextTick, ref ,defineProps,watch} from 'vue'
import * as echarts from 'echarts'
import { nextTick, ref, defineProps, watch, onMounted, onBeforeUnmount } from "vue";
import * as echarts from "echarts";
const props = defineProps({
data: {
type: Array,
default: () => [
{ name: '失控', value: 85 ,color: '#D66A8D'},
{ name: '在控', value: 55 ,color: '#17C0AE'},
]
},
id: {
type: String,
default: 'echartsRef'
}
})
const legendList = ref([])
watch(() => props.data, (newVal) => {
if (newVal.length) {
const total = newVal.reduce((s, v) => s + v.value, 0);
legendList.value = newVal.map((d, i) => ({
name: d.name,
value: d.value,
percent: total > 0 ? Math.round((d.value / total )* 100) : 0,
dotColor: i === 0 ? 'linear-gradient(90deg, #FF8DA7 0%, #D66A8D 100%)': d.color
}))
nextTick(() => {
initChart(newVal, total)
})
}
}, { immediate: true })
data: {
type: Array,
default: () => [
{ name: "失控", value: 85, color: "#D66A8D" },
{ name: "在控", value: 55, color: "#17C0AE" }
]
},
id: {
type: String,
default: "echartsRef"
}
});
const initChart = (data, total) => {
let chart = echarts.init(document.getElementById(props.id))
if (!chart) return;
const seriesData = data.map((d) => ({
// 保存图表实例和 resize 处理函数
let chart = null;
const handleResize = () => {
chart && chart.resize();
};
const legendList = ref([]);
watch(
() => props.data,
(newVal) => {
if (newVal.length) {
const total = newVal.reduce((s, v) => s + v.value, 0);
legendList.value = newVal.map((d, i) => ({
name: d.name,
value: d.value,
itemStyle: { color: d.color }
}))
const option = {
tooltip: { show: false },
legend: { show: false },
series: [
{
type: 'pie',
radius: ['50%', '78%'],
center: ['50%', '48%'],
startAngle:56,
roseType: 'radius',
label: { show: false },
labelLine: { show: false },
itemStyle: { borderColor: '#FFFFFF', borderWidth: 0 },
data: seriesData
}
],
graphic: [
{
type: 'text',
left: 'center',
top: '32%',
style: {
text: `${total}`,
fill: '#2F88FF',
fontSize: 24,
fontWeight: 700,
textAlign: 'center'
}
},
{
type: 'text',
left: 'center',
top: '52%',
style: {
text: '总数',
fill: '#666666',
fontSize: 14,
fontWeight: 400,
textAlign: 'center'
}
}
]
percent: total > 0 ? Math.round((d.value / total) * 100) : 0,
dotColor:
i === 0 ? "linear-gradient(90deg, #FF8DA7 0%, #D66A8D 100%)" : d.color
}));
nextTick(() => {
initChart(newVal, total);
});
}
},
{ immediate: true }
);
chart.setOption(option)
window.addEventListener('resize', () => chart.resize())
}
const initChart = (data, total) => {
// 复用已有的图表实例
if (!chart) {
chart = echarts.init(document.getElementById(props.id));
}
if (!chart) return;
const seriesData = data.map((d) => ({
name: d.name,
value: d.value,
itemStyle: { color: d.color }
}));
const option = {
tooltip: { show: false },
legend: { show: false },
series: [
{
type: "pie",
radius: ["50%", "78%"],
center: ["50%", "48%"],
startAngle: 56,
roseType: "radius",
label: { show: false },
labelLine: { show: false },
itemStyle: { borderColor: "#FFFFFF", borderWidth: 0 },
data: seriesData
}
],
graphic: [
{
type: "text",
left: "center",
top: "32%",
style: {
text: `${total}`,
fill: "#2F88FF",
fontSize: 24,
fontWeight: 700,
textAlign: "center"
}
},
{
type: "text",
left: "center",
top: "52%",
style: {
text: "总数",
fill: "#666666",
fontSize: 14,
fontWeight: 400,
textAlign: "center"
}
}
]
};
chart.setOption(option);
};
// 组件挂载时添加 resize 监听
onMounted(() => {
window.addEventListener("resize", handleResize);
});
// 组件卸载时清理资源
onBeforeUnmount(() => {
window.removeEventListener("resize", handleResize);
if (chart) {
chart.dispose();
chart = null;
}
});
</script>
<style scoped lang="scss">
.echratsBox {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 10px 0;
box-sizing: border-box;
.chart-container {
width: 100%;
height: 100%;
height: 180px;
}
.legend-container {
margin-top: 0;
display: flex;
flex-direction: column;
gap: 20px;
align-items: center;
justify-content: center;
padding: 10px 0;
box-sizing: border-box;
flex-shrink: 0;
.chart-container {
width: 100%;
height: 180px;
.legend-item {
display: flex;
align-items: center;
font-size: 14px;
color: #666666;
}
.legend-container {
margin-top: 0;
display: flex;
gap: 20px;
align-items: center;
justify-content: center;
flex-shrink: 0;
.legend-item {
display: flex;
align-items: center;
font-size: 14px;
color: #666666;
}
.dot {
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 8px;
box-shadow: 0 1px 3px rgba(0,0,0,0.08) inset;
}
.name {
margin-right: 8px;
}
.value {
margin-right: 8px;
color: #333333;
font-weight: 500;
}
.label {
margin-right: 4px;
color: #666666;
}
.percent {
color: #2F88FF;
font-weight: 600;
}
.dot {
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 8px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) inset;
}
.name {
margin-right: 8px;
}
.value {
margin-right: 8px;
color: #333333;
font-weight: 500;
}
.label {
margin-right: 4px;
color: #666666;
}
.percent {
color: #2f88ff;
font-weight: 600;
}
}
}
</style>

View File

@ -64,7 +64,7 @@ import * as MOSTY from "@/components/MyComponents/index";
import { qcckGet, qcckPost } from "@/api/qcckApi.js";
import emitter from "@/utils/eventBus.js";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { onMounted, reactive, ref, getCurrentInstance, onUnmounted } from "vue";
import { onMounted, reactive, ref, getCurrentInstance, onUnmounted, watch } from "vue";
const props = defineProps({
lx: {
type: String,
@ -114,17 +114,20 @@ const formData = ref([
depMc: "czzrdw"
},
{ label: "处置责任民警", prop: "czzrmj", type: "slot" },
// 动态字段:根据 mbzt 为 1 时显示
{
label: "常控处置措施类型",
prop: "ckczcslx",
type: "select",
options: D_YJXX_CZCSLX
options: D_YJXX_CZCSLX,
show: false // 默认隐藏
},
{
label: "常控处置措施细类",
prop: "ckczcsxl",
type: "select",
options: D_YJXX_CZSSXZ
options: D_YJXX_CZSSXZ,
show: false // 默认隐藏
},
{ label: "常控立线侦察评估", prop: "cklxzcpg", type: "input" },
@ -184,10 +187,20 @@ const rules = reactive({
const title = ref("");
onMounted(() => {
// 监听 mbzt 变化,动态显示/隐藏常控处置措施字段
watch(() => listQuery.value.mbzt, (newVal) => {
const ckczcslxField = formData.value.find(item => item.prop === 'ckczcslx');
const ckczcsxlField = formData.value.find(item => item.prop === 'ckczcsxl');
if (ckczcslxField) ckczcslxField.show = newVal === '1';
if (ckczcsxlField) ckczcsxlField.show = newVal === '1';
});
emitter.on("openFkDialog", (val) => {
showDialog.value = true;
listQuery.value = { yjid: val.id };
let url = "";
console.log(props.lx);
switch (props.lx) {
case "01":
url = "/mosty-gsxt/tbYjxx/getInfo/";

View File

@ -16,7 +16,9 @@
<div class="leftList">
<div class="hed flex just-between align center">
<span class="f14">预警列表</span>
<span style="color: #00b7ff" class="pointer" @click="seeMoreFn">查看更多</span>
<span style="color: #00b7ff" class="pointer" @click="seeMoreFn"
>查看更多</span
>
</div>
<div class="ml10 mr10 mt10">
<el-input v-model="keyword" placeholder="姓名、证件号码搜索">
@ -30,12 +32,25 @@
</template>
</el-input>
</div>
<!-- @click.stop="showDetail(item)" -->
<!-- @click.stop="showDetail(item)" -->
<ul class="listContent noScollLine mt10" v-infinite-scroll="loadList" style="overflow: auto"
v-loading="loading">
<li v-for="(item, index) in personList" :key="index" @click="markAbove(item)">
<YjItem :item="item" type="yj" :dic="{ D_BZ_YJCZZT }" @showDetail="showDetail"></YjItem>
<ul
class="listContent noScollLine mt10"
v-infinite-scroll="loadList"
style="overflow: auto"
v-loading="loading"
>
<li
v-for="(item, index) in personList"
:key="index"
@click="markAbove(item)"
>
<YjItem
:item="item"
type="yj"
:dic="{ D_BZ_YJCZZT }"
@showDetail="showDetail"
></YjItem>
</li>
<MOSTY.Empty :show="!loading && personList.length <= 0"></MOSTY.Empty>
</ul>
@ -46,21 +61,30 @@
<div class="model-commom">
<div class="hed flex align-center">预警处置统计</div>
<div class="comm-cnt" v-loading="list.YjczDate.loading">
<BarHatEcharts echartsId="qylxEcharts" :data="list.YjczDate"></BarHatEcharts>
<BarHatEcharts
echartsId="qylxEcharts"
:data="list.YjczDate"
></BarHatEcharts>
</div>
</div>
<!-- 第二部分 -->
<div class="model-commom mt10">
<div class="hed flex align-center">布控区域统计</div>
<div class="comm-cnt" v-loading="list.RylxDate.loading">
<BarHatEcharts echartsId="rylxEcharts" :data="list.RylxDate"></BarHatEcharts>
<BarHatEcharts
echartsId="rylxEcharts"
:data="list.RylxDate"
></BarHatEcharts>
</div>
</div>
<!-- 第三部分 -->
<div class="model-commom mt10">
<div class="hed flex align-center">感知源统计</div>
<div class="comm-cnt" v-loading="list.GzyDate.loading">
<BarHatEcharts echartsId="gzyEcharts" :data="list.GzyDate"></BarHatEcharts>
<BarHatEcharts
echartsId="gzyEcharts"
:data="list.GzyDate"
></BarHatEcharts>
</div>
</div>
<!-- 第四部分 -->
@ -73,9 +97,19 @@
</div>
</div>
</div>
<Information v-model="showDialog" title="发送指令" @submit='submit' @close='close'>
<SemdFqzl ref="semdFqzlRef" :itemData="itemData" @handleClose="handleClose" identification="yj"
:tacitly="tacitly" />
<Information
v-model="showDialog"
title="发送指令"
@submit="submit"
@close="close"
>
<SemdFqzl
ref="semdFqzlRef"
:itemData="itemData"
@handleClose="handleClose"
identification="yj"
:tacitly="tacitly"
/>
</Information>
<!-- 反馈按钮 -->
@ -84,8 +118,8 @@
</template>
<script setup>
import LeftDialog from '@/views/home/dialog/leftDialog.vue'
import FkDialog from './components/fkDialog.vue'
import LeftDialog from "@/views/home/dialog/leftDialog.vue";
import FkDialog from "./components/fkDialog.vue";
import * as MOSTY from "@/components/MyComponents/index";
import { qcckPost, qcckGet } from "@/api/qcckApi.js";
import GdMap from "@/components/GdMap/index.vue";
@ -96,13 +130,13 @@ import BarHatEcharts from "@/views/home/echarts/barHatEcharts.vue";
import { onMounted, reactive, ref, getCurrentInstance } from "vue";
import { useRouter } from "vue-router";
import Information from "@/views/home/model/information.vue";
import SemdFqzl from '@/components/instructionHasBeen/sendFqzl.vue'
import SemdFqzl from "@/components/instructionHasBeen/sendFqzl.vue";
const { proxy } = getCurrentInstance();
const { D_BZ_YJCZZT } = proxy.$dict('D_BZ_YJCZZT')
const router = useRouter()
const { D_BZ_YJCZZT } = proxy.$dict("D_BZ_YJCZZT");
const router = useRouter();
const listQuery = ref({});
const keyword = ref('');
const yjjbRef = ref()
const keyword = ref("");
const yjjbRef = ref();
const search = reactive({
xd: [
{ label: "吸毒", value: "10" },
@ -121,135 +155,142 @@ const search = reactive({
{ label: "酒馆", value: "20" }
]
});
const loading = ref(false)
const loadingyj = ref(false)
const loading = ref(false);
const loadingyj = ref(false);
const list = reactive({
// 预警处置统计
YjczDate: {
loading: false,
xDate: [],
list: [],
list: []
},
// 布控区域统计
RylxDate: {
loading: false,
xDate: [],
list: [],
list: []
},
// 感知源
GzyDate: {
xDate: [],
list: [],
loading: false,
},
})
loading: false
}
});
const personList = ref([]);
const pageNum = ref(1)
const total = ref(0)
const pageNum = ref(1);
const total = ref(0);
onMounted(() => {
getList()
init()
})
getList();
init();
});
// 触底加载
const loadList = () => {
if (personList.value.length == total.value) return;
pageNum.value++;
getList()
}
getList();
};
const getList = () => {
let params = { pageSize: 10, pageNum: pageNum.value,keyword:keyword.value };
let params = { pageSize: 10, pageNum: pageNum.value, keyword: keyword.value };
loading.value = true;
qcckPost(params, '/mosty-gsxt/tbYjxx/getPageList').then(res => {
loading.value = false;
let arr = res.records || [];
personList.value = pageNum.value == 1 ? arr : personList.value.concat(arr);
total.value = res.total;
}).catch(() => {
loading.value = false;
})
}
qcckPost(params, "/mosty-gsxt/tbYjxx/getPageList")
.then((res) => {
loading.value = false;
let arr = res.records || [];
personList.value =
pageNum.value == 1 ? arr : personList.value.concat(arr);
total.value = res.total;
})
.catch(() => {
loading.value = false;
});
};
const getKeyword = () => {
pageNum.value=1
getList()
}
pageNum.value = 1;
getList();
};
const init = () => {
// 预警处置统计
list.YjczDate.loading = true;
qcckGet({}, '/mosty-gsxt/tbYjxx/getYjCzztTj').then(res => {
qcckGet({}, "/mosty-gsxt/tbYjxx/getYjCzztTj").then((res) => {
list.YjczDate.loading = false;
list.YjczDate.xDate = res.map(item => item.zdmc);
list.YjczDate.list = [{
value: res.map(item => item.count),
color: ['rgba(0,244,255,1)', 'rgba(0,77,167,1)'],
hatColor: '#087df9'
}]
})
list.YjczDate.xDate = res.map((item) => item.zdmc);
list.YjczDate.list = [
{
value: res.map((item) => item.count),
color: ["rgba(0,244,255,1)", "rgba(0,77,167,1)"],
hatColor: "#087df9"
}
];
});
// 布控区域统计
list.RylxDate.loading = true;
qcckGet({}, '/mosty-gsxt/tbGsxtBkQy/getBkQytj').then(res => {
qcckGet({}, "/mosty-gsxt/tbGsxtBkQy/getBkQytj").then((res) => {
list.RylxDate.loading = false;
list.RylxDate.xDate = res.map(item => item.qymc);
list.RylxDate.list = [{
value: res.map(item => item.num),
color: ['rgba(0,244,255,1)', 'rgba(0,77,167,1)'],
hatColor: '#087df9'
}]
})
list.RylxDate.xDate = res.map((item) => item.qymc);
list.RylxDate.list = [
{
value: res.map((item) => item.num),
color: ["rgba(0,244,255,1)", "rgba(0,77,167,1)"],
hatColor: "#087df9"
}
];
});
// 感知元统计
list.GzyDate.loading = true;
qcckGet({}, '/mosty-gsxt/tbYjxx/getGzyTj').then(res => {
qcckGet({}, "/mosty-gsxt/tbYjxx/getGzyTj").then((res) => {
list.GzyDate.loading = false;
list.GzyDate.xDate = res.map(item => item.yj_gzymc);
list.GzyDate.list = [{
value: res.map(item => item.num),
color: ['rgba(0,244,255,1)', 'rgba(0,77,167,1)'],
hatColor: '#087df9'
}]
})
list.GzyDate.xDate = res.map((item) => item.yj_gzymc);
list.GzyDate.list = [
{
value: res.map((item) => item.num),
color: ["rgba(0,244,255,1)", "rgba(0,77,167,1)"],
hatColor: "#087df9"
}
];
});
// 预警级别
loadingyj.value = true;
qcckGet({}, '/mosty-gsxt/tbYjxx/getYjxxTj').then(res => {
qcckGet({}, "/mosty-gsxt/tbYjxx/getYjxxTj").then((res) => {
loadingyj.value = false;
yjjbRef.value.initCharts(res)
})
}
yjjbRef.value.initCharts(res);
});
};
const seeMoreFn = () => {
router.push('/warningList')
}
const showDialog = ref(false)
const itemData = ref()
router.push("/warningList");
};
const showDialog = ref(false);
const itemData = ref();
const showDetail = (item) => {
showDialog.value = true;
itemData.value = item
}
itemData.value = item;
};
const handleClose = () => {
showDialog.value = false;
}
const semdFqzlRef = ref()
};
const semdFqzlRef = ref();
const tacitly = {
title: 'yjBt',
instructionContent: 'yjNr'
}
title: "yjBt",
instructionContent: "yjNr"
};
const submit = () => {
semdFqzlRef.value.getsendFqzl()
}
semdFqzlRef.value.getsendFqzl();
};
const close = () => {
semdFqzlRef.value.close()
}
semdFqzlRef.value.close();
};
// 标点上图
const markAbove = (val) => {
const icon = require('@/assets/point/yj.png')
emitter.emit('setMapCenter', { location: [val.jd, val.wd], zoomLevel: 15 });
emitter.emit("addPointArea", { flag: 'home_yj_detail', icon, coords: [val] })
}
const icon = require("@/assets/point/yj.png");
emitter.emit("setMapCenter", { location: [val.jd, val.wd], zoomLevel: 18 });
emitter.emit("addPointArea", { flag: "home_yj_detail", icon, coords: [val] });
};
</script>
<style lang="scss" scoped>
@ -333,12 +374,16 @@ const markAbove = (val) => {
}
}
.hed {
height: 40px;
line-height: 40px;
padding-left: 10px;
background: linear-gradient(90deg, #124cb3 0%, rgba(18, 76, 179, 0.23) 77%, rgba(18, 76, 179, 0) 100%);
background: linear-gradient(
90deg,
#124cb3 0%,
rgba(18, 76, 179, 0.23) 77%,
rgba(18, 76, 179, 0) 100%
);
}
}
</style>

View File

@ -2,47 +2,112 @@
<div>
<!-- 搜索 -->
<div ref="searchBox" class="mt10">
<Searchs :searchArr="searchConfiger" @submit="onSearch" @reset="reset" :key="pageData.keyCount">
<Searchs
:searchArr="searchConfiger"
@submit="onSearch"
@reset="reset"
:key="pageData.keyCount"
>
<template #jfd>
<div>
<el-input v-model="queryFrom.ksfz" type="number" placeholder="开始身份分值" style="width: 130px"></el-input>
<span style="color: #333;margin: 0 4px;"></span>
<el-input v-model="queryFrom.jsfz" type="number" placeholder="结束身份分值" style="width: 130px"></el-input>
<el-input
v-model="queryFrom.ksfz"
type="number"
placeholder="开始身份分值"
style="width: 130px"
></el-input>
<span style="color: #333; margin: 0 4px"></span>
<el-input
v-model="queryFrom.jsfz"
type="number"
placeholder="结束身份分值"
style="width: 130px"
></el-input>
</div>
</template>
</Searchs>
</div>
<PageTitle :malginLeft="10" :height="35" backgroundColor="#ffff" :marginBottom="5" :marginTop="5">
<PageTitle
:malginLeft="10"
:height="35"
backgroundColor="#ffff"
:marginBottom="5"
:marginTop="5"
>
<template #left>
<el-button type="primary" @click="exportExl" size="small">导出</el-button>
<el-button type="primary" size="small" @click="handleQs">签收</el-button>
<el-button type="primary" @click="exportExl" size="small"
>导出</el-button
>
<el-button type="primary" size="small" @click="handleQs"
>签收</el-button
>
</template>
</PageTitle>
<!-- 表格 -->
<div class="tabBox tabBox_zdy" :style="{ height: (pageData.tableHeight + 40) + 'px' }">
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth" expand
@chooseData="handleChooseData">
<div
class="tabBox tabBox_zdy"
:style="{ height: pageData.tableHeight + 40 + 'px' }"
>
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
expand
@chooseData="handleChooseData"
>
<template #expand="{ props }">
<Items :row="props || {}" :dict="dict" />
</template>
<template #yjTp="{ row }">
<template v-if="!row.yjTp || row.yjTp.includes('baidu')">
<img src="@/assets/images/car.png" width="30" height="30" v-if="row.yjLx == 2" />
<img src="@/assets/images/default_male.png" width="30" height="30" v-else />
<img
src="@/assets/images/car.png"
width="30"
height="30"
v-if="row.yjLx == 2"
/>
<img
src="@/assets/images/default_male.png"
width="30"
height="30"
v-else
/>
</template>
<el-image v-else style="width: 30px; height:30px" :src="row.yjTp" :preview-src-list="[row.yjTp]"
show-progress>
<el-image
v-else
style="width: 30px; height: 30px"
:src="row.yjTp"
:preview-src-list="[row.yjTp]"
show-progress
>
<template #error>
<div class="image-slot error">
<img src="@/assets/images/car.png" width="30" height="30" v-if="row.yjLx == 2" />
<img src="@/assets/images/default_male.png" width="30" height="30" v-else />
<img
src="@/assets/images/car.png"
width="30"
height="30"
v-if="row.yjLx == 2"
/>
<img
src="@/assets/images/default_male.png"
width="30"
height="30"
v-else
/>
</div>
</template>
</el-image>
</template>
<template #yjJb="{ row }">
<DictTag :value="row.yjJb" :tag="false" :color="bqYs(row.yjJb)" :options="D_GS_SSYJ" />
<DictTag
:value="row.yjJb"
:tag="false"
:color="bqYs(row.yjJb)"
:options="D_GS_SSYJ"
/>
</template>
<template #czzt="{ row }">
<DictTag :value="row.czzt" :options="D_GSXT_YJXX_CZZT" />
@ -61,39 +126,68 @@
<template #bqdl="{ row }">
<DictTag :value="row.bqdl" :tag="false" :options="D_GS_QLZDRLX" />
</template>
<template #xsd="{ row }">
{{ row.xsd }}%
</template>
<template #xsd="{ row }"> {{ row.xsd }}% </template>
<template #controls="{ row }">
<el-link type="warning" @click="pushAssess(row)">全息档案</el-link>
<el-link type="primary" @click="handleCzjy(row)" v-if="roleCode">处置建议</el-link>
<el-link type="success" @click="handleQsFk(row, '签收')" v-if="row.czzt == '01' && permission_sfqs">签收</el-link>
<el-link type="success" @click="handleQsFk(row, '反馈')" v-if="row.czzt == '02' && permission_sfqs">反馈</el-link>
<el-link type="primary" @click="handleCzjy(row)" v-if="roleCode"
>处置建议</el-link
>
<el-link
type="success"
@click="handleQsFk(row, '签收')"
v-if="row.czzt == '01' && permission_sfqs"
>签收</el-link
>
<el-link
type="success"
@click="handleQsFk(row, '反馈')"
v-if="row.czzt == '02' && permission_sfqs"
>反馈</el-link
>
<!-- <el-link type="primary" @click="openAddFrom(row)">详情</el-link> -->
<el-link type="primary" @click="pushWarning(row)">指派</el-link>
<el-link type="primary" @click="openBox(row)">详情</el-link>
<el-link type="primary" @click="openBox(row)">详情</el-link>
</template>
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages>
<Pages
@changeNo="changeNo"
@changeSize="changeSize"
:tableHeight="pageData.tableHeight"
:pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"
></Pages>
</div>
</div>
<FkDialog @change="getList" lx="05" />
<AddFrom ref="addModelRef" :dict="{ D_GSXT_YJXX_CZZT, D_BZ_YJJB, D_GS_SSYJ }" />
<AddFrom
ref="addModelRef"
:dict="{ D_GSXT_YJXX_CZZT, D_BZ_YJJB, D_GS_SSYJ }"
/>
<!-- 处置建议 -->
<Czjy ref="czjyRef" @okSubmit="getList"></Czjy>
<ZpForm v-model="warningShow" :dataList="dataList" />
<!-- <Pagination v-model="paginationOpen" /> -->
<Pagination v-model="paginationOpen" :dataList="dataPres" :dict="{D_BZ_XB,D_BZ_YJJB,D_GS_QLZDRLX,D_GS_ZDR_RYJB,D_GS_ZDR_GJLB,D_GS_BK_CZYQ}" />
<Pagination
v-model="paginationOpen"
:dataList="dataPres"
:dict="{
D_BZ_XB,
D_BZ_YJJB,
D_GS_QLZDRLX,
D_GS_ZDR_RYJB,
D_GS_ZDR_GJLB,
D_GS_BK_CZYQ
}"
/>
</template>
<script setup>
import { IdCard } from '@/utils/validate.js'
import Czjy from './components/czjy.vue'
import { getItem, setItem } from '@/utils/storage'
import { IdCard } from "@/utils/validate.js";
import Czjy from "./components/czjy.vue";
import { getItem, setItem } from "@/utils/storage";
import PageTitle from "@/components/aboutTable/PageTitle.vue";
import Searchs from "@/components/aboutTable/Search.vue";
import MyTable from "@/components/aboutTable/MyTable.vue";
@ -104,42 +198,185 @@ import ZpForm from "@/views/backOfficeSystem/fourColorManage/warningControl/seve
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
import { qcckGet, qcckPost } from "@/api/qcckApi.js";
import emitter from "@/utils/eventBus.js";
import { holographicProfileJump } from "@/utils/tools.js"
import Items from "./item/items.vue"
import { exportExlByObj } from "@/utils/exportExcel.js"
import { getMultiDictVal } from "@/utils/dict.js"
import { holographicProfileJump } from "@/utils/tools.js";
import Items from "./item/items.vue";
import { exportExlByObj } from "@/utils/exportExcel.js";
import { getMultiDictVal } from "@/utils/dict.js";
import Pagination from "./components/particulars.vue";
const czjyRef = ref()
const czjyRef = ref();
const { proxy } = getCurrentInstance();
const searchBox = ref();
const { D_GS_QLZDRLX, D_BZ_YJLY, D_GSXT_YJXX_CZZT, D_GS_SSYJ, D_BZ_YJJB, D_BZ_BKLYS, D_BZ_XB, D_BZ_SF, D_GS_CSZT, D_GS_BKZT, D_GS_ZDR_RYJB, D_GS_ZDR_GJLB,D_GS_BK_CZYQ } = proxy.$dict('D_GS_QLZDRLX', 'D_BZ_YJLY', "D_GSXT_YJXX_CZZT", "D_GS_SSYJ", 'D_BZ_YJJB', 'D_BZ_BKLYS', 'D_BZ_XB', 'D_BZ_SF', 'D_GS_CSZT', 'D_GS_BKZT', 'D_GS_ZDR_RYJB', 'D_GS_ZDR_GJLB','D_GS_BK_CZYQ'
)
const dict = reactive({ D_GSXT_YJXX_CZZT, D_GS_SSYJ })
const {
D_GS_QLZDRLX,
D_BZ_YJLY,
D_GSXT_YJXX_CZZT,
D_GS_SSYJ,
D_BZ_YJJB,
D_BZ_BKLYS,
D_BZ_XB,
D_BZ_SF,
D_GS_CSZT,
D_GS_BKZT,
D_GS_ZDR_RYJB,
D_GS_ZDR_GJLB,
D_GS_BK_CZYQ
} = proxy.$dict(
"D_GS_QLZDRLX",
"D_BZ_YJLY",
"D_GSXT_YJXX_CZZT",
"D_GS_SSYJ",
"D_BZ_YJJB",
"D_BZ_BKLYS",
"D_BZ_XB",
"D_BZ_SF",
"D_GS_CSZT",
"D_GS_BKZT",
"D_GS_ZDR_RYJB",
"D_GS_ZDR_GJLB",
"D_GS_BK_CZYQ"
);
const dict = reactive({ D_GSXT_YJXX_CZZT, D_GS_SSYJ });
// 搜索配置
const searchConfiger = ref([
{ label: "布控开始时间", prop: 'bkkssj', showType: "date", placeholder: "请选择布控开始时间" },
{ label: "布控结束时间", prop: 'bkjssj', showType: "date", placeholder: "请选择布控结束时间" },
{ label: "预警时间", prop: 'startTime', showType: "datetimerange", placeholder: "请选择预警时间" },
{ label: "预警级别", prop: 'yjJb', showType: "select", options: D_BZ_YJJB, placeholder: "请选择预警级别", multiple: true },
{ label: "布控来源", prop: 'bkly', showType: "select", options: D_BZ_BKLYS, placeholder: "请选择布控来源" },
{ label: "布控范围", prop: 'bkfw', showType: "input", placeholder: "请输入布控范围" },
{ label: "布控单位", prop: 'gkbmdm', showType: "department", placeholder: "请选择布控单位" },
{ label: "所属单位", prop: 'ssbmdm', showType: "department", placeholder: "请选择所属单位" },
{ label: "相似度", prop: 'xsd', showType: "input", placeholder: "请输入相似度" },
{ prop: 'sfglyj', showType: "checkbox", showSelectAll: false, options: [{ label: '关联预警', value: '1' }] },
{ prop: 'sfgz', showType: "checkbox", showSelectAll: false, options: [{ label: '重点关注', value: '1' }] },
{ prop: 'sfzp', showType: "checkbox", showSelectAll: false, options: [{ label: '二次指派', value: '1' }] },
{ label: "签收状态", prop: 'czzt', showType: "select", options: D_GSXT_YJXX_CZZT },
{ label: "超时状态", prop: 'cszt', placeholder: "请选择超时状态", showType: "select", options: D_GS_CSZT },
{ label: "布控状态", prop: 'zkzt', showType: "select", options: D_GS_BKZT, placeholder: "请选择布控状态" },
{ label: "姓名", prop: 'yjRyxm', showType: "input", placeholder: "请输入姓名" },
{ label: "性别", prop: 'xbdm', showType: "select", options: D_BZ_XB, placeholder: "请选择性别" },
{ label: "开始年龄", prop: 'ksnl', placeholder: "请输入年龄", showType: "number" },
{ label: "结束年龄", prop: 'jsnl', placeholder: "请输入年龄", showType: "number" },
{ label: "跨地区", prop: 'sflksd', showType: "select", options: D_BZ_SF, placeholder: "请选择是否跨地区" },
{ label: "身份证号", prop: 'yjRysfzh', showType: "input", placeholder: "请输入身份证号" },
{ label: "预警内容", prop: 'yjNr', showType: "input", placeholder: "请输入预警内容" },
{
label: "布控开始时间",
prop: "bkkssj",
showType: "date",
placeholder: "请选择布控开始时间"
},
{
label: "布控结束时间",
prop: "bkjssj",
showType: "date",
placeholder: "请选择布控结束时间"
},
{
label: "预警时间",
prop: "startTime",
showType: "datetimerange",
placeholder: "请选择预警时间"
},
{
label: "预警级别",
prop: "yjJb",
showType: "select",
options: D_BZ_YJJB,
placeholder: "请选择预警级别",
multiple: true
},
{
label: "布控来源",
prop: "bkly",
showType: "select",
options: D_BZ_BKLYS,
placeholder: "请选择布控来源"
},
{
label: "布控范围",
prop: "bkfw",
showType: "input",
placeholder: "请输入布控范围"
},
{
label: "布控单位",
prop: "gkbmdm",
showType: "department",
placeholder: "请选择布控单位"
},
{
label: "所属单位",
prop: "ssbmdm",
showType: "department",
placeholder: "请选择所属单位"
},
{
label: "相似度",
prop: "xsd",
showType: "input",
placeholder: "请输入相似度"
},
{
prop: "sfglyj",
showType: "checkbox",
showSelectAll: false,
options: [{ label: "关联预警", value: "1" }]
},
{
prop: "sfgz",
showType: "checkbox",
showSelectAll: false,
options: [{ label: "重点关注", value: "1" }]
},
{
prop: "sfzp",
showType: "checkbox",
showSelectAll: false,
options: [{ label: "二次指派", value: "1" }]
},
{
label: "签收状态",
prop: "czzt",
showType: "select",
options: D_GSXT_YJXX_CZZT
},
{
label: "超时状态",
prop: "cszt",
placeholder: "请选择超时状态",
showType: "select",
options: D_GS_CSZT
},
{
label: "布控状态",
prop: "zkzt",
showType: "select",
options: D_GS_BKZT,
placeholder: "请选择布控状态"
},
{
label: "姓名",
prop: "yjRyxm",
showType: "input",
placeholder: "请输入姓名"
},
{
label: "性别",
prop: "xbdm",
showType: "select",
options: D_BZ_XB,
placeholder: "请选择性别"
},
{
label: "开始年龄",
prop: "ksnl",
placeholder: "请输入年龄",
showType: "number"
},
{
label: "结束年龄",
prop: "jsnl",
placeholder: "请输入年龄",
showType: "number"
},
{
label: "跨地区",
prop: "sflksd",
showType: "select",
options: D_BZ_SF,
placeholder: "请选择是否跨地区"
},
{
label: "身份证号",
prop: "yjRysfzh",
showType: "input",
placeholder: "请输入身份证号"
},
{
label: "预警内容",
prop: "yjNr",
showType: "input",
placeholder: "请输入预警内容"
}
// { label: "姓名", prop: 'xm', placeholder: "请输入姓名", showType: "input" },
// { label: "身份证号码", prop: 'sfzh', placeholder: "请输入身份证号码", showType: "input" },
// { label: "预警标签", prop: 'yjbqmc', placeholder: "请输入预警标签", showType: "input" },
@ -148,10 +385,10 @@ const searchConfiger = ref([
// { label: "积分段", prop: 'jfd', placeholder: "请选择积分段", showType: "Slot" },
// { label: "布控时间", prop: 'startTime', placeholder: "请选择布控时间", showType: "datetimerange" },
]);
const ORDIMG = 'https://89.40.7.122:38496/image'
const IMGYM = 'https://sg.lz.dsj.xz/dhimage'
const permission_sfqs = ref(false)
const roleCode = ref(false)
const ORDIMG = "https://89.40.7.122:38496/image";
const IMGYM = "https://sg.lz.dsj.xz/dhimage";
const permission_sfqs = ref(false);
const roleCode = ref(false);
const queryFrom = ref({});
@ -163,7 +400,7 @@ const pageData = reactive({
rowHieght: 61,
showSelectType: "checkBox",
loading: false,
haveControls: true,
haveControls: true
},
total: 0,
pageConfiger: {
@ -174,33 +411,70 @@ const pageData = reactive({
tableColumn: [
{ label: "状态", prop: "czzt", showSolt: true, width: 80 },
{ label: "预警时间", prop: "yjSj", showOverflowTooltip: true },
{ label: "姓名", prop: "yjRyxm" , width: 50},
{ label: "姓名", prop: "yjRyxm", width: 50 },
{ label: "身份证", prop: "yjRysfzh", showOverflowTooltip: true },
{ label: "性别", prop: "sex", showSolt: true , width: 50},
{ label: "性别", prop: "sex", showSolt: true, width: 50 },
{ label: "年龄", prop: "age", showSolt: true, width: 50 },
{ label: "预警级别", prop: "yjJb", showSolt: true , width: 50},
{ label: "布控单位", prop: "gkbmdm", showSolt: true , width: 50},
{ label: "布控来源", prop: "bkly", showSolt: true , width: 50},
{ label: "预警级别", prop: "yjJb", showSolt: true, width: 50 },
{ label: "布控单位", prop: "gkbmdm", showSolt: true, width: 50 },
{ label: "布控来源", prop: "bkly", showSolt: true, width: 50 },
{ label: "布控范围", prop: "bkfw", showSolt: true },
{ label: "布控开始时间", showOverflowTooltip: true, prop: "bkkssj", showSolt: true },
{ label: "布控结束时间", showOverflowTooltip: true, prop: "bkjssj", showSolt: true },
{ label: "处置要求", prop: "bkczyq", showSolt: true, showOverflowTooltip: true },
{
label: "布控开始时间",
showOverflowTooltip: true,
prop: "bkkssj",
showSolt: true
},
{
label: "布控结束时间",
showOverflowTooltip: true,
prop: "bkjssj",
showSolt: true
},
{
label: "处置要求",
prop: "bkczyq",
showSolt: true,
showOverflowTooltip: true
},
{ label: "相似度", prop: "xsd", showSolt: true, width: 50 },
{ label: "预警内容", prop: "yjNr", showOverflowTooltip: true, showSolt: true },
{
label: "预警内容",
prop: "yjNr",
showOverflowTooltip: true,
showSolt: true
},
{ label: "所属部门", prop: "ssbm", showOverflowTooltip: true },
{ label: "数据来源", prop: "yjLylx", showOverflowTooltip: true, showSolt: true },
{ label: "超时状态", prop: "cszt", showOverflowTooltip: true, showSolt: true, width: 50 },
{ label: "在控状态", prop: "zkzt", showOverflowTooltip: true, showSolt: true, width: 50 },
{
label: "数据来源",
prop: "yjLylx",
showOverflowTooltip: true,
showSolt: true
},
{
label: "超时状态",
prop: "cszt",
showOverflowTooltip: true,
showSolt: true,
width: 50
},
{
label: "在控状态",
prop: "zkzt",
showOverflowTooltip: true,
showSolt: true,
width: 50
}
]
});
onMounted(() => {
let str = getItem('deptId') ? getItem('deptId')[0].deptLevel : ''
permission_sfqs.value = str.startsWith('2' || '3') ? false : true;
let rols = getItem('roleList') ? getItem('roleList') : []
let obj = rols.find(item => {
return ['JS_666666', 'JS_777777', 'JS_888888'].includes(item.roleCode)
})
let str = getItem("deptId") ? getItem("deptId")[0].deptLevel : "";
permission_sfqs.value = str.startsWith("2" || "3") ? false : true;
let rols = getItem("roleList") ? getItem("roleList") : [];
let obj = rols.find((item) => {
return ["JS_666666", "JS_777777", "JS_888888"].includes(item.roleCode);
});
roleCode.value = obj ? true : false;
tabHeightFn();
@ -209,13 +483,14 @@ onMounted(() => {
const onSearch = (val) => {
queryFrom.value = {
...queryFrom.value, ...val,
startTime: val.startTime ? val.startTime[0] : '',
endTime: val.startTime ? val.startTime[1] : '',
yjJb: val.yjJb?.join(',') || '',
sfglyj: val.sfglyj?.join(',') || '',
sfgz: val.sfgz?.join(',') || '',
sfzp: val.sfzp?.join(',') || ''
...queryFrom.value,
...val,
startTime: val.startTime ? val.startTime[0] : "",
endTime: val.startTime ? val.startTime[1] : "",
yjJb: val.yjJb?.join(",") || "",
sfglyj: val.sfglyj?.join(",") || "",
sfgz: val.sfgz?.join(",") || "",
sfzp: val.sfzp?.join(",") || ""
};
pageData.pageConfiger.pageCurrent = 1;
@ -223,9 +498,9 @@ const onSearch = (val) => {
};
const reset = () => {
delete queryFrom.value.ksfz
delete queryFrom.value.jsfz
}
delete queryFrom.value.ksfz;
delete queryFrom.value.jsfz;
};
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val;
@ -242,89 +517,90 @@ const getList = () => {
let params = {
...queryFrom.value,
pageCurrent: pageData.pageConfiger.pageCurrent,
pageSize: pageData.pageConfiger.pageSize,
}
qcckPost(params, '/mosty-gsxt/tbYjxx/getBdbkPageList').then((res) => {
pageData.tableData = res?.records || []
pageData.total = res?.total || 0;
pageData.tableConfiger.loading = false;
}).catch(() => {
pageData.tableConfiger.loading = false;
});
pageSize: pageData.pageConfiger.pageSize
};
qcckPost(params, "/mosty-gsxt/tbYjxx/getBdbkPageList")
.then((res) => {
pageData.tableData = res?.records || [];
pageData.total = res?.total || 0;
pageData.tableConfiger.loading = false;
})
.catch(() => {
pageData.tableConfiger.loading = false;
});
};
// 处理签收
const handleQsFk = (val, type) => {
switch (type) {
case '签收':
proxy.$confirm("是否确定要签收?", "警告", { type: "warning" }).then(() => {
qcckPost({ id: val.id }, "/mosty-gsxt/mosty-gsxt/tbYjxx/yjqs").then(() => {
val.czzt = '02'
getList()
proxy.$message({ type: "success", message: "签收成功" });
case "签收":
proxy
.$confirm("是否确定要签收?", "警告", { type: "warning" })
.then(() => {
qcckPost({ id: val.id }, "/mosty-gsxt/tbYjxx/yjqs").then(() => {
val.czzt = "02";
getList();
proxy.$message({ type: "success", message: "签收成功" });
});
});
})
break;
case '反馈':
case '查看反馈':
case "反馈":
case "查看反馈":
emitter.emit("openFkDialog", { id: val.id, type });
break;
}
}
};
const pushAssess = (val) => {
return holographicProfileJump(val?.yjLx, val) // 全息档案跳转
}
return holographicProfileJump(val?.yjLx, val); // 全息档案跳转
};
const bqYs = (val) => {
switch (val) {
case '01':
return '#ff0202'
case '02':
return '#ff8c00'
case '03':
return '#ffff00'
case '04':
return '#0000ff'
case "01":
return "#ff0202";
case "02":
return "#ff8c00";
case "03":
return "#ffff00";
case "04":
return "#0000ff";
default:
return ''
return "";
}
}
};
// 新增
const addModelRef = ref(null)
const addModelRef = ref(null);
const openAddFrom = (row) => {
addModelRef.value.init('add', row)
}
addModelRef.value.init("add", row);
};
const handleCzjy = (row) => {
czjyRef.value.init(row)
}
czjyRef.value.init(row);
};
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 270;
pageData.tableHeight =
window.innerHeight - searchBox.value.offsetHeight - 270;
window.onresize = function () {
tabHeightFn();
};
};
// 指派
const dataList = ref(null)
const warningShow = ref(false)
const dataList = ref(null);
const warningShow = ref(false);
const pushWarning = (val) => {
warningShow.value = true;
dataList.value = val;
}
};
/** 选中项 */
const selectRows = ref([])
const selectRows = ref([]);
const handleChooseData = (val) => {
selectRows.value = val
}
selectRows.value = val;
};
const exportExl = () => {
const titleObj = {
czzt_cname: "处置状态",
@ -339,48 +615,62 @@ const exportExl = () => {
yjCs: "预警次数",
yjRysjh: "布控手机号",
yjClcph: "布控车牌号",
yjRysfzh: "身份证",
}
yjRysfzh: "身份证"
};
/** 导出【选中】的数据 (没有就全部)*/
const needArr = selectRows.value?.length > 0 ? selectRows.value : pageData.tableData
const data = needArr.map(item => {
const needArr =
selectRows.value?.length > 0 ? selectRows.value : pageData.tableData;
const data = needArr.map((item) => {
return {
...item,
nl_cname: IdCard(item.yjRysfzh, 3),
xb_cname: IdCard(item.yjRysfzh, 2),
xsd_cname: (item.xsd > 0 ? item.xsd : 0) + '%',
xsd_cname: (item.xsd > 0 ? item.xsd : 0) + "%",
yjJb_name: getMultiDictVal(item.yjJb, D_GS_SSYJ),
czzt_name: getMultiDictVal(item.czzt, D_GSXT_YJXX_CZZT),
yjJb_cname: getMultiDictVal(item.yjJb, D_BZ_YJJB),
}
})
exportExlByObj(titleObj, data, '预警布控')
}
yjJb_cname: getMultiDictVal(item.yjJb, D_BZ_YJJB)
};
});
exportExlByObj(titleObj, data, "预警布控");
};
const handleQs = () => {
if (selectRows.value?.length === 0) return proxy.$message({ type: "warning", message: "请选择要签收的预警" });
let wqs = selectRows.value.filter(item => item.czzt == '01');
if (wqs.length == 0) return proxy.$message({ type: "warning", message: "数据都已签收,请选择未签收的数据" });
let yqs = selectRows.value.filter(item => item.czzt == '02');
let texy = yqs.length > 0 ? `${yqs.length}条已签收预警数据,确认要签收${wqs.length}条未签收预警数据吗?` : '确认要签收所有预警数据吗?'
proxy.$confirm(texy, "警告", { type: "warning" }).then(() => {
let ids = wqs.map(item => item.id)
qcckPost({ ids }, '/mosty-gsxt/tbYjxx/batchQs').then(() => {
proxy.$message({ type: "success", message: "成功" });
getList();
}).catch(() => {
proxy.$message({ type: "error", message: "失败" });
if (selectRows.value?.length === 0)
return proxy.$message({ type: "warning", message: "请选择要签收的预警" });
let wqs = selectRows.value.filter((item) => item.czzt == "01");
if (wqs.length == 0)
return proxy.$message({
type: "warning",
message: "数据都已签收,请选择未签收的数据"
});
}).catch(() => { });
}
let yqs = selectRows.value.filter((item) => item.czzt == "02");
let texy =
yqs.length > 0
? `${yqs.length}条已签收预警数据,确认要签收${wqs.length}条未签收预警数据吗?`
: "确认要签收所有预警数据吗?";
proxy
.$confirm(texy, "警告", { type: "warning" })
.then(() => {
let ids = wqs.map((item) => item.id);
qcckPost({ ids }, "/mosty-gsxt/tbYjxx/batchQs")
.then(() => {
proxy.$message({ type: "success", message: "成功" });
getList();
})
.catch(() => {
proxy.$message({ type: "error", message: "失败" });
});
})
.catch(() => {});
};
// 详情
const paginationOpen = ref(false)
const dataPres = ref({})
const paginationOpen = ref(false);
const dataPres = ref({});
const openBox = (val) => {
paginationOpen.value = true
dataPres.value = val
}
paginationOpen.value = true;
dataPres.value = val;
};
</script>
<style lang="scss" scoped>

View File

@ -479,13 +479,11 @@ const handleQsFk = (val, type) => {
proxy
.$confirm("是否确定要签收?", "警告", { type: "warning" })
.then(() => {
qcckPost({ id: val.id }, "/mosty-gsxt/mosty-gsxt/tbYjxx/yjqs").then(
() => {
val.czzt = "02";
getList();
proxy.$message({ type: "success", message: "签收成功" });
}
);
qcckPost({ id: val.id }, "/mosty-gsxt/tbYjxx/yjqs").then(() => {
val.czzt = "02";
getList();
proxy.$message({ type: "success", message: "签收成功" });
});
});
break;
case "反馈":

View File

@ -8,10 +8,22 @@
@search="onSearch"
>
<template #but>
<el-button type="primary" @click="exportExl" size="small">导出</el-button>
<el-button type="primary" :loading="btnLoading" size="small" @click="exportExcelAll">筛选导出</el-button>
<el-button type="primary" size="small" @click="handleQs">签收</el-button>
<el-button type="primary" size="small" @click="handleRelatedWarning">关联预警</el-button>
<el-button type="primary" @click="exportExl" size="small"
>导出</el-button
>
<el-button
type="primary"
:loading="btnLoading"
size="small"
@click="exportExcelAll"
>筛选导出</el-button
>
<el-button type="primary" size="small" @click="handleQs"
>签收</el-button
>
<el-button type="primary" size="small" @click="handleRelatedWarning"
>关联预警</el-button
>
</template>
</QueryFormPanel>
</div>
@ -56,7 +68,9 @@
<template #bksj="{ row }">
{{ row.bkkssj && row.bkjssj ? `${row.bkkssj} - ${row.bkjssj}` : "" }}
</template>
<template #xsd="{ row }"> {{ row.xsd }}% </template>
<template #xsd="{ row }">
{{ row.xsd ? row.xsd + "%" : "" }}
</template>
<template #cszt="{ row }">
<DictTag :value="row.cszt" :tag="false" :options="D_GS_CSZT" />
</template>
@ -79,10 +93,7 @@
v-if="row.czzt == '01'"
>签收</span
>
<span
class="success"
@click="handleQsFk(row, '反馈')"
v-else-if="row.czzt == '02'"
<span class="success" @click="handleQsFk(row, '反馈')" v-else
>反馈</span
>
<!-- <span type="success" @click="handleQsFk(row, '查看反馈')" v-else>查看反馈</span> -->
@ -381,14 +392,15 @@ const getList = () => {
};
delete params.datetime;
delete params.bksj;
qcckPost(params, "/mosty-gsxt/tbYjxx/getPageList").then((res) => {
pageData.tableData = res?.records || [];
pageData.total = res?.total || 0;
pageData.tableConfiger.loading = false;
})
.catch(() => {
pageData.tableConfiger.loading = false;
});
qcckPost(params, "/mosty-gsxt/tbYjxx/getPageList")
.then((res) => {
pageData.tableData = res?.records || [];
pageData.total = res?.total || 0;
pageData.tableConfiger.loading = false;
})
.catch(() => {
pageData.tableConfiger.loading = false;
});
};
// 处理签收
@ -398,13 +410,11 @@ const handleQsFk = (val, type) => {
proxy
.$confirm("是否确定要签收?", "警告", { type: "warning" })
.then(() => {
qcckPost({ id: val.id }, "/mosty-gsxt/mosty-gsxt/tbYjxx/yjqs").then(
() => {
val.czzt = "02";
getList();
proxy.$message({ type: "success", message: "签收成功" });
}
);
qcckPost({ id: val.id }, "/mosty-gsxt/tbYjxx/yjqs").then(() => {
val.czzt = "02";
getList();
proxy.$message({ type: "success", message: "签收成功" });
});
});
break;
case "反馈":
@ -465,31 +475,32 @@ const handleChooseData = (val) => {
selectRows.value = val;
};
const exportExl = () => {
/** 导出【选中】的数据 (没有就全部)*/
const needArr = selectRows.value?.length > 0 ? selectRows.value : pageData.tableData;
handleExportData(needArr)
const needArr =
selectRows.value?.length > 0 ? selectRows.value : pageData.tableData;
handleExportData(needArr);
};
const exportExcelAll = () =>{
const exportExcelAll = () => {
btnLoading.value = true;
let params = { ...queryFrom.value,yjlb:'01' }
params.startTime = queryFrom.value.datetime ? queryFrom.value.datetime[0] : "";
let params = { ...queryFrom.value, yjlb: "01" };
params.startTime = queryFrom.value.datetime
? queryFrom.value.datetime[0]
: "";
params.endTime = queryFrom.value.datetime ? queryFrom.value.datetime[1] : "";
params.bkkssj = queryFrom.value.bksj ? queryFrom.value.bksj[0] : "";
params.bkjssj = queryFrom.value.bksj ? queryFrom.value.bksj[1] : "";
params.yjJb = queryFrom.value.yjJb ? queryFrom.value.yjJb.join(',') : "";
params.yjJb = queryFrom.value.yjJb ? queryFrom.value.yjJb.join(",") : "";
delete params.datetime;
delete params.bksj;
qcckGet(params,'/mosty-gsxt/tbYjxx/getList').then(res=>{
qcckGet(params, "/mosty-gsxt/tbYjxx/getList").then((res) => {
btnLoading.value = false;
handleExportData(res || []);
})
}
});
};
// 导出处理数据
const handleExportData = (arr) =>{
const handleExportData = (arr) => {
const titleObj = {
index: "序号",
czzt_name: "处置状态",
@ -525,9 +536,7 @@ const handleExportData = (arr) =>{
};
});
exportExlByObj(titleObj, data, "预警布控");
}
};
const handleQs = () => {
if (selectRows.value?.length === 0)

View File

@ -0,0 +1,175 @@
<template>
<el-dialog
:draggable="true"
v-model="showDialog"
:append-to-body="true"
:destroy-on-close="true"
:title="title"
:close-on-click-modal="false"
width="700px"
>
<FormMessage
v-model="listQuery"
:formList="formData"
labelWidth="150px"
ref="elform"
:rules="rules"
>
<template #fkrxm>
<MOSTY.Other
width="100%"
@click="handleChoose('fkrxm')"
clearable
v-model="listQuery.fkrxm"
placeholder="请选择反馈人"
:readonly="true"
/>
</template>
</FormMessage>
<template #footer>
<div class="flex just-center">
<el-button @click="close">取消</el-button>
<el-button type="primary" @click="submitForm" :loading="loading"
>确认</el-button
>
</div>
</template>
</el-dialog>
<ChooseUser
v-model="chooseUserVisible"
v-if="chooseUserVisible"
@choosedUsers="handleUserSelected"
:Single="true"
/>
</template>
<script setup>
import { qcckPost } from "@/api/qcckApi.js";
import emitter from "@/utils/eventBus.js";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import ChooseUser from "@/components/ChooseList/ChooseUser/index.vue";
import * as MOSTY from "@/components/MyComponents/index";
import { onMounted, reactive, ref, getCurrentInstance, onUnmounted } from "vue";
const emit = defineEmits(["change"]);
const { proxy } = getCurrentInstance();
const { D_BZ_SF, D_ZB_CZCS, D_ZB_CZJG } = proxy.$dict(
"D_BZ_SF",
"D_ZB_CZCS",
"D_ZB_CZJG"
);
const elform = ref();
const showDialog = ref(false);
const loading = ref(false);
const chooseUserVisible = ref(false);
const choosetype = ref("");
const title = ref("反馈");
const listQuery = ref({});
const rowData = ref({});
const formData = ref([
{ label: "处置时间", prop: "czsj", type: "datetime" },
{
label: "处置结果",
prop: "czjg",
type: "select",
options: D_ZB_CZJG
},
{
label: "采取措施",
prop: "cqcs",
type: "select",
options: D_ZB_CZCS
},
{
label: "是否下发预警信息",
prop: "sfxfyj",
type: "select",
options: D_BZ_SF
},
{ label: "反馈人姓名", prop: "fkrxm", type: "slot" },
{ label: "反馈人身份证号", prop: "fkrsfzh", type: "input" },
{ label: "反馈人联系电话", prop: "fkrlxdh", type: "input" },
{ label: "反馈人单位名称", prop: "fkrdwmc", type: "input" },
{
label: "反馈人单位代码",
prop: "fkrdw",
depMc: "fkrdwmc",
type: "department"
},
{ label: "反馈人单位联系电话", prop: "fkrdwlxdh", type: "input" },
{ label: "处置经过描述", prop: "czjgms", type: "textarea", width: "100%" },
{ label: "处置备注", prop: "czbz", type: "textarea", width: "100%" },
{ label: "备注", prop: "bz", type: "textarea", width: "100%" }
]);
const rules = reactive({
czjg: [{ required: true, message: "请选择处置结果", trigger: "change" }],
czsj: [{ required: true, message: "请选择处置时间", trigger: "change" }],
cqcs: [{ required: true, message: "请选择采取措施", trigger: "change" }]
});
onMounted(() => {
emitter.on("openZbFkDialog", (val) => {
showDialog.value = true;
title.value = val.type || "反馈";
rowData.value = val.row || {};
listQuery.value = {
yjid: val.row.id
};
});
});
const handleChoose = (type) => {
chooseUserVisible.value = true;
choosetype.value = type;
};
// 选取角色
const handleUserSelected = (val) => {
listQuery.value.fkrxm = val[0].userName;
listQuery.value.fkrsfzh = val[0].idEntityCard;
listQuery.value.fkrlxdh = val[0].phone || val[0].mobile || "";
listQuery.value.fkrdwmc = val[0].deptName || "";
};
const submitForm = () => {
elform.value.submit((val) => {
loading.value = true;
const prome = {
...listQuery.value
};
qcckPost(prome, "/mosty-gsxt/tbYjxx/swyjfk")
.then(() => {
loading.value = false;
proxy.$message({ type: "success", message: "反馈成功" });
emit("change");
close();
})
.catch(() => {
loading.value = false;
});
});
};
const close = () => {
elform.value.reset();
listQuery.value = {};
showDialog.value = false;
};
onUnmounted(() => {
emitter.off("openZbFkDialog");
});
</script>
<style lang="scss" scoped>
.el-form {
max-height: 60vh;
overflow: hidden;
overflow-y: auto;
}
</style>

View File

@ -12,22 +12,64 @@
>
<template #yjCs>
<div>
<el-input v-model="queryFrom.yjkscs" type="number" placeholder="开始次数" style="width: 130px" clearable :min="0" ></el-input>
<el-input v-model="queryFrom.yjjscs" type="number" placeholder="结束次数" style="width: 130px" clearable :min="0"></el-input>
<el-input
v-model="queryFrom.yjkscs"
type="number"
placeholder="开始次数"
style="width: 130px"
clearable
:min="0"
></el-input>
<el-input
v-model="queryFrom.yjjscs"
type="number"
placeholder="结束次数"
style="width: 130px"
clearable
:min="0"
></el-input>
</div>
</template>
<template #nl>
<div>
<el-input v-model="queryFrom.ksnl" type="number" placeholder="开始年龄" style="width: 130px" clearable :min="0" ></el-input>
<el-input v-model="queryFrom.jsnl" type="number" placeholder="结束年龄" style="width: 130px" clearable :min="0" ></el-input>
<el-input
v-model="queryFrom.ksnl"
type="number"
placeholder="开始年龄"
style="width: 130px"
clearable
:min="0"
></el-input>
<el-input
v-model="queryFrom.jsnl"
type="number"
placeholder="结束年龄"
style="width: 130px"
clearable
:min="0"
></el-input>
</div>
</template>
<template #but>
<el-button type="primary" size="small" @click="exportExl">批量导出</el-button>
<el-button type="primary" :loading="btnLoading" size="small" @click="exportExcelAll">筛选导出</el-button>
<el-button type="primary" size="small" @click="handleQs">批量签收</el-button>
<el-button type="primary" size="small" @click="handleQs">批量分析</el-button>
<el-button type="primary" size="small" @click="countPeople">计算人数</el-button>
<el-button type="primary" size="small" @click="exportExl"
>批量导出</el-button
>
<el-button
type="primary"
:loading="btnLoading"
size="small"
@click="exportExcelAll"
>筛选导出</el-button
>
<el-button type="primary" size="small" @click="handleQs"
>批量签收</el-button
>
<el-button type="primary" size="small" @click="handleQs"
>批量分析</el-button
>
<el-button type="primary" size="small" @click="countPeople"
>计算人数</el-button
>
</template>
</QueryFormPanel>
</div>
@ -50,14 +92,24 @@
@selectionChange="handleChooseData"
>
<template #status="{ row }">
<DictTag :value="row.czzt" :color="row.czzt === '01' ? '#ff2424' : '#1d72e8'" :tag="false" :options="D_GSXT_YJXX_CZZT"/>
<DictTag
:value="row.czzt"
:color="row.czzt === '01' ? '#ff2424' : '#1d72e8'"
:tag="false"
:options="D_GSXT_YJXX_CZZT"
/>
</template>
<template #xbdm="{ row }">
<DictTag :value="row.xbdm" :tag="false" :options="D_BZ_XB" />
</template>
<template #yjJb="{ row }">
<div :style="{ 'background-color': bqYs(row.yjJb) }">
<DictTag :value="row.yjJb" color="#fff" :tag="false" :options="D_BZ_YJJB"/>
<DictTag
:value="row.yjJb"
color="#fff"
:tag="false"
:options="D_BZ_YJJB"
/>
</div>
</template>
<template #bqdl="{ row }">
@ -71,12 +123,28 @@
</template>
<template #operation="{ row }">
<div style="display: flex; justify-content: space-between">
<span class="primary" @click="handleQsFk(row)" v-if="row.czzt == '01'" >签收</span>
<span class="primary" @click="handleQsFk(row, '反馈')" v-else-if="row.czzt == '02'" >反馈</span>
<span
class="primary"
@click="handleQsFk(row)"
v-if="row.czzt == '01'"
>签收</span
>
<span class="primary" @click="handleQsFk(row, '反馈')" v-else
>反馈</span
>
<span class="primary" @click="particularsOpen(row)">详情</span>
<span class="warning" @click="pushWarning(row)">指派</span>
<span class="warning" @click="failWarning(row)" v-if="row.sfbc != '1'">报错</span>
<span @click="payAttention(row)" :class="row.sfgz == 0 ? 'primary' : 'danger'">{{ row.sfgz == 0 ? "关注" : "取消关注" }}</span>
<span
class="warning"
@click="failWarning(row)"
v-if="row.sfbc != '1'"
>报错</span
>
<span
@click="payAttention(row)"
:class="row.sfgz == 0 ? 'primary' : 'danger'"
>{{ row.sfgz == 0 ? "关注" : "取消关注" }}</span
>
</div>
</template>
</WarnDataTable>
@ -98,7 +166,8 @@
:dict="{ D_BZ_XB, D_BZ_YJJB, D_GS_QLZDRLX, D_GS_ZDR_RYJB, D_GS_ZDR_GJLB }"
/>
<peopleConut v-model="searchOpen" :dataConut="dataConut" />
<FkDialog @change="getList" lx="03" />
<FkDialog @change="getList" lx="05" />
<ZbFkDialog @change="getList" />
</template>
<script setup>
@ -107,10 +176,8 @@ import { exportExlByObj } from "@/utils/exportExcel.js";
import ZpForm from "./zpForm.vue";
import { bqYs } from "@/utils/tools.js";
import Particulars from "./particulars.vue";
import Search from "@/components/aboutTable/Search.vue";
import WarnDataTable from "@/views/backOfficeSystem/ces/components/WarnDataTable.vue";
import QueryFormPanel from "@/views/backOfficeSystem/ces/components/QueryFormPanel.vue";
import PageTitle from "@/components/aboutTable/PageTitle.vue";
// import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import { qcckGet, qcckPost } from "@/api/qcckApi.js";
@ -118,6 +185,7 @@ import emitter from "@/utils/eventBus.js";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
import PeopleConut from "./peopleConut.vue";
import FkDialog from "@/views/backOfficeSystem/fourColorManage/warningControl/centerHome/components/fkDialog.vue";
import ZbFkDialog from "./ZbFkDialog.vue";
const { proxy } = getCurrentInstance();
const {
D_BZ_YJLY,
@ -241,7 +309,7 @@ const searchConfiger = ref([
placeholder: "请输入人员细类"
}
]);
const btnLoading = ref(false)
const btnLoading = ref(false);
const queryFrom = ref({});
const pageData = reactive({
tableData: [], //表格数据
@ -286,7 +354,7 @@ onMounted(() => {
// 搜索
const onSearch = (val) => {
queryFrom.value = { ...val};
queryFrom.value = { ...val };
queryFrom.value.startTime = val.dateTime ? val.dateTime[0] : "";
queryFrom.value.endTime = val.dateTime ? val.dateTime[1] : "";
// queryFrom.value.sfglyj = val.sfglyj?.join(',') || ''
@ -311,7 +379,7 @@ const getList = () => {
pageSize: pageData.pageConfiger.pageSize,
yjlb: "03"
};
promes.yjJb = queryFrom.value.yjJb?.join(",") || ""
promes.yjJb = queryFrom.value.yjJb?.join(",") || "";
delete promes.dateTime;
delete promes.times;
@ -349,28 +417,30 @@ const handleChooseData = (val) => {
selectRows.value = val;
};
const exportExl = () => {
/** 导出【选中】的数据 (没有就全部)*/
const needArr = selectRows.value?.length > 0 ? selectRows.value : pageData.tableData;
handleExportData(needArr)
const needArr =
selectRows.value?.length > 0 ? selectRows.value : pageData.tableData;
handleExportData(needArr);
};
const exportExcelAll = () =>{
const exportExcelAll = () => {
btnLoading.value = true;
let params = { ...queryFrom.value,yjlb:'03' }
params.startTime = queryFrom.value.dateTime ? queryFrom.value.dateTime[0] : "";
let params = { ...queryFrom.value, yjlb: "03" };
params.startTime = queryFrom.value.dateTime
? queryFrom.value.dateTime[0]
: "";
params.endTime = queryFrom.value.dateTime ? queryFrom.value.dateTime[1] : "";
params.yjJb = queryFrom.value.yjJb ? queryFrom.value.yjJb.join(',') : "";
params.yjJb = queryFrom.value.yjJb ? queryFrom.value.yjJb.join(",") : "";
delete params.yjCs;
delete params.dateTime;
qcckGet(params,'/mosty-gsxt/tbYjxx/getList').then(res=>{
qcckGet(params, "/mosty-gsxt/tbYjxx/getList").then((res) => {
btnLoading.value = false;
handleExportData(res || []);
})
}
});
};
// 导出处理数据
const handleExportData = (arr) =>{
const handleExportData = (arr) => {
const titleObj = {
index: "序号",
czzt_name: "预警状态",
@ -401,8 +471,7 @@ const handleExportData = (arr) =>{
};
});
exportExlByObj(titleObj, data, "政保预警");
}
};
// 批量签收
const handleQs = () => {
@ -445,7 +514,8 @@ const particularsOpen = (row) => {
// 单条签收
const handleQsFk = (row, type) => {
if (type === "反馈") {
emitter.emit("openFkDialog", { id: row.id, type });
// 使用政保专用的反馈弹窗
emitter.emit("openZbFkDialog", { id: row.id, type, row });
} else {
if (row.czzt == "02")
return proxy.$message({

View File

@ -54,7 +54,11 @@
<el-button type="primary" size="small" @click="exportExl"
>批量导出</el-button
>
<el-button type="primary" :loading="btnLoading" size="small" @click="exportExcelAll"
<el-button
type="primary"
:loading="btnLoading"
size="small"
@click="exportExcelAll"
>筛选导出</el-button
>
<el-button type="primary" size="small" @click="handleQs"
@ -134,10 +138,7 @@
v-if="row.czzt == '01'"
>签收</span
>
<span
class="success"
@click="handleQsFk(row, '反馈')"
v-else-if="row.czzt == '02'"
<span class="success" v-else @click="handleQsFk(row, '反馈')"
>反馈</span
>
<span class="primary" @click="particularsOpen(row)">详情</span>
@ -412,7 +413,7 @@ const getList = () => {
pageCurrent: pageData.pageConfiger.pageCurrent,
pageSize: pageData.pageConfiger.pageSize
};
promes.yjJb = queryFrom.value.yjJb ? queryFrom.value.yjJb.join(',') : "";
promes.yjJb = queryFrom.value.yjJb ? queryFrom.value.yjJb.join(",") : "";
delete promes.times;
delete promes.dateTime;
qcckPost(promes, "/mosty-gsxt/tbYjxx/getQlzdrPageList")
@ -426,23 +427,25 @@ const getList = () => {
});
};
const btnLoading = ref(false)
const exportExcelAll = () =>{
const btnLoading = ref(false);
const exportExcelAll = () => {
btnLoading.value = true;
let params = { ...queryFrom.value,yjlb:'02' }
params.startTime = queryFrom.value.dateTime ? queryFrom.value.dateTime[0] : "";
let params = { ...queryFrom.value, yjlb: "02" };
params.startTime = queryFrom.value.dateTime
? queryFrom.value.dateTime[0]
: "";
params.endTime = queryFrom.value.dateTime ? queryFrom.value.dateTime[1] : "";
params.yjJb = queryFrom.value.yjJb ? queryFrom.value.yjJb.join(',') : "";
params.yjJb = queryFrom.value.yjJb ? queryFrom.value.yjJb.join(",") : "";
delete params.yjCs;
delete params.dateTime;
qcckGet(params,'/mosty-gsxt/tbYjxx/getList').then(res=>{
qcckGet(params, "/mosty-gsxt/tbYjxx/getList").then((res) => {
btnLoading.value = false;
handleExportData(res || []);
})
}
});
};
// 导出处理数据
const handleExportData = (arr) =>{
const handleExportData = (arr) => {
const titleObj = {
index: "序号",
czzt_name: "预警状态",
@ -477,9 +480,7 @@ const handleExportData = (arr) =>{
};
});
exportExlByObj(titleObj, data, "七类重点");
}
};
const pushWarning = (val) => {
warningShow.value = true;
@ -488,12 +489,14 @@ const pushWarning = (val) => {
const failWarning = (val) => {
let ids = [val.id];
qcckPost({ ids }, "/mosty-gsxt/tbYjxx/yjbc").then((res) => {
proxy.$message({ type: "success", message: "成功" });
getList();
}).catch(() => {
proxy.$message({ type: "error", message: "失败" });
});
qcckPost({ ids }, "/mosty-gsxt/tbYjxx/yjbc")
.then((res) => {
proxy.$message({ type: "success", message: "成功" });
getList();
})
.catch(() => {
proxy.$message({ type: "error", message: "失败" });
});
};
// 处理签收
@ -513,7 +516,8 @@ const handleChooseData = (val) => {
};
const exportExl = () => {
/** 导出【选中】的数据 (没有就全部)*/
const needArr = selectRows.value?.length > 0 ? selectRows.value : pageData.tableData;
const needArr =
selectRows.value?.length > 0 ? selectRows.value : pageData.tableData;
handleExportData(needArr);
};
// 批量签收
@ -623,7 +627,6 @@ const handleRelatedWarning = () => {
selectDataVisible.value = true;
};
// 确认关联预警
const handleSelectConfirm = (selectedData) => {
console.log("关联预警数据:", selectedData);

View File

@ -3,18 +3,35 @@
<div class="head_box">
<span class="title">{{ title }}事件</span>
<div>
<el-button type="primary" size="small" v-if="!disabled" :loading="loading" @click="submit">保存</el-button>
<el-button
type="primary"
size="small"
v-if="!disabled"
:loading="loading"
@click="submit"
>保存</el-button
>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<FormMessage ref="elform" :disabled="disabled" v-model="listQuery" :formList="formData" labelWidth="100px"
:rules="rules">
<FormMessage
ref="elform"
:disabled="disabled"
v-model="listQuery"
:formList="formData"
labelWidth="100px"
:rules="rules"
>
</FormMessage>
<div style="display: flex;justify-content: flex-end;margin-bottom: 10px;">
<el-button type="primary" style="margin-left: 10px;" @click="drawShape()">选择坐标</el-button>
<div
style="display: flex; justify-content: flex-end; margin-bottom: 10px"
>
<el-button type="primary" style="margin-left: 10px" @click="drawShape()"
>选择坐标</el-button
>
</div>
<div style="height: 400px;width: 100%; position: absolute;">
<div style="height: 400px; width: 100%; position: absolute">
<GdMap :mapid="'map-92'"></GdMap>
</div>
</div>
@ -25,7 +42,16 @@
import * as rule from "@/utils/rules.js";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
import { ref, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, watch, onUnmounted } from "vue";
import {
ref,
defineExpose,
reactive,
onMounted,
defineEmits,
getCurrentInstance,
watch,
onUnmounted
} from "vue";
import GdMap from "@/components/GdMap/index.vue";
import emitter from "@/utils/eventBus.js";
const emit = defineEmits(["getList"]);
@ -43,29 +69,33 @@ const rules = reactive({
sjbt: [{ required: true, message: "请输入事件标题", trigger: "blur" }],
shms: [{ required: true, message: "请输入事件描述", trigger: "blur" }],
jd: [{ required: true, message: "请输入经度", trigger: "blur" }],
wd: [{ required: true, message: "请输入纬度", trigger: "blur" }],
wd: [{ required: true, message: "请输入纬度", trigger: "blur" }]
});
const listQuery = ref({
bqdlList: [],
bqxlList: [],
bqxlList: []
}); //表单
const formData = ref();
watch(() => props.dict.D_BZ_ZDSJCZJG, (newVal) => {
if (newVal) {
formData.value = [
{ label: "事件标题", prop: "sjbt", type: "input" },
// { label: "事件描述", prop: "shms", type: "input" },
{ label: "事件性质", prop: "sjxz", type: "input" },
{ label: "事件地址", prop: "sjdz", type: "input" },
// { label: "事件状态", prop: "sjzt", type: "select", options: props.dict.D_BZ_ZDSJCZJG },
{ label: "事发时间", prop: "fssj", type: "datetime" },
{ label: "事件描述", prop: "shms", type: "textarea", width: "100%" },
{ label: "处置结果", prop: "czjg", type: "textarea", width: "100%" },
{ label: "经度", prop: "jd", type: "input", disabled: true },
{ label: "纬度", prop: "wd", type: "input", disabled: true },
]
}
}, { deep: true });
watch(
() => props.dict.D_BZ_ZDSJCZJG,
(newVal) => {
if (newVal) {
formData.value = [
{ label: "事件标题", prop: "sjbt", type: "input" },
// { label: "事件描述", prop: "shms", type: "input" },
{ label: "事件性质", prop: "sjxz", type: "input" },
{ label: "事件地址", prop: "sjdz", type: "input" },
// { label: "事件状态", prop: "sjzt", type: "select", options: props.dict.D_BZ_ZDSJCZJG },
{ label: "事发时间", prop: "fssj", type: "datetime" },
{ label: "事件描述", prop: "shms", type: "textarea", width: "100%" },
{ label: "处置结果", prop: "czjg", type: "textarea", width: "100%" },
{ label: "经度", prop: "jd", type: "input", disabled: true },
{ label: "纬度", prop: "wd", type: "input", disabled: true }
];
}
},
{ deep: true }
);
const loading = ref(false);
const elform = ref();
const title = ref("");
@ -73,13 +103,17 @@ const disabled = ref(false);
// 初始化数据
const init = (type, row) => {
title.value = type == 'edit' ? '编辑' : type == 'add' ? '新增' : '详情'
title.value = type == "edit" ? "编辑" : type == "add" ? "新增" : "详情";
dialogForm.value = true;
if (type != 'add') {
if (type != "add") {
listQuery.value = row;
emitter.emit('addPointArea', { coords: [{ jd: row.jd, wd: row.wd }], icon: require("@/assets/point/zl.png"), flag: "zdsj" })
emitter.emit("addPointArea", {
coords: [{ jd: row.jd, wd: row.wd }],
icon: require("@/assets/point/zl.png"),
flag: "zdsj"
});
}
if (type == 'detail') {
if (type == "detail") {
disabled.value = true;
}
};
@ -87,18 +121,23 @@ const init = (type, row) => {
const submit = () => {
const promes = {
...listQuery.value
}
};
elform.value.submit((data) => {
let url = title.value == "新增" ? "/mosty-gsxt/zdsj/addEntity" : "/mosty-gsxt/zdsj/updateEntity";
let url =
title.value == "新增"
? "/mosty-gsxt/zdsj/addEntity"
: "/mosty-gsxt/zdsj/updateEntity";
loading.value = true;
qcckPost(promes, url).then(() => {
loading.value = false;
proxy.$message({ type: "success", message: title.value + "成功" });
emit("getList");
close();
}).catch(() => {
loading.value = false;
});
qcckPost(promes, url)
.then(() => {
loading.value = false;
proxy.$message({ type: "success", message: title.value + "成功" });
emit("getList");
close();
})
.catch(() => {
loading.value = false;
});
});
};
@ -109,7 +148,6 @@ const close = () => {
loading.value = false;
};
onMounted(() => {
emitter.on("coordString", coordStringHandler);
});
@ -117,8 +155,15 @@ const coordStringHandler = (res) => {
if (res.type === "point") {
listQuery.value.jd = res.coord[0];
listQuery.value.wd = res.coord[1];
emitter.emit('addPointArea', { coords: [{ jd: res.coord[0], wd: res.coord[1] }], icon: require("@/assets/point/zl.png"), flag: "zdsj" })
emitter.emit('setMapCenter', { location: [res.coord[0], res.coord[1]], zoomLevel: 15 })
emitter.emit("addPointArea", {
coords: [{ jd: res.coord[0], wd: res.coord[1] }],
icon: require("@/assets/point/zl.png"),
flag: "zdsj"
});
emitter.emit("setMapCenter", {
location: [res.coord[0], res.coord[1]],
zoomLevel: 15
});
}
};
const drawShape = () => {
@ -127,10 +172,10 @@ const drawShape = () => {
type: "point",
isclear: true
});
}
};
onUnmounted(() => {
emitter.off("coordString", coordStringHandler);
})
});
defineExpose({ init });
</script>
@ -138,7 +183,7 @@ defineExpose({ init });
@import "~@/assets/css/layout.scss";
@import "~@/assets/css/element-plus.scss";
::v-deep .el-tabs--card>.el-tabs__header .el-tabs__item.is-active {
::v-deep .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
color: #0072ff;
background: rgba(0, 114, 255, 0.3);
}
@ -158,7 +203,6 @@ defineExpose({ init });
.coolor {
color: #d3d3d3;
}
}
.zdy-taf {