hi-ucs/back/src/views/modules/workBench/components/recommend-view.vue

106 lines
2.0 KiB
Vue

<template>
<div class="recommendView">
<a-table :dataSource="data" :columns="columns" bordered :pagination="false" :scroll="maxSize" size="small" />
</div>
</template>
<script>
import * as Apis from "../api";
export default {
name: "recommendView",
props: {
item: {
type: Object,
default: () => {
return {};
}
}
},
data() {
return {
columns: [
{
title: "名称",
key: "name",
dataIndex: "name",
width: 220
},
{
title: "类型",
key: "type",
dataIndex: "type",
width: 76
},
{
title: "单位",
key: "deptContacts",
dataIndex: "deptContacts",
width: 114
},
{
title: "时间",
key: "createDate",
dataIndex: "createDate",
width: 153
},
{
title: "当前申请数",
key: "activityName",
dataIndex: "activityName",
width: 115
},
{
title: "调用数量",
key: "activityName",
dataIndex: "activityName",
width: 90
}
],
data: [
],
maxSize: { y: 195 }
};
},
mounted() {
this.getApplyByDept();
},
methods: {
//发布动态
getApplyByDept() {
let data = {
limit: 5,
page: 1
};
Apis.getApplyByDept(
data,
res => {
if (res.data.code !== 0) {
return;
}
this.data = res.data.data.records || [];
console.log('this.data------------>', this.data);
},
err => {
console.log("err", err);
}
);
}
}
};
</script>
<style lang="scss" scoped>
.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;
}
</style>