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

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

View File

@ -1,12 +1,12 @@
<template>
<div class="comom-cnt" >
<div class="comom-cnt">
<div class="zdryBox">
<ul class="ryBox" :infinite-scroll-distance="30" ref="carouselList" @mouseenter="stopAutoScroll" @mouseleave="startAutoScroll"
v-loading="loading" v-infinite-scroll="loadList">
<ul class="ryBox" :infinite-scroll-distance="30" ref="carouselList" @mouseenter="stopAutoScroll"
@mouseleave="startAutoScroll" v-loading="loading" v-infinite-scroll="loadList">
<li v-for="item in personList" :key="item.id" @click="chooseItem(item)">
<div>{{ item.title }}</div>
<div class="meta-info">{{ item.time }}{{ item.fbrxm }}</div>
<div>{{ item.content }}</div>
<div>{{ item.ypyq }}</div>
<div class="meta-info">{{ item.ypsj }}{{ item.cjrxm }}</div>
<div>{{ item.ypyt }}</div>
</li>
<MOSTY.Empty :show="!loading && personList.length <= 0" :imgSize="100"></MOSTY.Empty>
</ul>
@ -17,16 +17,33 @@
</template>
<script setup>
import { tbGsxtXxltSelectPage } from '@/api/tbGsxtXxltHf'
import { ref, reactive, onMounted, onBeforeUnmount } from 'vue';
import {useRouter} from 'vue-router'
import { tacticalGet } from '@/api/huiShangyp/tacticalApi.js'
import { defineProps, ref, reactive, onMounted, onBeforeUnmount } from 'vue';
import { useRouter } from 'vue-router'
import * as MOSTY from "@/components/MyComponents/index";
const router = useRouter()
const emit = defineEmits(["reversalPush"])
const 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 loading = ref(false);
const loadingMore = ref(false);
@ -42,12 +59,13 @@ let scrollTimer = null;
const getList = (type) => {
loading.value = !type ? true : false;
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;
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);
total.value = res.total;
total.value = res?.total || 0;
}).catch(() => {
loading.value = false;
loadingMore.value = false;
@ -160,6 +178,7 @@ onBeforeUnmount(() => {
&::-webkit-scrollbar {
display: none;
}
-ms-overflow-style: none; // IE和Edge
scrollbar-width: none; // Firefox
@ -174,7 +193,7 @@ onBeforeUnmount(() => {
background-color: rgba(20, 107, 190, 0.2);
}
> div:first-child {
>div:first-child {
font-weight: bold;
color: #fff;
margin-bottom: 8px;
@ -192,7 +211,7 @@ onBeforeUnmount(() => {
margin-bottom: 8px;
}
> div:last-child {
>div:last-child {
color: rgba(255, 255, 255, 0.8);
font-size: 13px;
line-height: 1.6;
@ -206,7 +225,8 @@ onBeforeUnmount(() => {
}
}
}
.switchover{
.switchover {
cursor: pointer;
font-size: 14px;
margin-left: 20px;