2022-06-29 15:50:26 +08:00
|
|
|
<template>
|
2022-06-30 11:04:32 +08:00
|
|
|
<div class="bottom-view">
|
2022-07-01 14:50:29 +08:00
|
|
|
<!-- 部门发布动态 -->
|
2022-06-30 11:04:32 +08:00
|
|
|
<div class="left container">
|
|
|
|
<content-title :title="title.dynamic"></content-title>
|
2022-07-01 14:50:29 +08:00
|
|
|
<div class="dynamic-box" v-loading="loadingDynamic">
|
|
|
|
<div class="dynamicView" v-for="(item, index) in list" :key="index" :number="index + 1" :item="item">
|
|
|
|
<div class="wrapper">
|
|
|
|
<div class="content">
|
|
|
|
<div class="left">{{ item.createDate }}</div>
|
2022-07-18 14:17:28 +08:00
|
|
|
<el-tooltip popper-class="testTooltip" effect="dark" :content="item.title" placement="top">
|
2022-07-01 14:50:29 +08:00
|
|
|
<div class="right ellipsis">{{ item.title || '--' }}</div>
|
|
|
|
</el-tooltip>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-07-18 14:17:28 +08:00
|
|
|
<div class="more" @click="jumpTo">查看更多 ></div>
|
2022-07-01 14:50:29 +08:00
|
|
|
</div>
|
|
|
|
|
2022-06-30 11:04:32 +08:00
|
|
|
</div>
|
2022-07-01 14:50:29 +08:00
|
|
|
<!-- 部门推荐能力 -->
|
2022-06-30 11:04:32 +08:00
|
|
|
<div class="right container">
|
|
|
|
<content-title :title="title.recommend"></content-title>
|
2022-07-01 14:50:29 +08:00
|
|
|
<div class="recommendView">
|
|
|
|
<a-table :dataSource="tableData" :columns="columns" bordered :pagination="false" :scroll="maxSize"
|
|
|
|
:loading="loadingTable" size="small" />
|
|
|
|
</div>
|
2022-06-29 15:50:26 +08:00
|
|
|
</div>
|
2022-06-30 11:04:32 +08:00
|
|
|
</div>
|
2022-06-29 15:50:26 +08:00
|
|
|
</template>
|
|
|
|
<script>
|
2022-07-07 10:27:46 +08:00
|
|
|
import contentTitle from './content-title'
|
|
|
|
import * as Apis from '../api'
|
2022-06-29 15:50:26 +08:00
|
|
|
export default {
|
2022-06-30 11:04:32 +08:00
|
|
|
components: {
|
|
|
|
contentTitle
|
|
|
|
},
|
2022-07-19 09:55:05 +08:00
|
|
|
data () {
|
2022-06-30 11:04:32 +08:00
|
|
|
return {
|
2022-07-07 10:27:46 +08:00
|
|
|
title: { dynamic: '部门发布动态', recommend: '部门推荐能力' },
|
2022-07-01 14:50:29 +08:00
|
|
|
list: [],
|
|
|
|
columns: [
|
|
|
|
{
|
2022-07-07 10:27:46 +08:00
|
|
|
title: '名称',
|
|
|
|
key: 'name',
|
|
|
|
dataIndex: 'name',
|
2022-07-01 14:50:29 +08:00
|
|
|
width: 250
|
|
|
|
},
|
|
|
|
{
|
2022-07-07 10:27:46 +08:00
|
|
|
title: '类型',
|
|
|
|
key: 'type',
|
|
|
|
dataIndex: 'type',
|
2022-07-01 14:50:29 +08:00
|
|
|
width: 76
|
|
|
|
},
|
|
|
|
{
|
2022-07-07 10:27:46 +08:00
|
|
|
title: '单位',
|
|
|
|
key: 'deptContacts',
|
|
|
|
dataIndex: 'deptContacts',
|
2022-07-01 14:50:29 +08:00
|
|
|
width: 144
|
|
|
|
},
|
|
|
|
{
|
2022-07-07 10:27:46 +08:00
|
|
|
title: '时间',
|
|
|
|
key: 'createDate',
|
|
|
|
dataIndex: 'createDate',
|
2022-07-01 14:50:29 +08:00
|
|
|
width: 153
|
|
|
|
},
|
|
|
|
{
|
2022-07-07 10:27:46 +08:00
|
|
|
title: '当前申请数',
|
|
|
|
key: 'applyCount',
|
|
|
|
dataIndex: 'applyCount',
|
2022-07-01 14:50:29 +08:00
|
|
|
width: 145
|
2022-07-07 10:27:46 +08:00
|
|
|
}
|
2022-07-01 14:50:29 +08:00
|
|
|
],
|
|
|
|
tableData: [],
|
|
|
|
maxSize: { y: 195 },
|
|
|
|
loadingDynamic: false,
|
2022-07-07 10:27:46 +08:00
|
|
|
loadingTable: false
|
|
|
|
}
|
2022-06-30 11:04:32 +08:00
|
|
|
},
|
2022-07-19 09:55:05 +08:00
|
|
|
mounted () {
|
2022-07-07 10:27:46 +08:00
|
|
|
this.getResourceByDept()
|
2022-07-01 14:50:29 +08:00
|
|
|
this.getApplyByDept()
|
2022-06-30 11:04:32 +08:00
|
|
|
},
|
|
|
|
methods: {
|
2022-07-07 10:27:46 +08:00
|
|
|
// 发布动态
|
2022-07-19 09:55:05 +08:00
|
|
|
getResourceByDept () {
|
2022-07-07 10:27:46 +08:00
|
|
|
const data = {
|
2022-06-30 11:04:32 +08:00
|
|
|
limit: 5,
|
|
|
|
page: 1
|
2022-07-07 10:27:46 +08:00
|
|
|
}
|
|
|
|
this.loadingDynamic = true
|
2022-06-30 11:04:32 +08:00
|
|
|
Apis.getResourceByDept(
|
|
|
|
data,
|
|
|
|
res => {
|
2022-07-07 10:27:46 +08:00
|
|
|
this.loadingDynamic = false
|
2022-06-30 11:04:32 +08:00
|
|
|
if (res.data.code !== 0) {
|
2022-07-01 14:50:29 +08:00
|
|
|
return this.$message.error(res.data.msg)
|
2022-06-30 11:04:32 +08:00
|
|
|
}
|
2022-07-07 10:27:46 +08:00
|
|
|
console.log('res.data----发布动态-------->', res.data)
|
2022-07-01 14:50:29 +08:00
|
|
|
this.list = res.data.data.list || []
|
2022-07-07 10:27:46 +08:00
|
|
|
// this.list.push({})
|
|
|
|
// this.list.push({})
|
2022-06-30 11:04:32 +08:00
|
|
|
},
|
|
|
|
err => {
|
2022-07-07 10:27:46 +08:00
|
|
|
this.loadingDynamic = false
|
2022-07-01 14:50:29 +08:00
|
|
|
this.$message.error(err)
|
2022-07-07 10:27:46 +08:00
|
|
|
console.log('err-----发布动态------->', err)
|
2022-07-01 14:50:29 +08:00
|
|
|
}
|
2022-07-07 10:27:46 +08:00
|
|
|
)
|
2022-07-01 14:50:29 +08:00
|
|
|
},
|
|
|
|
// 部门推荐能力
|
2022-07-19 09:55:05 +08:00
|
|
|
getApplyByDept () {
|
2022-07-07 10:27:46 +08:00
|
|
|
const data = {
|
2022-07-01 14:50:29 +08:00
|
|
|
limit: 5,
|
|
|
|
page: 1
|
2022-07-07 10:27:46 +08:00
|
|
|
}
|
|
|
|
this.loadingTable = true
|
2022-07-01 14:50:29 +08:00
|
|
|
Apis.getApplyByDept(
|
|
|
|
data,
|
|
|
|
res => {
|
2022-07-07 10:27:46 +08:00
|
|
|
this.loadingTable = false
|
2022-07-01 14:50:29 +08:00
|
|
|
if (res.data.code !== 0) {
|
|
|
|
return this.$message.error(res.data.msg)
|
|
|
|
}
|
2022-07-07 10:27:46 +08:00
|
|
|
console.log('res.data------部门推荐能力------>', res.data)
|
|
|
|
this.tableData = res.data.data.list || []
|
2022-07-01 14:50:29 +08:00
|
|
|
},
|
|
|
|
err => {
|
2022-07-07 10:27:46 +08:00
|
|
|
this.loadingTable = false
|
2022-07-01 14:50:29 +08:00
|
|
|
this.$message.error(err)
|
2022-07-07 10:27:46 +08:00
|
|
|
console.log('err', err)
|
2022-06-30 11:04:32 +08:00
|
|
|
}
|
2022-07-07 10:27:46 +08:00
|
|
|
)
|
2022-07-18 14:17:28 +08:00
|
|
|
},
|
2022-07-19 09:55:05 +08:00
|
|
|
jumpTo () {
|
2022-07-18 14:17:28 +08:00
|
|
|
this.$router.push({
|
|
|
|
path: 'activiti-my-work-dynamics'
|
2022-07-19 09:55:05 +08:00
|
|
|
})
|
|
|
|
}
|
2022-06-30 11:04:32 +08:00
|
|
|
}
|
2022-06-29 15:50:26 +08:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
2022-07-01 14:50:29 +08:00
|
|
|
.ellipsis {
|
|
|
|
//超出一行省略号
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
2022-07-19 09:55:05 +08:00
|
|
|
word-break: break-all;
|
2022-07-01 14:50:29 +08:00
|
|
|
}
|
|
|
|
|
2022-06-29 15:50:26 +08:00
|
|
|
.bottom-view {
|
2022-06-30 11:04:32 +08:00
|
|
|
width: 100%;
|
|
|
|
height: 335px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
2022-07-01 14:50:29 +08:00
|
|
|
|
2022-06-30 11:04:32 +08:00
|
|
|
.container {
|
|
|
|
background: #fff;
|
|
|
|
width: 800px;
|
2022-06-29 15:50:26 +08:00
|
|
|
height: 335px;
|
2022-07-18 14:17:28 +08:00
|
|
|
padding: 0px 0 0 10px;
|
|
|
|
box-sizing: border-box;
|
2022-06-30 11:04:32 +08:00
|
|
|
}
|
2022-06-29 15:50:26 +08:00
|
|
|
}
|
2022-07-01 14:50:29 +08:00
|
|
|
|
|
|
|
.dynamic-box {
|
|
|
|
width: 770px;
|
2022-08-09 11:13:44 +08:00
|
|
|
height: 285px;
|
|
|
|
position: relative;
|
2022-07-01 14:50:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.dynamicView {
|
|
|
|
cursor: pointer;
|
|
|
|
width: 770px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
margin-bottom: 7px;
|
|
|
|
|
|
|
|
.wrapper {
|
2022-07-18 14:17:28 +08:00
|
|
|
height: 45px;
|
2022-07-01 14:50:29 +08:00
|
|
|
width: 770px;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: center;
|
|
|
|
background-image: url("../images/bgIndex.png");
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-color: #f4f5f8;
|
|
|
|
border-radius: 1px;
|
|
|
|
|
|
|
|
.content {
|
|
|
|
width: 760px;
|
|
|
|
padding-right: 20px;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
justify-content: flex-start;
|
|
|
|
align-items: center;
|
|
|
|
margin-left: 12px;
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
|
|
.left {
|
|
|
|
width: 159px;
|
|
|
|
color: #2b2b2b;
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.right {
|
2022-07-18 14:17:28 +08:00
|
|
|
font-size: 16px;
|
2022-07-01 14:50:29 +08:00
|
|
|
color: #464645;
|
|
|
|
width: 600px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-18 14:17:28 +08:00
|
|
|
.more {
|
|
|
|
cursor: pointer;
|
|
|
|
text-align: right;
|
|
|
|
padding-top: 4px;
|
|
|
|
display: inline-block;
|
|
|
|
width: 100%;
|
|
|
|
color: #2b2b2b;
|
|
|
|
font-size: 14px;
|
2022-08-09 11:13:44 +08:00
|
|
|
position: absolute;
|
|
|
|
right: 15px;
|
|
|
|
bottom: 10px;
|
2022-07-18 14:17:28 +08:00
|
|
|
}
|
|
|
|
|
2022-07-01 14:50:29 +08:00
|
|
|
.recommendView {
|
|
|
|
cursor: pointer;
|
|
|
|
width: 770px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
margin-bottom: 7px;
|
|
|
|
}
|
|
|
|
|
|
|
|
::v-deep .ant-table-thead {
|
|
|
|
background-color: #f4f5f8;
|
|
|
|
}
|
2022-07-07 10:27:46 +08:00
|
|
|
</style>
|
2022-07-18 14:17:28 +08:00
|
|
|
<style lang="scss">
|
|
|
|
.testTooltip {
|
|
|
|
width: 670px !important;
|
|
|
|
}
|
|
|
|
</style>
|