Commit 7dc34c06 authored by 黄奎's avatar 黄奎

新增删除方法

parent 028787fe
......@@ -281,6 +281,18 @@ export function SetStuStudyInfo(data) {
})
}
/**
*删除学员学习情况
*/
export function RemoveStuStudyInfo(data) {
return request({
url: '/Scroll/RemoveStuStudyInfo',
method: 'post',
data
})
}
/**
* 获取已报名学员列表
*/
......
......@@ -77,7 +77,7 @@
Other: [],
ChapterId: 0,
StudyType: 0,
Remarks: '',
Remarks: '到勤情况:\n课堂表现:\n作业情况:\n评价建议:',
StudyValue: '',
},
nowOther: {
......@@ -110,6 +110,10 @@
this.SaveMsg.ChapterId = 0;
this.SaveMsg.Other = '';
}
else
{
this.SaveMsg.Remarks='';
}
this.SaveMsg.StudyType = this.saveObj;
SetStuStudyInfo(this.SaveMsg).then(res => {
if (res.Code == 1) {
......@@ -145,7 +149,7 @@
this.SaveMsg.Other = [];
this.SaveMsg.ChapterId = 0;
this.SaveMsg.StudyType = 0;
this.SaveMsg.Remarks = '';
this.SaveMsg.Remarks = '到勤情况:\n课堂表现:\n作业情况:\n评价建议:';
this.SaveMsg.StudyValue = '';
},
closeForm() {
......
......@@ -88,16 +88,23 @@
</td>
<td>
<div class="text-blue cursor-pointer">
<i class="el-icon-edit" @click="SetStudentStudy(item,index)" style="margin-right:15px;">
<i v-if="Edit.index!=index" 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)">
<i class="el-icon-check" v-if="Edit.index==index" @click="SaveStudentStudy(item)"
style="margin-right:15px;">
<q-tooltip :offset="[10, 10]">
点击保存
</q-tooltip>
</i>
<i class="el-icon-delete" v-if="item.StudyID>0" @click="deleteStudy(item)">
<q-tooltip :offset="[10, 10]">
点击删除
</q-tooltip>
</i>
</div>
</td>
</tr>
......@@ -115,6 +122,7 @@
<script>
import {
SetStuStudyInfo,
RemoveStuStudyInfo,
} from '../../../api/studyabroad/index'
import UeEditor from "../../editor/UeEditor";
export default {
......@@ -197,16 +205,32 @@
refreshTable() {
this.$emit("success");
},
getTeacherManager(row) {
let managerName = "<span class='text-grey-4'>暂无</span>";
if (row.AssistList && row.AssistList.length > 0) {
row.AssistList.forEach(y => {
if (y.AssistType == 4) {
managerName = `<span class='text-dark'>${y.AssistName}</span>`;
deleteStudy(item) {
let that = this
this.$q.dialog({
title: '删除确认',
message: '删除且无法恢复,你确定要删除吗',
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true,
color: "negative"
}
}).onOk(() => {
RemoveStuStudyInfo({
StudyID: item.StudyID
}).then(res => {
if (res.Code === 1) {
that.$message.success("操作成功")
that.clearSaveMsg();
that.refreshTable();
}
});
}
return managerName;
})
})
},
SetStudentStudy(obj, index) {
this.Edit.index = index;
......
......@@ -133,16 +133,23 @@
</td>
<td>
<div class="text-blue cursor-pointer">
<i class="el-icon-edit" @click="SetStudentStudy(item,index)" style="margin-right:15px;">
<i v-if="Edit.index!=index" class="el-icon-edit" @click="SetStudentStudy(item,index)"
style="margin-right:15px;">
<q-tooltip :offset="[10, 10]">
点击修改
{{item.StudyID>0?"点击修改":"点击新增"}}
</q-tooltip>
</i>
<i class="el-icon-check" v-if="Edit.index==index" @click="SaveStudentStudy(item)">
<i class="el-icon-check" v-if="Edit.index==index" @click="SaveStudentStudy(item)"
style="margin-right:15px;">
<q-tooltip :offset="[10, 10]">
点击保存
</q-tooltip>
</i>
<i class="el-icon-delete" v-if="item.StudyID>0" @click="deleteStudy(item)">
<q-tooltip :offset="[10, 10]">
点击删除
</q-tooltip>
</i>
</div>
</td>
</tr>
......@@ -160,6 +167,7 @@
<script>
import {
SetStuStudyInfo,
RemoveStuStudyInfo,
} from '../../../api/studyabroad/index'
import UeEditor from "../../editor/UeEditor";
export default {
......@@ -239,21 +247,36 @@
},
methods: {
//刷新表格
refreshTable() {
this.$emit("success");
},
getTeacherManager(row) {
let managerName = "<span class='text-grey-4'>暂无</span>";
if (row.AssistList && row.AssistList.length > 0) {
row.AssistList.forEach(y => {
if (y.AssistType == 4) {
managerName = `<span class='text-dark'>${y.AssistName}</span>`;
deleteStudy(item) {
let that = this
this.$q.dialog({
title: '删除确认',
message: '删除且无法恢复,你确定要删除吗',
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true,
color: "negative"
}
}).onOk(() => {
RemoveStuStudyInfo({
StudyID: item.StudyID
}).then(res => {
if (res.Code === 1) {
that.$message.success("操作成功")
that.clearSaveMsg();
that.refreshTable();
}
});
}
return managerName;
})
})
},
SetStudentStudy(obj, index) {
this.Edit.index = index;
......
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