洋浦学校 我的工作台 八大中心 学生缺勤管理模块前端开发

init
feiliming 3 years ago
parent d10f7dcfc4
commit 1570ad8522

@ -981,5 +981,60 @@ const InterfaceConfig = {
method: 'post',
isTestLogin: true,
},
/*
* 获取心育活动课程列表-分页
*"bureau_id":"必填 int 机构id"
"course_name":"非必填 string 课程名称(模糊查询)"
"course_date":"非必填 string 日期(查询条件)"
"course_place":"非必填 string 课程地点(模糊查询)"
"course_speaker":"非必填 string 主讲人(查询条件)"
"attendees":"非必填 string 参加人员(模糊查询)"
"page_number":"非必填 number 【当前页码】"
"page_size":"非必填 number 【每页条数】"
* */
"getPsychologyList":{
url: 'intellioa/center/psychology/list',
method: 'get',
isTestLogin: true,
},
/*
* 查看心育活动课程信息
"course_id": "必填 number【课程信息id】"
* */
"getPsychologyInfo":{
url: 'intellioa/center/psychology/view',
method: 'get',
isTestLogin: true,
},
/*
* 新增编辑保存心育活动课程信息
"course_id""例会信息idnumber非必填填写代表编辑"
"course_name""课程名称string(100),必填"
"course_date""课程日期string必填"
"course_speaker""主讲人string必填"
"course_place""课程地址string必填"
"attendees""参见人员string(1000),必填"
"attachment_json":"非必填 附件对象 对象属性需要JSON.stringify转成json字符串再传"
"person_id":"必填 int 操作人ID"
"identity_id":"必填 int 操作人身份ID"
"bureau_id":"必填 int 机构ID"
* */
"savePsychology":{
url: 'intellioa/center/psychology/save',
method: 'post',
isTestLogin: true,
},
/*
* 删除心育活动课程信息
"course_ids""课程信息idsstring必填批量删除时以英文逗号分隔"
"bureau_id":"必填 int 机构ID"
* */
"deletePsychology":{
url: 'intellioa/center/psychology/delete',
method: 'post',
isTestLogin: true,
},
};
export default InterfaceConfig;

@ -0,0 +1,299 @@
<template>
<div class="moral-heart-activity-list-content-style">
<div v-if="pageType === 0">
<div class="search-and-add-style">
<div>
<span style="margin-right: 0.5rem">课程名称</span>
<a-input v-model="courseName"/>
<span style="margin:0 0.5rem">课程日期</span>
<a-date-picker :locale="locale"
v-model="courseDate"
:format="dateFormat"
@change="onChange"/>
<span style="margin:0 0.5rem">课程地点</span>
<a-input v-model="coursePlace"/>
<span style="margin:0 0.5rem">主讲人</span>
<a-input v-model="courseSpeaker"/>
<span style="margin:0 0.5rem">参加人员</span>
<a-input v-model="attendees"/>
<a-icon type="search" :style="{fontSize: '16px', color: '#31a8fa',marginLeft:'0.5rem'}" @click="search" />
</div>
<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"/>
</div>
<a-modal title="提示"
:visible="visible"
centered
cancelText="取消"
okText="确定"
@ok="handleOk"
@cancel="handleCancel">
是否确定删除此条信息
</a-modal>
<template v-if="pageType === 1">
</template>
</div>
</template>
<script>
import InterConfig from '../interConfig';
import {Table, Button, Select, Modal, Divider, Cascader, Icon, Input,Pagination,DatePicker} from 'ant-design-vue';
import Upload from '../../../../../../components/common/uploader/Upload.vue';
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
import moment from 'moment';
const tableColumn = [
{
dataIndex: 'index',
key: 'index',
title: '序号',
width: "80px",
align: "center"
},
{
dataIndex: 'course_name',
key: 'courseName',
title: '课程名称',
align: "center"
},
{
dataIndex: 'course_date',
key: 'courseDate',
title: '课程日期',
align: "center"
},
{
dataIndex: 'course_place',
key: 'coursePlace',
title: '课程地点',
align: "center",
},
{
dataIndex: 'course_speaker',
key: 'courseSpeaker',
title: '主讲人',
align: "center",
},
{
dataIndex: 'attendees',
key: 'attendees',
title: '参与人员',
align: "center",
},
{
title: '操作',
key: 'action',
align: "center",
scopedSlots: {customRender: 'action'},
}
]
export default{
props: ["menuId"],
data(){
return {
locale,
dateFormat: "YYYY-MM-DD",
pageType: 0,//0 1
courseName: "",//
tableColumn: tableColumn,
dataList: [],
loading: false,
activityId:"",//ID
clubId: "",
clubList:[],
activityName:"",
courseDate:"",//
coursePlace:"",//
courseSpeaker:"",//
attendees:"",//
visible: false,
pageNumber: 1,
pageSize: 3,
totalPage: 0,
totalNum: 0,
}
},
created(){
this.getClubList();
},
mounted(){
},
methods: {
getClubList:function(){
let param = {
bureau_id: this.BaseConfig.person_info_my.bureau_id,
club_name: "",
page_number: 1,
page_size: 1000000,
}
this.InterfaceConfig.callInterface([{
url: InterConfig.getClublist.url,
params: param,
method: InterConfig.getClublist.method,
isTestLogin: InterConfig.getClublist.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (resData.code === 2000) {
let dataList = resData.data.list;
if(dataList && dataList.length > 0){
this.clubList = dataList;
this.clubId = dataList[0].club_id;
this.getClubActivityList();
}
}
})
},
onChange(value, dateString) {
this.activityDate = dateString;
},
search:function () {
this.getClubActivityList();
},
clubChange:function(value){
this.clubId = value;
this.getClubActivityList();
},
getClubActivityList: function () {
let param = {
bureau_id: this.BaseConfig.person_info_my.bureau_id,
club_id: this.clubId,
activity_name:this.activityName,
activity_date:this.activityDate,
activity_place:this.activityPlace,
page_number: this.pageNumber,
page_size: this.pageSize,
}
this.InterfaceConfig.callInterface([{
url: InterConfig.getClubActivityList.url,
params: param,
method: InterConfig.getClubActivityList.method,
isTestLogin: InterConfig.getClubActivityList.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;
}
}
this.dataList = dataList;
this.totalNum = resData.data.total_row;
this.totalPage = resData.data.total_page;
}
})
},
onPageChange: function (page) {
this.pageNumber = page;
this.getClubActivityList();
},
toAdd: function () {
this.activityId = "";
this.pageType = 1;
},
toEdit: function (record) {
this.pageType = 1;
this.activityId = record.activity_id + "";
},
toDelete: function (record) {
this.activityId = record.activity_id + "";
this.visible = true;
},
cancel: function () {
this.pageType = 0;
this.getClubList();
},
//
handleOk: function () {
let param = {
activity_ids: this.activityId,
club_id:this.clubId,
bureau_id: this.BaseConfig.person_info_my.bureau_id,
}
this.InterfaceConfig.callInterface([{
url: InterConfig.deleteClubActivity.url,
params: param,
method: InterConfig.deleteClubActivity.method,
isTestLogin: InterConfig.deleteClubActivity.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (resData.code === 2000) {
Modal.success({
title: "操作成功",
content: "",
centered: true
});
this.handleCancel();
this.getClubActivityList();
}
})
},
//
handleCancel: function () {
this.activityId = "";
this.visible = false;
}
},
components: {
ATable: Table,
AButton: Button,
AModal: Modal,
ADivider: Divider,
AIcon: Icon,
AInput: Input,
APagination:Pagination,
AInputSearch: Input.Search,
ASelect: Select,
ASelectOption: Select.Option,
Upload,
ActivityInfo,
ADatePicker:DatePicker
}
}
</script>
<style scoped lang="scss">
.moral-heart-activity-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>

@ -307,6 +307,14 @@ export const systemCenterConfig = [
component:() => import("./servicePlatform/moralEducation/studentAbsenceList.vue"),
props:true,
},
{
id:"moralEducation-2-5",
title:"心育活动管理",
path:'/workBench/servicePlatform/moralEducationHeartActivity/:id/:name/:menuId',
name:'moralEducationHeartActivity',
component:() => import("./servicePlatform/moralEducation/heartActivityList.vue"),
props:true,
},
]
},
]

Loading…
Cancel
Save