用户端
This commit is contained in:
@@ -175,23 +175,18 @@
|
||||
},
|
||||
onLoad(e) {
|
||||
uni.hideTabBar();
|
||||
this.thisTask = JSON.parse(e.options)
|
||||
console.log('e', this.thisTask)
|
||||
|
||||
if (this.thisTask.img != '') {
|
||||
var imgs = this.thisTask.img.split(',')
|
||||
imgs = imgs.forEach((item, index) => {
|
||||
this.FileList11.push({
|
||||
url: item
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.FileList11 = []
|
||||
}
|
||||
console.log('this.FileList', this.FileList)
|
||||
// this.thisTask = JSON.parse(e.options)
|
||||
console.log('e',e)
|
||||
if(e.id){
|
||||
this.thisTask.id = e.id
|
||||
this.getTaskInfo()
|
||||
this.getZuoyeList()
|
||||
}
|
||||
|
||||
// console.log('this.FileList', this.FileList)
|
||||
// this.TaskId = e.id
|
||||
this.getUserInfo()
|
||||
this.getZuoyeList()
|
||||
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.status != 2 && this.status != 3) {
|
||||
@@ -203,14 +198,50 @@
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onShow() {
|
||||
this.form.taskId = this.thisTask.id
|
||||
|
||||
// this.getTaskInfo()
|
||||
this.form.taskId = this.thisTask.id
|
||||
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
// 获取医案任务详情
|
||||
getTaskInfo(){
|
||||
$http.request({
|
||||
url: "common/class/getClassTaskInfo",
|
||||
method: "POST",
|
||||
data: {
|
||||
"taskId": this.thisTask.id
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
// that.isHave = true
|
||||
console.log(res)
|
||||
this.thisTask = res.classTask
|
||||
this.fileList11 = []
|
||||
if (this.thisTask.img != '') {
|
||||
var imgs = this.thisTask.img.split(',')
|
||||
imgs = imgs.forEach((item, index) => {
|
||||
this.FileList11.push({
|
||||
url: item
|
||||
})
|
||||
})
|
||||
}
|
||||
console.log('this.fileList11',this.fileList11);
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e, '数据报错')
|
||||
// this.status = 3
|
||||
uni.showToast({
|
||||
title: e.msg,
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
},
|
||||
closePup(){
|
||||
this.showEditBlank = false
|
||||
this.form = {
|
||||
@@ -270,7 +301,7 @@
|
||||
this.loadFlag = true;
|
||||
this.pPage++;
|
||||
$http.request({
|
||||
url: 'common/class/getReplyListByTaskId',
|
||||
url: 'common/class/getReplyListByTaskIdStudent',
|
||||
method: "POST",
|
||||
data: {
|
||||
"limit": 10,
|
||||
@@ -370,11 +401,11 @@
|
||||
icon: 'success'
|
||||
})
|
||||
this.FileList = []
|
||||
this.closePup()
|
||||
this.thisTask.reply = true
|
||||
this.closePup()
|
||||
setTimeout(()=>{
|
||||
this.pPage = 0
|
||||
this.zuoyeList = []
|
||||
this.getTaskInfo()
|
||||
this.getZuoyeList()
|
||||
},200)
|
||||
}).catch(e => {
|
||||
@@ -425,38 +456,8 @@
|
||||
this.form.display = e.detail.value
|
||||
console.log('点了', this.form.display, e);
|
||||
|
||||
},
|
||||
getTaskInfo() {
|
||||
uni.showLoading({
|
||||
title: '正在加载'
|
||||
})
|
||||
$http.request({
|
||||
url: "common/class/getTaskInfo",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
"TaskId": this.TaskId // 班类型 0小班 1联合班 2精英班
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
this.refresh = false
|
||||
if (res.code == 0) {
|
||||
|
||||
|
||||
}
|
||||
uni.hideLoading()
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
console.log(e, '数据报错')
|
||||
// this.status = 3
|
||||
uni.showToast({
|
||||
title: `获取数据失败`,
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -473,7 +474,8 @@
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
.noanser{ padding: 20rpx;
|
||||
text-align: center; border-bottom: 1px solid #eee;
|
||||
text-align: center;
|
||||
// border-bottom: 1px solid #eee;
|
||||
.btn{display: inline-block; border-radius: 20rpx ; padding: 10rpx 20rpx; background-color: $themeColor; color: #fff;}
|
||||
}
|
||||
.in {
|
||||
|
||||
Reference in New Issue
Block a user