工作台:工作动态跳转

This commit is contained in:
guoyue 2022-07-18 14:17:28 +08:00
parent ddd3d89a14
commit d2460b321c
3 changed files with 61 additions and 19 deletions

View File

@ -8,12 +8,13 @@
<div class="wrapper"> <div class="wrapper">
<div class="content"> <div class="content">
<div class="left">{{ item.createDate }}</div> <div class="left">{{ item.createDate }}</div>
<el-tooltip effect="dark" :content="item.title" placement="top"> <el-tooltip popper-class="testTooltip" effect="dark" :content="item.title" placement="top">
<div class="right ellipsis">{{ item.title || '--' }}</div> <div class="right ellipsis">{{ item.title || '--' }}</div>
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
</div> </div>
<div class="more" @click="jumpTo">查看更多 ></div>
</div> </div>
</div> </div>
@ -34,7 +35,7 @@ export default {
components: { components: {
contentTitle contentTitle
}, },
data () { data() {
return { return {
title: { dynamic: '部门发布动态', recommend: '部门推荐能力' }, title: { dynamic: '部门发布动态', recommend: '部门推荐能力' },
list: [], list: [],
@ -76,13 +77,13 @@ export default {
loadingTable: false loadingTable: false
} }
}, },
mounted () { mounted() {
this.getResourceByDept() this.getResourceByDept()
this.getApplyByDept() this.getApplyByDept()
}, },
methods: { methods: {
// //
getResourceByDept () { getResourceByDept() {
const data = { const data = {
limit: 5, limit: 5,
page: 1 page: 1
@ -108,7 +109,7 @@ export default {
) )
}, },
// //
getApplyByDept () { getApplyByDept() {
const data = { const data = {
limit: 5, limit: 5,
page: 1 page: 1
@ -130,7 +131,12 @@ export default {
console.log('err', err) console.log('err', err)
} }
) )
} },
jumpTo() {
this.$router.push({
path: 'activiti-my-work-dynamics'
});
},
} }
} }
</script> </script>
@ -153,7 +159,8 @@ export default {
background: #fff; background: #fff;
width: 800px; width: 800px;
height: 335px; height: 335px;
padding: 0px 0 20px 10px; padding: 0px 0 0 10px;
box-sizing: border-box;
} }
} }
@ -171,7 +178,7 @@ export default {
margin-bottom: 7px; margin-bottom: 7px;
.wrapper { .wrapper {
height: 50px; height: 45px;
width: 770px; width: 770px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -199,7 +206,7 @@ export default {
} }
.right { .right {
font-size: 18px; font-size: 16px;
color: #464645; color: #464645;
width: 600px; width: 600px;
} }
@ -207,6 +214,16 @@ export default {
} }
} }
.more {
cursor: pointer;
text-align: right;
padding-top: 4px;
display: inline-block;
width: 100%;
color: #2b2b2b;
font-size: 14px;
}
.recommendView { .recommendView {
cursor: pointer; cursor: pointer;
width: 770px; width: 770px;
@ -220,3 +237,8 @@ export default {
background-color: #f4f5f8; background-color: #f4f5f8;
} }
</style> </style>
<style lang="scss">
.testTooltip {
width: 670px !important;
}
</style>

View File

@ -12,16 +12,26 @@
</div> </div>
</div> </div>
<div class="list-box" v-if="dataInfo.list.length > 0"> <div class="list-box" v-if="dataInfo.list.length > 0">
<div v-for="(item, i) in dataInfo.list" :key="i"> <div v-for="(item, i) in dataInfo.list" :key="i">
<!-- 待办 -->
<el-tooltip effect="dark" :content="item[dataInfo.nameStr]" placement="top"> <el-tooltip effect="dark" v-if="dataInfo.type === 'todo'"
:content="`${(item.processDefinitionName || '--')}${item.taskName ? ('—' + item.taskName) : ''}`"
placement="top">
<div class="list-item ellipsis"> <div class="list-item ellipsis">
{{ item[dataInfo.nameStr] || '--' }} {{ `${(item.processDefinitionName || '--')}${item.taskName ? ('—' + item.taskName) : ''}` }}
</div>
</el-tooltip>
<!-- 已办 -->
<el-tooltip effect="dark" v-else
:content="`${(item.processDefinitionName || '--')}${item.resourceName ? ('—' + item.resourceName) : ''}`"
placement="top">
<div class="list-item ellipsis">
{{ `${(item.processDefinitionName || '--')}${item.resourceName ? ('—' + item.resourceName) :
''}`
}}
</div> </div>
</el-tooltip> </el-tooltip>
</div> </div>
<div class="more" @click="goPage(dataInfo.url)"> <div class="more" @click="goPage(dataInfo.url)">
查看更多 > 查看更多 >
</div> </div>

View File

@ -9,13 +9,13 @@
</div> </div>
<div class="flex-row-start dept-chart-box"> <div class="flex-row-start dept-chart-box">
<dept-chart-view id="shelves" title="部门上架" v-loading="loadingResource" :dataList="resourceData" <dept-chart-view id="shelves" title="部门上架" v-loading="loadingResource" :dataList="resourceData"
:colorArray="resourceColor"> ref="resourceChart" :colorArray="resourceColor">
</dept-chart-view> </dept-chart-view>
<dept-chart-view id="apply" title="部门申请" v-loading="loadingApply" :dataList="applyData" <dept-chart-view id="apply" title="部门申请" v-loading="loadingApply" :dataList="applyData" ref="applyChart"
:colorArray="applyColor"> :colorArray="applyColor">
</dept-chart-view> </dept-chart-view>
<dept-chart-view id="demand" title="部门需求" v-loading="loadingRequire" :dataList="requireData" <dept-chart-view id="demand" title="部门需求" v-loading="loadingRequire" :dataList="requireData"
:colorArray="requireColor"> ref="requireChart" :colorArray="requireColor">
</dept-chart-view> </dept-chart-view>
</div> </div>
</div> </div>
@ -54,7 +54,7 @@ export default {
textColor: '#f86f01', textColor: '#f86f01',
num: 0, num: 0,
list: [], list: [],
nameStr: 'taskName', type: 'todo',
url: 'activiti-my-todo-task' url: 'activiti-my-todo-task'
}, },
// //
@ -67,7 +67,6 @@ export default {
textColor: '#21b107', textColor: '#21b107',
num: 0, num: 0,
list: [], list: [],
nameStr: 'processDefinitionName',
url: 'activiti-my-join-task' url: 'activiti-my-join-task'
}, },
// //
@ -134,6 +133,7 @@ export default {
console.log('res----已办-------->', res.data); console.log('res----已办-------->', res.data);
this.hasToDodoData.list = res.data.data.records || [] this.hasToDodoData.list = res.data.data.records || []
this.hasToDodoData.num = res.data.data.total || 0 this.hasToDodoData.num = res.data.data.total || 0
}, err => { }, err => {
this.$message.error(err) this.$message.error(err)
this.loadingHasToDo = false; this.loadingHasToDo = false;
@ -150,6 +150,9 @@ export default {
} }
console.log('res----部门上架-------->', res.data); console.log('res----部门上架-------->', res.data);
this.resourceData = this.formatList(res.data.data.total || []) this.resourceData = this.formatList(res.data.data.total || [])
this.$nextTick(() => {
this.$refs.resourceChart.initChart(this.resourceData)
})
}, err => { }, err => {
this.$message.error(err) this.$message.error(err)
this.loadingResource = false; this.loadingResource = false;
@ -165,6 +168,10 @@ export default {
} }
console.log('res----部门申请-------->', res.data); console.log('res----部门申请-------->', res.data);
this.applyData = this.formatList(res.data.data.total || []) this.applyData = this.formatList(res.data.data.total || [])
this.$nextTick(() => {
console.log('this.applyData------------>', this.applyData);
this.$refs.applyChart.initChart(this.applyData)
})
}, err => { }, err => {
this.$message.error(err) this.$message.error(err)
this.loadingApply = false; this.loadingApply = false;
@ -190,6 +197,9 @@ export default {
} }
console.log('res----部门需求-------->', res.data); console.log('res----部门需求-------->', res.data);
this.requireData = this.formatList(res.data.data.total || [], 'flag') this.requireData = this.formatList(res.data.data.total || [], 'flag')
this.$nextTick(() => {
this.$refs.requireChart.initChart(this.requireData)
})
}, err => { }, err => {
this.$message.error(err) this.$message.error(err)