洋浦学校 八大中心后台管理 师生荣誉

init
gongdi 3 years ago
parent 4528800e2f
commit 411d372c99

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

@ -142,7 +142,7 @@
list.forEach((person)=>{
if (!this.selectedPeople.some((selected)=>{return selected.person_id === person.person_id})){
this.selectedRowKeys.push(person.person_id);
this.selectedPeople.push({person_id:person.person_id,person_name:person.person_name,org_id:parseInt(person.org_id)})
this.selectedPeople.push({person_id:person.person_id,identity_id:person.identity_id,person_name:person.person_name,org_id:parseInt(person.org_id)})
}
})
});
@ -159,9 +159,9 @@
onManulSelect:function(record, selected){
if (selected){//
if(this.isMultipleChoice){
this.selectedPeople.push({person_id:record.person_id,person_name:record.person_name,org_id:parseInt(record.org_id)});
this.selectedPeople.push({person_id:record.person_id,identity_id:record.identity_id,person_name:record.person_name,org_id:parseInt(record.org_id)});
}else{
this.selectedPeople = [{person_id:record.person_id,person_name:record.person_name,org_id:parseInt(record.org_id)}];
this.selectedPeople = [{person_id:record.person_id,identity_id:record.identity_id,person_name:record.person_name,org_id:parseInt(record.org_id)}];
}
}else{//
this.selectedPeople.splice(this.selectedPeople.findIndex((item)=>{return item.person_id === record.person_id}),1);

@ -32,7 +32,7 @@
<!--<a-avatar style="backgroundColor:#87d068" icon="user"/>-->
<!--<p style="background: url('./assets/xlsx.png');")></p>-->
<!--<img src="./assets/xlsx.png" alt="">-->
<span style="width: 100%;"><img src="./assets/xlsx.png" alt=""></span>
<!--<span style="width: 100%;"><img src="./assets/xlsx.png" alt=""></span>-->
</a-col>
<a-col :span="14">
<p>{{item.title}}</p>

@ -0,0 +1,257 @@
<template>
<div class="honor-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-select :value="categoryId" @change="categoryChange">
<a-select-option v-for="item in categoryList" :key="item.category_id" :value="item.category_id">
{{ item.category_name }}
</a-select-option>
</a-select>
</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 class="person-list-content-style">
<vue-scroll :ops="listScroll" style="height:500px" class="score-list-div">
<div class="list-content-style">
<div class="honor-person-info" v-for="info in personJson" :key="info.honor_person_id">
<div class="person-name">{{info.honor_person_name}}</div>
<Upload :type="2" :multiple="false" title="点击上传" :option="{}" :canDownload="false"
ref="fileUpload"
@uploadComplete="(file)=>{info.attachment_json = JSON.stringify(file)}"
/>
</div>
</div>
</vue-scroll>
</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"
@cancel="closePanel" @selectComplete="selectComplete"/>
</div>
</template>
<script>
import {Spin} from 'ant-design-vue';
import {Select, Button, Modal} from 'ant-design-vue';
import SelectPeople from '../../../../../../components/common/selectPeople/SelectPeople';
import Upload from '../../../../../../components/common/uploader/Upload.vue';
export default{
data(){
return {
pageLoading: false,
showPeoplePanel: false,
categoryId: 0,
categoryList: [
{category_id: 0, category_name: "全部"},
{category_id: 1, category_name: "模范教师"},
{category_id: 2, category_name: "优秀教师"},
{category_id: 3, category_name: "骨干教师"},
{category_id: 4, category_name: "特级名师"},
{category_id: 5, category_name: "教学名师"}
],
personJson: [],
personList: [],
listScroll: this.StaticParams.scrollOption,
}
},
methods: {
categoryChange: function (value) {
if (this.categoryId !== value) {
this.categoryId = value;
}
},
showChoose: function () {
this.showPeoplePanel = true;
},
//
selectComplete: function (ary) {
let personJson = [];
if (ary && ary.length > 0) {
let objAry = ary[0];
if (objAry.length > 0) {
for (let i = 0, len = objAry.length; i < len; i++) {
let personObj = objAry[i];
let person = null;
let oldPerson = this.personJson.find((item) => {
return item.honor_person_id === personObj.person_id;
});
person = oldPerson ? oldPerson : {
honor_person_id: personObj.person_id,
honor_person_name: personObj.person_name,
honor_identity_id: personObj.identity_id,
attachment_json: ""
}
personJson.push(person);
}
this.personJson = personJson;
}
}
this.showPeoplePanel = false;
},
//
uploadComplete: function (file) {
},
closePanel: function () {
this.showPeoplePanel = false;
},
submit: function () {
if (this.categoryId === 0) {
Modal.warning({
title: "请选择荣誉分类",
content: "",
centered: true
})
return;
}
if (this.personJson.length === 0) {
Modal.warning({
title: "请选择获奖人员",
content: "",
centered: true
})
return;
}
let param = {
category_id: this.categoryId,
honor_list_json: this.personJson,
}
this.$emit("submit", param)
},
cancel: function () {
this.$emit("cancel");
}
},
components: {
ASpin: Spin,
ASelect: Select,
ASelectOption: Select.Option,
AButton: Button,
AModal: Modal,
SelectPeople,
Upload
}
}
</script>
<style scoped lang="scss">
.honor-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>

@ -2,6 +2,11 @@
<div class="honor-list-content-style">
<template v-if="pageType === 0">
<div class="search-and-add-style">
<a-select :value="categoryId" @change="categoryChange">
<a-select-option v-for="item in categoryList" :key="item.category_id" :value="item.category_id">
{{ item.category_name }}
</a-select-option>
</a-select>
<a-button type="primary" @click="toAdd"></a-button>
</div>
<a-table :columns="tableColumn" :data-source="dataList" :loading="loading" :pagination="false">
@ -12,12 +17,16 @@
<a-pagination v-if="totalPage > 1" v-model="pageNumber" :pageSize="pageSize" :total="totalNum"
@change="onPageChange"/>
</template>
<template v-if="pageType === 1">
<HonorInfo @cancel="cancel" @submit="submit"/>
</template>
</div>
</template>
<script>
import InterConfig from '../interConfig';
import {Table, Pagination, Button} from 'ant-design-vue';
import {Table, Pagination, Button, Select, Modal} from 'ant-design-vue';
import _ from 'lodash';
import HonorInfo from './honorInfo.vue';
const tableColumn = [
{
dataIndex: 'index',
@ -45,6 +54,15 @@
return {
pageType: 0,//0 1
categoryType: 0,// 5 6
categoryId: 0,
categoryList: [
{category_id: 0, category_name: "全部"},
{category_id: 1, category_name: "模范教师"},
{category_id: 2, category_name: "优秀教师"},
{category_id: 3, category_name: "骨干教师"},
{category_id: 4, category_name: "特级名师"},
{category_id: 5, category_name: "教学名师"}
],
pageNumber: 1,
pageSize: 10,
totalPage: 0,
@ -64,6 +82,7 @@
},
watch: {
menuId: function (newId) {
this.pageType = 0;
this.categoryType = newId === "studentHonor" ? 6 : 5;
this.buildTableColumn();
this.getHonorList();
@ -134,17 +153,55 @@
}
})
},
categoryChange: function (value) {
if (this.categoryId !== value) {
this.categoryId = value;
}
},
toAdd: function () {
this.pageType = 1;
},
toDelete: function () {
},
cancel: function () {
this.pageType = 0;
this.getHonorList();
},
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();
}
})
}
},
components: {
ATable: Table,
APagination: Pagination,
AButton: Button
AButton: Button,
ASelect: Select,
ASelectOption: Select.Option,
AModal: Modal,
HonorInfo
}
}
</script>
@ -162,6 +219,9 @@
justify-content: space-between;
align-items: center;
padding: 0 0.5rem;
.ant-select {
width: 100px;
}
}
.ant-table-wrapper {
/deep/ .upload-container-style {

@ -199,5 +199,24 @@ const InterfaceConfig = {
isTestLogin: true,
},
/*
* 新增师生荣誉信息批量选择人员保存为多个条目
* "category_id""分类idnumber必填"
"honor_list_json""获奖信息获奖情况列表对象必填需要JSON.stringify转成json字符串再传"
[{
"honor_person_id": "必填人员id",
"honor_identity_id": "必填人员身份id",
"attachment_json": "非必填 获奖照片对象"
}]
"person_id":"必填 int 操作人ID"
"identity_id":"必填 int 操作人身份ID"
"bureau_id":"必填 int 机构ID"
* */
'saveHonor': {
url: 'intellioa/center/honor/save',
method: 'post',
isTestLogin: true,
},
};
export default InterfaceConfig;

@ -156,5 +156,35 @@ export const systemCenterConfig = [
]
},
]
},
{
id:"operationData",
title:'运行数据',
menus:[
{
id:"operationData-1",
title:"校园风采",
path:'/',
component:() => import("./servicePlatform/administration/administration.vue"),
children:[
{
id:"operationData-1-1",
title:"学生荣誉",
path:'/workBench/servicePlatform/studentHonor/:id/:name/:menuId',
name:'studentHonor',
component:() => import("./servicePlatform/honor/honorList.vue"),
props:true,
},
{
id:"operationData-1-2",
title:"教师荣誉",
path:'/workBench/servicePlatform/teacherHonor/:id/:name/:menuId',
name:'teacherHonor',
component:() => import("./servicePlatform/honor/honorList.vue"),
props:true,
},
]
},
]
}
]

Loading…
Cancel
Save