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" 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' import request from '@/utils/request.js'
export const getResearchFundChart = () => { export const getResearchFundChart = (year) => {
return request({ return request({
url: '/workflow/mosr/rd/home', url: '/workflow/mosr/rd/home',
method: 'get', method: 'get',
params: {year:year}
}) })
} }
export const getResearchFundDetail = (rdFundId) => { export const getResearchFundDetail = (rdFundId) => {

View File

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