This commit is contained in:
lcw
2025-08-16 16:54:03 +08:00
parent 71487ac647
commit 42f5e37f65
69 changed files with 5913 additions and 978 deletions

View File

@ -25,13 +25,13 @@
<!-- 右边 -->
<div class="home-aside asideR">
<div class="commom-aside-big">
<SituationAssessment/>
<SituationAssessment />
</div>
<div class="commom-aside-big">
<GroupWarning/>
<GroupWarning />
</div>
<div class="commom-aside-small">
<Experience/>
<Experience />
</div>
</div>
<!-- 中间 -->
@ -57,9 +57,27 @@
<!-- 左边弹窗 -->
<LeftDialog></LeftDialog>
<Fxq :initial-position="{ x: position.x, y: position.y }">
<el-badge value="0" class="item badge-top-left">
<div class='fxq fxq1'>
<div class="title" @click.stop="opneMsg('xtxx')"> <img src="@/assets/images/xtxx.png" /> 系统消息</div>
</div>
</el-badge>
<!-- <div class='fxq fxq2'>
<div class="title" @click.stop="opneMsg('tztg')"> <img src="@/assets/images/tztg.png" /> 通知通报</div>
</div>
<div class='fxq fxq3'>
<div class="title"> <img src="@/assets/images/xxxt.png" /> 消息协同</div>
</div> -->
</Fxq>
<Information v-model='showDialog' :title='title'>
<systemMessages :dict="{ BD_D_XXLX, BD_D_XXLY }" :idEntityCard='idEntityCard' :xxlx="showMsgLx" />
</Information>
</template>
<script setup>
import { ref, getCurrentInstance, reactive } from 'vue'
import LeftDialog from './dialog/leftDialog'
import GdMap from "@/components/GdMap/index.vue";
import Head from './layout/head.vue'
@ -70,17 +88,113 @@ import QblyType from './model/qblyType.vue'
import Bkcz from './model/bkcz.vue'
import ZdryWarning from './model/zdryWarning.vue'
import GroupWarning from './model/groupWarning.vue'
import Fjqk from './model/fjqk.vue'
import Yszs from './model/yszs.vue'
import DeployControl from './model/deployControl.vue';
import SituationAssessment from './model/situationAssessment.vue'
import Experience from './model/experience.vue'
import Fxq from './model/fxq.vue'
import Information from './model/information.vue'
import systemMessages from './model/mesgSwitch/systemMessages.vue'
import { getItem } from '@/utils/storage.js'
import { queryXxTj} from '@/api/commit.js'
const { proxy } = getCurrentInstance();
const { BD_D_XXLX, BD_D_XXLY } = proxy.$dict('BD_D_XXLX', 'BD_D_XXLY'); //获取字典数据
const idEntityCard = getItem('idEntityCard')
const position = reactive({
x: window.innerWidth - 120,
y: window.innerHeight - 100
})
//消息
const title = ref('系统消息')
const showDialog = ref(false)
const showMsgLx = ref('')
const opneMsg = (val) => {
showDialog.value = true
showMsgLx.value = val
switch (val) {
case 'xtxx':
title.value = '系统消息'
break;
case 'tztg':
title.value = '通知通告'
break;
case 'xxxt':
title.value = '消息协同'
break;
}
}
const queryXxTjList = () => {
queryXxTj({}).then((res) => {
console.log(res);
}).catch((err) => {
});
}
queryXxTjList()
</script>
<style lang="scss" scoped>
@import "@/assets/css/homeScreen.scss";
.transition {
transition: all 0.5s;
.fxq {
border-radius: 35px;
width: 35px;
transition: transform 0.5s ease, width 0.5s ease;
background-color: rgb(1, 127, 245);
transform-origin: left center;
overflow: hidden;
margin-bottom: 10px;
.icon {
display: flex;
align-items: center;
width: 35px;
height: 35px;
justify-content: center;
line-height: 35px;
font-size: 30px;
}
.title {
height: 35px;
line-height: 35px;
img {
margin-left: 9.5px;
width: 16px;
margin-right: 10px;
margin-top: -3px;
vertical-align: middle;
height: 16px;
}
}
}
.fxq2 {
background-color: #9d88f9;
}
.fxq1:hover {
width: 120px;
}
.fxq2:hover {
width: 120px;
// background-color: red;
}
.fxq3:hover {
width: 120px;
}
::v-deep .badge-top-left .el-badge__content {
top: 0;
right: auto;
left: -10px;
transform: translateY(-50%) translateX(-50%);
}
</style>

View File

@ -0,0 +1,194 @@
<template>
<div
class="floating-ball"
:style="ballStyle"
@mousedown="startDrag"
@touchstart="startDrag"
@click="handleClick"
>
<slot>
</slot>
</div>
</template>
<script setup>
import { ref, onMounted, onUnmounted } from 'vue';
const props = defineProps({
// 初始位置
initialPosition: {
type: Object,
default: () => ({ x: 0, y: 0 })
},
// 是否可拖动
draggable: {
type: Boolean,
default: true
},
// 自动吸附边缘的阈值
snapThreshold: {
type: Number,
default: 0
}
});
// watch(() => props.initialPosition, (newVal) => {
// position.value = { x: newVal.x, y: newVal.y };
// },{deep:true})
const emit = defineEmits(['click']);
const position = ref({ x: props.initialPosition.x, y: props.initialPosition.y });
const isDragging = ref(false);
const startPos = ref({ x: 0, y: 0 });
const startMousePos = ref({ x: 0, y: 0 });
const ballStyle = ref({
left: `${position.value.x}px`,
top: `${position.value.y}px`,
cursor: props.draggable ? 'move' : 'pointer'
});
// 开始拖动
const startDrag = (e) => {
if (!props.draggable) return;
isDragging.value = true;
startPos.value = { ...position.value };
// 处理鼠标和触摸事件
if (e.type === 'mousedown') {
startMousePos.value = { x: e.clientX, y: e.clientY };
} else if (e.type === 'touchstart') {
startMousePos.value = { x: e.touches[0].clientX, y: e.touches[0].clientY };
}
// 阻止默认行为和冒泡
e.preventDefault();
e.stopPropagation();
};
// 处理移动
const handleMove = (e) => {
if (!isDragging.value) return;
let clientX, clientY;
if (e.type === 'mousemove') {
clientX = e.clientX;
clientY = e.clientY;
} else if (e.type === 'touchmove') {
clientX = e.touches[0].clientX;
clientY = e.touches[0].clientY;
}
const dx = clientX - startMousePos.value.x;
const dy = clientY - startMousePos.value.y;
position.value = {
x: startPos.value.x + dx,
y: startPos.value.y + dy
};
updatePosition();
};
// 结束拖动
const endDrag = () => {
if (!isDragging.value) return;
isDragging.value = false;
snapToEdge();
};
// 自动吸附到边缘
const snapToEdge = () => {
const windowWidth = window.innerWidth;
const windowHeight = window.innerHeight;
// 检查是否靠近左右边缘
if (position.value.x < props.snapThreshold) {
position.value.x = 0;
} else if (position.value.x > windowWidth - props.snapThreshold) {
position.value.x = windowWidth;
}
// 检查是否靠近上下边缘
if (position.value.y < props.snapThreshold) {
position.value.y = 0;
} else if (position.value.y > windowHeight - props.snapThreshold) {
position.value.y = windowHeight;
}
updatePosition();
};
// 更新位置样式
const updatePosition = () => {
ballStyle.value = {
...ballStyle.value,
left: `${position.value.x}px`,
top: `${position.value.y}px`
};
};
// 点击事件
const handleClick = (e) => {
if (isDragging.value) {
// 如果是拖动结束的点击,不触发点击事件
isDragging.value = false;
return;
}
emit('click', e);
};
// 添加事件监听
onMounted(() => {
window.addEventListener('mousemove', handleMove);
window.addEventListener('touchmove', handleMove);
window.addEventListener('mouseup', endDrag);
window.addEventListener('touchend', endDrag);
});
// 移除事件监听
onUnmounted(() => {
window.removeEventListener('mousemove', handleMove);
window.removeEventListener('touchmove', handleMove);
window.removeEventListener('mouseup', endDrag);
window.removeEventListener('touchend', endDrag);
});
</script>
<style scoped>
.floating-ball {
position: fixed;
cursor: pointer;
width: 50px;
padding: 10px;
/* height: 50px; */
/* border-radius: 50%; */
/* background-color: #409eff; */
color: white;
/* display: flex;
justify-content: center;
align-items: center; */
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
z-index: 9999;
user-select: none;
/* transition: all 0.3s ease; */
transform: translate(-50%, -50%);
}
.ball-content {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.icon {
font-size: 24px;
}
.floating-ball:active {
opacity: 0.8;
}
</style>

View File

@ -0,0 +1,53 @@
<template>
<el-dialog class="dialog-container"
:model-value="modelValue"
:title="title"
:before-close="close" :destroy-on-close="true"
>
<slot></slot>
<template #footer v-if="showFooter">
<div class="dialog-footer" >
<el-button @click="close">取消</el-button>
<el-button type="primary" @click="submit">
确认
</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import {ref} from 'vue'
const props=defineProps({
modelValue: {
type: Boolean,
required: true
},title:{
type:String,
default:'提示'
},showFooter:{
type:Boolean,
default:true
}
})
const emit=defineEmits(['update:modelValue','submit','close'])
const close = () => {
emit('update:modelValue',false)
emit('close')
}
const submit=()=>{
emit('submit')
}
</script>
<style lang="scss" scoped>
@import "@/assets/css/homeScreen.scss";
::v-deep .el-dialog__body{
padding-top: 0 !important;
padding-bottom: 0 !important;
}
</style>

View File

@ -0,0 +1,186 @@
<template>
<!-- <el-button type="success" style='position: absolute;right:30px;'>一键忽略</el-button> -->
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="chageHandle">
<el-tab-pane label="未查看" name="first">
<MyTable customClass="zdy_peo_table" :tableData="pageData.tableData" :tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight" :key="pageData.keyCount" :tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth">
<template #xxly="{ row }">
<DictTag :tag="false" :value="row.xxly" :options="dict.BD_D_XXLY" />
</template>
<template #xxlx="{ row }">
<DictTag :tag="false" :value="row.xxlx" :options="dict.BD_D_XXLX" />
</template>
<template #controls="{ row }">
<el-button size="small" type="primary" @click="handleDetail(row)">查看</el-button>
</template>
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages>
</el-tab-pane>
<el-tab-pane label="已查看" name="second">
<MyTable customClass="zdy_peo_table" :tableData="pageData.tableData" :tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight" :key="pageData.keyCount" :tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth">
<template #xxly="{ row }">
<DictTag :tag="false" :value="row.xxly" :options="dict.BD_D_XXLY" />
</template>
<template #xxlx="{ row }">
<DictTag :tag="false" :value="row.xxlx" :options="dict.BD_D_XXLX" />
</template>
<template #controls="{ row }">
<el-button size="small" type="primary" @click="handleDetail(row)">查看</el-button>
</template>
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages>
</el-tab-pane>
</el-tabs>
<Information v-model='showDialog' title='消息详情' :showFooter="false">
<Xtxi :item="msgDetail" v-if="xxlx == 'xtxx'" :dict="dict" />
</Information>
</template>
<script setup>
import { ref, reactive } from 'vue'
import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import Information from "@/views/home/model/information.vue";
import { queryYdxxPageList, queryWdxxPageList, queryWdxxDetail, queryYdxxDetail, qsXx } from '@/api/commit.js'
import Xtxi from './xtxi.vue'
const props = defineProps({
dict: {
type: Object,
default: () => {
}
}, idEntityCard: {
type: String,
default: ''
}, xxlx: {
type: String,
default: 'xtxx'
}
})
const activeName = ref('first')
const pageData = reactive({
tableData: [],
keyCount: 0,
tableConfiger: {
loading: false,
rowHieght: 40,
haveControls: true,
},
controlsWidth: 160, //操作栏宽度
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
}, //分页
tableColumn: [
{ label: "消息标题", prop: "xxbt", showOverflowTooltip: true },
{ label: "消息来源", prop: "xxly", showOverflowTooltip: true, showSolt: true },
{ label: "消息描述", prop: "xxms", showOverflowTooltip: true },
{ label: "消息类型", prop: "xxlx", showOverflowTooltip: true, showSolt: true },
], tableHeight: "calc(80vh - 350px)",
});
const chageHandle = () => {
pageData.pageConfiger.pageCurrent = 1
pageData.pageConfiger.pageSize = 20
handleClick()
}
//请求数据
const handleClick = async () => {
let promes = {
page: pageData.pageConfiger.pageCurrent,
rows: pageData.pageConfiger.pageSize,
xxly: '005',
jsrid: props.idEntityCard,
// jsrid: '540422200010197495',
xxlx: ""
}
switch (props.xxlx) {
case 'xtxx':
promes.xxlx = 100
const res = activeName.value == 'first' ? await queryWdxxPageList(promes) : await queryYdxxPageList(promes)
pageData.tableData = res.rows
pageData.total = res.total
break;
case 'tztg':
promes.xxlx = 200
const tztgRes = activeName.value == 'first' ? await queryWdxxPageList(promes) : await queryYdxxPageList(promes)
pageData.tableData = tztgRes.rows
pageData.total = tztgRes.total
break;
default:
break;
}
}
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val
handleClick()
}
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val
handleClick()
}
handleClick()
// 查看详情
const showDialog = ref(false)
const msgDetail = ref({})
const disposition = (item) => {
let arrId = ''
if (Array.isArray(item)) {
const itemMap = item.map(it => {
return it.id
})
arrId = itemMap.join(',')
} else {
arrId = item.id
}
const promes = {
xxlx: '100',
id: arrId
}
qsXx(promes).then((result) => {
handleClick()
}).catch((err) => {
console.log(err);
});
}
const handleDetail = async (item) => {
showDialog.value = true
const res = activeName.value == 'first' ? await queryWdxxDetail({ id: item.id }) : await queryYdxxDetail({ id: item.id })
if (res) {
msgDetail.value = res[0]
if (msgDetail.value.qszt == '0') {
disposition(item)
}
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/css/homeScreen.scss";
.zdy_peo_table td.el-table__cell {
color: #ffffff !important;
}
.zdy_peo_table th.el-table__cell {
color: #ffffff !important;
font-size: 15px;
}
.zdy_peo_table .el-table__body tr.el-table__row--striped td.el-table__cell {
background: transparent !important;
}
.zdy_peo_table .table_blue_row {
background: linear-gradient(to right, #001D4B 0%, rgba(0, 29, 75, 0.1) 100%) !important;
}
</style>

View File

@ -0,0 +1,53 @@
<template>
<div style="height: 300px;overflow: auto;font-size: 16px;">
<div>通知标题{{ item.xxbt }}</div>
<div class="mt">通知内容{{ item.xxms }}</div>
<div class="flex align-center just-between mt">
<div class="flex align-center">接收类型
<DictTag :tag="false" :value="item.xxlx" :options="dict.BD_D_XXLX" />
</div>
<div class="flex align-center">消息来源
<DictTag :tag="false" :value="item.xxly" :options="dict.BD_D_XXLY" />
</div>
</div>
</div>
</template>
<script setup>
import {ref} from 'vue'
const props = defineProps({
item: {
type: Object,
default: () => {
}
}, dict: {
type: Object,
default: () => {
}
},
})
</script>
<style lang="scss" scoped>
@import "@/assets/css/homeScreen.scss";
.zdy_peo_table td.el-table__cell {
color: #ffffff !important;
}
.zdy_peo_table th.el-table__cell {
color: #ffffff !important;
font-size: 15px;
}
.zdy_peo_table .el-table__body tr.el-table__row--striped td.el-table__cell {
background: transparent !important;
}
.zdy_peo_table .table_blue_row {
background: linear-gradient(to right, #001D4B 0%, rgba(0, 29, 75, 0.1) 100%) !important;
}
.mt {
margin-top: 20px;
}
</style>

View File

@ -0,0 +1,53 @@
<template>
<div style="height: 300px;overflow: auto;font-size: 16px;">
<div>通知标题{{ item.xxbt }}</div>
<div class="mt">通知内容{{ item.xxms }}</div>
<div class="flex align-center just-between mt">
<div class="flex align-center">接收类型
<DictTag :tag="false" :value="item.xxlx" :options="dict.BD_D_XXLX" />
</div>
<div class="flex align-center">消息来源
<DictTag :tag="false" :value="item.xxly" :options="dict.BD_D_XXLY" />
</div>
</div>
</div>
</template>
<script setup>
import {ref} from 'vue'
const props = defineProps({
item: {
type: Object,
default: () => {
}
}, dict: {
type: Object,
default: () => {
}
},
})
</script>
<style lang="scss" scoped>
@import "@/assets/css/homeScreen.scss";
.zdy_peo_table td.el-table__cell {
color: #ffffff !important;
}
.zdy_peo_table th.el-table__cell {
color: #ffffff !important;
font-size: 15px;
}
.zdy_peo_table .el-table__body tr.el-table__row--striped td.el-table__cell {
background: transparent !important;
}
.zdy_peo_table .table_blue_row {
background: linear-gradient(to right, #001D4B 0%, rgba(0, 29, 75, 0.1) 100%) !important;
}
.mt {
margin-top: 20px;
}
</style>