Compare commits

..

No commits in common. "7b3a32fb77085c9673ea096340ef0dfd32d0e45a" and "1aa48bd4e61ffb0987c02e1b6f0668a1e44ca452" have entirely different histories.

6 changed files with 7 additions and 296 deletions

View File

@ -84,27 +84,3 @@ export const getRequire = (data, success, fail) => {
fail && fail(err)
})
}
// 部门发布动态
export const getResourceByDept = (data, success, fail) => {
Request({
methods: 'get',
url: '/resource/getByDept',
data
}).then(res => {
success && success(res)
}).catch(err => {
fail && fail(err)
})
}
// 部门能力推荐
export const getApplyByDept = (data, success, fail) => {
Request({
methods: 'get',
url: '/resource/getApplyByDept',
data
}).then(res => {
success && success(res)
}).catch(err => {
fail && fail(err)
})
}

View File

@ -1,74 +1,19 @@
<template>
<div class="bottom-view">
<div class="left container">
<content-title :title="title.dynamic"></content-title>
<dynamicView v-for="(item, index) in list" :key="index" :number="index + 1" :item="item"></dynamicView>
</div>
<div class="right container">
<content-title :title="title.recommend"></content-title>
<recommendView></recommendView>
</div>
</div>
</template>
<script>
import dynamicView from "./dynamic-view";
import recommendView from "./recommend-view";
import contentTitle from "./content-title";
import * as Apis from '../api';
import FrequencyTop5View from './frequency-top5-view.vue';
export default {
components: {
dynamicView,
recommendView,
contentTitle
},
data() {
return {
title: { dynamic: "部门发布动态", recommend: "部门推荐能力" },
list: [
]
};
},
mounted() {
this.getResourceByDept();
},
methods: {
//
getResourceByDept() {
let data = {
limit: 5,
page: 1
};
Apis.getResourceByDept(
data,
res => {
if (res.data.code !== 0) {
return;
}
this.list = res.data.data.records || []
},
err => {
console.log("err", err);
}
);
}
}
components: { FrequencyTop5View }
}
</script>
<style lang="scss" scoped>
.bottom-view {
width: 100%;
height: 335px;
// background: green;
background: green;
box-sizing: border-box;
display: flex;
justify-content: space-between;
// color: #fff;
.container {
background: #fff;
width: 800px;
height: 335px;
padding: 0px 0 20px 10px;
}
}
</style>

View File

@ -1,37 +0,0 @@
<template>
<div class="content-title">
<div>
{{ title }}
</div>
</div>
</template>
<script>
export default {
name: "contentTitle",
props: {
title: String,
},
data() {
},
computed: {
},
methods: {
}
};
</script>
<style lang="scss" scoped>
.content-title {
height:48px;
line-height:48px;
font-size: 18px;
// color: #fff;
}
</style>

View File

@ -1,69 +0,0 @@
<template>
<div class="dynamicView">
<div class="wrapper">
<div class="content">
<div class="left">{{ item.createDate }}</div>
<div class="right">{{ item.name }}</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "dynamicView",
props: {
item: {
type: Object,
default: () => {
return {};
}
}
},
methods: {}
};
</script>
<style lang="scss" scoped>
.dynamicView {
cursor: pointer;
width: 770px;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 7px;
.wrapper {
height: 50px;
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 {
font-size: 18px;
color:#464645
}
}
}
}
</style>

View File

@ -1,104 +0,0 @@
<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 || [];
},
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>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB