main
王文龙 2024-03-05 15:39:52 +08:00
parent 4a2e2bbbd7
commit d80d0988d2
15 changed files with 316 additions and 174 deletions

View File

@ -617,7 +617,7 @@ export interface work {
* -
* http://127.0.0.1:8811/openApi/article/externalList
*/
export async function externalList(params: work) {
export async function externalList(params: any) {
return http.get('/article/externalList', { params })
}
/**

BIN
src/assets/images/beijq.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

View File

@ -71,7 +71,7 @@ const router = createRouter({
component: () => import('@/views/extermal/news/index.vue')
},
{
path: '/external/infoa/:id/:type',
path: '/external/infoa/:id?/:type?',
name: 'DetailInfoa',
component: () => import('@/views/extermal/Article/Detaila.vue')
},

View File

@ -9,12 +9,20 @@ import { useDate } from '@/views/home/hooks/useDate'
import { NBreadcrumb, NBreadcrumbItem } from 'naive-ui'
import { pageType } from '@/stores/modules/pages'
const { push } = useRouter()
const { push, replace } = useRouter()
const route = useRoute()
const { day, week } = useDate()
const pages = pageType()
const newId = ref<string>();
const scale = ref(1.5);
const newId = ref<string>()
const scale = ref(1)
const imgW = ref('auto')
const pageInfo = reactive({
currentPage: 1,
pageSize: 10,
type: '1',
total: 10
})
const listData = ref([])
async function setModule(codes: any) {
const moduleCode = codes
@ -40,7 +48,8 @@ const toList = (nb) => {
pages.page.cate = '8'
pages.page.title = '重要通知'
}
push({ name: 'DetailInfoList' })
replace(`/external/info/${nb === 7 ? 'news' : 'info'}`)
// push({ name: 'DetailInfoList' })
}
const SideNews = [
@ -82,21 +91,36 @@ async function getArticleP(page: any) {
pLenght = total / 10
}
const state = ref<any>({})
const type = ref('')
watchEffect(() => {
const { id } = route.params
const { id } = route.params as any
if (!id) return
newId.value = id as string;
scale.value = id === '701' ? 2 : 1.5
newId.value = id as string
scale.value = id === '701' ? 2 : ['778', '840', '887'].includes(id) ? 1.5 : 1
imgW.value = id !== '1241' ? '100%' : 'auto'
getArticleP(1)
getArticle(1)
getData()
})
const state = ref<any>({})
async function getData() {
const { id } = route.params
if (!id) return
if (id == 'news' || id == 'info') {
const { rows, total } = await externalList({
pageNum: pageInfo.currentPage,
pageSize: pageInfo.pageSize,
type: pageInfo.type,
cate: id === 'news' ? '7' : '8'
})
type.value = id == 'news' ? 'News' : '重要通知'
pageInfo.total = total
listData.value = rows
return
}
listData.value = []
type.value = ''
const { data } = await externalInfo(id as string)
data.tagColor = data.tag === '紧急' ? '#e60e0e' : '#2cba06'
@ -108,6 +132,16 @@ function unescapeHTML(html: string) {
const doc = new DOMParser().parseFromString(html, 'text/html')
return doc.documentElement.textContent
}
const handleSizeChange = (e) => {
pageInfo.pageSize = e
pageInfo.currentPage = 1
getData()
}
const handleCurrentChange = (e) => {
pageInfo.currentPage = e
getData()
}
</script>
<template>
@ -167,13 +201,67 @@ function unescapeHTML(html: string) {
<n-breadcrumb-item @click="push({ name: 'external' })">
外部首页</n-breadcrumb-item
>
<n-breadcrumb-item> {{ state.title }}</n-breadcrumb-item>
<n-breadcrumb-item> {{ type || state.title }}</n-breadcrumb-item>
</n-breadcrumb>
</div>
<!-- <div class="page-wrap h-934px mt24px" style="grid-template-columns: 1fr"> -->
<div class="page-main ml-28px mb-30px">
<AppBlock class="h-full">
<div class="overflow-y-auto h-full">
<div
class="q-wrapper relative flex-1 text-#142142 flex flex-col bg-#fff p30px pl80px h-full"
v-if="listData.length"
>
<img
src="../images/beijq.png"
class="absolute bottom-0 left-0 right-0 z w-full"
/>
<div
class="mt8px cursor-pointer flex flex-wrap flex-col p15px pl20px text-18px max-w-100%"
>
<div
v-for="i in listData"
:key="i"
class="w-70% mb-20px flex items-center justify-between flex-1"
>
<div
class="truncate flex-1 text-#142142 hover:underline"
@click="push(`/external/info/${i.id}`)"
>
<img
v-if="i.tag === 'New'"
src="../images/NEW@2x.png"
class="h24px mr5px badge-new"
/>
<span
v-if="i.isTop === 'Y'"
class="text-#fff bg-red p5px text-16px rounded-5px mr-5px badge-24"
>置顶</span
>
<span
class="no-underline"
:style="i.isRead === 2 ? 'color:#0058E5' : ''"
>
{{ i.title }}
</span>
</div>
<div class="shrink-0 ml100px w-200px text-#808696">
{{ i.createTime }}
</div>
</div>
</div>
<div class="absolute bottom-20px left-50% translate-x-[-50%] z-11">
<el-pagination
background
v-model:current-page="pageInfo.currentPage"
v-model:page-size="pageInfo.pageSize"
layout="prev, pager, next, total,jumper,->"
:total="pageInfo.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</div>
<div v-else class="overflow-y-auto h-full">
<div class="px46px py40px">
<DetailNews
:title="state.title"
@ -234,9 +322,7 @@ function unescapeHTML(html: string) {
<!-- <div
class="icons min-w-110px w110px h20px mt15px absolute right-0px top-0 text-black"
> -->
<div
class="min-w-110px w110px text-black mb-8px ml-auto"
>
<div class="min-w-110px w110px text-black mb-8px ml-auto">
{{ i.createTime?.substring(0, 10) }}
</div>
</div>
@ -285,7 +371,7 @@ function unescapeHTML(html: string) {
line-height: 1;
.page-wrap {
display: grid;
grid-template-columns: 1fr 314px;
grid-template-columns: 1fr 414px;
grid-template-rows: repeat(2, 1fr);
grid-column-gap: 30px;
grid-row-gap: 30px;
@ -365,18 +451,22 @@ function unescapeHTML(html: string) {
}
}
::v-deep {
.el-pagination {
--el-pagination-border-radius: 8px;
}
.n-breadcrumb-item__separator {
color: #fff !important;
font-size: 16px !important;
}
span > img {
width: 100%;
width: v-bind(imgW);
object-fit: contain;
}
p > img {
// width: 100%;
// object-fit: contain;
// transform: scale(1.5);
// width: v-bind(imgW);
transform: scale(v-bind(scale));
transform-origin: top;
}

View File

@ -5,7 +5,13 @@ import AppNewsBox from '@/components/AppNewsBox.vue'
import DetailNews from './DetailNews.vue'
import DetailNew from './DetailNew.vue'
import DetailNew1 from './DetailNew1.vue'
import { getArticleDetail,faqDetail,demandDetail,trendsDetail} from '@/api/daikin/base'
import {
getArticleDetail,
faqDetail,
demandDetail,
trendsDetail,
externalList
} from '@/api/daikin/base'
import HomeHead from '@/views/home/components/HomeHead.vue'
import { useDate } from '@/views/home/hooks/useDate'
const { push } = useRouter()
@ -13,7 +19,7 @@ const route = useRoute()
const { day, week } = useDate()
const SideNews = [
{ key: 'IntelligenceOutside', name: '社外情报' },
{ key: 'IntelligenceWithin', name: '社内情报' },
{ key: 'IntelligenceWithin', name: '社内情报' }
]
const types = ref()
const state = ref<any>({})
@ -25,12 +31,10 @@ async function getData() {
if (type == 1) {
const { data } = await faqDetail({ id })
state.value = data
}
else if(type==2){
} else if (type == 2) {
const { data } = await demandDetail({ id })
state.value = data
}
else{
} else {
const { data } = await trendsDetail({ id })
data.tagColor = data.tag === '紧急' ? '#e60e0e' : '#2cba06'
data.content = unescapeHTML(data.content)
@ -38,10 +42,9 @@ async function getData() {
}
}
function unescapeHTML(html: string) {
const doc = new DOMParser().parseFromString(html, 'text/html');
return doc.documentElement.textContent;
const doc = new DOMParser().parseFromString(html, 'text/html')
return doc.documentElement.textContent
}
getData()
@ -51,7 +54,6 @@ const goBack=()=>{
</script>
<template>
<div class="page">
<HomeHead class="top">
<!-- <template #content>
@ -68,11 +70,12 @@ const goBack=()=>{
</div>
</div>
<div class="page-wrap h-834px mt60px" style="grid-template-columns: 1fr">
<div class="page-main" style="padding: 0 30px;">
<div class="page-main" style="padding: 0 30px">
<AppBlock class="h-full">
<div class="overflow-y-auto h-full">
<div class="px46px py40px">
<DetailNews v-if="types==3"
<DetailNews
v-if="types == 3"
:title="state.title"
:content="state.content"
:publishTime="state.publishTime"
@ -109,7 +112,6 @@ const goBack=()=>{
</AppBlock>
</div>-->
</div>
</div>
</template>
@ -163,8 +165,6 @@ const goBack=()=>{
}
}
}
}
.main {
background-image: url('@/assets/images/bg-rs-main.svg');

View File

@ -534,7 +534,8 @@ const toList = (nb) => {
pages.page.cate = '8'
pages.page.title = '重要通知'
}
push({ name: 'DetailInfoList' })
// push({ name: 'DetailInfoList' })
push(`/external/info/${nb === 7 ? 'news' : 'info'}`)
}
const shorm = ref(false)

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

View File

@ -309,10 +309,10 @@ function formatNumber(num = 0) {
<div class="card_content">
<!-- <VChart :option="chartOption1" autoresize /> -->
<div class="flex pl15px pr10px pt15px text-#898F9F">
<div class="flex pl15px pr10px pt15px text-#898F9F-1 text-#152242">
<div class="">
<span class="icoT">市况</span>
<span class="ml15px text-12px">更新时间{{ timeA }}</span>
<span class="ml10px text-14px">更新时间{{ timeA }}</span>
<div class="h150px overflow-auto">
<table
@ -340,10 +340,10 @@ function formatNumber(num = 0) {
:key="index"
:class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''"
>
<td class="text-12px">{{ it.channel }}</td>
<td class="text-12px">{{ it.negAmount }}</td>
<td class="text-14px">{{ it.channel }}</td>
<td class="text-14px">{{ it.negAmount }}</td>
<td
class="text-12px"
class="text-14px"
:class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'"
>
{{ displayDiffValue(it.diffValue) }}
@ -378,10 +378,10 @@ function formatNumber(num = 0) {
:key="index"
:class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''"
>
<td class="text-12px">{{ it.channel }}</td>
<td class="text-12px">{{ it.negAmount }}</td>
<td class="text-14px">{{ it.channel }}</td>
<td class="text-14px">{{ it.negAmount }}</td>
<td
class="text-12px"
class="text-14px"
:class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'"
>
{{ displayDiffValue(it.diffValue) }}
@ -393,7 +393,7 @@ function formatNumber(num = 0) {
</div>
<div class="ml10px">
<span class="icoT">汇率</span>
<span class="ml15px text-12px">更新时间{{ timeB }}</span>
<span class="ml10px text-14px">更新时间{{ timeB }}</span>
<div class="h282px pt18px">
<table
class="history w-full text-center text-16px border-spacing-0 w219px"
@ -415,7 +415,7 @@ function formatNumber(num = 0) {
</thead>
<tbody v-if="itemLists" class="h238px overflow-auto absolute">
<tr
class="h60px !text-12px"
class="h60px !text-14px"
v-for="(it, index) in itemLists"
:key="index"
:class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''"

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import { getArticlePage, report } from '@/api/daikin/base'
import { getArticlePage, report, cateFileList } from '@/api/daikin/base'
import { message } from '@/utils/message'
import { Swiper, SwiperSlide } from 'swiper/vue'
import { Autoplay, Navigation, Pagination, A11y } from 'swiper'
@ -46,9 +46,30 @@ const toDetail2 = (n: any) => {
}
}
const modules = [Autoplay, Pagination, Navigation, A11y]
const files = ref<any>({})
const cateId = 201
const getFile = async () => {
const { rows }: any = await cateFileList({
// cateId: 201,
cateId,
pageNum: 1,
pageSize: 1
})
files.value = rows?.[0] || {}
const t = files.value.createTime
if (t) {
const arr = t.split('-')
files.value.time = arr[0] + '年' + (+arr[1] - 1) + '月'
}
}
getFile()
</script>
<template>
<div class="card news relative">
<div class="flex justify-between items-center">
<div>
<div
class="card_title cursor-pointer hover:underline"
@click="push({ name: 'Intelligence' })"
@ -56,8 +77,32 @@ const modules = [Autoplay, Pagination, Navigation, A11y]
外部情报
</div>
<div class="card_sub-title">责任者调达研究院 研究企画T</div>
</div>
<div
class="flex text-#fff tetx-16px items-end txt-bg px-10px py-8px rounded-10px text-#fff mt-[10px] mr-16px"
>
<p
class="text-16px text-#fff flex flex-col flex-start"
@click="push({ name: 'DataBase', query: { id: cateId } })"
>
<span
class="flex align-middle items-center cursor-pointer hover:underline mb-4px"
>调达本部月报
<img
class="h-14px pl-4px"
src="@/assets/images/yjtt@2x.png"
alt=""
/>
</span>
<span class="text-14px mt2px">
作成日{{ files.time || `2024年1月` }}
</span>
</p>
</div>
</div>
<div class="card_content px-20px pt-30px pb-0">
<div
v-if="false"
class="news_card w-437px flex items-end gap-12px text-#fff/80 !absolute right--20% top--38% scale-50"
>
<img
@ -157,11 +202,13 @@ const modules = [Autoplay, Pagination, Navigation, A11y]
</div>
</div>
</template>
<style lang="less">
<style lang="less" scoped>
::-webkit-scrollbar {
width: 1px;
}
.txt-bg {
background: linear-gradient(to right, #4aa7d9, #60d1c7);
}
.card {
// width: 480px;
// height: 428px;
@ -196,6 +243,7 @@ const modules = [Autoplay, Pagination, Navigation, A11y]
font-size: 28px;
color: #142142;
padding: 20px;
padding-right: 8px;
padding-bottom: 0;
}
@ -235,6 +283,7 @@ const modules = [Autoplay, Pagination, Navigation, A11y]
font-size: 12px;
font-weight: normal;
padding: 0 16px;
padding-right: 8px;
padding-bottom: 0;
margin-top: 10px;
z-index: 9;

View File

@ -42,7 +42,7 @@ function goListPage() {
const { path } = route
if (path === '/DataBase/review') push('/DataBase')
}
var activeItem = ref<any>(51)
var activeItem = ref<any>(0)
const tableData = ref()
async function getTree() {
const { data = [] } = await treeDbList({})
@ -52,7 +52,6 @@ async function getTree() {
// console.log(data[0])
titles.value = data[0].name
activeMenuKey.value = data[0].id
database.database.id = data[0].id
// if(data[0].childList&&data[0].childList.length>0){
// activeItem.value = data[0].childList[0].id
// activeMenuKey.value = data[0].childList[0].id
@ -92,6 +91,8 @@ async function getTree() {
}
}
}
} else {
database.database.id = data[0].id
}
}
getTree()

View File

@ -711,6 +711,7 @@ getdeptTree()
<div class="w100% h-full overflow-auto">
<el-table
:data="departData"
height="700px"
style="width: 100%; margin-bottom: 20px; height: 700px"
row-key="id"
border

View File

@ -71,7 +71,7 @@ const array = ref<any[]>([
</div>
</div> -->
<div class="mt30px mr20px flex w100%">
<img src="../../../assets/images/fzqiet2.png" class="w100%" />
<img src="../../../assets/images/fzqiet3.png" class="w100%" />
</div>
</template>

View File

@ -254,7 +254,7 @@ var activeItem = 0
>
<div
class="flex items-center text-18px"
@click="push({ name: 'DataBase', query: { id: 206 } })"
@click="push({ name: 'DataBase', query: { id: 267 } })"
>
<img
src="@/assets/images/dianhhh@2x.png"