|
|
|
@ -0,0 +1,339 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="club-activity-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="publicityType" @change="publicityTypeChange">
|
|
|
|
|
<a-select-option v-for="item in publicityList" :key="item.publicityType" :value="item.publicityType">
|
|
|
|
|
{{ item.publicityName }}
|
|
|
|
|
</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-date-picker
|
|
|
|
|
v-model="publicityDate"
|
|
|
|
|
:show-time="{ format: 'HH:mm' }"
|
|
|
|
|
format="YYYY-MM-DD HH:mm"
|
|
|
|
|
placeholder="select time"
|
|
|
|
|
@change="onRangeChange"
|
|
|
|
|
@ok="onRangeOk"
|
|
|
|
|
/>
|
|
|
|
|
</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-cascader
|
|
|
|
|
:field-names="{label:'createYearName',value:'createYear',children:'create_year_list'}"
|
|
|
|
|
:allowClear="false"
|
|
|
|
|
v-model:value="defaultValue"
|
|
|
|
|
:options="stageList" @change="stageChange" placeholder="选择学段学年"></a-cascader>
|
|
|
|
|
</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";
|
|
|
|
|
export default{
|
|
|
|
|
props: {
|
|
|
|
|
publicityId:{
|
|
|
|
|
type:String,
|
|
|
|
|
default:""
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
data(){
|
|
|
|
|
return {
|
|
|
|
|
pageLoading: false,
|
|
|
|
|
showStudentPanel:false,
|
|
|
|
|
stageId: "",
|
|
|
|
|
stageList: [],
|
|
|
|
|
yearId: "",
|
|
|
|
|
defaultValue: [],//默认学段学年
|
|
|
|
|
dataList: [],
|
|
|
|
|
publicityid:this.$props.publicityId,//
|
|
|
|
|
publicityType: "",
|
|
|
|
|
publicityList: [{publicityType:"",publicityName:"全部"},
|
|
|
|
|
{publicityType:0,publicityName:"开放日"},
|
|
|
|
|
{publicityType:1,publicityName:"家长会"},
|
|
|
|
|
],
|
|
|
|
|
locale,
|
|
|
|
|
publicityDate:"",//公示日期时间
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created(){
|
|
|
|
|
this.getStageList();
|
|
|
|
|
if (this.$props.publicityId !== "") {
|
|
|
|
|
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) {
|
|
|
|
|
let stageList = resData.data;
|
|
|
|
|
if (stageList && stageList.length > 0) {
|
|
|
|
|
for (let i = 0, len = stageList.length; i < len; i++) {
|
|
|
|
|
stageList[i].createYear = stageList[i].stage_id;
|
|
|
|
|
stageList[i].createYearName = stageList[i].stage_name;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.stageList = stageList;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
publicityTypeChange:function (value) {
|
|
|
|
|
this.publicityType = value;
|
|
|
|
|
},
|
|
|
|
|
onRangeChange:function(value,dateString){
|
|
|
|
|
this.publicityDate = dateString;
|
|
|
|
|
},
|
|
|
|
|
onRangeOk:function (value) {
|
|
|
|
|
console.log(value)
|
|
|
|
|
},
|
|
|
|
|
stageChange: function (value) {
|
|
|
|
|
if (value.length > 0) {
|
|
|
|
|
this.stageId = value[0];
|
|
|
|
|
this.yearId = value[1];
|
|
|
|
|
} else {
|
|
|
|
|
this.stageId = "";
|
|
|
|
|
this.yearId = "";
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getInfo: function () {
|
|
|
|
|
let param = {
|
|
|
|
|
publicity_id: this.$props.publicityId,
|
|
|
|
|
}
|
|
|
|
|
this.InterfaceConfig.callInterface([{
|
|
|
|
|
url: InterConfig.getPublicityInfo.url,
|
|
|
|
|
params: param,
|
|
|
|
|
method: InterConfig.getPublicityInfo.method,
|
|
|
|
|
isTestLogin: InterConfig.getPublicityInfo.isTestLogin,
|
|
|
|
|
}], (result) => {
|
|
|
|
|
let resData = result[0].data;
|
|
|
|
|
if (resData.code === 2000) {
|
|
|
|
|
let info = resData.data;
|
|
|
|
|
this.publicityType = info.publicity_type;
|
|
|
|
|
this.publicityDate = info.publicity_date;
|
|
|
|
|
this.stageId = info.stage_id;
|
|
|
|
|
this.yearId = info.create_year;
|
|
|
|
|
this.defaultValue = [info.stage_id,info.create_year]
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
submit: function () {
|
|
|
|
|
if (this.publicityType === "") {
|
|
|
|
|
Modal.warning({
|
|
|
|
|
title: "请选择公示日期类型",
|
|
|
|
|
content: "",
|
|
|
|
|
centered: true
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.publicityDate === "") {
|
|
|
|
|
Modal.warning({
|
|
|
|
|
title: "请选择公示日期时间",
|
|
|
|
|
content: "",
|
|
|
|
|
centered: true
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.stageId === "") {
|
|
|
|
|
Modal.warning({
|
|
|
|
|
title: "请选择学段",
|
|
|
|
|
content: "",
|
|
|
|
|
centered: true
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.yearId === "") {
|
|
|
|
|
Modal.warning({
|
|
|
|
|
title: "请选择入学年份",
|
|
|
|
|
content: "",
|
|
|
|
|
centered: true
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let param = {
|
|
|
|
|
publicity_type:this.publicityType,
|
|
|
|
|
publicity_date: this.publicityDate,
|
|
|
|
|
stage_id:this.stageId,
|
|
|
|
|
create_year:this.yearId,
|
|
|
|
|
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.publicityId !== ""){
|
|
|
|
|
param.publicity_id = this.$props.publicityId;
|
|
|
|
|
}
|
|
|
|
|
this.pageLoading = true;
|
|
|
|
|
this.InterfaceConfig.callInterface([{
|
|
|
|
|
url: InterConfig.savePublicity.url,
|
|
|
|
|
params: param,
|
|
|
|
|
method: InterConfig.savePublicity.method,
|
|
|
|
|
isTestLogin: InterConfig.savePublicity.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,
|
|
|
|
|
ADatePicker: DatePicker,
|
|
|
|
|
ARangePicker:DatePicker.RangePicker,
|
|
|
|
|
ACascader: Cascader,
|
|
|
|
|
AButton: Button,
|
|
|
|
|
AIcon:Icon,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.club-activity-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>
|