feat : 首页项目四个状态统计
This commit is contained in:
@@ -21,3 +21,11 @@ export const getSpecialFundChart = () => {
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
|
||||
//获取首页四个统计数量
|
||||
export const getHomeStatistics = () => {
|
||||
return request({
|
||||
url: '/workflow/mosr/process/task/statistics',
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
|
||||
@@ -43,13 +43,6 @@
|
||||
<el-empty image-size="88" description="暂无待办数据~"/>
|
||||
</div>
|
||||
<div v-for="item in todoList" class="todo-border">
|
||||
<!-- <div class="status-style"-->
|
||||
<!-- :style="{'background-color': item.status == 0 ? '#F55815' : item.status == 1 ? '#20BDA1' : '#4C52EA'}">-->
|
||||
<!-- {{ item.status == 0 ? '加急' : item.status == 1 ? '正常' : '逾期' }}-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="status-style">-->
|
||||
<!-- {{item.targetState}}-->
|
||||
<!-- </div>-->
|
||||
<div v-if="item.targetState !== null|| item.targetState !== undefined" style="margin-bottom: 10px">
|
||||
<Tag dictType="todo_type" :value="item.targetState"/>
|
||||
</div>
|
||||
@@ -73,13 +66,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <fvTable ref="tableConfigBacklogRef" class="home-table" :tableConfig="tableConfigBacklog"-->
|
||||
<!-- :pagination="false"-->
|
||||
<!-- @getTotal="getTotal">-->
|
||||
<!-- <template #empty>-->
|
||||
<!-- <el-empty description="暂无待办"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </fvTable>-->
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="'已办(' + (doneList?.length||0) + ')'" name="second">
|
||||
<div class="todo-top">
|
||||
@@ -101,10 +87,6 @@
|
||||
<el-empty image-size="88" description="暂无已办数据~"/>
|
||||
</div>
|
||||
<div v-for="item in doneList" class="todo-border">
|
||||
<!-- <div class="status-style"-->
|
||||
<!-- :style="{'background-color': item.status == 0 ? '#F55815' : item.status == 1 ? '#20BDA1' : '#4C52EA'}">-->
|
||||
<!-- {{ item.status == 0 ? '加急' : item.status == 1 ? '正常' : '逾期' }}-->
|
||||
<!-- </div>-->
|
||||
<div v-if="item.targetState !== null|| item.targetState !== undefined" style="margin-bottom: 14px">
|
||||
<Tag dictType="todo_type" :value="item.targetState"/>
|
||||
</div>
|
||||
@@ -128,12 +110,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <fvTable ref="tableConfigReportRef" :tableConfig="tableConfigReport" @getTotal="getReportNumTotal">-->
|
||||
<!-- <template #empty>-->
|
||||
<!-- <el-empty description="暂无数据"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </fvTable>-->
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
@@ -317,14 +293,12 @@ import {useAuthStore} from '@/stores/userstore.js'
|
||||
import * as echarts from 'echarts'
|
||||
import {toThousands} from "@/utils/changePrice.js";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {getHomeTaskInfo, getDoneTaskInfo} from "@/api/home";
|
||||
import {getHomeTaskInfo, getDoneTaskInfo,getHomeStatistics, getSpecialFundChart} from "@/api/home";
|
||||
import {getResearchFundChart} from "@/api/research-fund";
|
||||
import {getArticle} from "@/api/article";
|
||||
import {getSpecialFundChart} from "../../api/home";
|
||||
|
||||
const AuthStore = useAuthStore()
|
||||
const router = useRouter()
|
||||
const topLeftHeight = ref('')
|
||||
const researchFundYear = ref(new Date().getFullYear() + '')
|
||||
const activeName = ref('first')
|
||||
const docActiveTab = ref('first')
|
||||
@@ -349,7 +323,7 @@ const taskTabList = ref([
|
||||
color: '#CEE8FA',
|
||||
textColor: '#0043C5',
|
||||
icon: 'home1.png',
|
||||
num: 21,
|
||||
num: 0,
|
||||
type: 'pending'
|
||||
},
|
||||
{
|
||||
@@ -357,7 +331,7 @@ const taskTabList = ref([
|
||||
color: '#DCCEFA',
|
||||
textColor: '#8600C5',
|
||||
icon: 'home2.png',
|
||||
num: 2,
|
||||
num:0,
|
||||
type: 'approved'
|
||||
},
|
||||
{
|
||||
@@ -365,7 +339,7 @@ const taskTabList = ref([
|
||||
color: '#FAE6CE',
|
||||
textColor: '#F47D0E',
|
||||
icon: 'home3.png',
|
||||
num: 4,
|
||||
num: 0,
|
||||
type: 'carryout'
|
||||
},
|
||||
{
|
||||
@@ -373,7 +347,7 @@ const taskTabList = ref([
|
||||
color: '#CEFAD8',
|
||||
textColor: '#01A089',
|
||||
icon: 'home4.png',
|
||||
num: 1,
|
||||
num: 0,
|
||||
type: 'check'
|
||||
}
|
||||
])
|
||||
@@ -549,20 +523,15 @@ const moneyPieOption = ref({
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
getTaskStatistics()
|
||||
getTodoList()
|
||||
getDoneList()
|
||||
await getFundChart()
|
||||
await getResearchChart()
|
||||
// nextTick(() => {
|
||||
// let topLeft=document.getElementById('topLeft')
|
||||
// console.info("🚀 ~method:topLeft -----", topLeft.offsetHeight)
|
||||
// topLeftHeight.value=topLeft.offsetHeight
|
||||
// })
|
||||
noticeList.value = await getArticleList(0)
|
||||
rulesList.value = await getArticleList(1)
|
||||
helpDocList.value = await getArticleList(2)
|
||||
problemList.value = await getArticleList(3)
|
||||
// await initFundCharts()
|
||||
})
|
||||
const handleGoToArticleDetail = (row) => {
|
||||
router.push({
|
||||
@@ -598,6 +567,23 @@ const initFundCharts = () => {
|
||||
const initMoneyCharts = () => {
|
||||
data.moneyPieCharts = echarts.init(document.getElementById('moneyPie')).setOption(moneyPieOption.value)
|
||||
}
|
||||
|
||||
const getTaskStatistics = () => {
|
||||
getHomeStatistics().then(res => {
|
||||
if (res.code === 1000) {
|
||||
taskTabList.value[0].num = res.data.stayInitiation||0
|
||||
taskTabList.value[1].num = res.data.approvedProject||0
|
||||
taskTabList.value[2].num = res.data.implementation||0
|
||||
taskTabList.value[3].num = res.data.acceptanceCheck||0
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const getTodoList = () => {
|
||||
getHomeTaskInfo().then(res => {
|
||||
if (res.code === 1000) {
|
||||
|
||||
Reference in New Issue
Block a user