Commit c7481cb2 authored by 罗超's avatar 罗超

优化部分功能

parent 094ba88a
...@@ -130,7 +130,6 @@ module.exports = function(ctx) { ...@@ -130,7 +130,6 @@ module.exports = function(ctx) {
'QDate', 'QDate',
'QPopupProxy', 'QPopupProxy',
'QBanner', 'QBanner',
'QScrollArea',
'QSeparator', 'QSeparator',
'QChip', 'QChip',
'QTab', 'QTab',
......
...@@ -12,7 +12,7 @@ export default { ...@@ -12,7 +12,7 @@ export default {
<style> <style>
@import url('~assets/css/font.css'); @import url('~assets/css/font.css');
@import url('//at.alicdn.com/t/font_2077629_pdphpdntjxl.css'); @import url('//at.alicdn.com/t/font_2077629_om4uj5994af.css');
html, html,
body, body,
...@@ -116,5 +116,27 @@ button.bg-accent:active{ ...@@ -116,5 +116,27 @@ button.bg-accent:active{
background: linear-gradient(270deg, #37ADF7, #2961FE) !important; background: linear-gradient(270deg, #37ADF7, #2961FE) !important;
} }
.q-avatar__content{
font-family: perfectFont !important;
font-size: 14px !important;
}
.left-menu-box .q-item.q-router-link--active,.left-menu-box .q-item--active{
background:var(--q-color-secondary) !important;
color:#f5f5f5 !important;
border-radius: 0px 4px 4px 0px !important;
margin:0 4px;
position: relative;
}
.left-menu-box .q-item.q-router-link--active::before{
position: absolute;
width: 7px;
height: 7px;
background: #FAFAFA;
border-radius: 50%;
top: calc(50% - 3.5px);
right: 20px;
display: block;
content: ' ';
}
/***************************************************** End 重写ElementUI 抽屉效果 ***************************************************************/ /***************************************************** End 重写ElementUI 抽屉效果 ***************************************************************/
</style> </style>
<template> <template>
<q-layout view="lHh Lpr lFf"> <q-layout view="lHh Lpr lFf">
<q-header bordered reveal height-hint="98" style="background-image: url('~asset/images/page/left.png') right no-repeat;"> <q-header bordered reveal height-hint="98" class="head-bg">
<q-toolbar style="height:60px;" class="q-pr-lg q-pl-lg"> <q-toolbar style="height:60px;" class="q-pr-lg q-pl-lg">
<q-avatar style="width:38px"> <q-avatar style="width:38px">
<img :src="logo"> <img :src="logo">
</q-avatar> </q-avatar>
<q-toolbar-title style="font-family:perfectFont;margin-right:50px"> <q-toolbar-title style="font-family:perfectFont;margin-right:50px">
{{name}} {{name}}
</q-toolbar-title> </q-toolbar-title>
<q-tabs v-model="tab" @input="changeNavs" inline-label <q-tabs v-model="tab" @input="changeNavs" inline-label style="margin:0 auto; font-family:perfectFont;height:60px;flex:1;justify-content: left;" class="text-white" shrink stretch v-if="userInfo">
style="margin:0 auto; font-family:perfectFont;height:60px;flex:1;justify-content: left;" class="text-white" shrink stretch v-if="userInfo"> <q-tab v-for="(x, i) in userInfo.MenuList" class="q-mr-md" :key="i" @click="setNavs(i)" :name="`navs_${i}`" :label="x.MenuName" :icon="x.MenuIcon" />
<q-tab v-for="(x, i) in userInfo.MenuList" class="q-mr-md" :key="i" @click="setNavs(i)" :name="`navs_${i}`" </q-tabs>
:label="x.MenuName" :icon="x.MenuIcon" /> <div class="q-pl-lg">
</q-tabs> <q-btn-dropdown flat color="primary" size="xs">
<div class="q-pl-lg"> <template v-slot:label>
<q-btn-dropdown flat color="primary" size="xs"> <q-icon left name="iconfont icon-message" class="text-white" style="font-size:20px;">
<template v-slot:label> <q-badge color="negative" floating>4</q-badge>
<q-icon left name="iconfont icon-message" class="text-white" style="font-size:20px;"> </q-icon>
<q-badge color="negative" floating>4</q-badge> </template>
</q-icon> <q-list bordered padding class="rounded-borders" style="max-width: 350px">
</template> <q-item-label header>Folders</q-item-label>
<q-list bordered padding class="rounded-borders" style="max-width: 350px">
<q-item-label header>Folders</q-item-label> <q-item clickable v-ripple>
<q-item-section avatar top>
<q-item clickable v-ripple> <q-avatar icon="folder" color="primary" text-color="white" />
<q-item-section avatar top> </q-item-section>
<q-avatar icon="folder" color="primary" text-color="white" />
</q-item-section> <q-item-section>
<q-item-label lines="1">Photos</q-item-label>
<q-item-section> <q-item-label caption>February 22nd, 2019</q-item-label>
<q-item-label lines="1">Photos</q-item-label> </q-item-section>
<q-item-label caption>February 22nd, 2019</q-item-label>
</q-item-section> <q-item-section side>
<q-icon name="info" color="green" />
<q-item-section side> </q-item-section>
<q-icon name="info" color="green" /> </q-item>
</q-item-section>
</q-item> <q-item clickable v-ripple>
<q-item-section avatar top>
<q-item clickable v-ripple> <q-avatar icon="folder" color="orange" text-color="white" />
<q-item-section avatar top> </q-item-section>
<q-avatar icon="folder" color="orange" text-color="white" />
</q-item-section> <q-item-section>
<q-item-label lines="1">Movies</q-item-label>
<q-item-section> <q-item-label caption>March 1st, 2019</q-item-label>
<q-item-label lines="1">Movies</q-item-label> </q-item-section>
<q-item-label caption>March 1st, 2019</q-item-label>
</q-item-section> <q-item-section side>
<q-icon name="info" />
<q-item-section side> </q-item-section>
<q-icon name="info" /> </q-item>
</q-item-section>
</q-item> <q-item clickable v-ripple>
<q-item-section avatar top>
<q-item clickable v-ripple> <q-avatar icon="folder" color="teal" text-color="white" />
<q-item-section avatar top> </q-item-section>
<q-avatar icon="folder" color="teal" text-color="white" />
</q-item-section> <q-item-section>
<q-item-label lines="1">Photos</q-item-label>
<q-item-section> <q-item-label caption>January 15th, 2019</q-item-label>
<q-item-label lines="1">Photos</q-item-label> </q-item-section>
<q-item-label caption>January 15th, 2019</q-item-label>
</q-item-section> <q-item-section side>
<q-icon name="info" />
<q-item-section side> </q-item-section>
<q-icon name="info" /> </q-item>
</q-item-section>
</q-item> <q-separator spaced />
<q-item-label header>Files</q-item-label>
<q-separator spaced />
<q-item-label header>Files</q-item-label> <q-item clickable v-ripple>
<q-item-section avatar top>
<q-item clickable v-ripple> <q-avatar icon="assignment" color="grey" text-color="white" />
<q-item-section avatar top> </q-item-section>
<q-avatar icon="assignment" color="grey" text-color="white" />
</q-item-section> <q-item-section>
<q-item-label lines="1">Expenses spreadsheet</q-item-label>
<q-item-section> <q-item-label caption>March 2nd, 2019</q-item-label>
<q-item-label lines="1">Expenses spreadsheet</q-item-label> </q-item-section>
<q-item-label caption>March 2nd, 2019</q-item-label>
</q-item-section> <q-item-section side>
<q-icon name="info" />
<q-item-section side> </q-item-section>
<q-icon name="info" /> </q-item>
</q-item-section>
</q-item> <q-item clickable v-ripple>
<q-item-section avatar top>
<q-item clickable v-ripple> <q-avatar icon="place" color="grey" text-color="white" />
<q-item-section avatar top> </q-item-section>
<q-avatar icon="place" color="grey" text-color="white" />
</q-item-section> <q-item-section>
<q-item-label lines="1">Places to visit</q-item-label>
<q-item-section> <q-item-label caption>February 22, 2019</q-item-label>
<q-item-label lines="1">Places to visit</q-item-label> </q-item-section>
<q-item-label caption>February 22, 2019</q-item-label>
</q-item-section> <q-item-section side>
<q-icon name="info" color="amber" />
<q-item-section side> </q-item-section>
<q-icon name="info" color="amber" /> </q-item>
</q-item-section>
</q-item> <q-item clickable v-ripple>
<q-item-section avatar top>
<q-item clickable v-ripple> <q-avatar icon="library_music" color="grey" text-color="white" />
<q-item-section avatar top> </q-item-section>
<q-avatar icon="library_music" color="grey" text-color="white" />
</q-item-section> <q-item-section>
<q-item-label lines="1">My favorite song</q-item-label>
<q-item-section> <q-item-label caption>Singing it all day</q-item-label>
<q-item-label lines="1">My favorite song</q-item-label> </q-item-section>
<q-item-label caption>Singing it all day</q-item-label>
</q-item-section> <q-item-section side>
<q-icon name="info" />
<q-item-section side> </q-item-section>
<q-icon name="info" /> </q-item>
</q-item-section> </q-list>
</q-item> </q-btn-dropdown>
</q-list> <q-btn-dropdown flat color="primary" size="xs" v-if="userInfo">
</q-btn-dropdown> <template v-slot:label>
<q-btn-dropdown flat color="primary" size="xs" v-if="userInfo"> <q-avatar size="28px">
<template v-slot:label> <img :src="userInfo.UserIcon">
<q-avatar size="28px"> </q-avatar>
<img :src="userInfo.UserIcon"> </template>
</q-avatar> <div class="row no-wrap q-pa-md">
</template> <div class="column">
<div class="row no-wrap q-pa-md"> <div class="text-h6 q-mb-md">Settings</div>
<div class="column"> <q-toggle label="Use Mobile Data" />
<div class="text-h6 q-mb-md">Settings</div> <q-toggle label="Bluetooth" />
<q-toggle label="Use Mobile Data" /> </div>
<q-toggle label="Bluetooth" />
</div> <q-separator vertical inset class="q-mx-lg" />
<q-separator vertical inset class="q-mx-lg" /> <div class="column items-center">
<q-avatar size="72px">
<div class="column items-center"> <img :src="userInfo.UserIcon">
<q-avatar size="72px"> </q-avatar>
<img :src="userInfo.UserIcon">
</q-avatar> <div class="text-subtitle1 q-mt-md q-mb-xs">{{userInfo.AccountName}}</div>
<div class="text-subtitle1 q-mt-md q-mb-xs">{{userInfo.AccountName}}</div> <q-btn color="primary" label="登出系统" push size="sm" v-close-popup @click="logout" />
</div>
<q-btn color="primary" label="登出系统" push size="sm" v-close-popup @click="logout" /> </div>
</div> </q-btn-dropdown>
</div> </div>
</q-btn-dropdown> </q-toolbar>
</div>
</q-toolbar>
</q-header> </q-header>
<q-page-container class="window-height"> <q-page-container class="window-height">
<div class="row items-stretch full-height"> <div class="row items-stretch full-height">
<div style="width:180px;box-shadow: 2px 0 10px 0 rgba(237,238,240,0.50);font-family:perfectFont" <div style="box-shadow: 2px 0 10px 0 rgba(237,238,240,0.50);font-family:perfectFont;" class="text-subtitle2 second-menu-bg" :style="{'width':isExpend?'40px':'180px'}" v-if="secondNavs && secondNavs.length>0">
class="text-subtitle2" v-if="secondNavs && secondNavs.length>0"> <div class="full-width left-menu-box">
<q-list> <q-list style="width:180px;overflow:hidden">
<template v-for="(x,i) in secondNavs"> <template v-for="(x,i) in secondNavs">
<q-item :to="x.MenuUrl" clickable v-ripple :active="currentPath==x.MenuUrl" v-if="x.SubList.length==0" <q-item :to="x.MenuUrl" clickable v-ripple :active="currentPath==x.MenuUrl" v-if="x.SubList.length==0" :key="i">
:key="i"> <q-item-section avatar>
<q-item-section avatar> <q-icon :name="x.MenuIcon" size="20px" />
<q-icon :name="x.MenuIcon" size="20px" /> </q-item-section>
</q-item-section> <q-item-section>{{x.MenuName}}</q-item-section>
<q-item-section>{{x.MenuName}}</q-item-section> </q-item>
</q-item> <q-expansion-item expand-separator v-else :label="x.MenuName">
<q-expansion-item expand-separator v-else :label="x.MenuName"> <q-item :to="y.MenuUrl" clickable v-ripple :active="currentPath==y.MenuUrl" v-for="(y, yi) in x.SubList" :key="yi">
<q-item :to="y.MenuUrl" clickable v-ripple :active="currentPath==y.MenuUrl" v-for="(y, yi) in x.SubList" <q-item-section avatar style="padding-right:0;min-width:40px;">
:key="yi"> <q-icon :name="y.MenuIcon" size="20px" />
<q-item-section avatar> </q-item-section>
<q-icon :name="y.MenuIcon" size="20px" /> <q-item-section>{{y.MenuName}}</q-item-section>
</q-item-section> </q-item>
<q-item-section>{{y.MenuName}}</q-item-section> </q-expansion-item>
</q-item> </template>
</q-expansion-item> </q-list>
</template> </div>
</q-list>
</div> </div>
<div class="col" style="background: #f2f4f7;"> <div class="col" style="background: #f2f4f7;">
<q-scroll-area class="fit" :thumb-style="thumbStyle" :bar-style="barStyle" visible style=""> <q-scroll-area class="fit" :thumb-style="thumbStyle" :bar-style="barStyle" visible style="">
<router-view style="margin:20px" /> <router-view style="margin:20px" />
</q-scroll-area> </q-scroll-area>
</div>
</div> </div>
</div>
</q-page-container> </q-page-container>
</q-layout> </q-layout>
</template> </template>
<script> <script>
import EssentialLink from 'components/EssentialLink.vue' import EssentialLink from 'components/EssentialLink.vue'
import { import {
mapGetters mapGetters
} from 'vuex' } from 'vuex'
import lockr from 'lockr' import lockr from 'lockr'
export default { export default {
name: 'MainLayout', name: 'MainLayout',
components: { components: {
EssentialLink EssentialLink
}, },
data() { data() {
return { return {
leftDrawerOpen: false, leftDrawerOpen: false,
//essentialLinks: linksData //essentialLinks: linksData
tab: "navs_0", tab: "navs_0",
currentPath: "", currentPath: "",
secondNavs: [], secondNavs: [],
thumbStyle: { thumbStyle: {
right: '0px', right: '0px',
borderRadius: '0px', borderRadius: '0px',
backgroundColor: '#1d1d1d', backgroundColor: '#1d1d1d',
width: '6px', width: '6px',
opacity: 1 opacity: 1
}, },
barStyle: { barStyle: {
right: '0px', right: '0px',
borderRadius: '0px', borderRadius: '0px',
backgroundColor: '#999', backgroundColor: '#999',
width: '6px', width: '6px',
opacity: 0.5 opacity: 0.5
},
contentStyle2: {
backgroundColor: 'rgba(0,0,0,0.02)',
color: '#555'
},
isExpend:false,
contentActiveStyle2: {
backgroundColor: '#eee',
color: 'black'
},
thumbStyle2: {
right: '0px',
borderRadius: '5px',
backgroundColor: '#027be3',
width: '5px',
opacity: 0.75
}
} }
}
}, },
watch: { watch: {
$route: { $route: {
handler: function (route) { handler: function (route) {
this.currentPath = route.path this.currentPath = route.path
},
immediate: true
}, },
immediate: true userInfo: {
}, handler: function (newVal) {
userInfo: { let i = this.tab.split('_')[1]
handler: function (newVal) { if (newVal && newVal.MenuList) {
let i = this.tab.split('_')[1] this.secondNavs = newVal.MenuList.length > 0 ? newVal.MenuList[i].SubList : []
if (newVal && newVal.MenuList) { }
this.secondNavs = newVal.MenuList.length > 0 ? newVal.MenuList[i].SubList : [] },
} immediate: true
}, }
immediate: true
}
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
'userInfo', 'userInfo',
'logo', 'logo',
'name' 'name'
]), ]),
}, },
mounted() { mounted() {
let i = 0 let i = 0
if (sessionStorage.getItem("current_navs")) { if (sessionStorage.getItem("current_navs")) {
i = sessionStorage.getItem("current_navs") i = sessionStorage.getItem("current_navs")
} }
this.tab = `navs_${i}` this.tab = `navs_${i}`
if (this.userInfo && this.userInfo.MenuList) { if (this.userInfo && this.userInfo.MenuList) {
this.secondNavs = this.userInfo.MenuList.length > 0 ? this.userInfo.MenuList[i].SubList : [] this.secondNavs = this.userInfo.MenuList.length > 0 ? this.userInfo.MenuList[i].SubList : []
} }
}, },
methods: { methods: {
logout() { logout() {
this.$store this.$store
.dispatch('LogOut') .dispatch('LogOut')
.then(() => { .then(() => {
this.$router.push('/login') this.$router.push('/login')
}) })
.catch(() => {}) .catch(() => {})
}, },
changeNavs(val) { changeNavs(val) {
let i = val.split('_')[1] let i = val.split('_')[1]
this.secondNavs = this.userInfo.MenuList[i].SubList this.secondNavs = this.userInfo.MenuList[i].SubList
}, },
setNavs(val) { setNavs(val) {
//防止页面数据丢失 //防止页面数据丢失
sessionStorage.setItem("current_navs", val) sessionStorage.setItem("current_navs", val)
this.tab = `navs_${val}` this.tab = `navs_${val}`
this.secondNavs = this.userInfo.MenuList[val].SubList this.secondNavs = this.userInfo.MenuList[val].SubList
this.$router.push({ this.$router.push({
path: this.userInfo.MenuList[val].MenuUrl path: this.userInfo.MenuList[val].MenuUrl
}) })
} }
}, },
} }
</script> </script>
<style> <style>
.full-width { .full-width {
height: 100%; height: 100%;
} }
.head-bg {
background-image: url('~assets/images/page/top.png');
background-position: right;
background-repeat: no-repeat;
background-size: auto 100%;
}
.second-menu-bg {
background-image: url('~assets/images/page/left.png');
background-position: bottom;
background-repeat: no-repeat;
background-size: 100% auto;
height:100%;
}
.hide-scrollbar {
scrollbar-width: 5px !important;
-ms-overflow-style: marquee, panner !important;
}
.suojin {
height: 40px;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, .5);
}
.suojin i{
font-size: 24px;
color:#636363;
}
.left-menu-box{
overflow-x:hidden ;
overflow-y:auto ;
max-height: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.3);
}
.left-menu-box::-webkit-scrollbar {
width: 4px;
height: 4px;
}
.left-menu-box::-webkit-scrollbar-thumb {
border-radius: 4px;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #bbb;
}
/* .left-menu-box::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 10px;
background: #EDEDED;
} */
@keyframes shouqidonghua {
from {
width:180px;
}
to{
width:60px;
}
}
.changeShowqidonghua{
animation: shouqidonghua 0.5s linear;
width:60px !important;
overflow-x: hidden;
}
@keyframes shouqidonghua {
from {
width:180px;
}
to{
width:60px;
}
}
.changeShowqidonghua{
animation: shouqidonghua 0.5s linear;
width:60px !important;
overflow-x: hidden;
}
</style> </style>
...@@ -11,32 +11,18 @@ ...@@ -11,32 +11,18 @@
option-value="value" option-label="label" label="校区状态" /> option-value="value" option-label="label" label="校区状态" />
</div> </div>
</div> </div>
<div class="page-option">
<!-- 原则上不能操作过三个按钮,建议不要使用查询按钮,增加用户操作次数 -->
<!-- <q-btn color="primary" outline label="立即查询" /> -->
<q-btn color="accent" class="q-mr-md" icon="add" label="新增校区" @click="EditSchool(null)" />
<q-btn-dropdown outline color="dark" label="更多">
<q-list>
<q-item clickable v-close-popup @click="onItemClick">
<!-- <q-item-section side>
<q-icon name="style" />
</q-item-section> -->
<q-item-section>
<q-item-label>导出</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="onItemClick">
<q-item-section>
<q-item-label>导入</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" title="校区信息" :data="data" :columns="columns" row-key="name"> separator="none" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">校区信息</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" icon="add" label="新增校区" @click="EditSchool(null)" />
</div>
</template>
<template v-slot:body-cell-Status="props"> <template v-slot:body-cell-Status="props">
<q-td :props="props"> <q-td :props="props">
<q-badge :color="props.value==1?'negative':'primary'" :label="props.value==1?'关闭':'正常'" /> <q-badge :color="props.value==1?'negative':'primary'" :label="props.value==1?'关闭':'正常'" />
...@@ -89,20 +75,20 @@ ...@@ -89,20 +75,20 @@
format: val => `${val}`, format: val => `${val}`,
sortable: true sortable: true
}, },
{ // {
name: 'GroupName', // name: 'GroupName',
label: '所属机构', // label: '所属机构',
field: 'GroupName', // field: 'GroupName',
align: 'left', // align: 'left',
sortable: true // sortable: true
}, // },
{ // {
name: 'DeptName', // name: 'DeptName',
label: '所属部门', // label: '所属部门',
field: 'DeptName', // field: 'DeptName',
align: 'left', // align: 'left',
sortable: true // sortable: true
}, // },
{ {
name: 'ManagerName', name: 'ManagerName',
label: '负责人', label: '负责人',
......
...@@ -69,40 +69,38 @@ ...@@ -69,40 +69,38 @@
</q-field> </q-field>
</div> </div>
</div> </div>
<div class="page-option">
<q-btn color="accent" class="q-mr-md" icon="add" label="新增员工" @click="EditManager(null)" />
<q-btn-dropdown outline color="dark" label="更多">
<q-list>
<q-item clickable v-close-popup @click="getType(1)">
<q-item-section>
<q-item-label>离职</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="resetPassWord()">
<q-item-section>
<q-item-label>重置密码</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat selection="multiple" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat selection="multiple"
:selected.sync="selected" class="sticky-right-column-table sticky-tow-column-table" separator="none" :selected.sync="selected" class="sticky-right-column-table sticky-column-table" separator="none"
title="员工管理" :data="data" :columns="columns" row-key="Id"> :data="data" :columns="columns" row-key="Id">
<template v-slot:body-cell-UserIcon="props"> <template v-slot:top="props">
<q-td auto-width :props="props"> <div class="col-2 q-table__title">员工管理</div>
<q-avatar size="md" v-if="props.value"> <q-space />
<img :src="props.value" /> <q-btn color="accent" class="q-mr-md" size="sm" icon="add" label="新增员工" @click="EditManager(null)" />
</q-avatar> <q-btn-dropdown outline color="dark" size="sm" label="更多">
<q-avatar size="md" color="teal-10" text-color="white" v-if="!props.value"> <q-list>
{{GetFirst(props.row.EmployeeName)}}</q-avatar> <q-item clickable v-close-popup @click="getType(1)">
</q-td> <q-item-section>
<q-item-label>离职</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="resetPassWord()">
<q-item-section>
<q-item-label>重置密码</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</template> </template>
<template v-slot:body-cell-EmployeeName="props"> <template v-slot:body-cell-EmployeeName="props">
<q-td :props="props"> <q-td :props="props">
<div class="text-blue cursor-pointer">{{props.value}}</div> <q-avatar rounded size="sm" v-if="props.row.UserIcon">
<img :src="props.row.UserIcon" />
</q-avatar>
<q-avatar rounded size="sm" color="teal-10" text-color="white" v-if="!props.row.UserIcon">
{{GetFirst(props.row.EmployeeName)}}</q-avatar>
<span class="text-blue cursor-pointer q-ml-sm">{{props.value}}</span>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-StuSex="props"> <template v-slot:body-cell-StuSex="props">
...@@ -137,12 +135,12 @@ ...@@ -137,12 +135,12 @@
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<div style="min-width:190px;width:100%" class="syster_qDropdown"> <div class="syster_qDropdown">
<q-btn v-if="props.row.ManagerAccount==''" flat size="xs" icon="iconfont icon-ziyuan" color="warning" <q-btn v-if="props.row.ManagerAccount==''" flat size="xs" icon="iconfont icon-ziyuan" color="warning"
style="font-weight:400" class="q-mr-xs" label="创建账号" @click="createAccount(props.row.MId)" /> style="font-weight:400" class="q-mr-xs" label="创建账号" @click="createAccount(props.row.MId)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑" <q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditManager(props.row)" /> @click="EditManager(props.row)" />
<q-btn-dropdown outline color="dark" label="更多" style="margin-left:10px;"> <q-btn-dropdown flat size="sm" color="dark" label="更多" style="margin-left:10px;">
<q-list> <q-list>
<q-item clickable v-close-popup @click="transFerJob(props.row,3)"> <q-item clickable v-close-popup @click="transFerJob(props.row,3)">
<q-item-section> <q-item-section>
...@@ -206,12 +204,7 @@ ...@@ -206,12 +204,7 @@
required: true, required: true,
label: '', label: '',
align: 'left', align: 'left',
}, { },
name: 'UserIcon',
label: '',
field: 'UserIcon',
align: 'left',
},
{ {
name: 'EmployeeName', name: 'EmployeeName',
required: true, required: true,
......
<template> <template>
<div class="page-body"> <div class="page-body">
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-col-gutter-md">
<div class="col-3"> <div class="col">
<selectSearch classStr="col-12 q-pr-lg q-pb-lg" :Data='schoolList' optionValue="SId" optionLabel="SName" <selectSearch :Data='schoolList' optionValue="SId" optionLabel="SName"
:densetype="false" :vModel="msg.School_Id" label="校区" @returnData="returnData" :useInput="true" :densetype="false" :vModel="msg.School_Id" label="校区" @returnData="returnData" :useInput="true"
:reactiveRules="false"> :reactiveRules="false">
</selectSearch> </selectSearch>
</div> </div>
<div class="col-3"> <div class="col">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.DeptName" <q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.DeptName"
label="部门名称" /> label="部门名称" />
</div> </div>
<div class="col-3"> <div class="col">
<q-select @input="resetSearch" filled stack-label option-value="value" option-label="label" <q-select @input="resetSearch" filled stack-label option-value="value" option-label="label"
v-model="msg.DeptTier" ref="DeptTier" :options="DeptTierList" label="部门层级" :dense="false" v-model="msg.DeptTier" ref="DeptTier" :options="DeptTierList" label="部门层级" :dense="false"
class="col-6 q-pr-lg q-pb-lg" emit-value map-options clearable @clear="resetSearch" /> emit-value map-options clearable @clear="resetSearch" />
</div> </div>
<div class="col-3"> <div class="col">
<selectTree v-if="DeptTreeList&&DeptTreeList.length>0" :treeData='DeptTreeList' :defaultArray="returnString" <selectTree v-if="DeptTreeList&&DeptTreeList.length>0" :treeData='DeptTreeList' :defaultArray="returnString"
nodeKey="DeptId" :multiple="false" labelKey="DeptName" childrenKey="ChildList" tipText="选择上级部门" nodeKey="DeptId" :multiple="false" labelKey="DeptName" childrenKey="ChildList" tipText="选择上级部门"
@getChild="getChild" classStr="col-6 q-pr-lg q-pb-lg"></selectTree> @getChild="getChild"></selectTree>
</div> </div>
<div class="col-3"> <div class="col">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.Status" :options="ShowOpts" <q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.Status" :options="ShowOpts"
emit-value map-options label="状态" /> emit-value map-options label="状态" />
</div> </div>
</div> </div>
<div class="page-option">
<q-btn color="accent" class="q-mr-md" icon="add" label="新增部门" @click="EditDept(null)" />
<q-btn color="accent" class="q-mr-md" icon="add" label="组织机构图" @click="gotoRelation()" />
</div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table"
separator="none" title="部门信息" :data="data" :columns="columns" row-key="name"> separator="none" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">部门信息</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增部门" @click="EditDept(null)" />
<q-btn color="secondary" flat size="sm" icon="iconfont icon-zuzhijiagou" label="组织机构图" @click="gotoRelation()" />
</div>
</template>
<template v-slot:body-cell-Status="props"> <template v-slot:body-cell-Status="props">
<q-td :props="props"> <q-td :props="props">
<q-toggle size="md" color="primary" :false-value="1" :true-value="0" v-model="props.row.Status" <q-toggle size="sm" color="secondary" :false-value="1" :true-value="0" v-model="props.row.Status"
title="注意:关闭后,分类将无法正常使用." @input="SetDeptStatus(props.row)" /> title="注意:关闭后,分类将无法正常使用." @input="SetDeptStatus(props.row)" />
</q-td> </q-td>
</template> </template>
...@@ -97,7 +101,7 @@ ...@@ -97,7 +101,7 @@
}, },
{ {
name: 'School_Id', name: 'School_Id',
label: '是否为公司', label: '所属校区',
field: 'School_Id', field: 'School_Id',
align: 'left' align: 'left'
}, },
......
...@@ -11,16 +11,21 @@ ...@@ -11,16 +11,21 @@
emit-value map-options label="状态" /> emit-value map-options label="状态" />
</div> </div>
</div> </div>
<div class="page-option">
<q-btn color="accent" class="q-mr-md" icon="add" label="新增岗位" @click="EditPost(null)" />
</div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table"
separator="none" title="岗位信息" :data="data" :columns="columns" row-key="name"> separator="none" title="岗位信息" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">部门信息</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" icon="add" label="新增岗位" @click="EditPost(null)" />
</div>
</template>
<template v-slot:body-cell-Status="props"> <template v-slot:body-cell-Status="props">
<q-td :props="props"> <q-td :props="props">
<q-toggle size="md" color="primary" :false-value="1" :true-value="0" v-model="props.row.Status" <q-toggle size="sm" color="secondary" :false-value="1" :true-value="0" v-model="props.row.Status"
title="注意:关闭后,分类将无法正常使用." @input="SetPostStatus(props.row)" /> title="注意:关闭后,分类将无法正常使用." @input="SetPostStatus(props.row)" />
</q-td> </q-td>
</template> </template>
......
...@@ -11,18 +11,24 @@ ...@@ -11,18 +11,24 @@
emit-value map-options label="状态" /> emit-value map-options label="状态" />
</div> </div>
</div> </div>
<div class="page-option">
<q-btn color="accent" class="q-mr-md" icon="add" label="新增角色" @click="EditRole(null)" />
</div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table"
separator="none" title="角色信息" :data="data" :columns="columns" row-key="name"> separator="none" title="角色信息" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">角色信息</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" icon="add" label="新增角色" @click="EditRole(null)" />
</div>
</template>
<template v-slot:body-cell-Status="props"> <template v-slot:body-cell-Status="props">
<q-td :props="props"> <q-td :props="props">
<q-toggle size="md" color="primary" :false-value="1" :true-value="0" v-model="props.row.Status" <q-toggle size="md" color="primary" :false-value="1" :true-value="0" v-model="props.row.Status"
title="注意:关闭后,分类将无法正常使用." @input="DeleteRole(props.row)" /> title="注意:关闭后,分类将无法正常使用." @input="DeleteRole(props.row)" />
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
......
...@@ -115,6 +115,7 @@ export default { ...@@ -115,6 +115,7 @@ export default {
}, },
methods: { methods: {
gologin() { gologin() {
console.log('aaaaa')
this.isLogining = true this.isLogining = true
this.$refs.account.validate() this.$refs.account.validate()
this.$refs.pwd.validate() this.$refs.pwd.validate()
...@@ -139,7 +140,7 @@ export default { ...@@ -139,7 +140,7 @@ export default {
this.isLogining = false this.isLogining = false
}) })
} else { } else {
console.log('dosomething')
} }
setTimeout(() => { setTimeout(() => {
this.isLogining = false this.isLogining = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment