Commit 1e4b91d5 authored by 罗超's avatar 罗超

no message

parent 33590d53
...@@ -7,26 +7,54 @@ ...@@ -7,26 +7,54 @@
<el-tab-pane :label="item.label" :name="item.value" :key="item.value" v-for="(item, index) in options"></el-tab-pane> <el-tab-pane :label="item.label" :name="item.value" :key="item.value" v-for="(item, index) in options"></el-tab-pane>
</el-tabs> </el-tabs>
</div> --> </div> -->
<q-btn flat @click="changeMenu(5)" :color="chosenMenu==5?'primary':'blue-grey-14'" :class="[chosenMenu==5?'text-weight-bold':'']" label="工作台"></q-btn> <q-btn
<q-btn @click="changeMenu(1)" flat :color="chosenMenu==1?'primary':'blue-grey-14'" :class="[chosenMenu==1?'text-weight-bold':'']" label="OKR 工作区"> flat
<q-menu v-if="chosenMenu==1"> @click="changeMenu(5)"
:color="chosenMenu == 5 ? 'primary' : 'blue-grey-14'"
:class="[chosenMenu == 5 ? 'text-weight-bold' : '']"
label="活动日历"
></q-btn>
<q-btn
flat
@click="changeMenu(6)"
:color="chosenMenu == 6 ? 'primary' : 'blue-grey-14'"
:class="[chosenMenu == 6 ? 'text-weight-bold' : '']"
label="工作台"
></q-btn>
<q-btn
@click="changeMenu(1)"
flat
:color="chosenMenu == 1 ? 'primary' : 'blue-grey-14'"
:class="[chosenMenu == 1 ? 'text-weight-bold' : '']"
label="OKR 工作区"
>
<q-menu v-if="chosenMenu == 1">
<q-list> <q-list>
<q-item clickable @click="okrMenu=1"> <q-item clickable @click="okrMenu = 1">
<q-item-section q-item-section avatar> <q-item-section q-item-section avatar>
<inline-svg class="svg-icon svg-icon-secondary" src="icons/svg/Text/Edit-text.svg"></inline-svg> <inline-svg
class="svg-icon svg-icon-secondary"
src="icons/svg/Text/Edit-text.svg"
></inline-svg>
</q-item-section> </q-item-section>
<q-item-section>OKR</q-item-section> <q-item-section>OKR</q-item-section>
</q-item> </q-item>
<q-separator /> <q-separator />
<q-item clickable @click="okrMenu=2"> <q-item clickable @click="okrMenu = 2">
<q-item-section q-item-section avatar> <q-item-section q-item-section avatar>
<inline-svg class="svg-icon svg-icon-secondary" src="icons/svg/General/Visible.svg"></inline-svg> <inline-svg
class="svg-icon svg-icon-secondary"
src="icons/svg/General/Visible.svg"
></inline-svg>
</q-item-section> </q-item-section>
<q-item-section>对齐视图</q-item-section> <q-item-section>对齐视图</q-item-section>
</q-item> </q-item>
<q-item clickable> <q-item clickable>
<q-item-section q-item-section avatar> <q-item-section q-item-section avatar>
<inline-svg class="svg-icon svg-icon-secondary" src="icons/svg/Shopping/Chart-pie.svg"></inline-svg> <inline-svg
class="svg-icon svg-icon-secondary"
src="icons/svg/Shopping/Chart-pie.svg"
></inline-svg>
</q-item-section> </q-item-section>
<q-item-section>数据看板</q-item-section> <q-item-section>数据看板</q-item-section>
</q-item> </q-item>
...@@ -35,56 +63,70 @@ ...@@ -35,56 +63,70 @@
</q-btn> </q-btn>
<!-- <q-btn @click="changeMenu(2)" v-if="AccountType==2 || ispower==true" flat :color="chosenMenu==2?'primary':'blue-grey-14'" :class="[chosenMenu==2?'text-weight-bold':'']" label="备课管理"> <!-- <q-btn @click="changeMenu(2)" v-if="AccountType==2 || ispower==true" flat :color="chosenMenu==2?'primary':'blue-grey-14'" :class="[chosenMenu==2?'text-weight-bold':'']" label="备课管理">
</q-btn>--> </q-btn>-->
<q-btn flat @click="changeMenu(3)" :color="chosenMenu==3?'primary':'blue-grey-14'" :class="[chosenMenu==3?'text-weight-bold':'']" label="我的排班计划"></q-btn> <q-btn
<q-btn flat @click="changeMenu(4)" v-if="AccountType==2" :color="chosenMenu==4?'primary':'blue-grey-14'" :class="[chosenMenu==4?'text-weight-bold':'']" label="我的上课计划"></q-btn> flat
<q-btn flat @click="changeMenu(6)" :color="chosenMenu==6?'primary':'blue-grey-14'" :class="[chosenMenu==6?'text-weight-bold':'']" label="活动日历"></q-btn> @click="changeMenu(3)"
:color="chosenMenu == 3 ? 'primary' : 'blue-grey-14'"
:class="[chosenMenu == 3 ? 'text-weight-bold' : '']"
label="我的排班计划"
></q-btn>
<q-btn
flat
@click="changeMenu(4)"
v-if="AccountType == 2"
:color="chosenMenu == 4 ? 'primary' : 'blue-grey-14'"
:class="[chosenMenu == 4 ? 'text-weight-bold' : '']"
label="我的上课计划"
></q-btn>
</div> </div>
<div class="bg-white col" v-if="chosenMenu==6"> <div class="bg-white col" v-if="chosenMenu == 5">
<eventsCalendar></eventsCalendar> <eventsCalendar></eventsCalendar>
</div> </div>
<div class="bg-white col" v-if="chosenMenu==5"> <div class="bg-white col" v-if="chosenMenu == 6">
<work></work> <work></work>
</div> </div>
<div v-if="chosenMenu==1" class="flex col" style="flex: 1"> <div v-if="chosenMenu == 1" class="flex col" style="flex: 1">
<okr v-if="okrMenu==1"></okr> <okr v-if="okrMenu == 1"></okr>
<align-view v-if="okrMenu==2"></align-view> <align-view v-if="okrMenu == 2"></align-view>
</div> </div>
<div v-if="chosenMenu==2" class="col comWorkDiv" style="overflow: auto"> <div v-if="chosenMenu == 2" class="col comWorkDiv" style="overflow: auto">
<teachplan></teachplan> <teachplan></teachplan>
</div> </div>
<!-- 备课管理 --> <!-- 备课管理 -->
<div v-if="chosenMenu==3" class="comWorkDiv" style="overflow: auto"> <div v-if="chosenMenu == 3" class="comWorkDiv" style="overflow: auto">
<mySchedule></mySchedule> <mySchedule></mySchedule>
</div> </div>
<!-- 我的上课计划 --> <!-- 我的上课计划 -->
<div v-if="chosenMenu==4" class="comWorkDiv" style="overflow: auto"> <div v-if="chosenMenu == 4" class="comWorkDiv" style="overflow: auto">
<myClassmate></myClassmate> <myClassmate></myClassmate>
</div> </div>
<!-- zk新增公告弹窗 --> <!-- zk新增公告弹窗 -->
<notice-form v-if="isShowNotice" @fathergoBefore="fathergoBefore" @fathergoAfter="fathergoAfter" :seting-obj="noticeObj" @close="closeNoticeForm"> <notice-form
v-if="isShowNotice"
@fathergoBefore="fathergoBefore"
@fathergoAfter="fathergoAfter"
:seting-obj="noticeObj"
@close="closeNoticeForm"
>
</notice-form> </notice-form>
</div> </div>
</template> </template>
<script> <script>
import { GetMyNoticePageList } from "../api/course/index";
import { import teachplan from "./course/teacherLesson";
GetMyNoticePageList import okr from "./okr/index";
} from '../api/course/index' import alignView from "./okr/okr-align-view";
import noticeForm from "../components/course/notice-form";
import teachplan from './course/teacherLesson' import mySchedule from "./scheduling/mySchedule";
import okr from './okr/index' import myClassmate from "./scheduling/myClassmate";
import alignView from './okr/okr-align-view' import work from "../components/work/index";
import noticeForm from '../components/course/notice-form' import eventsCalendar from "../components/stuMan/eventsCalendar";
import mySchedule from './scheduling/mySchedule'
import myClassmate from './scheduling/myClassmate';
import work from '../components/work/index'
import eventsCalendar from '../components/stuMan/eventsCalendar'
export default { export default {
components:{ components: {
teachplan, teachplan,
okr, okr,
alignView, alignView,
...@@ -94,148 +136,153 @@ ...@@ -94,148 +136,153 @@
work, work,
eventsCalendar eventsCalendar
}, },
name: 'PageIndex', name: "PageIndex",
data(){ data() {
return{ return {
options:[ options: [{ label: "OKR", value: "one" }],
{label: 'OKR', value: 'one'}, model: "one",
AccountType: 1,
], ispower: false, //是否显示备课管理
model: 'one', chosenMenu: 5,
AccountType:1, okrMenu: 1,
ispower:false,//是否显示备课管理
chosenMenu:5,
okrMenu:1,
//通知请求参数 //通知请求参数
noticeMsg:{ noticeMsg: {
pageIndex:1, pageIndex: 1,
pageSize:1, pageSize: 1,
          LookTime:"" LookTime: ""
},
isShowNotice:false,
noticeObj:{},
TimeList:[], //存放时间作为比较
}
}, },
created() { isShowNotice: false,
noticeObj: {},
TimeList: [] //存放时间作为比较
};
}, },
created() {},
mounted() { mounted() {
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
this.AccountType = userInfo.AccountType this.AccountType = userInfo.AccountType;
if(userInfo.AccountType && userInfo.AccountType==2){ //是否是教师1不是 2是 if (userInfo.AccountType && userInfo.AccountType == 2) {
this.options=[ //是否是教师1不是 2是
{label: 'OKR', value: 'one'}, this.options = [
{label: '备课管理', value: 'two'}, { label: "OKR", value: "one" },
{ label: "备课管理", value: "two" }
]; ];
} }
this.ispower = false; this.ispower = false;
if(userInfo.MenuList.length>0){ if (userInfo.MenuList.length > 0) {
this.getMapList(userInfo.MenuList)//判断菜单权限是否有 this.getMapList(userInfo.MenuList); //判断菜单权限是否有
} }
if(this.ispower==true){ if (this.ispower == true) {
this.options=[ this.options = [
{label: 'OKR', value: 'one'}, { label: "OKR", value: "one" },
{label: '备课管理', value: 'two'}, { label: "备课管理", value: "two" }
]; ];
} }
var notifyTime = window.localStorage.getItem('notifyTime'); var notifyTime = window.localStorage.getItem("notifyTime");
if(notifyTime){ if (notifyTime) {
this.noticeMsg.LookTime = notifyTime; this.noticeMsg.LookTime = notifyTime;
} }
this.getNoticeList(); this.getNoticeList();
}, },
methods:{ methods: {
changeMenu(i){ changeMenu(i) {
if(i==1){ if (i == 1) {
this.okrMenu=1 this.okrMenu = 1;
} }
this.chosenMenu=i this.chosenMenu = i;
}, },
getMapList(list){ getMapList(list) {
list.forEach(x=>{ list.forEach(x => {
if(x.MenuUrl == '/course/teacherLesson'){ if (x.MenuUrl == "/course/teacherLesson") {
this.ispower=true this.ispower = true;
} }
if(x.SubList.length>0){ if (x.SubList.length > 0) {
this.getMapList(x.SubList) this.getMapList(x.SubList);
} }
}) });
}, },
//获取获取公告弹窗数据 //获取获取公告弹窗数据
getNoticeList(){ getNoticeList() {
GetMyNoticePageList(this.noticeMsg).then(res => { GetMyNoticePageList(this.noticeMsg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.noticeObj = res.Data; this.noticeObj = res.Data;
if(res.Data.PageData.length>0){ if (res.Data.PageData.length > 0) {
this.isShowNotice=true; this.isShowNotice = true;
} }
if(res.Data.PageData[0]&&res.Data.PageData[0].UpdateTimeStr){ if (res.Data.PageData[0] && res.Data.PageData[0].UpdateTimeStr) {
this.TimeList.push(new Date(res.Data.PageData[0].UpdateTimeStr)); this.TimeList.push(new Date(res.Data.PageData[0].UpdateTimeStr));
var maxDate=new Date(Math.max.apply(null,this.TimeList)); var maxDate = new Date(Math.max.apply(null, this.TimeList));
var date = new Date(maxDate); var date = new Date(maxDate);
var y = date.getFullYear(); var y = date.getFullYear();
var m = date.getMonth() + 1; var m = date.getMonth() + 1;
m = m < 10 ? ('0' + m) : m; m = m < 10 ? "0" + m : m;
var d = date.getDate(); var d = date.getDate();
d = d < 10 ? ('0' + d) : d; d = d < 10 ? "0" + d : d;
var notifyData = y+'-'+m+'-'+d+' '+ date.getHours() + ':' +date.getMinutes() + ':' + date.getSeconds(); var notifyData =
y +
"-" +
m +
"-" +
d +
" " +
date.getHours() +
":" +
date.getMinutes() +
":" +
date.getSeconds();
localStorage.setItem("notifyTime", notifyData); localStorage.setItem("notifyTime", notifyData);
} }
} }
}) });
}, },
//关闭公告弹窗 //关闭公告弹窗
closeNoticeForm(){ closeNoticeForm() {
this.isShowNotice=false; this.isShowNotice = false;
}, },
//向后翻页 //向后翻页
fathergoAfter(){ fathergoAfter() {
this.noticeMsg.pageIndex++; this.noticeMsg.pageIndex++;
this.getNoticeList(); this.getNoticeList();
}, },
//往回翻页 //往回翻页
fathergoBefore(){ fathergoBefore() {
this.noticeMsg.pageIndex--; this.noticeMsg.pageIndex--;
this.getNoticeList(); this.getNoticeList();
} }
} }
} };
</script> </script>
<style> <style>
.homebx .box{ .homebx .box {
width: 100%; width: 100%;
height: 50px; height: 50px;
}
} .homebx {
.homebx {
margin: 0; margin: 0;
} }
.myscroll::-webkit-scrollbar { .myscroll::-webkit-scrollbar {
display: none; display: none;
} }
.box .el-tabs__header{ .box .el-tabs__header {
margin: 0; margin: 0;
} }
.sub-header{ .sub-header {
position: fixed; position: fixed;
height: 56px; height: 56px;
top: 60px; top: 60px;
left: 0; left: 0;
right: 0; right: 0;
transition: top .3s ease; transition: top 0.3s ease;
z-index: 95; z-index: 95;
box-shadow: 0 10px 30px 0 rgba(82,63,105,.08); box-shadow: 0 10px 30px 0 rgba(82, 63, 105, 0.08);
background-color: #fff; background-color: #fff;
border-top: 1px solid #ebedf3; border-top: 1px solid #ebedf3;
margin: 0; margin: 0;
padding: 10px 20px; padding: 10px 20px;
} }
.comWorkDiv{ .comWorkDiv {
height: 100vh height: 100vh;
} }
</style> </style>
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