wangqing 4 years ago
parent
commit
6999d4d5a7
  1. 7
      src/assets/styles/index.scss
  2. 38
      src/components/generator/config.js
  3. 140
      src/views/account/member.vue
  4. 37
      src/views/home/NewIndex.vue
  5. 4
      src/views/home/index.vue
  6. 54
      src/views/project/MyProject.vue
  7. 81
      src/views/project/template.vue

7
src/assets/styles/index.scss

@ -73,6 +73,9 @@ div:focus {
.ml-20 { .ml-20 {
margin-left: 20px; margin-left: 20px;
} }
.ml-10 {
margin-left: 10px;
}
.block { .block {
display: block; display: block;
} }
@ -107,6 +110,10 @@ div:focus {
width: 80% !important; width: 80% !important;
margin: 0 auto; margin: 0 auto;
} }
.width90 {
width: 80% !important;
margin: 0 auto;
}
.text-overflow { .text-overflow {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;

38
src/components/generator/config.js

@ -775,5 +775,43 @@ export const personalInfoComponents = [
'show-word-limit': true, 'show-word-limit': true,
readonly: false, readonly: false,
disabled: false disabled: false
},
{
typeId: 'PROVINCE_CITY',
__config__: {
label: '省市联动',
labelWidth: null,
showLabel: true,
changeTag: false,
tag: 'province-city',
tagIcon: 'input',
defaultValue: undefined,
required: true,
layout: 'colFormItem',
span: 24,
showRegList: false,
document: 'https://element.eleme.cn/#/zh-CN/component/input'
},
placeholder: '请选择省市县',
style: {width: '100%'}
},
{
typeId: 'INPUT_MAP',
__config__: {
label: '地理位置',
labelWidth: null,
showLabel: true,
changeTag: false,
tag: 'input-map',
tagIcon: 'input',
defaultValue: undefined,
required: true,
layout: 'colFormItem',
span: 24,
showRegList: false,
document: 'https://element.eleme.cn/#/zh-CN/component/input'
},
placeholder: '请选择位置',
style: {width: '100%'}
} }
] ]

140
src/views/account/member.vue

@ -1,46 +1,5 @@
<template> <template>
<div class="member-container"> <div class="member-container">
<div class="member-left-container">
<el-card class="user-simple-info-view">
<div style="display: flex; align-content: center; flex-direction: row;">
<img class="avatar" :src="userInfo.avatar">
<div class="info-view">
<p class="name">
{{ userInfo.name }}
</p>
<p class="email">
{{ userInfo.email }}
</p>
<p>
<font-icon class="fab fa-weixin icon" :style="{color:userInfo.wxName?'#3F9F3F':''}" />
<font-icon class="fa fa-qq icon" :style="{color:userInfo.qqName?'#078DF0':''}" />
<font-icon class="fa fa-weibo icon" />
</p>
</div>
</div>
</el-card>
<el-card class="user-menu-list-view">
<el-menu
:default-active="memberMenuActive"
>
<el-menu-item index="1">
<span slot="title">账户信息</span>
</el-menu-item>
<el-menu-item index="2">
<span slot="title">我的资源</span>
</el-menu-item>
<el-menu-item index="3">
<span slot="title">扩展功能</span>
</el-menu-item>
<el-menu-item index="4">
<span slot="title">我的联系人</span>
</el-menu-item>
<el-menu-item index="5">
<span slot="title">协作人员</span>
</el-menu-item>
</el-menu>
</el-card>
</div>
<el-card class="member-box-card"> <el-card class="member-box-card">
<div class="member-info-view"> <div class="member-info-view">
<p class="title pl-10">个人信息</p> <p class="title pl-10">个人信息</p>
@ -139,37 +98,6 @@
</div> </div>
</div> </div>
</div> </div>
<p class="title pl-10">企业信息</p>
<div v-if="userInfo" class="account-info-view">
<table>
<tbody>
<tr>
<td width="80" style="text-align: right;">企业名称</td>
<td>
字节跳动上海研发中心
</td>
</tr>
<tr>
<td width="80" style="text-align: right;">企业logo</td>
<td>
<el-button type="text">上传Logo</el-button>
</td>
</tr>
<tr>
<td width="100" style="text-align: right;">自定义域名</td>
<td>
xxxx
</td>
</tr>
<tr>
<td width="80" style="text-align: right;">所在地址</td>
<td>
xxxxx
</td>
</tr>
</tbody>
</table>
</div>
</div> </div>
</el-card> </el-card>
<div> <div>
@ -515,74 +443,6 @@ export default {
line-height: 30px; line-height: 30px;
} }
} }
.user-simple-info-view {
margin-top: 20px;
margin-right: 10px;
width: 370px;
height: 118px;
line-height: 20px;
border-radius: 10px;
text-align: center;
.avatar {
width: 81px;
height: 81px;
border-radius: 50px;
background-color: rgba(229, 229, 229, 100);
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.4);
margin: 0 20px;
}
p {
margin: 0;
}
.name {
color: rgba(16, 16, 16, 100);
font-size: 20px;
line-height: 30px;
text-align: left;
}
.email {
color: rgba(16, 16, 16, 100);
font-size: 14px;
line-height: 20px;
text-align: center;
}
.info-view {
height: 81px;
text-align: left;
}
.icon {
margin: 5px;
}
}
.user-menu-list-view {
margin-top: 20px;
width: 370px;
height: 303px;
line-height: 20px;
border-radius: 10px;
text-align: center;
ul {
border-right: none;
}
ul li {
list-style: none;
color: rgba(16, 16, 16, 100);
font-size: 18px;
line-height: 40px;
text-align: center;
border-bottom: 1px solid rgb(234, 234, 234);
}
ul li:last-child {
border-bottom: none;
}
ul li:hover {
background-color: transparent;
}
.is-active {
background-color: transparent;
font-weight: bold;
}
}
.account-info-view { .account-info-view {
padding: 10px; padding: 10px;
display: flex; display: flex;

37
src/views/home/NewIndex.vue

@ -3,35 +3,28 @@
<el-container> <el-container>
<el-header class="header-container" height="38"> <el-header class="header-container" height="38">
<div> <div>
<img src="@/assets/images/indexLogo.png" class="header-logo-img" <img class="header-logo-img" src="@/assets/images/indexLogo.png"
@click="$router.push({path:'/'})" @click="$router.push({path:'/'})"
> >
</div> </div>
<div class="right-header"> <div class="right-header">
<el-link href="https://doc.tduckapp.com/" target="_blank">帮助文档</el-link>
<el-popover <el-popover
placement="bottom-end" placement="bottom-end"
width="200"
trigger="click" trigger="click"
width="150"
> >
<div class="user-person-menu"> <div class="user-person-menu">
<div> <div>
<p v-if="getUserInfo" class="nick-name">{{ getUserInfo.name }}</p> <p v-if="getUserInfo" class="nick-name">{{ getUserInfo.name }}</p>
</div> </div>
<div class="person-menu-divider" /> <el-divider />
<div> <div>
<p class="person-menu-item" @click="$router.push({path: '/home/member'})"> <p class="person-menu-item" @click="$router.push({path: '/home/member'})">
<font-icon class="fab fa-get-pocket" /> <font-icon class="fab fa-get-pocket" />
我的账户 我的账户
</p> </p>
<p class="person-menu-item"> <el-divider />
<font-icon class="fas fa-envelope" />
站内信
</p>
<p class="person-menu-item">
<font-icon class="fas fa-user-circle" />
联系人
</p>
<div class="person-menu-divider" />
<p class="person-menu-item" @click="logoutHandle"> <p class="person-menu-item" @click="logoutHandle">
<font-icon class="fas fa-sign-out" /> <font-icon class="fas fa-sign-out" />
退出登录 退出登录
@ -54,7 +47,7 @@
<el-container> <el-container>
<el-aside width="280px"> <el-aside width="280px">
<el-card> <el-card>
<el-button class="width80" type="primary" @click="createBlankTemplate">新建项目</el-button> <el-button class="width90" type="primary" @click="createBlankTemplate">新建项目</el-button>
<div class="menu-view"> <div class="menu-view">
<div v-for="menu in menuList" :key="menu.route" <div v-for="menu in menuList" :key="menu.route"
:class="defaultActiveMenu==menu.route?'menu-item-active menu-item':'menu-item'" :class="defaultActiveMenu==menu.route?'menu-item-active menu-item':'menu-item'"
@ -67,9 +60,9 @@
<div class="text-center"> <div class="text-center">
<h5>加入社群</h5> <h5>加入社群</h5>
<el-image <el-image
style="width: 200px; height: 200px;"
src="https://oss.smileyi.top/static/wx-qrcode.png"
fit="fill" fit="fill"
src="https://oss.smileyi.top/static/wx-qrcode.png"
style="width: 200px; height: 200px;"
/> />
</div> </div>
</el-card> </el-card>
@ -103,7 +96,7 @@ export default {
defaultActiveMenu: '', defaultActiveMenu: '',
menuList: [ menuList: [
{ {
route: '/home/my', route: '/home',
name: '工作台', name: '工作台',
icon: 'fas fa-laptop' icon: 'fas fa-laptop'
}, },
@ -186,6 +179,13 @@ export default {
height: 35px; height: 35px;
float: left; float: left;
} }
.right-header {
display: flex;
flex-direction: row;
> * {
margin: 0 20px;
}
}
.user-avatar { .user-avatar {
width: 35px; width: 35px;
height: 35px; height: 35px;
@ -199,7 +199,7 @@ export default {
background-color: rgba(255, 255, 255, 100); background-color: rgba(255, 255, 255, 100);
padding: 20px; padding: 20px;
.menu-item-active { .menu-item-active {
color: $menuActiveText; color: $menuActiveText !important;
} }
.menu-item { .menu-item {
color: #333; color: #333;
@ -251,6 +251,9 @@ export default {
color: $menuActiveText; color: $menuActiveText;
} }
} }
.el-divider {
margin: 5px 0;
}
.person-menu-divider { .person-menu-divider {
background-color: rgba(210, 210, 210, 78); background-color: rgba(210, 210, 210, 78);
border: 1px solid rgba(210, 210, 210, 78); border: 1px solid rgba(210, 210, 210, 78);

4
src/views/home/index.vue

@ -189,10 +189,6 @@ export default {
cursor: pointer; cursor: pointer;
color: rgba(32, 91, 181, 100); color: rgba(32, 91, 181, 100);
} }
.person-menu-divider {
background-color: rgba(210, 210, 210, 78);
border: 1px solid rgba(210, 210, 210, 78);
}
} }
.user-avatar { .user-avatar {
width: 50px; width: 50px;

54
src/views/project/MyProject.vue

@ -4,14 +4,14 @@
<div> <div>
<span @click="switchDataShowTypeHandle('gird')"> <span @click="switchDataShowTypeHandle('gird')">
<font-icon <font-icon
class="fas fa-th-large show-view-type-icon "
:class="{'show-view-type-icon-active':dataShowType=='gird'}" :class="{'show-view-type-icon-active':dataShowType=='gird'}"
class="fas fa-th-large show-view-type-icon "
/> />
</span> </span>
<span @click="switchDataShowTypeHandle('table')"> <span @click="switchDataShowTypeHandle('table')">
<font-icon <font-icon
class="fas fa-th-list show-view-type-icon"
:class="{'show-view-type-icon-active':dataShowType=='table'}" :class="{'show-view-type-icon-active':dataShowType=='table'}"
class="fas fa-th-list show-view-type-icon"
/> />
</span> </span>
</div> </div>
@ -19,33 +19,25 @@
<el-form-item label="项目更新时间"> <el-form-item label="项目更新时间">
<el-date-picker <el-date-picker
v-model="queryParams.beginDateTime" v-model="queryParams.beginDateTime"
placeholder="选择开始时间"
style="width: 20%;" style="width: 20%;"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime" type="datetime"
placeholder="选择开始时间" value-format="yyyy-MM-dd HH:mm:ss"
/> />
<el-date-picker <el-date-picker
v-model="queryParams.endDateTime" v-model="queryParams.endDateTime"
:default-time="'23:59:59'"
placeholder="选择结束时间"
style="width: 20%;" style="width: 20%;"
type="datetime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
:default-time="'23:59:59'"
placeholder="选择结束时间"
/> />
<el-input <el-input
v-model="queryParams.name" v-model="queryParams.name"
style="width: 20%; margin-left: 20px;" type="text" placeholder="请输入项目名称" placeholder="请输入项目名称" style="width: 20%; margin-left: 20px;" type="text"
/> />
<el-button style="margin-left: 20px;" type="primary" @click="queryProjectPage">查询</el-button> <el-button class="ml-20" type="primary" @click="queryProjectPage">查询</el-button>
<!-- <el-button style="margin-left: 20px;">-->
<!-- <font-icon class="fas fa-plus-square" />-->
<!-- 新建文件夹-->
<!-- </el-button>-->
<el-button style="margin-left: 10px;" @click="$router.push({path:'/project/recycle'})">
<font-icon class="fas fa-recycle" />
回收站
</el-button>
</el-form-item> </el-form-item>
<el-form-item label="项目状态"> <el-form-item label="项目状态">
<el-radio-group v-model="queryParams.status" size="small" @change="()=>{ <el-radio-group v-model="queryParams.status" size="small" @change="()=>{
@ -67,7 +59,7 @@
class="project-grid-view" class="project-grid-view"
> >
<div v-for="p in projectList" :key="p.id" class="project-grid-item-view pointer"> <div v-for="p in projectList" :key="p.id" class="project-grid-item-view pointer">
<el-row type="flex" align="middle" justify="center"> <el-row align="middle" justify="center" type="flex">
<el-col :span="5"> <el-col :span="5">
<span <span
:style="getStatusColorStyle(p.status)" :style="getStatusColorStyle(p.status)"
@ -128,31 +120,31 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else v-loading="projectListLoading"> <div v-if="!projectListLoading&&!projectList">
<data-empty /> <data-empty />
</div> </div>
</div> </div>
<div v-if="dataShowType=='table'" class="project-table-view"> <div v-if="dataShowType=='table'" class="project-table-view">
<el-table <el-table
:data="projectList" :data="projectList"
stripe
border border
empty-text="暂无数据"
highlight-current-row highlight-current-row
stripe
style="width: 100%;" style="width: 100%;"
empty-text="暂无数据"
> >
<el-table-column <el-table-column
prop="name"
show-overflow-tooltip
align="center" align="center"
label="标题" label="标题"
prop="name"
show-overflow-tooltip
/> />
<el-table-column <el-table-column
show-overflow-tooltip
prop="describe"
align="center" align="center"
label="描述" label="描述"
prop="describe"
show-overflow-tooltip
/> />
<el-table-column <el-table-column
align="center" align="center"
@ -170,13 +162,13 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="createTime"
label="创建时间" label="创建时间"
prop="createTime"
/> />
<el-table-column <el-table-column
align="center" align="center"
prop="updateTime"
label="更新时间" label="更新时间"
prop="updateTime"
/> />
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
@ -188,8 +180,8 @@
<span> <span>
<el-button <el-button
v-if="scope.row.status!=1" v-if="scope.row.status!=1"
type="text"
class="green-text-btn" class="green-text-btn"
type="text"
@click="toProjectHandle(scope.row.key,'statistics')" @click="toProjectHandle(scope.row.key,'statistics')"
> >
统计 统计
@ -226,11 +218,11 @@
<div class="project-page-view"> <div class="project-page-view">
<el-pagination <el-pagination
v-if="total>10" v-if="total>10"
background
:page-size.sync="queryParams.size"
:current-page.sync="queryParams.current" :current-page.sync="queryParams.current"
layout="total, prev, pager, next" :page-size.sync="queryParams.size"
:total="total" :total="total"
background
layout="total, prev, pager, next"
@current-change="queryProjectPage" @current-change="queryProjectPage"
/> />
</div> </div>
@ -249,7 +241,7 @@ export default {
name: 'MyProject', name: 'MyProject',
filters: { filters: {
formatDate(time) { formatDate(time) {
return dayjs(time).format('YYYY/MM/DD') return dayjs(time).format('YYYY/MM/DD')
} }
}, },
data() { data() {

81
src/views/project/template.vue

@ -1,31 +1,31 @@
<template> <template>
<div class="create-wrapper"> <div class="create-wrapper">
<el-row> <el-row>
<el-row type="flex" justify="center"> <div class="filter-container">
<el-col :span="20"> <el-form ref="form" :inline="true">
<el-form ref="form" :inline="true"> <el-form-item label="">
<el-form-item label=""> <el-input
<el-input v-model="queryParams.name"
v-model="queryParams.name" class="width80"
@keyup.enter="queryTemplatePage" placeholder="请输入模板名称"
/> @keyup.enter="queryTemplatePage"
</el-form-item> />
<el-form-item> </el-form-item>
<el-button type="primary" <el-form-item>
class="search-template-btn" <el-button class="search-template-btn"
@click="queryTemplatePage" type="primary"
> @click="queryTemplatePage"
查询 >
</el-button> 查询
</el-form-item> </el-button>
</el-form> </el-form-item>
</el-col> </el-form>
</el-row> </div>
<el-row> <el-row>
<el-col :offset="6" :span="10"> <el-col :offset="6" :span="10">
<el-menu :default-active="queryParams.type" <el-menu :default-active="queryParams.type"
style="background-color: transparent;" mode="horizontal"
mode="horizontal" @select="(index)=>{ style="background-color: transparent;" @select="(index)=>{
this.queryParams.type=index this.queryParams.type=index
this.queryTemplatePage()}" this.queryTemplatePage()}"
> >
@ -40,7 +40,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="3"> <el-col :span="3">
<span class="tagTitle">推荐模板</span> <span class="tag-title">推荐模板</span>
</el-col> </el-col>
</el-row> </el-row>
<div class="project-grid-container"> <div class="project-grid-container">
@ -52,19 +52,19 @@
@click="createBlankTemplate" @click="createBlankTemplate"
> >
<div style="flex: 1;"> <div style="flex: 1;">
<i style="font-size: 40px; align-items: center;" class="el-icon-plus" /> <i class="el-icon-plus" style="font-size: 40px; align-items: center;" />
<p style="font-size: 14px;">创建一个空白模板</p> <p style="font-size: 14px;">创建一个空白模板</p>
</div> </div>
</div> </div>
<div v-for="template in templateList" :key="template.title" class="project-template-view"> <div v-for="template in templateList" :key="template.title" class="project-template-view">
<img style="width: 144px; height: 133px;" :src="template.coverImg"> <img :src="template.coverImg" style="width: 144px; height: 133px;">
<p class="project-template-title"> <p class="project-template-title">
{{ template.name }} {{ template.name }}
</p> </p>
<p style="color: rgba(189, 188, 188, 100); font-size: 12px; margin: 0;"> <!-- <p style="color: rgba(189, 188, 188, 100); font-size: 12px; margin: 0;">-->
{{ template.likeCount }}人喜欢 <!-- {{ template.likeCount }}人喜欢-->
<svg-icon name="like" style="width: 12px; height: 12px;" /> <!-- <svg-icon name="like" style="width: 12px; height: 12px;" />-->
</p> <!-- </p>-->
<div class="project-template-use-view"> <div class="project-template-use-view">
<div <div
class="project-template-use-view-btn" class="project-template-use-view-btn"
@ -80,15 +80,14 @@
</div> </div>
</div> </div>
</el-row> </el-row>
<el-row style="height: 20px;" />
<div> <div>
<el-pagination <el-pagination
v-if="total>10" v-if="total>10"
background
:page-size.sync="queryParams.size"
:current-page.sync="queryParams.current" :current-page.sync="queryParams.current"
layout="total, prev, pager, next" :page-size.sync="queryParams.size"
:total="total" :total="total"
background
layout="total, prev, pager, next"
@current-change="queryTemplatePage" @current-change="queryTemplatePage"
/> />
</div> </div>
@ -157,12 +156,18 @@ export default {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
align-content: center; align-content: center;
.el-pagination {
margin-top: 20px;
}
} }
.back-view { .filter-container {
display: flex; display: flex;
width: 80%; justify-content: center;
align-content: flex-start; margin-top: 20px !important;
margin: 10px; .el-input {
display: inline-block;
width: 300px !important;
}
} }
.project-grid-view { .project-grid-view {
display: flex; display: flex;
@ -170,7 +175,7 @@ export default {
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
} }
.tagTitle { .tag-title {
font-size: 20px; font-size: 20px;
border-bottom: 3px solid rgba(68, 68, 68, 100); border-bottom: 3px solid rgba(68, 68, 68, 100);
line-height: 25px; line-height: 25px;

Loading…
Cancel
Save