|
|
|
<template>
|
|
|
|
<view>
|
|
|
|
<view class="stu_list">
|
|
|
|
<!-- datas_stu -->
|
|
|
|
<view class="add_li">
|
|
|
|
<picker mode="selector" :range="datas_stu" range-key="name" @change="stu_change">
|
|
|
|
<view class="add_li_box">
|
|
|
|
<view class="">
|
|
|
|
学员姓名
|
|
|
|
</view>
|
|
|
|
<input type="text" placeholder="请选择" v-model="name" disabled="true">
|
|
|
|
</view>
|
|
|
|
</picker>
|
|
|
|
</view>
|
|
|
|
<view class="add_li">
|
|
|
|
<picker mode="date" :value="sx_time" :start="startDate" :end="endDate" @change="bindDateChange">
|
|
|
|
<view class="add_li_box">
|
|
|
|
<view class="">
|
|
|
|
访谈时间
|
|
|
|
</view>
|
|
|
|
<view class="">
|
|
|
|
{{sx_time?sx_time:'请选择'}}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</picker>
|
|
|
|
</view>
|
|
|
|
<view class="add_li">
|
|
|
|
<view class="add_li_box">
|
|
|
|
<view class="">
|
|
|
|
班主任自我介绍
|
|
|
|
</view>
|
|
|
|
<view class="sf_v_btn_b" :class="{active:is_teacher==1}" @click="set_tch">
|
|
|
|
<text class="icon icon-duigou"></text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="add_li">
|
|
|
|
<view class="add_li_tit">
|
|
|
|
了解学生信息(专业、学校、政治面貌、籍贯)
|
|
|
|
</view>
|
|
|
|
<textarea class="add_li_content" placeholder="请输入" v-model="content_one"></textarea>
|
|
|
|
</view>
|
|
|
|
<view class="add_li">
|
|
|
|
<view class="add_li_tit">
|
|
|
|
第几次考编,之前有没有参加培训,有没有短板模块
|
|
|
|
</view>
|
|
|
|
<textarea class="add_li_content" placeholder="请输入" v-model="content_two"></textarea>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<view class="add_li">
|
|
|
|
<view class="add_li_box">
|
|
|
|
<view class="">
|
|
|
|
介绍近期课程安排、纪律要求
|
|
|
|
</view>
|
|
|
|
<view class="sf_v_btn_b" :class="{active:is_introduce==1}" @click="set_tch1">
|
|
|
|
<text class="icon icon-duigou"></text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="add_li">
|
|
|
|
<view class="add_li_tit">
|
|
|
|
有无什么要求,是否适应
|
|
|
|
</view>
|
|
|
|
<textarea class="add_li_content" placeholder="请输入" v-model="content_three"></textarea>
|
|
|
|
</view>
|
|
|
|
<view class="add_li">
|
|
|
|
<view class="add_li_box">
|
|
|
|
<view class="">
|
|
|
|
入学测评成绩分析
|
|
|
|
</view>
|
|
|
|
<view class="sf_v_btn_b" :class="{active:is_result==1}" @click="set_tch2">
|
|
|
|
<text class="icon icon-duigou"></text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
<view class="bz_add" >
|
|
|
|
<view class="" @click="save_fuc">
|
|
|
|
保存
|
|
|
|
</view>
|
|
|
|
<view v-if="options.id" class="del_btn" @click="del_fuc(options)">
|
|
|
|
删除
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Vue from 'vue'
|
|
|
|
import {
|
|
|
|
mapState,
|
|
|
|
mapMutations
|
|
|
|
} from 'vuex'
|
|
|
|
var that1
|
|
|
|
export default {
|
|
|
|
name:"ft_add",
|
|
|
|
props: {
|
|
|
|
options:{
|
|
|
|
type: Object,
|
|
|
|
default: function () {
|
|
|
|
return {}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
id:'',
|
|
|
|
uid:'',
|
|
|
|
name:'',
|
|
|
|
sx_time:'',
|
|
|
|
is_teacher:2,
|
|
|
|
is_introduce:2,
|
|
|
|
is_result:0,
|
|
|
|
content_one:'',
|
|
|
|
content_two:'',
|
|
|
|
content_three:'',
|
|
|
|
datas_stu:'',
|
|
|
|
datas:'',
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...mapState(['hasLogin', 'forcedLogin', 'userName', 'userinfo', 'nowtime']),
|
|
|
|
startDate() {
|
|
|
|
return this.getDate('start');
|
|
|
|
},
|
|
|
|
endDate() {
|
|
|
|
return this.getDate('end');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
that1=this
|
|
|
|
that1.getdata_stu()
|
|
|
|
|
|
|
|
},
|
|
|
|
methods:{
|
|
|
|
del_fuc(item){
|
|
|
|
//teacher/interviewr_del 常规访谈删除接口
|
|
|
|
//teacher/interview_del 入学关怀删除接口
|
|
|
|
uni.showModal({
|
|
|
|
title: '提示',
|
|
|
|
content: '是否删除该记录',
|
|
|
|
success: function (res) {
|
|
|
|
if (res.confirm) {
|
|
|
|
console.log('用户点击确定');
|
|
|
|
var jkurl='/teacher/interview_del'
|
|
|
|
// if(that.active==1){
|
|
|
|
// kurl='teacher/interview_del'
|
|
|
|
// }
|
|
|
|
var datas={
|
|
|
|
id:item.id
|
|
|
|
// address_id:''
|
|
|
|
}
|
|
|
|
var header={
|
|
|
|
'content-type': 'application/json',
|
|
|
|
}
|
|
|
|
// that.$service.P_post(jkurl, datas,header).then(res => {
|
|
|
|
that1.$service.P_post(jkurl, datas).then(res => {
|
|
|
|
that1.btnkg = 0
|
|
|
|
console.log(res)
|
|
|
|
if (res.code == 1){
|
|
|
|
that1.htmlReset = 0
|
|
|
|
var datas = res.data
|
|
|
|
console.log(typeof datas)
|
|
|
|
|
|
|
|
if (typeof datas == 'string') {
|
|
|
|
datas = JSON.parse(datas)
|
|
|
|
}
|
|
|
|
console.log(res)
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
icon:'none',
|
|
|
|
title:'删除成功'
|
|
|
|
})
|
|
|
|
// that1.datas.splice(index,1)
|
|
|
|
setTimeout(()=>{
|
|
|
|
uni.navigateBack({
|
|
|
|
delta:1
|
|
|
|
})
|
|
|
|
},1000)
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if (res.msg) {
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: res.msg
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: '获取数据失败'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch(e => {
|
|
|
|
that1.htmlReset = 1
|
|
|
|
that1.btnkg = 0
|
|
|
|
// that1.$refs.htmlLoading.htmlReset_fuc(1)
|
|
|
|
console.log(e)
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: '获取数据失败,请检查您的网络连接'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else if (res.cancel) {
|
|
|
|
console.log('用户点击取消');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
stu_change(e){
|
|
|
|
var index=e.detail.value
|
|
|
|
this.name = that1.datas_stu[index].name
|
|
|
|
this.uid = that1.datas_stu[index].id
|
|
|
|
},
|
|
|
|
set_tch(){
|
|
|
|
if(that1.is_teacher==1){
|
|
|
|
that1.is_teacher=2
|
|
|
|
}else{
|
|
|
|
that1.is_teacher=1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
set_tch1(){
|
|
|
|
if(that1.is_introduce==1){
|
|
|
|
that1.is_introduce=2
|
|
|
|
}else{
|
|
|
|
that1.is_introduce=1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
set_tch2(){
|
|
|
|
if(that1.is_result==1){
|
|
|
|
that1.is_result=2
|
|
|
|
}else{
|
|
|
|
that1.is_result=1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
getdata_stu() {
|
|
|
|
|
|
|
|
var jkurl="/teacher/student"
|
|
|
|
var datas={
|
|
|
|
is_interview: 1
|
|
|
|
// page:that1.page,
|
|
|
|
}
|
|
|
|
// if(that1.data_last == true){
|
|
|
|
// return
|
|
|
|
// }
|
|
|
|
if (that1.btnkg == 1) {
|
|
|
|
return
|
|
|
|
} else {
|
|
|
|
that1.btnkg = 1
|
|
|
|
}
|
|
|
|
var page_now=1
|
|
|
|
that1.$service.P_post(jkurl, datas).then(res => {
|
|
|
|
that1.btnkg = 0
|
|
|
|
console.log(res)
|
|
|
|
if (res.code == 1) {
|
|
|
|
var datas = res.data
|
|
|
|
console.log(typeof datas)
|
|
|
|
|
|
|
|
if (typeof datas == 'string') {
|
|
|
|
datas = JSON.parse(datas)
|
|
|
|
}
|
|
|
|
|
|
|
|
if (page_now == 1) {
|
|
|
|
|
|
|
|
that1.datas_stu = datas
|
|
|
|
if(that1.options&&that1.options.id){
|
|
|
|
that1.getdata()
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
// if (datas.data.length == 0) {
|
|
|
|
// that.data_last = true
|
|
|
|
// return
|
|
|
|
// }
|
|
|
|
// that.data_last = false
|
|
|
|
// that.datas = that.datas.concat(datas.data)
|
|
|
|
}
|
|
|
|
// that1.page++
|
|
|
|
|
|
|
|
} else {
|
|
|
|
if (res.msg) {
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: res.msg
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: '操作失败'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch(e => {
|
|
|
|
that1.btnkg = 0
|
|
|
|
console.log(e)
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: '操作失败'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
getdata() {
|
|
|
|
|
|
|
|
var jkurl="/teacher/interview_show"
|
|
|
|
var datas={
|
|
|
|
id:that1.options.id,
|
|
|
|
|
|
|
|
}
|
|
|
|
// if(that1.data_last == true){
|
|
|
|
// return
|
|
|
|
// }
|
|
|
|
|
|
|
|
if (that1.btnkg == 1) {
|
|
|
|
return
|
|
|
|
} else {
|
|
|
|
that1.btnkg = 1
|
|
|
|
}
|
|
|
|
var page_now=that1.page
|
|
|
|
that1.$service.P_post(jkurl, datas).then(res => {
|
|
|
|
that1.btnkg = 0
|
|
|
|
console.log(res)
|
|
|
|
if (res.code == 1) {
|
|
|
|
var datas = res.data
|
|
|
|
console.log(typeof datas)
|
|
|
|
|
|
|
|
if (typeof datas == 'string') {
|
|
|
|
datas = JSON.parse(datas)
|
|
|
|
}
|
|
|
|
|
|
|
|
that1.datas=datas
|
|
|
|
that1.id=datas.id
|
|
|
|
that1.uid=datas.uid
|
|
|
|
that1.name=datas.name
|
|
|
|
that1.is_teacher=datas.is_teacher
|
|
|
|
that1.content_one=datas.content_one
|
|
|
|
that1.content_two=datas.content_two
|
|
|
|
that1.is_introduce=datas.is_introduce
|
|
|
|
that1.content_three=datas.content_three
|
|
|
|
that1.is_result=datas.is_result
|
|
|
|
that1.sx_time=datas.add_time
|
|
|
|
} else {
|
|
|
|
if (res.msg) {
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: res.msg
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: '操作失败'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch(e => {
|
|
|
|
that1.btnkg = 0
|
|
|
|
console.log(e)
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: '操作失败'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
bindDateChange(e) {
|
|
|
|
var sx_time = e.detail.value
|
|
|
|
sx_time=sx_time.split('-')
|
|
|
|
sx_time=sx_time.join('/')
|
|
|
|
that1.sx_time=sx_time
|
|
|
|
},
|
|
|
|
save_fuc() {
|
|
|
|
var jkurl="/teacher/interview_add"
|
|
|
|
var datas={
|
|
|
|
uid:that1.uid,
|
|
|
|
name:that1.name,
|
|
|
|
is_teacher:that1.is_teacher,
|
|
|
|
content_one:that1.content_one,
|
|
|
|
content_two:that1.content_two,
|
|
|
|
is_introduce:that1.is_introduce,
|
|
|
|
content_three:that1.content_three,
|
|
|
|
is_result:that1.is_result,
|
|
|
|
add_time:that1.sx_time
|
|
|
|
}
|
|
|
|
if(that1.id){
|
|
|
|
jkurl="/teacher/interview_edit"
|
|
|
|
datas={
|
|
|
|
id:that1.id,
|
|
|
|
...datas
|
|
|
|
}
|
|
|
|
}
|
|
|
|
that1.$service.P_post(jkurl, datas).then(res => {
|
|
|
|
that1.btnkg = 0
|
|
|
|
console.log(res)
|
|
|
|
if (res.code == 1) {
|
|
|
|
var datas = res.data
|
|
|
|
console.log(typeof datas)
|
|
|
|
|
|
|
|
if (typeof datas == 'string') {
|
|
|
|
datas = JSON.parse(datas)
|
|
|
|
}
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: '保存成功'
|
|
|
|
})
|
|
|
|
setTimeout(function() {
|
|
|
|
uni.navigateBack({
|
|
|
|
delta: 1
|
|
|
|
})
|
|
|
|
}, 1000)
|
|
|
|
} else {
|
|
|
|
if (res.msg) {
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: res.msg
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: '操作失败'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch(e => {
|
|
|
|
that1.btnkg = 0
|
|
|
|
console.log(e)
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: '操作失败'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
getDate(type) {
|
|
|
|
const date = new Date();
|
|
|
|
let year = date.getFullYear();
|
|
|
|
let month = date.getMonth() + 1;
|
|
|
|
let day = date.getDate();
|
|
|
|
|
|
|
|
if (type === 'start') {
|
|
|
|
year = year - 60;
|
|
|
|
} else if (type === 'end') {
|
|
|
|
year = year;
|
|
|
|
}
|
|
|
|
month = month > 9 ? month : '0' + month;
|
|
|
|
day = day > 9 ? day : '0' + day;
|
|
|
|
return `${year}-${month}-${day}`;
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
.stu_list {
|
|
|
|
width: 100%;
|
|
|
|
min-height: 100rpx;
|
|
|
|
background: #FFFFFF;
|
|
|
|
border-radius: 10rpx;
|
|
|
|
.add_li{
|
|
|
|
width: 100%;
|
|
|
|
min-height: 90rpx;
|
|
|
|
padding:28rpx 30rpx;
|
|
|
|
&+.add_li{
|
|
|
|
border-top: 1px solid #eee;
|
|
|
|
}
|
|
|
|
.add_li_box{
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
font-size: 30rpx;
|
|
|
|
color: #545d71;
|
|
|
|
input{
|
|
|
|
text-align: right;
|
|
|
|
min-width: 0;
|
|
|
|
font-size: 30rpx;
|
|
|
|
}
|
|
|
|
.sf_v_btn_b{
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
font-size: 18rpx;
|
|
|
|
color: #fff;
|
|
|
|
width: 32rpx;
|
|
|
|
height: 32rpx;
|
|
|
|
border: 1px solid #DEDEDE;
|
|
|
|
border-radius: 8rpx;
|
|
|
|
&.active{
|
|
|
|
background: #2D81FF;
|
|
|
|
border: 1px solid #2D81FF;
|
|
|
|
}
|
|
|
|
text{
|
|
|
|
font-size: 18rpx;
|
|
|
|
line-height: 20rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.add_li_tit{
|
|
|
|
font-size: 30rpx;
|
|
|
|
color: #545D71;
|
|
|
|
line-height: 43rpx;
|
|
|
|
margin-bottom: 12rpx;
|
|
|
|
}
|
|
|
|
.add_li_content{
|
|
|
|
font-size: 30rpx;
|
|
|
|
color: #A6A9B1;
|
|
|
|
line-height: 43rpx;
|
|
|
|
width: 100%;
|
|
|
|
height: 120rpx;
|
|
|
|
letter-spacing:0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.bz_add{
|
|
|
|
width: 100%;
|
|
|
|
// position: fixed;
|
|
|
|
// bottom: 0;
|
|
|
|
// background: #f8f8f8;
|
|
|
|
// z-index: 800;
|
|
|
|
// left: 0;
|
|
|
|
padding: 30rpx 0;
|
|
|
|
view{
|
|
|
|
font-size: 32rpx;
|
|
|
|
color: #FFFFFF;
|
|
|
|
width: 100%;
|
|
|
|
height: 90rpx;
|
|
|
|
background: #2D81FF;
|
|
|
|
border-radius: 10rpx;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
.del_btn{
|
|
|
|
margin-top: 20rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style> |
|
|
\ No newline at end of file |
...
|
...
|
|