用户端
This commit is contained in:
@@ -104,10 +104,11 @@
|
||||
this.pageType = e.type
|
||||
this.form.classId = e.id
|
||||
this.form.type = e.type
|
||||
if(e.options){
|
||||
if(e.id){
|
||||
// this.form.renwuId = e.renwuId
|
||||
this.form = JSON.parse(e.options)
|
||||
this.pageName = '编辑'
|
||||
this.form.id = e.id
|
||||
this.pageName = '编辑'
|
||||
this.getTaskInfo()
|
||||
}else{
|
||||
this.pageName = '添加'
|
||||
}
|
||||
@@ -123,7 +124,7 @@
|
||||
},
|
||||
//页面显示
|
||||
onShow() {
|
||||
|
||||
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userInfo']),
|
||||
@@ -134,6 +135,40 @@
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
// 获取医案任务详情
|
||||
getTaskInfo(){
|
||||
$http.request({
|
||||
url: "common/class/getClassTaskInfo",
|
||||
method: "POST",
|
||||
data: {
|
||||
"taskId": this.form.id
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
// that.isHave = true
|
||||
console.log(res)
|
||||
this.form = res.classTask
|
||||
this.fileList1 = []
|
||||
if(this.form.img != ''){
|
||||
var List = this.form.img.split(',')
|
||||
List.forEach(item => {
|
||||
this.fileList1.push({url:item})
|
||||
})
|
||||
}
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e, '数据报错')
|
||||
// this.status = 3
|
||||
uni.showToast({
|
||||
title: e.msg,
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
},
|
||||
radioChange(e){
|
||||
// console.log('点了', e);
|
||||
|
||||
@@ -183,10 +218,10 @@
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.form.validate().then(res => {
|
||||
var _show = '1'
|
||||
if(this.form.type == 2){
|
||||
this.form.display == true ? _show = '1' : _show = '0'
|
||||
}
|
||||
// var _show = '1'
|
||||
// if(this.form.type == 2){
|
||||
// this.form.display == true ? _show = '1' : _show = '0'
|
||||
// }
|
||||
|
||||
if (this.fileList1.length > 0) {
|
||||
let _list = this.fileList1
|
||||
@@ -200,9 +235,10 @@
|
||||
url: _url,
|
||||
method: "POST",
|
||||
data: {
|
||||
"classId": this.form.classId,
|
||||
"id": this.form.id,
|
||||
"classId": this.form.id ? undefined : this.form.classId,
|
||||
"type": this.form.type, //类型 0班内任务1医案2心得
|
||||
"display": _show, //0不展示1展示
|
||||
"display": this.form.display, //0不展示1展示
|
||||
"title": this.form.title,
|
||||
"content": this.form.content,
|
||||
"img": this.form.img
|
||||
|
||||
Reference in New Issue
Block a user