Commit d63e1be3 by liimin

优化

1 parent e5e51dad
......@@ -24,6 +24,9 @@
border-color:rgba(255,255,255,.1)
}
.el-table{
&--medium td{
padding: 5px 0 !important;
}
margin:4px 0 !important;
}
.el-dialog{
......@@ -39,4 +42,12 @@
width: 200px;
}
}
}
.table-header{
height: 40px;
line-height: 40px;
color: #909399;
.el-col:nth-child(2){
position: relative; display: flex; justify-content: flex-end;
}
}
\ No newline at end of file
......@@ -233,7 +233,7 @@
.d2-theme-container-main {
// 主体部分分为多页面控制器 和主体
.d2-theme-container-main-header {
height: 41px;
height: 34px;
// 多页面控制器
.d2-multiple-page-control-group {
padding-right: 20px;
......@@ -247,6 +247,10 @@
}
.el-tabs__nav {
overflow: hidden;
.el-tabs__item{
height: 33px;
line-height: 33px;
}
}
}
}
......@@ -256,11 +260,15 @@
bottom: -1px;
.el-dropdown {
.el-button-group {
.el-button:first-child {
border-bottom-left-radius: 0px;
}
.el-button:last-child {
border-bottom-right-radius: 0px;
.el-button{
padding: 9px 20px;
&:first-child {
border-bottom-left-radius: 0px;
}
&:last-child {
border-bottom-right-radius: 0px;
padding: 9px 5px;
}
}
}
}
......
......@@ -280,6 +280,7 @@
}
%el-tabs__nav {
font-size: 20px;
line-height: 33px;
}
.el-tabs__nav-prev {
@extend %el-tabs__nav;
......
......@@ -21,8 +21,9 @@
<el-tab-pane
v-for="page in opened"
:key="page.fullPath"
:label="(page.meta && page.meta.title) || '未命名'"
:name="page.fullPath"/>
:name="page.fullPath">
<span slot="label"><d2-el-icon :name="page.meta.icon"/> {{(page.meta && page.meta.title) || '未命名'}}</span>
</el-tab-pane>
</el-tabs>
</div>
</div>
......
import router from '@/router'
// import setting from '@/setting.js'
import home from '@/router/routes'
import { home, localRoutes } from '@/router/routes'
// 判定是否需要缓存
const isKeepAlive = data => _.get(data, 'meta.cache', false)
const setIcon = meta => (meta.icon = localRoutes[meta.authId].icon)
export default {
namespaced: true,
state: {
......@@ -59,6 +59,7 @@ export default {
// 忽略首页
if (opened.fullPath === '/index') {
valid.push(1)
setIcon(opened.meta)
return opened
}
// 尝试在所有的支持多标签页的页面里找到 name 匹配的页面
......@@ -129,6 +130,7 @@ export default {
newTag.params = params || newTag.params
newTag.query = query || newTag.query
newTag.fullPath = fullPath || newTag.fullPath
setIcon(newTag.meta)
// 添加进当前显示的页面数组
state.opened.push(newTag)
// 如果这个页面需要缓存 将其添加到缓存设置
......@@ -410,6 +412,7 @@ export default {
} else {
if (!route.hidden) {
const { meta, name, path } = route
setIcon(meta)
pool.push({ meta, name, path })
}
}
......
......@@ -24,9 +24,9 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row style="height: 40px; line-height: 40px">
<el-col :span="12">物料列表</el-col>
<el-col :span="12" style="position: relative; display: flex; justify-content: flex-end; ">
<el-row class="table-header">
<el-col :span="12"><d2-el-icon name="s-grid"/> 物料列表</el-col>
<el-col :span="12">
<span style="margin-right: 10px;">
<auth-button
label="导出"
......@@ -48,14 +48,17 @@
:data="tableData"
v-loading="tableLoading"
border
style="margin: 20px 0;"
:highlight-current-row="true"
:stripe="true"
>
<el-table-column
align="center"
width="60px"
label="序号"
type='index'
></el-table-column>
:index="index=>index+(currentPage - 1) * pageSize + 1"
>
</el-table-column>
<el-table-column
v-for="(item, index) in tableColumns"
:key="index"
......
......@@ -46,9 +46,9 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row style="height: 40px; line-height: 40px">
<el-col :span="12">作业单列表</el-col>
<el-col :span="12" style="text-align: right">
<el-row class="table-header">
<el-col :span="12"><d2-el-icon name="s-grid"/> 作业单列表</el-col>
<el-col :span="12">
<auth-button category="Button"></auth-button>
<!-- <auth-button label="导出订单" type="" @e-auth-click="exportOrder"></auth-button> -->
</el-col>
......@@ -57,13 +57,15 @@
:data="tableData"
v-loading="tableLoading"
border
style="margin: 20px 0;"
:highlight-current-row="true"
:stripe="true"
>
<el-table-column
align="center"
width="60px"
label="序号"
type='index'
:index="index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for="(item, index) in tableColumns"
......
......@@ -42,9 +42,9 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row style="height: 40px; line-height: 40px">
<el-col :span="12">订单列表</el-col>
<el-col :span="12" style="text-align: right">
<el-row class="table-header">
<el-col :span="12"><d2-el-icon name="s-grid"/> 订单列表</el-col>
<el-col :span="12">
<auth-button category="Button"></auth-button>
</el-col>
</el-row>
......@@ -52,13 +52,15 @@
:data="tableData"
v-loading="tableLoading"
border
style="margin: 20px 0;"
:highlight-current-row="true"
:stripe="true"
>
<el-table-column
align="center"
width="60px"
label="序号"
type='index'
:index="index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for="(item, index) in tableColumns"
......
......@@ -14,20 +14,21 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row style="height: 40px; line-height: 40px">
<el-col :span="12">物料列表</el-col>
<el-row class="table-header">
<el-col :span="12"><d2-el-icon name="s-grid"/> 物料列表</el-col>
</el-row>
<el-table
:data="tableData"
v-loading="tableLoading"
border
style="margin: 20px 0;"
:stripe="true"
>
<el-table-column
align="center"
width="60px"
label="序号"
type='index'
:index="index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for="(item, index) in tableColumns"
......
......@@ -36,20 +36,22 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row style="height: 40px; line-height: 40px">
<el-col :span="12">上报日志列表</el-col>
<el-row class="table-header">
<el-col :span="12"><d2-el-icon name="s-grid"/> 上报日志列表</el-col>
</el-row>
<el-table
:data="tableData"
v-loading="tableLoading"
border
style="margin: 20px 0;"
:stripe="true"
:highlight-current-row="true"
>
<el-table-column
align="center"
width="60px"
label="序号"
type='index'
:index="index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for="(item, index) in tableColumns"
......
......@@ -45,9 +45,9 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row style="height: 40px; line-height: 40px">
<el-col :span="12">子系统列表</el-col>
<el-col :span="12" style="text-align: right">
<el-row class="table-header">
<el-col :span="12"><d2-el-icon name="s-grid"/> 子系统列表</el-col>
<el-col :span="12">
<auth-button category="Button" :data="editFormReset"></auth-button>
</el-col>
</el-row>
......@@ -55,13 +55,15 @@
:data="tableData"
v-loading="tableLoading"
border
style="margin: 20px 0;"
:stripe="true"
:highlight-current-row="true"
>
<el-table-column
align="center"
width="60px"
label="序号"
type='index'
:index="index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for="(item, index) in tableColumns"
......
......@@ -51,9 +51,9 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row style="height: 40px; line-height: 40px">
<el-col :span="12">车辆状态列表</el-col>
<el-col :span="12" style="text-align: right">
<el-row class="table-header">
<el-col :span="12"><d2-el-icon name="s-grid"/> 车辆状态列表</el-col>
<el-col :span="12">
<auth-button category="Button"></auth-button>
</el-col>
</el-row>
......@@ -61,13 +61,15 @@
:data="tableData"
v-loading="tableLoading"
border
style="margin: 20px 0;"
:stripe="true"
:highlight-current-row="true"
>
<el-table-column
align="center"
width="60px"
label="序号"
type='index'
:index="index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for="(item, index) in tableColumns"
......
......@@ -26,23 +26,25 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row style="height: 40px; line-height: 40px">
<el-col :span="12">车辆列表</el-col>
<el-col :span="12" style="text-align: right">
<el-row class="table-header">
<el-col :span="12"><d2-el-icon name="s-grid"/> 车辆列表</el-col>
<el-col :span="12">
<auth-button category="Button" :data="editFormReset"></auth-button>
</el-col>
</el-row>
<el-table
:data="tableData"
v-loading="tableLoading"
:stripe="true"
border
style="margin: 20px 0;"
:highlight-current-row="true"
>
<el-table-column
align="center"
width="60px"
label="序号"
type='index'
:index="index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for="(item, index) in tableColumns"
......
......@@ -30,20 +30,21 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row style="height: 40px; line-height: 40px">
<el-col>登录日志列表</el-col>
<el-row class="table-header">
<el-col><d2-el-icon name="s-grid"/> 登录日志列表</el-col>
</el-row>
<el-table
:data="tableData"
v-loading="tableLoading"
border
style="margin: 20px 0;"
:stripe="true"
>
<el-table-column
align="center"
width="60px"
label="序号"
type='index'
:index="index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for="(item, index) in tableColumns"
......
<!-- 权限管理 -->
<template>
<d2-container class="role">
<el-row style="height: 40px; line-height: 40px">
<el-col :span="12">角色列表</el-col>
<el-col :span="12" style="text-align: right">
<el-row class="table-header">
<el-col :span="12"><d2-el-icon name="s-grid"/> 角色列表</el-col>
<el-col :span="12">
<auth-button label="创建角色"></auth-button>
</el-col>
</el-row>
<el-table :data="tableData" v-loading="tableLoading" border style="margin: 20px 0;">
<el-table :data="tableData" v-loading="tableLoading" border :stripe="true">
<el-table-column align="center" width="60px" label="序号" type="index"></el-table-column>
<el-table-column
v-for="(item, index) in tableColumns"
......
......@@ -58,14 +58,14 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row style="height: 40px; line-height: 40px">
<el-col :span="12">用户列表</el-col>
<el-col :span="12" style="text-align: right">
<el-row class="table-header">
<el-col :span="12"><d2-el-icon name="s-grid"/> 用户列表</el-col>
<el-col :span="12" >
<auth-button category="action" label="创建用户"></auth-button>
</el-col>
</el-row>
<el-table :data="tableData" v-loading="tableLoading" border >
<el-table-column align="center" width="60px" label="序号" type="index"></el-table-column>
<el-table :data="tableData" v-loading="tableLoading" :highlight-current-row="true" border :stripe="true" >
<el-table-column align="center" width="60px" label="序号" type="index" :index="index=>index+(page.pageSize - 1) * page.pageCount + 1"></el-table-column>
<el-table-column label="用户名" prop="loginName" width="200" align="center" ></el-table-column>
<el-table-column label="角色" prop="roleName" width="140" align="center" ></el-table-column>
<el-table-column label="注册时间" prop="registerTime" width="200" align="center" ></el-table-column>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!