|
@@ -2,6 +2,9 @@
|
|
|
<!-- 学生评价 -->
|
|
<!-- 学生评价 -->
|
|
|
<div class="studentEvaluate" @click="col">
|
|
<div class="studentEvaluate" @click="col">
|
|
|
<bar :tit="'学生评价'" :num="1">
|
|
<bar :tit="'学生评价'" :num="1">
|
|
|
|
|
+ <template v-slot:back>
|
|
|
|
|
+ <van-icon @click="SaveBack" name="arrow-left" />
|
|
|
|
|
+ </template>
|
|
|
<template v-slot:btn>
|
|
<template v-slot:btn>
|
|
|
<div v-if="!shareShow" style="font-size: 16px;font-weight: normal;" @click="save">发布</div>
|
|
<div v-if="!shareShow" style="font-size: 16px;font-weight: normal;" @click="save">发布</div>
|
|
|
<div v-else style="font-size: 16px;font-weight: normal;" @click="amend">修改</div>
|
|
<div v-else style="font-size: 16px;font-weight: normal;" @click="amend">修改</div>
|
|
@@ -81,14 +84,11 @@
|
|
|
</van-popup>
|
|
</van-popup>
|
|
|
</div>
|
|
</div>
|
|
|
<img class="rl" src="../../assets/images/eva/rl.png" alt="" />
|
|
<img class="rl" src="../../assets/images/eva/rl.png" alt="" />
|
|
|
- <div
|
|
|
|
|
- v-show="tim"
|
|
|
|
|
- style="position: absolute;bottom: 0;transform: translate(0,100%); left: 40px; color: red;font-size: 10px;"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <!-- <div v-show="tim" style="position: absolute;bottom: 0; color: red;font-size: 10px;">
|
|
|
请设置时间
|
|
请设置时间
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-show="tim" style="height: 10px;"></div>
|
|
|
|
|
|
|
+ <!-- <div v-show="tim" style="height: 10px;"></div> -->
|
|
|
|
|
|
|
|
<div class="claName" style="position: relative;">
|
|
<div class="claName" style="position: relative;">
|
|
|
<div class="tit">地点</div>
|
|
<div class="tit">地点</div>
|
|
@@ -145,8 +145,10 @@
|
|
|
<!-- 按钮 -->
|
|
<!-- 按钮 -->
|
|
|
<div class="submitBtn">
|
|
<div class="submitBtn">
|
|
|
<!-- <div class="btn" @click="isShowMask = true">删除</div> -->
|
|
<!-- <div class="btn" @click="isShowMask = true">删除</div> -->
|
|
|
- <div class="btn" v-if="shareShow" @click="repPop">重复添加</div>
|
|
|
|
|
- <div class="btn" v-if="shareShow" @click="repetitionSave">添加新纪录</div>
|
|
|
|
|
|
|
+ <!-- <div class="btn" v-if="shareShow" @click="repPop">重复添加</div>
|
|
|
|
|
+ <div class="btn" v-if="shareShow" @click="repetitionSave">添加新纪录</div> -->
|
|
|
|
|
+ <div class="btn" @click="repPop">重复添加</div>
|
|
|
|
|
+ <div class="btn" @click="repetitionSave">添加新纪录</div>
|
|
|
<div class="btn" v-if="!shareShow" @click="save">发布并返回</div>
|
|
<div class="btn" v-if="!shareShow" @click="save">发布并返回</div>
|
|
|
<div class="btn" v-else @click="amend">修改并返回</div>
|
|
<div class="btn" v-else @click="amend">修改并返回</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -165,7 +167,7 @@
|
|
|
|
|
|
|
|
<pop v-show="repShowMask">
|
|
<pop v-show="repShowMask">
|
|
|
<template v-slot:tit>提示</template>
|
|
<template v-slot:tit>提示</template>
|
|
|
- <template v-slot:con>确定重复添加吗</template>
|
|
|
|
|
|
|
+ <template v-slot:con>确定添加新纪录吗?</template>
|
|
|
<template v-slot:btn1>
|
|
<template v-slot:btn1>
|
|
|
<div class="btn" style="color: rgba(136,136,136,1);" @click="repShowMask = false">取消</div>
|
|
<div class="btn" style="color: rgba(136,136,136,1);" @click="repShowMask = false">取消</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -173,6 +175,17 @@
|
|
|
<div class="btn" style="color: rgba(251,67,25,1);" @click="repAddRecord">确认</div>
|
|
<div class="btn" style="color: rgba(251,67,25,1);" @click="repAddRecord">确认</div>
|
|
|
</template>
|
|
</template>
|
|
|
</pop>
|
|
</pop>
|
|
|
|
|
+
|
|
|
|
|
+ <pop v-show="backShowMask">
|
|
|
|
|
+ <template v-slot:tit>提示</template>
|
|
|
|
|
+ <template v-slot:con>是否放弃当前编辑内容?</template>
|
|
|
|
|
+ <template v-slot:btn1>
|
|
|
|
|
+ <div class="btn" style="color: rgba(136,136,136,1);" @click="backShowMask = false">取消</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-slot:btn2>
|
|
|
|
|
+ <div class="btn" style="color: rgba(251,67,25,1);" @click="confirmBack">确认</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </pop>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -217,6 +230,8 @@ export default {
|
|
|
|
|
|
|
|
// 重复添加弹出框判断
|
|
// 重复添加弹出框判断
|
|
|
repShowMask: false,
|
|
repShowMask: false,
|
|
|
|
|
+ // 返回页面时进行提示
|
|
|
|
|
+ backShowMask: false,
|
|
|
// 学生信息
|
|
// 学生信息
|
|
|
stuName: {},
|
|
stuName: {},
|
|
|
// 关联选项
|
|
// 关联选项
|
|
@@ -260,7 +275,7 @@ export default {
|
|
|
|
|
|
|
|
// 时间,学期未选择,提示选择红字警报
|
|
// 时间,学期未选择,提示选择红字警报
|
|
|
wei: false,
|
|
wei: false,
|
|
|
- tim: false,
|
|
|
|
|
|
|
+ // tim: false,
|
|
|
term: false
|
|
term: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -393,10 +408,10 @@ export default {
|
|
|
this.wei = true
|
|
this.wei = true
|
|
|
isOk = 1
|
|
isOk = 1
|
|
|
}
|
|
}
|
|
|
- if (this.visitTime === '') {
|
|
|
|
|
- this.tim = true
|
|
|
|
|
- isOk = 1
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (this.visitTime === '') {
|
|
|
|
|
+ // this.tim = true
|
|
|
|
|
+ // isOk = 1
|
|
|
|
|
+ // }
|
|
|
if (isOk === 1) return
|
|
if (isOk === 1) return
|
|
|
|
|
|
|
|
this.isShowMask = true
|
|
this.isShowMask = true
|
|
@@ -415,14 +430,15 @@ export default {
|
|
|
this.wei = true
|
|
this.wei = true
|
|
|
isOk = 1
|
|
isOk = 1
|
|
|
}
|
|
}
|
|
|
- if (this.visitTime === '') {
|
|
|
|
|
- this.tim = true
|
|
|
|
|
- isOk = 1
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (this.visitTime === '') {
|
|
|
|
|
+ // this.tim = true
|
|
|
|
|
+ // isOk = 1
|
|
|
|
|
+ // }
|
|
|
if (isOk === 1) return
|
|
if (isOk === 1) return
|
|
|
|
|
|
|
|
this.repShowMask = true
|
|
this.repShowMask = true
|
|
|
},
|
|
},
|
|
|
|
|
+ // 获取记录地点
|
|
|
getRecordPlace() {
|
|
getRecordPlace() {
|
|
|
const data = {
|
|
const data = {
|
|
|
org: this.$store.state.user.userinfo.org,
|
|
org: this.$store.state.user.userinfo.org,
|
|
@@ -471,9 +487,11 @@ export default {
|
|
|
// this.weiList = allsType
|
|
// this.weiList = allsType
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ // 显示地点选择框
|
|
|
selectPlace() {
|
|
selectPlace() {
|
|
|
this.placeShow = true
|
|
this.placeShow = true
|
|
|
},
|
|
},
|
|
|
|
|
+ // 选择地点点击事件
|
|
|
cho(i) {
|
|
cho(i) {
|
|
|
// console.log('i', i)
|
|
// console.log('i', i)
|
|
|
this.place = i.name
|
|
this.place = i.name
|
|
@@ -487,19 +505,59 @@ export default {
|
|
|
this.wei = true
|
|
this.wei = true
|
|
|
isOk = 1
|
|
isOk = 1
|
|
|
}
|
|
}
|
|
|
- if (this.visitTime === '') {
|
|
|
|
|
- this.tim = true
|
|
|
|
|
- isOk = 1
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (this.visitTime === '') {
|
|
|
|
|
+ // this.tim = true
|
|
|
|
|
+ // isOk = 1
|
|
|
|
|
+ // }
|
|
|
if (isOk === 1) return
|
|
if (isOk === 1) return
|
|
|
|
|
|
|
|
this.isShowMask = true
|
|
this.isShowMask = true
|
|
|
},
|
|
},
|
|
|
// 添加新纪录
|
|
// 添加新纪录
|
|
|
repAddRecord() {
|
|
repAddRecord() {
|
|
|
- this.uploadRecord()
|
|
|
|
|
|
|
+ const data = [
|
|
|
|
|
+ {
|
|
|
|
|
+ // uid: localStorage.getItem('userId'),
|
|
|
|
|
+ uid: this.studentInfo.userid,
|
|
|
|
|
+ tid: this.$store.state.user.userinfo.userid,
|
|
|
|
|
+ contact: this.selectSData.join(','),
|
|
|
|
|
+ type: this.selectWData.join(','),
|
|
|
|
|
+ timing: this.visitTime,
|
|
|
|
|
+ place: this.place,
|
|
|
|
|
+ observeCon: this.observeCon,
|
|
|
|
|
+ recordCon: this.recordCon,
|
|
|
|
|
+ imgList: this.imgList.join(','),
|
|
|
|
|
+ term: this.termData[0],
|
|
|
|
|
+ pid: this.placeId
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ // return console.log(data)
|
|
|
|
|
+ this.isShowMask = false
|
|
|
|
|
+
|
|
|
|
|
+ // return console.log(data)
|
|
|
|
|
+
|
|
|
|
|
+ insertRecord(data).then(res => {
|
|
|
|
|
+ // console.log(res)
|
|
|
|
|
+ if (res === 1) {
|
|
|
|
|
+ this.$toast({
|
|
|
|
|
+ message: '添加新纪录成功',
|
|
|
|
|
+ type: 'success'
|
|
|
|
|
+ })
|
|
|
|
|
+ this.selectSData = []
|
|
|
|
|
+ this.selectWData = []
|
|
|
|
|
+ this.getPresentDate()
|
|
|
|
|
+ this.place = ''
|
|
|
|
|
+ this.observeCon = ''
|
|
|
|
|
+ this.recordCon = ''
|
|
|
|
|
+ this.imgList = ''
|
|
|
|
|
+ this.repShowMask = false
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.$router.replace('/studentDetail')
|
|
|
|
|
+ }, 1000)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- // 上传评价
|
|
|
|
|
|
|
+ // 上传评价与添加新纪录
|
|
|
uploadRecord() {
|
|
uploadRecord() {
|
|
|
// 添加新纪录,关联人不能包含自己,要将自己删除
|
|
// 添加新纪录,关联人不能包含自己,要将自己删除
|
|
|
// this.selectSData.indexOf()
|
|
// this.selectSData.indexOf()
|
|
@@ -644,7 +702,14 @@ export default {
|
|
|
|
|
|
|
|
console.log(year, month, day, hours, minutes)
|
|
console.log(year, month, day, hours, minutes)
|
|
|
this.visitTime = `${year}-${month}-${day} ${hours}:${minutes}`
|
|
this.visitTime = `${year}-${month}-${day} ${hours}:${minutes}`
|
|
|
- console.log(this.visitTime)
|
|
|
|
|
|
|
+ // console.log(this.visitTime)
|
|
|
|
|
+ },
|
|
|
|
|
+ SaveBack() {
|
|
|
|
|
+ // console.log('好好好')
|
|
|
|
|
+ this.backShowMask = true
|
|
|
|
|
+ },
|
|
|
|
|
+ confirmBack() {
|
|
|
|
|
+ this.$router.go(-1)
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
onConfirm() {
|
|
onConfirm() {
|
|
@@ -703,19 +768,20 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
this.term = false
|
|
this.term = false
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
- visitTime(val) {
|
|
|
|
|
- // console.log('val', val)
|
|
|
|
|
- if (val === '') {
|
|
|
|
|
- this.tim = true
|
|
|
|
|
- } else {
|
|
|
|
|
- this.tim = false
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ // visitTime(val) {
|
|
|
|
|
+ // // console.log('val', val)
|
|
|
|
|
+ // if (val === '') {
|
|
|
|
|
+ // this.tim = true
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.tim = false
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
created() {
|
|
created() {
|
|
|
this.getRecordPlace()
|
|
this.getRecordPlace()
|
|
|
|
|
+ this.getPresentDate()
|
|
|
// 是否显示分享和继续记录按钮。添加按钮进来不显示
|
|
// 是否显示分享和继续记录按钮。添加按钮进来不显示
|
|
|
this.shareShow = this.$route.query.shareShow * 1
|
|
this.shareShow = this.$route.query.shareShow * 1
|
|
|
// console.log(this.shareShow)
|
|
// console.log(this.shareShow)
|