Merge remote-tracking branch 'origin/master'

master
王家东 2 weeks ago
commit 5002adaa4b
  1. 24
      jeecgboot-vue3/src/api/mainHome/index.ts
  2. 60
      jeecgboot-vue3/src/router/guard/permissionGuard.ts
  3. 4
      jeecgboot-vue3/src/router/helper/mainOut.ts
  4. 12
      jeecgboot-vue3/src/store/modules/setting.ts
  5. 4
      jeecgboot-vue3/src/views/demo/main-home/components/NewsList/index.vue
  6. 214
      jeecgboot-vue3/src/views/demo/main-home/components/articleManagement/index.vue
  7. 214
      jeecgboot-vue3/src/views/demo/main-home/components/columnManagement/index.vue
  8. 167
      jeecgboot-vue3/src/views/demo/main-home/components/homePage/index.vue
  9. 38
      jeecgboot-vue3/src/views/demo/main-home/components/projectDeclaration/index.vue
  10. 15
      jeecgboot-vue3/src/views/demo/main-home/index.vue

@ -99,4 +99,28 @@ export function getindexexperttype() {
url: '/expert/expert/directioncalListCMS',
method: 'GET',
});
}
//
export function getindexnotice(params?: any) {
return defHttp.request({
url: '/cms/front/getindexnewtzgg',
method: 'GET',
params
});
}
//
export function getindexnewskx() {
return defHttp.request({
url: '/cms/front/getindexnewxwlb',
method: 'GET',
});
}
//
export function getindexgzdt(params?: any) {
return defHttp.request({
url: '/cms/front/getindexnewgzdt',
method: 'GET',
params
});
}

@ -10,9 +10,10 @@ import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic';
import { RootRoute } from '/@/router/routes';
import { isOAuth2AppEnv } from '/@/views/sys/login/useLogin';
import { OAUTH2_THIRD_LOGIN_TENANT_ID } from "/@/enums/cacheEnum";
import { setAuthCache } from "/@/utils/auth";
import { OAUTH2_THIRD_LOGIN_TENANT_ID } from '/@/enums/cacheEnum';
import { setAuthCache } from '/@/utils/auth';
import { mainOutRoutes } from '@/router/helper/mainOut';
import { useSettingStore } from '/@/store/modules/setting';
const LOGIN_PATH = PageEnum.BASE_LOGIN;
//auth2
const OAUTH2_LOGIN_PAGE_PATH = PageEnum.OAUTH2_LOGIN_PAGE_PATH;
@ -27,7 +28,7 @@ const ROOT_PATH = RootRoute.path;
//update-begin---author:wangshuai ---date:20220629 for[issues/I5BG1I]vue3auth2------------
//update-begin---author:wangshuai ---date:20221111 for: [VUEN-2472]------------
const whitePathList: PageEnum[] = [LOGIN_PATH, OAUTH2_LOGIN_PAGE_PATH,SYS_FILES_PATH, TOKEN_LOGIN ];
const whitePathList: PageEnum[] = [LOGIN_PATH, OAUTH2_LOGIN_PAGE_PATH, SYS_FILES_PATH, TOKEN_LOGIN];
//update-end---author:wangshuai ---date:20221111 for: [VUEN-2472]------------
//update-end---author:wangshuai ---date:20220629 for[issues/I5BG1I]vue3auth2------------
@ -39,6 +40,20 @@ export function createPermissionGuard(router: Router) {
let homePathJumpCount = 0;
router.beforeEach(async (to, from, next) => {
if (to.path.includes('main-home')) {
const settingStore = useSettingStore();
const routerList = mainOutRoutes[1].children?.filter((item) => !item.meta?.hidden);
let index = routerList.findIndex((item) => item.path === to.path);
if(index === -1) {
index = 4
console.log(index);
settingStore.serIndex(index);
}else{
console.log(index);
settingStore.serIndex(index);
}
}
if (
// #6861
homePathJumpCount < 1 &&
@ -58,12 +73,12 @@ export function createPermissionGuard(router: Router) {
if (whitePathList.includes(to.path as PageEnum)) {
if (to.path === LOGIN_PATH && token) {
const isSessionTimeout = userStore.getSessionTimeout;
//update-begin---author:scott ---date:2023-04-24 forQQYUN-4713--
//TODO vben
//await userStore.afterLoginAction();
//update-end---author:scott ---date::2023-04-24 forQQYUN-4713--
try {
if (!isSessionTimeout) {
next((to.query?.redirect as string) || '/');
@ -75,8 +90,8 @@ export function createPermissionGuard(router: Router) {
//退
//loginOAuth2apptokenOAuth2
//update-begin---author:wangshuai ---date:20230224 for[QQYUN-3440]------------
if(to.query.tenantId){
setAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID,to.query.tenantId)
if (to.query.tenantId) {
setAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID, to.query.tenantId);
}
next({ path: OAUTH2_LOGIN_PAGE_PATH });
//update-end---author:wangshuai ---date:20230224 for[QQYUN-3440]------------
@ -111,11 +126,11 @@ export function createPermissionGuard(router: Router) {
//
let href = window.location.href;
//auth2/tenantId
if(isOAuth2AppEnv() && href.indexOf("/tenantId/")!= -1){
if (isOAuth2AppEnv() && href.indexOf('/tenantId/') != -1) {
let params = to.params;
if(params && params.path && params.path.length>0){
if (params && params.path && params.path.length > 0) {
//
setAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID,params.path[params.path.length-1])
setAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID, params.path[params.path.length - 1]);
}
}
//---------------------------------------------------------
@ -134,21 +149,26 @@ export function createPermissionGuard(router: Router) {
//update-begin---author:scott ---date:2023-04-24 forQQYUN-4713--
if (to.fullPath) {
console.log("to.fullPath 1",to.fullPath)
console.log("to.path 2",to.path)
console.log('to.fullPath 1', to.fullPath);
console.log('to.path 2', to.path);
let getFullPath = to.fullPath;
if(getFullPath=='/' || getFullPath=='/500' || getFullPath=='/400' || getFullPath=='/login?redirect=/' || getFullPath=='/login?redirect=/login?redirect=/'){
if (
getFullPath == '/' ||
getFullPath == '/500' ||
getFullPath == '/400' ||
getFullPath == '/login?redirect=/' ||
getFullPath == '/login?redirect=/login?redirect=/'
) {
return;
}
//update-end---author:scott ---date:2023-04-24 forQQYUN-4713--
//update-end---author:scott ---date:2023-04-24 forQQYUN-4713--
redirectData.query = {
...redirectData.query,
// update-begin-author:sunjianlei date:20230306 for:
redirect: to.fullPath,
// update-end-author:sunjianlei date:20230306 for:
};
}
next(redirectData);
@ -157,12 +177,12 @@ export function createPermissionGuard(router: Router) {
//================================================
//,/tenantId/,
if(isOAuth2AppEnv() && to.path.indexOf("/tenantId/") != -1){
if (isOAuth2AppEnv() && to.path.indexOf('/tenantId/') != -1) {
next(userStore.getUserInfo.homePath || PageEnum.BASE_HOME);
return;
}
//================================================
// Jump to the 404 page after processing the login
if (from.path === LOGIN_PATH && to.name === PAGE_NOT_FOUND_ROUTE.name && to.fullPath !== (userStore.getUserInfo.homePath || PageEnum.BASE_HOME)) {
next(userStore.getUserInfo.homePath || PageEnum.BASE_HOME);

@ -99,7 +99,7 @@ export const mainOutRoutes: AppRouteModule[] = [
name: 'ColumnManagement',
component: () => import('/@/views/demo/main-home/components/columnManagement/index.vue'),
meta: {
title: '栏目管理',
title: '通知公告',
ignoreAuth: true,
hidden: false
@ -110,7 +110,7 @@ export const mainOutRoutes: AppRouteModule[] = [
name: 'ArticleManagement',
component: () => import('/@/views/demo/main-home/components/articleManagement/index.vue'),
meta: {
title: '文章管理',
title: '工作动态',
ignoreAuth: true,
hidden: false

@ -0,0 +1,12 @@
import { defineStore } from 'pinia';
export const useSettingStore = defineStore({
id: 'app-setting',
state: () => ({
activeIndex: 0,
}),
actions: {
serIndex(index) {
this.activeIndex = index;
},
},
});

@ -166,6 +166,7 @@
line-height: 40px;
margin-top: 30px;
background-color: #002e97;
cursor: pointer;
}
}
}
@ -191,6 +192,9 @@
border-bottom: 1px solid #d9d9d9;
cursor: pointer;
}
.item:hover {
color: #002e97;
}
}
}
}

@ -1,20 +1,212 @@
<template>
<div class="">
文章管理
<div class="container">
<div class="news-list">
<div class="item" v-for="i in newList" :key="i">
<div class="left"
><div class="year">{{ i.publishTime.split('-')[0] }}-{{ i.publishTime.split('-')[1] }}</div
><div class="day">{{ i.publishTime.split(' ')[0].split('-')[2] }}</div></div
>
<div class="right">
<div class="title">{{ i.title }}</div>
<div class="editor">{{ i.source }}</div>
<div class="description"><div v-html="i.info"></div></div>
<div class="get-info" @click="onGetInfo(i)">查看详情</div>
</div>
</div>
<!-- 分页 -->
<div class="pagination"> <Pagination :current="current" :pageSize="page.pageSize" :total="total" show-less-items @change="onChange" /></div>
</div>
<!-- 栏目 -->
<div class="column-list">
<div class="title">栏目列表</div>
<div class="list">
<div class="item" @click="getindexallarticleEvent">全部</div>
<div class="item" v-for="i in newColumnList" :key="i.id" @click="getMyNewsList(i)">{{ i.name }}</div>
<!-- <div class="item">项目申报</div>
<div class="item">新闻列表</div> -->
</div>
</div>
</div>
</template>
<script setup>
import { ref, computed, nextTick, watch, onMounted } from "vue"
import { useRouter, useRoute } from "vue-router"
import { Pagination } from 'ant-design-vue';
const router = useRouter()
const route = useRoute()
import { getindexcolumn ,getindexgzdt} from '@/api/mainHome';
import { ref } from 'vue';
import { useRouter } from 'vue-router';
const total = ref(0)
const router = useRouter();
const current = ref(1);
const total = ref(0);
const page = ref({
pageSize: 10,
pageNo: 1,
});
const newColumnList = ref([]);
const getindexcolumnEvent = async () => {
const res = await getindexcolumn();
console.log(res);
newColumnList.value = res;
};
getindexcolumnEvent();
const getMyNewsList = (item) => {
console.log(item);
getindexarticleEvent(item.id);
};
const newList = ref([]);
const getindexarticleEvent = async (id) => {
columnId.value = id;
const res = await getindexgzdt({ columnId: id, ...page.value });
console.log(res);
newList.value = res.records;
total.value = res.total;
};
const columnId = ref('');
const onChange = (page) => {
console.log(page);
page.pageNo = page;
if (columnId.value) {
getindexarticleEvent(columnId.value);
} else {
getindexallarticleEvent();
}
};
const getindexallarticleEvent = async () => {
const res = await getindexgzdt();
console.log(res);
newList.value = res.records;
total.value = res.total;
};
getindexallarticleEvent();
//
const onGetInfo = (item) => {
console.log(item);
router.push({
path: '/main-home/newsInfo',
query: {
id: item.id,
},
})
}
</script>
<style scoped lang="scss">
</style>
<style scoped lang="less">
.container {
position: relative;
width: 1200px;
margin: 0 auto;
display: flex;
margin-top: 50px;
.news-list {
position: relative;
width: calc(1200px - 415px);
margin-right: 30px;
min-height: 755px;
padding-bottom: 80px;
.item {
display: flex;
width: 100%;
border-bottom: 2px solid #ccc;
padding-bottom: 45px;
margin-top: 40px;
.left {
width: 100px;
height: 100px;
border: 1px solid #ccc;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.year {
font-size: 16px;
color: #333;
}
.day {
font-size: 40px;
font-weight: 600;
color: #333;
}
}
.right {
margin-left: 30px;
.title {
font-size: 22px;
color: #000;
font-weight: 600;
}
.editor {
position: relative;
font-size: 14px;
color: #999;
font-size: 14px;
margin-top: 10px;
}
.editor::before {
content: '';
display: block;
position: absolute;
width: 53px;
bottom: -15px;
height: 4px;
background-color: #d9d9d9;
}
.description {
margin-top: 30px;
width: 660px;
}
.get-info {
color: #fff;
width: 132px;
height: 40px;
text-align: center;
line-height: 40px;
margin-top: 30px;
background-color: #002e97;
cursor: pointer;
}
}
}
}
.column-list {
position: sticky;
top: 0;
width: 385px;
background-color: #fff;
height: 755px;
padding: 30px;
.title {
font-size: 20px;
font-weight: 600;
color: #555;
}
.list {
.item {
font-size: 16px;
color: #555;
height: 50px;
line-height: 50px;
border-bottom: 1px solid #d9d9d9;
cursor: pointer;
}
.item:hover {
color: #002e97;
}
}
}
}
.pagination {
// background-color: #fff;
position: absolute;
bottom: -20px;
left: 50%;
transform: translateX(-50%);
margin-top: 20px;
height: 70px;
display: flex;
justify-content: center;
}
</style>

@ -1,20 +1,212 @@
<template>
<div class="">
栏目管理
<div class="container">
<div class="news-list">
<div class="item" v-for="i in newList" :key="i">
<div class="left"
><div class="year">{{ i.publishTime.split('-')[0] }}-{{ i.publishTime.split('-')[1] }}</div
><div class="day">{{ i.publishTime.split(' ')[0].split('-')[2] }}</div></div
>
<div class="right">
<div class="title">{{ i.title }}</div>
<div class="editor">{{ i.source }}</div>
<div class="description"><div v-html="i.info"></div></div>
<div class="get-info" @click="onGetInfo(i)">查看详情</div>
</div>
</div>
<!-- 分页 -->
<div class="pagination"> <Pagination :current="current" :pageSize="page.pageSize" :total="total" show-less-items @change="onChange" /></div>
</div>
<!-- 栏目 -->
<div class="column-list">
<div class="title">栏目列表</div>
<div class="list">
<div class="item" @click="getindexallarticleEvent">全部</div>
<div class="item" v-for="i in newColumnList" :key="i.id" @click="getMyNewsList(i)">{{ i.name }}</div>
<!-- <div class="item">项目申报</div>
<div class="item">新闻列表</div> -->
</div>
</div>
</div>
</template>
<script setup>
import { ref, computed, nextTick, watch, onMounted } from "vue"
import { useRouter, useRoute } from "vue-router"
import { Pagination } from 'ant-design-vue';
const router = useRouter()
const route = useRoute()
import { getindexcolumn, getindexarticle ,getindexnotice} from '@/api/mainHome';
import { ref } from 'vue';
import { useRouter } from 'vue-router';
const total = ref(0)
const router = useRouter();
const current = ref(1);
const total = ref(0);
const page = ref({
pageSize: 10,
pageNo: 1,
});
const newColumnList = ref([]);
const getindexcolumnEvent = async () => {
const res = await getindexcolumn();
console.log(res);
newColumnList.value = res;
};
getindexcolumnEvent();
const getMyNewsList = (item) => {
console.log(item);
getindexarticleEvent(item.id);
};
const newList = ref([]);
const getindexarticleEvent = async (id) => {
columnId.value = id;
const res = await getindexnotice({ columnId: id, ...page.value });
console.log(res);
newList.value = res.records;
total.value = res.total;
};
const columnId = ref('');
const onChange = (page) => {
console.log(page);
page.pageNo = page;
if (columnId.value) {
getindexarticleEvent(columnId.value);
} else {
getindexallarticleEvent();
}
};
const getindexallarticleEvent = async () => {
const res = await getindexnotice();
console.log(res);
newList.value = res.records;
total.value = res.total;
};
getindexallarticleEvent();
//
const onGetInfo = (item) => {
console.log(item);
router.push({
path: '/main-home/newsInfo',
query: {
id: item.id,
},
})
}
</script>
<style scoped lang="scss">
</style>
<style scoped lang="less">
.container {
position: relative;
width: 1200px;
margin: 0 auto;
display: flex;
margin-top: 50px;
.news-list {
position: relative;
width: calc(1200px - 415px);
margin-right: 30px;
min-height: 755px;
padding-bottom: 80px;
.item {
display: flex;
width: 100%;
border-bottom: 2px solid #ccc;
padding-bottom: 45px;
margin-top: 40px;
.left {
width: 100px;
height: 100px;
border: 1px solid #ccc;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.year {
font-size: 16px;
color: #333;
}
.day {
font-size: 40px;
font-weight: 600;
color: #333;
}
}
.right {
margin-left: 30px;
.title {
font-size: 22px;
color: #000;
font-weight: 600;
}
.editor {
position: relative;
font-size: 14px;
color: #999;
font-size: 14px;
margin-top: 10px;
}
.editor::before {
content: '';
display: block;
position: absolute;
width: 53px;
bottom: -15px;
height: 4px;
background-color: #d9d9d9;
}
.description {
margin-top: 30px;
width: 660px;
}
.get-info {
color: #fff;
width: 132px;
height: 40px;
text-align: center;
line-height: 40px;
margin-top: 30px;
background-color: #002e97;
cursor: pointer;
}
}
}
}
.column-list {
position: sticky;
top: 0;
width: 385px;
background-color: #fff;
height: 755px;
padding: 30px;
.title {
font-size: 20px;
font-weight: 600;
color: #555;
}
.list {
.item {
font-size: 16px;
color: #555;
height: 50px;
line-height: 50px;
border-bottom: 1px solid #d9d9d9;
cursor: pointer;
}
.item:hover {
color: #002e97;
}
}
}
}
.pagination {
// background-color: #fff;
position: absolute;
bottom: -20px;
left: 50%;
transform: translateX(-50%);
margin-top: 20px;
height: 70px;
display: flex;
justify-content: center;
}
</style>

@ -20,7 +20,7 @@
<a-carousel arrows style="width: 100%; height: 100%">
<template #prevArrow>
<div class="custom-slick-arrow" style="left: 10px; z-index: 1">
<left-circle-outlined />
<LeftCircleOutlined />
</div>
</template>
<template #nextArrow>
@ -28,8 +28,10 @@
<right-circle-outlined />
</div>
</template>
<div v-for="(item, index) in imageList" :key="index"
><img style="width: 100%; height: 400px" :src="item" alt="" srcset=""
<div v-for="(item, index) in noticeList" :key="index"
><div class="carousel-title"
><div class="text">{{ item.title }}</div></div
><img style="width: 100%; height: 400px" @click="goToNewInfo(item)" :src="setImageUrl(item.comimg)" alt="" srcset=""
/></div> </a-carousel
></div>
<div class="rightt">
@ -38,15 +40,7 @@
</div>
<div class="inner">
<ul>
<li>省科技厅召开党组会传达学习省管主要领导干部学习贯彻</li>
<li>王浩建设高水平创新型省份 因地制宜大力发展新质生</li>
<li>省委第四巡视组省科学技术厅工作动员会议召开</li>
<li>省科技厅召开厅系统重点工作交流会</li>
<li>省科技厅召开党组(扩大)会总结党纪学习教育工作</li>
<li>省科技厅召开党组会传达学习贯彻省委十五届五次全会精神</li>
<li>建设高水平创新型省份</li>
<li>学习贯彻省委十五届五次全会精神</li>
<li>省科技厅召开党组会传达学习省管主要领导干部学习贯彻</li>
<li v-for="item in noticeList" :key="item.id" @click="goToNewInfo(item)">{{ item.title }}</li>
</ul>
</div>
</div>
@ -57,37 +51,21 @@
<div class="box4">
<div class="inner1">
<div class="tell">
<div class="fl">通知通告</div>
<div class="fl">新闻快讯</div>
</div>
<div class="inner">
<ul>
<li>省科技厅召开党组会传达学习省管主要领导干部学习贯彻</li>
<li>王浩建设高水平创新型省份 因地制宜大力发展新质生</li>
<li>省委第四巡视组省科学技术厅工作动员会议召开</li>
<li>省科技厅召开厅系统重点工作交流会</li>
<li>省科技厅召开党组(扩大)会总结党纪学习教育工作</li>
<li>省科技厅召开党组会传达学习贯彻省委十五届五次全会精</li>
<li>建设高水平创新型省份</li>
<li>学习贯彻省委十五届五次全会精神</li>
<li>省科技厅召开党组会传达学习省管主要领导干部学习贯彻</li>
<li v-for="item in newList" :key="item.id" @click="goToNewInfo(item)">{{ item.title }}</li>
</ul>
</div>
</div>
<div class="inner2">
<div class="tell">
<div class="fl">通知通告</div>
<div class="fl">工作动态</div>
</div>
<div class="inner">
<ul>
<li>省科技厅召开党组会传达学习省管主要领导干部学习贯彻</li>
<li>王浩建设高水平创新型省份 因地制宜大力发展新质生</li>
<li>省委第四巡视组省科学技术厅工作动员会议召开</li>
<li>省科技厅召开厅系统重点工作交流会</li>
<li>省科技厅召开党组(扩大)会总结党纪学习教育工作</li>
<li>省科技厅召开党组会传达学习贯彻省委十五届五次全会精神</li>
<li>建设高水平创新型省份</li>
<li>学习贯彻省委十五届五次全会精神</li>
<li>省科技厅召开党组会传达学习省管主要领导干部学习贯彻</li>
<li v-for="item in gzdtList" :key="item.id" @click="goToNewInfo(item)">{{ item.title }}</li>
</ul>
</div>
</div>
@ -108,7 +86,6 @@
<div class="sum">437</div>
<div class="text">科研平台数量</div>
</div>
</div>
<div class="box6">
<div class="share1">
@ -116,16 +93,16 @@
<div class="fl">仪器共享</div>
</div>
<div class="instrument">
<vue3ScrollSeamless class="scroll-wrap" :classOptions="classOptions" :dataList="list">
<vue3ScrollSeamless class="scroll-wrap" :classOptions="classOptions" :dataList="compList">
<ul class="ui-wrap">
<li class="li-item" v-for="(item, i) of list" :key="i">
<li class="li-item" v-for="(item, i) of compList" :key="item.id">
<div class="instrumentImage">
<img width="100%" src="../../../../../assets/images/image.png" alt="" />
<div class="small">
<h6>数字无线电综合测试仪</h6>
<p>分类电子测量仪器->通讯测量...</p>
<p>服务次数0</p>
<p>鹤壁天海电子信息系统有限公司</p>
<h6>{{ item.name }}</h6>
<p>分类{{ item.category_dictText }}.</p>
<p>服务次数{{ item.serviceFrequency }}</p>
<p>{{ item.declarationUnit_dictText }}</p>
</div>
</div>
</li>
@ -149,9 +126,10 @@
<script setup>
import { ref, reactive } from 'vue';
import { vue3ScrollSeamless } from 'vue3-scroll-seamless';
import { getindexnews } from '/@/api/mainHome';
import { getindexnews, getindexnotice, getindexnewskx, getindexgzdt, getindexcomp } from '/@/api/mainHome';
import { useRoute, useRouter } from 'vue-router';
import SvgIcon from '/@/components/Icon/src/SvgIcon.vue';
import { LeftCircleOutlined, RightCircleOutlined } from '@ant-design/icons-vue';
const route = useRoute();
const router = useRouter();
let list = reactive([1, 2, 3, 4, 5, 6]);
@ -159,10 +137,6 @@
limitMoveNum: 2,
direction: 2,
};
const imageList = ref([
'https://ts1.cn.mm.bing.net/th/id/R-C.987f582c510be58755c4933cda68d525?rik=C0D21hJDYvXosw&riu=http%3a%2f%2fimg.pconline.com.cn%2fimages%2fupload%2fupc%2ftx%2fwallpaper%2f1305%2f16%2fc4%2f20990657_1368686545122.jpg&ehk=netN2qzcCVS4ALUQfDOwxAwFcy41oxC%2b0xTFvOYy5ds%3d&risl=&pid=ImgRaw&r=0',
'https://tse1-mm.cn.bing.net/th/id/OIP-C.DOOxGtkUiW8QevWtAxsRtAHaEK?rs=1&pid=ImgDetMain',
]);
const topNewList = ref([]);
const getlist = async () => {
const res = await getindexnews();
@ -181,6 +155,48 @@
},
});
};
//
const noticeList = ref([]);
const getNoticeList = async () => {
const res = await getindexnotice();
console.log(res);
noticeList.value = res.records;
};
getNoticeList();
//
const newList = ref([]);
const getindexnewsEvent = async () => {
const res = await getindexnewskx();
console.log(res);
newList.value = res.records;
};
getindexnewsEvent();
//
const gzdtList = ref([]);
const getgzdtList = async () => {
const res = await getindexgzdt();
console.log(res);
gzdtList.value = res.records;
};
getgzdtList();
//
const compList = ref([]);
const getcompList = async () => {
const res = await getindexcomp();
console.log(res);
compList.value = res.records;
};
getcompList();
const setImageUrl = (url) => {
if (url) {
return import.meta.env.VITE_GLOB_DOMAIN_URL + '/' + url;
}
};
</script>
<style scoped lang="less">
@ -272,6 +288,7 @@
color: #fff;
background-color: #003cb9;
padding-left: 15px;
}
.inner {
height: calc(400px - 50px);
@ -287,6 +304,10 @@
list-style-type: disc;
padding-bottom: 14px;
color: #404040;
cursor: pointer;
}
.inner ul li:hover{
color: #003cb9;
}
.inner ul li::marker {
color: rgb(173, 89, 89);
@ -323,7 +344,7 @@
display: flex;
align-items: center;
justify-content: space-around;
background-color: #F2F7FB;
background-color: #f2f7fb;
.item {
display: flex;
align-items: center;
@ -333,13 +354,12 @@
color: #ff0000;
line-height: 40px;
}
.text{
.text {
color: #333333;
font-size: 14px;
span{
span {
vertical-align: bottom;
}
}
}
}
@ -439,4 +459,55 @@
line-height: 160px;
overflow: hidden;
}
:deep(.slick-slide) {
position: relative;
}
.carousel-title {
position: absolute;
bottom: 0;
width: 100%;
height: 40px;
line-height: 40px;
color: #fff;
text-align: left;
background-color: rgba(0, 0, 0, 0.5);
.text {
width: 70%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding-left: 5px;
}
}
:deep(.slick-arrow.custom-slick-arrow) {
width: 25px;
height: 25px;
font-size: 25px;
color: #fff;
background-color: rgba(31, 45, 61, 0.11);
transition: ease all 0.3s;
opacity: 0.3;
z-index: 1;
}
:deep(.slick-arrow.custom-slick-arrow:before) {
display: none;
}
:deep(.slick-arrow.custom-slick-arrow:hover) {
color: #fff;
opacity: 0.5;
}
:deep(.slick-slide h3) {
color: #fff;
}
:deep(:where(.css-dev-only-do-not-override-1hajlzy).ant-carousel .slick-dots) {
justify-content: end;
bottom: 4px;
right: 5px;
}
:deep(:where(.css-dev-only-do-not-override-1hajlzy).ant-carousel .slick-dots li button) {
width: 8px;
height: 8px;
border-radius: 50%;
}
</style>

@ -9,13 +9,7 @@
</div>
<div class="buttom">
<ul>
<li>浙江省科学技术厅2023年度浙江省科学技术奖提名受理情况公示</li>
<li>浙江省科学技术厅关于绍兴黄酒重大科技项目立项</li>
<li>浙江省科学技术厅关于拟下达2024年浙江省中央引导地方科技发展资金...</li>
<li>关于浙江省人民政府重大委托课题确定中标对象的公示</li>
<li>省级部门2023年度预期尚未支付中小企业款项信息公开公示</li>
<li>浙江省科学技术厅关于2023年度省级新型研发机构拟认定名单的公示</li>
<li>浙江省科学技术厅关于2023年省级新产品试制计划(第二批)拟立项目...</li>
<li v-for="item in newList" :key="item.id" @click="onGetInfo(item)">{{ item.title }}</li>
</ul>
</div>
</div>
@ -41,8 +35,32 @@
<script setup>
import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { getindexcolumn, getindexarticle, getindexallarticle } from '@/api/mainHome';
const router = useRouter();
const activeIndex = ref(0);
const columnId = ref('')
const getindexcolumnEvent = async () => {
const res = await getindexcolumn();
console.log(res);
columnId.value = res.find(item => item.name === '项目申报').id
getindexarticleEvent()
};
getindexcolumnEvent();
const newList = ref([]);
const getindexarticleEvent = async () => {
const res = await getindexarticle({ columnId: columnId.value });
newList.value = res.records;
};
const onGetInfo = (item) => {
console.log(item);
router.push({
path: '/main-home/newsInfo',
query: {
id: item.id,
},
})
}
const goToLogin = () => {
router.push({
path: '/login',
@ -105,6 +123,10 @@ const goToLogin = () => {
.buttom ul li{
padding: 5px 0 ;
list-style-type:disc;
cursor: pointer;
}
.buttom ul li:hover{
color: #0763e4;
}
}

@ -52,7 +52,7 @@
<div class="fixed">
<div class="card bot">
<!--<div class="img-box" onclick="window.location.href='http://10.20.15.171:3200/'"><img src="../../../assets/images/mainHome/Frame.png" alt=""></div>-->
<div class="img-box" onclick="window.location.href='http://127.0.0.1:3200/'"
<div @click="router.push('/')" class="img-box"
><img src="../../../assets/images/mainHome/Frame.png" alt=""
/></div>
@ -88,18 +88,25 @@
</template>
<script lang="ts" setup>
import { reactive, ref } from 'vue';
import { reactive, ref,watch } from 'vue';
import { useRouter } from 'vue-router';
import {mainOutRoutes} from '@/router/helper/mainOut'
import { useSettingStore } from '/@/store/modules/setting';
const settingStore = useSettingStore();
const router = useRouter();
const activeIndex = ref(0);
const activeIndex = ref(settingStore.activeIndex)
const goTo = (item: any, index: number) => {
activeIndex.value = index;
settingStore.serIndex(index);
console.log(activeIndex);
activeIndex.value = settingStore.activeIndex
router.push(item.path);
};
const navList = mainOutRoutes[1].children?.filter(item => !item.meta.hidden)
console.log(navList,'navList');
watch(() => settingStore.activeIndex, (newVal: number) => {
activeIndex.value = newVal
})
</script>

Loading…
Cancel
Save