作者 mxd

学员访谈记录

<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
... ... @@ -25,7 +25,7 @@
</view>
<view class="card">
<view class="cell not-border">
<view class="cell">
<view class="cell-label">
班主任自我介绍
</view>
... ... @@ -35,7 +35,95 @@
</view>
</view>
</view>
<view class="cell not-border column">
<view class="cell-label">
了解学生信息(专业、学校、政治面貌、籍贯)
</view>
<view class="cell-content">
<textarea
v-model="content_one"
placeholder="请输入"
placeholder-class="textarea-placeholder"
>
</textarea>
</view>
</view>
<view class="cell not-border column">
<view class="cell-label">
第几次考编,之前有没有参加培训,有没有短板模块
</view>
<view class="cell-content">
<textarea
v-model="content_two"
placeholder="请输入"
placeholder-class="textarea-placeholder"
>
</textarea>
</view>
</view>
</view>
<view class="card">
<view class="cell">
<view class="cell-label">
介绍近期课程安排、纪律要求
</view>
<view class="cell-content">
<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="cell not-border column">
<view class="cell-label">
有无什么要求,是否适应
</view>
<view class="cell-content">
<textarea
v-model="content_three"
placeholder="请输入"
placeholder-class="textarea-placeholder"
>
</textarea>
</view>
</view>
</view>
<view class="card">
<view class="cell not-border">
<view class="cell-label">
入学测评成绩分析
</view>
<view class="cell-content">
<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="footer" >
<view v-if="options.id" class="btn del" @click="show = true">
删除
</view>
<view class="btn" @click="save_fuc">
保存
</view>
</view>
<u-modal
:show="show"
title="提示"
content="是否删除该记录?"
@confirm="del_fuc(options)"
@cancel="show = false"
:asyncClose="true"
:showCancelButton="true"
>
</u-modal>
</view>
</template>
... ... @@ -72,6 +160,8 @@
content_three:'',
datas_stu:'',
datas:'',
show: false
};
},
computed: {
... ... @@ -90,78 +180,67 @@
},
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('用户点击取消');
}
}
});
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)
this.show = false;
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 => {
this.show = false;
that1.htmlReset = 1
that1.btnkg = 0
// that1.$refs.htmlLoading.htmlReset_fuc(1)
console.log(e)
uni.showToast({
icon: 'none',
title: '获取数据失败,请检查您的网络连接'
})
})
},
stu_change(e){
var index=e.detail.value
... ... @@ -407,7 +486,7 @@
<style lang="scss" scoped>
.container {
padding: 25rpx;
padding: 25rpx 25rpx 140rpx;
}
.card {
... ... @@ -425,6 +504,7 @@
& .not-border {
border: 0;
}
&-label {
font-size: 30rpx;
font-family: PingFang SC;
... ... @@ -469,7 +549,59 @@
color: #fff;
}
}
textarea {
width: 100%;
height: 230;
background: #F5F6F8;
padding: 20rpx;
box-sizing: border-box;
}
:deep(.textarea-placeholder) {
color: #979797;
}
}
.column {
flex-direction: column;
.cell-label {
width: 100%;
}
.cell-content {
margin-top: 20rpx;
width: 100%;
}
}
}
.footer {
position: fixed;
left: 0;
bottom: 0;
z-index: 99;
width: 100%;
background-color: #fff;
padding: 16rpx 25rpx;
display: flex;
align-items: center;
.btn {
flex: 1;
height: 88rpx;
background: #2D81FF;
border-radius: 44rpx;
line-height: 88rpx;
font-size: 34rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
text-align: center;
&.del {
background: #EBEBEB;
color: #323232;
}
& + .btn {
margin-left: 20rpx;
}
}
}
</style>
\ No newline at end of file
... ...
<template>
<view>
<view class="stu_list">
<view class="add_li">
<picker v-if="datas_stu.length>0" mode="selector" :range="datas_stu" range-key="name" @change="stu_change">
<view class="add_li_box">
<view class="">
学员姓名
</view>
<view class="container">
<view class="card">
<picker v-if="datas_stu.length>0" mode="selector" :range="datas_stu" range-key="name" @change="stu_change">
<view class="cell">
<view class="cell-label">
学员姓名
</view>
<view class="cell-content">
<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>
</picker>
<picker mode="date" :value="sx_time" :start="startDate" :end="endDate" @change="bindDateChange">
<view class="cell">
<view class="cell-label">
访谈时间
</view>
<view class="">
<view class="cell-content">
{{sx_time?sx_time:'请选择'}}
</view>
</view>
</picker>
</view>
</picker>
<view class="add_li" v-for="(item,index) in diy_data">
<view class="add_li_tit">
{{item.title}}
</view>
<view class="add_li_content">
{{item.content}}
</view>
<view class="card">
<view class="cell">
<view class="cell-label">
自定义标题与内容
</view>
</view>
<view class="add_li">
<view class="add_li_box">
<view class="">
自定义标题与内容
</view>
<view class="cell-content">
<view class="add_diy" @click="tk_show=true">
添加
<view class="icon">+</view>
<view>
添加
</view>
</view>
</view>
</view>
<view
class="cell column"
v-for="(item,index) in diy_data"
:key="index"
:class="{'not-border': index === (diy_data.length -1)}"
>
<view class="cell-label">
{{item.title}}
</view>
<view class="cell-content">
{{item.content}}
</view>
</view>
</view>
<u-popup :show="tk_show" @close="close" @open="open">
<view class="tk_box_s">
<view class="pop_tit">
<view class="" @click="close">
取消
</view>
<view class="pop_tit_t" @click="save_diy">
确定
</view>
<view class="pop_tit">
<view class="" @click="close">
取消
</view>
<view class="pop_tit_t" @click="save_diy">
确定
</view>
<input class="diy_tit" type="text" placeholder="请输入标题" v-model="diy_tit">
<textarea class="diy_content" placeholder="请输入内容" v-model="diy_content"></textarea>
</view>
<input class="diy_tit" type="text" placeholder="请输入标题" v-model="diy_tit">
<textarea class="diy_content" placeholder="请输入内容" v-model="diy_content"></textarea>
</view>
</u-popup>
<view class="bz_add" >
<view class="" @click="save_fuc">
保存
</view>
<view v-if="options.id" class="del_btn" @click="del_fuc(options)">
<view class="footer" >
<view v-if="options.id" class="btn del" @click="show = true">
删除
</view>
<view class="btn" @click="save_fuc">
保存
</view>
</view>
<u-modal
:show="show"
title="提示"
content="是否删除该记录?"
@confirm="del_fuc(options)"
@cancel="show = false"
:asyncClose="true"
:showCancelButton="true"
>
</u-modal>
</view>
</template>
... ... @@ -105,7 +127,9 @@
diy_tit:'',
diy_content:'',
diy_data:[],
datas_stu:[]
datas_stu:[],
show: false
};
},
computed: {
... ... @@ -124,75 +148,64 @@
},
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/interviewr_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('用户点击取消');
}
}
});
var jkurl='teacher/interviewr_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 => {
this.show = false;
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 => {
this.show = false;
that1.htmlReset = 1
that1.btnkg = 0
// that1.$refs.htmlLoading.htmlReset_fuc(1)
console.log(e)
uni.showToast({
icon: 'none',
title: '获取数据失败,请检查您的网络连接'
})
})
},
stu_change(e){
var index=e.detail.value
... ... @@ -435,125 +448,177 @@
}
</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;
<style lang="scss" scoped>
.container {
padding: 25rpx 25rpx 140rpx;
}
.card {
padding: 0 30rpx;
background-color: #fff;
border-radius: 20rpx;
& + .card {
margin-top: 20rpx;
}
.cell {
padding: 30rpx 0;
display: flex;
align-items: center;
border-bottom: 1px solid #F3F3F7;
& .not-border {
border: 0;
}
.add_li_box{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
&-label {
font-size: 30rpx;
color: #545d71;
input{
font-family: PingFang SC;
font-weight: 500;
color: #000000;
}
&-content {
flex: 1;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #646464;
display: flex;
justify-content: flex-end;
input {
width: 100%;
text-align: right;
min-width: 0;
font-size: 30rpx;
}
.sf_v_btn_b{
display: flex;
align-items: center;
justify-content: center;
}
.icon {
color: #ACACAC;
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;
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_diy{
font-size: 30rpx;
color: #2D81FF;
}
textarea {
width: 100%;
height: 230;
background: #F5F6F8;
padding: 20rpx;
box-sizing: border-box;
}
:deep(.textarea-placeholder) {
color: #979797;
}
.add_diy{
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #646464;
display: flex;
align-items: center;
justify-content: flex-end;
.icon {
background: #2D81FF;
font-size: 24rpx;
margin-right: 20rpx;
width: 30rpx;
height: 30rpx;
text-align: center;
line-height: 30rpx;
color: #fff;
}
}
.add_li_tit{
font-size: 30rpx;
color: #545D71;
line-height: 43rpx;
margin-bottom: 12rpx;
}
.column {
flex-direction: column;
.cell-label {
width: 100%;
}
.add_li_content{
font-size: 30rpx;
color: #A6A9B1;
line-height: 43rpx;
.cell-content {
margin-top: 20rpx;
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;
.tk_box_s {
background: #ffffff;
.pop_tit{
width: 100%;
height: 90rpx;
background: #2D81FF;
border-radius: 10rpx;
height: 100rpx;
font-size: 30rpx;
color: #A9B1C0;
display: flex;
align-items: center;
justify-content: center;
justify-content: space-between;
padding: 0 30rpx;
.pop_tit_t{
color: #2D81FF;
}
}
.del_btn{
margin-top: 20rpx;
.diy_tit{
width: 100%;
height: 100rpx;
padding: 0 30rpx;
font-size: 30rpx;
color: #333;
border-bottom: 1px solid #EEEEEE;
}
.diy_content{
width: 100%;
height: 790rpx;
padding: 30rpx;
font-size: 30rpx;
color: #333;
box-sizing: border-box;
}
}
.pop_tit{
.footer {
position: fixed;
left: 0;
bottom: 0;
z-index: 99;
width: 100%;
height: 100rpx;
font-size: 30rpx;
color: #A9B1C0;
background-color: #fff;
padding: 16rpx 25rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
.pop_tit_t{
color: #2D81FF;
.btn {
flex: 1;
height: 88rpx;
background: #2D81FF;
border-radius: 44rpx;
line-height: 88rpx;
font-size: 34rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
text-align: center;
&.del {
background: #EBEBEB;
color: #323232;
}
& + .btn {
margin-left: 20rpx;
}
}
}
.tk_box_s{
// height: 600rpx;
background: #ffffff;
}
.diy_tit{
width: 100%;
height: 100rpx;
padding: 0 30rpx;
font-size: 30rpx;
color: #333;
border-bottom: 1px solid #EEEEEE;
}
.diy_content{
width: 100%;
height: 790rpx;
padding: 30rpx;
font-size: 30rpx;
color: #333;
box-sizing: border-box;
}
</style>
\ No newline at end of file
... ...
... ... @@ -319,6 +319,7 @@
background: #F5F6F8;
padding: 20rpx;
box-sizing: border-box;
font-size: 26rpx;
}
:deep(.textarea-placeholder) {
color: #979797;
... ...
<template>
<view class="wrap_box">
<!-- <uParse v-if="datas" :content="datas"></uParse> -->
<!-- stu_bz_index -->
<view class="tel_index_bg"></view>
<view class="bz_box">
<!-- <view class="stu_num">
<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
<view class="">
核对时间:{{sx_time}}<text class="icon icon-arrow-right-copy-copy"></text>
</view>
</picker>
<picker @change="bindPickerChange" :value="index" :range="tabs" range-key="title">
<view class="">
{{tabs[index].title}}
<text class="icon icon-arrow-right-copy-copy"></text>
</view>
</picker>
</view> -->
<view class="bz_tab">
<view v-for="(item,index) in tabs" class="tab_li" :class="{active:active==index}" @click="setac_fuc(index)">
{{item.title}}
</view>
</view>
<ftadd v-if="active==0" :options="options"></ftadd>
<ftadd1 v-else :options="options"></ftadd1>
<!-- <view class="stu_list">
</view> -->
</view>
<!-- <view class="bz_add" >
<view class="" @click="$service.jump" :data-url="'/pagesA/stu_ft_add/stu_ft_add?type='+active">
添加
</view>
</view> -->
<!-- 阻止滑动 -->
<!-- <view @touchmove.stop.prevent='test'></view> -->
</view>
</template>
<script>
import Vue from 'vue'
import {
mapState,
mapMutations
} from 'vuex'
var that
export default {
data() {
return {
options: '',
datas: '',
tabs: [{
title: '入学关怀'
},
{
title: '常规访谈'
},
],
stu_datas: [{
id: '2',
dk: '1'
},
{
id: '2',
dk: '1'
},
{
id: '2',
dk: ''
},
{
id: '2',
dk: '1'
},
{
id: '2',
dk: '1'
},
{
id: '2',
dk: '1'
},
{
id: '2',
dk: ''
},
{
id: '2',
dk: '1'
},
{
id: '2',
dk: '1'
},
{
id: '2',
dk: '1'
},
],
active:0
}
},
computed: {
...mapState(['hasLogin', 'forcedLogin', 'userName', 'userinfo', 'nowtime']),
startDate() {
return this.getDate('start');
},
endDate() {
return this.getDate('end');
}
},
onLoad(e) {
that = this
that.options = e || {}
console.log(e)
that.active=e.type
// that.getdata()
},
onShow() {
},
methods: {
// ...mapMutations(['wxshouquan','login']),
test() {},
setac_fuc(index){
that.active=index
},
save_fuc() {
uni.showToast({
icon: 'none',
title: '保存成功'
})
setTimeout(function() {
uni.navigateBack({
delta: 1
})
}, 1000)
},
bindDateChange(e) {
this.sx_time = e.detail.value
},
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.index = e.detail.value
},
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}`;
},
del_fuc(item) {
uni.showModal({
title: '提示',
content: '是否删除该备注',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
uni.showToast({
icon: 'none',
title: '删除成功'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
getdata() {
var datas = {
key: that.options.type
}
var jkurl = '/info'
that.$service.P_post(jkurl, datas).then(res => {
that.btnkg = 0
console.log(res)
if (res.code == 1) {
that.htmlReset = 0
var datas = res.data
console.log(typeof datas)
if (typeof datas == 'string') {
datas = JSON.parse(datas)
}
console.log(res)
that.datas = datas.info.content
if (datas.info.title) {
uni.setNavigationBarTitle({
title: datas.info.title
})
}
} else {
if (res.msg) {
uni.showToast({
icon: 'none',
title: res.msg
})
} else {
uni.showToast({
icon: 'none',
title: '获取数据失败'
})
}
}
}).catch(e => {
that.htmlReset = 1
that.btnkg = 0
// that.$refs.htmlLoading.htmlReset_fuc(1)
console.log(e)
uni.showToast({
icon: 'none',
title: '获取数据失败,请检查您的网络连接'
})
})
},
getimg(img) {
return service.getimg(img)
},
jump(e) {
var that = this
if (that.btnkg == 1) {
return
} else {
that.btnkg = 1
setTimeout(function() {
that.btnkg = 0
}, 2000)
}
console.log(e.currentTarget.dataset.type)
service.jump(e)
},
goback() {
uni.navigateBack()
},
func() {
// that.$store.commit('setSystem',datas.system)
}
}
}
</script>
<style lang="scss" scoped>
.wrap_box {
width: 100%;
// padding: 30rpx;
min-height: 100vh;
// #ifdef H5
min-height: calc(100vh - 44px);
// #endif
background: #F8F8F8;
position: relative;
padding-bottom: 10rpx;
}
.tel_index_bg {
position: absolute;
top: 0;
z-index: 1;
width: 100%;
min-height: 220rpx;
background: linear-gradient(0deg, #f8f8f8 0%, #5D9DFD 60%, #428EFE 70%, #2D81FF 100%);
}
.bz_box {
width: 100%;
position: relative;
z-index: 2;
padding:0 30rpx 30rpx;
.stu_num {
width: 100%;
height: 80rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: #fff;
justify-content: space-between;
.icon{
font-size: 24rpx;
margin-left: 10rpx;
}
}
}
.save_btn {
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: #FFFFFF;
width: 100%;
height: 90rpx;
background: #2D81FF;
border-radius: 10rpx;
margin-top: 40rpx;
}
.bz_tab{
width: 100%;
height: 90rpx;
display: flex;
align-items: center;
justify-content: space-around;
}
.tab_li{
color: rgba(255, 255, 255, .6);
font-size: 32rpx;
position: relative;
padding: 10rpx 0rpx;
&.active{
color: #fff;
&:after{
content:'';
position: absolute;
bottom: 0;
left: 50%;
margin-left: -19rpx;
width: 38rpx;
height: 5rpx;
background: #FFFFFF;
border-radius: 3rpx;
}
}
}
</style>
... ... @@ -3,7 +3,7 @@
<u-sticky>
<view class="bz_box">
<view class="bz_tab">
<view v-for="(item,index) in tabs" class="tab_li" :class="{active:active==index}" @click="setac_fuc(index)">
<view v-for="(item,index) in tabs" :key="index" class="tab_li" :class="{active:active==index}" @click="setac_fuc(index)">
{{item.title}}
</view>
</view>
... ... @@ -23,7 +23,7 @@
</u-sticky>
<view class="list">
<view class="item" v-for="(item,index) in datas" @click="jump_fuc(item)">
<view class="item" v-for="(item,index) in datas" :key="index" @click="jump_fuc(item)">
<view class="name">
{{item.name}}
</view>
... ...
<template>
<view class="wrap_box">
<!-- <uParse v-if="datas" :content="datas"></uParse> -->
<!-- stu_bz_index -->
<view class="tel_index_bg"></view>
<view class="bz_box">
<ftadd :options="options"></ftadd>
</view>
<ftadd :options="options"></ftadd>
</view>
</template>
... ...
<template>
<view class="wrap_box">
<!-- <uParse v-if="datas" :content="datas"></uParse> -->
<!-- stu_bz_index -->
<view class="tel_index_bg"></view>
<view class="bz_box">
<ftadd1 :options="options"></ftadd1>
</view>
<ftadd1 :options="options"></ftadd1>
</view>
</template>
... ...