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