|
|
|
@ -0,0 +1,353 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="committee-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-number :min="0" v-model="sortNo"/>
|
|
|
|
|
</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-input v-model="memberName" 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-select :value="stageId" @change="stageChange">
|
|
|
|
|
<a-select-option v-for="item in stageList" :key="item.stage_id" :value="item.stage_id">
|
|
|
|
|
{{ item.stage_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-input v-model="position" 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-input v-model="telephone" 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">
|
|
|
|
|
<Upload :type="2" :multiple="false" title="点击上传" :option="{}" :canDownload="false"
|
|
|
|
|
:fileData="idPhotoJson"
|
|
|
|
|
ref="fileUploadCertificate"
|
|
|
|
|
@uploadComplete="certificateFile"
|
|
|
|
|
/>
|
|
|
|
|
</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>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import {Spin, Button, Cascader, Input, InputNumber, Modal, Select, DatePicker,Icon,TimePicker} from 'ant-design-vue';
|
|
|
|
|
import InterConfig from '../interConfig';
|
|
|
|
|
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
import ATextarea from "ant-design-vue/es/input/TextArea";
|
|
|
|
|
import Upload from '../../../../../../components/common/uploader/Upload.vue';
|
|
|
|
|
export default{
|
|
|
|
|
props: {
|
|
|
|
|
memberId:{
|
|
|
|
|
type:String,
|
|
|
|
|
default:""
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
data(){
|
|
|
|
|
return {
|
|
|
|
|
pageLoading: false,
|
|
|
|
|
memberName:"",//成员姓名
|
|
|
|
|
stageId:"",//学段id
|
|
|
|
|
stageList:[
|
|
|
|
|
{stage_id:"",stage_name:"全部"}
|
|
|
|
|
],//学段数据集
|
|
|
|
|
position:"",//职务
|
|
|
|
|
telephone:"",//联系电话
|
|
|
|
|
locale,
|
|
|
|
|
idPhotoJson:[],
|
|
|
|
|
sortNo:"",
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created(){
|
|
|
|
|
this.getStageList();
|
|
|
|
|
if (this.$props.memberId !== "") {
|
|
|
|
|
this.getInfo();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getStageList: function () {
|
|
|
|
|
let param = {
|
|
|
|
|
bureau_id: this.BaseConfig.person_info_my.bureau_id,
|
|
|
|
|
}
|
|
|
|
|
this.InterfaceConfig.callInterface([{
|
|
|
|
|
url: InterConfig.getSchoolStageList.url,
|
|
|
|
|
params: param,
|
|
|
|
|
method: InterConfig.getSchoolStageList.method,
|
|
|
|
|
isTestLogin: InterConfig.getSchoolStageList.isTestLogin,
|
|
|
|
|
}], (result) => {
|
|
|
|
|
let resData = result[0].data;
|
|
|
|
|
if (resData.code === 2000) {
|
|
|
|
|
this.stageList.push(...resData.data);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
stageChange:function (value) {
|
|
|
|
|
this.stageId = value;
|
|
|
|
|
},
|
|
|
|
|
getInfo: function () {
|
|
|
|
|
let param = {
|
|
|
|
|
member_id: this.$props.memberId,
|
|
|
|
|
}
|
|
|
|
|
this.InterfaceConfig.callInterface([{
|
|
|
|
|
url: InterConfig.getCommitteeInfo.url,
|
|
|
|
|
params: param,
|
|
|
|
|
method: InterConfig.getCommitteeInfo.method,
|
|
|
|
|
isTestLogin: InterConfig.getCommitteeInfo.isTestLogin,
|
|
|
|
|
}], (result) => {
|
|
|
|
|
let resData = result[0].data;
|
|
|
|
|
if (resData.code === 2000) {
|
|
|
|
|
let info = resData.data;
|
|
|
|
|
this.memberName = info.member_name;
|
|
|
|
|
this.stageId = info.stage_id;
|
|
|
|
|
this.position = info.position;
|
|
|
|
|
this.telephone = info.telephone;
|
|
|
|
|
this.sortNo = info.sort_no;
|
|
|
|
|
if(Object.keys(info.id_photo_json).length > 0){
|
|
|
|
|
this.idPhotoJson.push(info.id_photo_json);
|
|
|
|
|
}
|
|
|
|
|
if(Array.isArray(info.id_photo_json)){
|
|
|
|
|
this.idPhotoJson = info.id_photo_json;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
certificateFile:function(file){
|
|
|
|
|
this.idPhotoJson = file;
|
|
|
|
|
},
|
|
|
|
|
submit: function () {
|
|
|
|
|
if (this.sortNo === "") {
|
|
|
|
|
Modal.warning({
|
|
|
|
|
title: "请输入排序号码",
|
|
|
|
|
content: "",
|
|
|
|
|
centered: true
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.memberName.trim() === "") {
|
|
|
|
|
Modal.warning({
|
|
|
|
|
title: "请输入成员姓名",
|
|
|
|
|
content: "",
|
|
|
|
|
centered: true
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.stageId === "") {
|
|
|
|
|
Modal.warning({
|
|
|
|
|
title: "请选择学段",
|
|
|
|
|
content: "",
|
|
|
|
|
centered: true
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.position.trim() === "") {
|
|
|
|
|
Modal.warning({
|
|
|
|
|
title: "请输入职工职务",
|
|
|
|
|
content: "",
|
|
|
|
|
centered: true
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.telephone.trim() === "") {
|
|
|
|
|
Modal.warning({
|
|
|
|
|
title: "请输入联系电话",
|
|
|
|
|
content: "",
|
|
|
|
|
centered: true
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(this.idPhotoJson.length === 0){
|
|
|
|
|
Modal.warning({
|
|
|
|
|
title: "请上传证件照",
|
|
|
|
|
content: "",
|
|
|
|
|
centered: true
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let param = {
|
|
|
|
|
stage_id:this.stageId,
|
|
|
|
|
member_name: this.memberName,
|
|
|
|
|
position:this.position,
|
|
|
|
|
telephone:this.telephone,
|
|
|
|
|
id_photo_json:JSON.stringify(this.idPhotoJson),
|
|
|
|
|
sort_no:this.sortNo,
|
|
|
|
|
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.memberId !== ""){
|
|
|
|
|
param.member_id = this.$props.memberId;
|
|
|
|
|
}
|
|
|
|
|
this.pageLoading = true;
|
|
|
|
|
this.InterfaceConfig.callInterface([{
|
|
|
|
|
url: InterConfig.saveCommittee.url,
|
|
|
|
|
params: param,
|
|
|
|
|
method: InterConfig.saveCommittee.method,
|
|
|
|
|
isTestLogin: InterConfig.saveCommittee.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");
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
ATextarea,
|
|
|
|
|
ASpin: Spin,
|
|
|
|
|
ASelect: Select,
|
|
|
|
|
ASelectOption: Select.Option,
|
|
|
|
|
AInput: Input,
|
|
|
|
|
AInputNumber:InputNumber,
|
|
|
|
|
ADatePicker: DatePicker,
|
|
|
|
|
ARangePicker:DatePicker.RangePicker,
|
|
|
|
|
Upload,
|
|
|
|
|
AButton: Button,
|
|
|
|
|
AIcon:Icon,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.committee-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>
|