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 * 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 }) 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') component: () => import('@/views/extermal/news/index.vue')
}, },
{ {
path: '/external/infoa/:id/:type', path: '/external/infoa/:id?/:type?',
name: 'DetailInfoa', name: 'DetailInfoa',
component: () => import('@/views/extermal/Article/Detaila.vue') 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 { NBreadcrumb, NBreadcrumbItem } from 'naive-ui'
import { pageType } from '@/stores/modules/pages' import { pageType } from '@/stores/modules/pages'
const { push } = useRouter() const { push, replace } = useRouter()
const route = useRoute() const route = useRoute()
const { day, week } = useDate() const { day, week } = useDate()
const pages = pageType() const pages = pageType()
const newId = ref<string>(); const newId = ref<string>()
const scale = ref(1.5); 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) { async function setModule(codes: any) {
const moduleCode = codes const moduleCode = codes
@ -40,7 +48,8 @@ const toList = (nb) => {
pages.page.cate = '8' pages.page.cate = '8'
pages.page.title = '重要通知' pages.page.title = '重要通知'
} }
push({ name: 'DetailInfoList' }) replace(`/external/info/${nb === 7 ? 'news' : 'info'}`)
// push({ name: 'DetailInfoList' })
} }
const SideNews = [ const SideNews = [
@ -82,21 +91,36 @@ async function getArticleP(page: any) {
pLenght = total / 10 pLenght = total / 10
} }
const state = ref<any>({})
const type = ref('')
watchEffect(() => { watchEffect(() => {
const { id } = route.params const { id } = route.params as any
if (!id) return if (!id) return
newId.value = id as string; newId.value = id as string
scale.value = id === '701' ? 2 : 1.5 scale.value = id === '701' ? 2 : ['778', '840', '887'].includes(id) ? 1.5 : 1
imgW.value = id !== '1241' ? '100%' : 'auto'
getArticleP(1) getArticleP(1)
getArticle(1) getArticle(1)
getData() getData()
}) })
const state = ref<any>({})
async function getData() { async function getData() {
const { id } = route.params const { id } = route.params
if (!id) return 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) const { data } = await externalInfo(id as string)
data.tagColor = data.tag === '紧急' ? '#e60e0e' : '#2cba06' data.tagColor = data.tag === '紧急' ? '#e60e0e' : '#2cba06'
@ -108,6 +132,16 @@ function unescapeHTML(html: string) {
const doc = new DOMParser().parseFromString(html, 'text/html') const doc = new DOMParser().parseFromString(html, 'text/html')
return doc.documentElement.textContent return doc.documentElement.textContent
} }
const handleSizeChange = (e) => {
pageInfo.pageSize = e
pageInfo.currentPage = 1
getData()
}
const handleCurrentChange = (e) => {
pageInfo.currentPage = e
getData()
}
</script> </script>
<template> <template>
@ -167,13 +201,67 @@ function unescapeHTML(html: string) {
<n-breadcrumb-item @click="push({ name: 'external' })"> <n-breadcrumb-item @click="push({ name: 'external' })">
外部首页</n-breadcrumb-item 外部首页</n-breadcrumb-item
> >
<n-breadcrumb-item> {{ state.title }}</n-breadcrumb-item> <n-breadcrumb-item> {{ type || state.title }}</n-breadcrumb-item>
</n-breadcrumb> </n-breadcrumb>
</div> </div>
<!-- <div class="page-wrap h-934px mt24px" style="grid-template-columns: 1fr"> --> <!-- <div class="page-wrap h-934px mt24px" style="grid-template-columns: 1fr"> -->
<div class="page-main ml-28px mb-30px"> <div class="page-main ml-28px mb-30px">
<AppBlock class="h-full"> <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"> <div class="px46px py40px">
<DetailNews <DetailNews
:title="state.title" :title="state.title"
@ -234,9 +322,7 @@ function unescapeHTML(html: string) {
<!-- <div <!-- <div
class="icons min-w-110px w110px h20px mt15px absolute right-0px top-0 text-black" class="icons min-w-110px w110px h20px mt15px absolute right-0px top-0 text-black"
> --> > -->
<div <div class="min-w-110px w110px text-black mb-8px ml-auto">
class="min-w-110px w110px text-black mb-8px ml-auto"
>
{{ i.createTime?.substring(0, 10) }} {{ i.createTime?.substring(0, 10) }}
</div> </div>
</div> </div>
@ -285,7 +371,7 @@ function unescapeHTML(html: string) {
line-height: 1; line-height: 1;
.page-wrap { .page-wrap {
display: grid; display: grid;
grid-template-columns: 1fr 314px; grid-template-columns: 1fr 414px;
grid-template-rows: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr);
grid-column-gap: 30px; grid-column-gap: 30px;
grid-row-gap: 30px; grid-row-gap: 30px;
@ -365,18 +451,22 @@ function unescapeHTML(html: string) {
} }
} }
::v-deep { ::v-deep {
.el-pagination {
--el-pagination-border-radius: 8px;
}
.n-breadcrumb-item__separator { .n-breadcrumb-item__separator {
color: #fff !important; color: #fff !important;
font-size: 16px !important; font-size: 16px !important;
} }
span > img { span > img {
width: 100%; width: v-bind(imgW);
object-fit: contain; object-fit: contain;
} }
p > img { p > img {
// width: 100%; // width: 100%;
// object-fit: contain; // object-fit: contain;
// transform: scale(1.5); // transform: scale(1.5);
// width: v-bind(imgW);
transform: scale(v-bind(scale)); transform: scale(v-bind(scale));
transform-origin: top; transform-origin: top;
} }

View File

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

View File

@ -534,7 +534,8 @@ const toList = (nb) => {
pages.page.cate = '8' pages.page.cate = '8'
pages.page.title = '重要通知' pages.page.title = '重要通知'
} }
push({ name: 'DetailInfoList' }) // push({ name: 'DetailInfoList' })
push(`/external/info/${nb === 7 ? 'news' : 'info'}`)
} }
const shorm = ref(false) 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"> <div class="card_content">
<!-- <VChart :option="chartOption1" autoresize /> --> <!-- <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=""> <div class="">
<span class="icoT">市况</span> <span class="icoT">市况</span>
<span class="ml15px text-12px">更新时间{{ timeA }}</span> <span class="ml10px text-14px">更新时间{{ timeA }}</span>
<div class="h150px overflow-auto"> <div class="h150px overflow-auto">
<table <table
@ -340,10 +340,10 @@ function formatNumber(num = 0) {
:key="index" :key="index"
:class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''" :class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''"
> >
<td class="text-12px">{{ it.channel }}</td> <td class="text-14px">{{ it.channel }}</td>
<td class="text-12px">{{ it.negAmount }}</td> <td class="text-14px">{{ it.negAmount }}</td>
<td <td
class="text-12px" class="text-14px"
:class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'" :class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'"
> >
{{ displayDiffValue(it.diffValue) }} {{ displayDiffValue(it.diffValue) }}
@ -378,10 +378,10 @@ function formatNumber(num = 0) {
:key="index" :key="index"
:class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''" :class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''"
> >
<td class="text-12px">{{ it.channel }}</td> <td class="text-14px">{{ it.channel }}</td>
<td class="text-12px">{{ it.negAmount }}</td> <td class="text-14px">{{ it.negAmount }}</td>
<td <td
class="text-12px" class="text-14px"
:class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'" :class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'"
> >
{{ displayDiffValue(it.diffValue) }} {{ displayDiffValue(it.diffValue) }}
@ -393,7 +393,7 @@ function formatNumber(num = 0) {
</div> </div>
<div class="ml10px"> <div class="ml10px">
<span class="icoT">汇率</span> <span class="icoT">汇率</span>
<span class="ml15px text-12px">更新时间{{ timeB }}</span> <span class="ml10px text-14px">更新时间{{ timeB }}</span>
<div class="h282px pt18px"> <div class="h282px pt18px">
<table <table
class="history w-full text-center text-16px border-spacing-0 w219px" class="history w-full text-center text-16px border-spacing-0 w219px"
@ -415,7 +415,7 @@ function formatNumber(num = 0) {
</thead> </thead>
<tbody v-if="itemLists" class="h238px overflow-auto absolute"> <tbody v-if="itemLists" class="h238px overflow-auto absolute">
<tr <tr
class="h60px !text-12px" class="h60px !text-14px"
v-for="(it, index) in itemLists" v-for="(it, index) in itemLists"
:key="index" :key="index"
:class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''" :class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''"

View File

@ -1,5 +1,5 @@
<script setup lang="ts"> <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 { message } from '@/utils/message'
import { Swiper, SwiperSlide } from 'swiper/vue' import { Swiper, SwiperSlide } from 'swiper/vue'
import { Autoplay, Navigation, Pagination, A11y } from 'swiper' import { Autoplay, Navigation, Pagination, A11y } from 'swiper'
@ -46,9 +46,30 @@ const toDetail2 = (n: any) => {
} }
} }
const modules = [Autoplay, Pagination, Navigation, A11y] 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> </script>
<template> <template>
<div class="card news relative"> <div class="card news relative">
<div class="flex justify-between items-center">
<div>
<div <div
class="card_title cursor-pointer hover:underline" class="card_title cursor-pointer hover:underline"
@click="push({ name: 'Intelligence' })" @click="push({ name: 'Intelligence' })"
@ -56,8 +77,32 @@ const modules = [Autoplay, Pagination, Navigation, A11y]
外部情报 外部情报
</div> </div>
<div class="card_sub-title">责任者调达研究院 研究企画T</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 class="card_content px-20px pt-30px pb-0">
<div <div
v-if="false"
class="news_card w-437px flex items-end gap-12px text-#fff/80 !absolute right--20% top--38% scale-50" class="news_card w-437px flex items-end gap-12px text-#fff/80 !absolute right--20% top--38% scale-50"
> >
<img <img
@ -157,11 +202,13 @@ const modules = [Autoplay, Pagination, Navigation, A11y]
</div> </div>
</div> </div>
</template> </template>
<style lang="less"> <style lang="less" scoped>
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 1px; width: 1px;
} }
.txt-bg {
background: linear-gradient(to right, #4aa7d9, #60d1c7);
}
.card { .card {
// width: 480px; // width: 480px;
// height: 428px; // height: 428px;
@ -196,6 +243,7 @@ const modules = [Autoplay, Pagination, Navigation, A11y]
font-size: 28px; font-size: 28px;
color: #142142; color: #142142;
padding: 20px; padding: 20px;
padding-right: 8px;
padding-bottom: 0; padding-bottom: 0;
} }
@ -235,6 +283,7 @@ const modules = [Autoplay, Pagination, Navigation, A11y]
font-size: 12px; font-size: 12px;
font-weight: normal; font-weight: normal;
padding: 0 16px; padding: 0 16px;
padding-right: 8px;
padding-bottom: 0; padding-bottom: 0;
margin-top: 10px; margin-top: 10px;
z-index: 9; z-index: 9;

View File

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

View File

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

View File

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

View File

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