洋浦学校 八大中心 教师评优

init
gongdi 3 years ago
parent 80b65a00ec
commit 050abafb78

@ -589,5 +589,47 @@ const InterfaceConfig = {
method: 'post',
isTestLogin: true,
},
/*
* 获取班主任评优任务列表-分页
"bureau_id":"必填 int 机构id"
"excellent_name":"非必填 string 评优名称(查询条件)"
"page_number":"非必填 number 【当前页码】"
"page_size":"非必填 number 【每页条数】"
* */
"getExcellentList":{
url: 'intellioa/center/excellent/list',
method: 'get',
isTestLogin: true,
},
/*
* 查看班主任评优任务信息
"excellent_id": "必填 number【评优信息id】"
* */
"excellentView":{
url: 'intellioa/center/excellent/view',
method: 'get',
isTestLogin: true,
},
/*
* 查看班主任评优任务信息
"excellent_id": "必填 number【评优信息id】"
* */
"excellentSave":{
url: 'intellioa/center/excellent/save',
method: 'post',
isTestLogin: true,
},
/*
* 删除班主任评优信息
"excellent_ids""评优信息idsstring必填批量删除时以英文逗号分隔"
"bureau_id":"必填 int 机构ID"
* */
"excellentDelete":{
url: 'intellioa/center/excellent/delete',
method: 'post',
isTestLogin: true,
},
};
export default InterfaceConfig;

@ -0,0 +1,325 @@
<template>
<div class="teacher-appraising-info-content-style">
<a-spin :spinning="pageLoading">
<div class="add-record-row-style">
<div class="li-box li-left"><span class="must-option-style">*</span>评优名称</div>
<div class="li-box li-right">
<a-input v-model="excellentName" placeholder="请输入评优名称" :maxLength="100"/>
</div>
</div>
<div class="add-record-row-style">
<div class="li-box li-left"><span class="must-option-style">*</span>评优描述</div>
<div class="li-box li-right">
<a-textarea v-model="excellentDescribe" placeholder="请输入评优描述"/>
</div>
</div>
<div class="add-record-row-style">
<div class="li-box li-left"><span class="must-option-style">*</span>优秀教师列表</div>
<div class="li-box li-right">
<a-button type="primary" class="button-style" @click="showChoose"></a-button>
<div>
{{teacherNames}}
</div>
</div>
</div>
<div class="add-record-row-style button-row-style">
<a-button type="primary" class="button-style" @click="submit">
提交
</a-button>
<a-button class="button-style" @click="cancel"></a-button>
</div>
</a-spin>
<select-people :show="showPeoplePanel" :dataRange="['3']" modalTitle="请选择人员"
ref="selectPeoplePanel"
:selectedPerson="selectTeacherAry"
@cancel="closePanel" @selectComplete="selectComplete"/>
</div>
</template>
<script>
import {Spin, Button, Cascader, Input, InputNumber, Modal, Select, DatePicker,Icon,TimePicker} from 'ant-design-vue';
import InterConfig from '../interConfig';
import moment from 'moment';
import ATextarea from "ant-design-vue/es/input/TextArea";
import Upload from '../../../../../../components/common/uploader/Upload.vue';
import SelectPeople from '../../../../../../components/common/selectPeople/SelectPeople';
export default{
props: {
excellentId: {
type: String,
default: ""
}
},
data(){
return {
showPeoplePanel:false,
pageLoading: false,
excellentName: "",//
excellentDescribe:"",//
excellentListJson:[],//
teacherNames:"",
selectTeacherAry:[],
}
},
created(){
if (this.$props.excellentId !== "") {
this.getInfo();
}
},
methods: {
getInfo: function () {
let param = {
excellent_id: this.$props.excellentId,
}
this.InterfaceConfig.callInterface([{
url: InterConfig.excellentView.url,
params: param,
method: InterConfig.excellentView.method,
isTestLogin: InterConfig.excellentView.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (resData.code === 2000) {
let info = resData.data;
this.excellentName = info.excellent_name;
this.excellentDescribe = info.excellent_describe;
let detailList = info.detail_list;
this.excellentListJson = detailList;
for(let i = 0,len = detailList.length;i < len;i ++){
this.teacherNames += detailList[i].teacher_name;
let person = {
person_id:detailList[i].teacher_id,
person_name:detailList[i].teacher_name
}
this.selectTeacherAry.push(person);
}
if(this.teacherNames.length > 0){
this.teacherNames = this.teacherNames.substring(0,this.teacherNames.length - 1);
}
}
})
},
submit: function () {
if (this.excellentName.trim() === "") {
Modal.warning({
title: "请输入评优名称",
content: "",
centered: true
})
return;
}
if (this.excellentDescribe.trim() === "") {
Modal.warning({
title: "请输入评优描述",
content: "",
centered: true
})
return;
}
if (this.excellentListJson.length === 0) {
Modal.warning({
title: "请选择优秀教师",
content: "",
centered: true
})
return;
}
let param = {
excellent_name:this.excellentName,
excellent_describe: this.excellentDescribe,
excellent_list_json:JSON.stringify(this.excellentListJson),
person_id: this.BaseConfig.userInfo.person_id,
identity_id: this.BaseConfig.userInfo.identity_id,
bureau_id: this.BaseConfig.person_info_my.bureau_id,
}
if(this.$props.excellentId !== ""){
param.excellent_id = this.$props.excellentId;
}
this.pageLoading = true;
this.InterfaceConfig.callInterface([{
url: InterConfig.excellentSave.url,
params: param,
method: InterConfig.excellentSave.method,
isTestLogin: InterConfig.excellentSave.isTestLogin,
}], (result) => {
this.pageLoading = false;
let resData = result[0].data;
if (resData.code === 2000) {
Modal.success({
title: "操作成功",
content: "",
centered: true
});
this.cancel();
}
})
},
cancel: function () {
this.$emit("cancel");
},
closePanel:function () {
this.showPeoplePanel = false;
},
selectComplete:function (ary) {
let teacherAry = [];
if (ary && ary.length > 0) {
let objAry = ary[0];
if (objAry.length > 0) {
for(let i = 0,len = objAry.length;i < len;i ++){
let teacher = {
teacher_id:objAry[i].person_id,
teacher_name:objAry[i].person_name
}
teacherAry.push(teacher);
}
this.buildTeacherNames(objAry);
this.excellentListJson = teacherAry;
}else {
this.excellentListJson = [];
this.teacherNames = "";
}
}
this.showPeoplePanel = false;
},
buildTeacherNames:function (ary) {
let names = "";
if(ary.length > 0){
for(let i = 0,len = ary.length;i < len;i ++){
let personName = ary[i].person_name;
names += personName + ",";
}
}
if(names.length > 0){
names = names.substring(0,names.length - 1)
}
this.teacherNames = names;
},
showChoose: function () {
this.showPeoplePanel = true;
},
},
components: {
ATextarea,
ASpin: Spin,
ASelect: Select,
ASelectOption: Select.Option,
AInput: Input,
ADatePicker: DatePicker,
ATimePicker:TimePicker,
Upload,
AButton: Button,
AIcon:Icon,
SelectPeople
}
}
</script>
<style scoped lang="scss">
.teacher-appraising-info-content-style {
width: 100%;
height: auto;
font-size: 1rem;
color: black;
.add-record-row-style {
width: 50%;
min-height: 3rem;
margin: 0.5rem auto;
display: flex;
.li-box {
min-height: 3rem;
line-height: 3rem;
.must-option-style {
color: red;
margin-right: 0.2rem;
}
}
.li-left {
width: 15%;
text-align: right;
}
.li-right {
width: 85%;
.person-list-content-style {
width: 700px;
height: 500px;
background-color: #ebebeb;
.list-content-style {
width: 100%;
height: 100%;
display: flex;
flex-wrap: wrap;
.honor-person-info {
width: auto;
height: 180px;
border: 1px solid #31a8fa;
margin: 0.5rem 0 0 0.5rem;
display: flex;
flex-direction: column;
justify-content: center;
.person-name {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
}
/deep/ .img-style {
margin-right: 0 !important;
}
}
}
}
.ant-select {
width: 100px;
}
.no-border-input-style {
border-top: 0 !important;
border-left: 0 !important;
border-right: 0 !important;
}
.photo-container-style {
display: flex;
align-items: center;
align-content: center;
justify-content: center;
justify-items: center;
width: 120px !important;
border: 1px solid #e5e5e5;
height: 160px;
background-color: white;
position: relative;
.operate-class {
position: absolute;
bottom: 0.1rem;
color: #31a8fa;
font-size: 1rem;
cursor: pointer;
display: none;
}
.photo-size-style {
display: flex;
align-items: center;
align-content: center;
justify-items: center;
justify-content: center;
}
}
.edit-style {
&:hover {
.operate-class {
display: inline-block;
}
}
}
}
}
.button-row-style {
width: 50%;
margin: auto;
display: flex;
justify-content: center;
align-items: center;
.button-style {
margin-left: 0.5rem;
}
}
}
</style>

@ -0,0 +1,275 @@
<template>
<div class="moral-teacher-Appraising-list-content-style">
<template v-if="pageType === 0">
<div class="search-and-add-style">
<a-input-search v-model="excellentName" :maxLength="100"
placeholder="输入评优名称"
style="width: 260px"
enter-button
@search="search"/>
<a-button type="primary" @click="toAdd" class="add-button-style">新增</a-button>
</div>
<a-table :columns="tableColumn" :data-source="dataList" :loading="loading" :pagination="false">
<span slot="action" slot-scope="text, record">
<a @click="toEdit(record)"></a>
<a-divider type="vertical"/>
<a @click="toDelete(record)"></a>
</span>
</a-table>
<a-pagination v-if="totalPage > 1" v-model="pageNumber" :pageSize="pageSize" :total="totalNum"
@change="onPageChange"/>
</template>
<a-modal title="提示"
:visible="visible"
centered
cancelText="取消"
okText="确定"
@ok="handleOk"
@cancel="handleCancel">
是否确定删除此条信息
</a-modal>
<template v-if="pageType === 1">
<appraising-info :excellentId="excellentId" @cancel="cancel"/>
</template>
</div>
</template>
<script>
import InterConfig from '../interConfig';
import {Table, Button, Select, Modal, Divider, Cascader, Icon, Input,Pagination,DatePicker} from 'ant-design-vue';
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
import moment from 'moment';
import AppraisingInfo from './appraisingInfo.vue';
import _ from 'lodash';
const tableColumn = [
{
dataIndex: 'index',
key: 'index',
title: '序号',
width: "80px",
align: "center"
},
{
dataIndex: 'excellent_name',
key: 'excellentName',
title: '评优名称',
align: "center"
},
{
dataIndex: 'teacher_names',
key: 'teacherNames',
title: '班主任姓名',
align: "center"
},
{
title: '操作',
key: 'action',
align: "center",
scopedSlots: {customRender: 'action'},
}
]
export default{
props: ["menuId"],
data(){
return {
locale,
pageType: 0,//0 1
excellentName: "",//
tableColumn: tableColumn,
dataList: [],
loading: false,
excellentId: "",
visible: false,
pageNumber: 1,
pageSize: 10,
totalPage: 0,
totalNum: 0,
}
},
created(){
this.getExcellentList();
},
mounted(){
},
methods: {
getCalendarContainer: function () {
return triggerNode => triggerNode.parentNode;
},
onChange(value, dateString) {
if (dateString === "") {
this.punishDate = null;
} else {
this.punishDate = moment(dateString).format("YYYY-MM-DD");
}
},
search:function () {
this.getExcellentList();
},
getExcellentList: function () {
let param = {
bureau_id: this.BaseConfig.person_info_my.bureau_id,
excellent_name: this.excellentName,
page_number: this.pageNumber,
page_size: this.pageSize,
}
this.InterfaceConfig.callInterface([{
url: InterConfig.getExcellentList.url,
params: param,
method: InterConfig.getExcellentList.method,
isTestLogin: InterConfig.getExcellentList.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (resData.code === 2000) {
let dataList = resData.data.list;
if (dataList && dataList.length > 0) {
for (let i = 0, len = dataList.length; i < len; i++) {
dataList[i]['index'] = i + 1;
let detailList = dataList[i].detail_list;
let teacher_names = "";
if(detailList.length > 0){
for(let j = 0;j < detailList.length;j ++){
let teacherName = detailList[j].teacher_name;
teacher_names += teacherName + ","
}
}
if(teacher_names.length > 0){
teacher_names = teacher_names.substring(0,teacher_names.length - 1);
}
dataList[i]['teacher_names'] = teacher_names;
}
}
this.dataList = dataList;
this.totalNum = resData.data.total_row;
this.totalPage = resData.data.total_page;
}
})
},
onPageChange: function (page) {
this.pageNumber = page;
this.getExcellentList();
},
toAdd: function () {
this.excellentId = "";
this.pageType = 1;
},
toEdit: function (record) {
this.pageType = 1;
this.excellentId = record.excellent_id + "";
},
toDelete: function (record) {
this.excellentId = record.excellent_id;
this.visible = true;
},
cancel: function () {
this.pageType = 0;
this.getExcellentList();
},
submit: function (obj) {
let param = {
category_id: obj.category_id,
honor_list_json: JSON.stringify(obj.honor_list_json),
person_id: this.BaseConfig.userInfo.person_id,
identity_id: this.BaseConfig.userInfo.identity_id,
bureau_id: this.BaseConfig.person_info_my.bureau_id,
}
this.InterfaceConfig.callInterface([{
url: InterConfig.saveHonor.url,
params: param,
method: InterConfig.saveHonor.method,
isTestLogin: InterConfig.saveHonor.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (resData.code === 2000) {
Modal.success({
title: "操作成功",
content: "",
centered: true
});
this.cancel();
}
})
},
//
handleOk: function () {
let param = {
excellent_ids: this.excellentId,
bureau_id: this.BaseConfig.person_info_my.bureau_id,
}
this.InterfaceConfig.callInterface([{
url: InterConfig.excellentDelete.url,
params: param,
method: InterConfig.excellentDelete.method,
isTestLogin: InterConfig.excellentDelete.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (resData.code === 2000) {
Modal.success({
title: "操作成功",
content: "",
centered: true
});
this.handleCancel();
this.getExcellentList();
}
})
},
//
handleCancel: function () {
this.excellentId = "";
this.visible = false;
}
},
components: {
ATable: Table,
AButton: Button,
ASelect: Select,
ASelectOption: Select.Option,
AModal: Modal,
ADivider: Divider,
ACascader: Cascader,
AIcon: Icon,
AInput: Input,
APagination:Pagination,
ADatePicker:DatePicker,
AppraisingInfo,
AInputSearch: Input.Search,
}
}
</script>
<style scoped lang="scss">
.moral-teacher-Appraising-list-content-style {
width: 100%;
height: auto;
padding: 0.5rem;
.search-and-add-style {
width: 100%;
height: 3.5rem;
background-color: white;
margin-bottom: 0.5rem;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 0.5rem;
.ant-select {
width: 100px;
}
.ant-input {
width: 150px;
}
.add-button-style {
float: right;
}
}
.ant-table-wrapper {
/deep/ .upload-container-style {
display: flex;
justify-content: center;
align-items: center;
}
}
.ant-pagination {
margin-top: 0.5rem;
text-align: right;
}
}
</style>

@ -1,5 +1,5 @@
<template>
<div class="moral-student-notice-list-content-style">
<div class="moral-teacher-meeting-list-content-style">
<template v-if="pageType === 0">
<div class="search-and-add-style">
<div>
@ -258,7 +258,7 @@
}
</script>
<style scoped lang="scss">
.moral-student-notice-list-content-style {
.moral-teacher-meeting-list-content-style {
width: 100%;
height: auto;
padding: 0.5rem;

@ -259,6 +259,14 @@ export const systemCenterConfig = [
component:() => import("./servicePlatform/moralEducation/teacherMeeting.vue"),
props:true,
},
{
id:"moralEducation-1-4",
title:"班主任评优",
path:'/workBench/servicePlatform/moralEducationTeacherAppraising/:id/:name/:menuId',
name:'moralEducationTeacherAppraising',
component:() => import("./servicePlatform/moralEducation/teacherAppraising.vue"),
props:true,
},
]
},
]

Loading…
Cancel
Save