Merge pull request 'fix : 修复首页数据展示,更改文章时间字段' (#786) from de into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/786
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
import request from '@/utils/request.js'
|
||||
|
||||
|
||||
export const getArticle = (params) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/article/list',
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
};
|
||||
export const getArticleDetail = (articleId) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/article/${articleId}`,
|
||||
|
||||
@@ -41,7 +41,7 @@ const researchFundSearchConfig = reactive([
|
||||
},
|
||||
{
|
||||
label: '时间',
|
||||
prop: 'createTime',
|
||||
prop: 'articleTime',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
placeholder: '请选择时间',
|
||||
@@ -85,7 +85,7 @@ const researchFundTableConfig = reactive({
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
prop: 'articleTime',
|
||||
label: '时间',
|
||||
align: 'center'
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="todo-bg">
|
||||
<el-card shadow="never" class="todo-bg" @tab-add="refreshTodoOrDoneList(activeName)">
|
||||
<el-tabs v-model="activeName" editable>
|
||||
<template #add-icon>
|
||||
刷新一下
|
||||
@@ -139,7 +139,7 @@
|
||||
<div class="tag"></div>
|
||||
<span>通知公告</span>
|
||||
</div>
|
||||
<div class="more">
|
||||
<div class="more" @click="goToArticleList">
|
||||
<span>更多</span>
|
||||
<el-icon color="#1F63E6" size="18">
|
||||
<ArrowRight/>
|
||||
@@ -148,7 +148,7 @@
|
||||
</div>
|
||||
<div class="notice-block">
|
||||
<div v-for="(item,index) in noticeList" class="notice">
|
||||
<span>{{ index > 8 ? '' : 0 }}{{ index + 1 }}</span>{{ item.title }}
|
||||
<span>{{ index > 8 ? '' : 0 }}{{ index + 1 }}</span>{{ item.articleTitle }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -164,7 +164,7 @@
|
||||
<div class="tag"></div>
|
||||
<span>专项资金项目</span>
|
||||
</div>
|
||||
<div class="more">
|
||||
<div class="more" @click="goToSpecialFund">
|
||||
<span>更多</span>
|
||||
<el-icon color="#1F63E6" size="18">
|
||||
<ArrowRight/>
|
||||
@@ -188,7 +188,7 @@
|
||||
<div class="tag"></div>
|
||||
<span>研发投入资金</span>
|
||||
</div>
|
||||
<div class="more">
|
||||
<div class="more" @click="goToResearchFund">
|
||||
<span>更多</span>
|
||||
<el-icon color="#1F63E6" size="18">
|
||||
<ArrowRight/>
|
||||
@@ -214,8 +214,8 @@
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="10" :xl="10">
|
||||
<el-card shadow="never" class="todo-bg">
|
||||
<el-tabs v-model="docActiveTab" editable>
|
||||
<template #add-icon>
|
||||
<el-tabs v-model="docActiveTab" editable @tab-add="goToArticleList">
|
||||
<template #add-icon >
|
||||
更多
|
||||
<el-icon color="#1F63E6" size="18">
|
||||
<ArrowRight/>
|
||||
@@ -229,10 +229,10 @@
|
||||
<!-- <span>{{ index > 8 ? '' : 0 }}{{ index + 1 }}</span>{{ item.title }}-->
|
||||
<!-- </div>-->
|
||||
<div :style="{'color': item.isRead ? '#1F63E6' : 'rgba(0,0,0,0.5)'}">
|
||||
<span>{{ item.title }}</span>
|
||||
<span>{{ item.articleTitle }}</span>
|
||||
<span class="dot" v-if="item.isRead"></span>
|
||||
</div>
|
||||
<div>2018-05-06</div>
|
||||
<div> {{ item.articleTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@@ -246,9 +246,9 @@
|
||||
<!-- <span>{{ index > 8 ? '' : 0 }}{{ index + 1 }}</span>{{ item.title }}-->
|
||||
<!-- </div>-->
|
||||
<div>
|
||||
{{ item.title }}
|
||||
{{ item.articleTitle }}
|
||||
</div>
|
||||
<div>2018-05-06</div>
|
||||
<div> {{ item.articleTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@@ -257,10 +257,10 @@
|
||||
<div v-for="(item,index) in problemList" class="notice">
|
||||
<!-- <span>{{ index > 8 ? '' : 0 }}{{ index + 1 }}</span>-->
|
||||
<div>
|
||||
{{ item.title }}
|
||||
{{ item.articleTitle }}
|
||||
</div>
|
||||
|
||||
<div>2018-05-06</div>
|
||||
<div> {{ item.articleTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@@ -282,6 +282,7 @@ import {toThousands} from "@/utils/changePrice.js";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {getHomeInfo} from "@/api/home";
|
||||
import {getResearchFundChart} from "@/api/research-fund";
|
||||
import {getArticle} from "@/api/article";
|
||||
|
||||
const AuthStore = useAuthStore()
|
||||
const router = useRouter()
|
||||
@@ -386,101 +387,10 @@ const todoList = ref([
|
||||
totalTime: '10',
|
||||
},
|
||||
])
|
||||
const noticeList = ref([
|
||||
{
|
||||
title: '系统升级通知,升级通知,期间部分服务将暂升级通知,期间部分服务将暂升级通知,期间部分服务将暂将暂停'
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停'
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停'
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停'
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停'
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停'
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停'
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停'
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停'
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停'
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停'
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停'
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停'
|
||||
}
|
||||
])
|
||||
const rulesList = ref([
|
||||
{
|
||||
title: '系统升级通知,升级通知,期间部分服务将暂升级通知,期间部分服务将暂升级通知,期间部分服务将暂将暂停',
|
||||
isRead: true
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停',
|
||||
isRead: true
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停',
|
||||
isRead: true
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停',
|
||||
isRead: false
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停',
|
||||
isRead: false
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停',
|
||||
isRead: true
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停',
|
||||
isRead: false
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停',
|
||||
isRead: false
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停',
|
||||
isRead: false
|
||||
}
|
||||
])
|
||||
const noticeList = ref([])
|
||||
const rulesList = ref([])
|
||||
const helpDocList = ref([])
|
||||
const problemList = ref([
|
||||
{
|
||||
title: '常见问题',
|
||||
isRead: true
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停',
|
||||
isRead: false
|
||||
},
|
||||
{
|
||||
title: '系统升级通知,期间部分服务将暂停',
|
||||
isRead: true
|
||||
}
|
||||
|
||||
])
|
||||
const problemList = ref([])
|
||||
const doneList = ref([])
|
||||
const reportNum = ref(0)
|
||||
|
||||
@@ -642,14 +552,35 @@ onMounted(() => {
|
||||
// getResearchChart()
|
||||
init()
|
||||
})
|
||||
const init = () => {
|
||||
const goToArticleList=()=>{
|
||||
router.push({
|
||||
name: 'Manage',
|
||||
})
|
||||
}
|
||||
const goToResearchFund=()=>{
|
||||
router.push({
|
||||
name: 'Dev'
|
||||
})
|
||||
}
|
||||
const goToSpecialFund=()=>{
|
||||
router.push({
|
||||
name: 'Fund'
|
||||
})
|
||||
}
|
||||
const refreshTodoOrDoneList=()=>{
|
||||
// getTodoList()
|
||||
}
|
||||
const init =async () => {
|
||||
noticeList.value =await getArticleList(0)
|
||||
rulesList.value =await getArticleList(1)
|
||||
helpDocList.value =await getArticleList(2)
|
||||
problemList.value =await getArticleList(3)
|
||||
data.fundPieCharts = echarts.init(document.getElementById('fundPie')).setOption(fundPieOption.value)
|
||||
data.moneyPieCharts = echarts.init(document.getElementById('moneyPie')).setOption(moneyPieOption.value)
|
||||
}
|
||||
const getTodoList=()=>{
|
||||
getHomeInfo().then(res => {
|
||||
if (res.code === 1000) {
|
||||
|
||||
// todoList.value=res.data.rows
|
||||
// todoNum.value=res.data.total
|
||||
}else{
|
||||
@@ -678,6 +609,21 @@ const getResearchChart=()=>{
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const getArticleList=async (articleType)=>{
|
||||
let {data,code,msg}=await getArticle({articleType:articleType})
|
||||
if (code === 1000) {
|
||||
return data.rows
|
||||
// todoList.value=res.data.rows
|
||||
// todoNum.value=res.data.total
|
||||
}else{
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
window.addEventListener('resize', () => {
|
||||
data.fundPieCharts = null
|
||||
data.moneyPieCharts = null
|
||||
|
||||
Reference in New Issue
Block a user