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

页面修改

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