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,2 +0,0 @@
<!-- 拖拽组件 -->
// npm install vue-draggable-plus --save

View File

@ -241,6 +241,10 @@
align-items: center;
}
.vam {
vertical-align: middle;
}
/**********文本省略***********/
.nowrap {
white-space: nowrap;
@ -287,6 +291,10 @@
margin-top: 10px;
}
.mb10 {
margin-bottom: 10px;
}
/**********字体大小和边距***********/
@for $i from 1 through 100 {
.f#{$i} {
@ -345,7 +353,7 @@
}
.ww#{$i} {
width: #{$i}+"%";
width: #{$i * 1%};
}
.hh#{$i} {

View File

@ -1,8 +1,13 @@
<template>
<div :id="mapid" class="map"></div>
<div class="changeMap_box" v-if="props.isShow">
<el-switch v-model="conditionRoute" @change="handleSwitch" active-text="打开路况" inactive-text="关闭路况"
style="--el-switch-color: #13ce66; --el-switch-off-color: #ff4949" />
<el-switch
v-model="conditionRoute"
@change="handleSwitch"
active-text="打开路况"
inactive-text="关闭路况"
style="--el-switch-color: #13ce66; --el-switch-off-color: #ff4949"
/>
<!-- <el-carousel type="card" height="75px" :autoplay="false" indicator-position="none" :initial-index="3" @change="onMapImageChange">
<el-carousel-item>
<div class="mapImageItem">
@ -31,7 +36,14 @@
</el-carousel> -->
<!-- 地图缩放 -->
<div class="zoomTargetBox">
<el-input-number :min="7" :max="18" v-model="zoomTarget" :step="1" step-strictly @change="handleZoom"></el-input-number>
<el-input-number
:min="7"
:max="18"
v-model="zoomTarget"
:step="1"
step-strictly
@change="handleZoom"
></el-input-number>
</div>
</div>
</template>
@ -74,7 +86,7 @@ const props = defineProps({
});
try {
const userInfo = getItem("deptId")[0].deptCode;
} catch (error) { }
} catch (error) {}
let map;
let mapLayer;
let mapLayer1;
@ -95,13 +107,12 @@ onMounted(() => {
zoom: 15
},
minZoom: 5,
maxZoom: 18,
maxZoom: 20
});
window.map = map;
map.mapboxGLMap.on("load", () => {
map.addWMTSLayer(
"/PGIS_S_TileMapServer/Maps/XZDJ_DJ/EzMap"
,
"/PGIS_S_TileMapServer/Maps/XZDJ_DJ/EzMap",
{
Service: "getImage",
Type: "RGB",
@ -115,7 +126,11 @@ onMounted(() => {
tileSize: 300
}
);
zoomTarget.value = map.mapboxGLMap.getZoom();
// WMTS图层加载完成后延时设置zoom
setTimeout(() => {
map.mapboxGLMap.setZoom(18);
zoomTarget.value = 18;
}, 500);
});
mapUtil.value = new MapUtil(map);
@ -333,12 +348,12 @@ onUnmounted(() => {
border: 1px solid #08aae8;
background: rgb(9, 26, 70);
&>img {
& > img {
width: 100%;
height: 50px;
}
&>div {
& > div {
text-align: center;
position: relative;
top: -3px;

View File

@ -30,7 +30,14 @@
</el-carousel> -->
<!-- 地图缩放 -->
<div class="zoomTargetBox">
<el-input-number :min="7" :max="18" v-model="zoomTarget" :step="1" step-strictly @change="handleZoom">
<el-input-number
:min="7"
:max="18"
v-model="zoomTarget"
:step="1"
step-strictly
@change="handleZoom"
>
</el-input-number>
</div>
</div>
@ -70,8 +77,7 @@ const props = defineProps({
isShowDraw: {
type: Boolean,
default: false
},
}
});
try {
const userInfo = getItem("deptId")[0].deptCode;
@ -92,8 +98,8 @@ onMounted(() => {
crs: "EPSG:3857",
style: {
glyphs: "./fonts/{fontstack}/{range}.pbf",
center: [94.36,29.65],
zoom: 11
center: [94.36, 29.65],
zoom: 15
},
minZoom: 7,
maxZoom: 18,
@ -101,17 +107,18 @@ onMounted(() => {
if (url.indexOf("TileMatrix=") != -1) {
const arr = url.split("TileMatrix=");
const arr1 = arr[1].split("&");
const nurl = `${arr[0]}&TileMatrix=${Number(arr1[0])}&${arr1[1]}&${arr1[2]}`;
const nurl = `${arr[0]}&TileMatrix=${Number(arr1[0])}&${arr1[1]}&${
arr1[2]
}`;
}
}
});
window.map = map;
map.mapboxGLMap.on("load", () => {
map.addGaudLayer({
url: 'http://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}',
})
map.addGaudLayer({
url: "http://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}"
});
zoomTarget.value = map.mapboxGLMap.getZoom();
// 地图加载完成后发出事件
// emit('mapLoaded')
@ -289,7 +296,6 @@ const mapSetLayer = (id, source) => {
//获取地图绘制的数据
const resFun = (coord, type, flag, data) => {
emitter.emit("coordString", {
coord: coord,
type: type,

View File

@ -3,8 +3,8 @@
</template>
<script setup>
import { defineComponent, onMounted, onUnmounted, ref, watch } from 'vue'
import * as echarts from 'echarts'
import { defineComponent, onMounted, onBeforeUnmount, ref, watch } from "vue";
import * as echarts from "echarts";
const props = defineProps({
data: {
type: Array,
@ -12,137 +12,141 @@ const props = defineProps({
},
color: {
type: Array,
default:() => []
default: () => []
}
})
const chartRef = ref(null)
let chart = null
});
const chartRef = ref(null);
let chart = null;
// 保存 resize 处理函数的引用
const handleResize = () => {
chart && chart.resize();
};
const initChart = () => {
if (!chartRef.value) return
chart = echarts.init(chartRef.value)
if (!chartRef.value) return;
chart = echarts.init(chartRef.value);
const option = {
// backgroundColor: '#1a213c',
tooltip: {
formatter: '{b}: {c} ({d}%)',
backgroundColor: 'rgba(0,0,0,0.7)',
borderColor: '#1a213c',
formatter: "{b}: {c} ({d}%)",
backgroundColor: "rgba(0,0,0,0.7)",
borderColor: "#1a213c",
textStyle: {
color: '#fff'
color: "#fff"
}
},
legend: {
type: 'scroll', // 启用滚动图例
selectedMode: 'multiple',
orient: 'vertical',
right: '0%',
top: 'center',
type: "scroll", // 启用滚动图例
selectedMode: "multiple",
orient: "vertical",
right: "0%",
top: "center",
textStyle: {
color: '#fff'
color: "#fff"
},
formatter: function (name) {
const data = option.series[0].data
const total = data.reduce((sum, item) => sum + item.value, 0)
const target = data.find(item => item.name === name)
const percentage = ((target.value / total) * 100).toFixed(0)
return `${name} ${target.value}`
const data = option.series[0].data;
const total = data.reduce((sum, item) => sum + item.value, 0);
const target = data.find((item) => item.name === name);
const percentage = ((target.value / total) * 100).toFixed(0);
return `${name} ${target.value}`;
},
// 图例翻页配置
pageIconColor: '#fff', // 翻页按钮颜色
pageTextStyle: { color: '#fff' }, // 翻页文字颜色
pageIconColor: "#fff", // 翻页按钮颜色
pageTextStyle: { color: "#fff" }, // 翻页文字颜色
pageIconSize: 12, // 翻页按钮大小
pageButtonItemGap: 5, // 分页按钮之间的间距
pageButtonGap: 10, // 分页按钮与图例项之间的间距
pageIconInactiveColor: '#555', // 不激活的翻页按钮颜色
pageButtonPosition: 'end' // 翻页按钮的位置
pageIconInactiveColor: "#555", // 不激活的翻页按钮颜色
pageButtonPosition: "end" // 翻页按钮的位置
},
series: [{
type: 'pie',
radius: ['30%', '55%'],
center: ['40%', '50%'],
roseType: false,
zlevel: 10,
startAngle: 35,
selectedMode: 'single',
selectedOffset: 10,
data:[...props.data],
label: {
show: true,
formatter: '{d}%',
color: '#fff',
position: 'outside',
fontSize: 14,
fontWeight: 'bold'
},
emphasis: {
focus: 'self',
scaleSize: 10,
series: [
{
type: "pie",
radius: ["30%", "55%"],
center: ["40%", "50%"],
roseType: false,
zlevel: 10,
startAngle: 35,
selectedMode: "single",
selectedOffset: 10,
data: [...props.data],
label: {
show: true,
formatter: "{d}%",
color: "#fff",
position: "outside",
fontSize: 14,
fontWeight: "bold"
},
emphasis: {
focus: "self",
scaleSize: 10,
itemStyle: {
shadowBlur: 20,
shadowOffsetX: 5,
shadowOffsetY: 5,
shadowColor: "rgba(0, 0, 0, 0.5)"
}
},
itemStyle: {
shadowBlur: 20,
shadowOffsetX: 5,
shadowOffsetY: 5,
shadowColor: 'rgba(0, 0, 0, 0.5)'
borderRadius: 4,
borderColor: "#1a213c",
borderWidth: 2
},
// 启用全局动画控制器
animation: true,
// 关键设置animationDelayUpdate确保数据更新时也有动画
animationDelayUpdate: function (idx) {
return idx * 300;
},
// 逐个显示的动画效果 - 改为从透明到不透明的过渡效果
animationType: "opacity",
animationEasing: "cubicOut",
// 关键:设置初始样式,让每个扇形从透明状态开始
// 使用动画帧序列来控制动画过程
animation: true,
animationDuration: 1000,
animationDelay: function (idx) {
// 按照索引顺序依次显示,设置更明显的延迟
return idx * 400;
},
// 动画开始前的回调,确保动画效果
animationBegin: function () {
// 可以在这里进行额外的动画初始化
return 0;
},
// 动画帧序列,控制每个关键帧的样式
animationFrame: function (idx, percent) {
// percent参数是从0到1的动画进度
return {
opacity: percent,
scale: 0.8 + percent * 0.2 // 从0.8放大到1
};
}
},
itemStyle: {
borderRadius: 4,
borderColor: '#1a213c',
borderWidth: 2
},
// 启用全局动画控制器
animation: true,
// 关键设置animationDelayUpdate确保数据更新时也有动画
animationDelayUpdate: function (idx) {
return idx * 300;
},
// 逐个显示的动画效果 - 改为从透明到不透明的过渡效果
animationType: 'opacity',
animationEasing: 'cubicOut',
// 关键:设置初始样式,让每个扇形从透明状态开始
// 使用动画帧序列来控制动画过程
animation: true,
animationDuration: 1000,
animationDelay: function (idx) {
// 按照索引顺序依次显示,设置更明显的延迟
return idx * 400;
},
// 动画开始前的回调,确保动画效果
animationBegin: function() {
// 可以在这里进行额外的动画初始化
return 0;
},
// 动画帧序列,控制每个关键帧的样式
animationFrame: function (idx, percent) {
// percent参数是从0到1的动画进度
return {
opacity: percent,
scale: 0.8 + percent * 0.2 // 从0.8放大到1
};
}
}],
media: [
{
query: { minAspectRatio: 1 },
option: {
series: [
{ center: ['36%', '50%'] },
]
],
media: [
{
query: { minAspectRatio: 1 },
option: {
series: [{ center: ["36%", "50%"] }]
}
}
}
]
}
]
};
chart.setOption(option);
};
chart.setOption(option)
}
onMounted(() => {
initChart()
window.addEventListener('resize', () => {
chart && chart.resize()
})
})
initChart();
window.addEventListener("resize", handleResize);
});
// 监听数据变化,确保动画在数据更新时也能触发
watch(
@ -150,30 +154,21 @@ watch(
(newData) => {
if (chart && newData && newData.length > 0) {
// 使用clear方法强制重新渲染并触发动画
chart.clear()
initChart()
chart.clear();
initChart();
}
},
{ deep: true }
)
);
// 组件卸载时清理资源
const cleanup = () => {
onBeforeUnmount(() => {
window.removeEventListener("resize", handleResize);
if (chart) {
chart.dispose()
chart = null
chart.dispose();
chart = null;
}
window.removeEventListener('resize', () => {
chart && chart.resize()
})
}
// 组件卸载时执行清理
onUnmounted(() => {
cleanup()
})
});
</script>
<style scoped>

View File

@ -108,7 +108,7 @@ import {
reactive,
ref,
watch,
watchEffect
shallowRef
} from "vue";
const props = defineProps({
tableConfiger: {
@ -200,10 +200,14 @@ let getConfiger = reactive({
});
const radioChoose = ref("");
watchEffect(() => {
getConfiger = { ...getConfiger, ...props.tableConfiger };
// 使用 watch 替代 watchEffect,避免无限循环
// 只有当 tableConfiger 的 JSON 字符串表示变化时才触发
watch(() => JSON.stringify(props.tableConfiger), () => {
Object.keys(props.tableConfiger).forEach(key => {
getConfiger[key] = props.tableConfiger[key];
});
setDefaultChoose();
});
}, { immediate: true });
onMounted(() => {
setDefaultChoose();

View File

@ -1,7 +1,7 @@
<template>
<el-form ref="elform" :model="listQuery" :label-width="props.labelWidth" :rules="props.rules" :inline="props.inline" label-position="right" :disabled="props.disabled">
<el-form-item v-for="(item, idx) in props.formList" :style="item.width && { width: item.width }" :prop="item.prop" :label="item.label" :label-width="item.labelWidth" :key="idx">
<el-form-item v-for="(item, idx) in props.formList" v-show="item.show !== false" :style="item.width && { width: item.width }" :prop="item.prop" :label="item.label" :label-width="item.labelWidth" :key="idx">
<!-- input表单 input-->
<MOSTY.Other v-if="item.type == 'input'" width="100%" clearable v-model="listQuery[item.prop]" :placeholder="`请输入${item.label}`" :disabled="item.disabled" :readonly="item.readonly" @blur="inputBlur($event,item)" />

View File

@ -49,7 +49,7 @@
</template>
<script setup>
import { nextTick, onMounted, reactive, ref, watch, watchEffect } from "vue";
import { nextTick, onMounted, reactive, ref, watch, shallowRef } from "vue";
const props = defineProps({
tableConfiger: {
type: Object,
@ -117,10 +117,14 @@ let getConfiger = reactive({
radioChoose: "", // 单选时选中的值------------- 待完成
rowHeight: "41" // 每行的高度
});
watchEffect(() => {
getConfiger = { ...getConfiger, ...props.tableConfiger };
// 使用 watch 替代 watchEffect,避免无限循环
// 只有当 tableConfiger 的 JSON 字符串表示变化时才触发
watch(() => JSON.stringify(props.tableConfiger), () => {
Object.keys(props.tableConfiger).forEach(key => {
getConfiger[key] = props.tableConfiger[key];
});
setDefaultChoose();
});
}, { immediate: true });
onMounted(() => {
setDefaultChoose();
});

View File

@ -430,56 +430,63 @@ defineExpose({
submit,
reset
});
watchEffect(() => {
// 优化 watchEffect 为 watch避免因 reactive 内部状态变化导致频繁重新执行
watch(() => props.searchArr, (newArr) => {
loadingPage.value = true;
let arr = JSON.parse(JSON.stringify(props.searchArr));
getArr = arr.map((item) => {
switch (item.showType) {
case "select":
item = { ...selectDefault, ...item };
item.options = reactive(item.options);
getOptions[item.prop] = item.options;
break;
case "input":
item = { ...inputDefault, ...item };
break;
case "daterange":
item = { ...daterangeDefault, ...item };
if (item.defaultShortcuts) item.shortcuts = shortcuts;
break;
case "date":
item = { ...defaultDate, ...item };
if (item.defaultShortcuts) {
item.shortcuts = dateShortcuts;
}
break;
case "checkbox":
item = reactive({ ...defaultCheckbox, ...item });
item.checkboxValueArr = item.options.map((obj) => {
return obj.value;
});
break;
case "cascader":
item = { ...defaultCascader, ...item };
if (item.lazy) {
cascaderLazyProps.checkStrictly = item.checkStrictly;
item.props = { ...cascaderLazyProps, ...(item.props || {}) };
delete item.options;
} else {
item.props = {
...defaultCascader.props,
...(item.props || {}),
...{ checkStrictly: item.checkStrictly }
};
getOptions[item.prop] = reactive(item.options);
}
break;
}
// 使用 try-catch 防止解析失败导致崩溃
try {
let arr = JSON.parse(JSON.stringify(newArr));
getArr = arr.map((item) => {
switch (item.showType) {
case "select":
item = { ...selectDefault, ...item };
item.options = reactive(item.options);
getOptions[item.prop] = item.options;
break;
case "input":
item = { ...inputDefault, ...item };
break;
case "daterange":
item = { ...daterangeDefault, ...item };
if (item.defaultShortcuts) item.shortcuts = shortcuts;
break;
case "date":
item = { ...defaultDate, ...item };
if (item.defaultShortcuts) {
item.shortcuts = dateShortcuts;
}
break;
case "checkbox":
item = reactive({ ...defaultCheckbox, ...item });
item.checkboxValueArr = item.options.map((obj) => {
return obj.value;
});
break;
case "cascader":
item = { ...defaultCascader, ...item };
if (item.lazy) {
cascaderLazyProps.checkStrictly = item.checkStrictly;
item.props = { ...cascaderLazyProps, ...(item.props || {}) };
delete item.options;
} else {
item.props = {
...defaultCascader.props,
...(item.props || {}),
...{ checkStrictly: item.checkStrictly }
};
getOptions[item.prop] = reactive(item.options);
}
break;
}
loadingPage.value = false;
searchObj[item.prop] = item.defaultVal;
return item;
});
} catch (e) {
console.error('Search组件初始化失败:', e);
loadingPage.value = false;
searchObj[item.prop] = item.defaultVal;
return item;
});
});
}
}, { immediate: true, deep: false });
</script>
<style scoped lang="scss">

View File

@ -29,23 +29,27 @@ const timekeeping = ref(null);
const countdown = ref(0); // 倒计时时间(秒)
// 音频播放器实例映射
const audioPlayers = ref({
"01": null, // 预警信息
"02": null, // 信息上报
"03": null, // 研判审批
"04": null, // 研判指令
"05": null, // 线索下发,
"06": null, // 警情监测
"07": null, // 线索处理
"08": null, // 线索下发
"09": null, // 线索处理
10: null, // 林安码
11: null, // 发布了新的线索
12: null, // 有新的研判指令
13: null, // 有新的研判约稿通知
14: null, // 有新的公文发布
15: null // 有新的待审核工作(补发音效)
});
const audioPlayers = new Map();
// 预加载音频播放器(仅加载 playAudioByType 中实际用到的类型)
const initAudioPlayers = async () => {
const usedTypes = ["03", "09", "10", "11", "12", "13", "16", "17", "18", "19"];
await Promise.all(
usedTypes.map(
(type) =>
new Promise((resolve) => {
const player = new AudioPlayerClass();
audioPlayers.set(type, player);
player.init(audioPaths[type], false).then(resolve).catch(resolve);
})
)
);
};
// 获取指定类型的音频播放器
const getAudioPlayer = (type) => {
return audioPlayers.get(type);
};
// 音频文件路径映射
const audioPaths = {
@ -67,19 +71,7 @@ const audioPaths = {
"16": require("@/assets/images/16.mp3"), //有新的一级临控预警,请及时签收处理!
"17": require("@/assets/images/17.mp3"), //有新的紧急预警信息,请及时签收处理!
"18": require("@/assets/images/18.mp3"), //滴滴滴~~~叮~~~~
"19": require("@/assets/images/19.mp3"), //有新的预警信息,请您注意查收
};
// 初始化音频播放器
const initAudioPlayers = () => {
Object.keys(audioPaths).forEach((type) => {
try {
audioPlayers.value[type] = new AudioPlayerClass();
audioPlayers.value[type].init(audioPaths[type], false);
} catch (error) {
console.error(`初始化类型${type}的音频播放器失败:`, error);
}
});
"19": require("@/assets/images/19.mp3") //有新的预警信息,请您注意查收
};
// 根据类型播放音频
@ -89,33 +81,12 @@ const playAudioByType = (val) => {
// 01 布控预警、02 七类重点人、03 政保
switch (val.yjlb) {
case "01":
switch (val.yjJb) {
case "01":
audioPlayers.value["18"].play();
audioPlayers.value["17"].play();
// audioPlayers.value["01"].play();
// audioPlayers.value["06"].play();
break;
default:
audioPlayers.value["19"].play();
// audioPlayers.value["02"].play();
// audioPlayers.value["07"].play();
break;
}
break;
case "02":
switch (val.yjJb) {
case "01":
audioPlayers.value["18"].play();
audioPlayers.value["17"].play();
// audioPlayers.value["01"].play();
// audioPlayers.value["04"].play();
break;
default:
audioPlayers.value["19"].play();
// audioPlayers.value["02"].play();
// audioPlayers.value["05"].play();
break;
if (val.yjJb == "01") {
getAudioPlayer("18")?.play();
getAudioPlayer("17")?.play();
} else {
getAudioPlayer("19")?.play();
}
break;
case "03":
@ -123,56 +94,40 @@ const playAudioByType = (val) => {
}
break;
case "02": //信息汇聚
audioPlayers.value["03"].play();
audioPlayers.value["09"].play();
getAudioPlayer("03")?.play();
getAudioPlayer("09")?.play();
break;
case "03": //约稿
audioPlayers.value["03"].play();
audioPlayers.value["13"].play();
getAudioPlayer("03")?.play();
getAudioPlayer("13")?.play();
break;
case "04": //指令
audioPlayers.value["03"].play();
audioPlayers.value["12"].play();
getAudioPlayer("03")?.play();
getAudioPlayer("12")?.play();
break;
case "05": //新线索
audioPlayers.value["03"].play();
audioPlayers.value["11"].play();
getAudioPlayer("03")?.play();
getAudioPlayer("11")?.play();
break;
case "06": //检测警情
switch (val.jqdjdm) {
case "01":
audioPlayers.value["18"].play();
audioPlayers.value["17"].play();
break;
default:
audioPlayers.value["19"].play();
break;
if (val.jqdjdm == "01") {
getAudioPlayer("18")?.play();
getAudioPlayer("17")?.play();
} else {
getAudioPlayer("19")?.play();
}
// audioPlayers.value["02"].play();
// audioPlayers.value["15"].play();
break;
// case '07':
// audioPlayers.value['07'].play()
// break
case "08": //林安码
audioPlayers.value["03"].play();
audioPlayers.value["10"].play();
getAudioPlayer("03")?.play();
getAudioPlayer("10")?.play();
break;
case "11":
audioPlayers.value["03"].play();
audioPlayers.value["16"].play();
getAudioPlayer("03")?.play();
getAudioPlayer("16")?.play();
break;
default:
break;
}
// if (audioPlayers.value[type]) {
// try {
// audioPlayers.value[type].play()
// } catch (error) {
// console.error(`播放类型${type}的音频失败:`, error)
// }
// }
};
// 手动关闭
const handleClose = () => {
@ -202,30 +157,31 @@ const resetCountdown = () => {
// 做一个定时器15s一次
const checkNews = ref(null);
const checkNewsInterval = 15000; // 15秒
checkNews.value = setInterval(() => {
dataModel();
}, checkNewsInterval);
onMounted(() => {
// 初始化音频播放器
initAudioPlayers();
emitter.on("webSocketMessage", (newsDate) => {
if (newsDate) {
dataList.value = newsDate;
// dataList.value.unshift({...newsDate.data,typeMasgeLx:newsDate.type})
// 根据消息类型播放音频
playAudioByType(newsDate[0]);
resetCountdown();
}
});
});
const idEntityCard = ref(getItem("idEntityCard"));
onMounted(async () => {
await initAudioPlayers();
// 音频预加载完成后再启动轮询,避免定时器先触发但播放器还未就绪
checkNews.value = setInterval(() => {
dataModel();
}, checkNewsInterval);
// 注册事件监听(需在 onUnmounted 中精确解绑)
emitter.on("webSocketMessage", handleWebSocketMessage);
});
// 处理 WebSocket 消息事件(需在 onUnmounted 中解绑,提取到模块作用域)
const handleWebSocketMessage = (newsDate) => {
if (newsDate) {
dataList.value = newsDate;
playAudioByType(newsDate[0]);
resetCountdown();
}
};
const dataModel = () => {
qcckGet({}, "/mosty-gsxt/dsjJbxx/message").then((res) => {
if (res) {
// const yjmasg = res.filter(item => item.type === '01')
// if (yjmasg.length > 0) {
// emitter.emit('openYp', yjmasg[0].obj); // 触发音频播放
// }
const data = res.filter((item) =>
item.sfzList.includes(idEntityCard.value)
);
@ -235,35 +191,26 @@ const dataModel = () => {
typeMasgeLx: item.type
};
});
console.log(infoMasge, "xxxxxxxxxxxx");
emitter.emit("webSocketMessage", infoMasge);
}
});
};
// if (newsDate.type === '01') {
// // 触发音频播放
// console.log('触发音频播放');
// emitter.emit('openYp', newsDate.data); // 传递消息数据
// } else {
onUnmounted(() => {
emitter.off("webSocketMessage");
emitter.off("webSocketMessage", handleWebSocketMessage);
if (timekeeping.value) {
clearInterval(timekeeping.value);
}
// 销毁所有音频播放器实例
Object.values(audioPlayers.value).forEach((player) => {
if (player) {
player.destroy();
}
audioPlayers.forEach((player) => {
player.destroy();
});
audioPlayers.clear();
// 清除定时器
if (checkNews.value) {
clearInterval(checkNews.value);
checkNews.value = null;
}
// 组件卸载时执行的操作
console.log("组件卸载时执行的操作");
});
</script>

View File

@ -115,28 +115,29 @@ onMounted(() => {
} else {
showFxq.value = true
}
emitter.on("handleClick", () => {
idEntityCard.value = getItem('idEntityCard')
emitter.on("handleClick", handleClickHandler);
// 清除旧定时器,避免多个定时器同时运行
if (intTime.value) {
clearInterval(intTime.value)
}
intTime.value = setInterval(() => {
handleClick()
// 清除旧定时器,避免多个定时器同时运行
if (intTime.value) {
clearInterval(intTime.value)
}
intTime.value = setInterval(() => {
handleClick()
}, 60000)
});
}, 60000)
})
const handleClickHandler = () => {
idEntityCard.value = getItem('idEntityCard')
handleClick()
}
onUnmounted(() => {
clearInterval(intTime.value)
emitter.off("handleClick")
emitter.off("handleClick", handleClickHandler)
})
</script>
<style lang="scss" scoped>
// 蜂群组件样式
.fxqx {
border-radius: 34px;
border-radius: 34px;
width: 34px;
background-color: rgb(1, 127, 245);
margin-bottom: 18px;

View File

@ -23,29 +23,18 @@ class AudioPlayerClass {
this.audioPlayer = new Audio(audioPath);
this.audioPlayer.loop = loop; // 设置循环播放
// 监听音频加载完成事件
this.audioPlayer.addEventListener('canplaythrough', () => {
console.log('音频加载完成,可以播放');
this.isLoaded = true;
resolve(true);
});
// 监听错误事件
this.audioPlayer.addEventListener('error', (error) => {
console.error('音频加载错误:', error);
console.error('错误代码:', error.code);
console.error('音频网络状态:', this.audioPlayer.networkState);
console.error('音频就绪状态:', this.audioPlayer.readyState);
reject(error);
});
// 预加载音频
console.log('开始预加载音频...');
this.audioPlayer.load();
console.log('音频预加载请求已发送');
} catch (error) {
console.error('初始化音频播放器失败:', error);
console.error('错误详情:', error.stack);
reject(error);
}
});
@ -79,26 +68,19 @@ class AudioPlayerClass {
this.audioPlayer.play()
.then(() => {
this.isPlaying = true;
console.log('音频播放成功');
resolve(true);
})
.catch(error => {
if (error.name === 'NotAllowedError') {
console.error('播放被浏览器自动播放策略阻止,需要用户交互后才能播放');
}
reject(error);
});
.catch(error => reject(error));
}, 0);
} else {
this.audioPlayer.play()
.then(() => {
this.isPlaying = true;
console.log('音频播放成功');
resolve(true);
})
.catch(error => {
if (error.name === 'NotAllowedError') {
console.error('播放被浏览器自动播放策略阻止,需要用户交互后才能播放');
// 浏览器自动播放策略阻止,静默忽略
}
reject(error);
});
@ -117,7 +99,6 @@ class AudioPlayerClass {
if (this.audioPlayer) {
this.audioPlayer.pause();
this.isPlaying = false;
console.log('音频已暂停');
}
}
@ -167,7 +148,6 @@ class AudioPlayerClass {
this.audioPlayer = null;
this.isLoaded = false;
this.isPlaying = false;
console.log('音频播放器已销毁');
}
}
}

View File

@ -14,8 +14,7 @@ export function isLocalDict(dictCode) {
D_GS_BQ_DJ: true, // "岗哨系统标签管理标签等级"
D_GS_SSYJ: true, // "岗哨系统四色预警"
D_BZ_SF: true, // "是否"
BD_BK_CLYJBQ: true, // "车辆预警标签"
D_YJXX_CZCSLX: true //常控处置措施类型
BD_BK_CLYJBQ: true // "车辆预警标签"
};
return localDicObj[dictCode];
}

View File

@ -6,10 +6,62 @@ export function getLocalDic(key) {
let dicobj = {
/** "岗哨系统重点人员预警等级" */
D_GS_ZDR_YJDJ: [
{ "itemList": null, "id": "01", "zdId": 59588112, "zdbh": "D_GS_ZDR_YJDJ", "zdmc": "一级", "dm": "01", "py": "YJ", "px": 1, "bz": "", "label": "一级", "value": "01", "children": null },
{ "itemList": null, "id": "02", "zdId": 59588112, "zdbh": "D_GS_ZDR_YJDJ", "zdmc": "二级", "dm": "02", "py": "EJ", "px": 2, "bz": "", "label": "二级", "value": "02", "children": null },
{ "itemList": null, "id": "03", "zdId": 59588112, "zdbh": "D_GS_ZDR_YJDJ", "zdmc": "三级", "dm": "03", "py": "SJ", "px": 3, "bz": "", "label": "三级", "value": "03", "children": null },
{ "itemList": null, "id": "04", "zdId": 59588112, "zdbh": "D_GS_ZDR_YJDJ", "zdmc": "四级", "dm": "04", "py": "SJ", "px": 4, "bz": "", "label": "四级", "value": "04", "children": null }
{
"itemList": null,
"id": "01",
"zdId": 59588112,
"zdbh": "D_GS_ZDR_YJDJ",
"zdmc": "一级",
"dm": "01",
"py": "YJ",
"px": 1,
"bz": "",
"label": "一级",
"value": "01",
"children": null
},
{
"itemList": null,
"id": "02",
"zdId": 59588112,
"zdbh": "D_GS_ZDR_YJDJ",
"zdmc": "二级",
"dm": "02",
"py": "EJ",
"px": 2,
"bz": "",
"label": "二级",
"value": "02",
"children": null
},
{
"itemList": null,
"id": "03",
"zdId": 59588112,
"zdbh": "D_GS_ZDR_YJDJ",
"zdmc": "三级",
"dm": "03",
"py": "SJ",
"px": 3,
"bz": "",
"label": "三级",
"value": "03",
"children": null
},
{
"itemList": null,
"id": "04",
"zdId": 59588112,
"zdbh": "D_GS_ZDR_YJDJ",
"zdmc": "四级",
"dm": "04",
"py": "SJ",
"px": 4,
"bz": "",
"label": "四级",
"value": "04",
"children": null
}
],
/** 性别 */
D_BZ_XB: [
@ -235,66 +287,8 @@ export function getLocalDic(key) {
"value": "1",
"children": null
}
],
]
/** 常控处置措施类型 */
D_YJXX_CZCSLX: [
{
"itemList": null,
"id": "01",
"zdId": 59589206,
"zdbh": "D_YJXX_CZCSLX",
"zdmc": "抓捕",
"dm": "01",
"py": "ZP",
"px": 1,
"bz": "",
"label": "抓捕",
"value": "01",
"children": null
},
{
"itemList": null,
"id": "02",
"zdId": 59589206,
"zdbh": "D_YJXX_CZCSLX",
"zdmc": "管控",
"dm": "02",
"py": "GK",
"px": 2,
"bz": "",
"label": "管控",
"value": "02",
"children": null
},
{
"itemList": null,
"id": "03",
"zdId": 59589206,
"zdbh": "D_YJXX_CZCSLX",
"zdmc": "经营",
"dm": "03",
"py": "JY",
"px": 3,
"bz": "",
"label": "经营",
"value": "03",
"children": null
},
{
"itemList": null,
"id": "04",
"zdId": 59589206,
"zdbh": "D_YJXX_CZCSLX",
"zdmc": "关注",
"dm": "04",
"py": "GZ",
"px": 4,
"bz": "",
"label": "关注",
"value": "04",
"children": null
}
],
}
return dicobj[key]
};
return dicobj[key];
}

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 {

View File

@ -1,16 +1,37 @@
<template>
<el-dialog :model-value="modelValue" width="70%" @close="closeDialog" destroy-on-close append-to-body>
<el-dialog
:model-value="modelValue"
width="70%"
@close="closeDialog"
destroy-on-close
append-to-body
>
<template #title>
<div class="flex just-between align-center">
<span class="f18">{{ title }}</span>
<span @click="exportFile" class="f14 pointer" style="color: #0072ff;">下载</span>
<span
@click="exportFile"
class="f14 pointer"
style="color: #0072ff; margin-right: 30px"
>下载</span
>
</div>
</template>
<div>
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"></Search>
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
<Search
:searchArr="searchConfiger"
@submit="onSearch"
:key="pageData.keyCount"
></Search>
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
>
<template #qblx="{ row }">
<DictTag :tag="false" :value="row.qblx" :options="D_GS_XS_LX" />
</template>
@ -21,14 +42,18 @@
<DictTag :tag="false" :value="row.czzt" :options="D_BZ_QBCZZT" />
</template>
<template #lczt="{ row }">
<DictTag :tag="false" :value="row.lczt" :options="D_BZ_LCZT" />
</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>
<template #footer>
<div class="dialog-footer">
@ -40,16 +65,26 @@
</template>
<script setup>
import { getMultiDictVal } from "@/utils/dict.js"
import { exportExlByObj } from "@/utils/exportExcel.js"
import { getMultiDictVal } from "@/utils/dict.js";
import { exportExlByObj } from "@/utils/exportExcel.js";
import MyTable from "@/components/aboutTable/MyTable.vue";
import Search from "@/components/aboutTable/Search.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import { xxcjSelectXxsbPage, xxcjDeletes, xxcjXxzsx, xxcjUpdateCzlc, xxcjXxqd } from '@/api/xxcj.js'
import {
xxcjSelectXxsbPage,
xxcjDeletes,
xxcjXxzsx,
xxcjUpdateCzlc,
xxcjXxqd
} from "@/api/xxcj.js";
import { ref, reactive, getCurrentInstance, watch } from "vue";
const { proxy } = getCurrentInstance()
const { D_GS_XS_LX, D_BZ_QBCZZT, D_BZ_CJLX, D_BZ_LCZT } =
proxy.$dict("D_GS_XS_LX", "D_BZ_QBCZZT", "D_BZ_CJLX", "D_BZ_LCZT"); //获取字典数据
const { proxy } = getCurrentInstance();
const { D_GS_XS_LX, D_BZ_QBCZZT, D_BZ_CJLX, D_BZ_LCZT } = proxy.$dict(
"D_GS_XS_LX",
"D_BZ_QBCZZT",
"D_BZ_CJLX",
"D_BZ_LCZT"
); //获取字典数据
const detailDiloag = ref();
const props = defineProps({
modelValue: {
@ -59,29 +94,51 @@ const props = defineProps({
dict: {
type: Object,
default: () => ({})
}, title: {
},
title: {
default: "下发总数",
type: String
},
sfqs: {
type: String,
default: ''
default: ""
},
sffk: {
type: String,
default: ''
default: ""
}
})
});
const searchConfiger = ref([
{ label: "名称", prop: 'qbmc', placeholder: "请输入情报名称", showType: "input" },
{ label: "所属单位", prop: "ssbmdm", placeholder: "请选择所属单位", showType: "department" },
{ label: "时间", prop: "startTime", placeholder: "请选择时间", showType: "daterange" },
{ label: "处置状态", prop: 'lczt', placeholder: "请选择处置状态", showType: "select", options: D_BZ_LCZT },
{
label: "名称",
prop: "qbmc",
placeholder: "请输入情报名称",
showType: "input"
},
{
label: "所属单位",
prop: "ssbmdm",
placeholder: "请选择所属单位",
showType: "department"
},
{
label: "时间",
prop: "startTime",
placeholder: "请选择时间",
showType: "daterange"
},
{
label: "处置状态",
prop: "lczt",
placeholder: "请选择处置状态",
showType: "select",
options: D_BZ_LCZT
}
]);
const emit = defineEmits(['update:modelValue'])
const emit = defineEmits(["update:modelValue"]);
const closeDialog = () => {
emit('update:modelValue', false)
}
emit("update:modelValue", false);
};
const pageData = reactive({
tableData: [],
keyCount: 0,
@ -89,7 +146,7 @@ const pageData = reactive({
loading: false,
rowHieght: 40,
haveControls: false,
showSelectType: 'null',
showSelectType: "null"
},
controlsWidth: 160, //操作栏宽度
total: 0,
@ -102,72 +159,76 @@ const pageData = reactive({
{ label: "情报编号", prop: "xsBh" },
{ label: "情报标题", prop: "qbmc" },
{ label: "情报来源", prop: "qbly", showSolt: true },
{ label: "流程状态", prop: "lczt", showSolt: true },
{ label: "流程状态", prop: "lczt", showSolt: true }
],
tableHeight: "43vh",
tableHeight: "43vh"
});
const parameter = ref()
const parameter = ref();
const onSearch = (val) => {
const promes = {
...pageData.pageConfiger,
...val,
startTime: val.startTime ? val.startTime[0] : '',
endTime: val.endTime ? val.endTime[1] : '',
}
parameter.value = { ...promes }
startTime: val.startTime ? val.startTime[0] : "",
endTime: val.endTime ? val.endTime[1] : ""
};
parameter.value = { ...promes };
pageData.pageConfiger.pageCurrent = 1;
// parameter.value = { ...val }
// pageData.pageConfiger.pageCurrent = 1;
changePage()
}
watch(() => props.modelValue, (val) => {
if (val) {
changePage()
changePage();
};
watch(
() => props.modelValue,
(val) => {
if (val) {
changePage();
}
}
})
);
const changePage = () => {
pageData.tableConfiger.loading = true;
const promes = {
...parameter.value,
...pageData.pageConfiger,
}
xxcjSelectXxsbPage(promes).then((res) => {
pageData.total = res.total || 0;
pageData.tableConfiger.loading = false;
pageData.tableData = res.records
}).catch(() => {
pageData.tableConfiger.loading = false;
})
}
...pageData.pageConfiger
};
xxcjSelectXxsbPage(promes)
.then((res) => {
pageData.total = res.total || 0;
pageData.tableConfiger.loading = false;
pageData.tableData = res.records;
})
.catch(() => {
pageData.tableConfiger.loading = false;
});
};
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val;
changePage()
}
changePage();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
changePage()
}
changePage();
};
// 导出
const exportFile = () =>{
const exportFile = () => {
const titleObj = {
sxsbsj: "情报上报时间",
xsBh: "情报编号",
qbmc: "情报标题",
qbly_name: "情报来源",
lczt_name: "流程状态",
}
let list = pageData.tableData.map(item => ({
...item,
qbly_name: getMultiDictVal(item.jqdjdm, D_BZ_CJLX),
lczt_name: getMultiDictVal(item.jqlbdm, D_BZ_QBCZZT),
}))
exportExlByObj(titleObj, list, props.title)
}
lczt_name: "流程状态"
};
let list = pageData.tableData.map((item) => ({
...item,
qbly_name: getMultiDictVal(item.jqdjdm, D_BZ_CJLX),
lczt_name: getMultiDictVal(item.jqlbdm, D_BZ_QBCZZT)
}));
exportExlByObj(titleObj, list, props.title);
};
</script>
<style scoped></style>

View File

@ -1,16 +1,39 @@
<template>
<el-dialog :model-value="modelValue" width="70%" @close="closeDialog" destroy-on-close append-to-body :close-on-click-modal="false">
<el-dialog
:model-value="modelValue"
width="70%"
@close="closeDialog"
destroy-on-close
append-to-body
:close-on-click-modal="false"
>
<template #title>
<div class="flex just-between align-center">
<span class="f18">重点群体</span>
<span @click="exportFile" class="f14 pointer" style="color: #0072ff;">下载</span>
<span
@click="exportFile"
class="f14 pointer"
style="color: #0072ff; margin-right: 30px"
>下载</span
>
</div>
</template>
<div>
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"></Search>
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
fixed="right" :expand="true">
<Search
:searchArr="searchConfiger"
@submit="onSearch"
:key="pageData.keyCount"
></Search>
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
fixed="right"
:expand="true"
>
<template #qtLb="{ row }">
<DictTag :tag="false" :value="row.qtLb" :options="D_GS_ZDQT_LB" />
</template>
@ -25,21 +48,36 @@
</template> -->
<template #zdryList="{ row }">
<span style="color: #0072ff">{{ row.zdryList ? row.zdryList.length : 0 }}</span>
<span style="color: #0072ff">{{
row.zdryList ? row.zdryList.length : 0
}}</span>
</template>
<!-- <template #qtZt="{ row }">
<DictTag :tag="false" :value="row.qtZt" :options="D_GS_ZDQT_ZT" />
</template> -->
<template #expand="{ props }">
<template #expand="{ props }">
<div class="expand-content" style="max-width: 100%">
<ZdqtItem :row="props" :dict="{D_GS_ZDR_RYJB,D_GS_ZDR_BK_ZT,D_GS_ZDR_CZZT,D_GS_ZDQT_ZT}" />
<ZdqtItem
:row="props"
:dict="{
D_GS_ZDR_RYJB,
D_GS_ZDR_BK_ZT,
D_GS_ZDR_CZZT,
D_GS_ZDQT_ZT
}"
/>
</div>
</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>
<template #footer>
<div class="dialog-footer">
@ -51,19 +89,49 @@
</template>
<script setup>
import { getMultiDictVal } from "@/utils/dict.js"
import { exportExlByObj } from "@/utils/exportExcel.js"
import { getMultiDictVal } from "@/utils/dict.js";
import { exportExlByObj } from "@/utils/exportExcel.js";
import MyTable from "@/components/aboutTable/MyTable.vue";
import Search from "@/components/aboutTable/Search.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { ref, reactive, getCurrentInstance, watch } from "vue";
import { useRoute, useRouter } from 'vue-router'
import { useRoute, useRouter } from "vue-router";
import ZdqtItem from "./zdqtItem.vue";
const route = useRoute()
const router = useRouter()
const { proxy } = getCurrentInstance()
const { D_GS_ZDR_CZZT, D_GS_BK_SQLX, D_GS_ZDQT_FXDJ, D_GS_ZDR_RYJB, D_GS_ZDQT_LB, D_GS_ZDR_BK_ZT, D_GS_BQ_LX, D_GS_ZDQT_ZT, D_BZ_SF, D_BZ_XB, D_GS_XS_LY, D_BZ_SSZT, D_GS_XS_LX, D_GS_XS_QTLX } = proxy.$dict("D_GS_ZDR_CZZT", "D_GS_BK_SQLX", "D_GS_ZDQT_FXDJ", "D_GS_ZDR_RYJB", "D_GS_ZDQT_LB", "D_GS_ZDR_BK_ZT", "D_GS_BQ_LX", "D_GS_ZDQT_ZT", "D_BZ_SF", "D_BZ_XB", "D_GS_XS_LY", "D_BZ_SSZT", "D_GS_XS_LX", "D_GS_XS_QTLX"); //获取字典数据
const route = useRoute();
const router = useRouter();
const { proxy } = getCurrentInstance();
const {
D_GS_ZDR_CZZT,
D_GS_BK_SQLX,
D_GS_ZDQT_FXDJ,
D_GS_ZDR_RYJB,
D_GS_ZDQT_LB,
D_GS_ZDR_BK_ZT,
D_GS_BQ_LX,
D_GS_ZDQT_ZT,
D_BZ_SF,
D_BZ_XB,
D_GS_XS_LY,
D_BZ_SSZT,
D_GS_XS_LX,
D_GS_XS_QTLX
} = proxy.$dict(
"D_GS_ZDR_CZZT",
"D_GS_BK_SQLX",
"D_GS_ZDQT_FXDJ",
"D_GS_ZDR_RYJB",
"D_GS_ZDQT_LB",
"D_GS_ZDR_BK_ZT",
"D_GS_BQ_LX",
"D_GS_ZDQT_ZT",
"D_BZ_SF",
"D_BZ_XB",
"D_GS_XS_LY",
"D_BZ_SSZT",
"D_GS_XS_LX",
"D_GS_XS_QTLX"
); //获取字典数据
const props = defineProps({
modelValue: {
type: Boolean,
@ -73,9 +141,9 @@ const props = defineProps({
type: Object,
default: () => ({})
}
})
});
const searchConfiger = ref([
{
{
label: "群体名称",
prop: "qtMc",
placeholder: "请输入群体名称",
@ -96,17 +164,17 @@ const searchConfiger = ref([
showType: "select",
options: D_GS_ZDQT_LB
},
{
{
label: "所属部门",
prop: "ssbmdm",
placeholder: "请输入所属部门",
showType: "department",
},
showType: "department"
}
]);
const emit = defineEmits(['update:modelValue'])
const emit = defineEmits(["update:modelValue"]);
const closeDialog = () => {
emit('update:modelValue', false)
}
emit("update:modelValue", false);
};
const pageData = reactive({
tableData: [],
keyCount: 0,
@ -114,7 +182,7 @@ const pageData = reactive({
loading: false,
rowHieght: 40,
haveControls: false,
showSelectType:'null'
showSelectType: "null"
},
controlsWidth: 160, //操作栏宽度
total: 0,
@ -125,65 +193,67 @@ const pageData = reactive({
tableColumn: [
{ label: "群体名称", prop: "qtMc" },
{ label: "群体类别", prop: "qtLb", showSolt: true },
{ label: "风险等级", prop: "qtFxdj", showSolt: true},
{ label: "风险等级", prop: "qtFxdj", showSolt: true },
{ label: "背景资料", prop: "qtBjzl" },
{ label: "背景信息", prop: "bgxx", showSolt: true },
{ label: "管辖单位", prop: "gxSsdwmc" },
{ label: "管辖单位", prop: "gxSsdwmc" }
],
tableHeight: "42vh",
tableHeight: "42vh"
});
const parameter = ref()
const parameter = ref();
const onSearch = (val) => {
parameter.value = { ...val }
parameter.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
changePage()
}
watch(() => props.modelValue, (val) => {
if (val) {
changePage()
changePage();
};
watch(
() => props.modelValue,
(val) => {
if (val) {
changePage();
}
}
})
);
const changePage = () => {
pageData.tableConfiger.loading = true;
let data = {...pageData.pageConfiger, ...parameter.value };
qcckGet(data, "/mosty-gsxt/tbGsxtZdqt/selectPage").then((res) => {
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
}).catch(() => {
pageData.tableConfiger.loading = false;
});
}
let data = { ...pageData.pageConfiger, ...parameter.value };
qcckGet(data, "/mosty-gsxt/tbGsxtZdqt/selectPage")
.then((res) => {
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
})
.catch(() => {
pageData.tableConfiger.loading = false;
});
};
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val;
changePage()
}
changePage();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
changePage()
}
changePage();
};
// 导出
const exportFile = () =>{
const exportFile = () => {
const titleObj = {
qtMc: "群体名称",
qtLb_name: "群体类别",
qtFxdj_name: "风险等级",
qtBjzl: "背景资料",
bgxx_name: "背景信息",
gxSsdwmc: "管辖单位",
}
let list = pageData.tableData.map(item => ({
...item,
qtLb_name: getMultiDictVal(item.qtLb, D_GS_ZDQT_LB),
qtFxdj_name: getMultiDictVal(item.qtFxdj, D_GS_ZDQT_FXDJ),
}))
exportExlByObj(titleObj, list, '重点群体')
}
gxSsdwmc: "管辖单位"
};
let list = pageData.tableData.map((item) => ({
...item,
qtLb_name: getMultiDictVal(item.qtLb, D_GS_ZDQT_LB),
qtFxdj_name: getMultiDictVal(item.qtFxdj, D_GS_ZDQT_FXDJ)
}));
exportExlByObj(titleObj, list, "重点群体");
};
</script>
<style scoped></style>

View File

@ -1,20 +1,47 @@
<template>
<el-dialog :model-value="modelValue" width="70%" @close="closeDialog" destroy-on-close append-to-body :close-on-click-modal="false">
<el-dialog
:model-value="modelValue"
width="70%"
@close="closeDialog"
destroy-on-close
append-to-body
:close-on-click-modal="false"
>
<template #title>
<div class="flex just-between align-center">
<span class="f18">重点人总数</span>
<span @click="exportFile" class="f14 pointer" style="color: #0072ff;">下载</span>
<span
@click="exportFile"
class="f14 pointer"
style="color: #0072ff; margin-right: 30px"
>下载</span
>
</div>
</template>
<div>
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"></Search>
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
:expand="true">
<Search
:searchArr="searchConfiger"
@submit="onSearch"
:key="pageData.keyCount"
></Search>
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
:expand="true"
>
<template #bqList="{ row }">
<ul>
<li class="one_text_detail marks mb4" :key="index" v-for="(item, index) in row.bqList">{{ item.bqMc }}({{
item.bqFz || 0 }} ) </li>
<li
class="one_text_detail marks mb4"
:key="index"
v-for="(item, index) in row.bqList"
>
{{ item.bqMc }}({{ item.bqFz || 0 }} )
</li>
</ul>
</template>
<template #ryXb="{ row }">
@ -34,28 +61,59 @@
<DictTag :tag="false" :value="row.zdrZt" :options="D_GS_ZDQT_ZT" />
</template>
<template #xtSjzt="{ row }">
<div> {{ row.xtSjzt == 0 ? "注销" : row.xtSjzt == 1 ? "正常" : "封存" }}</div>
<div>
{{ row.xtSjzt == 0 ? "注销" : row.xtSjzt == 1 ? "正常" : "封存" }}
</div>
</template>
<template #expand="{ props }">
<div class="expand-content" style="max-width: 100%">
<ZdrItemfrom :row="props" :dict="{D_GS_ZDR_RYJB,D_GS_ZDR_BK_ZT,D_GS_ZDR_CZZT,D_GS_ZDQT_ZT}" />
<ZdrItemfrom
:row="props"
:dict="{
D_GS_ZDR_RYJB,
D_GS_ZDR_BK_ZT,
D_GS_ZDR_CZZT,
D_GS_ZDQT_ZT
}"
/>
</div>
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link size="small" type="success" @click="handleremove(row.id)">移除</el-link>
<el-link size="small" type="success" v-if="row.zdrZt == '01' || row.zdrZt == '03'"
@click="handleSend(row.id)">送审</el-link>
<el-link size="small" type="primary" v-if="row.zdrZt == '01' || row.zdrZt == '03'"
@click="addEdit('edit', row)">编辑</el-link>
<el-link size="small" type="primary" @click="addEdit('detail', row)">详情</el-link>
<el-link size="small" type="danger" @click="deleteRow(row.id)">删除</el-link>
<el-link size="small" type="success" @click="handleremove(row.id)"
>移除</el-link
>
<el-link
size="small"
type="success"
v-if="row.zdrZt == '01' || row.zdrZt == '03'"
@click="handleSend(row.id)"
>送审</el-link
>
<el-link
size="small"
type="primary"
v-if="row.zdrZt == '01' || row.zdrZt == '03'"
@click="addEdit('edit', row)"
>编辑</el-link
>
<el-link size="small" type="primary" @click="addEdit('detail', row)"
>详情</el-link
>
<el-link size="small" type="danger" @click="deleteRow(row.id)"
>删除</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>
<template #footer>
<div class="dialog-footer">
@ -67,21 +125,58 @@
</template>
<script setup>
import { getMultiDictVal } from "@/utils/dict.js"
import { exportExlByObj } from "@/utils/exportExcel.js"
import { getMultiDictVal } from "@/utils/dict.js";
import { exportExlByObj } from "@/utils/exportExcel.js";
import MyTable from "@/components/aboutTable/MyTable.vue";
import Search from "@/components/aboutTable/Search.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { ref, reactive, getCurrentInstance, watch } from "vue";
import { useRoute, useRouter } from 'vue-router'
import { timeValidate } from '@/utils/tools.js'
import ZdrItemfrom from './zdrItem.vue'
const route = useRoute()
const router = useRouter()
const { proxy } = getCurrentInstance()
const { D_GS_ZDQT_ZT, D_GS_ZDR_RYJB, D_BZ_XB, D_BZ_MZ, D_BZ_XZQHDM, D_GS_ZDR_BK_ZT, D_GS_ZDR_CZZT, D_GS_BQ_ZL, D_GS_BQ_LB, D_GS_BQ_LX, D_GS_ZDR_YJDJ, D_GS_BK_SSJZ, D_GS_BK_SQLX, D_BZ_SF, D_GS_XS_LY, D_BZ_SSZT, D_GS_XS_LX, D_GS_XS_QTLX } =
proxy.$dict("D_GS_ZDQT_ZT", "D_GS_ZDR_RYJB", "D_BZ_XB", "D_BZ_MZ", "D_BZ_XZQHDM", "D_GS_ZDR_BK_ZT", "D_GS_ZDR_CZZT", "D_GS_BQ_ZL", "D_GS_BQ_LB", "D_GS_BQ_LX", "D_GS_ZDR_YJDJ", "D_GS_BK_SSJZ", "D_GS_BK_SQLX", "D_BZ_SF", "D_GS_XS_LY", "D_BZ_SSZT", "D_GS_XS_LX", "D_GS_XS_QTLX");
import { useRoute, useRouter } from "vue-router";
import { timeValidate } from "@/utils/tools.js";
import ZdrItemfrom from "./zdrItem.vue";
const route = useRoute();
const router = useRouter();
const { proxy } = getCurrentInstance();
const {
D_GS_ZDQT_ZT,
D_GS_ZDR_RYJB,
D_BZ_XB,
D_BZ_MZ,
D_BZ_XZQHDM,
D_GS_ZDR_BK_ZT,
D_GS_ZDR_CZZT,
D_GS_BQ_ZL,
D_GS_BQ_LB,
D_GS_BQ_LX,
D_GS_ZDR_YJDJ,
D_GS_BK_SSJZ,
D_GS_BK_SQLX,
D_BZ_SF,
D_GS_XS_LY,
D_BZ_SSZT,
D_GS_XS_LX,
D_GS_XS_QTLX
} = proxy.$dict(
"D_GS_ZDQT_ZT",
"D_GS_ZDR_RYJB",
"D_BZ_XB",
"D_BZ_MZ",
"D_BZ_XZQHDM",
"D_GS_ZDR_BK_ZT",
"D_GS_ZDR_CZZT",
"D_GS_BQ_ZL",
"D_GS_BQ_LB",
"D_GS_BQ_LX",
"D_GS_ZDR_YJDJ",
"D_GS_BK_SSJZ",
"D_GS_BK_SQLX",
"D_BZ_SF",
"D_GS_XS_LY",
"D_BZ_SSZT",
"D_GS_XS_LX",
"D_GS_XS_QTLX"
);
const obj = ref({});
const props = defineProps({
modelValue: {
@ -92,9 +187,9 @@ const props = defineProps({
type: Object,
default: () => ({})
}
})
});
const searchConfiger = ref([
{
{
label: "姓名",
prop: "ryXm",
placeholder: "请输入姓名",
@ -119,17 +214,17 @@ const searchConfiger = ref([
showType: "select",
options: D_GS_ZDR_RYJB
},
{
{
label: "所属部门",
prop: "gxSsbmdm",
placeholder: "请输入所属部门",
showType: "department",
},
showType: "department"
}
]);
const emit = defineEmits(['update:modelValue'])
const emit = defineEmits(["update:modelValue"]);
const closeDialog = () => {
emit('update:modelValue', false)
}
emit("update:modelValue", false);
};
const pageData = reactive({
tableData: [],
keyCount: 0,
@ -137,7 +232,7 @@ const pageData = reactive({
loading: false,
rowHieght: 40,
haveControls: false,
showSelectType:'null'
showSelectType: "null"
},
controlsWidth: 160, //操作栏宽度
total: 0,
@ -148,50 +243,54 @@ const pageData = reactive({
tableColumn: [
{ label: "姓名", prop: "ryXm" },
{ label: "性别", prop: "ryXb", showSolt: true },
{ label: "籍贯", prop: "ryJg", showSolt: true},
{ label: "籍贯", prop: "ryJg", showSolt: true },
{ label: "身份证", prop: "rySfzh" },
{ label: "民族", prop: "ryMz", showSolt: true },
{ label: "户籍地区划", prop: "hjdQh", showSolt: true },
{ label: "户籍派出所", prop: "hjdPcsmc" },
{ label: "户籍派出所", prop: "hjdPcsmc" }
],
tableHeight: "42vh",
tableHeight: "42vh"
});
const parameter = ref()
const parameter = ref();
const onSearch = (val) => {
parameter.value = { ...val }
parameter.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
changePage()
}
watch(() => props.modelValue, (val) => {
if (val) {
changePage()
changePage();
};
watch(
() => props.modelValue,
(val) => {
if (val) {
changePage();
}
}
})
);
const changePage = () => {
pageData.tableConfiger.loading = true;
let data = {...pageData.pageConfiger, ...parameter.value };
qcckGet(data, "/mosty-gsxt/tbGsxtZdry/selectPage").then((res) => {
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
}).catch(() => {
pageData.tableConfiger.loading = false;
});
}
let data = { ...pageData.pageConfiger, ...parameter.value };
qcckGet(data, "/mosty-gsxt/tbGsxtZdry/selectPage")
.then((res) => {
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
})
.catch(() => {
pageData.tableConfiger.loading = false;
});
};
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val;
changePage()
}
changePage();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
changePage()
}
changePage();
};
// 导出
const exportFile = () =>{
const exportFile = () => {
const titleObj = {
ryXm: "姓名",
ryXb_name: "性别",
@ -199,24 +298,22 @@ const exportFile = () =>{
rySfzh: "身份证",
ryMz_name: "民族",
hjdQh_name: "户籍地区划",
hjdPcsmc: "户籍派出所",
}
let list = pageData.tableData.map(item => ({
...item,
ryXb_name: getMultiDictVal(item.ryXb, D_BZ_XB),
ryJg_name: getMultiDictVal(item.ryJg, D_BZ_XZQHDM),
ryMz_name: getMultiDictVal(item.ryMz, D_BZ_MZ),
hjdQh_name: getMultiDictVal(item.hjdQh, D_BZ_XZQHDM),
}))
exportExlByObj(titleObj, list, '重点人总数')
}
hjdPcsmc: "户籍派出所"
};
let list = pageData.tableData.map((item) => ({
...item,
ryXb_name: getMultiDictVal(item.ryXb, D_BZ_XB),
ryJg_name: getMultiDictVal(item.ryJg, D_BZ_XZQHDM),
ryMz_name: getMultiDictVal(item.ryMz, D_BZ_MZ),
hjdQh_name: getMultiDictVal(item.hjdQh, D_BZ_XZQHDM)
}));
exportExlByObj(titleObj, list, "重点人总数");
};
</script>
<style scoped>
.expand-content{
max-height: 400px;
overflow: auto;
}
.expand-content {
max-height: 400px;
overflow: auto;
}
</style>

View File

@ -1,37 +1,89 @@
<template>
<el-dialog :model-value="modelValue" width="70%" @close="closeDialog" destroy-on-close append-to-body>
<el-dialog
:model-value="modelValue"
width="70%"
@close="closeDialog"
destroy-on-close
append-to-body
>
<template #title>
<div class="flex just-between align-center">
<span class="f18">{{ title }}</span>
<span @click="exportFile" class="f14 pointer" style="color: #0072ff;">下载</span>
<span
@click="exportFile"
class="f14 pointer"
style="color: #0072ff; margin-right: 30px"
>下载</span
>
</div>
</template>
<div>
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"></Search>
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
<Search
:searchArr="searchConfiger"
@submit="onSearch"
:key="pageData.keyCount"
></Search>
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
>
<template #yjtp="{ row }">
<div v-if="!row.yjtp || row.yjtp.includes('baidu')">
<img src="@/assets/images/car.png" width="65" height="70" v-if="row.yjlb == 2" />
<img src="@/assets/images/default_male.png" width="65" height="70" v-else />
<img
src="@/assets/images/car.png"
width="65"
height="70"
v-if="row.yjlb == 2"
/>
<img
src="@/assets/images/default_male.png"
width="65"
height="70"
v-else
/>
</div>
<el-image preview-teleported v-else @click.stop style="width: 65px; height: 70px" :src="row.yjtp"
:preview-src-list="[row.yjtp]" show-progress>
<el-image
preview-teleported
v-else
@click.stop
style="width: 65px; height: 70px"
:src="row.yjtp"
:preview-src-list="[row.yjtp]"
show-progress
>
<template #error>
<div class="image-slot error">
<img src="@/assets/images/car.png" width="65" height="70" v-if="row.yjlb == 2" />
<img src="@/assets/images/default_male.png" width="65" height="70" v-else />
<img
src="@/assets/images/car.png"
width="65"
height="70"
v-if="row.yjlb == 2"
/>
<img
src="@/assets/images/default_male.png"
width="65"
height="70"
v-else
/>
</div>
</template>
</el-image>
</template>
<template #yjjb="{ row }">
<DictTag :value="row.yjjb" :tag="false" :color="bqYs(row.yjjb)" :options="D_BZ_YJJB" />
<DictTag
:value="row.yjjb"
:tag="false"
:color="bqYs(row.yjjb)"
:options="D_BZ_YJJB"
/>
</template>
<template #yjlx="{ row }">
<DictTag :value="row.yjlx" :tag="false" :options="D_GS_ZDQT_YJLB" />
<DictTag :value="row.yjlx" :tag="false" :options="D_GS_ZDQT_YJLB" />
</template>
<template #yjlb="{ row }">
<DictTag :value="row.yjlb" :options="D_BZ_YJLX" />
@ -46,10 +98,15 @@
<!-- <el-link type="primary" @click="openAddModel(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>
<template #footer>
<div class="dialog-footer">
@ -61,16 +118,20 @@
</template>
<script setup>
import { exportExlByObj } from "@/utils/exportExcel.js"
import { getMultiDictVal } from "@/utils/dict.js"
import { exportExlByObj } from "@/utils/exportExcel.js";
import { getMultiDictVal } from "@/utils/dict.js";
import MyTable from "@/components/aboutTable/MyTable.vue";
import Search from "@/components/aboutTable/Search.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import { qcckGet, qcckPost } from "@/api/qcckApi.js";
import { ref, reactive, getCurrentInstance, watch } from "vue";
import {timeValidate} from '@/utils/tools.js'
const { proxy } = getCurrentInstance()
const { D_BZ_YJJB, D_GS_ZDQT_YJLB, D_BZ_YJLX } = proxy.$dict("D_BZ_YJJB", "D_GS_ZDQT_YJLB", "D_BZ_YJLX"); //获取字典数据
import { timeValidate } from "@/utils/tools.js";
const { proxy } = getCurrentInstance();
const { D_BZ_YJJB, D_GS_ZDQT_YJLB, D_BZ_YJLX } = proxy.$dict(
"D_BZ_YJJB",
"D_GS_ZDQT_YJLB",
"D_BZ_YJLX"
); //获取字典数据
const props = defineProps({
modelValue: {
type: Boolean,
@ -78,36 +139,55 @@ const props = defineProps({
},
type: {
type: String,
default: ''
default: ""
},
dict: {
type: Object,
default: () => ({})
}
})
});
const searchConfiger = ref([
{ label: "预警级别", prop: 'yjjbList', placeholder: "请选择预警级别", showType: "select", options: D_BZ_YJJB },
{
label: "预警级别",
prop: "yjjbList",
placeholder: "请选择预警级别",
showType: "select",
options: D_BZ_YJJB
},
// { label: "预警类型", prop: 'yjlxList', placeholder: "请输入身份证号码", showType: "select", options: D_GS_ZDQT_YJLB },
{
label: "上报时间",
prop: "startTime",
placeholder: "请选择时间",
showType: "datetimerange"
}, {
},
{
label: "所属部门",
prop: "ssbmdm",
placeholder: "请输入所属部门",
showType: "department",
},
showType: "department"
}
]);
const emit = defineEmits(['update:modelValue'])
const title = ref('')
const emit = defineEmits(["update:modelValue"]);
const title = ref("");
let today = new Date();
let startOfDay = new Date(today.getFullYear(), today.getMonth(), today.getDate());
let endOfDay = new Date(today.getFullYear(), today.getMonth(), today.getDate(), 23, 59, 59, 999);
let startOfDay = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate()
);
let endOfDay = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate(),
23,
59,
59,
999
);
const closeDialog = () => {
emit('update:modelValue', false)
}
emit("update:modelValue", false);
};
const pageData = reactive({
tableData: [],
keyCount: 0,
@ -115,8 +195,7 @@ const pageData = reactive({
loading: false,
rowHieght: 40,
haveControls: false,
showSelectType:'null'
showSelectType: "null"
},
controlsWidth: 160, //操作栏宽度
total: 0,
@ -135,79 +214,106 @@ showSelectType:'null'
{ label: "预警类型", prop: "yjlx", showSolt: true },
{ label: "预警时间", prop: "yjsj" },
{ label: "所属部门", prop: "ssbm" },
{ label: "车牌号", prop: "cph" },
{ label: "车牌号", prop: "cph" }
],
tableHeight: "43vh",
tableHeight: "43vh"
});
const parameter = ref()
const parameter = ref();
const onSearch = (val) => {
const promes = {
startTime: val.startTime && val.startTime.length > 0 ? val.startTime[0] : timeValidate(startOfDay),
endTime: val.startTime && val.startTime.length > 0 ? val.startTime[1] :timeValidate(endOfDay),
}
parameter.value = { ...val, ...promes }
startTime:
val.startTime && val.startTime.length > 0
? val.startTime[0]
: timeValidate(startOfDay),
endTime:
val.startTime && val.startTime.length > 0
? val.startTime[1]
: timeValidate(endOfDay)
};
parameter.value = { ...val, ...promes };
pageData.pageConfiger.pageCurrent = 1;
changePage()
}
watch(() => props.modelValue, (val) => {
if (val) {
title.value = props.type == 'wqs' ? '未签收预警' : props.type == 'yfk' ? '已反馈预警' : '预警总数'
// 获取今天的开始时间和结束时间
parameter.value = {startTime:timeValidate(startOfDay), endTime:timeValidate(endOfDay)}
changePage()
changePage();
};
watch(
() => props.modelValue,
(val) => {
if (val) {
title.value =
props.type == "wqs"
? "未签收预警"
: props.type == "yfk"
? "已反馈预警"
: "预警总数";
// 获取今天的开始时间和结束时间
parameter.value = {
startTime: timeValidate(startOfDay),
endTime: timeValidate(endOfDay)
};
changePage();
}
}
})
const ORDIMG = 'https://89.40.7.122:38496/image'
const IMGYM = 'https://sg.lz.dsj.xz/dhimage'
);
const ORDIMG = "https://89.40.7.122:38496/image";
const IMGYM = "https://sg.lz.dsj.xz/dhimage";
const changePage = () => {
pageData.tableConfiger.loading = true;
pageData.tableConfiger.loading = true;
const promes = {
...parameter.value,
yjjbList:parameter.value.yjjbList? [parameter.value.yjjbList] : [],
yjlxList: ['01'],
yjjbList: parameter.value.yjjbList ? [parameter.value.yjjbList] : [],
yjlxList: ["01"],
pageCurrent: pageData.pageConfiger.pageCurrent,
pageSize: pageData.pageConfiger.pageSize
}
};
if(props.type == 'wqs') promes.czzt = '01';
if(props.type == 'yfk') promes.czzt = '03';
if (props.type == "wqs") promes.czzt = "01";
if (props.type == "yfk") promes.czzt = "03";
qcckPost(promes, '/mosty-gsxt/tbYjxx/getPageAllList').then((res) => {
pageData.total = res.total || 0;
pageData.tableConfiger.loading = false;
pageData.tableData = res.records.map(item => {
return {
...item,
yjtp: item.yjlx == '01' ? item.yjtp.replace(ORDIMG, IMGYM) : item.yjtp
}
}) || [];
}).catch(() => {
pageData.tableConfiger.loading = false;
})
}
qcckPost(promes, "/mosty-gsxt/tbYjxx/getPageAllList")
.then((res) => {
console.log(res.records);
pageData.total = res.total || 0;
pageData.tableConfiger.loading = false;
pageData.tableData = res.records.map((item) => {
return {
...item,
yjtp:
item.yjlx == "01" && item.yjtp
? item.yjtp.replace(ORDIMG, IMGYM)
: item.yjtp
};
});
console.log(pageData.tableData);
})
.catch((err) => {
console.log(err);
pageData.tableConfiger.loading = false;
});
};
const bqYs = (val) => {
if (val == '01') {
return '#ff0202'
} else if (val == '02') {
return '#ff8c00'
} else if (val == '03') {
return '#ffd325'
} else if (val == '04') {
return '#0000ff'
if (val == "01") {
return "#ff0202";
} else if (val == "02") {
return "#ff8c00";
} else if (val == "03") {
return "#ffd325";
} else if (val == "04") {
return "#0000ff";
}
}
};
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val;
changePage()
}
changePage();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
changePage()
}
changePage();
};
// 导出
const exportFile = () =>{
const exportFile = () => {
const titleObj = {
ryxm: "姓名",
rysfzh: "身份证号",
@ -218,18 +324,16 @@ const exportFile = () =>{
yjlx_name: "预警类型",
yjsj: "预警时间",
ssbm: "所属部门",
cph: "车牌号",
}
let list = pageData.tableData.map(item => ({
...item,
yjjb_name: getMultiDictVal(item.yjjb, D_BZ_YJJB),
yjlb_name: getMultiDictVal(item.yjlb, D_BZ_YJLX),
yjlx_name: getMultiDictVal(item.yjlx, D_GS_ZDQT_YJLB),
}))
exportExlByObj(titleObj, list, title.value)
}
cph: "车牌号"
};
let list = pageData.tableData.map((item) => ({
...item,
yjjb_name: getMultiDictVal(item.yjjb, D_BZ_YJJB),
yjlb_name: getMultiDictVal(item.yjlb, D_BZ_YJLX),
yjlx_name: getMultiDictVal(item.yjlx, D_GS_ZDQT_YJLB)
}));
exportExlByObj(titleObj, list, title.value);
};
</script>
<style scoped></style>

View File

@ -1,16 +1,37 @@
<template>
<el-dialog :model-value="modelValue" width="70%" @close="closeDialog" destroy-on-close append-to-body :close-on-click-modal="false" >
<el-dialog
:model-value="modelValue"
width="70%"
@close="closeDialog"
destroy-on-close
append-to-body
:close-on-click-modal="false"
>
<template #title>
<div class="flex just-between align-center">
<span class="f18">{{ props.title }}</span>
<span @click="exportFile" class="f14 pointer" style="color: #0072ff;">下载</span>
<span
@click="exportFile"
class="f14 pointer"
style="color: #0072ff; margin-right: 30px"
>下载</span
>
</div>
</template>
<div>
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"></Search>
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
<Search
:searchArr="searchConfiger"
@submit="onSearch"
:key="pageData.keyCount"
></Search>
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
>
<template #zllx="{ row }">
<DictTag :tag="false" :value="row.zllx" :options="D_GS_XS_ZLLX" />
</template>
@ -21,16 +42,21 @@
<DictTag :tag="false" :value="row.czzt" :options="D_GS_XS_CZZT" />
</template>
<template #sffk="{ row }">
{{ row.sffk == '1' ? '已反馈' : '未反馈' }}
{{ row.sffk == "1" ? "已反馈" : "未反馈" }}
</template>
<template #sfqs="{ row }">
{{ row.sfqs == '0' ? '未签收' : '已签收' }}
{{ row.sfqs == "0" ? "未签收" : "已签收" }}
</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>
<template #footer>
<div class="dialog-footer">
@ -42,15 +68,22 @@
</template>
<script setup>
import { getMultiDictVal } from "@/utils/dict.js"
import { exportExlByObj } from "@/utils/exportExcel.js"
import { getMultiDictVal } from "@/utils/dict.js";
import { exportExlByObj } from "@/utils/exportExcel.js";
import MyTable from "@/components/aboutTable/MyTable.vue";
import Search from "@/components/aboutTable/Search.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import { xxcjXfxsSelectPage } from "@/api/xxcj.js"
import { xxcjXfxsSelectPage } from "@/api/xxcj.js";
import { ref, reactive, getCurrentInstance, watch } from "vue";
const { proxy } = getCurrentInstance()
const { D_BZ_SF,D_GS_XS_SJLY, D_GS_XS_ZLLX, D_GS_ZDQT_FXDJ, D_GS_XS_CZZT } = proxy.$dict('D_BZ_SF','D_GS_XS_SJLY', 'D_GS_XS_ZLLX', 'D_GS_ZDQT_FXDJ', 'D_GS_XS_CZZT')
const { proxy } = getCurrentInstance();
const { D_BZ_SF, D_GS_XS_SJLY, D_GS_XS_ZLLX, D_GS_ZDQT_FXDJ, D_GS_XS_CZZT } =
proxy.$dict(
"D_BZ_SF",
"D_GS_XS_SJLY",
"D_GS_XS_ZLLX",
"D_GS_ZDQT_FXDJ",
"D_GS_XS_CZZT"
);
const props = defineProps({
modelValue: {
type: Boolean,
@ -66,23 +99,46 @@ const props = defineProps({
},
sfqs: {
type: String,
default: ''
default: ""
},
sffk: {
type: String,
default: ''
default: ""
}
})
});
const searchConfiger = ref([
{ label: "指令标题", prop: 'zlbt', placeholder: "请输入指令标题", showType: "input" },
{ label: "指令类型", prop: 'zllx', placeholder: "请选择指令类型", showType: "select", options: D_GS_XS_ZLLX },
{ label: "指令等级", prop: 'zldj', placeholder: "请选择指令等级", showType: "select", options: D_GS_ZDQT_FXDJ },
{ label: "处置状态", prop: 'czzt', placeholder: "请选择处置状态", showType: "select", options: D_GS_XS_CZZT },
{
label: "指令标题",
prop: "zlbt",
placeholder: "请输入指令标题",
showType: "input"
},
{
label: "指令类型",
prop: "zllx",
placeholder: "请选择指令类型",
showType: "select",
options: D_GS_XS_ZLLX
},
{
label: "指令等级",
prop: "zldj",
placeholder: "请选择指令等级",
showType: "select",
options: D_GS_ZDQT_FXDJ
},
{
label: "处置状态",
prop: "czzt",
placeholder: "请选择处置状态",
showType: "select",
options: D_GS_XS_CZZT
}
]);
const emit = defineEmits(['update:modelValue'])
const emit = defineEmits(["update:modelValue"]);
const closeDialog = () => {
emit('update:modelValue', false)
}
emit("update:modelValue", false);
};
const pageData = reactive({
tableData: [],
keyCount: 0,
@ -90,7 +146,7 @@ const pageData = reactive({
loading: false,
rowHieght: 40,
haveControls: false,
showSelectType: 'null',
showSelectType: "null"
},
controlsWidth: 160, //操作栏宽度
total: 0,
@ -99,29 +155,30 @@ const pageData = reactive({
pageCurrent: 1
}, //分页
tableColumn: [
{ label: '指令标题', prop: 'zlbt' },
{ label: '指令类型', prop: 'zllx', showSolt: true },
{ label: '指令等级', prop: 'zldj', showSolt: true },
{ label: '反馈截止时间', prop: 'jssj' },
{ label: '处置状态', prop: 'czzt', showSolt: true },
{ label: '是否反馈', prop: 'sffk', showSolt: true },
{ label: '是否签收', prop: 'sfqs', showSolt: true },
{ label: "指令标题", prop: "zlbt" },
{ label: "指令类型", prop: "zllx", showSolt: true },
{ label: "指令等级", prop: "zldj", showSolt: true },
{ label: "反馈截止时间", prop: "jssj" },
{ label: "处置状态", prop: "czzt", showSolt: true },
{ label: "是否反馈", prop: "sffk", showSolt: true },
{ label: "是否签收", prop: "sfqs", showSolt: true }
],
tableHeight: "43vh",
tableHeight: "43vh"
});
const parameter = ref()
const parameter = ref();
const onSearch = (val) => {
parameter.value = { ...val }
parameter.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
changePage()
}
watch(() => props.modelValue, (val) => {
if (val) {
changePage()
changePage();
};
watch(
() => props.modelValue,
(val) => {
if (val) {
changePage();
}
}
})
);
const changePage = () => {
pageData.tableConfiger.loading = true;
@ -130,28 +187,30 @@ const changePage = () => {
pageCurrent: pageData.pageConfiger.pageCurrent,
pageSize: pageData.pageConfiger.pageSize,
sfqs: props.sfqs,
sffk: props.sffk,
}
xxcjXfxsSelectPage(promes).then((res) => {
pageData.total = res.total || 0;
pageData.tableConfiger.loading = false;
pageData.tableData = res.records
}).catch(() => {
pageData.tableConfiger.loading = false;
})
}
sffk: props.sffk
};
xxcjXfxsSelectPage(promes)
.then((res) => {
pageData.total = res.total || 0;
pageData.tableConfiger.loading = false;
pageData.tableData = res.records;
})
.catch(() => {
pageData.tableConfiger.loading = false;
});
};
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val;
changePage()
}
changePage();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
changePage()
}
changePage();
};
// 导出
const exportFile = () =>{
const exportFile = () => {
const titleObj = {
zlbt: "指令标题",
zllx_name: "指令类型",
@ -159,19 +218,18 @@ const exportFile = () =>{
jssj: "反馈截止时间",
czzt_name: "处置状态",
jsffk_name: "是否反馈",
sfqs_name: "是否签收",
}
let list = pageData.tableData.map(item => ({
...item,
zllx_name: getMultiDictVal(item.zllx, D_GS_XS_ZLLX),
zldj_name: getMultiDictVal(item.zldj, D_GS_ZDQT_FXDJ),
czzt_name: getMultiDictVal(item.czzt, D_GS_XS_CZZT),
sffk_name: getMultiDictVal(item.sffk, D_BZ_SF),
sfqs_name: getMultiDictVal(item.sfqs, D_BZ_SF),
}))
exportExlByObj(titleObj, list, props.title)
}
sfqs_name: "是否签收"
};
let list = pageData.tableData.map((item) => ({
...item,
zllx_name: getMultiDictVal(item.zllx, D_GS_XS_ZLLX),
zldj_name: getMultiDictVal(item.zldj, D_GS_ZDQT_FXDJ),
czzt_name: getMultiDictVal(item.czzt, D_GS_XS_CZZT),
sffk_name: getMultiDictVal(item.sffk, D_BZ_SF),
sfqs_name: getMultiDictVal(item.sfqs, D_BZ_SF)
}));
exportExlByObj(titleObj, list, props.title);
};
</script>
<style scoped></style>

View File

@ -1,33 +1,64 @@
<template>
<el-dialog :model-value="modelValue" width="70%" @close="closeDialog" destroy-on-close append-to-body>
<el-dialog
:model-value="modelValue"
width="70%"
@close="closeDialog"
destroy-on-close
append-to-body
>
<template #title>
<div class="flex just-between align-center">
<span class="f18">线索总数</span>
<span @click="exportFile" class="f14 pointer" style="color: #0072ff;">下载</span>
<span
@click="exportFile"
class="f14 pointer"
style="color: #0072ff; margin-right: 30px"
>下载</span
>
</div>
</template>
<div>
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"></Search>
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
<template #qblx="{row}">
<Search
:searchArr="searchConfiger"
@submit="onSearch"
:key="pageData.keyCount"
></Search>
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
>
<template #qblx="{ row }">
<DictTag :tag="false" :value="row.qblx" :options="D_GS_XS_LX" />
</template>
<template #cjLx="{row}">
<template #cjLx="{ row }">
<DictTag :tag="false" :value="row.cjLx" :options="D_GS_XS_LY" />
</template>
<!-- <template #czzt="{row}">
<DictTag :tag="false" :value="row.czzt" :options="D_GS_XS_CZZT" />
</template> -->
<template #shzt="{row}">
<template #shzt="{ row }">
<!-- 采纳将这条信息推送到情报管理,退回 -->
<DictTag :tag="false" :value="row.shzt" :options="D_BZ_XSSHZT" @clickTag="clickTag(row.shzt)" />
<DictTag
:tag="false"
:value="row.shzt"
:options="D_BZ_XSSHZT"
@clickTag="clickTag(row.shzt)"
/>
</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>
<template #footer>
<div class="dialog-footer">
@ -39,15 +70,20 @@
</template>
<script setup>
import { getMultiDictVal } from "@/utils/dict.js"
import { exportExlByObj } from "@/utils/exportExcel.js"
import { getMultiDictVal } from "@/utils/dict.js";
import { exportExlByObj } from "@/utils/exportExcel.js";
import MyTable from "@/components/aboutTable/MyTable.vue";
import Search from "@/components/aboutTable/Search.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import { xxcjQbcjSelectPage, xxcjXfxsSelectPage } from "@/api/xxcj.js"
import { xxcjQbcjSelectPage, xxcjXfxsSelectPage } from "@/api/xxcj.js";
import { ref, reactive, getCurrentInstance, watch } from "vue";
const { proxy } = getCurrentInstance()
const {D_GS_XS_CZZT,D_GS_XS_LY, D_GS_XS_LX ,D_BZ_XSSHZT} = proxy.$dict("D_GS_XS_CZZT","D_GS_XS_LY","D_GS_XS_LX","D_BZ_XSSHZT"); //获取字典数据
const { proxy } = getCurrentInstance();
const { D_GS_XS_CZZT, D_GS_XS_LY, D_GS_XS_LX, D_BZ_XSSHZT } = proxy.$dict(
"D_GS_XS_CZZT",
"D_GS_XS_LY",
"D_GS_XS_LX",
"D_BZ_XSSHZT"
); //获取字典数据
const props = defineProps({
modelValue: {
type: Boolean,
@ -56,19 +92,40 @@ const props = defineProps({
dict: {
type: Object,
default: () => ({})
},
})
}
});
const searchConfiger = ref([
{ label: "线索名称", prop: 'qbmc', placeholder: "请输入线索名称", showType: "input" },
{ label: "内容关键字", prop: 'qbnr', placeholder: "请输入语义关键字", showType: "input" },
{ label: "线索类型", prop: 'qblx', placeholder: "请选择线索类型", showType: "select",options:D_GS_XS_LX },
{ label: "线索来源", prop: 'cjLx', placeholder: "请选择线索来源", showType: "select",options:D_GS_XS_LY },
{
label: "线索名称",
prop: "qbmc",
placeholder: "请输入线索名称",
showType: "input"
},
{
label: "内容关键字",
prop: "qbnr",
placeholder: "请输入语义关键字",
showType: "input"
},
{
label: "线索类型",
prop: "qblx",
placeholder: "请选择线索类型",
showType: "select",
options: D_GS_XS_LX
},
{
label: "线索来源",
prop: "cjLx",
placeholder: "请选择线索来源",
showType: "select",
options: D_GS_XS_LY
}
]);
const emit = defineEmits(['update:modelValue'])
const emit = defineEmits(["update:modelValue"]);
const closeDialog = () => {
emit('update:modelValue', false)
}
emit("update:modelValue", false);
};
const pageData = reactive({
tableData: [],
keyCount: 0,
@ -76,7 +133,7 @@ const pageData = reactive({
loading: false,
rowHieght: 40,
haveControls: false,
showSelectType: 'null',
showSelectType: "null"
},
controlsWidth: 160, //操作栏宽度
total: 0,
@ -87,53 +144,58 @@ const pageData = reactive({
tableColumn: [
{ label: "线索编号", prop: "xsBh" },
{ label: "线索名称", prop: "qbmc" },
{ label: "线索类型", prop: "qblx",showSolt:true },
{ label: "线索来源", prop: "cjLx",showSolt:true },
{ label: "上报时间", prop: "sxsbsj",showOverflowTooltip:true },
{ label: "线索内容", prop: "qbnr"},
{ label: "审核状态", prop: "shzt", showSolt: true },
{ label: "线索类型", prop: "qblx", showSolt: true },
{ label: "线索来源", prop: "cjLx", showSolt: true },
{ label: "上报时间", prop: "sxsbsj", showOverflowTooltip: true },
{ label: "线索内容", prop: "qbnr" },
{ label: "审核状态", prop: "shzt", showSolt: true }
],
tableHeight: "43vh",
tableHeight: "43vh"
});
const parameter = ref()
const parameter = ref();
const onSearch = (val) => {
parameter.value = { ...val}
parameter.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
changePage()
}
watch(() => props.modelValue, (val) => {
if (val) {
changePage()
changePage();
};
watch(
() => props.modelValue,
(val) => {
if (val) {
changePage();
}
}
})
);
const changePage = () => {
pageData.tableConfiger.loading = true;
pageData.tableConfiger.loading = true;
const promes = {
...parameter.value,
pageCurrent: pageData.pageConfiger.pageCurrent,
pageSize: pageData.pageConfiger.pageSize
}
xxcjQbcjSelectPage(promes).then((res) => {
pageData.total = res.total || 0;
pageData.tableConfiger.loading = false;
pageData.tableData = res.records
}).catch(() => {
pageData.tableConfiger.loading = false;
})
}
};
xxcjQbcjSelectPage(promes)
.then((res) => {
pageData.total = res.total || 0;
pageData.tableConfiger.loading = false;
pageData.tableData = res.records;
})
.catch(() => {
pageData.tableConfiger.loading = false;
});
};
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val;
changePage()
}
changePage();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
changePage()
}
changePage();
};
// 导出
const exportFile = () =>{
const exportFile = () => {
const titleObj = {
xsBh: "线索编号",
qbmc: "线索名称",
@ -141,18 +203,16 @@ const exportFile = () =>{
cjLx_name: "线索来源",
sxsbsj: "上报时间",
qbnr: "线索内容",
shzt_name: "审核状态",
}
let list = pageData.tableData.map(item => ({
...item,
qblx_name: getMultiDictVal(item.qblx, D_GS_XS_LX),
cjLx_name: getMultiDictVal(item.cjLx, D_GS_XS_LY),
shzt_name: getMultiDictVal(item.shzt, D_BZ_XSSHZT),
}))
exportExlByObj(titleObj, list, '线索总数')
}
shzt_name: "审核状态"
};
let list = pageData.tableData.map((item) => ({
...item,
qblx_name: getMultiDictVal(item.qblx, D_GS_XS_LX),
cjLx_name: getMultiDictVal(item.cjLx, D_GS_XS_LY),
shzt_name: getMultiDictVal(item.shzt, D_BZ_XSSHZT)
}));
exportExlByObj(titleObj, list, "线索总数");
};
</script>
<style scoped></style>

View File

@ -1,9 +1,20 @@
<template>
<DialogDragger title="预警详情" top="150px" v-model="props.show" @close="close">
<DialogDragger
title="预警详情"
top="150px"
v-model="props.show"
@close="close"
>
<ul class="warningList" ref="gjyjList">
<li v-for="item in props.data" :key="item">
<deployControlItem :item="item" :buttonBox="true" @plotThetrajectory="plotThetrajectory"
@showFeedback="showFeedback" @showDetail="showDetail" @fkLxOptions="fkLxOptions" />
<deployControlItem
:item="item"
:buttonBox="true"
@plotThetrajectory="plotThetrajectory"
@showFeedback="showFeedback"
@showDetail="showDetail"
@fkLxOptions="fkLxOptions"
/>
</li>
<MOSTY.Empty :show="props.data.length <= 0" :imgSize="150"></MOSTY.Empty>
</ul>
@ -24,16 +35,24 @@
点击收起地图
</div> -->
<GdMap :mapKey="'home_yj_map'" :mapid="'homeYjMap'" />
</div>
</div>
</DialogDragger>
<FkDialog @change="close" :lx="fkLx" />
<Information v-model="showDialog" title="发送指令" @submit='submit' @close='closeFszl'>
<SemdFqzl ref="semdFqzlRef" :itemData="itemData" @handleClose="handleClose" identification="yj"
:tacitly="tacitly" />
<Information
v-model="showDialog"
title="发送指令"
@submit="submit"
@close="closeFszl"
>
<SemdFqzl
ref="semdFqzlRef"
:itemData="itemData"
@handleClose="handleClose"
identification="yj"
:tacitly="tacitly"
/>
</Information>
</template>
<script setup>
import * as MOSTY from "@/components/MyComponents/index";
@ -41,14 +60,14 @@ import GdMap from "@/components/GdMap/index.vue";
import DialogDragger from "@/views/home/layout/dialogDragger.vue";
import deployControlItem from "@/views/home/components/deployControlItem.vue";
import Information from "@/views/home/model/information.vue";
import SemdFqzl from '@/components/instructionHasBeen/sendFqzl.vue'
import SemdFqzl from "@/components/instructionHasBeen/sendFqzl.vue";
import FkDialog from "@/views/backOfficeSystem/fourColorManage/warningControl/centerHome/components/fkDialog.vue";
import { tbYjxxGsgj } from '@/api/yj'
import { tbYjxxGsgj } from "@/api/yj";
import { ref, defineProps, onMounted, watch, getCurrentInstance } from "vue";
import { ArrowUpBold, ArrowDownBold } from '@element-plus/icons-vue';
import { ArrowUpBold, ArrowDownBold } from "@element-plus/icons-vue";
import emitter from "@/utils/eventBus.js";
const gjyjList = ref(null); //预警列表数据
const fkLx = ref('01')
const fkLx = ref("01");
//参数传递
const props = defineProps({
@ -60,21 +79,21 @@ const props = defineProps({
show: {
type: Boolean,
default: false
},
}
});
//关闭
function close() {
emitter.emit('deletePointArea', 'home_yj_map');
emitter.emit("deletePointArea", "home_yj_map");
emitter.emit("showHomeYJ", false);
emitter.emit("closeYp")
emitter.emit("closeYp");
}
const showMap = ref(false)
const showMap = ref(false);
// 初始化地图数据的函数
const initMapData = () => {
// 只删除一次home_yj_map区域的点避免影响其他地图
emitter.emit('deletePointArea', 'home_yj_map');
emitter.emit("deletePointArea", "home_yj_map");
// 收集所有有效坐标的数据点
const validPoints = [];
@ -92,32 +111,32 @@ const initMapData = () => {
// 如果有有效点,显示第一条并添加所有点
if (validPoints.length > 0) {
// 只显示第一条数据的详情
emitter.emit('showHomeYJ', [validPoints[0]]);
emitter.emit("showHomeYJ", [validPoints[0]]);
// 为每个有效点添加标记
validPoints.forEach((item, index) => {
let icon = require('@/assets/point/yj.png');
if (item.yjjb == '20') icon = require('@/assets/point/yj1.png');
if (item.yjjb == '30') icon = require('@/assets/point/yj2.png');
if (item.yjjb == '40') icon = require('@/assets/point/yj3.png');
let icon = require("@/assets/point/yj.png");
if (item.yjjb == "20") icon = require("@/assets/point/yj1.png");
if (item.yjjb == "30") icon = require("@/assets/point/yj2.png");
if (item.yjjb == "40") icon = require("@/assets/point/yj3.png");
// 为每个点添加唯一标识,避免与其他地图冲突
emitter.emit('addPointArea', {
emitter.emit("addPointArea", {
flag: `home_yj_map_${index}`,
baseFlag: 'home_yj_map',
baseFlag: "home_yj_map",
icon,
coords: [item]
});
});
// 只设置一次地图中心(使用第一个有效点)
emitter.emit('setMapCenter', {
emitter.emit("setMapCenter", {
location: [validPoints[0].jd, validPoints[0].wd],
zoomLevel: 10,
flag: 'home_yj_map' // 添加标识,确保只影响当前地图
flag: "home_yj_map" // 添加标识,确保只影响当前地图
});
}
}
};
// 切换地图显示/隐藏
const toggleMap = () => {
@ -128,15 +147,19 @@ const toggleMap = () => {
initMapData();
}, 500);
}
}
};
onMounted(() => {
// 组件挂载时不自动展开地图,等待用户点击
})
const handleHs = ref(0)
watch(() => gjyjList.value, (val) => {
handleHs.value = 500
}, { deep: true })
});
const handleHs = ref(0);
watch(
() => gjyjList.value,
(val) => {
handleHs.value = 500;
},
{ deep: true }
);
// 轨迹上图
const plotThetrajectory = (val) => {
@ -144,12 +167,12 @@ const plotThetrajectory = (val) => {
startTime: null,
endTime: null,
yjRysfzh: val
}).then(res => {
}).then((res) => {
console.log(res);
if (res && res[0].list.length > 0) {
let coords = res[0].list.map(item => {
return [item.jd, item.wd]
})
let coords = res[0].list.map((item) => {
return [item.jd, item.wd];
});
// const coords = [
// [
// 94.3695802486277983689433312974870204925537109375,
@ -220,48 +243,45 @@ const plotThetrajectory = (val) => {
// 29.656946809372101370172458700835704803466796875
// ]
// ]
emitter.emit('drawLineAnimation', {
emitter.emit("drawLineAnimation", {
type: "solid",
coords: coords,
isclear: true,
flag: "yjLine"
})
});
} else {
ElMessage({ message: '暂无轨迹数据', type: 'warning' });
ElMessage({ message: "暂无轨迹数据", type: "warning" });
}
})
}
});
};
// 查看反馈
const showFeedback = (val) => {
emitter.emit("openFkDialog", val)
}
emitter.emit("openFkDialog", val);
};
const fkLxOptions = (val) => {
fkLx.value = val.yjlx
}
fkLx.value = val.yjlx;
};
// 发送指令
const showDialog = ref(false)
const itemData = ref()
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 closeFszl = () => {
semdFqzlRef.value.close()
}
semdFqzlRef.value.close();
};
</script>
<style lang="scss" scoped>

View File

@ -3,7 +3,7 @@
</template>
<script setup>
import * as echarts from "echarts";
import { defineProps, watch, nextTick } from "vue";
import { defineProps, watch, nextTick, onMounted, onBeforeUnmount } from "vue";
const props = defineProps({
echartsId:{
type:String,
@ -18,14 +18,23 @@ const props = defineProps({
default:[]
}
});
// 保存图表实例和 resize 处理函数
let myChart = null;
const handleResize = () => {
myChart && myChart.resize();
};
// 监听数据变化
watch(()=>props.data,val=>{
nextTick(()=>{ chartFn(val) })
},{immediate:true,deep:true})
function chartFn() {
// 创建新实例
let myChart = echarts.init(document.getElementById(props.echartsId));
// 复用已有的图表实例,避免重复创建
if (!myChart) {
myChart = echarts.init(document.getElementById(props.echartsId));
}
var option = {
grid: {
top: "8%",
@ -106,13 +115,21 @@ function chartFn() {
]
};
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>

View File

@ -5,7 +5,7 @@
import * as echarts from "echarts";
import { el } from "element-plus/es/locale.mjs";
import { on } from "element-plus/lib/utils";
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:{
@ -24,11 +24,17 @@ const props = defineProps({
}
}
});
// 保存图表实例和 resize 处理函数
let myChart = null;
const handleResize = () => {
myChart && myChart.resize();
};
watch(()=>props.data,val=>{
nextTick(()=>{ init(val) })
},{immediate:true,deep:true})
// 初始化
function init (val) {
let color = val.color;
@ -63,7 +69,10 @@ function init (val) {
}
function chartFn(series) {
var myChart = echarts.init(document.getElementById(props.echartsId));
// 复用已有的图表实例,避免重复创建
if (!myChart) {
myChart = echarts.init(document.getElementById(props.echartsId));
}
var option = {
grid: {
top: "12%",
@ -113,10 +122,21 @@ function chartFn(series) {
series:series
};
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>

View File

@ -3,7 +3,7 @@
</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:{
@ -30,13 +30,19 @@ const props = defineProps({
default:0
}
});
// 保存图表实例和 resize 处理函数
let myChart = null;
const handleResize = () => {
myChart && myChart.resize();
};
watch(()=>props.data,val=>{
nextTick(()=>{
init(val)
init(val)
})
},{immediate:true,deep:true})
// 初始化
function init (val) {
let color = val.color;
@ -66,7 +72,10 @@ function init (val) {
}
function chartFn(series) {
var myChart = echarts.init(document.getElementById(props.echartsId));
// 复用已有的图表实例,避免重复创建
if (!myChart) {
myChart = echarts.init(document.getElementById(props.echartsId));
}
var option = {
grid: {
top: "20%",
@ -122,23 +131,24 @@ function chartFn(series) {
axisLine: { show: false },
axisLabel: { color: props.data.labelColor || "#fff", },
},
// dataZoom: [{
// disabled: props.dataZoom,
// type: 'slider',
// show: true,
// xAxisIndex: [0],
// bottom: 10,
// height: 15,
// start: 0,
// end: 100
// }],
series:series
};
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>

View File

@ -5,7 +5,7 @@
<script setup>
import * as echarts from "echarts";
import "echarts-gl";
import { ref, watch ,defineProps,nextTick } from "vue";
import { ref, watch ,defineProps,nextTick, onMounted, onBeforeUnmount } from "vue";
const props = defineProps({
echartsId:{
type:String,
@ -20,6 +20,13 @@ const props = defineProps({
default:[]
}
});
// 保存图表实例和 resize 处理函数
let myChart = null;
const handleResize = () => {
myChart && myChart.resize();
};
watch(()=>props.data,val=>{
nextTick(()=>{ handleDate(val) })
},{immediate:true,deep:true})
@ -37,7 +44,10 @@ const handleDate = (val)=>{
}
const initChart = (data) => {
var myChart = echarts.init(document.getElementById(props.echartsId));
// 复用已有的图表实例,避免重复创建
if (!myChart) {
myChart = echarts.init(document.getElementById(props.echartsId));
}
const option = {
backgroundColor: "transparent",
tooltip: {
@ -102,13 +112,21 @@ const initChart = (data) => {
};
option && myChart.setOption(option);
// 监听窗口大小变化
window.addEventListener("resize", () => {
myChart.resize();
});
};
// 组件挂载时添加 resize 监听
onMounted(() => {
window.addEventListener("resize", handleResize);
});
// 组件卸载时清理资源
onBeforeUnmount(() => {
window.removeEventListener("resize", handleResize);
if (myChart) {
myChart.dispose();
myChart = null;
}
});
</script>
<style lang="scss" scoped>

View File

@ -312,10 +312,19 @@ const getDepId = () => {
};
const handleOpenNotification = () => {
if (allDep.value.length == 0) {
return;
}
clearInterval(popupTimer.value);
showNotification.value = !showNotification.value;
emitter.emit("deletePointArea", "hm_pop");
if (showNotification.value) {
emitter.emit("setMapCenter", {
location: [94.36057012, 29.64276831],
zoomLevel: 7.8
});
// 主动展开提示,默认展示所有
allDep.value.forEach((item) => {
emitter.emit("makerPopup", {
@ -324,7 +333,6 @@ const handleOpenNotification = () => {
type: "Custom"
});
});
} else {
// 关闭主动展开后,恢复循环单条气泡展示
startPopupLoop();
@ -356,9 +364,9 @@ const closeLayBack = () => {
// 初始化音频播放器
const initAudioPlayer = () => {
// 使用工具类初始化音频播放器
audioPlayer.init(require("@/assets/images/yjsy.mp3")).then(() => {
console.log("音频播放器初始化成功");
// 只有当ispLayBack为true时才播放
audioPlayer
.init(require("@/assets/images/yjsy.mp3"))
.then(() => {
if (ispLayBack.value) {
audioPlayer.muted = false;
}
@ -373,7 +381,11 @@ const startPopupLoop = () => {
popupTimer.value = setInterval(() => {
if (!showNotification.value && allDep.value.length > 0) {
emitter.emit("deletePointArea", "hm_pop");
emitter.emit("makerPopup", { data: allDep.value[indexNum.value], flag: "hm_pop", type: "Custom" });
emitter.emit("makerPopup", {
data: allDep.value[indexNum.value],
flag: "hm_pop",
type: "Custom"
});
indexNum.value = (indexNum.value + 1) % allDep.value.length;
}
}, 10000);
@ -382,7 +394,10 @@ const startPopupLoop = () => {
// 搜索
const handleSearch = () => {
if (!searchText.value) return proxy.$message.warning("请输入身份证号");
qcckPost({ rysfzh: searchText.value },"/mosty-gsxt/tbYjxx/getPageAllList").then((res) => {
qcckPost(
{ rysfzh: searchText.value },
"/mosty-gsxt/tbYjxx/getPageAllList"
).then((res) => {
peoDialogRef.value.init(res.records || []);
});
};
@ -391,8 +406,22 @@ const handleSearch = () => {
const getTbYjxxGetList = () => {
// 设置为当天时间范围00:00:00 到 23:59:59
const today = new Date();
const startTime = new Date(today.getFullYear(), today.getMonth(), today.getDate(),0,0,0).getTime();
const endTime = new Date( today.getFullYear(), today.getMonth(), today.getDate(), 23, 59, 59).getTime();
const startTime = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate(),
0,
0,
0
).getTime();
const endTime = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate(),
23,
59,
59
).getTime();
const promes = {
startTime: timeValidate(startTime),
endTime: timeValidate(endTime)
@ -413,7 +442,12 @@ const getTbYjxxGetList = () => {
};
});
const icon = require("@/assets/point/yj.png");
emitter.emit("addPoint", { coords: coords, icon: icon, flag: "yj", fontColor: "#FF0000"});
emitter.emit("addPoint", {
coords: coords,
icon: icon,
flag: "yj",
fontColor: "#FF0000"
});
});
};
@ -424,7 +458,6 @@ const reversalPush = () => {
const reversal = () => {
reversalShow.value = !reversalShow.value;
// 移除clearInterval调用避免定时器被清除
};
// 鼠标移入
@ -434,9 +467,7 @@ const mouseEnter = () => {
// 鼠标移出
const mouseLeave = () => {
// 清除可能存在的旧定时器,避免多个定时器同时运行
clearInterval(timing.value);
// 设置为5秒自动切换更容易测试效果
timing.value = setInterval(() => {
reversalPush();
reversal();
@ -448,6 +479,59 @@ function changeModel() {
modelWarning.value = !modelWarning.value;
}
// WebSocket 音频事件处理
const handleOpenYp = (newsDate) => {
if (ispLayBack.value) {
audioPlayer
.play()
.catch((error) => {
console.error("WebSocket触发音频播放失败:", error);
});
const coords = {
id: newsDate.id,
jd: newsDate.jd,
wd: newsDate.wd,
yjtp: newsDate.yjTp,
yjnr: newsDate.yjNr,
yjLx: newsDate.yjlx,
yjlx: "01",
yjsj: newsDate.yjSj,
rysfzh: newsDate.yjRysfzh,
ryxm: newsDate.yjRyxm
};
const icons = require("@/assets/point/jq.png");
emitter.emit("addPointArea", {
coords: [{ jd: coords.jd, wd: coords.wd }],
icon: icons,
flag: "yjs"
});
emitter.emit("yjDetail", coords);
}
};
const handleCloseYp = () => {
audioPlayer.pause();
};
// ============================================
// 自动刷新定时器逻辑
// ============================================
const refreshTimer = ref(null);
const IDLE_TIMEOUT = 15 * 60 * 1000;
const resetRefreshTimer = () => {
if (refreshTimer.value) {
clearTimeout(refreshTimer.value);
}
refreshTimer.value = setTimeout(() => {
window.location.reload();
}, IDLE_TIMEOUT);
};
const handleMouseActivity = () => {
resetRefreshTimer();
};
// 组件挂载时初始化音频播放器
onMounted(() => {
getDepId();
@ -460,39 +544,19 @@ onMounted(() => {
getTbYjxxGetList();
// 初始化音频播放器
initAudioPlayer();
// 监听音频播放事件获取WebSocket消息数据
emitter.on("openYp", (newsDate) => {
// 使用工具类播放音频,自动处理静音切换
if (ispLayBack.value) {
audioPlayer.play().then(() => {
console.log("WebSocket触发音频播放成功");
}).catch((error) => {
console.error("WebSocket触发音频播放失败:", error);
});
const coords = {
id: newsDate.id,
jd: newsDate.jd,
wd: newsDate.wd,
yjtp: newsDate.yjTp,
yjnr: newsDate.yjNr,
yjLx: newsDate.yjlx,
yjlx: "01",
yjsj: newsDate.yjSj,
rysfzh: newsDate.yjRysfzh,
ryxm: newsDate.yjRyxm
};
const icons = require("@/assets/point/jq.png");
emitter.emit("addPointArea", {
coords: [{ jd: coords.jd, wd: coords.wd }],
icon: icons,
flag: "yjs"
});
emitter.emit("yjDetail", coords);
}
});
emitter.on("closeYp", () => {
audioPlayer.pause();
});
emitter.on("openYp", handleOpenYp);
emitter.on("closeYp", handleCloseYp);
// 启动自动刷新定时器空闲15分钟刷新页面
resetRefreshTimer();
// 添加鼠标事件监听
document.addEventListener("mousemove", handleMouseActivity);
document.addEventListener("mousedown", handleMouseActivity);
document.addEventListener("keypress", handleMouseActivity);
document.addEventListener("touchstart", handleMouseActivity);
document.addEventListener("scroll", handleMouseActivity);
});
onUnmounted(() => {
clearInterval(timing.value);
@ -507,6 +571,9 @@ onUnmounted(() => {
document.removeEventListener("keypress", handleMouseActivity);
document.removeEventListener("touchstart", handleMouseActivity);
document.removeEventListener("scroll", handleMouseActivity);
// 清理事件总线监听器,防止内存泄漏
emitter.off("openYp", handleOpenYp);
emitter.off("closeYp", handleCloseYp);
// 组件卸载时停止音频播放并释放资源
if (audioPlayer) audioPlayer.destroy();
});
@ -521,41 +588,13 @@ const jobLogShowOpen = () => {
jobLogShow.value = true;
};
// ============================================
// 自动刷新定时器逻辑
// 功能鼠标无动作15分钟则自动刷新整个页面
// ============================================
const refreshTimer = ref(null); // 自动刷新定时器
const IDLE_TIMEOUT = 15 * 60 * 1000; // 15分钟 = 900000毫秒
// 重置定时器(鼠标有动作时调用)
const resetRefreshTimer = () => {
if (refreshTimer.value) {
clearTimeout(refreshTimer.value);
}
refreshTimer.value = setTimeout(() => {
// 定时器到期,刷新整个页面
window.location.reload();
}, IDLE_TIMEOUT);
//
const MapCenter = () => {
emitter.emit("setMapCenter", {
location: [94.36057012, 29.64276831],
zoomLevel: 18
});
};
// 鼠标事件监听器
const handleMouseActivity = () => {
resetRefreshTimer();
};
// 在组件挂载时启动定时器
resetRefreshTimer();
// 添加鼠标事件监听
document.addEventListener("mousemove", handleMouseActivity);
document.addEventListener("mousedown", handleMouseActivity);
document.addEventListener("keypress", handleMouseActivity);
document.addEventListener("touchstart", handleMouseActivity);
document.addEventListener("scroll", handleMouseActivity);
// ============================================
// 自动刷新定时器逻辑结束
// ============================================
</script>
<style lang="scss" scoped>

View File

@ -1,15 +1,37 @@
<template>
<el-dialog :model-value="modelValue" width="70%" @close="closeDialog" :destroy-on-close="true" :close-on-click-modal="false" >
<el-dialog
:model-value="modelValue"
width="70%"
@close="closeDialog"
:destroy-on-close="true"
:close-on-click-modal="false"
>
<template #title>
<div class="flex just-between align-center">
<span class="f18" style="color: #333;">情报列表</span>
<span @click="exportFile" class="f14 pointer" style="color: #0072ff;">下载</span>
<span class="f18" style="color: #333">情报列表</span>
<span
@click="exportFile"
class="f14 pointer"
style="color: #0072ff; margin-right: 30px"
>下载</span
>
</div>
</template>
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"></Search>
<MyTable customClass="zdy_peo_table" :tableData="pageData.tableData" :tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight" :key="pageData.keyCount" :tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth" @handleCellClick="clickTag">
<Search
:searchArr="searchConfiger"
@submit="onSearch"
:key="pageData.keyCount"
></Search>
<MyTable
customClass="zdy_peo_table"
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
@handleCellClick="clickTag"
>
<template #qblx="{ row }">
<DictTag :tag="false" :value="row.qblx" :options="D_GS_XS_LX" />
</template>
@ -18,16 +40,28 @@
</template>
<template #shzt="{ row }">
<!-- 采纳将这条信息推送到情报管理,退回 -->
<DictTag :tag="false" :value="row.shzt" :options="D_BZ_XSSHZT" @clickTag="clickTag(row.shzt)" />
<DictTag
:tag="false"
:value="row.shzt"
:options="D_BZ_XSSHZT"
@clickTag="clickTag(row.shzt)"
/>
</template>
<template #controls="{ row }">
<el-link size="small" type="primary" @click="showDetail(row)">详情</el-link>
</template>
<el-link size="small" type="primary" @click="showDetail(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>
<template #footer>
<div class="dialog-footer">
<el-button @click="closeDialog">取消</el-button>
@ -39,17 +73,22 @@
</template>
<script setup>
import { exportExlByObj } from "@/utils/exportExcel.js"
import { exportExlByObj } from "@/utils/exportExcel.js";
import MyTable from "@/components/aboutTable/MyTable.vue";
import Search from "@/components/aboutTable/Search.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import Xq from "./xq.vue";
import {xxcjSelectPage} from '@/api/xxcj.js'
import { xxcjSelectPage } from "@/api/xxcj.js";
import { ref, reactive, getCurrentInstance, watch, onMounted } from "vue";
import { useRoute,useRouter } from 'vue-router'
const router = useRouter()
const { proxy } = getCurrentInstance()
const { D_BZ_QBSBLY,D_GS_XS_LX,D_GS_XS_LY ,D_BZ_XSSHZT} = proxy.$dict("D_BZ_QBSBLY","D_GS_XS_LX","D_GS_XS_LY","D_BZ_XSSHZT")
import { useRoute, useRouter } from "vue-router";
const router = useRouter();
const { proxy } = getCurrentInstance();
const { D_BZ_QBSBLY, D_GS_XS_LX, D_GS_XS_LY, D_BZ_XSSHZT } = proxy.$dict(
"D_BZ_QBSBLY",
"D_GS_XS_LX",
"D_GS_XS_LY",
"D_BZ_XSSHZT"
);
const props = defineProps({
modelValue: {
type: Boolean,
@ -59,11 +98,11 @@ const props = defineProps({
type: Object,
default: () => ({})
}
})
});
const searchConfiger = ref([
{
label: "情报标题",
prop: 'qbmc',
prop: "qbmc",
placeholder: "请输入情报标题",
showType: "input"
},
@ -79,22 +118,19 @@ const searchConfiger = ref([
prop: "startTime",
placeholder: "请选择时间",
showType: "datetimerange"
},
}
]);
const emit = defineEmits(['update:modelValue'])
const emit = defineEmits(["update:modelValue"]);
const closeDialog = () => {
emit('update:modelValue', false)
}
emit("update:modelValue", false);
};
const pageData = reactive({
tableData: [],
keyCount: 0,
tableConfiger: {
loading: false,
rowHieght: 40,
haveControls: false,
haveControls: false
},
controlsWidth: 160, //操作栏宽度
total: 0,
@ -106,78 +142,79 @@ const pageData = reactive({
{ label: "上报人姓名", prop: "xssbr" },
{ label: "情报编号", prop: "xsBh" },
{ label: "情报标题", prop: "qbmc" },
{ label: "情报上报时间", prop: "sxsbsj" ,watch:'300'},
{ label: "情报内容", prop: "qbnr" },
{ label: "情报上报时间", prop: "sxsbsj", watch: "300" },
{ label: "情报内容", prop: "qbnr" }
],
tableHeight: "40vh",
tableHeight: "40vh"
});
const parameter = ref()
const parameter = ref();
onMounted(() => {
changePage()
})
changePage();
});
const onSearch = (val) => {
const promes = {
startTime: val.startTime ? val.startTime[0] : '',
endTime: val.endTime ? val.endTime[1] : '',
}
parameter.value = { ...val, ...promes }
startTime: val.startTime ? val.startTime[0] : "",
endTime: val.endTime ? val.endTime[1] : ""
};
parameter.value = { ...val, ...promes };
pageData.pageConfiger.pageCurrent = 1;
changePage()
}
changePage();
};
const changePage = () => {
pageData.tableConfiger.loading = true;
let data = { ...pageData.pageConfiger, ...parameter.value,qbjb:'01' };
xxcjSelectPage(data).then(res => {
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
}).catch(() => { pageData.tableConfiger.loading = false; })
}
let data = { ...pageData.pageConfiger, ...parameter.value, qbjb: "01" };
xxcjSelectPage(data)
.then((res) => {
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
})
.catch(() => {
pageData.tableConfiger.loading = false;
});
};
// 查看详情
const showDetail = (item) => {
router.push({
path: '/CollectCrculate',
path: "/CollectCrculate",
query: {
id: item.id
}
})
}
});
};
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val;
changePage()
}
changePage();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
changePage()
}
changePage();
};
const xqDialog = ref(false)
const dataList = ref({})
const xqDialog = ref(false);
const dataList = ref({});
const clickTag = (row) => {
if (row.column.property == 'qbmc' || row.column.property == 'xsBh') {
if (row.column.property == "qbmc" || row.column.property == "xsBh") {
xqDialog.value = true;
dataList.value = row.row;
dataList.value = row.row;
}
}
};
// 导出
const exportFile = () =>{
const exportFile = () => {
const titleObj = {
xssbr: "上报人姓名",
xsBh: "情报编号",
qbmc: "情报标题",
sxsbsj: "情报上报时间",
qbnr: "情报内容",
}
exportExlByObj(titleObj, pageData.tableData, '情报列表')
}
qbnr: "情报内容"
};
exportExlByObj(titleObj, pageData.tableData, "情报列表");
};
</script>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>

View File

@ -3,14 +3,24 @@
<span class="title">常规预警</span>
</div>
<div class="comom-cnt zdryBox">
<div style="height:33px;">
<div style="height: 33px">
<CheckBox :data="checkData" @changeData="changeData"></CheckBox>
</div>
<ul class="ryBox" ref="scrollCgTableRef" @mouseenter="stopAutoScroll" @mouseleave="startAutoScroll" v-loading="loading" v-infinite-scroll="loadList">
<ul
class="ryBox"
ref="scrollCgTableRef"
@mouseenter="stopAutoScroll"
@mouseleave="startAutoScroll"
v-loading="loading"
v-infinite-scroll="loadList"
>
<li v-for="item in personList" :key="item.id" @click="chooseItem(item)">
<YjItem :item="item" :dict="{D_BZ_HPZL}"></YjItem>
<YjItem :item="item" :dict="{ D_BZ_HPZL }"></YjItem>
</li>
<MOSTY.Empty :show="!loading && personList.length <= 0" :imgSize="100"></MOSTY.Empty>
<MOSTY.Empty
:show="!loading && personList.length <= 0"
:imgSize="100"
></MOSTY.Empty>
</ul>
</div>
</template>
@ -21,124 +31,130 @@ import { qcckPost } from "@/api/qcckApi.js";
import YjItem from "@/views/home/components/yjItem.vue";
import * as MOSTY from "@/components/MyComponents/index";
import CheckBox from "@/components/checkBox/index.vue";
import { ref ,reactive, onMounted,getCurrentInstance , onUnmounted} from 'vue';
import { ref, reactive, onMounted, getCurrentInstance, onUnmounted } from "vue";
const { proxy } = getCurrentInstance();
const {D_BZ_HPZL} =proxy.$dict('D_BZ_HPZL')
const { D_BZ_HPZL } = proxy.$dict("D_BZ_HPZL");
const checkData = reactive({
list: ["人员", "车辆"],
hasChoose: ["人员", "车辆"],
hasChoose: ["人员", "车辆"]
});
const total = ref(0);
const yjJb = ref('1,2');
const yjJb = ref("1,2");
const pageNum = ref(1);
const loading = ref(false); // 加载中
const personList = ref([]);
const scrollCgTableRef = ref(null) // 滚动元素区域
let isAutoScrolling = true // 是否自动滚动
const intervalId = ref(null) //定时器
const scrollCgTableRef = ref(null); // 滚动元素区域
let isAutoScrolling = true; // 是否自动滚动
const intervalId = ref(null); //定时器
onMounted(()=>{
getList()
autoScroll()
})
onMounted(() => {
getList();
autoScroll();
});
onUnmounted(() => {
if (intervalId.value) clearInterval(intervalId.value)// 清理定时器
})
if (intervalId.value) clearInterval(intervalId.value); // 清理定时器
});
// 自动滚动
const autoScroll = () => {
if(personList.value.length==0){return}
if (personList.value.length == 0) {
return;
}
intervalId.value = setInterval(() => {
if (!isAutoScrolling) return
const scrollTableEl = scrollCgTableRef.value
scrollTableEl.scrollTop += 1 // 垂直滚动距离
if (!isAutoScrolling) return;
const scrollTableEl = scrollCgTableRef.value;
scrollTableEl.scrollTop += 1; // 垂直滚动距离
let scrollTop = scrollTableEl.scrollTop;
let scrollHeight = scrollTableEl.scrollHeight;
let offsetHeight = Math.ceil(scrollTableEl.getBoundingClientRect().height);
let currentHeight = scrollTop + offsetHeight;
if (currentHeight >= scrollHeight) { // 到底部
if(personList.value.length == total.value){
if (currentHeight >= scrollHeight) {
// 到底部
if (personList.value.length == total.value) {
scrollTableEl.scrollTop = 0;
}else{
} else {
pageNum.value++;
getList('load')
getList("load");
}
}
}, 100)
}
}, 100);
};
// 停止滚动
const stopAutoScroll = () => {
isAutoScrolling = false
}
isAutoScrolling = false;
};
// 开始滚动
const startAutoScroll = () => {
isAutoScrolling = true
autoScroll()
}
isAutoScrolling = true;
autoScroll();
};
// 复选框切换
function changeData(val){
function changeData(val) {
pageNum.value = 1;
personList.value = [];
checkData.hasChoose = val;
let ids = [];
val.forEach(it => {
if(it == '人员') ids.push(1);
if(it == '车辆') ids.push(2);
val.forEach((it) => {
if (it == "人员") ids.push(1);
if (it == "车辆") ids.push(2);
});
yjJb.value = ids.join(',')
if(val.length == 0) personList.value = [];
yjJb.value = ids.join(",");
if (val.length == 0) personList.value = [];
else getList();
}
// 触底加载
const loadList = () =>{
if( personList.value.length == total.value) return;
const loadList = () => {
if (personList.value.length == total.value) return;
pageNum.value++;
getList()
}
getList();
};
const getList = (type) =>{
let data = { pageSize:10, pageNum:pageNum.value,yjLx:yjJb.value };
const getList = (type) => {
let data = { pageSize: 10, pageNum: pageNum.value, yjLx: yjJb.value };
loading.value = !type ? true : false;
qcckPost(data,'/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(data, "/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 chooseItem = (item) => {
console.log(item);
emitter.emit('showHomeYJ',[item]);
emitter.emit('deletePointArea','home_yj_map');
if(!item.jd || !item.jd) return proxy.$message({ type: "warning", message: "该预警没有坐标!" });
let icon = require('@/assets/point/yj.png');
if(item.yjjb == '20') icon = require('@/assets/point/yj1.png');
if(item.yjjb == '30') icon = require('@/assets/point/yj2.png');
if(item.yjjb == '40') icon = require('@/assets/point/yj3.png');
emitter.emit('addPointArea',{flag:'home_yj_map',icon,coords:[item]});
emitter.emit('setMapCenter',{location:[item.jd,item.wd],zoomLevel:10});
}
emitter.emit("showHomeYJ", [item]);
emitter.emit("deletePointArea", "home_yj_map");
if (!item.jd || !item.jd)
return proxy.$message({ type: "warning", message: "该预警没有坐标!" });
let icon = require("@/assets/point/yj.png");
if (item.yjjb == "20") icon = require("@/assets/point/yj1.png");
if (item.yjjb == "30") icon = require("@/assets/point/yj2.png");
if (item.yjjb == "40") icon = require("@/assets/point/yj3.png");
emitter.emit("addPointArea", { flag: "home_yj_map", icon, coords: [item] });
emitter.emit("setMapCenter", { location: [item.jd, item.wd], zoomLevel: 10 });
};
</script>
<style>
.el-loading-mask{
background: rgba(0,0,0,0.5);
.el-loading-mask {
background: rgba(0, 0, 0, 0.5);
}
</style>
<style lang="scss" scoped>
@import "@/assets/css/homeScreen.scss";
.zdryBox{
.zdryBox {
background: #052249;
height: 100%;
.ryBox{
.ryBox {
height: calc(100% - 33px);
overflow: hidden;
overflow-y: auto;
@ -158,33 +174,32 @@ const chooseItem = (item) => {
background-color: #142141;
}
::v-deep .el-checkbox__label{
color:#fff;
::v-deep .el-checkbox__label {
color: #fff;
}
::v-deep .el-checkbox__input.is-checked+.el-checkbox__label{
color:#00FFFF;
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
color: #00ffff;
}
::v-deep .el-checkbox__inner{
background:rgba(0,144,255,0.2);
border:1px solid #0072FF;
::v-deep .el-checkbox__inner {
background: rgba(0, 144, 255, 0.2);
border: 1px solid #0072ff;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner{
background-color: #00FFFF;
border-color:#00FFFF;
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
background-color: #00ffff;
border-color: #00ffff;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner{
background-color: #00FFFF;
border-color:#00FFFF;
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
background-color: #00ffff;
border-color: #00ffff;
}
::v-deep .el-checkbox__inner::after{
border:2px solid #000;
border-left:0;
border-top:0;
left:3px;
top:0px;
::v-deep .el-checkbox__inner::after {
border: 2px solid #000;
border-left: 0;
border-top: 0;
left: 3px;
top: 0px;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner::before{
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner::before {
background: #000;
}
</style>

View File

@ -9,8 +9,8 @@ function resolve(dir) {
// const serverHost = "http://192.168.191.75:8006"//周
// const serverHost = "http://192.168.212.75:8016"//周
// const serverHost = "http://192.168.1.98:8006"//毛毛
// const serverHost = "http://192.168.193.75:8006"//线上
const serverHost = "http://47.108.232.77:9537"//线上
// const serverHost = "http:// 192.168.1.45:8006"; //线上
const serverHost = "http://47.108.232.77:9537"; //线上
module.exports = {
// configureWebpack: {
// resolve: {
@ -61,7 +61,7 @@ module.exports = {
logLevel: "debug"
},
"/chat": {
target: 'https://api.deepseek.com/',
target: "https://api.deepseek.com/",
changeOrigin: true,
logLevel: "debug"
},