mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 13:56:45 +08:00
feat:增加删除修改关卡及阶段并自动刷新列表
This commit is contained in:
@@ -2034,7 +2034,7 @@ export default {
|
||||
sourceBelong: null, //资源归属
|
||||
remark: null, //项目说明
|
||||
level: null, //项目级别
|
||||
systemId: null, //培训体系
|
||||
systemId: null, //培训分类
|
||||
picUrl: null,
|
||||
parentId: null,
|
||||
});
|
||||
@@ -2413,79 +2413,17 @@ export default {
|
||||
};
|
||||
|
||||
//学员管理列表操作
|
||||
const studentData = () => {
|
||||
let arr = state.tabledata;
|
||||
console.log(arr, "学员管理");
|
||||
arr.map((value) => {
|
||||
value.operation = (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<div
|
||||
class="studentopea1"
|
||||
onClick={() => {
|
||||
if (value.excellent === false) {
|
||||
state.canclestu = true;
|
||||
console.log("youxiu", value.studentId);
|
||||
state.changeGoods.push(value.studentId);
|
||||
} else if (value.excellent === true) {
|
||||
state.canclestu1 = true;
|
||||
console.log("youxiu", value.studentId);
|
||||
state.changeGoods.push(value.studentId);
|
||||
}
|
||||
}}
|
||||
>
|
||||
{value.excellent ? "取消优秀" : "优秀学员"}
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="studentopea2"
|
||||
onClick={() => {
|
||||
state.Seevisible = true;
|
||||
console.log(value.studentId, "点击了查看");
|
||||
state.checkStuId = value.studentId;
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</div>
|
||||
<div class="studentSelect">
|
||||
<a-select
|
||||
style="width: 50px"
|
||||
value="更多"
|
||||
// options={state.projectNameList}
|
||||
dropdownClassName="tabledropdown"
|
||||
>
|
||||
<a-select-option value="换组" label="换组">
|
||||
<div
|
||||
onClick={() => {
|
||||
state.Changevisible = true;
|
||||
}}
|
||||
>
|
||||
换组
|
||||
</div>
|
||||
</a-select-option>
|
||||
<a-select-option value="删除" label="删除">
|
||||
<div
|
||||
onClick={() => {
|
||||
console.log("点击了111", value.studentId);
|
||||
showDeleteOne(value.studentId);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</div>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
state.tabledata = arr;
|
||||
};
|
||||
studentData();
|
||||
// const studentData = () => {
|
||||
// let arr = state.tabledata;
|
||||
// console.log(arr, "学员管理");
|
||||
// arr.map((value) => {
|
||||
// value.operation = (
|
||||
|
||||
// );
|
||||
// });
|
||||
// state.tabledata = arr;
|
||||
// };
|
||||
// studentData();
|
||||
const studentColumns = () => {
|
||||
const tablecolumns = [
|
||||
{
|
||||
@@ -2592,6 +2530,75 @@ export default {
|
||||
// width: 60,
|
||||
align: "center",
|
||||
className: "h",
|
||||
scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
customRender: (text) => {
|
||||
// console.log(text);
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<div
|
||||
class="studentopea1"
|
||||
onClick={() => {
|
||||
if (text.record.excellent === false) {
|
||||
state.canclestu = true;
|
||||
console.log("youxiu", text.record.studentId);
|
||||
state.changeGoods.push(text.record.studentId);
|
||||
} else if (text.record.excellent === true) {
|
||||
state.canclestu1 = true;
|
||||
console.log("youxiu", text.record.studentId);
|
||||
state.changeGoods.push(text.record.studentId);
|
||||
}
|
||||
}}
|
||||
>
|
||||
{text.record.excellent ? "取消优秀" : "优秀学员"}
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="studentopea2"
|
||||
onClick={() => {
|
||||
state.Seevisible = true;
|
||||
console.log(text.record.studentId, "点击了查看");
|
||||
state.checkStuId = text.record.studentId;
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</div>
|
||||
<div class="studentSelect">
|
||||
<a-select
|
||||
style="width: 50px"
|
||||
value="更多"
|
||||
// options={state.projectNameList}
|
||||
dropdownClassName="tabledropdown"
|
||||
>
|
||||
<a-select-option value="换组" label="换组">
|
||||
<div
|
||||
onClick={() => {
|
||||
state.Changevisible = true;
|
||||
}}
|
||||
>
|
||||
换组
|
||||
</div>
|
||||
</a-select-option>
|
||||
<a-select-option value="删除" label="删除">
|
||||
<div
|
||||
onClick={() => {
|
||||
// console.log("点击了111", text);
|
||||
showDeleteOne(text.record.studentId);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</div>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
)}
|
||||
},
|
||||
];
|
||||
return tablecolumns;
|
||||
@@ -2860,7 +2867,7 @@ export default {
|
||||
if (leng > 0) {
|
||||
let arr = res.data.data.rows;
|
||||
getTableDataList(arr);
|
||||
studentData();
|
||||
// studentData();
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -3136,7 +3143,7 @@ export default {
|
||||
createG,
|
||||
resetGroupName,
|
||||
searchGroup,
|
||||
studentData,
|
||||
// studentData,
|
||||
cancelyou,
|
||||
cancelcanyou,
|
||||
changePaginationStu,
|
||||
|
||||
Reference in New Issue
Block a user