|
|
|
@ -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>
|