Merge pull request 'master' (#836) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/836
This commit is contained in:
@@ -190,6 +190,24 @@ const router = createRouter({
|
|||||||
breadcrumb: false
|
breadcrumb: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/todolist',
|
||||||
|
name: 'Todolist',
|
||||||
|
component: () => import('@/views/todoList/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '待办',
|
||||||
|
breadcrumb: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/donelist',
|
||||||
|
name: 'Donelist',
|
||||||
|
component: () => import('@/views/doneList/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '已办',
|
||||||
|
breadcrumb: false
|
||||||
|
}
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
139
src/views/doneList/index.vue
Normal file
139
src/views/doneList/index.vue
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
<template>
|
||||||
|
<fvTable ref="tableIns" :tableConfig="tableConfig" style="margin-top: 15px"></fvTable>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
const router = useRouter()
|
||||||
|
const tableIns = ref()
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width:60,
|
||||||
|
index: index => {
|
||||||
|
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'targetName',
|
||||||
|
label: '名称',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'initiatorName',
|
||||||
|
label: '发起人',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'targetState',
|
||||||
|
label: '流程类型',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
if (row.targetState !== null || row.targetState !== undefined) {
|
||||||
|
return (<Tag dictType={'todo_type'} value={row.targetState}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'submitTime',
|
||||||
|
label: '提交时间',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: 150,
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
let btn = []
|
||||||
|
btn.push({label: '查看', func: () => handleView(row), type: 'primary'})
|
||||||
|
return (
|
||||||
|
<div style={{width: '100%'}}>
|
||||||
|
{
|
||||||
|
btn.map(item => (
|
||||||
|
<el-button
|
||||||
|
type={item.type}
|
||||||
|
onClick={() => item.func()}
|
||||||
|
link
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</el-button>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
api: '/workflow/mosr/process/task/about',
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleView = (row) => {
|
||||||
|
if (row.targetState == '00' && row.targetId) {
|
||||||
|
router.push({
|
||||||
|
name: 'Requirement/detail',
|
||||||
|
query: {
|
||||||
|
id: row.targetId,
|
||||||
|
source: 'home'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (row.targetState == '10' && row.targetId) {
|
||||||
|
router.push({
|
||||||
|
name: 'Summary/detail',
|
||||||
|
query: {
|
||||||
|
projectId: row.targetId,
|
||||||
|
state: row.state,
|
||||||
|
source: 'home'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (row.targetState == '20' || row.targetState == '40' || row.targetState == '50') {
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation/detail',
|
||||||
|
query: {
|
||||||
|
projectId: row.targetId,
|
||||||
|
state: row.state,
|
||||||
|
step: row.targetState,
|
||||||
|
source: 'home'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (row.targetState == '70' && row.targetId) {
|
||||||
|
router.push({
|
||||||
|
name: 'Fund/detail',
|
||||||
|
query: {
|
||||||
|
id: row.targetId,
|
||||||
|
state: row.state,
|
||||||
|
source: 'home'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (row.targetState == '80' && row.targetId) {
|
||||||
|
router.push({
|
||||||
|
name: 'Share/detail',
|
||||||
|
query: {
|
||||||
|
id: row.targetId,
|
||||||
|
state: row.state,
|
||||||
|
source: 'home'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (row.targetState == '90' && row.targetId) {
|
||||||
|
router.push({
|
||||||
|
name: 'Phase/detail',
|
||||||
|
query: {
|
||||||
|
projectId: row.targetId,
|
||||||
|
source: 'home'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -20,8 +20,10 @@
|
|||||||
<el-card shadow="never" class="todo-bg" @tab-add="refreshTodoOrDoneList(activeName)">
|
<el-card shadow="never" class="todo-bg" @tab-add="refreshTodoOrDoneList(activeName)">
|
||||||
<el-tabs v-model="activeName" editable>
|
<el-tabs v-model="activeName" editable>
|
||||||
<template #add-icon>
|
<template #add-icon>
|
||||||
刷新一下
|
<div @click="refreshTodoOrDoneList" style="margin-left: -50px">
|
||||||
<div style="width: 31px"></div>
|
刷新一下
|
||||||
|
<div style="width: 31px"></div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-tab-pane :label="'待办('+(todoList?.length||0) +')'" name="first">
|
<el-tab-pane :label="'待办('+(todoList?.length||0) +')'" name="first">
|
||||||
<div class="todo-top">
|
<div class="todo-top">
|
||||||
@@ -31,7 +33,7 @@
|
|||||||
</el-icon>
|
</el-icon>
|
||||||
<span>您有{{ todoList?.length || 0 }}条待办需要处理</span>
|
<span>您有{{ todoList?.length || 0 }}条待办需要处理</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="todo-more">
|
<div class="todo-more" @click="handleTodoList(1)">
|
||||||
<span>查看更多</span>
|
<span>查看更多</span>
|
||||||
<el-icon color="#1F63E6" size="18">
|
<el-icon color="#1F63E6" size="18">
|
||||||
<ArrowRight/>
|
<ArrowRight/>
|
||||||
@@ -75,7 +77,7 @@
|
|||||||
</el-icon>
|
</el-icon>
|
||||||
<span>您有{{ todoList.length }}条待办需要处理</span>
|
<span>您有{{ todoList.length }}条待办需要处理</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="todo-more">
|
<div class="todo-more" @click="handleTodoList(2)">
|
||||||
<span>查看更多</span>
|
<span>查看更多</span>
|
||||||
<el-icon color="#1F63E6" size="18">
|
<el-icon color="#1F63E6" size="18">
|
||||||
<ArrowRight/>
|
<ArrowRight/>
|
||||||
@@ -293,7 +295,7 @@ 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, getDoneTaskInfo,getHomeStatistics, getSpecialFundChart} from "@/api/home";
|
import {getHomeTaskInfo, getDoneTaskInfo, getHomeStatistics, getSpecialFundChart} 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";
|
||||||
|
|
||||||
@@ -331,7 +333,7 @@ const taskTabList = ref([
|
|||||||
color: '#DCCEFA',
|
color: '#DCCEFA',
|
||||||
textColor: '#8600C5',
|
textColor: '#8600C5',
|
||||||
icon: 'home2.png',
|
icon: 'home2.png',
|
||||||
num:0,
|
num: 0,
|
||||||
type: 'approved'
|
type: 'approved'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -380,20 +382,6 @@ const fundPieOption = ref({
|
|||||||
color: 'rgba(0,0,0,0.6)',
|
color: 'rgba(0,0,0,0.6)',
|
||||||
fontSize: '12px'
|
fontSize: '12px'
|
||||||
},
|
},
|
||||||
// formatter: function (name) {
|
|
||||||
// let data = fundPieOption.value.series[0].data
|
|
||||||
// let total = 0
|
|
||||||
// let tarValue
|
|
||||||
// for (let i = 0; i < data.length; i++) {
|
|
||||||
// total += data[i].value
|
|
||||||
// if (data[i].name == name) {
|
|
||||||
// tarValue = data[i].value
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// let v = tarValue
|
|
||||||
// let p = ((tarValue / total) * 100).toFixed(2)
|
|
||||||
// return `${name} ${v} ${p}%`
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
graphic: { //图形中间图片
|
graphic: { //图形中间图片
|
||||||
elements: [{
|
elements: [{
|
||||||
@@ -501,7 +489,6 @@ const moneyPieOption = ref({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
|
|
||||||
normal: {
|
normal: {
|
||||||
borderWidth: 8,//设置边框粗细
|
borderWidth: 8,//设置边框粗细
|
||||||
borderColor: '#fff',
|
borderColor: '#fff',
|
||||||
@@ -533,6 +520,17 @@ onMounted(async () => {
|
|||||||
helpDocList.value = await getArticleList(2)
|
helpDocList.value = await getArticleList(2)
|
||||||
problemList.value = await getArticleList(3)
|
problemList.value = await getArticleList(3)
|
||||||
})
|
})
|
||||||
|
const handleTodoList = (type) => {
|
||||||
|
if (type == 1) {
|
||||||
|
router.push({
|
||||||
|
path: '/todolist',
|
||||||
|
})
|
||||||
|
} else if (type == 2){
|
||||||
|
router.push({
|
||||||
|
path: '/donelist',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
const handleGoToArticleDetail = (row) => {
|
const handleGoToArticleDetail = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'Article/detail',
|
name: 'Article/detail',
|
||||||
@@ -557,9 +555,8 @@ const goToSpecialFund = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const refreshTodoOrDoneList = (name) => {
|
const refreshTodoOrDoneList = (name) => {
|
||||||
console.info("🚀 ~method:refreshTodoOrDoneList -----", name)
|
getTodoList()
|
||||||
// getTodoList()
|
getDoneList()
|
||||||
// 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)
|
||||||
@@ -571,10 +568,10 @@ const initMoneyCharts = () => {
|
|||||||
const getTaskStatistics = () => {
|
const getTaskStatistics = () => {
|
||||||
getHomeStatistics().then(res => {
|
getHomeStatistics().then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
taskTabList.value[0].num = res.data.stayInitiation||0
|
taskTabList.value[0].num = res.data.stayInitiation || 0
|
||||||
taskTabList.value[1].num = res.data.approvedProject||0
|
taskTabList.value[1].num = res.data.approvedProject || 0
|
||||||
taskTabList.value[2].num = res.data.implementation||0
|
taskTabList.value[2].num = res.data.implementation || 0
|
||||||
taskTabList.value[3].num = res.data.acceptanceCheck||0
|
taskTabList.value[3].num = res.data.acceptanceCheck || 0
|
||||||
} else {
|
} else {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -615,13 +612,11 @@ const getDoneList = () => {
|
|||||||
const changeResearchFundDataByYear = (year) => {
|
const changeResearchFundDataByYear = (year) => {
|
||||||
if (year) {
|
if (year) {
|
||||||
getResearchChart(year)
|
getResearchChart(year)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const getFundChart = () => {
|
const getFundChart = () => {
|
||||||
getSpecialFundChart().then(res => {
|
getSpecialFundChart().then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
moneyData.value = res.data
|
|
||||||
if (res.data?.length == 0) return;
|
if (res.data?.length == 0) return;
|
||||||
if (fundPieOption.value.series && fundPieOption.value.series?.length > 0) {
|
if (fundPieOption.value.series && fundPieOption.value.series?.length > 0) {
|
||||||
fundPieOption.value.series[0].data[0].value = res.data[0].value
|
fundPieOption.value.series[0].data[0].value = res.data[0].value
|
||||||
@@ -685,7 +680,6 @@ window.addEventListener('resize', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const clickGotoListPage = (item) => {
|
const clickGotoListPage = (item) => {
|
||||||
console.info("🚀 ~method:clickGotoListPage -----", item.type)
|
|
||||||
if (item.type === 'pending') {
|
if (item.type === 'pending') {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'Initiation',
|
name: 'Initiation',
|
||||||
@@ -1063,7 +1057,7 @@ const handleView = (row) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-tabs__new-tab ) {
|
:deep(.el-tabs__new-tab ) {
|
||||||
width: auto !important;
|
width: 67px !important;
|
||||||
border: none !important;
|
border: none !important;
|
||||||
color: #1476E3;
|
color: #1476E3;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|||||||
144
src/views/todoList/index.vue
Normal file
144
src/views/todoList/index.vue
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
<template>
|
||||||
|
<fvTable ref="tableIns" :tableConfig="tableConfig" style="margin-top: 15px"></fvTable>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
const router = useRouter()
|
||||||
|
const tableIns = ref()
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width:60,
|
||||||
|
index: index => {
|
||||||
|
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'targetName',
|
||||||
|
label: '名称',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'initiatorName',
|
||||||
|
label: '发起人',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'targetState',
|
||||||
|
label: '流程类型',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
if (row.targetState !== null || row.targetState !== undefined) {
|
||||||
|
return (<Tag dictType={'todo_type'} value={row.targetState}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'taskName',
|
||||||
|
label: '当前节点',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'submitTime',
|
||||||
|
label: '提交时间',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: 150,
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
let btn = []
|
||||||
|
btn.push({label: '查看', func: () => handleView(row), type: 'primary'})
|
||||||
|
return (
|
||||||
|
<div style={{width: '100%'}}>
|
||||||
|
{
|
||||||
|
btn.map(item => (
|
||||||
|
<el-button
|
||||||
|
type={item.type}
|
||||||
|
onClick={() => item.func()}
|
||||||
|
link
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</el-button>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
api: '/workflow/mosr/process/task',
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleView = (row) => {
|
||||||
|
if (row.targetState == '00' && row.targetId) {
|
||||||
|
router.push({
|
||||||
|
name: 'Requirement/detail',
|
||||||
|
query: {
|
||||||
|
id: row.targetId,
|
||||||
|
source: 'home'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (row.targetState == '10' && row.targetId) {
|
||||||
|
router.push({
|
||||||
|
name: 'Summary/detail',
|
||||||
|
query: {
|
||||||
|
projectId: row.targetId,
|
||||||
|
state: row.state,
|
||||||
|
source: 'home'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (row.targetState == '20' || row.targetState == '40' || row.targetState == '50') {
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation/detail',
|
||||||
|
query: {
|
||||||
|
projectId: row.targetId,
|
||||||
|
state: row.state,
|
||||||
|
step: row.targetState,
|
||||||
|
source: 'home'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (row.targetState == '70' && row.targetId) {
|
||||||
|
router.push({
|
||||||
|
name: 'Fund/detail',
|
||||||
|
query: {
|
||||||
|
id: row.targetId,
|
||||||
|
state: row.state,
|
||||||
|
source: 'home'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (row.targetState == '80' && row.targetId) {
|
||||||
|
router.push({
|
||||||
|
name: 'Share/detail',
|
||||||
|
query: {
|
||||||
|
id: row.targetId,
|
||||||
|
state: row.state,
|
||||||
|
source: 'home'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (row.targetState == '90' && row.targetId) {
|
||||||
|
router.push({
|
||||||
|
name: 'Phase/detail',
|
||||||
|
query: {
|
||||||
|
projectId: row.targetId,
|
||||||
|
source: 'home'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user