Commit 15ee719a authored by 黄奎's avatar 黄奎

页面修改

parent 1fef2ed5
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
background: yellow !important; background: yellow !important;
z-index: 1 !important; z-index: 1 !important;
} }
</style> </style>
<template> <template>
<div class="page-body"> <div class="page-body">
...@@ -29,9 +28,16 @@ ...@@ -29,9 +28,16 @@
</q-field> </q-field>
</div> </div>
<div class="col-2"> <div class="col-2">
<q-select filled dense stack-label @input="GetTeacherList(),getList()" option-value="Id" option-label="Name" <template v-if="deptList&&deptList.length>1">
v-model="msg.DeptId" ref="Teacher_Id" :options="deptList" label="语种" clearable class="col-6 q-pr-lg q-pb-lg" <q-select filled dense stack-label @input="getList()" option-value="Id" option-label="Name"
emit-value map-options /> v-model="msg.DeptId" ref="DeptId" :options="deptList" label="语种" clearable class="col-6 q-pr-lg q-pb-lg"
emit-value map-options />
</template>
<template v-else>
<q-select filled dense stack-label @input="getList()" option-value="Id" option-label="Name"
v-model="msg.DeptId" ref="DeptId" :options="deptList" label="语种" class="col-6 q-pr-lg q-pb-lg" emit-value
map-options />
</template>
</div> </div>
<div class="col-2"> <div class="col-2">
<q-select filled dense stack-label @input="getList" option-value="TId" @filter="filterTeacherFn" use-input <q-select filled dense stack-label @input="getList" option-value="TId" @filter="filterTeacherFn" use-input
...@@ -324,15 +330,8 @@ ...@@ -324,15 +330,8 @@
rowsPerPage: 0, rowsPerPage: 0,
DeptId: 8, DeptId: 8,
}, },
deptList: [{ //部门列表
Id: 8, deptList: [],
Name: "日语"
},
{
Id: 14,
Name: "韩语"
},
],
teacher: 0, teacher: 0,
AllTeacherList: [], AllTeacherList: [],
TeacherList: [] //教师数据 TeacherList: [] //教师数据
...@@ -341,7 +340,8 @@ ...@@ -341,7 +340,8 @@
created() { created() {
setTimeout(() => { setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 90; this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 90;
}, 100) }, 100);
this.initDeptList();
}, },
mounted() { mounted() {
let d = new Date(); let d = new Date();
...@@ -352,7 +352,7 @@ ...@@ -352,7 +352,7 @@
if (this.$route.query.Dept_Id) { if (this.$route.query.Dept_Id) {
this.msg.DeptId = parseInt(this.$route.query.Dept_Id) this.msg.DeptId = parseInt(this.$route.query.Dept_Id)
} }
if(this.$route.query.YearStr&&this.$route.query.MonthStr){ if (this.$route.query.YearStr && this.$route.query.MonthStr) {
this.msg.YearStr = this.$route.query.YearStr; this.msg.YearStr = this.$route.query.YearStr;
this.msg.MonthStr = this.$route.query.MonthStr this.msg.MonthStr = this.$route.query.MonthStr
this.myDate = this.msg.YearStr + '-' + this.msg.MonthStr this.myDate = this.msg.YearStr + '-' + this.msg.MonthStr
...@@ -365,6 +365,32 @@ ...@@ -365,6 +365,32 @@
this.getList(); this.getList();
}, },
methods: { methods: {
//初始化部门数据
initDeptList() {
var localStorageData = window.localStorage["loginUserInfo"];
let ActionMenuList = JSON.parse(localStorageData).data.ActionMenuList;
var obj1 = {
Id: 8,
Name: "日语"
};
var obj2 = {
Id: 14,
Name: "韩语"
};
if (ActionMenuList && ActionMenuList.length > 0) {
ActionMenuList.forEach((x) => {
if (x.FunctionCode == "LookJapanese") {
this.deptList.push(obj1);
}
if (x.FunctionCode == "LookKorean") {
this.deptList.push(obj2);
}
});
}
if (this.deptList && this.deptList.length > 0) {
this.msg.DeptId = this.deptList[0].Id;
}
},
//获取教师下拉 //获取教师下拉
GetTeacherList() { GetTeacherList() {
this.msg.TeacherId = ""; this.msg.TeacherId = "";
...@@ -418,9 +444,7 @@ ...@@ -418,9 +444,7 @@
} }
} }
} }
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style>
</style> \ No newline at end of file
...@@ -2,9 +2,8 @@ ...@@ -2,9 +2,8 @@
.Sysuser_Date .el-input__inner { .Sysuser_Date .el-input__inner {
background: transparent !important; background: transparent !important;
border: 0 !important; border: 0 !important;
height:28px !important ; height: 28px !important;
} }
</style> </style>
<template> <template>
<div class="page-body"> <div class="page-body">
...@@ -20,11 +19,17 @@ ...@@ -20,11 +19,17 @@
</q-field> </q-field>
</div> </div>
<div class="col-2"> <div class="col-2">
<q-select filled dense stack-label @input="getList()" option-value="Id" option-label="Name" <template v-if="deptList&&deptList.length>1">
v-model="msg.DeptId" ref="Teacher_Id" :options="deptList" label="语种" clearable class="col-6 q-pr-lg q-pb-lg" <q-select filled dense stack-label @input="getList()" option-value="Id" option-label="Name"
emit-value map-options /> v-model="msg.DeptId" ref="DeptId" :options="deptList" label="语种" clearable class="col-6 q-pr-lg q-pb-lg"
emit-value map-options />
</template>
<template v-else>
<q-select filled dense stack-label @input="getList()" option-value="Id" option-label="Name"
v-model="msg.DeptId" ref="DeptId" :options="deptList" label="语种" class="col-6 q-pr-lg q-pb-lg" emit-value
map-options />
</template>
</div> </div>
</div> </div>
<div style="float:right;"> <div style="float:right;">
<q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;" <q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;"
...@@ -158,7 +163,8 @@ ...@@ -158,7 +163,8 @@
</q-tr> </q-tr>
<template v-slot:body-cell-DateStr="props"> <template v-slot:body-cell-DateStr="props">
<q-td :props="props"> <q-td :props="props">
<span v-if="props.row.TeacherId>0" style="color:blue;cursor:pointer;" @click="goTotal(props.row)">{{ props.row.DateStr }}</span> <span v-if="props.row.TeacherId>0" style="color:blue;cursor:pointer;"
@click="goTotal(props.row)">{{ props.row.DateStr }}</span>
<span v-else>{{props.row.DateStr}}</span> <span v-else>{{props.row.DateStr}}</span>
</q-td> </q-td>
</template> </template>
...@@ -246,7 +252,7 @@ ...@@ -246,7 +252,7 @@
import { import {
GetTeacherMonthStatic GetTeacherMonthStatic
} from '../../api/teacher/index'; } from '../../api/teacher/index';
import { import {
EduDownLoad EduDownLoad
} from "../../api/common/common"; } from "../../api/common/common";
...@@ -427,25 +433,18 @@ ...@@ -427,25 +433,18 @@
msg: { msg: {
YearStr: '', YearStr: '',
MonthStr: '', MonthStr: '',
DeptId: 8, DeptId: '',
rowsPerPage: 0, rowsPerPage: 0,
}, },
deptList: [{ deptList: [],
Id: 8, lastRow: {}
Name: "日语"
},
{
Id: 14,
Name: "韩语"
},
],
lastRow:{}
} }
}, },
created() { created() {
setTimeout(() => { setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 90; this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 90;
}, 100) }, 100)
this.initDeptList();
}, },
mounted() { mounted() {
let d = new Date(); let d = new Date();
...@@ -455,7 +454,32 @@ ...@@ -455,7 +454,32 @@
this.getList(); this.getList();
}, },
methods: { methods: {
//初始化部门数据
initDeptList() {
var localStorageData = window.localStorage["loginUserInfo"];
let ActionMenuList = JSON.parse(localStorageData).data.ActionMenuList;
var obj1 = {
Id: 8,
Name: "日语"
};
var obj2 = {
Id: 14,
Name: "韩语"
};
if (ActionMenuList && ActionMenuList.length > 0) {
ActionMenuList.forEach((x) => {
if (x.FunctionCode == "LookJapanese") {
this.deptList.push(obj1);
}
if (x.FunctionCode == "LookKorean") {
this.deptList.push(obj2);
}
});
}
if (this.deptList && this.deptList.length > 0) {
this.msg.DeptId = this.deptList[0].Id;
}
},
//下载数据 //下载数据
downloadStudentStatic() { downloadStudentStatic() {
this.loading = true; this.loading = true;
...@@ -487,7 +511,7 @@ ...@@ -487,7 +511,7 @@
}) })
}, },
//跳转页面 //跳转页面
goTotal(obj){ goTotal(obj) {
this.OpenNewUrl('/teacher/dayStatic', { this.OpenNewUrl('/teacher/dayStatic', {
TeacherId: obj.TeacherId, TeacherId: obj.TeacherId,
Dept_Id: obj.Dept_Id, Dept_Id: obj.Dept_Id,
......
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