Commit 05a1f5c3 authored by 黄奎's avatar 黄奎

页面修改

parent f82a3521
...@@ -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',
......
<template>
<div id="q-app">
<router-view />
</div>
</template>
<script>
export default {
name: 'App'
}
</script>
<style>
@import url('~assets/css/font.css');
@import url('//at.alicdn.com/t/font_2077629_3yray8qk6mp.css');
html,
body,
#q-app {
min-height: 100vh;
min-width: 100%;
font-family: '微软雅黑', ' Microsoft YaHei', 'PingFang', 'PingFangR';
-webkit-font-smoothing: antialiased;
}
.page-body {
border-radius: 8px;
background: #FFF;
padding: 30px;
}
.page-search {
margin-bottom: 16px;
font-family: "perfectFont";
}
.page-content .q-table__title {
font-family: "perfectFont";
}
.page-content .q-table__container .scroll::-webkit-scrollbar {
width: 10px;
height: 5px;
}
.page-content .q-table__container .scroll::-webkit-scrollbar-thumb {
border-radius: 10px;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #535353;
}
.page-content .q-table__container .scroll::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 10px;
background: #EDEDED;
}
.micfont {
font-family: perfectFont !important;
}
.dialog-out-close {
background: var(--q-color-primary);
position: absolute !important;
top: 30% !important;
left: -40px !important;
width: 40px !important;
height: 40px !important;
line-height: 40px;
text-align: center;
color: #FFF;
border-top-left-radius: 4px !important;
border-bottom-left-radius: 4px !important;
cursor: pointer;
}
/***************************************************** Begin 重写ElementUI 抽屉效果 ***************************************************************/
.el-drawer__wrapper{
top: 61px !important;
}
.v-modal{
display: none !important;
}
.el-drawer__wrapper .drawerTop {
background: none !important;
border-bottom: 1px solid #f5f5f5;
}
.el-drawer__wrapper .drawerTop .drawer_Span{
font-size: 18px !important;
font-weight: 500 !important;
font-family: perfectFont !important;
}
.el-drawer__wrapper .drawerTop .icon-guanbi{
display: none !important;
}
.page-body{
padding:15px !important;
min-height: calc(100% - 30px);
margin:15px !important;
}
.q-table__top {
padding: 0 0 12px 0px !important;
}
.q-btn__wrapper .row,
.q-btn__wrapper .column,
.q-btn__wrapper .flex{
flex-wrap: nowrap !important;
}
.q-toolbar__title{
flex:unset !important;
}
button.bg-accent{
background: linear-gradient(90deg, #37ADF7, #2961FE) !important;
}
button.bg-accent:active{
background: linear-gradient(270deg, #37ADF7, #2961FE) !important;
}
/***************************************************** End 重写ElementUI 抽屉效果 ***************************************************************/
</style>
...@@ -46,3 +46,15 @@ export function quertClassPlan(data) { ...@@ -46,3 +46,15 @@ export function quertClassPlan(data) {
data data
}); });
} }
/**
* 新增修改课程安排
*/
export function setClassPlan(data) {
return request({
url: '/Class/SetClassPlan',
method: 'post',
data
});
}
...@@ -31,31 +31,43 @@ ...@@ -31,31 +31,43 @@
justify-content: space-between; justify-content: space-between;
padding: 0 20px; padding: 0 20px;
} }
.calendarTop{
.calendarTop {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size:12px; font-size: 12px;
margin-left:-7px; margin-left: -7px;
align-items: center; align-items: center;
transform: scale(0.9); transform: scale(0.9);
} }
.calendarInner{
font-size:12px; .calendarInner {
margin:-4px 0 0 -7px; font-size: 12px;
margin: -4px 0 0 -7px;
transform: scale(0.9); transform: scale(0.9);
} }
.lesson_Form .el-calendar-table .el-calendar-day{
.lesson_Form .el-calendar-table .el-calendar-day {
padding: 5px; padding: 5px;
} }
.caldendarTeacher{
.caldendarTeacher {
display: flex; display: flex;
font-size:12px; font-size: 12px;
margin-left:40px; right:3px;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-top:-2px; margin-top: -2px;
transform: scale(0.9); transform: scale(0.9);
position: absolute;
bottom:2px;
}
.calenderDialog {
width: 300px;
height: auto;
} }
</style><template> </style><template>
<div class="lesson_Form"> <div class="lesson_Form">
<div class="calenderHeader"> <div class="calenderHeader">
...@@ -67,7 +79,50 @@ ...@@ -67,7 +79,50 @@
</el-radio-group> </el-radio-group>
</div> </div>
<div> <div>
<q-btn color="primary" class="q-mr-md" icon="add" size="12px" label="新增日程" @click="addTrip()" /> <q-btn color="accent q-px-md" class="q-mr-md" icon="add" size="12px" label="新增日程" @click="isShowMenu=true">
<q-popup-proxy>
<q-banner v-if="isShowMenu">
<div class="calenderDialog">
<div style="margin:10px 0 15px 0;">新增课程安排</div>
<q-select filled stack-label option-value="TId" option-label="TeacherName" v-model="addMsg.TeacherId"
ref="Teacher_Id" :options="TeacherList" label="关联教师" :dense="false" class="col-6 q-pb-lg" emit-value
map-options />
<q-input filled v-model="addMsg.ClassDate" class="col-6 q-pb-lg" mask="date" label="开班时间">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale">
<q-date v-model="addMsg.ClassDate" @input="() => $refs.qDateProxy1.hide()" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
<q-toggle size="md" label="更多设置" left-label color="primary" :false-value="0" :true-value="1"
v-model="isSetMore" />
<template v-if="isSetMore==1">
<q-select filled stack-label option-value="RoomId" option-label="RoomName"
v-model="addMsg.ClassRoomId" ref="ClassRoomId" :options="ClassRoomList" label="关联教室" :dense="false"
class="col-6 q-pb-lg" emit-value map-options />
<div class="row wrap" style="position:relative;" v-for="(subItem,subIndex) in addMsg.PlanTimeList">
<div class="col-6">
<q-input filled stack-label maxlength="20" :dense="false" v-model="subItem.StartTime"
ref="StartTime" class="col-6 q-pr-lg q-pb-lg" label="" :rules="[val => !!val || '请填写开始时间']" />
</div>
<div class="col-6">
<q-input filled stack-label maxlength="20" :dense="false" v-model="subItem.EndTime" ref="EndTime"
class="col-6 q-pr-lg q-pb-lg" label="" :rules="[val => !!val || '请填写开始时间']" />
</div>
<q-btn v-if="subIndex==0" style="margin-left:10px;position:absolute;right:-10px;top:15px;"
@click="addStep()" size="10px" round color="primary" icon="iconfont icon-img_haha" />
</div>
</template>
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="isShowMenu=false" style="font-weight:400 !important"/>
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important" @click="saveSteps" />
</q-card-actions>
</div>
</q-banner>
</q-popup-proxy>
</q-btn>
</div> </div>
</div> </div>
<el-calendar v-model="value" id="calendar"> <el-calendar v-model="value" id="calendar">
...@@ -88,7 +143,7 @@ ...@@ -88,7 +143,7 @@
<div v-if="item.ClassDateStr==data.day"> <div v-if="item.ClassDateStr==data.day">
<div class="calendarTop"> <div class="calendarTop">
<div>{{item.RoomName}}</div> <div>{{item.RoomName}}</div>
<div><i class="iconfont icon-edit"></i></div> <div><i class="iconfont icon-edit" @click.stop="getInfo(item)"></i></div>
</div> </div>
<div class="calendarInner"> <div class="calendarInner">
<div v-for="(subItem,subIndex) in item.TimeList"> <div v-for="(subItem,subIndex) in item.TimeList">
...@@ -96,7 +151,7 @@ ...@@ -96,7 +151,7 @@
</div> </div>
</div> </div>
<div class="caldendarTeacher"> <div class="caldendarTeacher">
<div>{{item.TeacherName}}</div> <div style="margin-right:5px;">{{item.TeacherName}}</div>
<div> <div>
<q-avatar size="sm" v-if="item.UserIcon"> <q-avatar size="sm" v-if="item.UserIcon">
<img :src="item.UserIcon" /> <img :src="item.UserIcon" />
...@@ -117,7 +172,13 @@ ...@@ -117,7 +172,13 @@
<script> <script>
import { import {
quertClassPlan, quertClassPlan,
setClassPlan
} from '../../api/course/class'; } from '../../api/course/class';
import {
getTeacherDropDownList,
queryClassRoomList
} from '../../api/school/index'
export default { export default {
props: { props: {
setingObj: { setingObj: {
...@@ -130,7 +191,27 @@ ...@@ -130,7 +191,27 @@
return { return {
calendarData: [], calendarData: [],
value: new Date(), value: new Date(),
checkedDays: '月' checkedDays: '月',
TeacherList: [], //老师下拉数据
addMsg: {
ClassPlanId: 0,
ClassId: 1,
ClassDate: "",
ClassDateStr: "",
ClassRoomId: 1,
RoomName: "",
TeacherId: 1,
TeacherName: "",
UserIcon: "",
PlanTimeList: [{
ClassTimeId: 0,
StartTime: "",
EndTime: "",
}]
},
isSetMore: 1, //是否显示更多设置
ClassRoomList: [], //教室下拉数据
isShowMenu:false, //是否显示弹出
} }
}, },
created() { created() {
...@@ -139,8 +220,13 @@ ...@@ -139,8 +220,13 @@
mounted() { mounted() {
var day2 = new Date(); var day2 = new Date();
day2.setTime(day2.getTime()); day2.setTime(day2.getTime());
var s2 = day2.getFullYear()+"-" + (day2.getMonth()+1); var s2 = day2.getFullYear() + "-" + (day2.getMonth() + 1);
this.getClassPlan(s2); this.getClassPlan(s2);
this.GetTeacherList();
this.getClassRoomList();
this.addMsg.TeacherId = this.setingObj.Teacher_Id;
this.addMsg.ClassDate = this.setingObj.OpenTime;
console.log(this.setingObj, 'setingObj');
}, },
methods: { methods: {
//获取第一个字 //获取第一个字
...@@ -157,19 +243,58 @@ ...@@ -157,19 +243,58 @@
}; };
quertClassPlan(msg).then(res => { quertClassPlan(msg).then(res => {
console.log("res", res); console.log("res", res);
if(res.Code==1){ if (res.Code == 1) {
this.calendarData = res.Data; this.calendarData = res.Data;
} }
}) })
},
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
console.log(this.TeacherList, 'this.TeacherList');
}
})
},
//获取教室下拉
getClassRoomList() {
queryClassRoomList({}).then(res => {
if (res.Code == 1) {
this.ClassRoomList = res.Data;
}
})
},
//点击新增
addStep() {
var obj = {
ClassTimeId: 0,
StartTime: '',
EndTime: ''
}
this.addMsg.PlanTimeList.push(obj);
},
//保存新增修改
saveSteps(){
setClassPlan(this.addMsg).then(res => {
if (res.Code == 1) {
this.isShowMenu=false;
this.getClassPlan();
}
})
},
//点击修改
getInfo(item){
console.log(item,'数据来了');
} }
}, },
watch: { watch: {
'value': { 'value': {
handler(newValue) { handler(newValue) {
var d = new Date(newValue); var d = new Date(newValue);
var datetime=d.getFullYear() + '-' + (d.getMonth() + 1); var datetime = d.getFullYear() + '-' + (d.getMonth() + 1);
this.getClassPlan(datetime); this.getClassPlan(datetime);
console.log(datetime,'newwww'); console.log(datetime, 'newwww');
}, },
deep: true deep: true
}, },
......
<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>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</div> </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-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:body-cell-ClassName="props"> <template v-slot:body-cell-ClassName="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
......
...@@ -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: '负责人',
......
<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" :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