ADD 常用详细列表模板

This commit is contained in:
sc 2021-06-17 15:39:43 +08:00
parent fb07fb1677
commit 80c0cf7601
3 changed files with 201 additions and 12 deletions

View File

@ -21,6 +21,14 @@
.el-menu-item [class^=sc-icon-], .el-submenu [class^=sc-icon-] {margin-right: 5px;vertical-align: middle;width: 24px;text-align: center;} .el-menu-item [class^=sc-icon-], .el-submenu [class^=sc-icon-] {margin-right: 5px;vertical-align: middle;width: 24px;text-align: center;}
.el-progress__text {font-size: 12px!important;} .el-progress__text {font-size: 12px!important;}
.el-progress__text i {font-size: 14.4px!important;} .el-progress__text i {font-size: 14.4px!important;}
.el-step.is-horizontal .el-step__line {height:1px;}
.el-step__title {font-size: 14px;}
.drawerBG {background: #f6f8f9;}
.el-button+.el-dropdown {margin-left: 10px;}
.el-button-group+.el-dropdown {margin-left: 10px;}
.el-tag+.el-tag {margin-left: 10px;}
.el-button-group+.el-button-group {margin-left: 10px;}
.el-tabs__nav-wrap::after {height: 1px;}
/* 覆盖tinymce样式 */ /* 覆盖tinymce样式 */
.sceditor .tox-tinymce {border: 1px solid #DCDFE6;} .sceditor .tox-tinymce {border: 1px solid #DCDFE6;}

View File

@ -24,12 +24,13 @@
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table" :data="list" @selection-change="selectionChange"> <scTable ref="table" :data="list" @selection-change="selectionChange" stripe>
<el-table-column type="selection" width="50"></el-table-column> <el-table-column type="selection" width="50"></el-table-column>
<el-table-column label="ID" prop="id" width="100"></el-table-column> <el-table-column label="ID" prop="id" width="80"></el-table-column>
<el-table-column label="状态" prop="state" width="80"> <el-table-column label="状态" prop="state" width="60">
<template #default="scope"> <template #default="scope">
<el-badge v-if="scope.row.state=='1'" is-dot></el-badge> <em v-if="scope.row.state=='1'" class="state state-1"></em>
<em v-if="scope.row.state=='2'" class="state state-2 status-processing"></em>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="名称" prop="name" width="300"> <el-table-column label="名称" prop="name" width="300">
@ -38,15 +39,16 @@
<p>{{scope.row.subtitle}}</p> <p>{{scope.row.subtitle}}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="类型" prop="type" width="150"> <el-table-column label="类型" prop="type" width="100">
<template #default="scope"> <template #default="scope">
<el-tag>{{scope.row.type}}</el-tag> <el-tag>{{scope.row.type}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="负责人" prop="user" width="150"></el-table-column> <el-table-column label="负责人" prop="user" width="100"></el-table-column>
<el-table-column label="进度" prop="progress" width="250"> <el-table-column label="进度" prop="progress" width="250">
<template #default="scope"> <template #default="scope">
<el-progress :percentage="scope.row.progress"></el-progress> <el-progress v-if="scope.row.state=='1'" :percentage="scope.row.progress"></el-progress>
<el-progress v-if="scope.row.state=='2'" :percentage="scope.row.progress" status="exception"></el-progress>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="time" width="150"></el-table-column> <el-table-column label="创建时间" prop="time" width="150"></el-table-column>
@ -71,15 +73,20 @@
</el-main> </el-main>
</el-container> </el-container>
<el-drawer title="我是标题" v-model="info" size="100%" direction="btt" destroy-on-close> <el-drawer v-model="info" :size="800" custom-class="drawerBG" direction="rtl" destroy-on-close>
<info></info>
</el-drawer> </el-drawer>
</template> </template>
<script> <script>
import info from './info'
export default { export default {
name: 'list', name: 'list',
components: {
info
},
data() { data() {
return { return {
group: "0", group: "0",
@ -99,9 +106,9 @@
id: "5002", id: "5002",
name: "scEditor", name: "scEditor",
subtitle: "Tinymce封装的富文本编辑器", subtitle: "Tinymce封装的富文本编辑器",
state: "1", state: "2",
type: "表单", type: "表单",
progress: 10, progress: 40,
user: "Sakuya", user: "Sakuya",
time: "2010-10-10" time: "2010-10-10"
} }
@ -125,5 +132,24 @@
} }
</script> </script>
<style> <style scoped>
.state {width:8px;height:8px;background: #ddd;display: inline-block;border-radius: 50%;vertical-align: middle;}
.state-1 {background: #409EFF;}
.state-2 {background: #F56C6C;}
.status-processing {position: relative;}
.status-processing:after {position: absolute;top:0px;left:0px;width: 100%;height: 100%;border-radius: 50%;background: inherit;content: '';animation: warn 1.2s ease-in-out infinite;}
@keyframes warn {
0% {
transform: scale(0.5);
opacity: 1;
}
30% {
opacity: 1;
}
100% {
transform: scale(2);
opacity: 0;
}
}
</style> </style>

View File

@ -0,0 +1,155 @@
<template>
<el-main style="padding:0 20px;">
<el-steps :active="3" finish-status="success" align-center style="margin-bottom:40px;">
<el-step title="立项"></el-step>
<el-step title="调研"></el-step>
<el-step title="设计"></el-step>
<el-step title="开发"></el-step>
<el-step title="完成"></el-step>
</el-steps>
<div class="make">
<div class="make-left">
<el-button type="primary" size="small">主要操作</el-button>
<el-button size="small">次要操作</el-button>
<el-button size="small">次要操作</el-button>
<el-dropdown>
<el-button size="small" icon="el-icon-arrow-down"></el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item>更改状态</el-dropdown-item>
<el-dropdown-item>发送队列</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
<div class="make-right">
<el-button type="danger" plain icon="el-icon-delete"></el-button>
</div>
</div>
<el-card shadow="never" header="统计">
<sc-echarts ref="chart" height="150px" :option="option"></sc-echarts>
</el-card>
<el-card shadow="never">
<el-tabs>
<el-tab-pane label="基础信息">
<el-descriptions :column="2" border>
<el-descriptions-item label="ID">5001</el-descriptions-item>
<el-descriptions-item label="名称">scEcharts</el-descriptions-item>
<el-descriptions-item label="参与者">
<el-tag size="mini">Sakuya</el-tag>
<el-tag size="mini">Lolowan</el-tag>
</el-descriptions-item>
<el-descriptions-item label="类型">数据</el-descriptions-item>
<el-descriptions-item label="创建时间">2010-10-10</el-descriptions-item>
<el-descriptions-item label="进度">70%</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="详细信息">
<el-empty description="没有详细信息" :image-size="80"></el-empty>
</el-tab-pane>
</el-tabs>
</el-card>
<el-card shadow="never" header="日志">
<el-timeline style="padding-left: 10px;padding-top: 10px;">
<el-timeline-item v-for="(item, index) in logs" :key="index" :timestamp="item.timestamp" :color="index==0?'#409EFF':''">
<div class="log-item">
<el-avatar class="avatar" :size="24" :src="item.icon"></el-avatar>
<span class="user">{{item.user}}</span>
<p>{{item.content}}</p>
</div>
<div v-if="item.msg" class="log-msg">
<el-alert :title="item.msg" :closable="false"></el-alert>
</div>
</el-timeline-item>
</el-timeline>
</el-card>
</el-main>
</template>
<script>
import scEcharts from '@/components/scEcharts';
export default {
components: {
scEcharts
},
data() {
return {
option: {
grid: {
top: '10px'
},
tooltip: {
trigger: 'axis'
},
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
barWidth: '15px',
itemStyle: {
normal: {
barBorderRadius:[15, 15, 0, 0]
}
}
},
{
data: [110, 180, 120, 120, 60, 90, 110],
type: 'line',
smooth: true
}]
},
logs: [
{
user: 'Lolowan',
icon: 'img/avatar2.gif',
content: '完成设计',
msg: '@Sakuya 设计完成了,赶紧开发吧',
timestamp: '2021-10-13 13:41:19'
},
{
user: 'Sakuya',
icon: 'img/avatar.jpg',
content: '完成调研',
msg: '',
timestamp: '2021-10-11 22:08:30'
},
{
user: 'Sakuya',
icon: 'img/avatar.jpg',
content: '创建立项',
msg: '',
timestamp: '2021-10-10 08:31:23'
},
]
}
},
mounted() {
},
methods: {
}
}
</script>
<style scoped>
.el-card {margin-bottom: 15px;}
.make {margin-bottom: 15px;display: flex;justify-content: space-between;align-items: center;}
.log-item {display: flex;align-items: center;font-size: 13px;}
.log-item .user {color: #333;margin: 0 10px;display: inline-block;}
.log-item p {color: #666;}
.log-msg {margin-top: 10px;}
</style>