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

no message

parent 33590d53
...@@ -7,235 +7,282 @@ ...@@ -7,235 +7,282 @@
<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>
</q-list> </q-list>
</q-menu> </q-menu>
</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 {
components:{
teachplan,
okr,
alignView,
noticeForm,
mySchedule,
myClassmate,
work,
eventsCalendar
},
name: 'PageIndex',
data(){
return{
options:[
{label: 'OKR', value: 'one'},
],
model: 'one',
AccountType:1,
ispower:false,//是否显示备课管理
chosenMenu:5,
okrMenu:1,
//通知请求参数 export default {
noticeMsg:{ components: {
pageIndex:1, teachplan,
pageSize:1, okr,
          LookTime:"" alignView,
}, noticeForm,
isShowNotice:false, mySchedule,
noticeObj:{}, myClassmate,
TimeList:[], //存放时间作为比较 work,
} eventsCalendar
}, },
created() { name: "PageIndex",
data() {
return {
options: [{ label: "OKR", value: "one" }],
model: "one",
AccountType: 1,
ispower: false, //是否显示备课管理
chosenMenu: 5,
okrMenu: 1,
}, //通知请求参数
mounted() { noticeMsg: {
let userInfo = this.getLocalStorage(); pageIndex: 1,
this.AccountType = userInfo.AccountType pageSize: 1,
if(userInfo.AccountType && userInfo.AccountType==2){ //是否是教师1不是 2是 LookTime: ""
this.options=[ },
{label: 'OKR', value: 'one'}, isShowNotice: false,
{label: '备课管理', value: 'two'}, noticeObj: {},
]; TimeList: [] //存放时间作为比较
} };
this.ispower = false; },
if(userInfo.MenuList.length>0){ created() {},
this.getMapList(userInfo.MenuList)//判断菜单权限是否有 mounted() {
} let userInfo = this.getLocalStorage();
if(this.ispower==true){ this.AccountType = userInfo.AccountType;
this.options=[ if (userInfo.AccountType && userInfo.AccountType == 2) {
{label: 'OKR', value: 'one'}, //是否是教师1不是 2是
{label: '备课管理', value: 'two'}, this.options = [
]; { label: "OKR", value: "one" },
} { label: "备课管理", value: "two" }
var notifyTime = window.localStorage.getItem('notifyTime'); ];
if(notifyTime){ }
this.ispower = false;
if (userInfo.MenuList.length > 0) {
this.getMapList(userInfo.MenuList); //判断菜单权限是否有
}
if (this.ispower == true) {
this.options = [
{ label: "OKR", value: "one" },
{ label: "备课管理", value: "two" }
];
}
var notifyTime = window.localStorage.getItem("notifyTime");
if (notifyTime) {
this.noticeMsg.LookTime = notifyTime; this.noticeMsg.LookTime = notifyTime;
} }
this.getNoticeList(); this.getNoticeList();
},
methods: {
changeMenu(i) {
if (i == 1) {
this.okrMenu = 1;
}
this.chosenMenu = i;
}, },
methods:{ getMapList(list) {
changeMenu(i){ list.forEach(x => {
if(i==1){ if (x.MenuUrl == "/course/teacherLesson") {
this.okrMenu=1 this.ispower = true;
} }
this.chosenMenu=i if (x.SubList.length > 0) {
}, this.getMapList(x.SubList);
getMapList(list){ }
list.forEach(x=>{ });
if(x.MenuUrl == '/course/teacherLesson'){ },
this.ispower=true
}
if(x.SubList.length>0){
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){
this.TimeList.push(new Date(res.Data.PageData[0].UpdateTimeStr));
var maxDate=new Date(Math.max.apply(null,this.TimeList));
var date = new Date(maxDate);
var y = date.getFullYear();
var m = date.getMonth() + 1;
m = m < 10 ? ('0' + m) : m;
var d = date.getDate();
d = d < 10 ? ('0' + d) : d;
var notifyData = y+'-'+m+'-'+d+' '+ date.getHours() + ':' +date.getMinutes() + ':' + date.getSeconds();
localStorage.setItem("notifyTime", notifyData);
}
} }
}) if (res.Data.PageData[0] && 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));
closeNoticeForm(){ var date = new Date(maxDate);
this.isShowNotice=false; var y = date.getFullYear();
}, var m = date.getMonth() + 1;
//向后翻页 m = m < 10 ? "0" + m : m;
fathergoAfter(){ var d = date.getDate();
this.noticeMsg.pageIndex++; d = d < 10 ? "0" + d : d;
this.getNoticeList(); var notifyData =
}, y +
//往回翻页 "-" +
fathergoBefore(){ m +
this.noticeMsg.pageIndex--; "-" +
this.getNoticeList(); d +
} " " +
date.getHours() +
":" +
date.getMinutes() +
":" +
date.getSeconds();
localStorage.setItem("notifyTime", notifyData);
}
}
});
},
//关闭公告弹窗
closeNoticeForm() {
this.isShowNotice = false;
},
//向后翻页
fathergoAfter() {
this.noticeMsg.pageIndex++;
this.getNoticeList();
},
//往回翻页
fathergoBefore() {
this.noticeMsg.pageIndex--;
this.getNoticeList();
} }
} }
};
</script> </script>
<style> <style>
.homebx .box{ .homebx .box {
width: 100%; width: 100%;
height: 50px; height: 50px;
}
.homebx {
margin: 0;
}
.myscroll::-webkit-scrollbar {
display: none;
}
} .box .el-tabs__header {
.homebx { margin: 0;
margin: 0; }
} .sub-header {
.myscroll::-webkit-scrollbar { position: fixed;
display: none; height: 56px;
} top: 60px;
left: 0;
.box .el-tabs__header{ right: 0;
margin: 0; transition: top 0.3s ease;
} z-index: 95;
.sub-header{ box-shadow: 0 10px 30px 0 rgba(82, 63, 105, 0.08);
position: fixed; background-color: #fff;
height: 56px; border-top: 1px solid #ebedf3;
top: 60px; margin: 0;
left: 0; padding: 10px 20px;
right: 0; }
transition: top .3s ease; .comWorkDiv {
z-index: 95; height: 100vh;
box-shadow: 0 10px 30px 0 rgba(82,63,105,.08); }
background-color: #fff;
border-top: 1px solid #ebedf3;
margin: 0;
padding: 10px 20px;
}
.comWorkDiv{
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