Merge pull request 'feat : 添加首页待办数据和研发投入资金年份筛选' (#815) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/815
This commit is contained in:
2024-10-11 03:39:17 +00:00
3 changed files with 97 additions and 18 deletions

View File

@@ -6,3 +6,10 @@ export const getHomeTaskInfo = () => {
method: "get"
});
};
//获取已办数据
export const getDoneTaskInfo = () => {
return request({
url: '/workflow/mosr/process/task/about',
method: "get"
});
};

View File

@@ -1,10 +1,11 @@
import request from '@/utils/request.js'
export const getResearchFundChart = () => {
export const getResearchFundChart = (year) => {
return request({
url: '/workflow/mosr/rd/home',
method: 'get',
params: {year:year}
})
}
export const getResearchFundDetail = (rdFundId) => {

View File

@@ -23,13 +23,13 @@
刷新一下
<div style="width: 31px"></div>
</template>
<el-tab-pane :label="'待办('+todoList.length +''" name="first">
<el-tab-pane :label="'待办('+(todoList?.length||0) +''" name="first">
<div class="todo-top">
<div class="bell">
<el-icon size="20" color="#F55815">
<BellFilled/>
</el-icon>
<span>您有{{ todoList.length }}条待办需要处理</span>
<span>您有{{ todoList?.length ||0}}条待办需要处理</span>
</div>
<div class="todo-more">
<span>查看更多</span>
@@ -50,10 +50,11 @@
<!-- <div class="status-style">-->
<!-- {{item.targetState}}-->
<!-- </div>-->
<div v-if="item.targetState !== null|| item.targetState !== undefined" style="margin-bottom: 14px">
<div v-if="item.targetState !== null|| item.targetState !== undefined" style="margin-bottom: 10px">
<Tag dictType="todo_type" :value="item.targetState"/>
</div>
<div v-else></div>
<div class="target-name">{{item.targetState=='00'?'征集名称':'项目名称'}}{{ item.targetName }}</div>
<div class="black-text">发起人{{ item.initiatorName }}</div>
<div class="black-text">当前节点{{ item.taskName }}</div>
<div class="gray-time">
@@ -77,7 +78,7 @@
<!-- </template>-->
<!-- </fvTable>-->
</el-tab-pane>
<el-tab-pane :label="'已办(' + reportNum + ''" name="second">
<el-tab-pane :label="'已办(' + (doneList?.length||0) + ''" name="second">
<div class="todo-top">
<div class="bell">
<el-icon size="20" color="#F55815">
@@ -105,8 +106,9 @@
<Tag dictType="todo_type" :value="item.targetState"/>
</div>
<div v-else></div>
<div class="target-name">{{item.targetState=='00'?'征集名称':'项目名称'}}{{ item.targetName }}</div>
<div class="black-text">发起人{{ item.initiatorName }}</div>
<div class="black-text">当前节点{{ item.taskName }}</div>
<!-- <div class="black-text">当前节点{{ item.taskName }}</div>-->
<div class="gray-time">
<div>
<div class="title">
@@ -205,8 +207,19 @@
<div class="money-container">
<div id="moneyPie" ref="moneyPie"></div>
</div>
<div>
<div class="total-money" >总资金{{ toThousands(totalMoney) }}</div>
<div class="legend-block">
<div style="position:absolute;top: 15px;right: 20px">
<el-date-picker
v-model="researchFundYear"
type="year"
placeholder="年份"
style="width: 80px"
value-format="YYYY"
size="small"
@change="changeResearchFundDataByYear"
/>
</div>
<div class="total-money">总资金{{ toThousands(totalMoney) }}</div>
<div v-for="(item,index) in moneyData" class="legend">
<div style="display: flex;align-items: center">
@@ -297,13 +310,14 @@ import {useAuthStore} from '@/stores/userstore.js'
import * as echarts from 'echarts'
import {toThousands} from "@/utils/changePrice.js";
import {ElNotification} from "element-plus";
import {getHomeTaskInfo} from "@/api/home";
import {getHomeTaskInfo,getDoneTaskInfo} from "@/api/home";
import {getResearchFundChart} from "@/api/research-fund";
import {getArticle} from "@/api/article";
const AuthStore = useAuthStore()
const router = useRouter()
const topLeftHeight = ref('')
const researchFundYear = ref('2024')
const activeName = ref('first')
const docActiveTab = ref('first')
const totalMoney = ref('45000')
@@ -528,6 +542,7 @@ const moneyPieOption = ref({
onMounted(async () => {
getTodoList()
getDoneList()
await getResearchChart()
// nextTick(() => {
// let topLeft=document.getElementById('topLeft')
@@ -563,8 +578,10 @@ const goToSpecialFund = () => {
name: 'Fund'
})
}
const refreshTodoOrDoneList = () => {
getTodoList()
const refreshTodoOrDoneList = (name) => {
console.info("🚀 ~method:refreshTodoOrDoneList -----", name)
// getTodoList()
// getDoneList()
}
const initFundCharts = () => {
data.fundPieCharts = echarts.init(document.getElementById('fundPie')).setOption(fundPieOption.value)
@@ -586,8 +603,27 @@ const getTodoList = () => {
}
})
}
const getResearchChart = () => {
getResearchFundChart().then(res => {
const getDoneList = () => {
getDoneTaskInfo().then(res => {
if (res.code === 1000) {
doneList.value=res.data.rows
// todoNum.value=res.data.total
} else {
ElNotification({
title: '提示',
message: res.msg,
type: 'error'
})
}
})
}
const changeResearchFundDataByYear=(year)=>{
if(year){
getResearchChart(year)
}
}
const getResearchChart = (year) => {
getResearchFundChart(year).then(res => {
if (res.code === 1000) {
totalMoney.value = res.data.totalAmount
moneyData.value = res.data.rdCompanyList
@@ -893,6 +929,9 @@ const handleView = (row) => {
.money-block {
display: flex;
align-items: center;
position: relative;
padding-top: 49px;
padding-right: 10px;
.total-money {
height: 25px;
@@ -901,7 +940,28 @@ const handleView = (row) => {
color: #000000;
line-height: 18px;
}
.legend-block{
height: 240px;
overflow-y: auto;
display: flex;
flex-direction: column;
&::-webkit-scrollbar {
width: 6px;
height: 6px;
}
// 滚动条轨道
&::-webkit-scrollbar-track {
background: rgb(239, 239, 239);
border-radius: 2px;
}
// 小滑块
&::-webkit-scrollbar-thumb {
background: rgba(80, 81, 82, 0.29);
border-radius: 10px;
}
}
.legend {
margin-top: 14px;
display: flex;
@@ -927,6 +987,7 @@ const handleView = (row) => {
.money-dot {
width: 16px;
height: 16px;
flex-shrink:0;
border-radius: 50%;
}
}
@@ -937,7 +998,7 @@ const handleView = (row) => {
display: flex;
justify-content: center;
align-items: center;
margin-top: 49px;
//margin-top: 49px;
width: 250px;
> div {
@@ -1083,7 +1144,7 @@ const handleView = (row) => {
margin-top: 10px;
.todo-content {
height: 202px;
height: 216px;
overflow-x: auto;
margin: 0 12px 0 19px;
//padding: 0 0 10px 0;
@@ -1110,7 +1171,8 @@ const handleView = (row) => {
.todo-border {
padding: 13px;
width: 172px;
width: 170px;
//height: 185px;
background: rgba(73, 171, 239, 0.05);
border-radius: 8px 8px 8px 8px;
border: 1px solid #D0D0E3;
@@ -1171,7 +1233,16 @@ const handleView = (row) => {
margin-bottom: 7px;
font-size: 12px;
}
.target-name{
width: 140px;
color: #000000;
margin-bottom: 7px;
font-size: 12px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
-webkit-line-clamp: 1;
}
.process-type {
white-space: nowrap;
margin-top: 13px;
@@ -1379,7 +1450,7 @@ const handleView = (row) => {
.right-top {
//height: 100%;
height: 513px;
height: 528px;
//flex: 0.7;
overflow: hidden;
border-radius: 10px;