Commit d63e1be3 by liimin

优化

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