mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16:47 +08:00
fix:修改添加作业接口判断
This commit is contained in:
@@ -179,41 +179,7 @@ function throttle(fn, delay = 200) {
|
||||
};
|
||||
}
|
||||
|
||||
//把token存到cookie
|
||||
//name 字段名 value 字段值 perpetual 有效期
|
||||
const setCookie = (name, value, perpetual) => {
|
||||
console.log('存储token到cookie')
|
||||
let exdate = new Date()
|
||||
exdate.setDate(perpetual * 24 * 60 * 60 * 1000) //exdate.setDate(exdate.getDate() + 365)
|
||||
document.cookie = `${name}=${value};expires=${exdate.toGMTString()};path=/`
|
||||
//永久有效
|
||||
//document.cookie = name + '=' + value + ';expires=' + 'Fri, 31 Dec 9999 23:59:59 GMT'
|
||||
}
|
||||
//获取cookie数据
|
||||
|
||||
//先写一个方法
|
||||
function getCookie(name) {
|
||||
return document.cookie?.split(";").find(e => e.includes(name)).replace(`${name}=`, '') || ''
|
||||
//1.获取cookie字符串
|
||||
// const cookies = document.cookie;
|
||||
// console.log('cookies',cookies)
|
||||
// //通过;来分割字符串
|
||||
// const cookie = cookies.split(";");
|
||||
// // console.log('cookie', cookie)
|
||||
// //遍历,使键值对匹配上
|
||||
// for (var i = 0; i < cookie.length; i++) {
|
||||
// var arr = cookie[i].split("token=");
|
||||
// // console.log('arr', arr)
|
||||
// console.log('name', name)
|
||||
// // if (arr[0] == name) {
|
||||
// // console.log('arr[1]', arr[1])
|
||||
// // return arr[1];
|
||||
// // }
|
||||
// // console.log('arr[1]', arr[1])
|
||||
// return arr[1]
|
||||
// }
|
||||
// return "";
|
||||
}
|
||||
|
||||
|
||||
//滚动加载信息
|
||||
@@ -288,8 +254,7 @@ export {
|
||||
getWeek,
|
||||
autoComma,
|
||||
formatNumber,
|
||||
setCookie,
|
||||
getCookie,
|
||||
|
||||
scrollLoad,
|
||||
changeOwnership,
|
||||
commonData,
|
||||
|
||||
@@ -122,6 +122,20 @@ export default {
|
||||
},
|
||||
];
|
||||
}
|
||||
if (
|
||||
n.indexOf("/projectadd?projectId") !== -1 ||
|
||||
n.indexOf("/ProjectAdd?projectId") !== -1
|
||||
) {
|
||||
state.list = [
|
||||
{
|
||||
name: "项目",
|
||||
href: "/projectmanage",
|
||||
},
|
||||
{
|
||||
name: "编辑项目",
|
||||
},
|
||||
];
|
||||
}
|
||||
if (n.indexOf("/taskpage") !== -1 || n.indexOf("/TaskPage") !== -1) {
|
||||
state.list = [
|
||||
{
|
||||
|
||||
@@ -127,6 +127,16 @@ export default {
|
||||
localStorage.removeItem("pathmapPic");
|
||||
localStorage.removeItem("projectClass");
|
||||
localStorage.removeItem("projectPic");
|
||||
|
||||
localStorage.removeItem("routerId");
|
||||
localStorage.removeItem("selectedKeys");
|
||||
localStorage.removeItem("openKeys");
|
||||
localStorage.removeItem("stageId");
|
||||
localStorage.removeItem("openpages");
|
||||
localStorage.removeItem("memberInitInfo");
|
||||
localStorage.removeItem("projectId");
|
||||
localStorage.removeItem("projectTemplateId");
|
||||
localStorage.removeItem("orgtreeList");
|
||||
window.open("https://u-pre.boe.com/web/", "_self");
|
||||
};
|
||||
return {
|
||||
|
||||
@@ -31,23 +31,23 @@
|
||||
<div class="btnbox">
|
||||
<a-form-item has-feedback label="作业名称" name="workName">
|
||||
<a-input
|
||||
|
||||
v-model:value="formState.workName"
|
||||
style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入作业名称"
|
||||
autocomplete="off"
|
||||
show-count :maxlength="20"
|
||||
show-count
|
||||
:maxlength="20"
|
||||
/>
|
||||
</a-form-item>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="main_item">
|
||||
<div class="btnbox">
|
||||
<a-form-item has-feedback label="提交时间" name="choosedTime">
|
||||
<a-range-picker
|
||||
show-time
|
||||
style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
v-model:value="formState.choosedTime"
|
||||
format="YYYY/MM/DD HH:mm"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
@@ -58,16 +58,16 @@
|
||||
<div class="main_item2">
|
||||
<a-form-item has-feedback label="作业要求" name="workRequirement">
|
||||
<div class="textarea">
|
||||
|
||||
<a-textarea
|
||||
v-model:value="formState.workRequirement"
|
||||
placeholder="请输入作业要求"
|
||||
autocomplete="off"
|
||||
allow-clear
|
||||
:rows="6"
|
||||
show-count :maxlength="200"
|
||||
/></div>
|
||||
|
||||
<a-textarea
|
||||
v-model:value="formState.workRequirement"
|
||||
placeholder="请输入作业要求"
|
||||
autocomplete="off"
|
||||
allow-clear
|
||||
:rows="6"
|
||||
show-count
|
||||
:maxlength="200"
|
||||
/>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
@@ -159,7 +159,7 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
workName:{
|
||||
workName: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
@@ -256,16 +256,39 @@ export default {
|
||||
|
||||
const resetForm = () => {
|
||||
// formRef.value.resetFields();
|
||||
formState.workName = ''
|
||||
formState.workRequirement = ''
|
||||
formState.choosedTime = []
|
||||
formState.workName = "";
|
||||
formState.workRequirement = "";
|
||||
formState.choosedTime = [];
|
||||
};
|
||||
|
||||
const handleValidate = (...args) => {
|
||||
console.log(args);
|
||||
};
|
||||
const beforeUpload = (file) => {
|
||||
console.log("file", file);
|
||||
const isJpgOrPng =
|
||||
file.name.indexOf(".pdf") === -1 &&
|
||||
file.name.indexOf(".ppt") === -1 &&
|
||||
file.name.indexOf(".pptx") === -1 &&
|
||||
file.name.indexOf(".doc") === -1 &&
|
||||
file.name.indexOf(".docx") === -1 &&
|
||||
file.name.indexOf(".xls") === -1 &&
|
||||
file.name.indexOf(".xlsx") === -1 &&
|
||||
file.name.indexOf(".jpg") === -1 &&
|
||||
file.name.indexOf(".jpeg") === -1 &&
|
||||
file.name.indexOf(".png") === -1 &&
|
||||
file.name.indexOf(".gif") === -1 &&
|
||||
file.name.indexOf(".zip") === -1;
|
||||
// console.log("isJpgOrPng", isJpgOrPng);
|
||||
return isJpgOrPng;
|
||||
};
|
||||
const handleChange = (info) => {
|
||||
console.log("info", info);
|
||||
const isfileformat = beforeUpload(info.file);
|
||||
if (isfileformat) {
|
||||
fileList.value = [];
|
||||
message.destroy();
|
||||
return message.error("请上传正确格式附件");
|
||||
}
|
||||
if (info.file.status !== "uploading") {
|
||||
console.log(info.file, info.fileList);
|
||||
// state.workEnclosureAddress = info.fileList[0].response.data;
|
||||
@@ -315,11 +338,11 @@ export default {
|
||||
|
||||
// 重置表单选项
|
||||
const afterVisibleChange = () => {
|
||||
console.log('11223344', props.EditWorkId)
|
||||
console.log("11223344", props.EditWorkId);
|
||||
if (props.EditWorkId > 0) {
|
||||
state.EditWorkId = props.EditWorkId;
|
||||
queryWork();
|
||||
}else{
|
||||
} else {
|
||||
formRef.value.resetFields();
|
||||
resetForm();
|
||||
}
|
||||
@@ -328,8 +351,12 @@ export default {
|
||||
// 新增任务
|
||||
const updteHomeWork = () => {
|
||||
let obj = {
|
||||
submitEndTime: dayjs(formState.choosedTime[1]).format("YYYY-MM-DD HH:mm"),
|
||||
submitStartTime: dayjs(formState.choosedTime[0]).format("YYYY-MM-DD HH:mm"),
|
||||
submitEndTime: dayjs(formState.choosedTime[1]).format(
|
||||
"YYYY-MM-DD HH:mm"
|
||||
),
|
||||
submitStartTime: dayjs(formState.choosedTime[0]).format(
|
||||
"YYYY-MM-DD HH:mm"
|
||||
),
|
||||
workEnclosureAddress: state.workEnclosureAddress
|
||||
? state.workEnclosureAddress
|
||||
: "",
|
||||
@@ -339,9 +366,9 @@ export default {
|
||||
};
|
||||
if (props.EditWorkId > 0) {
|
||||
updateWorkTaskUsing(obj)
|
||||
.then(async(res) => {
|
||||
.then(async (res) => {
|
||||
// console.log("添加成功", res);
|
||||
await updateTask(res);
|
||||
await updateTask(res);
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
})
|
||||
@@ -351,9 +378,9 @@ export default {
|
||||
});
|
||||
} else {
|
||||
createWorkTask(obj)
|
||||
.then(async(res) => {
|
||||
.then(async (res) => {
|
||||
console.log("添加成功", res);
|
||||
await updateTask(res);
|
||||
await updateTask(res);
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
})
|
||||
@@ -369,12 +396,12 @@ export default {
|
||||
state.addLoading = true;
|
||||
queryWorkDetailById({ workId: props.EditWorkId })
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
try{
|
||||
fileList.value = JSON.parse(res.data.data.workEnclosureAddress)
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
fileList.value = []
|
||||
console.log(res);
|
||||
try {
|
||||
fileList.value = JSON.parse(res.data.data.workEnclosureAddress);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
fileList.value = [];
|
||||
}
|
||||
formState.workName = res.data.data.workName;
|
||||
formState.workRequirement = res.data.data.workRequirement;
|
||||
@@ -394,10 +421,10 @@ export default {
|
||||
state.EditWorkId = res.data.data.workId;
|
||||
} else {
|
||||
if (props.isLevel == 1) {
|
||||
if(!props.isactive){
|
||||
message.destroy();
|
||||
return message.warning("请先选中关卡");
|
||||
}
|
||||
if (!props.isactive) {
|
||||
message.destroy();
|
||||
return message.warning("请先选中关卡");
|
||||
}
|
||||
let editObj1 = {
|
||||
chapterId: props.isactive,
|
||||
courseId: res.data.data.workId,
|
||||
@@ -576,7 +603,7 @@ export default {
|
||||
margin-bottom: 32px;
|
||||
.textarea {
|
||||
width: 400px;
|
||||
|
||||
|
||||
.ant-input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="inputV1"
|
||||
style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入直播名称"
|
||||
:maxlength="20"
|
||||
/>
|
||||
@@ -51,13 +51,13 @@
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="inputV4"
|
||||
style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入直播链接"
|
||||
:maxlength="100"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
@@ -71,7 +71,7 @@
|
||||
<div class="btnbox">
|
||||
<a-range-picker
|
||||
show-time
|
||||
style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
v-model:value="time"
|
||||
format="YYYY/MM/DD HH:mm"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
@@ -93,7 +93,7 @@
|
||||
:min="0"
|
||||
:max="300"
|
||||
:precision="0"
|
||||
style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
v-model:value="inputV2"
|
||||
></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||
@@ -109,7 +109,7 @@
|
||||
</div>
|
||||
<span style="margin-right: 3px">授课老师:</span>
|
||||
</div>
|
||||
<div class="select" style="width: 400px;" >
|
||||
<div class="select" style="width: 400px">
|
||||
<ProjectManager
|
||||
v-model:value="memberValue.value"
|
||||
v-model:name="memberValue.label"
|
||||
@@ -148,8 +148,11 @@
|
||||
</div>
|
||||
</a-upload>
|
||||
<div class="i_bottom">
|
||||
|
||||
<div class="tip"> <span style="color: #999999; margin-left: 8px">支持图片格式为jpg/jpeg/png 图片最大为2MB</span></div>
|
||||
<div class="tip">
|
||||
<span style="color: #999999; margin-left: 8px"
|
||||
>支持图片格式为jpg/jpeg/png 图片最大为2MB</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -174,7 +177,7 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">回放设置:</span>
|
||||
@@ -191,15 +194,14 @@
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="inputV5"
|
||||
style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入回放链接"
|
||||
:maxlength="100"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="main_item2">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">直播说明:</span>
|
||||
@@ -215,8 +217,7 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="main_item2">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">考勤设置:</span>
|
||||
@@ -242,7 +243,9 @@
|
||||
"
|
||||
v-model:value="inputV6"
|
||||
></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px">分钟允许签到</span>
|
||||
<span style="color: #999999; margin-left: 8px"
|
||||
>分钟允许签到</span
|
||||
>
|
||||
</div>
|
||||
<div class="timerbox">
|
||||
<span>直播开始后:</span>
|
||||
@@ -258,7 +261,9 @@
|
||||
"
|
||||
v-model:value="inputV7"
|
||||
></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px">分钟允许签到</span>
|
||||
<span style="color: #999999; margin-left: 8px"
|
||||
>分钟允许签到</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="qdqtbox">
|
||||
@@ -286,7 +291,7 @@
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<!--
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">完成标准设置:</span>
|
||||
@@ -294,10 +299,10 @@
|
||||
<div class="btnbox">
|
||||
<a-radio-group v-model:value="radioV1">
|
||||
<a-radio :value="1" @click="cloradio1">仅签到</a-radio>-->
|
||||
<!-- <a-radio :value="2" @click="cloradio1"
|
||||
<!-- <a-radio :value="2" @click="cloradio1"
|
||||
>签到、签退全部完成</a-radio
|
||||
> -->
|
||||
<!--
|
||||
<!--
|
||||
</a-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
@@ -347,13 +352,11 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item" style="height:30px;">
|
||||
<div class="main_item" style="height: 30px">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px"></span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
|
||||
</div>
|
||||
<div class="btnbox"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -473,7 +476,7 @@ export default {
|
||||
switchC1: "",
|
||||
checkedC1: false,
|
||||
checkedC2: false,
|
||||
liveNotice :null,
|
||||
liveNotice: null,
|
||||
assessmentId: null,
|
||||
obj: {}, //要传的obj数据
|
||||
assessment: [], //评估信息
|
||||
@@ -503,9 +506,9 @@ export default {
|
||||
state.needEval = false;
|
||||
state.switchC2 = false;
|
||||
state.assessmentId = null;
|
||||
state.liveNotice =null;
|
||||
state.liveTeacherId=null;
|
||||
state.memberValue={};
|
||||
state.liveNotice = null;
|
||||
state.liveTeacherId = null;
|
||||
state.memberValue = {};
|
||||
ctx.emit("changeData", false);
|
||||
localStorage.setItem("stageId", props.chooseStageId);
|
||||
localStorage.setItem("chapterId", props.isactive);
|
||||
@@ -565,9 +568,11 @@ export default {
|
||||
value: res.data.data.liveTeacherId || "",
|
||||
label: res.data.data.liveTeacherName || "",
|
||||
};
|
||||
queryAppraiseDetailById({assessmentId:res.data.data.assessmentId}).then((res)=>{
|
||||
state.assessmentName =res.data.data.assessmentName;
|
||||
});
|
||||
queryAppraiseDetailById({
|
||||
assessmentId: res.data.data.assessmentId,
|
||||
}).then((res) => {
|
||||
state.assessmentName = res.data.data.assessmentName;
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
//message.error(`查询失败`);
|
||||
@@ -584,6 +589,7 @@ export default {
|
||||
console.log("info", info);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.file.status === "done") {
|
||||
// Get this url from response in real world.
|
||||
getBase64(info.file.originFileObj, (base64Url) => {
|
||||
@@ -600,7 +606,7 @@ export default {
|
||||
};
|
||||
const updateTask = (res) => {
|
||||
if (props.isLevel == 1) {
|
||||
if(!props.isactive){
|
||||
if (!props.isactive) {
|
||||
message.destroy();
|
||||
return message.warning("请先选中关卡");
|
||||
}
|
||||
@@ -672,7 +678,7 @@ export default {
|
||||
message.destroy();
|
||||
return message.warning("请输入直播链接");
|
||||
}
|
||||
|
||||
|
||||
if (!state.time) {
|
||||
message.destroy();
|
||||
return message.warning("请输入直播时间");
|
||||
@@ -718,7 +724,7 @@ export default {
|
||||
liveEndTime: endTime,
|
||||
liveStartTime: startTime,
|
||||
liveExplain: state.textV1,
|
||||
liveNotice:state.liveNotice,
|
||||
liveNotice: state.liveNotice,
|
||||
liveFlag: "",
|
||||
liveId: props.edit ? Number(props.EditLiveId) : 0,
|
||||
liveLink: state.inputV4,
|
||||
@@ -1017,7 +1023,6 @@ export default {
|
||||
}
|
||||
|
||||
.setbox {
|
||||
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 6px;
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-row type="flex" gutter="12" style="padding-left: 20px">
|
||||
<a-row
|
||||
type="flex"
|
||||
gutter="12"
|
||||
style="padding-left: 20px; margin-right: 0px"
|
||||
>
|
||||
<a-col>
|
||||
<a-form-item title="姓名:" @click="getStuList">
|
||||
<a-input
|
||||
class="cus-input"
|
||||
v-model:value="tableParam.studentName"
|
||||
placeholder="请输入姓名"
|
||||
class="cus-input"
|
||||
v-model:value="tableParam.studentName"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -14,31 +18,34 @@
|
||||
<a-button class="cus-btn" style="width: 100px">
|
||||
<template #icon>
|
||||
<img
|
||||
style="margin-right: 10px"
|
||||
src="../../assets/images/courseManage/search0.png"
|
||||
/></template>
|
||||
style="margin-right: 10px"
|
||||
src="../../assets/images/courseManage/search0.png"
|
||||
/></template>
|
||||
搜索
|
||||
</a-button>
|
||||
</a-col>
|
||||
<a-col :span="2">
|
||||
<a-button class="cus-btn white" style="width: 100px" @click="reset"
|
||||
>重置
|
||||
</a-button
|
||||
>
|
||||
>重置
|
||||
</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row type="flex" gutter="12" style="padding-left: 20px">
|
||||
<a-row
|
||||
type="flex"
|
||||
gutter="12"
|
||||
style="padding-left: 20px; margin-right: 0px"
|
||||
>
|
||||
<a-col :span="1.5">
|
||||
<CommonStudent
|
||||
:type="type"
|
||||
:id="id"
|
||||
@finash="submitCall"
|
||||
:stage="stage"
|
||||
:type="type"
|
||||
:id="id"
|
||||
@finash="submitCall"
|
||||
:stage="stage"
|
||||
>
|
||||
<a-button class="cus-btn">
|
||||
<template #icon
|
||||
><img
|
||||
><img
|
||||
style="margin-right: 10px"
|
||||
src="../../assets/images/courseManage/add0.png"
|
||||
/></template>
|
||||
@@ -49,7 +56,7 @@
|
||||
<a-col :span="1.5">
|
||||
<a-button class="cus-btn white" @click="bathDel">
|
||||
<template #icon
|
||||
><img
|
||||
><img
|
||||
style="margin-right: 10px"
|
||||
src="../../assets/images/projectadd/delete.png"
|
||||
/></template>
|
||||
@@ -59,17 +66,17 @@
|
||||
</a-row>
|
||||
<div style="margin-top: 20px">
|
||||
<a-table
|
||||
:columns="tablecolumns"
|
||||
:data-source="tableData.list"
|
||||
:pagination="stuPagination"
|
||||
:loading="tableData.loading"
|
||||
row-key="id"
|
||||
:row-selection="stuRowSelection"
|
||||
:columns="tablecolumns"
|
||||
:data-source="tableData.list"
|
||||
:pagination="stuPagination"
|
||||
:loading="tableData.loading"
|
||||
row-key="id"
|
||||
:row-selection="stuRowSelection"
|
||||
>
|
||||
<template #action="{ record }">
|
||||
<div
|
||||
@click="del(record.id)"
|
||||
style="color: #4ea6ff; font-size: 14px; text-align: center"
|
||||
@click="del(record.id)"
|
||||
style="color: #4ea6ff; font-size: 14px; text-align: center"
|
||||
>
|
||||
删除
|
||||
</div>
|
||||
@@ -97,8 +104,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {computed, defineProps, onMounted, ref, watch} from "vue";
|
||||
import {delStudentList, getStuPage} from "@/api/index1";
|
||||
import { computed, defineProps, onMounted, ref, watch } from "vue";
|
||||
import { delStudentList, getStuPage } from "@/api/index1";
|
||||
import CommonStudent from "@/components/student/CommonStudent";
|
||||
|
||||
const props = defineProps({
|
||||
@@ -135,7 +142,7 @@ const tablecolumns = ref([
|
||||
title: "部门",
|
||||
dataIndex: "studentDepartName",
|
||||
key: "studentDepartName",
|
||||
width: "20%",
|
||||
width: "15%",
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
@@ -144,19 +151,19 @@ const tablecolumns = ref([
|
||||
title: "加入方式",
|
||||
dataIndex: "source",
|
||||
key: "source",
|
||||
width: "20%",
|
||||
width: 100,
|
||||
align: "center",
|
||||
customRender: ({record: {source}}) =>
|
||||
({1: "快速添加", 2: "组织", 3: "受众"}[source]),
|
||||
customRender: ({ record: { source } }) =>
|
||||
({ 1: "快速添加", 2: "组织", 3: "受众" }[source]),
|
||||
},
|
||||
...props.columns,
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
width: "25%",
|
||||
width: "20%",
|
||||
align: "center",
|
||||
slots: {customRender: "action"},
|
||||
slots: { customRender: "action" },
|
||||
},
|
||||
]);
|
||||
const tableParam = ref({
|
||||
@@ -185,9 +192,9 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
watch(props, () => {
|
||||
tableParam.value.pid= props.id
|
||||
tableParam.value.pid = props.id;
|
||||
getStuList();
|
||||
})
|
||||
});
|
||||
|
||||
function onStuSelectChange(e) {
|
||||
stuSelectKeys.value = e;
|
||||
@@ -216,26 +223,25 @@ function getStuList() {
|
||||
});
|
||||
}
|
||||
|
||||
function reset() {
|
||||
}
|
||||
function reset() {}
|
||||
|
||||
function bathDel() {
|
||||
stuSelectKeys.value &&
|
||||
stuSelectKeys.value.length &&
|
||||
delStudentList({
|
||||
ids: stuSelectKeys.value,
|
||||
}).then(() => {
|
||||
getStuList();
|
||||
});
|
||||
stuSelectKeys.value.length &&
|
||||
delStudentList({
|
||||
ids: stuSelectKeys.value,
|
||||
}).then(() => {
|
||||
getStuList();
|
||||
});
|
||||
}
|
||||
|
||||
function del(id) {
|
||||
id &&
|
||||
delStudentList({
|
||||
ids: [id],
|
||||
}).then(() => {
|
||||
getStuList();
|
||||
});
|
||||
delStudentList({
|
||||
ids: [id],
|
||||
}).then(() => {
|
||||
getStuList();
|
||||
});
|
||||
}
|
||||
|
||||
function submitCall(flag) {
|
||||
|
||||
@@ -506,7 +506,12 @@
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="3" tab="学员管理" force-render>
|
||||
<TableStudent :type="2" :id="routerId" :stage="stage"></TableStudent>
|
||||
<TableStudent
|
||||
:type="2"
|
||||
:id="routerId"
|
||||
:stage="stage"
|
||||
:columns="tableDataFunc()"
|
||||
></TableStudent>
|
||||
</a-tab-pane>
|
||||
<!--1211注释 待开放
|
||||
<a-tab-pane key="4" tab="设置">
|
||||
@@ -1332,49 +1337,49 @@ export default {
|
||||
|
||||
const tableDataFunc = () => {
|
||||
const columns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "name",
|
||||
// width: "30%",
|
||||
key: "name",
|
||||
width: 110,
|
||||
align: "left",
|
||||
className: "classify",
|
||||
// {
|
||||
// title: "姓名",
|
||||
// dataIndex: "name",
|
||||
// // width: "30%",
|
||||
// key: "name",
|
||||
// width: 110,
|
||||
// align: "left",
|
||||
// className: "classify",
|
||||
|
||||
scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
customRender: (text) => {
|
||||
// console.log(text.record.checked1);
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.name}</span>
|
||||
// scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
// customRender: (text) => {
|
||||
// // console.log(text.record.checked1);
|
||||
// return (
|
||||
// <div class="racona">
|
||||
// <span> {text.record.name}</span>
|
||||
|
||||
{/**
|
||||
<div class="img"></div>
|
||||
<a-checkbox class="ch" checked={text.record.checkedd}>
|
||||
{text.record.lei}
|
||||
</a-checkbox>
|
||||
*/}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "com",
|
||||
// width: "30%",
|
||||
key: "com",
|
||||
width: 110,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
// {
|
||||
// title: "岗位",
|
||||
// dataIndex: "gang",
|
||||
// key: "gang",
|
||||
// width: 110,
|
||||
// align: "center",
|
||||
// className: "h",
|
||||
// },
|
||||
// {/**
|
||||
// <div class="img"></div>
|
||||
// <a-checkbox class="ch" checked={text.record.checkedd}>
|
||||
// {text.record.lei}
|
||||
// </a-checkbox>
|
||||
// */}
|
||||
// </div>
|
||||
// );
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// title: "部门",
|
||||
// dataIndex: "com",
|
||||
// // width: "30%",
|
||||
// key: "com",
|
||||
// width: 110,
|
||||
// align: "center",
|
||||
// className: "h",
|
||||
// },
|
||||
// // {
|
||||
// // title: "岗位",
|
||||
// // dataIndex: "gang",
|
||||
// // key: "gang",
|
||||
// // width: 110,
|
||||
// // align: "center",
|
||||
// // className: "h",
|
||||
// // },
|
||||
{
|
||||
title: "当前关卡",
|
||||
dataIndex: "cur",
|
||||
@@ -1391,64 +1396,64 @@ export default {
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "开始时间",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
width: 120,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
className: "h",
|
||||
dataIndex: "opacation",
|
||||
key: "opacation",
|
||||
width: 140,
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="opa">
|
||||
<div class="opacation">
|
||||
{/**
|
||||
2022-11-30注释 后面放开
|
||||
<span
|
||||
onClick={() => {
|
||||
showCheckStu(text.record.studentId);
|
||||
state.Seevisible = true;
|
||||
}}
|
||||
style="color:#4EA6FF;margin-right:25px;cursor:pointer"
|
||||
>
|
||||
查看
|
||||
</span>
|
||||
*/}
|
||||
{/**
|
||||
2022-11-30注释 后面放开
|
||||
<span
|
||||
onClick={() => {
|
||||
state.visiblene = true;
|
||||
console.log(text.record.cur);
|
||||
}}
|
||||
style="color:#4EA6FF;margin-right:25px;cursor:pointer"
|
||||
>
|
||||
调整
|
||||
</span>
|
||||
*/}
|
||||
<span
|
||||
style="color:#4EA6FF;cursor:pointer"
|
||||
onClick={() => {
|
||||
delConfirm(text.record.studentId);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: "开始时间",
|
||||
// dataIndex: "time",
|
||||
// key: "time",
|
||||
// width: 120,
|
||||
// align: "center",
|
||||
// className: "h",
|
||||
// },
|
||||
// {
|
||||
// title: "操作",
|
||||
// className: "h",
|
||||
// dataIndex: "opacation",
|
||||
// key: "opacation",
|
||||
// width: 140,
|
||||
// align: "center",
|
||||
// fixed: "right",
|
||||
// scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
// customRender: (text) => {
|
||||
// return (
|
||||
// <div class="opa">
|
||||
// <div class="opacation">
|
||||
// {/**
|
||||
// 2022-11-30注释 后面放开
|
||||
// <span
|
||||
// onClick={() => {
|
||||
// showCheckStu(text.record.studentId);
|
||||
// state.Seevisible = true;
|
||||
// }}
|
||||
// style="color:#4EA6FF;margin-right:25px;cursor:pointer"
|
||||
// >
|
||||
// 查看
|
||||
// </span>
|
||||
// */}
|
||||
// {/**
|
||||
// 2022-11-30注释 后面放开
|
||||
// <span
|
||||
// onClick={() => {
|
||||
// state.visiblene = true;
|
||||
// console.log(text.record.cur);
|
||||
// }}
|
||||
// style="color:#4EA6FF;margin-right:25px;cursor:pointer"
|
||||
// >
|
||||
// 调整
|
||||
// </span>
|
||||
// */}
|
||||
// <span
|
||||
// style="color:#4EA6FF;cursor:pointer"
|
||||
// onClick={() => {
|
||||
// delConfirm(text.record.studentId);
|
||||
// }}
|
||||
// >
|
||||
// 删除
|
||||
// </span>
|
||||
// </div>
|
||||
// </div>
|
||||
// );
|
||||
// },
|
||||
// },
|
||||
];
|
||||
return columns;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user