[update] 拆分、首页
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<div class="content-div" v-for="item in dataSource" :key="item.id" @click="clickLink(item)">
|
||||
<img class="icon-img" :src="dataSource.logo || defaultLogo" :alt="item.name">
|
||||
<img class="icon-img" :src="getImg(item.logoUrl)" :alt="item.name">
|
||||
<a-tooltip placement="top">
|
||||
<template slot="title">{{ item.name }}</template>
|
||||
<p>{{ item.name }}</p>
|
||||
@@ -19,7 +19,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction } from '@/api/manage'
|
||||
import { getAction, getFileAccessHttpUrl } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'FriendLinkCard',
|
||||
@@ -27,14 +27,7 @@ export default {
|
||||
return {
|
||||
defaultLogo: require('@/assets/image/dashboard/friendship-link.png'),
|
||||
loading: false,
|
||||
dataSource: [
|
||||
{ name: '奇瑞官网' },
|
||||
{ name: '奇瑞官网' },
|
||||
{ name: '奇瑞官网' },
|
||||
{ name: '奇瑞官网' },
|
||||
{ name: '奇瑞官网' },
|
||||
{ name: '奇瑞官网' }
|
||||
],
|
||||
dataSource: [],
|
||||
url: {
|
||||
list: '/sys/lawsFriendlyLinks/list'
|
||||
}
|
||||
@@ -44,12 +37,17 @@ export default {
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
getImg (id) {
|
||||
if (!id) {
|
||||
return this.defaultLogo
|
||||
}
|
||||
return getFileAccessHttpUrl(id)
|
||||
},
|
||||
loadData () {
|
||||
this.loading = true
|
||||
getAction(this.url.list, {}).then((res) => {
|
||||
if (res.success) {
|
||||
// grounding 1上架 0下架(只显示上架的)
|
||||
this.dataSource = res.result.filter(item => item.grounding === '1')
|
||||
this.dataSource = res.result
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<a-card :bordered="false" class="todo-card">
|
||||
<a-spin :spinning="loading">
|
||||
<div class="top-wrapper">
|
||||
<p class="left-p"><i class="iconfont icon-calendar left-icon"></i>{{ $t('dashboard.todoTask.todoTask') }}</p>
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created () {
|
||||
// this.getTodoTask()
|
||||
this.getTodoTask()
|
||||
},
|
||||
methods: {
|
||||
// 获取待办任务
|
||||
@@ -170,9 +170,11 @@ export default {
|
||||
|
||||
<style lang="less" scoped>
|
||||
@size: 48px;
|
||||
.todo-card {
|
||||
height: calc(100vh - 611px);
|
||||
}
|
||||
.content-wrapper {
|
||||
margin-top: 10px;
|
||||
height: calc(100vh - 700px);
|
||||
overflow-y: auto;
|
||||
|
||||
.content-item {
|
||||
@@ -218,6 +220,9 @@ export default {
|
||||
}
|
||||
@media screen and (max-width: 1366px) {
|
||||
@size: 40px;
|
||||
.todo-card {
|
||||
height: calc(100vh - 424px);
|
||||
}
|
||||
.content-wrapper {
|
||||
height: calc(100vh - 506px);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user