feat: 大屏-战术,战略研判对接
This commit is contained in:
@ -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;
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<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,8 +17,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { tbGsxtXxltSelectPage } from '@/api/tbGsxtXxltHf'
|
||||
import { ref, reactive, onMounted, onBeforeUnmount } from 'vue';
|
||||
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()
|
||||
@ -26,7 +26,24 @@ 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
|
||||
|
||||
@ -206,6 +225,7 @@ onBeforeUnmount(() => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.switchover {
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
|
||||
Reference in New Issue
Block a user