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

新增删除方法

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