You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					253 lines
				
				6.8 KiB
			
		
		
			
		
	
	
					253 lines
				
				6.8 KiB
			| 
								 
											7 years ago
										 
									 | 
							
								<template>
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								  <page-layout :avatar="currUser.avatar">
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    <div slot="headerContent">
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								      <div class="title">{{currUser.timefix}},{{currUser.name}},{{currUser.welcome}}</div>
							 | 
						||
| 
								 | 
							
								      <div>{{currUser.position}}</div>
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    </div>
							 | 
						||
| 
								 | 
							
								    <div slot="extra">
							 | 
						||
| 
								 | 
							
								      <a-row>
							 | 
						||
| 
								 | 
							
								        <a-col :sm="8" :xs="24">
							 | 
						||
| 
								 | 
							
								          <head-info title="项目数" content="56" :bordered="true"/>
							 | 
						||
| 
								 | 
							
								        </a-col>
							 | 
						||
| 
								 | 
							
								        <a-col :sm="8" :xs="24">
							 | 
						||
| 
								 | 
							
								          <head-info title="团队内排名" content="8/24" :bordered="true"/>
							 | 
						||
| 
								 | 
							
								        </a-col>
							 | 
						||
| 
								 | 
							
								        <a-col :sm="8" :xs="24">
							 | 
						||
| 
								 | 
							
								          <head-info title="项目访问" content="2,223"/>
							 | 
						||
| 
								 | 
							
								        </a-col>
							 | 
						||
| 
								 | 
							
								      </a-row>
							 | 
						||
| 
								 | 
							
								    </div>
							 | 
						||
| 
								 | 
							
								    <div>
							 | 
						||
| 
								 | 
							
								      <a-row style="margin: 0 -12px">
							 | 
						||
| 
								 | 
							
								        <a-col style="padding: 0 12px" :xl="16" :lg="24" :md="24" :sm="24" :xs="24">
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								          <a-card class="project-list" :loading="loading" style="margin-bottom: 24px;" :bordered="false" title="进行中的项目" :body-style="{padding: 0}">
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								            <a slot="extra">全部项目</a>
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								            <div>
							 | 
						||
| 
								 | 
							
								              <a-card-grid :key="i" v-for="(item, i) in projects">
							 | 
						||
| 
								 | 
							
								                <a-card :bordered="false" :body-style="{padding: 0}">
							 | 
						||
| 
								 | 
							
								                  <a-card-meta :description="item.desc">
							 | 
						||
| 
								 | 
							
								                    <div slot="title" class="card-title">
							 | 
						||
| 
								 | 
							
								                      <a-avatar size="small" :src="item.logo" />
							 | 
						||
| 
								 | 
							
								                      <a>Alipay</a>
							 | 
						||
| 
								 | 
							
								                    </div>
							 | 
						||
| 
								 | 
							
								                  </a-card-meta>
							 | 
						||
| 
								 | 
							
								                  <div class="project-item">
							 | 
						||
| 
								 | 
							
								                    <a href="/#/">科学搬砖组</a>
							 | 
						||
| 
								 | 
							
								                    <span class="datetime">9小时前</span>
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								                  </div>
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								                </a-card>
							 | 
						||
| 
								 | 
							
								              </a-card-grid>
							 | 
						||
| 
								 | 
							
								            </div>
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								          </a-card>
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								          <a-card :loading="loading" title="动态" :bordered="false">
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								            <a-list>
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								              <a-list-item :key="index" v-for="(item, index) in activities">
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								                <a-list-item-meta>
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								                  <a-avatar slot="avatar" :src="item.user.avatar" />
							 | 
						||
| 
								 | 
							
								                  <div slot="title" v-html="item.template" />
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								                  <div slot="description">9小时前</div>
							 | 
						||
| 
								 | 
							
								                </a-list-item-meta>
							 | 
						||
| 
								 | 
							
								              </a-list-item>
							 | 
						||
| 
								 | 
							
								            </a-list>
							 | 
						||
| 
								 | 
							
								          </a-card>
							 | 
						||
| 
								 | 
							
								        </a-col>
							 | 
						||
| 
								 | 
							
								        <a-col style="padding: 0 12px" :xl="8" :lg="24" :md="24" :sm="24" :xs="24">
							 | 
						||
| 
								 | 
							
								          <a-card title="快速开始 / 便捷导航" style="margin-bottom: 24px" :bordered="false" :body-style="{padding: 0}">
							 | 
						||
| 
								 | 
							
								            <div class="item-group">
							 | 
						||
| 
								 | 
							
								              <a>操作一</a>
							 | 
						||
| 
								 | 
							
								              <a>操作二</a>
							 | 
						||
| 
								 | 
							
								              <a>操作三</a>
							 | 
						||
| 
								 | 
							
								              <a>操作四</a>
							 | 
						||
| 
								 | 
							
								              <a>操作五</a>
							 | 
						||
| 
								 | 
							
								              <a>操作六</a>
							 | 
						||
| 
								 | 
							
								              <a-button size="small" type="primary" ghost icon="plus">添加</a-button>
							 | 
						||
| 
								 | 
							
								            </div>
							 | 
						||
| 
								 | 
							
								          </a-card>
							 | 
						||
| 
								 | 
							
								          <a-card title="XX指数" style="margin-bottom: 24px" :bordered="false" :body-style="{padding: 0}">
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								            <div style="min-height: 400px;">
							 | 
						||
| 
								 | 
							
								              <radar />
							 | 
						||
| 
								 | 
							
								            </div>
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								          </a-card>
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								          <a-card :loading="loading" title="团队" :bordered="false">
							 | 
						||
| 
								 | 
							
								            <div class="members">
							 | 
						||
| 
								 | 
							
								              <a-row>
							 | 
						||
| 
								 | 
							
								                <a-col :span="12" v-for="(item, index) in teams" :key="index">
							 | 
						||
| 
								 | 
							
								                  <a>
							 | 
						||
| 
								 | 
							
								                    <a-avatar size="small" :src="item.avatar" />
							 | 
						||
| 
								 | 
							
								                    <span class="member">{{item.name}}</span>
							 | 
						||
| 
								 | 
							
								                  </a>
							 | 
						||
| 
								 | 
							
								                </a-col>
							 | 
						||
| 
								 | 
							
								              </a-row>
							 | 
						||
| 
								 | 
							
								            </div>
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								          </a-card>
							 | 
						||
| 
								 | 
							
								        </a-col>
							 | 
						||
| 
								 | 
							
								      </a-row>
							 | 
						||
| 
								 | 
							
								    </div>
							 | 
						||
| 
								 | 
							
								  </page-layout>
							 | 
						||
| 
								 | 
							
								</template>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<script>
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								import PageHeader from '../../components/page/PageHeader'
							 | 
						||
| 
								 | 
							
								import PageLayout from '../../layouts/PageLayout'
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								import AAvatar from 'ant-design-vue/es/avatar/Avatar'
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								import HeadInfo from '../../components/tool/HeadInfo'
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								import ARow from 'ant-design-vue/es/grid/Row'
							 | 
						||
| 
								 | 
							
								import ACol from 'ant-design-vue/es/grid/Col'
							 | 
						||
| 
								 | 
							
								import ACard from 'ant-design-vue/es/card/Card'
							 | 
						||
| 
								 | 
							
								import ACardGrid from 'ant-design-vue/es/card/Grid'
							 | 
						||
| 
								 | 
							
								import ACardMeta from 'ant-design-vue/es/card/Meta'
							 | 
						||
| 
								 | 
							
								import AList from 'ant-design-vue/es/list/index'
							 | 
						||
| 
								 | 
							
								import AListItem from 'ant-design-vue/es/list/Item'
							 | 
						||
| 
								 | 
							
								import AButton from 'ant-design-vue/es/button/button'
							 | 
						||
| 
								 | 
							
								import AIcon from 'ant-design-vue/es/icon/icon'
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								import Radar from '../../components/chart/Radar'
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								const AListItemMeta = AListItem.Meta
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								export default {
							 | 
						||
| 
								 | 
							
								  name: 'WorkPlace',
							 | 
						||
| 
								 | 
							
								  components: {
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    Radar,
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    AIcon,
							 | 
						||
| 
								 | 
							
								    AButton,
							 | 
						||
| 
								 | 
							
								    AListItemMeta,
							 | 
						||
| 
								 | 
							
								    AListItem,
							 | 
						||
| 
								 | 
							
								    AList,
							 | 
						||
| 
								 | 
							
								    ACardMeta,
							 | 
						||
| 
								 | 
							
								    ACardGrid,
							 | 
						||
| 
								 | 
							
								    ACard,
							 | 
						||
| 
								 | 
							
								    ACol,
							 | 
						||
| 
								 | 
							
								    ARow,
							 | 
						||
| 
								 | 
							
								    HeadInfo,
							 | 
						||
| 
								 | 
							
								    AAvatar,
							 | 
						||
| 
								 | 
							
								    PageLayout,
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    PageHeader},
							 | 
						||
| 
								 | 
							
								  data () {
							 | 
						||
| 
								 | 
							
								    return {
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								      projects: [],
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								      loading: true,
							 | 
						||
| 
								 | 
							
								      activities: [],
							 | 
						||
| 
								 | 
							
								      teams: []
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    }
							 | 
						||
| 
								 | 
							
								  },
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								  computed: {
							 | 
						||
| 
								 | 
							
								    currUser () {
							 | 
						||
| 
								 | 
							
								      return this.$store.state.account.user
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								  },
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								  mounted () {
							 | 
						||
| 
								 | 
							
								    this.getProjectList()
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    this.getActivites()
							 | 
						||
| 
								 | 
							
								    this.getTeams()
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								  },
							 | 
						||
| 
								 | 
							
								  methods: {
							 | 
						||
| 
								 | 
							
								    getProjectList () {
							 | 
						||
| 
								 | 
							
								      this.$axios({
							 | 
						||
| 
								 | 
							
								        method: 'get',
							 | 
						||
| 
								 | 
							
								        url: '/project'
							 | 
						||
| 
								 | 
							
								      }).then(res => {
							 | 
						||
| 
								 | 
							
								        this.projects = res.data
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								        this.loading = false
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								      })
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    },
							 | 
						||
| 
								 | 
							
								    getActivites () {
							 | 
						||
| 
								 | 
							
								      this.$axios({
							 | 
						||
| 
								 | 
							
								        method: 'get',
							 | 
						||
| 
								 | 
							
								        url: '/work/activity'
							 | 
						||
| 
								 | 
							
								      }).then(res => {
							 | 
						||
| 
								 | 
							
								        this.activities = res.data
							 | 
						||
| 
								 | 
							
								      })
							 | 
						||
| 
								 | 
							
								    },
							 | 
						||
| 
								 | 
							
								    getTeams () {
							 | 
						||
| 
								 | 
							
								      this.$axios({
							 | 
						||
| 
								 | 
							
								        method: 'get',
							 | 
						||
| 
								 | 
							
								        url: '/work/team'
							 | 
						||
| 
								 | 
							
								      }).then(res => {
							 | 
						||
| 
								 | 
							
								        this.teams = res.data
							 | 
						||
| 
								 | 
							
								      })
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    }
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								}
							 | 
						||
| 
								 | 
							
								</script>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								<style lang="less">
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								  .project-list {
							 | 
						||
| 
								 | 
							
								    .card-title {
							 | 
						||
| 
								 | 
							
								      font-size: 0;
							 | 
						||
| 
								 | 
							
								      a {
							 | 
						||
| 
								 | 
							
								        color: rgba(0, 0, 0, 0.85);
							 | 
						||
| 
								 | 
							
								        margin-left: 12px;
							 | 
						||
| 
								 | 
							
								        line-height: 24px;
							 | 
						||
| 
								 | 
							
								        height: 24px;
							 | 
						||
| 
								 | 
							
								        display: inline-block;
							 | 
						||
| 
								 | 
							
								        vertical-align: top;
							 | 
						||
| 
								 | 
							
								        font-size: 14px;
							 | 
						||
| 
								 | 
							
								        &:hover {
							 | 
						||
| 
								 | 
							
								          color: #1890ff;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								      }
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								    .project-item {
							 | 
						||
| 
								 | 
							
								      display: flex;
							 | 
						||
| 
								 | 
							
								      margin-top: 8px;
							 | 
						||
| 
								 | 
							
								      overflow: hidden;
							 | 
						||
| 
								 | 
							
								      font-size: 12px;
							 | 
						||
| 
								 | 
							
								      height: 20px;
							 | 
						||
| 
								 | 
							
								      line-height: 20px;
							 | 
						||
| 
								 | 
							
								      a {
							 | 
						||
| 
								 | 
							
								        color: rgba(0, 0, 0, 0.45);
							 | 
						||
| 
								 | 
							
								        display: inline-block;
							 | 
						||
| 
								 | 
							
								        flex: 1 1 0;
							 | 
						||
| 
								 | 
							
								        &:hover {
							 | 
						||
| 
								 | 
							
								          color: #1890ff;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								      }
							 | 
						||
| 
								 | 
							
								      .datetime {
							 | 
						||
| 
								 | 
							
								        color: rgba(0, 0, 0, 0.25);
							 | 
						||
| 
								 | 
							
								        flex: 0 0 auto;
							 | 
						||
| 
								 | 
							
								        float: right;
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								      }
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								      .ant-card-meta-description {
							 | 
						||
| 
								 | 
							
								        color: rgba(0, 0, 0, 0.45);
							 | 
						||
| 
								 | 
							
								        height: 44px;
							 | 
						||
| 
								 | 
							
								        line-height: 22px;
							 | 
						||
| 
								 | 
							
								        overflow: hidden;
							 | 
						||
| 
								 | 
							
								      }
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								  }
							 | 
						||
| 
								 | 
							
								  .item-group{
							 | 
						||
| 
								 | 
							
								    padding: 20px 0 8px 24px;
							 | 
						||
| 
								 | 
							
								    font-size: 0;
							 | 
						||
| 
								 | 
							
								    a{
							 | 
						||
| 
								 | 
							
								      color: rgba(0, 0, 0, 0.65);
							 | 
						||
| 
								 | 
							
								      display: inline-block;
							 | 
						||
| 
								 | 
							
								      font-size: 14px;
							 | 
						||
| 
								 | 
							
								      margin-bottom: 13px;
							 | 
						||
| 
								 | 
							
								      width: 25%;
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								  .members {
							 | 
						||
| 
								 | 
							
								    a {
							 | 
						||
| 
								 | 
							
								      display: block;
							 | 
						||
| 
								 | 
							
								      margin: 12px 0;
							 | 
						||
| 
								 | 
							
								      line-height: 24px;
							 | 
						||
| 
								 | 
							
								      height: 24px;
							 | 
						||
| 
								 | 
							
								      .member {
							 | 
						||
| 
								 | 
							
								        font-size: 14px;
							 | 
						||
| 
								 | 
							
								        color: rgba(0,0,0,.65);
							 | 
						||
| 
								 | 
							
								        line-height: 24px;
							 | 
						||
| 
								 | 
							
								        max-width: 100px;
							 | 
						||
| 
								 | 
							
								        vertical-align: top;
							 | 
						||
| 
								 | 
							
								        margin-left: 12px;
							 | 
						||
| 
								 | 
							
								        transition: all 0.3s;
							 | 
						||
| 
								 | 
							
								        display: inline-block;
							 | 
						||
| 
								 | 
							
								      }
							 | 
						||
| 
								 | 
							
								      &:hover {
							 | 
						||
| 
								 | 
							
								        span {
							 | 
						||
| 
								 | 
							
								          color: #1890ff;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								      }
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 
											7 years ago
										 
									 | 
							
								  }
							 | 
						||
| 
								 | 
							
								</style>
							 |