Commit 28069916 by Cat
parents c2ee14f3 8bf08967
...@@ -9,12 +9,13 @@ export function getLabClassYear(query) { ...@@ -9,12 +9,13 @@ export function getLabClassYear(query) {
}); });
} }
// 获取实验室 // 获取实验室
export function getLabList(plannedStartTime, plannedEndTime) { export function getLabList(plannedStartTime, plannedEndTime, sub) {
return request({ return request({
url: `/schoolLabClassYear/getLabList?plannedStartTime=${plannedStartTime}&plannedEndTime=${plannedEndTime}`, url: `/schoolLabClassYear/getLabList?plannedStartTime=${plannedStartTime}&plannedEndTime=${plannedEndTime}&sub=${sub}`,
method: "get", method: "get",
}); });
} }
// 分配实验室 // 分配实验室
export function getAllocationLab(data) { export function getAllocationLab(data) {
return request({ return request({
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
<InfoReview ref="InfoReview" :examId="id" @sendStatus="sendStatus"></InfoReview> <InfoReview ref="InfoReview" :examId="id" @sendStatus="sendStatus"></InfoReview>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="考场分配" :disabled="disable2" name="2"> <el-tab-pane label="考场分配" :disabled="disable2" name="2">
<examRoomAllocate ref="examRoomAllocate" :examId="id" @sendStatus="sendStatus"/> <examRoomAllocate ref="examRoomAllocate" :examId="id" @sendStatus="sendStatus" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="成绩管理" :disabled="disable3" name="3"> <el-tab-pane label="成绩管理" :disabled="disable3" name="3">
<scoreManage ref="scoreManage" :examId="id" @sendStatus="sendStatus"/> <scoreManage ref="scoreManage" :examId="id" @sendStatus="sendStatus" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="返回列表" name="4"> <el-tab-pane label="返回列表" name="4">
</el-tab-pane> </el-tab-pane>
...@@ -118,9 +118,10 @@ export default { ...@@ -118,9 +118,10 @@ export default {
this.isSearch(activeName) this.isSearch(activeName)
if (activeName == '4') { if (activeName == '4') {
// this.$router.go(-1) // this.$router.go(-1)
this.$store.dispatch("tagsView/delView", this.$route); this.$store.dispatch("tagsView/delView", this.$route);
this.$router.replace({ this.$router.replace({
path: '/exam/examManage', }) path: '/teachAffairAdministration/exam/examManage',
})
} }
}, },
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<el-col :span="10"> <el-col :span="10">
<el-form-item label="学科" prop="sub"> <el-form-item label="学科" prop="sub">
<el-select v-model="form.sub" placeholder="请选择" :disabled="nowType === 2" clearable <el-select v-model="form.sub" placeholder="请选择" :disabled="nowType === 2" clearable
@change="onGradeChange" style="width: 100%;"> style="width: 100%;">
<el-option v-for="(item, index) in subList" :key="index" :label="item.dictLabel" <el-option v-for="(item, index) in subList" :key="index" :label="item.dictLabel"
:value="item.dictValue"></el-option> :value="item.dictValue"></el-option>
</el-select> </el-select>
...@@ -210,7 +210,7 @@ export default { ...@@ -210,7 +210,7 @@ export default {
experimentClassify: "", experimentClassify: "",
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}, },
classList: [], // 班级列表数据 classList: [], // 班级列表数据
subList: [],// 学科列表 subList: [],// 学科列表
...@@ -326,22 +326,20 @@ export default { ...@@ -326,22 +326,20 @@ export default {
//选择级部自动获取年级 //选择级部自动获取年级
onGradeChange() { onGradeChange() {
const selectedGrade = this.gradeList.find(grade => grade.id === this.form.gradeId); const selectedGrade = this.gradeList.find(grade => grade.id === this.form.gradeId);
if (selectedGrade) { this.classList = []; // 清空班级列表
const gradeValue = selectedGrade.gradeValue; getClass(selectedGrade.id).then(response => {
console.log('selectedGrade', selectedGrade); this.loading = false;
if (gradeValue === 1) { this.classList = response.data;
console.log('gradeValue', gradeValue); if (selectedGrade.gradeValue == 1) {
this.form.classId = this.classList.map(classItem => classItem.classId); // 默认选中所有班级的班级ID this.form.classId = this.classList.map(classItem => classItem.classId);
console.log('this.form.classId', this.form.classId); } else {
console.log('this.form.schoolExperimentPlanClassList', this.form.schoolExperimentPlanClassList); this.form.classId = []
} else if (gradeValue === 2 || gradeValue === 3) {
this.form.schoolExperimentPlanClassList = [];
console.log('gradeValue', gradeValue);
this.getClass(selectedGrade.id); // 获取班级列表
} }
} });
}, },
//删除按钮操作 //删除按钮操作
handleDelete(id) { handleDelete(id) {
this.$confirm("此操作将永久删除该数据,是否继续?", '提示', { this.$confirm("此操作将永久删除该数据,是否继续?", '提示', {
......
...@@ -118,16 +118,22 @@ ...@@ -118,16 +118,22 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="学科" prop="sub"> <el-form-item label="学科" prop="sub">
<el-input v-model="form.sub" placeholder="请输入" clearable <el-select v-model="form.sub" placeholder="请选择" :disabled="nowType === 2" clearable
:disabled="nowType === 1 || nowType === 2 || nowType === 0" /> style="width: 100%;">
<el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="30"> <el-row :gutter="30">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="实验分类" prop="experimentClassify"> <el-form-item label="实验分类" prop="experimentClassify">
<el-input v-model="form.experimentClassify" placeholder="请输入" clearable <el-select v-model="form.experimentClassify" placeholder="请选择" clearable style="width: 100%;"
:disabled="nowType === 1 || nowType === 2 || nowType === 0" /> :disabled="nowType === 2">
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -261,7 +267,7 @@ export default { ...@@ -261,7 +267,7 @@ export default {
}, },
created() { created() {
this.getSchholyear(); this.getSchholyear();
this.getExperimentName();
}, },
methods: { methods: {
...@@ -276,13 +282,18 @@ export default { ...@@ -276,13 +282,18 @@ export default {
}, },
// 获取实验名称下拉框 // 获取实验名称下拉框
getExperimentName() { getExperimentName() {
getLabplanxlk().then(response => { // 在调用getLabplanxlk方法时,将当前学年和学期信息作为参数传递进去
const params = {
schoolYear: this.form.schoolYear,
semester: this.form.semester
};
getLabplanxlk(params).then(response => {
this.tableList = response.data; this.tableList = response.data;
console.log('this.tableList', this.tableList); console.log('this.tableList', this.tableList);
this.loading = false this.loading = false
}) })
}, },
//选择实验名称自动带出信息 //选择实验名称自动带出信息
getName() { getName() {
const selectedExperiment = this.tableList.find(experiment => experiment.experimentName === this.form.experimentName); const selectedExperiment = this.tableList.find(experiment => experiment.experimentName === this.form.experimentName);
...@@ -318,6 +329,7 @@ export default { ...@@ -318,6 +329,7 @@ export default {
// 在获取到学年和学期后,调用getList方法进行表单查询 // 在获取到学年和学期后,调用getList方法进行表单查询
this.getList(); this.getList();
this.getExperimentName();
}); });
}, },
...@@ -362,6 +374,7 @@ export default { ...@@ -362,6 +374,7 @@ export default {
} }
this.nowType = type; this.nowType = type;
this.getSchholyear(); this.getSchholyear();
this.getExperimentName();
if (type != 0) { if (type != 0) {
if (row && row.id) { if (row && row.id) {
const id = row.id; const id = row.id;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="实验名称"> <el-form-item label="实验名称">
<el-input v-model="queryForm.grade" placeholder="请输入实验名称" clearable></el-input> <el-input v-model="queryForm.experimentName" placeholder="请输入实验名称" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="实验分类"> <el-form-item label="实验分类">
<el-select v-model="queryForm.experimentClassify" placeholder="请选择" clearable> <el-select v-model="queryForm.experimentClassify" placeholder="请选择" clearable>
......
...@@ -528,4 +528,4 @@ export default { ...@@ -528,4 +528,4 @@ export default {
} }
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>
\ No newline at end of file
...@@ -169,9 +169,9 @@ import { ...@@ -169,9 +169,9 @@ import {
getSchoolLabxq, getSchoolLabxq,
getClassDetails getClassDetails
} from '@/api/smartSchool/laboratoryManagement/laboratoryManagementlist' } from '@/api/smartSchool/laboratoryManagement/laboratoryManagementlist'
import { // import {
getGrade, // getGrade,
} from '@/api/smartSchool/gradeWork/laboratoryManagement/experimentalPlan' // } from '@/api/smartSchool/gradeWork/laboratoryManagement/experimentalPlan'
export default { export default {
name: 'index', name: 'index',
dicts: ['lab_state', 'lab_sub', 'experiment_classify',], dicts: ['lab_state', 'lab_sub', 'experiment_classify',],
...@@ -248,7 +248,7 @@ export default { ...@@ -248,7 +248,7 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.getGrade(); // this.getGrade();
this.getListtc(); this.getListtc();
}, },
methods: { methods: {
...@@ -274,14 +274,14 @@ export default { ...@@ -274,14 +274,14 @@ export default {
}); });
}, },
//查询级部 //查询级部
getGrade() { // getGrade() {
getGrade().then(response => { // getGrade().then(response => {
this.loading = false; // this.loading = false;
this.gradeList = response.data; // this.gradeList = response.data;
console.log("this.gradeList", this.gradeList); // console.log("this.gradeList", this.gradeList);
}); // });
}, // },
//弹窗搜索 //弹窗搜索
......
...@@ -64,13 +64,13 @@ ...@@ -64,13 +64,13 @@
<ExPagination v-show="total > 0" :total="total" :limit.sync="queryParams.pageSize" :page.sync="queryParams.pageNum" <ExPagination v-show="total > 0" :total="total" :limit.sync="queryParams.pageSize" :page.sync="queryParams.pageNum"
@pagination="getList"></ExPagination> @pagination="getList"></ExPagination>
<!-- 新增或修改采购对话框 --> <!-- 新增或修改采购对话框 -->
<el-dialog :title="title" :visible.sync="openForPur" width="55%" @close="refreshValidate"> <el-dialog :title="title" :visible.sync="openForPur" width="1000px" @close="refreshValidate">
<!-- <div> --> <!-- <div> -->
<el-form ref="formPur" :model="formPur" :disabled="formPurDisable" :rules="rules" label-width="120px" inline> <el-form ref="formPur" :model="formPur" :disabled="formPurDisable" :rules="rules" label-width="110px" inline>
<el-row> <el-row>
<el-col :span="22"> <el-col :span="22">
<el-form-item label="标题" prop="purchaseName"> <el-form-item label="标题" prop="purchaseName">
<el-input v-model="formPur.purchaseName" placeholder="请输入采购申请标题" clearable style="width: 615px"></el-input> <el-input v-model="formPur.purchaseName" placeholder="请输入采购申请标题" clearable style="width: 608px"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -79,20 +79,20 @@ ...@@ -79,20 +79,20 @@
<el-form-item label="申请部门" prop="deptId"> <el-form-item label="申请部门" prop="deptId">
<Treeselect :disabled="formPurDisable" v-model="formPur.deptId" @select="deptIdAndName" <Treeselect :disabled="formPurDisable" v-model="formPur.deptId" @select="deptIdAndName"
:options="deptOptions" :show-count="true" placeholder="请选择归属部门" :defaultExpandLevel=1 :options="deptOptions" :show-count="true" placeholder="请选择归属部门" :defaultExpandLevel=1
style="width: 193px" /> style="width: 208px" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="期望日期" prop="expectedDate"> <el-form-item label="期望日期" prop="expectedDate">
<el-date-picker v-model="formPur.expectedDate" placeholder="请选择期望日期" clearable value-format="yyyy-MM-dd" <el-date-picker v-model="formPur.expectedDate" placeholder="请选择期望日期" clearable value-format="yyyy-MM-dd"
style="width: 193px"></el-date-picker> style="width: 208px"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="批复项目" prop="budgetId"> <el-form-item label="批复项目" prop="budgetId">
<el-select v-model="formPur.budgetId" @change="getBudgetName" placeholder="请选择批复项目" style="width: 100%"> <el-select v-model="formPur.budgetId" @change="getBudgetName" placeholder="请选择批复项目" style="width: 208px">
<el-option v-for="item in budgetList" :key="item.id" :label="item.budgetName" <el-option v-for="item in budgetList" :key="item.id" :label="item.budgetName"
:value="item.id"></el-option> :value="item.id"></el-option>
</el-select> </el-select>
...@@ -100,21 +100,21 @@ ...@@ -100,21 +100,21 @@
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="采购金额(元)" prop="purchaseMoney"> <el-form-item label="采购金额(元)" prop="purchaseMoney">
<el-input :value="purchaseMoney" readonly clearable></el-input> <el-input :value="purchaseMoney" readonly clearable style="width: 208px"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="分管处室领导" prop="handUserName1"> <el-form-item label="分管处室领导" prop="handUserName1">
<el-input placeholder="请选择分管领导" v-model="formPur.handUserName1" clearable <el-input placeholder="请选择分管领导" v-model="formPur.handUserName1" clearable @click.native="selectBoss1(1)"
@click.native="selectBoss1(1)"></el-input> style="width: 208px"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="财务领导" prop="handUserName2"> <el-form-item label="财务领导" prop="handUserName2">
<el-input placeholder="请选择财务领导" v-model="formPur.handUserName2" clearable <el-input placeholder="请选择财务领导" v-model="formPur.handUserName2" clearable @click.native="selectBoss1(2)"
@click.native="selectBoss1(2)"></el-input> style="width: 208px"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
<el-col :span="22"> <el-col :span="22">
<el-form-item label="采购说明"> <el-form-item label="采购说明">
<el-input type="textarea" v-model="formPur.remark" placeholder="请输入采购说明" clearable <el-input type="textarea" v-model="formPur.remark" placeholder="请输入采购说明" clearable
style="width: 615px"></el-input> style="width: 208px"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
size="small" size="small"
row-key="id" row-key="id"
highlight-current-row highlight-current-row
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"> :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
@row-click="handleCurrentChange" @row-click="handleCurrentChange"
@selection-change="select" @selection-change="select"
@select-all="selectAll" @select-all="selectAll"
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"
@submit.native.prevent> @submit.native.prevent>
<el-form-item label="资源名称" prop="name"> <el-form-item label="资源名称" prop="name">
<el-input <el-input v-model="queryParams.name" placeholder="请输入资源名称" clearable @keyup.enter.native="handleQuery" />
v-model="queryParams.name"
placeholder="请输入资源名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
...@@ -18,96 +13,55 @@ ...@@ -18,96 +13,55 @@
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
type="primary" v-hasPermi="['system:resources:add']">新增
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:resources:add']"
>新增
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
type="success" v-hasPermi="['system:resources:edit']">修改
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:resources:edit']"
>修改
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
type="danger" v-hasPermi="['system:resources:remove']">删除
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:resources:remove']"
>删除
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
type="warning" v-hasPermi="['system:resources:export']">导出
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:resources:export']"
>导出
</el-button> </el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="resourcesList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="resourcesList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="资源名称" align="center" prop="name"> <el-table-column label="资源名称" align="center" prop="name">
<template slot-scope="scope"> <!-- <template slot-scope="scope">
<el-link type="primary" :underline="false" @click="handleClick(scope.row)">{{ scope.row.name }}</el-link> <el-link type="primary" :underline="false" @click="handleClick(scope.row)">{{ scope.row.name }}</el-link>
</template> </template> -->
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
size="mini" v-hasPermi="['system:resources:edit']">修改
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:resources:edit']"
>修改
</el-button> </el-button>
<el-button <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
size="mini" v-hasPermi="['system:resources:remove']">删除
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:resources:remove']"
>删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<ExPagination <ExPagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
v-show="total>0" @pagination="getList" />
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改学校资源库对话框 --> <!-- 添加或修改学校资源库对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px" @submit.native.prevent> <el-form ref="form" :model="form" :rules="rules" label-width="80px" @submit.native.prevent>
<el-form-item label="资源名称" prop="name"> <el-form-item label="资源名称" prop="name">
<el-input v-model="form.name" placeholder="请输入资源名称"/> <el-input v-model="form.name" placeholder="请输入资源名称" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -127,7 +81,7 @@ import { ...@@ -127,7 +81,7 @@ import {
editResource editResource
} from "@/api/smartSchool/schoolResources/resource"; } from "@/api/smartSchool/schoolResources/resource";
import {getInfo as getDetailInfo} from '@/api/smartSchool/schoolResources/resourceInfo'; import { getInfo as getDetailInfo } from '@/api/smartSchool/schoolResources/resourceInfo';
export default { export default {
name: "Resourcesbase", name: "Resourcesbase",
...@@ -162,7 +116,7 @@ export default { ...@@ -162,7 +116,7 @@ export default {
// 表单校验 // 表单校验
rules: { rules: {
name: [ name: [
{required: true, message: "资源名称不能为空", trigger: "blur"} { required: true, message: "资源名称不能为空", trigger: "blur" }
], ],
} }
}; };
...@@ -284,7 +238,7 @@ export default { ...@@ -284,7 +238,7 @@ export default {
}, },
/** 点击资源名称 */ /** 点击资源名称 */
handleClick({id}) { handleClick({ id }) {
this.$router.push({ this.$router.push({
path: '/resource/resource-details/' + id, path: '/resource/resource-details/' + id,
query: { query: {
......
...@@ -2,28 +2,13 @@ ...@@ -2,28 +2,13 @@
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="教师姓名" prop="teacherName"> <el-form-item label="教师姓名" prop="teacherName">
<el-input <el-input v-model="queryParams.teacherName" @keyup.enter.native="handleQuery" placeholder="请输入教师姓名" clearable />
v-model="queryParams.teacherName"
@keyup.enter.native="handleQuery"
placeholder="请输入教师姓名"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item label="工号" prop="teacherCode"> <el-form-item label="工号" prop="teacherCode">
<el-input <el-input v-model="queryParams.teacherCode" placeholder="请输入工号" clearable @keyup.enter.native="handleQuery" />
v-model="queryParams.teacherCode"
placeholder="请输入工号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="职务" prop="teacherPost"> <el-form-item label="职务" prop="teacherPost">
<el-input <el-input v-model="queryParams.teacherPost" placeholder="请输入职务" clearable @keyup.enter.native="handleQuery" />
v-model="queryParams.teacherPost"
placeholder="请输入职务"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
...@@ -33,38 +18,18 @@ ...@@ -33,38 +18,18 @@
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
type="primary" v-hasPermi="['system:mentor:add']"> 新 增
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:mentor:add']"
> 新 增
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
type="success" v-hasPermi="['system:mentor:edit']"> 修 改
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:mentor:edit']"
> 修 改
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
type="danger" v-hasPermi="['system:mentor:remove']"> 删 除
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:mentor:remove']"
> 删 除
</el-button> </el-button>
</el-col> </el-col>
<!-- <el-col :span="1.5">--> <!-- <el-col :span="1.5">-->
...@@ -82,64 +47,59 @@ ...@@ -82,64 +47,59 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="mentorList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="mentorList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="照片" align="center"> <el-table-column label="照片" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<ListImage :image-url="baseUrl + scope.row.picUrl"></ListImage> <ListImage :image-url="baseUrl + scope.row.picUrl"></ListImage>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="姓名" align="center" prop="teacherName"/> <el-table-column label="姓名" align="center" prop="teacherName" />
<el-table-column label="工号" align="center" prop="teacherCode"/> <el-table-column label="工号" align="center" prop="teacherCode" />
<el-table-column label="职务" align="center" prop="teacherPost"/> <el-table-column label="类型" align="center" prop="type">
<el-table-column label="电话号码" align="center" prop="teacherTel"/> <template slot-scope="scope">
<dict-tag :options="dict.type.grade_mentor_type" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="职务" align="center" prop="teacherPost" />
<el-table-column label="学科组" align="center" prop="subGroup">
<template slot-scope="scope">
<dict-tag :options="dict.type.sub_group" :value="scope.row.subGroup" />
</template>
</el-table-column>
<el-table-column label="电话号码" align="center" prop="teacherTel" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
size="mini" v-hasPermi="['system:mentor:edit']">修改
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:mentor:edit']"
>修改
</el-button> </el-button>
<el-button <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
size="mini" v-hasPermi="['system:mentor:remove']">删除
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:mentor:remove']"
>删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
v-show="total>0" @pagination="getList" />
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!--选择老师--> <!--选择老师-->
<TeacherSelect <TeacherSelect v-if="teacherSelectDialog" :openSelect.sync="teacherSelectDialog" :title="teacherSelect"
v-if="teacherSelectDialog" @getTeacherList="getTeacherList" @setTeacherInfo="setTeacherInfo"></TeacherSelect>
:openSelect.sync="teacherSelectDialog"
:title="teacherSelect"
@getTeacherList="getTeacherList"
@setTeacherInfo="setTeacherInfo"
></TeacherSelect>
<!-- 添加或修改老师与班级关系对话框 --> <!-- 添加或修改老师与班级关系对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="教师姓名" prop="teacherName"> <el-form-item label="教师姓名" prop="teacherName">
<el-input :disabled="disableTeacherName" v-model="form.teacherName" @click.native="openTeacherSelect" <el-input :disabled="disableTeacherName" v-model="form.teacherName" @click.native="openTeacherSelect"
placeholder="请输入教师姓名"/> placeholder="请输入教师姓名" />
</el-form-item> </el-form-item>
<el-form-item label="职务" prop="teacherPost"> <el-form-item label="职务" prop="teacherPost">
<el-input v-model="form.teacherPost" placeholder="请输入职务"/> <el-input v-model="form.teacherPost" placeholder="请输入职务" />
</el-form-item>
<el-form-item label="学科组" prop="subGroup">
<el-select v-model="form.subGroup" placeholder="请输入学科组" clearable style="width: 100%;">
<el-option v-for="(item, index) in dict.type.sub_group" :key="index" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -159,11 +119,12 @@ import { ...@@ -159,11 +119,12 @@ import {
updateMentor updateMentor
} from '@/api/smartSchool/teachAffairAdministration/affairClassManage/gradeMememberList'; } from '@/api/smartSchool/teachAffairAdministration/affairClassManage/gradeMememberList';
import TeacherSelect from '@/views/components/moduleComponets/TeacherSelect/index.vue' import TeacherSelect from '@/views/components/moduleComponets/TeacherSelect/index.vue'
import {listInform} from "@/api/smartSchool/teacherManage/teacherInformation"; import { listInform } from "@/api/smartSchool/teacherManage/teacherInformation";
export default { export default {
name: "gradeMemberList", name: "gradeMemberList",
components: {TeacherSelect}, dicts: ['grade_mentor_type', 'sub_group'],
components: { TeacherSelect },
data() { data() {
return { return {
// 头像显示前缀 // 头像显示前缀
...@@ -205,7 +166,7 @@ export default { ...@@ -205,7 +166,7 @@ export default {
// 表单校验 // 表单校验
rules: { rules: {
delFlag: [ delFlag: [
{required: true, message: "$comment不能为空", trigger: "blur"} { required: true, message: "$comment不能为空", trigger: "blur" }
], ],
} }
}; };
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<el-date-picker size="small" type="date" v-model="endTime" disabled> <el-date-picker size="small" type="date" v-model="endTime" disabled>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item prop="studioId" :rules="[{ required: true, message: '请选择录播室', trigger: 'change,blur' }]"> <el-form-item prop="studioName" :rules="[{ required: true, message: '请选择录播室', trigger: 'change,blur' }]">
<el-select @change="changeStudio" v-model="queryParams.studioId" placeholder="录播室"> <el-select @change="changeStudio" v-model="queryParams.studioId" placeholder="录播室">
<el-option v-for="item in options" :key="item.id" :label="item.studioName" :value="item.id"> <el-option v-for="item in options" :key="item.id" :label="item.studioName" :value="item.id">
</el-option> </el-option>
...@@ -214,6 +214,13 @@ export default { ...@@ -214,6 +214,13 @@ export default {
getAppointmentList({}).then((res) => { getAppointmentList({}).then((res) => {
this.options = res.rows; this.options = res.rows;
console.log('res', res) console.log('res', res)
if (this.options.length > 0) {
// 默认选中第一个录播室
this.queryParams.studioId = this.options[0].id;
// 立即执行搜索表单
this.fetchStudioUseData();
}
}); });
}, },
......
...@@ -37,6 +37,24 @@ public class TeacherFilesController extends BaseController ...@@ -37,6 +37,24 @@ public class TeacherFilesController extends BaseController
public TableDataInfo list(TeacherFiles teacherFiles) public TableDataInfo list(TeacherFiles teacherFiles)
{ {
startPage(); startPage();
List<TeacherFiles> list = teacherFilesService.selectTeacherFilesList(teacherFiles);
return getDataTable(list);
}
@PreAuthorize("@ss.hasPermi('teacherFiles:files:list')")
@GetMapping("/gradeList")
public TableDataInfo gradeList(TeacherFiles teacherFiles)
{
List<Long> gradeIds = teacherFilesService.getGradeId(teacherFiles.getGradeTeacherId());
if(gradeIds==null || gradeIds.size()==0){
TableDataInfo tableDataInfo = new TableDataInfo();
tableDataInfo.setCode(500);
tableDataInfo.setMsg("该用户非级部主任");
return tableDataInfo;
}
teacherFiles.setGradeId(gradeIds.get(0));
startPage();
List<TeacherFiles> list = teacherFilesService.selectTeacherFilesList(teacherFiles); List<TeacherFiles> list = teacherFilesService.selectTeacherFilesList(teacherFiles);
return getDataTable(list); return getDataTable(list);
} }
......
...@@ -41,6 +41,7 @@ public class TeacherFilesNoticeController extends BaseController ...@@ -41,6 +41,7 @@ public class TeacherFilesNoticeController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/** /**
* 导出教师档案通知列表 * 导出教师档案通知列表
*/ */
...@@ -115,10 +116,10 @@ public class TeacherFilesNoticeController extends BaseController ...@@ -115,10 +116,10 @@ public class TeacherFilesNoticeController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:remove')") @PreAuthorize("@ss.hasPermi('teacherFiles:notice:remove')")
@Log(title = "教师档案通知", businessType = BusinessType.DELETE) @Log(title = "教师档案通知", businessType = BusinessType.DELETE)
@DeleteMapping("/{id}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable("id") String id) public AjaxResult remove(@PathVariable("ids") String[] ids)
{ {
return toAjax(teacherFilesNoticeService.deleteTeacherFilesNoticeById(id)); return toAjax(teacherFilesNoticeService.deleteTeacherFilesNoticeById(ids));
} }
} }
...@@ -102,6 +102,16 @@ public class TeacherFiles extends BaseEntity ...@@ -102,6 +102,16 @@ public class TeacherFiles extends BaseEntity
@Excel(name = "状态 (1未发布 2已发布 3已填写 4已提交 5已确认 9驳回)" ) @Excel(name = "状态 (1未发布 2已发布 3已填写 4已提交 5已确认 9驳回)" )
private String state; private String state;
private Long gradeTeacherId;
public Long getGradeTeacherId() {
return gradeTeacherId;
}
public void setGradeTeacherId(Long gradeTeacherId) {
this.gradeTeacherId = gradeTeacherId;
}
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
......
...@@ -60,5 +60,7 @@ public class TeacherFilesNotice extends BaseEntity ...@@ -60,5 +60,7 @@ public class TeacherFilesNotice extends BaseEntity
*/ */
private String state; private String state;
private String teacherId;
} }
...@@ -73,4 +73,6 @@ public interface TeacherFilesMapper ...@@ -73,4 +73,6 @@ public interface TeacherFilesMapper
public int deleteTeacherFilesByNoticeId(String noticeId); public int deleteTeacherFilesByNoticeId(String noticeId);
public List<Long> getGradeId(Long teacherId);
} }
//package yangtz.cs.liu.campus.service.impl.teacherFiles;
//
//import com.ruoyi.common.config.RuoYiConfig;
//import com.ruoyi.common.core.domain.AjaxResult;
//import org.apache.poi.hssf.util.HSSFColor;
//import org.apache.poi.ss.usermodel.*;
//import org.apache.poi.ss.util.CellRangeAddress;
//import org.apache.poi.xssf.usermodel.*;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.io.File;
//import java.io.FileOutputStream;
//import java.text.ParseException;
//import java.util.*;
//
//@Service
//public class TeacherFilesExcelUtil {
//
// @Autowired
// private RuoYiConfig ruoYiConfig;
//
//
//// private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//// private SimpleDateFormat sdfS = new SimpleDateFormat("yyyy年MM月dd日");
//// private SimpleDateFormat sdfMS = new SimpleDateFormat("yyyy年MM月");
//
// public AjaxResult getExcel(String noticeId)
// throws Exception {
// // 创建新的Excel 工作簿
// XSSFWorkbook workbook = new XSSFWorkbook();
// /**
// * 主标题
// */
// XSSFCellStyle mainTitle = workbook.createCellStyle();
// //垂直居中
// mainTitle.setVerticalAlignment(VerticalAlignment.CENTER);
// //水平居中
// mainTitle.setAlignment(HorizontalAlignment.CENTER);
// Font mainfont = workbook.createFont();
// mainfont.setFontHeightInPoints((short) 28);
// mainTitle.setFont(mainfont);
//
// /**
// * 标题
// */
// XSSFCellStyle datetitle = workbook.createCellStyle();
// //垂直居中
// datetitle.setVerticalAlignment(VerticalAlignment.CENTER);
// Font datefont = workbook.createFont();
// datefont.setFontHeightInPoints((short) 14);
// datetitle.setFont(datefont);
//
// /**
// * 标题
// */
// XSSFCellStyle title = workbook.createCellStyle();
// //垂直居中
// title.setVerticalAlignment(VerticalAlignment.CENTER);
// //水平居中
// title.setAlignment(HorizontalAlignment.CENTER);
// Font font0 = workbook.createFont();
// font0.setFontHeightInPoints((short) 16);
// font0.setBold(true);
// title.setFont(font0);
// title.setBorderBottom(BorderStyle.THIN); //下边框
// title.setBorderLeft(BorderStyle.THIN);//左边框
// title.setBorderTop(BorderStyle.THIN);//上边框
// title.setBorderRight(BorderStyle.THIN);//右边框
//
// /**
// * 正常格
// */
// XSSFCellStyle cellStyle = workbook.createCellStyle();
// //垂直居中
// cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
// //水平居中
// cellStyle.setAlignment(HorizontalAlignment.CENTER);
// cellStyle.setBorderBottom(BorderStyle.THIN); //下边框
// cellStyle.setBorderLeft(BorderStyle.THIN);//左边框
// cellStyle.setBorderTop(BorderStyle.THIN);//上边框
// cellStyle.setBorderRight(BorderStyle.THIN);//右边框
// cellStyle.setWrapText(true);
// Font font = workbook.createFont();
// font.setFontHeightInPoints((short) 12);
// cellStyle.setFont(font);
//
// /**
// * 黄背景格
// */
// XSSFCellStyle yellowFont = workbook.createCellStyle();
// yellowFont.setWrapText(true);
// yellowFont.setFillForegroundColor(HSSFColor.HSSFColorPredefined.GOLD.getIndex());
// yellowFont.setFillPattern(FillPatternType.SOLID_FOREGROUND);
// //垂直居中
// yellowFont.setVerticalAlignment(VerticalAlignment.CENTER);
// //水平居中
// yellowFont.setAlignment(HorizontalAlignment.CENTER);
// yellowFont.setBorderBottom(BorderStyle.THIN); //下边框
// yellowFont.setBorderLeft(BorderStyle.THIN);//左边框
// yellowFont.setBorderTop(BorderStyle.THIN);//上边框
// yellowFont.setBorderRight(BorderStyle.THIN);//右边框
// yellowFont.setFont(font);
//
// /**
// * 红字体格
// */
// XSSFCellStyle redFont = workbook.createCellStyle();
// //垂直居中
// redFont.setVerticalAlignment(VerticalAlignment.CENTER);
// //水平居中
// redFont.setAlignment(HorizontalAlignment.CENTER);
// Font font1 = workbook.createFont();
// font1.setColor(HSSFColor.HSSFColorPredefined.DARK_RED.getIndex());
// font1.setFontHeightInPoints((short) 12);
// redFont.setFont(font1);
// redFont.setBorderBottom(BorderStyle.THIN); //下边框
// redFont.setBorderLeft(BorderStyle.THIN);//左边框
// redFont.setBorderTop(BorderStyle.THIN);//上边框
// redFont.setBorderRight(BorderStyle.THIN);//右边框
//
// List<Long> depaList = getDepaList(request.getDepartment());
// /**
// * 时间集合
// */
// List<AttendanceDatePoi> dateDes = getDateDes(request.getStartTime(), request.getEndTime());
//
// for (int t = 0; t < dateDes.size(); t++) {
//
// Calendar calendar = Calendar.getInstance();
// calendar.setTime(dateDes.get(t).getStartDate());
// int actualMaximum = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
// int month = calendar.get(Calendar.MONTH);
// int year = calendar.get(Calendar.YEAR);
//
// XSSFSheet sheet = workbook.createSheet();
// workbook.setSheetName(t, dateDes.get(t).getMonth());
// /**
// * 第一行
// */
// XSSFRow row0 = sheet.createRow(0);
// row0.setHeightInPoints(51);
// sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 4 + actualMaximum));
// XSSFCell cell0 = row0.createCell(0);
// cell0.setCellStyle(mainTitle);
// cell0.setCellValue("考勤表");
//
// /**
// * 第二行
// */
// XSSFRow row1 = sheet.createRow(1);
// sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 4));
// XSSFCell cel1 = row1.createCell(0);
// cel1.setCellStyle(datetitle);
// cel1.setCellValue(sdfS.format(dateDes.get(t).getStartDate()) + "-" + sdfS.format(dateDes.get(t).getEndDate()));
//
// XSSFCell cel22 = row1.createCell(actualMaximum - 11);
// cel22.setCellValue("√");
// XSSFCell cel33 = row1.createCell(actualMaximum - 10);
// cel33.setCellValue("出勤");
// XSSFCell cel2 = row1.createCell(actualMaximum - 9);
// cel2.setCellValue("●");
// XSSFCell cel3 = row1.createCell(actualMaximum - 8);
// cel3.setCellValue("未签到");
// XSSFCell cel4 = row1.createCell(actualMaximum - 7);
// cel4.setCellValue("□");
// XSSFCell cel5 = row1.createCell(actualMaximum - 6);
// cel5.setCellValue("事假");
// XSSFCell cel6 = row1.createCell(actualMaximum - 5);
// cel6.setCellValue("☆");
// XSSFCell cel7 = row1.createCell(actualMaximum - 4);
// cel7.setCellValue("节假日");
// XSSFCell cel8 = row1.createCell(actualMaximum - 3);
// cel8.setCellValue("△");
// XSSFCell cel9 = row1.createCell(actualMaximum - 2);
// cel9.setCellValue("迟到");
// XSSFCell cel10 = row1.createCell(actualMaximum - 1);
// cel10.setCellValue("○");
// XSSFCell cel11 = row1.createCell(actualMaximum);
// cel11.setCellValue("早退");
// XSSFCell cel12 = row1.createCell(actualMaximum + 1);
// cel12.setCellValue("×");
// XSSFCell cel13 = row1.createCell(actualMaximum + 2);
// cel13.setCellValue("旷工");
// XSSFCell cel14 = row1.createCell(actualMaximum + 3);
// cel14.setCellValue("#");
// XSSFCell cel15 = row1.createCell(actualMaximum + 4);
// cel15.setCellValue("外勤");
// /**
// * 第三行
// */
// XSSFRow row2 = sheet.createRow(2);
// XSSFCell cell = row2.createCell(0);
// cell.setCellValue("序号");
// cell.setCellStyle(title);
// sheet.setColumnWidth(0, 34 * 45);
//
//
// XSSFCell cell1 = row2.createCell(1);
// cell1.setCellValue("姓名");
// cell1.setCellStyle(title);
// sheet.setColumnWidth(1, 34 * 65);
//
// XSSFCell cell2 = row2.createCell(2);
// cell2.setCellValue("科室名");
// cell2.setCellStyle(title);
// sheet.setColumnWidth(2, 34 * 75);
//
// XSSFCell cell3 = row2.createCell(3);
// cell3.setCellValue("签到异常天数");
// cell3.setCellStyle(title);
// sheet.setColumnWidth(3, 34 * 130);
//
// XSSFCell cell4 = row2.createCell(4);
// cell4.setCellValue("事假");
// cell4.setCellStyle(title);
// sheet.setColumnWidth(4, 34 * 45);
//
// for (int i = 1; i <= actualMaximum; i++) {
// XSSFCell cell5 = row2.createCell(4 + i);
// cell5.setCellValue(i);
// cell5.setCellStyle(title);
// sheet.setColumnWidth(4 + i, 34 * 34);
// }
//
// /**
// * 职工集合
// */
// int x = 3;
// int id = 1;
// for (Long depaid : depaList) {
// System.out.println("查询"+depaid);
// List<XxdjEmployees> xxdjEmployeesList = employeesMapper.SelectByDepartment(String.valueOf(depaid));
// System.out.println("职工集合查询"+xxdjEmployeesList);
// Dept dept = deptMapper.selectDeptById(depaid);
// for (XxdjEmployees xxdjEmployees : xxdjEmployeesList) {
// XSSFRow xrow1 = sheet.createRow(x);
// XSSFRow xrow2 = sheet.createRow(x + 1);
// XSSFRow xrow3 = sheet.createRow(x + 2);
// XSSFRow xrow4 = sheet.createRow(x + 3);
// //序号
// XSSFCell xcell0 = xrow1.createCell(0);
// XSSFCell x2cell0 = xrow2.createCell(0);
// XSSFCell x3cell0 = xrow3.createCell(0);
// XSSFCell x4cell0 = xrow4.createCell(0);
// xcell0.setCellStyle(cellStyle);
// x2cell0.setCellStyle(cellStyle);
// x3cell0.setCellStyle(cellStyle);
// x4cell0.setCellStyle(cellStyle);
// xcell0.setCellValue(id);
// //姓名
// XSSFCell xcell1 = xrow1.createCell(1);
// XSSFCell x2cell1 = xrow2.createCell(1);
// XSSFCell x3cell1 = xrow3.createCell(1);
// XSSFCell x4cell1 = xrow4.createCell(1);
// xcell1.setCellStyle(cellStyle);
// x2cell1.setCellStyle(cellStyle);
// x3cell1.setCellStyle(cellStyle);
// x4cell1.setCellStyle(cellStyle);
// xcell1.setCellValue(xxdjEmployees.getName());
// //科室名
// XSSFCell xcell2 = xrow1.createCell(2);
// XSSFCell x2cell2 = xrow2.createCell(2);
// XSSFCell x3cell2 = xrow3.createCell(2);
// XSSFCell x4cell2 = xrow4.createCell(2);
// xcell2.setCellStyle(cellStyle);
// x2cell2.setCellStyle(cellStyle);
// x3cell2.setCellStyle(cellStyle);
// x4cell2.setCellStyle(cellStyle);
// xcell2.setCellValue(dept.getDeptName());
// //签到异常天数
// XSSFCell xcell3 = xrow1.createCell(3);
// XSSFCell x2cell3 = xrow2.createCell(3);
// XSSFCell x3cell3 = xrow3.createCell(3);
// XSSFCell x4cell3 = xrow4.createCell(3);
// xcell3.setCellStyle(cellStyle);
// x2cell3.setCellStyle(cellStyle);
// x3cell3.setCellStyle(cellStyle);
// x4cell3.setCellStyle(cellStyle);
// //事假
// XSSFCell xcell4 = xrow1.createCell(4);
// XSSFCell x2cell4 = xrow2.createCell(4);
// XSSFCell x3cell4 = xrow3.createCell(4);
// XSSFCell x4cell4 = xrow4.createCell(4);
// xcell4.setCellStyle(redFont);
// x2cell4.setCellStyle(redFont);
// x3cell4.setCellStyle(redFont);
// x4cell4.setCellStyle(redFont);
//
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 0, 0));
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 1, 1));
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 2, 2));
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 3, 3));
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 4, 4));
//
// String idcard = xxdjEmployees.getIdcard();
// if (idcard != null && !"".equals(idcard)) {
// Map map = new HashMap();
// map.put("idCard", idcard);
// map.put("startDay", sdf.format(dateDes.get(t).getStartDate()));
// map.put("endDay", sdf.format(dateDes.get(t).getEndDate()));
// List<XxdjAttendance> xxdjAttendances = attendanceMapper.selectMonth(map);
// Map<String, XxdjAttendance> attendanceMap = new HashMap();
// for (XxdjAttendance xxdjAttendance : xxdjAttendances) {
// attendanceMap.put(xxdjAttendance.getAttendanceDay(), xxdjAttendance);
// }
// int leaveDate = 0;
// int errorDate = 0;
// for (int i = 1; i <= actualMaximum; i++) {
// XSSFCell xcell5 = xrow1.createCell(4 + i);
// XSSFCell x2cell5 = xrow2.createCell(4 + i);
// XSSFCell x3cell5 = xrow3.createCell(4 + i);
// XSSFCell x4cell5 = xrow4.createCell(4 + i);
// Calendar xcalendar = Calendar.getInstance();
// xcalendar.set(year, month, i);
// int weekDay = xcalendar.get(Calendar.DAY_OF_WEEK);
// if (weekDay == 7 || weekDay == 1) {
// xcell5.setCellStyle(yellowFont);
// x2cell5.setCellStyle(yellowFont);
// x3cell5.setCellStyle(yellowFont);
// x4cell5.setCellStyle(yellowFont);
// } else {
// xcell5.setCellStyle(cellStyle);
// x2cell5.setCellStyle(cellStyle);
// x3cell5.setCellStyle(cellStyle);
// x4cell5.setCellStyle(cellStyle);
// }
// XxdjAttendance xxdjAttendance = attendanceMap.get(sdf.format(xcalendar.getTime()));
// if (xxdjAttendance != null) {
// xcell5.setCellValue(toFHstate(xxdjAttendance.getForenoonStart()) + toFHoutside(xxdjAttendance.getForenoonStartOutside()));
// x2cell5.setCellValue(toFHstate(xxdjAttendance.getForenoonEnd()) + toFHoutside(xxdjAttendance.getForenoonEndOutside()));
// x3cell5.setCellValue(toFHstate(xxdjAttendance.getAfternoonStart()) + toFHoutside(xxdjAttendance.getAfternoonStartOutside()));
// x4cell5.setCellValue(toFHstate(xxdjAttendance.getAfternoonEnd()) + toFHoutside(xxdjAttendance.getAfternoonEndOutside()));
// if ("1".equals(xxdjAttendance.getLeaveDate())) {
// leaveDate++;
// }
// if ("1".equals(xxdjAttendance.getErrorDate())) {
// errorDate++;
// }
//
// }
// }
// xcell3.setCellValue(errorDate);
// xcell4.setCellValue(leaveDate);
//
// }
// x = x + 4;
// id++;
// }
// }
// }
//
// FileOutputStream fos = new FileOutputStream(getAbsoluteFile("签到表.xlsx"));
// // 把相应的Excel 工作簿存盘
// workbook.write(fos);
// fos.flush();
// // 操作结束,关闭文件
// fos.close();
// return AjaxResult.success("签到表.xlsx");
// }
//
// /**
// * 获取下载路径
// *
// * @param filename 文件名称
// */
// public String getAbsoluteFile(String filename) {
// String downloadPath = ruoYiConfig.getDownloadPath() + filename;
// File desc = new File(downloadPath);
// if (!desc.getParentFile().exists()) {
// desc.getParentFile().mkdirs();
// }
// return downloadPath;
// }
//
// //(1.正常 2.迟到 3.早退 4.请假 5.未签到 6.节假日 7.旷工)
// private String toFHstate(String state) {
// if (state == null) {
// return "●";
// }
// switch (state) {
// case "1":
// return "√";
// case "2":
// return "△";
// case "3":
// return "○";
// case "4":
// return "□";
// case "6":
// return "☆";
// case "7":
// return "×";
// default:
// return "●";
// }
// }
//
// private String toFHoutside(String outside) {
// if (outside == null) {
// return "";
// }
// switch (outside) {
// case "1":
// return "#";
// default:
// return "";
// }
// }
//
// public List<AttendanceDatePoi> getDateDes(String startDate, String endDate) {
// List<AttendanceDatePoi> datePois = new ArrayList<>();
// try {
//
// Date start = sdf.parse(startDate);
// Date end = sdf.parse(endDate);
// Calendar startCalendar = Calendar.getInstance();
// startCalendar.setTime(start);
// int startYear = startCalendar.get(Calendar.YEAR);
// int startMonth = startCalendar.get(Calendar.MONTH);
// int startDay = startCalendar.get(Calendar.DAY_OF_MONTH);
// Calendar endCalendar = Calendar.getInstance();
// endCalendar.setTime(end);
// int endYear = endCalendar.get(Calendar.YEAR);
// int endMonth = endCalendar.get(Calendar.MONTH);
// int endDay = endCalendar.get(Calendar.DAY_OF_MONTH);
// for (int year = startYear; year <= endYear; year++) {
//
// if (year != startYear)
// startMonth = 1;
// int maxMonth = 12;
// if (year == endYear) {
// maxMonth = endMonth;
// }
// for (int month = startMonth; month <= maxMonth; month++) {
// Calendar calendar = Calendar.getInstance();
// calendar.set(Calendar.YEAR, year);
// calendar.set(Calendar.MONTH, month);
// int actualMaximum = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
// AttendanceDatePoi datePoi = new AttendanceDatePoi();
// if (month != startMonth)
// startDay = 1;
// if (month == endMonth && year == endYear)
// actualMaximum = endDay;
// datePoi.setMonth(sdfMS.format(calendar.getTime()));
// calendar.set(Calendar.DAY_OF_MONTH, startDay);
// datePoi.setStartDate(calendar.getTime());
// calendar.set(Calendar.DAY_OF_MONTH, actualMaximum);
// datePoi.setEndDate(calendar.getTime());
// datePois.add(datePoi);
// }
// }
// } catch (ParseException e) {
// e.printStackTrace();
// }
// return datePois;
// }
//
// //获取 单位id集合
// public List<Long> getDepaList(Long department) {
// List<Long> depaList = new ArrayList<>();
// List<Dept> depts = deptMapper.selectChildrenDeptById(department);
// if (depts == null || depts.size() == 0) {
// depaList.add(department);
// } else {
// for (Dept dept : depts) {
// List<Long> todepaList = getDepaList(dept.getDeptId());
// depaList.addAll(todepaList);
// }
// }
// return depaList;
// }
//}
...@@ -94,6 +94,7 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService ...@@ -94,6 +94,7 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
return teacherFilesNoticeMapper.selectTeacherFilesNoticeList(teacherFilesNotice); return teacherFilesNoticeMapper.selectTeacherFilesNoticeList(teacherFilesNotice);
} }
/** /**
* 新增教师档案通知 * 新增教师档案通知
* *
...@@ -355,14 +356,16 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService ...@@ -355,14 +356,16 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
/** /**
* 删除教师档案通知信息 * 删除教师档案通知信息
* *
* @param id 教室档案通知主键 * @param ids 教室档案通知主键
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteTeacherFilesNoticeById(String id) public int deleteTeacherFilesNoticeById(String[] ids)
{ {
int i = teacherFilesNoticeMapper.deleteTeacherFilesNoticeById(id); int i = teacherFilesNoticeMapper.deleteTeacherFilesNoticeByIds(ids);
teacherFilesMapper.deleteTeacherFilesByNoticeId(id); for(String id :ids){
teacherFilesMapper.deleteTeacherFilesByNoticeId(id);
}
return i; return i;
} }
} }
...@@ -180,4 +180,9 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService ...@@ -180,4 +180,9 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
} }
return 1; return 1;
} }
@Override
public List<Long> getGradeId(Long teacherId) {
return teacherFilesMapper.getGradeId(teacherId);
}
} }
...@@ -29,6 +29,7 @@ public interface ITeacherFilesNoticeService ...@@ -29,6 +29,7 @@ public interface ITeacherFilesNoticeService
*/ */
public List<TeacherFilesNoticeTotal> selectTeacherFilesNoticeList(TeacherFilesNotice teacherFilesNotice); public List<TeacherFilesNoticeTotal> selectTeacherFilesNoticeList(TeacherFilesNotice teacherFilesNotice);
/** /**
* 新增教室档案通知 * 新增教室档案通知
* *
...@@ -65,5 +66,5 @@ public interface ITeacherFilesNoticeService ...@@ -65,5 +66,5 @@ public interface ITeacherFilesNoticeService
* @param id 教室档案通知主键 * @param id 教室档案通知主键
* @return 结果 * @return 结果
*/ */
public int deleteTeacherFilesNoticeById(String id); public int deleteTeacherFilesNoticeById(String[] id);
} }
...@@ -65,4 +65,6 @@ public interface ITeacherFilesService ...@@ -65,4 +65,6 @@ public interface ITeacherFilesService
public int synchronous(Long id); public int synchronous(Long id);
public List<Long> getGradeId(Long TeacherId);
} }
...@@ -175,4 +175,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -175,4 +175,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<select id="getGradeId" parameterType="Long" resultType="Long">
SELECT grade_id FROM `school_grade_mentor` where teacher_id = #{teacherId} GROUP BY grade_id
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -43,7 +43,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -43,7 +43,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="endTime != null "> and end_time = #{endTime}</if> <if test="endTime != null "> and end_time = #{endTime}</if>
</where> </where>
</select> </select>
<select id="selectTeacherFilesNoticeListByUser" parameterType="TeacherFilesNotice" resultType="TeacherFilesNoticeTotal">
<include refid="selectTeacherFilesNoticeTotalVo"/>
<where>
<if test="noticeRange != null and noticeRange != ''"> and notice_range = #{noticeRange}</if>
<if test="noticeYear != null and noticeYear != ''"> and notice_year = #{noticeYear}</if>
<if test="noticeSemester != null and noticeSemester != ''"> and notice_semester = #{noticeSemester}</if>
<if test="noticeName != null and noticeName != ''"> and notice_name like concat('%', #{noticeName}, '%')</if>
<if test="noticeState != null and noticeState != ''"> and notice_state = #{noticeState}</if>
<if test="startTime != null "> and start_time = #{startTime}</if>
<if test="endTime != null "> and end_time = #{endTime}</if>
<if test="teacherId != null and teacherId != '' "> and id in (SELECT notice_id FROM `teacher_files` where teacher_id =#{teacherId})</if>
and notice_state != 1
</where>
</select>
<select id="selectTeacherFilesNoticeById" parameterType="String" resultMap="TeacherFilesNoticeResult"> <select id="selectTeacherFilesNoticeById" parameterType="String" resultMap="TeacherFilesNoticeResult">
<include refid="selectTeacherFilesNoticeVo"/> <include refid="selectTeacherFilesNoticeVo"/>
where id = #{id} where id = #{id}
...@@ -120,4 +135,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -120,4 +135,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTeacherByClass" parameterType="Long" resultType="SchoolGradeByClassVo"> <select id="selectTeacherByClass" parameterType="Long" resultType="SchoolGradeByClassVo">
select teacher_id,course_name from school_class_mentor where class_id = #{classId} and del_flag = '0' select teacher_id,course_name from school_class_mentor where class_id = #{classId} and del_flag = '0'
</select> </select>
</mapper> </mapper>
\ No newline at end of file
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