|
@@ -107,7 +107,7 @@
|
|
|
<!-- 上传图片开始 -->
|
|
<!-- 上传图片开始 -->
|
|
|
<div class="uploadImgTit">
|
|
<div class="uploadImgTit">
|
|
|
<div>图片上传</div>
|
|
<div>图片上传</div>
|
|
|
- <div>{{ imgList.length }}/10</div>
|
|
|
|
|
|
|
+ <!-- <div>{{ imgList.length }}/10</div> -->
|
|
|
</div>
|
|
</div>
|
|
|
<div class="uploadImg">
|
|
<div class="uploadImg">
|
|
|
<image-component @getImage="getImage" :imgList.sync="imgList"></image-component>
|
|
<image-component @getImage="getImage" :imgList.sync="imgList"></image-component>
|
|
@@ -118,8 +118,8 @@
|
|
|
<!-- 按钮 -->
|
|
<!-- 按钮 -->
|
|
|
<div class="submitBtn">
|
|
<div class="submitBtn">
|
|
|
<!-- <div class="btn" @click="isShowMask = true">删除</div> -->
|
|
<!-- <div class="btn" @click="isShowMask = true">删除</div> -->
|
|
|
- <!-- <div class="btn" @click="isShowMask = true">重复添加</div>
|
|
|
|
|
- <div class="btn">添加新记录</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="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>
|
|
@@ -135,6 +135,17 @@
|
|
|
<div class="btn" v-else style="color: rgba(251,67,25,1);" @click="updateRecord">确认</div>
|
|
<div class="btn" v-else style="color: rgba(251,67,25,1);" @click="updateRecord">确认</div>
|
|
|
</template>
|
|
</template>
|
|
|
</pop>
|
|
</pop>
|
|
|
|
|
+
|
|
|
|
|
+ <pop v-show="repShowMask">
|
|
|
|
|
+ <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="repShowMask = false">取消</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-slot:btn2>
|
|
|
|
|
+ <div class="btn" style="color: rgba(251,67,25,1);" @click="repAddRecord">确认</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </pop>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -176,6 +187,8 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
studentInfo: {},
|
|
studentInfo: {},
|
|
|
|
|
|
|
|
|
|
+ // 重复添加弹出框判断
|
|
|
|
|
+ repShowMask: false,
|
|
|
// 学生信息
|
|
// 学生信息
|
|
|
stuName: {},
|
|
stuName: {},
|
|
|
// 关联选项
|
|
// 关联选项
|
|
@@ -212,6 +225,7 @@ export default {
|
|
|
minDate: '',
|
|
minDate: '',
|
|
|
maxDate: '',
|
|
maxDate: '',
|
|
|
|
|
|
|
|
|
|
+ // 时间,学期未选择,提示选择红字警报
|
|
|
wei: false,
|
|
wei: false,
|
|
|
tim: false,
|
|
tim: false,
|
|
|
term: false
|
|
term: false
|
|
@@ -227,7 +241,7 @@ export default {
|
|
|
|
|
|
|
|
selectStudentDetail(stuData).then(res => {
|
|
selectStudentDetail(stuData).then(res => {
|
|
|
this.studentInfo = res[0][0]
|
|
this.studentInfo = res[0][0]
|
|
|
- // console.log('获取学生信息', this.studentInfo)
|
|
|
|
|
|
|
+ console.log('获取学生信息', this.studentInfo)
|
|
|
|
|
|
|
|
// 获取班学生列表
|
|
// 获取班学生列表
|
|
|
const data2 = {
|
|
const data2 = {
|
|
@@ -242,6 +256,8 @@ export default {
|
|
|
// 获取纬度筛选框
|
|
// 获取纬度筛选框
|
|
|
|
|
|
|
|
this.getWei()
|
|
this.getWei()
|
|
|
|
|
+
|
|
|
|
|
+ this.getTermData()
|
|
|
// selectVeiDoo().then(res => {
|
|
// selectVeiDoo().then(res => {
|
|
|
// this.weiList = res[0]
|
|
// this.weiList = res[0]
|
|
|
// // console.log('this.weiList', this.weiList)
|
|
// // console.log('this.weiList', this.weiList)
|
|
@@ -250,16 +266,6 @@ export default {
|
|
|
// console.log('获取筛选项22222222', data3)
|
|
// console.log('获取筛选项22222222', data3)
|
|
|
|
|
|
|
|
// 获取学期筛选框
|
|
// 获取学期筛选框
|
|
|
- selectTerm().then(res => {
|
|
|
|
|
- // console.log('获取学期筛选框', res)
|
|
|
|
|
- res[0].forEach(e => {
|
|
|
|
|
- // console.log(e)
|
|
|
|
|
- if (e.defaultC === 1) {
|
|
|
|
|
- this.termData.push(e.id)
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- this.termList = res[0]
|
|
|
|
|
- })
|
|
|
|
|
|
|
|
|
|
// 获取班学生列表
|
|
// 获取班学生列表
|
|
|
// const data2 = {
|
|
// const data2 = {
|
|
@@ -276,6 +282,18 @@ export default {
|
|
|
// console.log('this.studentList', this.studentList)
|
|
// console.log('this.studentList', this.studentList)
|
|
|
// })
|
|
// })
|
|
|
},
|
|
},
|
|
|
|
|
+ getTermData() {
|
|
|
|
|
+ selectTerm().then(res => {
|
|
|
|
|
+ // console.log('获取学期筛选框', res)
|
|
|
|
|
+ res[0].forEach(e => {
|
|
|
|
|
+ // console.log(e)
|
|
|
|
|
+ if (e.defaultC === 1) {
|
|
|
|
|
+ this.termData.push(e.id)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ this.termList = res[0]
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
getWei() {
|
|
getWei() {
|
|
|
const data3 = {
|
|
const data3 = {
|
|
|
org: this.$store.state.user.userinfo.org,
|
|
org: this.$store.state.user.userinfo.org,
|
|
@@ -333,6 +351,7 @@ export default {
|
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
|
},
|
|
},
|
|
|
save() {
|
|
save() {
|
|
|
|
|
+ // 判断是否填写完整,是否让他继续往下走
|
|
|
let isOk = 0
|
|
let isOk = 0
|
|
|
if (this.selectWData.length === 0) {
|
|
if (this.selectWData.length === 0) {
|
|
|
this.wei = true
|
|
this.wei = true
|
|
@@ -346,6 +365,27 @@ export default {
|
|
|
|
|
|
|
|
this.isShowMask = true
|
|
this.isShowMask = true
|
|
|
},
|
|
},
|
|
|
|
|
+ repPop() {
|
|
|
|
|
+ this.recordCon = ''
|
|
|
|
|
+ this.imgList = []
|
|
|
|
|
+ this.getPresentDate()
|
|
|
|
|
+ },
|
|
|
|
|
+ repetitionSave() {
|
|
|
|
|
+ let isOk = 0
|
|
|
|
|
+
|
|
|
|
|
+ if (this.selectWData.length === 0) {
|
|
|
|
|
+ this.wei = true
|
|
|
|
|
+ isOk = 1
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.visitTime === '') {
|
|
|
|
|
+ this.tim = true
|
|
|
|
|
+ isOk = 1
|
|
|
|
|
+ }
|
|
|
|
|
+ if (isOk === 1) return
|
|
|
|
|
+
|
|
|
|
|
+ this.repShowMask = true
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
amend() {
|
|
amend() {
|
|
|
let isOk = 0
|
|
let isOk = 0
|
|
|
// console.log(this.$store.state);
|
|
// console.log(this.$store.state);
|
|
@@ -361,11 +401,19 @@ export default {
|
|
|
|
|
|
|
|
this.isShowMask = true
|
|
this.isShowMask = true
|
|
|
},
|
|
},
|
|
|
|
|
+ // 添加新纪录
|
|
|
|
|
+ repAddRecord() {
|
|
|
|
|
+ this.uploadRecord()
|
|
|
|
|
+ },
|
|
|
// 上传评价
|
|
// 上传评价
|
|
|
uploadRecord() {
|
|
uploadRecord() {
|
|
|
|
|
+ // 添加新纪录,关联人不能包含自己,要将自己删除
|
|
|
|
|
+ // this.selectSData.indexOf()
|
|
|
|
|
+
|
|
|
const data = [
|
|
const data = [
|
|
|
{
|
|
{
|
|
|
- uid: localStorage.getItem('userId'),
|
|
|
|
|
|
|
+ // uid: localStorage.getItem('userId'),
|
|
|
|
|
+ uid: this.studentInfo.userid,
|
|
|
tid: this.$store.state.user.userinfo.userid,
|
|
tid: this.$store.state.user.userinfo.userid,
|
|
|
contact: this.selectSData.join(','),
|
|
contact: this.selectSData.join(','),
|
|
|
type: this.selectWData.join(','),
|
|
type: this.selectWData.join(','),
|
|
@@ -440,12 +488,15 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 填写页面数据
|
|
// 填写页面数据
|
|
|
getRecord() {
|
|
getRecord() {
|
|
|
|
|
+ this.getWei()
|
|
|
|
|
+
|
|
|
|
|
+ this.getTermData()
|
|
|
const data = {
|
|
const data = {
|
|
|
id: this.$route.query.rid
|
|
id: this.$route.query.rid
|
|
|
}
|
|
}
|
|
|
// console.log('getRecord', this.$route.query.rid)
|
|
// console.log('getRecord', this.$route.query.rid)
|
|
|
selectRecordDetail(data).then(res => {
|
|
selectRecordDetail(data).then(res => {
|
|
|
- // console.log('获取单个学生记录详情', res[0][0])
|
|
|
|
|
|
|
+ console.log('获取单个学生记录详情', res[0][0])
|
|
|
const allData = res[0][0]
|
|
const allData = res[0][0]
|
|
|
if (allData.contact !== '') {
|
|
if (allData.contact !== '') {
|
|
|
this.selectSData = allData.contact.split(',')
|
|
this.selectSData = allData.contact.split(',')
|
|
@@ -453,6 +504,10 @@ export default {
|
|
|
if (allData.type !== '') {
|
|
if (allData.type !== '') {
|
|
|
this.selectWData = allData.type.split(',')
|
|
this.selectWData = allData.type.split(',')
|
|
|
}
|
|
}
|
|
|
|
|
+ this.studentInfo.name = allData.name
|
|
|
|
|
+ this.studentInfo.cname = allData.cname
|
|
|
|
|
+ this.studentInfo.classid = allData.classid
|
|
|
|
|
+ this.studentInfo.userid = allData.sid
|
|
|
|
|
|
|
|
this.visitTime = allData.recordDate
|
|
this.visitTime = allData.recordDate
|
|
|
this.place = allData.place
|
|
this.place = allData.place
|
|
@@ -464,9 +519,36 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.termData = [allData.term]
|
|
this.termData = [allData.term]
|
|
|
|
|
|
|
|
|
|
+ const data2 = {
|
|
|
|
|
+ cid: this.studentInfo.classid,
|
|
|
|
|
+ uid: allData.sid
|
|
|
|
|
+ }
|
|
|
|
|
+ // console.log('获取班学生列表', data2)
|
|
|
|
|
+ selectManyClassStudent(data2).then(res => {
|
|
|
|
|
+ this.studentList = res[0]
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
// console.log('selectWData', this.selectWData)
|
|
// console.log('selectWData', this.selectWData)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ getPresentDate() {
|
|
|
|
|
+ const currentTime = new Date()
|
|
|
|
|
+ const year = currentTime.getFullYear()
|
|
|
|
|
+ let month = currentTime.getMonth() + 1 // 月份从0开始,因此需要加1
|
|
|
|
|
+ month = (month < 10 ? '0' : '') + month
|
|
|
|
|
+ let day = currentTime.getDate()
|
|
|
|
|
+ day = (day < 10 ? '0' : '') + day
|
|
|
|
|
+
|
|
|
|
|
+ let hours = currentTime.getHours()
|
|
|
|
|
+ hours = (hours < 10 ? '0' : '') + hours
|
|
|
|
|
+
|
|
|
|
|
+ let minutes = currentTime.getMinutes()
|
|
|
|
|
+ minutes = (minutes < 10 ? '0' : '') + minutes
|
|
|
|
|
+
|
|
|
|
|
+ console.log(year, month, day, hours, minutes)
|
|
|
|
|
+ this.visitTime = `${year}-${month}-${day} ${hours}:${minutes}`
|
|
|
|
|
+ console.log(this.visitTime)
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
onConfirm() {
|
|
onConfirm() {
|
|
|
this.showPicker = false
|
|
this.showPicker = false
|
|
@@ -542,8 +624,9 @@ export default {
|
|
|
if (this.$route.query.shareShow * 1 === 1) {
|
|
if (this.$route.query.shareShow * 1 === 1) {
|
|
|
// console.log('aaaaaaaaaaaaaaaaaaaaa')
|
|
// console.log('aaaaaaaaaaaaaaaaaaaaa')
|
|
|
this.getRecord()
|
|
this.getRecord()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.getData()
|
|
|
}
|
|
}
|
|
|
- this.getData()
|
|
|
|
|
// console.log(this.$route.query)
|
|
// console.log(this.$route.query)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|