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"> --> <!-- <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>
<!-- <StrategyYp bglx="01"></StrategyYp> -->
</div> </div>
</transition> </transition>
<!-- </div> --> <!-- </div> -->
@ -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,8 +17,8 @@
</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()
@ -26,7 +26,24 @@ 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,6 +178,7 @@ onBeforeUnmount(() => {
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none; display: none;
} }
-ms-overflow-style: none; // IE和Edge -ms-overflow-style: none; // IE和Edge
scrollbar-width: none; // Firefox scrollbar-width: none; // Firefox
@ -206,6 +225,7 @@ onBeforeUnmount(() => {
} }
} }
} }
.switchover { .switchover {
cursor: pointer; cursor: pointer;
font-size: 14px; font-size: 14px;