Commit fc381015 by liimin

优化

1 parent 55707e2c
......@@ -205,6 +205,11 @@
margin-top: -10px;
}
}
ul.el-menu--inline{
background: rgba(#000, .08);
border-top: 1px solid rgba(#FFF, .08);
border-bottom: 1px solid rgba(#FFF, .08);
}
}
// 菜单为空的时候显示的信息
.d2-layout-header-aside-menu-empty {
......
......@@ -48,7 +48,7 @@ export default {
.d2-container-full {
.d2-container-full__header {
position: relative;
transition: .2s linear;
transition: all .2s ease;
&.close{
height: 0;
padding: 0 20px !important;
......
......@@ -65,9 +65,5 @@ export default {
&.d2-header-switch--active {
opacity: 1;
}
&:hover {
// right: - $borderRadius;
// background-color: rgba(#000, .1);
}
}
</style>
<template>
<el-row class="table-header">
<el-col :span="12">
<d2-el-icon name="s-grid" />
{{title}}
</el-col>
<el-col :span="12">
<slot></slot>
</el-col>
</el-row>
</template>
<script>
export default {
name: 'd2-teble-header',
props: {
title: {
type: String,
required: false,
default: ''
}
}
}
</script>
......@@ -8,4 +8,5 @@ Vue.component('d2-container', d2Container)
Vue.component('d2-icon', () => import('./d2-icon'))
Vue.component('d2-el-icon', () => import('./d2-el-icon'))
Vue.component('d2-icon-svg', () => import('./d2-icon-svg/index.vue'))
Vue.component('d2-table-header', () => import('./d2-table-header/index.vue'))
Vue.component([authButton.name], authButton)
......@@ -112,8 +112,3 @@ export default {
}
}
</script>
<style lang='scss'>
.password-detail {
}
</style>
......@@ -55,7 +55,3 @@ export default {
}
}
</script>
<style>
.personal-detail {
}
</style>
......@@ -173,9 +173,6 @@ export default {
left: 300px; /*结束位置*/
}
}
.d2-theme-header-logo{
}
.logo-all{
width: 200px;
img{
......
......@@ -73,7 +73,7 @@ export default {
const find = state.pool.find(item => {
return (
item.name === opened.name &&
__oSource.some(obj => obj.authId === item.meta.authId)
__oSource.some(obj => +obj.authId === +item.meta.authId)
)
})
// 记录有效或无效信息
......@@ -262,13 +262,13 @@ export default {
*/
closeLeft({ dispatch }, { pageSelect } = {}) {
return new Promise(async resolve => {
await dispatch('do', {
await dispatch('_do', {
pageSelect,
call: currentIndex => {
return new Promise(async resolve => {
if (currentIndex > 0) {
// 删除打开的页面 并在缓存设置中删除
await dispatch('splice', { index: 1, howmany: currentIndex - 1 })
await dispatch('_splice', { index: 1, howmany: currentIndex - 1 })
}
resolve()
})
......@@ -286,12 +286,12 @@ export default {
*/
closeRight({ state, commit, dispatch }, { pageSelect } = {}) {
return new Promise(async resolve => {
await dispatch('do', {
await dispatch('_do', {
pageSelect,
call: currentIndex => {
return new Promise(async resolve => {
// 删除打开的页面 并在缓存设置中删除
await dispatch('splice', { index: currentIndex + 1 })
await dispatch('_splice', { index: currentIndex + 1 })
resolve()
})
}
......@@ -307,16 +307,16 @@ export default {
*/
closeOther({ state, commit, dispatch }, { pageSelect } = {}) {
return new Promise(async resolve => {
await dispatch('do', {
await dispatch('_do', {
pageSelect,
call: currentIndex => {
return new Promise(async resolve => {
// 删除打开的页面数据 并更新缓存设置
if (currentIndex === 0) {
await dispatch('splice', { index: 1 })
await dispatch('_splice', { index: 1 })
} else {
await dispatch('splice', { index: currentIndex + 1 })
await dispatch('splice', { index: 1, howmany: currentIndex - 1 })
await dispatch('_splice', { index: currentIndex + 1 })
await dispatch('_splice', { index: 1, howmany: currentIndex - 1 })
}
resolve()
})
......@@ -334,7 +334,7 @@ export default {
closeAll({ state, commit, dispatch }) {
return new Promise(async resolve => {
// 删除打开的页面 并在缓存设置中删除
await dispatch('splice', { index: 1 })
await dispatch('_splice', { index: 1 })
// state.opened
// .splice(1)
// .forEach(({ name }) => commit('keepAliveRemove', name))
......@@ -355,7 +355,7 @@ export default {
* @description 私有公共方法
* @param {Object} context
*/
async do({ state, commit, dispatch }, { pageSelect, call }) {
async _do({ state, commit, dispatch }, { pageSelect, call }) {
return new Promise(async resolve => {
const pageAim = pageSelect || state.current
let currentIndex = 0
......@@ -381,7 +381,7 @@ export default {
* @description 私有公共方法
* @param {Object} context
*/
splice({ state, commit }, { index, howmany }) {
_splice({ state, commit }, { index, howmany }) {
return new Promise(resolve => {
if (howmany !== undefined) {
state.opened.splice(index, howmany)
......
......@@ -24,10 +24,8 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<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;">
<d2-table-header title="物料列表">
<span style="margin-right: 10px;">
<auth-button
label="导出"
></auth-button>
......@@ -42,8 +40,7 @@
accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@change="importFile($event)" />
</auth-button>
</el-col>
</el-row>
</d2-table-header>
<el-table
:data="tableData"
v-loading="tableLoading"
......@@ -267,13 +264,11 @@ export default {
'Content-Type': 'application/x-www-form-urlencoded'
}
}).then(res => {
const { operateStatus, url } = res.data
// let url = res.data.data.url
if (operateStatus) {
notice.okTips()
const { url } = res.data
if (url) {
this.$open(url)
} else {
url && this.$open(url)
notice.errorTips()
notice.okTips()
}
document.getElementById('fileUpload').value = null
}).catch(() => {
......
......@@ -46,13 +46,7 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<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>
</el-row>
<d2-table-header title="作业单列表"><auth-button category="Button"></auth-button></d2-table-header>
<el-table
:data="tableData"
v-loading="tableLoading"
......
......@@ -6,7 +6,7 @@
:title="title"
:before-close="handleClose"
:close-on-click-modal="false"
width="520px"
width="580px"
>
<iframe width="100%" height="680px" scrolling="yes" frameborder="0" :src="pdfUrl"></iframe>
</el-dialog>
......
......@@ -42,12 +42,7 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<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>
<d2-table-header title="订单列表"><auth-button category="Button"></auth-button></d2-table-header>
<el-table
:data="tableData"
v-loading="tableLoading"
......
......@@ -14,9 +14,7 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row class="table-header">
<el-col :span="12"><d2-el-icon name="s-grid"/> 物料列表</el-col>
</el-row>
<d2-table-header title="物料列表"></d2-table-header>
<el-table
:data="tableData"
v-loading="tableLoading"
......
......@@ -36,9 +36,7 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row class="table-header">
<el-col :span="12"><d2-el-icon name="s-grid"/> 上报日志列表</el-col>
</el-row>
<d2-table-header title="上报日志列表"></d2-table-header>
<el-table
:data="tableData"
v-loading="tableLoading"
......
......@@ -45,12 +45,7 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<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>
<d2-table-header title="子系统列表"><auth-button category="Button" :data="editFormReset"></auth-button></d2-table-header>
<el-table
:data="tableData"
v-loading="tableLoading"
......
......@@ -4,7 +4,7 @@
<div class="echarts">
<el-row>
<el-col :span="24">
<span style="margin-right: 20px;">子系统类型</span>
<span style="margin-right: 20px;color:#909399"><d2-el-icon name="s-data"/> 子系统类型</span>
<el-radio-group v-model="subSystemRadio" @change="getPie">
<el-radio-button
v-for="(item, index) in baseData.subsys"
......@@ -51,12 +51,7 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<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>
<d2-table-header title="车辆状态列表"><auth-button category="Button"></auth-button></d2-table-header>
<el-table
:data="tableData"
v-loading="tableLoading"
......
......@@ -26,12 +26,7 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<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>
<d2-table-header title="车辆列表"><auth-button category="Button" :data="editFormReset"></auth-button></d2-table-header>
<el-table
:data="tableData"
v-loading="tableLoading"
......
......@@ -30,9 +30,7 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<el-row class="table-header">
<el-col><d2-el-icon name="s-grid"/> 登录日志列表</el-col>
</el-row>
<d2-table-header title="登录日志列表"></d2-table-header>
<el-table
:data="tableData"
v-loading="tableLoading"
......
<!-- 权限管理 -->
<template>
<d2-container class="role">
<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>
<d2-table-header title="角色列表"><auth-button label="创建角色"></auth-button></d2-table-header>
<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
......
......@@ -240,6 +240,7 @@ export default {
if (vaild) {
var __p = this.regForm
__p.createType = RegistType.BY_ADMIN
__p.postName = this.baseData.posts.find(post => post.confCode === __p.postCode).confValue
this.submitFunction(__p).then(res => {
const { operateStatus } = res
if (operateStatus) {
......
......@@ -58,12 +58,7 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<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>
<d2-table-header title="用户列表"><auth-button category="action" label="创建用户"></auth-button></d2-table-header>
<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>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!