Commit 028787fe authored by 黄奎's avatar 黄奎

页面修改

parent 46c55fb4
......@@ -64,31 +64,41 @@
<template>
<div class="stufollowlist">
<div style="width: 100%;overflow-x: auto;">
<table class="po_content singeRowTable" ref="table" style="border:1px solid #E6E6E6;" cellspacing="0"
<table class="po_content singeRowTable" ref="table" style="border:1px solid #E6E6E6;" cellspacing="0"
cellpadding="0" v-loading="loading">
<tr>
<th width="120">月份</th>
<th style="min-width:250px;">学习情况</th>
<th width="100">操作</th>
<th width="100">操作</th>
</tr>
<template v-if='dataObj&& dataObj.length>0'>
<tr v-for=" ( item , index ) in dataObj " :key="index">
<tr v-for=" (item,index) in dataObj " :key="index">
<td>
<el-input v-if="Edit.index==index" placeholder="请输入" v-model="item.ClassDate" size="mini" autofocus/>
<q-input v-if="Edit.index==index" placeholder="请输入" v-model="item.ClassDate" size="mini" autofocus />
<span v-else> {{ item.ClassDate }}</span>
</td>
<td>
<td style="text-align:left;padding-left:5px;">
<div>
<el-input type="textarea" v-if="Edit.index==index" :autosize="{ minRows: 2, maxRows: 50}" placeholder="请输入内容"v-model="item.Remarks"></el-input>
<span v-else> {{ item.Remarks }}</span>
<q-input type="textarea" v-if="Edit.index==index" :autosize="{ minRows: 1, maxRows: 10}"
placeholder="请输入内容" v-model="item.Remarks" :dense="true" />
<pre v-else>
<p v-html="item.Remarks"></p>
</pre>
</div>
</td>
<td>
<div class="text-blue cursor-pointer" >
<i class="el-icon-edit" @click="SetStudentStudy(item,index)" style="margin-right:15px;"></i>
<i class="el-icon-check" v-if="(item.Words||item.Practice||item.ReadingAloud||(item.Other&&item.Other.length>0))||item.StudyID>0" @click="SaveStudentStudy(item)"></i>
</div>
<div class="text-blue cursor-pointer">
<i class="el-icon-edit" @click="SetStudentStudy(item,index)" style="margin-right:15px;">
<q-tooltip :offset="[10, 10]">
点击修改
</q-tooltip>
</i>
<i class="el-icon-check" v-if="Edit.index==index" @click="SaveStudentStudy(item)">
<q-tooltip :offset="[10, 10]">
点击保存
</q-tooltip>
</i>
</div>
</td>
</tr>
</template>
......@@ -103,11 +113,6 @@
</div>
</template>
<script>
import {
saveStudentBaseInfo, //保存学员信息
} from "../../../api/school/index";
import {
SetStuStudyInfo,
} from '../../../api/studyabroad/index'
......@@ -158,27 +163,27 @@
isShowSaleInfo: true,
},
SaveMsg: {
CourseId: 0,
StuId:0,
GuestId:0,
ClassScrollType:0,
OrderId:0,
StudyID:0,
Words:0,
Practice:0,
ReadingAloud:0,
Other:[],
ChapterId:0,
StudyType:0,
Remarks:'',
StudyValue:'',
CourseId: 0,
StuId: 0,
GuestId: 0,
ClassScrollType: 0,
OrderId: 0,
StudyID: 0,
Words: 0,
Practice: 0,
ReadingAloud: 0,
Other: [],
ChapterId: 0,
StudyType: 0,
Remarks: '',
StudyValue: '',
},
nowOther:{
Name:"",
Score:"",
nowOther: {
Name: "",
Score: "",
},
Edit:{
index:-1,
Edit: {
index: -1,
},
};
},
......@@ -188,7 +193,6 @@
}
},
methods: {
//刷新表格
refreshTable() {
this.$emit("success");
......@@ -204,71 +208,68 @@
}
return managerName;
},
SetStudentStudy(obj,index){
this.Edit.index=index;
SetStudentStudy(obj, index) {
this.Edit.index = index;
},
//保存信息
SaveStudentStudy(obj){
this.SaveMsg.CourseId=this.BaseInfo.CourseId,
this.SaveMsg.StuId=this.BaseInfo.StuId,
this.SaveMsg.GuestId=this.BaseInfo.GuestId,
this.SaveMsg.OrderId=this.BaseInfo.OrderId,
this.SaveMsg.StudyID=obj.StudyID,
this.SaveMsg.Practice=0,
this.SaveMsg.ReadingAloud=0,
this.SaveMsg.Words=0,
this.SaveMsg.Other='';
this.SaveMsg.Remarks=obj.Remarks,
this.SaveMsg.StudyValue=obj.ClassDate;
this.SaveMsg.ChapterId=0,
this.SaveMsg.StudyType=3,
SaveStudentStudy(obj) {
this.SaveMsg.CourseId = this.BaseInfo.CourseId;
this.SaveMsg.StuId = this.BaseInfo.StuId;
this.SaveMsg.GuestId = this.BaseInfo.GuestId;
this.SaveMsg.OrderId = this.BaseInfo.OrderId;
this.SaveMsg.StudyID = obj.StudyID;
this.SaveMsg.Practice = 0;
this.SaveMsg.ReadingAloud = 0;
this.SaveMsg.Words = 0;
this.SaveMsg.Other = '';
this.SaveMsg.Remarks = obj.Remarks;
this.SaveMsg.StudyValue = obj.ClassDate;
this.SaveMsg.ChapterId = 0;
this.SaveMsg.StudyType = 3;
SetStuStudyInfo(this.SaveMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
}
this.clearSaveMsg();
this.refreshTable();
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
}
this.clearSaveMsg();
this.refreshTable();
this.loading = false;
})
.catch(() => {
this.loading = false;
});
},
SetStudentStudyOther(index){
SetStudentStudyOther(index) {
this.dataObj[index].Other.push(JSON.parse(JSON.stringify(this.nowOther)))
},
DelStudentStudyOther(obj,index,indexOther){
if(obj.Other&&obj.Other.length>0){
DelStudentStudyOther(obj, index, indexOther) {
if (obj.Other && obj.Other.length > 0) {
obj.Other.splice(indexOther, 1);
}
this.dataObj[index] = obj
},
clearSaveMsg(){
this.SaveMsg.CourseId= 0,
this.SaveMsg.StuId=0,
this.SaveMsg.GuestId=0,
this.SaveMsg. ClassScrollType=0,
this.SaveMsg. OrderId=0,
this.SaveMsg. StudyID=0,
this.SaveMsg.Words=0,
this.SaveMsg.Practice=0,
this.SaveMsg.ReadingAloud=0,
this.SaveMsg.Other=[],
this.SaveMsg. ChapterId=0,
this.SaveMsg.StudyType=0,
this.SaveMsg.Remarks='',
this.SaveMsg. StudyValue='',
this.Edit.index=-1;
clearSaveMsg() {
this.SaveMsg.CourseId = 0;
this.SaveMsg.StuId = 0;
this.SaveMsg.GuestId = 0;
this.SaveMsg.ClassScrollType = 0;
this.SaveMsg.OrderId = 0;
this.SaveMsg.StudyID = 0;
this.SaveMsg.Words = 0;
this.SaveMsg.Practice = 0;
this.SaveMsg.ReadingAloud = 0;
this.SaveMsg.Other = [];
this.SaveMsg.ChapterId = 0;
this.SaveMsg.StudyType = 0;
this.SaveMsg.Remarks = '';
this.SaveMsg.StudyValue = '';
this.Edit.index = -1;
},
//关闭弹窗
closeStuForm() {
this.isShowStuRight = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment