feat: 大屏-战术,战略研判对接

This commit is contained in:
2025-12-18 19:58:12 +08:00
parent 571518f1e5
commit 186d1e0d53
2 changed files with 48 additions and 26 deletions

View File

@ -6,14 +6,15 @@
</div> </div>
</div> </div>
<!-- <div class="comom-cnt zdryBox"> --> <!-- <div class="comom-cnt zdryBox"> -->
<transition name="flip" mode="out-in"> <transition name="flip" mode="out-in">
<div :key="'qb'" v-if="reversalShow" class="flip-wrapper"> <div :key="'qb'" v-if="reversalShow" class="flip-wrapper">
<TacticalYp></TacticalYp> <TacticalYp bglx="01"></TacticalYp>
</div> </div>
<div :key="'text'" v-else class="flip-wrapper"> <div :key="'text'" v-else class="flip-wrapper">
<StrategyYp></StrategyYp> <TacticalYp bglx="02"></TacticalYp>
</div> <!-- <StrategyYp bglx="01"></StrategyYp> -->
</transition> </div>
</transition>
<!-- </div> --> <!-- </div> -->
</template> </template>
@ -155,6 +156,7 @@ const reversalShow = ref(true)
font-size: 14px; font-size: 14px;
color: rgb(255, 146, 4); color: rgb(255, 146, 4);
} }
/* 包装层样式 */ /* 包装层样式 */
.flip-wrapper { .flip-wrapper {
position: relative; position: relative;

View File

@ -1,12 +1,12 @@
<template> <template>
<div class="comom-cnt" > <div class="comom-cnt">
<div class="zdryBox"> <div class="zdryBox">
<ul class="ryBox" :infinite-scroll-distance="30" ref="carouselList" @mouseenter="stopAutoScroll" @mouseleave="startAutoScroll" <ul class="ryBox" :infinite-scroll-distance="30" ref="carouselList" @mouseenter="stopAutoScroll"
v-loading="loading" v-infinite-scroll="loadList"> @mouseleave="startAutoScroll" v-loading="loading" v-infinite-scroll="loadList">
<li v-for="item in personList" :key="item.id" @click="chooseItem(item)"> <li v-for="item in personList" :key="item.id" @click="chooseItem(item)">
<div>{{ item.title }}</div> <div>{{ item.ypyq }}</div>
<div class="meta-info">{{ item.time }}{{ item.fbrxm }}</div> <div class="meta-info">{{ item.ypsj }}{{ item.cjrxm }}</div>
<div>{{ item.content }}</div> <div>{{ item.ypyt }}</div>
</li> </li>
<MOSTY.Empty :show="!loading && personList.length <= 0" :imgSize="100"></MOSTY.Empty> <MOSTY.Empty :show="!loading && personList.length <= 0" :imgSize="100"></MOSTY.Empty>
</ul> </ul>
@ -17,16 +17,33 @@
</template> </template>
<script setup> <script setup>
import { tbGsxtXxltSelectPage } from '@/api/tbGsxtXxltHf' import { tacticalGet } from '@/api/huiShangyp/tacticalApi.js'
import { ref, reactive, onMounted, onBeforeUnmount } from 'vue'; import { defineProps, ref, reactive, onMounted, onBeforeUnmount } from 'vue';
import {useRouter} from 'vue-router' import { useRouter } from 'vue-router'
import * as MOSTY from "@/components/MyComponents/index"; import * as MOSTY from "@/components/MyComponents/index";
const router = useRouter() const router = useRouter()
const emit = defineEmits(["reversalPush"]) const emit = defineEmits(["reversalPush"])
const reversalPush = () => { const reversalPush = () => {
emit('reversalPush') emit('reversalPush')
} }
// 数据相关
const props = defineProps({
/** bglx 报告类型01 战术研判 02 战略研判) */
bglx: {
type: String,
default: '01'
}
})
/**
* @typedef {Object} YpItem
* @property {string} ypsj - 研判时间
* @property {string} ypyt - 研判议题
* @property {string} ypyq - 研判要求
* @property {string} cjrxm - 创建人
*/
/** @type {YpItem[]} 战术,战略研判*/
const personList = ref([]); const personList = ref([]);
const loading = ref(false); const loading = ref(false);
const loadingMore = ref(false); const loadingMore = ref(false);
@ -42,12 +59,13 @@ let scrollTimer = null;
const getList = (type) => { const getList = (type) => {
loading.value = !type ? true : false; loading.value = !type ? true : false;
loadingMore.value = !!type; loadingMore.value = !!type;
tbGsxtXxltSelectPage({ pageSize: 10, pageCurrent: pageNum.value }).then(res => { tacticalGet({ pageSize: 10, pageCurrent: pageNum.value, bglx: props.bglx }).then(res => {
loading.value = false; loading.value = false;
loadingMore.value = false; loadingMore.value = false;
let arr = res.records || []; /** @type {YpItem[]} 战术,战略研判*/
let arr = Array.isArray(res?.records) ? res.records : [];
personList.value = pageNum.value == 1 ? arr : personList.value.concat(arr); personList.value = pageNum.value == 1 ? arr : personList.value.concat(arr);
total.value = res.total; total.value = res?.total || 0;
}).catch(() => { }).catch(() => {
loading.value = false; loading.value = false;
loadingMore.value = false; loadingMore.value = false;
@ -160,8 +178,9 @@ onBeforeUnmount(() => {
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none; display: none;
} }
-ms-overflow-style: none; // IE和Edge
scrollbar-width: none; // Firefox -ms-overflow-style: none; // IE和Edge
scrollbar-width: none; // Firefox
li { li {
padding: 12px; padding: 12px;
@ -174,7 +193,7 @@ onBeforeUnmount(() => {
background-color: rgba(20, 107, 190, 0.2); background-color: rgba(20, 107, 190, 0.2);
} }
> div:first-child { >div:first-child {
font-weight: bold; font-weight: bold;
color: #fff; color: #fff;
margin-bottom: 8px; margin-bottom: 8px;
@ -192,7 +211,7 @@ onBeforeUnmount(() => {
margin-bottom: 8px; margin-bottom: 8px;
} }
> div:last-child { >div:last-child {
color: rgba(255, 255, 255, 0.8); color: rgba(255, 255, 255, 0.8);
font-size: 13px; font-size: 13px;
line-height: 1.6; line-height: 1.6;
@ -206,7 +225,8 @@ onBeforeUnmount(() => {
} }
} }
} }
.switchover{
.switchover {
cursor: pointer; cursor: pointer;
font-size: 14px; font-size: 14px;
margin-left: 20px; margin-left: 20px;