mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 02:46:45 +08:00
feat:合并
This commit is contained in:
@@ -19,3 +19,5 @@ export const IsExistenceProject = (obj) => http.post('/admin/project/queryTaskDo
|
|||||||
// 判断当前在线课是否已经添加到该模板库下
|
// 判断当前在线课是否已经添加到该模板库下
|
||||||
export const IsExistenceProjectTemplate = (obj) => http.post('/admin/project/template/queryTaskDoesItExistForTemplate',obj);
|
export const IsExistenceProjectTemplate = (obj) => http.post('/admin/project/template/queryTaskDoesItExistForTemplate',obj);
|
||||||
|
|
||||||
|
// 新建外部考试
|
||||||
|
export const CreateExternalExam = (obj) => http.post('/external/exam/createExternalExam',obj);
|
||||||
@@ -382,6 +382,13 @@ export default {
|
|||||||
console.log("value", value, index);
|
console.log("value", value, index);
|
||||||
};
|
};
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
|
state.selectedRowKeys = [];
|
||||||
|
state.tableDataTotalLoading = true;
|
||||||
|
state.currentPage = 1;
|
||||||
|
state.name = null;
|
||||||
|
state.projectName2 = undefined;
|
||||||
|
state.tableDataTotal = -1;
|
||||||
|
state.tableDataTotal2 = 0;
|
||||||
ctx.emit("update:AAvisible", false);
|
ctx.emit("update:AAvisible", false);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -462,6 +469,7 @@ export default {
|
|||||||
taskType: props.datasource.type,
|
taskType: props.datasource.type,
|
||||||
status: state.projectName,
|
status: state.projectName,
|
||||||
studentName: state.name,
|
studentName: state.name,
|
||||||
|
signStatus: state.projectName2
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
@@ -506,6 +514,7 @@ export default {
|
|||||||
taskType: props.datasource.type,
|
taskType: props.datasource.type,
|
||||||
status: state.projectName,
|
status: state.projectName,
|
||||||
studentName: state.name,
|
studentName: state.name,
|
||||||
|
signStatus: state.projectName2
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
@@ -899,7 +908,7 @@ export default {
|
|||||||
process.env.VUE_APP_BASE_API
|
process.env.VUE_APP_BASE_API
|
||||||
}/admin/student/exportTaskStudent?currentStageId=${
|
}/admin/student/exportTaskStudent?currentStageId=${
|
||||||
props.datasource.chapterId
|
props.datasource.chapterId
|
||||||
}&type=2&pid=${props.datasource.courseId}&thirdType=1&taskId=${props.datasource.routerTaskId}`
|
}&type=2&pid=${props.datasource.courseId}&thirdType=1&taskId=${props.datasource.routerTaskId}&taskType=${props.datasource.type}`
|
||||||
);
|
);
|
||||||
}else{
|
}else{
|
||||||
window.open(
|
window.open(
|
||||||
@@ -907,7 +916,7 @@ export default {
|
|||||||
process.env.VUE_APP_BASE_API
|
process.env.VUE_APP_BASE_API
|
||||||
}/admin/student/exportTaskStudent?currentStageId=${
|
}/admin/student/exportTaskStudent?currentStageId=${
|
||||||
props.datasource.stageId
|
props.datasource.stageId
|
||||||
}&type=1&pid=${props.datasource.courseId}&thirdType=1&taskId=${props.datasource.projectTaskId}`
|
}&type=1&pid=${props.datasource.courseId}&thirdType=1&taskId=${props.datasource.projectTaskId}&taskType=${props.datasource.type}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -303,7 +303,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="test1.examinationName"
|
v-model:value="test1.externalName"
|
||||||
style="width: 400px; height: 40px; border-radius: 8px"
|
style="width: 400px; height: 40px; border-radius: 8px"
|
||||||
placeholder="请输入考试名称"
|
placeholder="请输入考试名称"
|
||||||
:maxlength="20"
|
:maxlength="20"
|
||||||
@@ -322,9 +322,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="test1.examinationName"
|
v-model:value="test1.source"
|
||||||
style="width: 400px; height: 40px; border-radius: 8px"
|
style="width: 400px; height: 40px; border-radius: 8px"
|
||||||
placeholder="请输入考试名称"
|
placeholder="请输入数据来源"
|
||||||
:maxlength="20"
|
:maxlength="20"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -335,7 +335,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="textarea">
|
<div class="textarea">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model:value="test1.examinationExplain"
|
v-model:value="test1.externalExplain"
|
||||||
placeholder="请输入考试说明"
|
placeholder="请输入考试说明"
|
||||||
allow-clear
|
allow-clear
|
||||||
show-count
|
show-count
|
||||||
@@ -369,7 +369,7 @@ import {
|
|||||||
} from "@/api/indexExam";
|
} from "@/api/indexExam";
|
||||||
// updateExamination,
|
// updateExamination,
|
||||||
import STest from "./SelectTest.vue";
|
import STest from "./SelectTest.vue";
|
||||||
import {ProjectEditTask, RouterEditTask} from "@/api/indexTask";
|
import {ProjectEditTask, RouterEditTask,CreateExternalExam} from "@/api/indexTask";
|
||||||
import {addTempTask} from "../../api/indexTaskadd";
|
import {addTempTask} from "../../api/indexTaskadd";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
//import { toDate } from "@/api/method";
|
//import { toDate } from "@/api/method";
|
||||||
@@ -456,16 +456,9 @@ export default {
|
|||||||
questionArrangement: 4,
|
questionArrangement: 4,
|
||||||
},
|
},
|
||||||
test1: {
|
test1: {
|
||||||
examinationName: '',
|
externalName: '',
|
||||||
chooseTime: '',
|
source: '',
|
||||||
examinationDuration: '',
|
externalExplain: null
|
||||||
passLine: '',
|
|
||||||
examinationExplain: null,
|
|
||||||
examinationLimit: null,
|
|
||||||
showAnswers: 1,
|
|
||||||
showAnalysis: 1,
|
|
||||||
scoringModel: 2,
|
|
||||||
questionArrangement: 4,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
addLoading: false,
|
addLoading: false,
|
||||||
@@ -510,7 +503,7 @@ export default {
|
|||||||
ctx.emit("update:addtestVisible", false);
|
ctx.emit("update:addtestVisible", false);
|
||||||
ctx.emit("update:edit", false);
|
ctx.emit("update:edit", false);
|
||||||
ctx.emit("update:EditTestId", state.EditTestId);
|
ctx.emit("update:EditTestId", state.EditTestId);
|
||||||
ctx.emit("update:testName", state.test.examinationName);
|
ctx.emit("update:testName", state.isOuter==1 ? state.test.examinationName : state.test1.externalName);
|
||||||
console.log("statetestName", state.test.examinationName);
|
console.log("statetestName", state.test.examinationName);
|
||||||
localStorage.setItem("stageId", props.chooseStageId);
|
localStorage.setItem("stageId", props.chooseStageId);
|
||||||
localStorage.setItem("chapterId", props.isactive);
|
localStorage.setItem("chapterId", props.isactive);
|
||||||
@@ -570,95 +563,141 @@ export default {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const updateTest = () => {
|
const updateTest = () => {
|
||||||
if (!state.test.examinationName) {
|
if(state.isOuter==1){
|
||||||
message.destroy();
|
|
||||||
return message.warning("请输入考试名称");
|
if (!state.test.examinationName) {
|
||||||
}
|
message.destroy();
|
||||||
if (!state.paperId) {
|
return message.warning("请输入考试名称");
|
||||||
message.destroy();
|
}
|
||||||
return message.warning("请输入选择试卷");
|
if (!state.paperId) {
|
||||||
}
|
message.destroy();
|
||||||
if (!state.test.chooseTime) {
|
return message.warning("请输入选择试卷");
|
||||||
message.destroy();
|
}
|
||||||
return message.warning("请输入开始结束时间");
|
if (!state.test.chooseTime) {
|
||||||
}
|
message.destroy();
|
||||||
if (!state.test.examinationDuration) {
|
return message.warning("请输入开始结束时间");
|
||||||
message.destroy();
|
}
|
||||||
return message.warning("请输入考试时长");
|
if (!state.test.examinationDuration) {
|
||||||
}
|
message.destroy();
|
||||||
if (!state.test.passLine) {
|
return message.warning("请输入考试时长");
|
||||||
message.destroy();
|
}
|
||||||
return message.warning("请输入及格线");
|
if (!state.test.passLine) {
|
||||||
}
|
message.destroy();
|
||||||
|
return message.warning("请输入及格线");
|
||||||
|
}
|
||||||
|
|
||||||
|
state.addLoading = true;
|
||||||
|
console.log("test", state.test);
|
||||||
|
// state.test.examinationStartTime = toDate(
|
||||||
|
// new Date(state.test.chooseTime[0].$d).getTime() / 1000,
|
||||||
|
// "Y-M-D h:m"
|
||||||
|
// );
|
||||||
|
// state.test.examinationEndTime =toDate(
|
||||||
|
// new Date(state.test.$slotschooseTime[1].$d).getTime() / 1000,
|
||||||
|
// "Y-M-D h:m"
|
||||||
|
// );
|
||||||
|
(state.test.examinationStartTime = dayjs(state.test.chooseTime[0]).format(
|
||||||
|
"YYYY-MM-DD HH:mm"
|
||||||
|
)),
|
||||||
|
(state.test.examinationEndTime = dayjs(state.test.chooseTime[1]).format(
|
||||||
|
"YYYY-MM-DD HH:mm"
|
||||||
|
)),
|
||||||
|
(state.test.examinationPaperId = state.paperId);
|
||||||
|
//TODO缺少paperName字段
|
||||||
|
state.test.examinationTestName = state.paperName;
|
||||||
|
//考试推送
|
||||||
|
state.test.targetId = 0;
|
||||||
|
state.test.type = 0;
|
||||||
|
state.test.chapterId=0;
|
||||||
|
console.log("props.offCourseId",props.offCourseId);
|
||||||
|
if (props.faceLevel && props.offCourseId > 0) {
|
||||||
|
state.test.targetId = props.offCourseId;
|
||||||
|
state.test.type = 3;
|
||||||
|
}else{
|
||||||
|
if(props.isLevel == 1){
|
||||||
|
state.test.targetId = props.routerId;
|
||||||
|
state.test.chapterId = props.isactive;
|
||||||
|
state.test.type = 2;
|
||||||
|
|
||||||
|
|
||||||
|
} else if (props.isLevel == 2) {
|
||||||
|
state.test.targetId = props.projectId;
|
||||||
|
state.test.type = 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
state.addLoading = true;
|
|
||||||
console.log("test", state.test);
|
|
||||||
// state.test.examinationStartTime = toDate(
|
|
||||||
// new Date(state.test.chooseTime[0].$d).getTime() / 1000,
|
|
||||||
// "Y-M-D h:m"
|
|
||||||
// );
|
|
||||||
// state.test.examinationEndTime =toDate(
|
|
||||||
// new Date(state.test.$slotschooseTime[1].$d).getTime() / 1000,
|
|
||||||
// "Y-M-D h:m"
|
|
||||||
// );
|
|
||||||
(state.test.examinationStartTime = dayjs(state.test.chooseTime[0]).format(
|
|
||||||
"YYYY-MM-DD HH:mm"
|
|
||||||
)),
|
|
||||||
(state.test.examinationEndTime = dayjs(state.test.chooseTime[1]).format(
|
|
||||||
"YYYY-MM-DD HH:mm"
|
|
||||||
)),
|
|
||||||
(state.test.examinationPaperId = state.paperId);
|
|
||||||
//TODO缺少paperName字段
|
|
||||||
state.test.examinationTestName = state.paperName;
|
|
||||||
//考试推送
|
|
||||||
state.test.targetId = 0;
|
|
||||||
state.test.type = 0;
|
|
||||||
state.test.chapterId=0;
|
|
||||||
console.log("props.offCourseId",props.offCourseId);
|
|
||||||
if (props.faceLevel && props.offCourseId > 0) {
|
|
||||||
state.test.targetId = props.offCourseId;
|
|
||||||
state.test.type = 3;
|
|
||||||
}else{
|
|
||||||
if(props.isLevel == 1){
|
|
||||||
state.test.targetId = props.routerId;
|
|
||||||
state.test.chapterId = props.isactive;
|
|
||||||
state.test.type = 2;
|
|
||||||
|
|
||||||
|
|
||||||
} else if (props.isLevel == 2) {
|
|
||||||
state.test.targetId = props.projectId;
|
|
||||||
state.test.type = 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// if (props.EditTestId > 0) {
|
||||||
|
// // 编辑任务
|
||||||
|
// updateExamination(state.test)
|
||||||
|
// .then(async (res) => {
|
||||||
|
// await updateTask(res);
|
||||||
|
// // closeDrawer();
|
||||||
|
// })
|
||||||
|
// .catch(() => {
|
||||||
|
// message.destroy();
|
||||||
|
// message.error(`编辑失败`);
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// 创建任务
|
||||||
|
createExamination(state.test)
|
||||||
|
.then(async (res) => {
|
||||||
|
await updateTask(res);
|
||||||
|
// closeDrawer();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
message.destroy();
|
||||||
|
message.error(`创建失败`);
|
||||||
|
});
|
||||||
|
// }
|
||||||
|
}else{
|
||||||
|
// 创建外部考试
|
||||||
|
console.log('我是点了外部考试')
|
||||||
|
if (!state.test1.externalName) {
|
||||||
|
message.destroy();
|
||||||
|
message.warning("请输入考试名称");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!state.test1.source) {
|
||||||
|
message.destroy();
|
||||||
|
message.warning("请输入数据来源");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//考试推送
|
||||||
|
state.test1.targetId = 0;
|
||||||
|
state.test1.type = 0;
|
||||||
|
state.test1.chapterId=0;
|
||||||
|
console.log("props.offCourseId",props.offCourseId);
|
||||||
|
if (props.faceLevel && props.offCourseId > 0) {
|
||||||
|
state.test1.targetId = props.offCourseId;
|
||||||
|
state.test1.type = 3;
|
||||||
|
}else{
|
||||||
|
if(props.isLevel == 1){
|
||||||
|
state.test1.targetId = props.routerId;
|
||||||
|
state.test1.chapterId = props.isactive;
|
||||||
|
state.test1.type = 2;
|
||||||
|
|
||||||
|
|
||||||
|
} else if (props.isLevel == 2) {
|
||||||
|
state.test1.targetId = props.projectId;
|
||||||
|
state.test1.type = 1;
|
||||||
|
|
||||||
// if (props.EditTestId > 0) {
|
}
|
||||||
// // 编辑任务
|
}
|
||||||
// updateExamination(state.test)
|
// 新建外部考试
|
||||||
// .then(async (res) => {
|
CreateExternalExam(state.test1).then( async res=>{
|
||||||
// await updateTask(res);
|
console.log(res)
|
||||||
// // closeDrawer();
|
// 添加更新到任务
|
||||||
// })
|
await updateTask1(res);
|
||||||
// .catch(() => {
|
}).catch(err=>{
|
||||||
// message.destroy();
|
console.log(err)
|
||||||
// message.error(`编辑失败`);
|
})
|
||||||
// });
|
}
|
||||||
// } else {
|
|
||||||
// 创建任务
|
|
||||||
createExamination(state.test)
|
|
||||||
.then(async (res) => {
|
|
||||||
await updateTask(res);
|
|
||||||
// closeDrawer();
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
message.destroy();
|
|
||||||
message.error(`创建失败`);
|
|
||||||
});
|
|
||||||
// }
|
|
||||||
};
|
};
|
||||||
|
// 系统考试
|
||||||
const updateTask = (res) => {
|
const updateTask = (res) => {
|
||||||
state.EditTestId = res.data.data.examinationId;
|
state.EditTestId = res.data.data.examinationId;
|
||||||
if (props.faceLevel) {
|
if (props.faceLevel) {
|
||||||
@@ -734,6 +773,81 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
// 外部考试
|
||||||
|
const updateTask1 = (res) => {
|
||||||
|
state.EditTestId = res.data.data.externalId;
|
||||||
|
if (props.faceLevel) {
|
||||||
|
state.EditTestId = res.data.data.externalId;
|
||||||
|
state.paperName = "";
|
||||||
|
closeDrawer();
|
||||||
|
} else {
|
||||||
|
if (props.isLevel == 1) {
|
||||||
|
if (!props.isactive) {
|
||||||
|
message.destroy();
|
||||||
|
return message.warning("请先选中关卡");
|
||||||
|
}
|
||||||
|
let editObj1 = {
|
||||||
|
chapterId: props.isactive,
|
||||||
|
courseId: res.data.data.externalId,
|
||||||
|
name: res.data.data.externalName,
|
||||||
|
routerId: props.routerId,
|
||||||
|
routerTaskId: props.routerTaskId || 0,
|
||||||
|
type: 5,
|
||||||
|
};
|
||||||
|
RouterEditTask(editObj1)
|
||||||
|
.then(() => {
|
||||||
|
console.log("props.edit", props.edit);
|
||||||
|
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
|
||||||
|
ctx.emit("changeData", false);
|
||||||
|
state.paperName = "";
|
||||||
|
closeDrawer();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
//message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||||
|
});
|
||||||
|
} else if (props.isLevel == 2) {
|
||||||
|
let editObj = {
|
||||||
|
courseId: res.data.data.externalId,
|
||||||
|
name: res.data.data.externalName,
|
||||||
|
projectId: props.projectId,
|
||||||
|
projectTaskId: props.projectTaskId || 0,
|
||||||
|
stageId: props.chooseStageId || 0,
|
||||||
|
type: 5,
|
||||||
|
};
|
||||||
|
// 新增编辑或新增项目
|
||||||
|
ProjectEditTask(editObj)
|
||||||
|
.then(() => {
|
||||||
|
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
|
||||||
|
ctx.emit("changeData", false);
|
||||||
|
state.paperName = "";
|
||||||
|
closeDrawer();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
//message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
|
||||||
|
});
|
||||||
|
} else if (props.isLevel == 3) {
|
||||||
|
addTempTask({
|
||||||
|
courseId: res.data.data.externalId,
|
||||||
|
name: res.data.data.externalName,
|
||||||
|
projectTemplateId: props.projectTemplateId,
|
||||||
|
projectTaskId: props.projectTaskId || 0,
|
||||||
|
stageId: props.chooseStageId || 0,
|
||||||
|
type: 5,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
|
||||||
|
ctx.emit("changeData", false);
|
||||||
|
state.paperName = "";
|
||||||
|
closeDrawer();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
//message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const cloradio1 = (value) => {
|
const cloradio1 = (value) => {
|
||||||
if (value != "") {
|
if (value != "") {
|
||||||
state.showAnswers = "";
|
state.showAnswers = "";
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<div class="drawerMain" id="ProjCheckship" style="">
|
<div class="drawerMain" id="ProjCheckship" style="">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="headerTitle">
|
<div class="headerTitle">
|
||||||
{{ {1: "添加学员", 2: "添加学员", 3: "添加学员",4: "查看权",5: "管理权"}[type] || "" }}
|
{{ {1: "添加学员", 2: "添加学员", 3: "添加学员",4: "查看权",5: "管理权"}[type] || title }}
|
||||||
</div>
|
</div>
|
||||||
<img
|
<img
|
||||||
style="width: 29px; height: 29px; cursor: pointer"
|
style="width: 29px; height: 29px; cursor: pointer"
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane :key="2" tab="添加组织">
|
<a-tab-pane v-if="!selectStu" :key="2" tab="添加组织">
|
||||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||||
<div class="tab2">
|
<div class="tab2">
|
||||||
<a-form-item label="组织:">
|
<a-form-item label="组织:">
|
||||||
@@ -146,7 +146,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane :key="3" tab="受众关联">
|
<a-tab-pane v-if="!selectStu" :key="3" tab="受众关联">
|
||||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||||
<div>
|
<div>
|
||||||
<a-form-item label="受众名称:">
|
<a-form-item label="受众名称:">
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="tableBox tabb">
|
<div class="tableBox tabb">
|
||||||
<a-table
|
<a-table
|
||||||
style="border: 1px solid #f2f6fe"
|
style="border: 1px solid #f2f6fe;width:800px"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:columns="audiColums"
|
:columns="audiColums"
|
||||||
:data-source="audiData"
|
:data-source="audiData"
|
||||||
@@ -193,126 +193,94 @@
|
|||||||
<div class="already">已选</div>
|
<div class="already">已选</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div :style="{ 'max-height': screenHeight - 235 + 'px' }" style="overflow-y: auto">
|
||||||
class="selecteds"
|
<div class="selecteds">
|
||||||
:style="{ 'max-height': screenHeight - 235 + 'px' }"
|
<div class="person">快速选人</div>
|
||||||
style="overflow-y: auto"
|
<div v-for="(item, i) in selectsData.studentList">
|
||||||
>
|
<div v-if="i < 11">
|
||||||
<div class="person">快速选人</div>
|
|
||||||
<div v-for="(item, i) in selectsData.studentList">
|
|
||||||
<div v-if="i < 11">
|
|
||||||
<div class="chose">
|
|
||||||
{{ item.realName }}
|
|
||||||
<div class="ch" @click="stuDel(i)"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
<div v-if="person">
|
|
||||||
<div class="chose">
|
<div class="chose">
|
||||||
{{ item.realName }}
|
{{ item.realName }}
|
||||||
<div class="ch" @click="stuDel(i)"></div>
|
<div class="ch" @click="stuDel(i)"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div v-else>
|
||||||
</div>
|
<div v-if="person">
|
||||||
<div
|
<div class="chose">
|
||||||
v-if="!person && selectsData.studentList.length > 10"
|
{{ item.realName }}
|
||||||
class="ifsw"
|
<div class="ch" @click="stuDel(i)"></div>
|
||||||
>
|
</div>
|
||||||
<div @click="person = !person" class="“sw”">查看更多></div>
|
</div>
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-if="person && selectsData.studentList.length > 10"
|
|
||||||
class="ifsw"
|
|
||||||
>
|
|
||||||
<div @click="person = !person" class="sw">收起<</div>
|
|
||||||
</div>
|
|
||||||
<div class="dept">添加组织</div>
|
|
||||||
<div v-for="(item,i) in selectsData.deptList">
|
|
||||||
<div v-if="i<11">
|
|
||||||
<div class="chose1">
|
|
||||||
<div class="span"> {{ item.name }}</div>
|
|
||||||
<div class="ch1" @click="orgDel(i)"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div
|
||||||
<div v-if="dept">
|
v-if="!person && selectsData.studentList.length > 10"
|
||||||
|
class="ifsw"
|
||||||
|
>
|
||||||
|
<div @click="person = !person" class="“sw”">查看更多></div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="person && selectsData.studentList.length > 10"
|
||||||
|
class="ifsw"
|
||||||
|
>
|
||||||
|
<div @click="person = !person" class="sw">收起<</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="!selectStu" class="selecteds">
|
||||||
|
<div class="dept">添加组织</div>
|
||||||
|
<div v-for="(item,i) in selectsData.deptList">
|
||||||
|
<div v-if="i<11">
|
||||||
<div class="chose1">
|
<div class="chose1">
|
||||||
<div class="span"> {{ item.name }}</div>
|
<div class="span"> {{ item.name }}</div>
|
||||||
<div class="ch1" @click="orgDel(i)"></div>
|
<div class="ch1" @click="orgDel(i)"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else>
|
||||||
</div>
|
<div v-if="dept">
|
||||||
|
<div class="chose1">
|
||||||
</div>
|
<div class="span"> {{ item.name }}</div>
|
||||||
<div v-if="!dept && selectsData.deptList.length >10" class="ifsw">
|
<div class="ch1" @click="orgDel(i)"></div>
|
||||||
<div @click="dept = !dept" class=“sw”>查看更多></div>
|
</div>
|
||||||
</div>
|
|
||||||
<div v-if="dept && selectsData.deptList.length >10" class="ifsw">
|
|
||||||
<div @click="dept = !dept" class="sw"> 收起<</div>
|
|
||||||
</div>
|
|
||||||
<!--受众-->
|
|
||||||
<div class="group">受众关联</div>
|
|
||||||
<div v-for="(item, i) in selectsData.groupList">
|
|
||||||
<div v-if="i < 11">
|
|
||||||
<div class="chose2">
|
|
||||||
<div class="span">{{ item.audienceName }}</div>
|
|
||||||
<div class="ch2" @click="AuditDel(i)"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
<div v-if="group">
|
|
||||||
<div class="chose2">
|
|
||||||
<div class="span">{{ item.audienceName }}</div>
|
|
||||||
<div class="ch2" @click="AuditDel(i)"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="!dept && selectsData.deptList.length >10" class="ifsw">
|
||||||
|
<div @click="dept = !dept" class=“sw”>查看更多></div>
|
||||||
|
</div>
|
||||||
|
<div v-if="dept && selectsData.deptList.length >10" class="ifsw">
|
||||||
|
<div @click="dept = !dept" class="sw"> 收起<</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<!--受众-->
|
||||||
v-if="!group && selectsData.groupList.length > 10"
|
<div v-if="!selectStu" class="selecteds">
|
||||||
class="ifsw"
|
<div class="group">受众关联</div>
|
||||||
>
|
<div v-for="(item, i) in selectsData.groupList">
|
||||||
<div @click="group = !group" class="“sw”">查看更多></div>
|
<div v-if="i < 11">
|
||||||
</div>
|
<div class="chose2">
|
||||||
<div v-if="group && selectsData.groupList > 10" class="ifsw">
|
<div class="span">{{ item.audienceName }}</div>
|
||||||
<div @click="group = !group" class="sw">收起<</div>
|
<div class="ch2" @click="AuditDel(i)"></div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<div v-if="group">
|
||||||
|
<div class="chose2">
|
||||||
|
<div class="span">{{ item.audienceName }}</div>
|
||||||
|
<div class="ch2" @click="AuditDel(i)"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="!group && selectsData.groupList.length > 10"
|
||||||
|
class="ifsw"
|
||||||
|
>
|
||||||
|
<div @click="group = !group" class="“sw”">查看更多></div>
|
||||||
|
</div>
|
||||||
|
<div v-if="group && selectsData.groupList > 10" class="ifsw">
|
||||||
|
<div @click="group = !group" class="sw">收起<</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div style="padding:100px 0 0 20px;display: grid;grid-template-rows: auto auto auto;">
|
|
||||||
<div>
|
|
||||||
<div style="margin-top: 20px">快速选人</div>
|
|
||||||
// eslint-disable-next-line vue/require-v-for-key
|
|
||||||
<div v-for="(item,i) in selectsData.studentList" >
|
|
||||||
<a-tag v-if="i < 10" :closable="true" color="#4ea6ff" @close="stuDel(i)"
|
|
||||||
:key="i" style="margin-top:20px">
|
|
||||||
{{ item.realName }}
|
|
||||||
</a-tag>
|
|
||||||
<a-tag v-else :closable="true" color="#4ea6ff" @close="stuDel(i)"
|
|
||||||
style="margin-top:20px">
|
|
||||||
{{ item.realName }}
|
|
||||||
</a-tag>
|
|
||||||
<div></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div style="margin-top: 20px">组织添加</div>
|
|
||||||
<a-tag :closable="true" color="#4ea6ff" @close="orgDel(i)" v-for="(item,i) in selectsData.deptList"
|
|
||||||
:key="i"
|
|
||||||
style="margin-top:20px">
|
|
||||||
{{ item.name }}
|
|
||||||
</a-tag>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div style="margin-top: 20px">受众添加</div>
|
|
||||||
<a-tag :closable="true" color="#4ea6ff" @close="AuditDel(i)" v-for="(item,i) in selectsData.groupList"
|
|
||||||
:key="i" style="margin-top:20px">
|
|
||||||
{{ item.audienceName }}
|
|
||||||
</a-tag>
|
|
||||||
</div>
|
|
||||||
</div>-->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="btnn">
|
<div class="btnn">
|
||||||
<button class="btn1" @click="closeDrawer">取消</button>
|
<button class="btn1" @click="closeDrawer">取消</button>
|
||||||
@@ -419,6 +387,22 @@ const emit = defineEmits({});
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
id: String,
|
id: String,
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
clear: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
selectStu: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
selectOne: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
stage: {
|
stage: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
@@ -577,6 +561,7 @@ const auditSelectKeys = ref([]);
|
|||||||
const screenHeight = ref(document.body.clientHeight);
|
const screenHeight = ref(document.body.clientHeight);
|
||||||
//const screenWidth = ref(document.body.clientWidth);
|
//const screenWidth = ref(document.body.clientWidth);
|
||||||
const stuRowSelection = computed(() => ({
|
const stuRowSelection = computed(() => ({
|
||||||
|
type:props.selectOne?'radio':'checkbox',
|
||||||
columnWidth: 20,
|
columnWidth: 20,
|
||||||
selectedRowKeys: stuSelectKeys.value,
|
selectedRowKeys: stuSelectKeys.value,
|
||||||
onChange: onStuSelectChange,
|
onChange: onStuSelectChange,
|
||||||
@@ -764,6 +749,7 @@ function handleStageOk() {
|
|||||||
saveStu({
|
saveStu({
|
||||||
targetId: props.id,
|
targetId: props.id,
|
||||||
type: props.type,
|
type: props.type,
|
||||||
|
clear:props.clear,
|
||||||
deptIds: selectsData.value.deptList?.map((e) => e.id),
|
deptIds: selectsData.value.deptList?.map((e) => e.id),
|
||||||
stageId: selectsData.value.stageId,
|
stageId: selectsData.value.stageId,
|
||||||
groupIds: selectsData.value.groupList?.map((e) => e.id),
|
groupIds: selectsData.value.groupList?.map((e) => e.id),
|
||||||
|
|||||||
47
src/components/student/OwnerTableModelStudent.vue
Normal file
47
src/components/student/OwnerTableModelStudent.vue
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
|
* @Date: 2023-01-31 13:41:35
|
||||||
|
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||||
|
* @LastEditTime: 2023-01-31 13:45:07
|
||||||
|
* @FilePath: /fe-manage/src/components/student/OwnerTableModelStudent.vue
|
||||||
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<TableModelStudent :types="types" :id="id" ref="tableModelRef">
|
||||||
|
<template #extension="{ data: { record } }">
|
||||||
|
<CommonStudent
|
||||||
|
v-if="record.type === type"
|
||||||
|
:type="type"
|
||||||
|
:id="id"
|
||||||
|
@finash="submitCall"
|
||||||
|
:clear="true"
|
||||||
|
:select-stu="true"
|
||||||
|
:select-one="true"
|
||||||
|
>
|
||||||
|
<a-button type="link">转移归属权</a-button>
|
||||||
|
</CommonStudent>
|
||||||
|
</template>
|
||||||
|
<slot></slot>
|
||||||
|
</TableModelStudent>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { defineProps, ref } from "vue";
|
||||||
|
import TableModelStudent from "@/components/student/TableModelStudent";
|
||||||
|
import CommonStudent from "@/components/student/CommonStudent";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
id: String,
|
||||||
|
type: Number,
|
||||||
|
types: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log("props", props.types);
|
||||||
|
const tableModelRef = ref();
|
||||||
|
|
||||||
|
function submitCall(flag) {
|
||||||
|
tableModelRef.value.loading = true;
|
||||||
|
flag && tableModelRef.value.searchStu();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -1,51 +1,61 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="CommonStudent">
|
<div class="CommonStudent">
|
||||||
<a-drawer
|
<a-drawer
|
||||||
:visible="visiable"
|
:visible="visiable"
|
||||||
class="drawerStyle ProjCheckship"
|
class="drawerStyle ProjCheckship"
|
||||||
placement="right"
|
placement="right"
|
||||||
width="40%"
|
width="40%"
|
||||||
>
|
>
|
||||||
<div class="drawerMain" id="ProjCheckship" style="">
|
<div class="drawerMain" id="ProjCheckship" style="">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="headerTitle">
|
<div class="headerTitle">权限名单</div>
|
||||||
权限名单
|
|
||||||
</div>
|
|
||||||
<img
|
<img
|
||||||
style="width: 29px; height: 29px; cursor: pointer"
|
style="width: 29px; height: 29px; cursor: pointer"
|
||||||
src="../../assets/images/basicinfo/close.png"
|
src="../../assets/images/basicinfo/close.png"
|
||||||
@click="closeDrawer"
|
@click="closeDrawer"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="TableStudent">
|
<div class="TableStudent">
|
||||||
<a-row
|
<a-row
|
||||||
type="flex"
|
type="flex"
|
||||||
gutter="12"
|
gutter="12"
|
||||||
style="padding-left: 20px; margin-right: 0px"
|
style="padding-left: 20px; margin-right: 0px"
|
||||||
>
|
>
|
||||||
<a-col>
|
<a-col>
|
||||||
<a-form-item title="姓名:">
|
<a-form-item title="姓名:">
|
||||||
<a-input
|
<a-input
|
||||||
class="cus-input"
|
class="cus-input"
|
||||||
v-model:value="searchParams.studentName"
|
v-model:value="searchParams.studentName"
|
||||||
placeholder="请输入姓名"
|
placeholder="请输入姓名"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col>
|
<a-col>
|
||||||
<a-button
|
<a-button
|
||||||
class="cus-btn"
|
class="cus-btn"
|
||||||
style="background: #4ea6ff; color: #fff; width: 100px"
|
style="background: #4ea6ff; color: #fff; width: 100px"
|
||||||
@click="searchStu"
|
@click="searchStu"
|
||||||
>
|
>
|
||||||
<template #icon><img style="margin-right: 10px" src="../../assets/images/courseManage/search0.png"/>
|
<template #icon
|
||||||
|
><img
|
||||||
|
style="margin-right: 10px"
|
||||||
|
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
|
||||||
<template #icon><img style="margin-right: 10px" src="../../assets/images/leveladd/reset.png"/>
|
class="cus-btn white"
|
||||||
|
style="width: 100px"
|
||||||
|
@click="reset"
|
||||||
|
>
|
||||||
|
<template #icon
|
||||||
|
><img
|
||||||
|
style="margin-right: 10px"
|
||||||
|
src="../../assets/images/leveladd/reset.png"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
重置
|
重置
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -53,16 +63,18 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
<div style="margin-top: 20px">
|
<div style="margin-top: 20px">
|
||||||
<a-table
|
<a-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data-source="studentList"
|
:data-source="studentList"
|
||||||
:pagination="stuPagination"
|
:pagination="stuPagination"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
>
|
>
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<a-space :size="2">
|
<a-space :size="2">
|
||||||
<slot name="extension" v-bind:data="{ record }"></slot>
|
<slot name="extension" v-bind:data="{ record }"></slot>
|
||||||
<a-button @click="del(record.id)" type="link" danger>删除</a-button>
|
<a-button @click="del(record.id)" type="link" danger
|
||||||
|
>删除</a-button
|
||||||
|
>
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@@ -80,12 +92,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {computed, createVNode, defineProps, ref, watch} from "vue";
|
import {
|
||||||
import {usePage} from "@/api/request";
|
computed,
|
||||||
import {STUDENT_LIST} from "@/api/apis";
|
createVNode,
|
||||||
import {delStudentList} from "@/api/index1";
|
defineProps,
|
||||||
import {ExclamationCircleOutlined} from "@ant-design/icons-vue";
|
defineExpose,
|
||||||
import {Modal} from "ant-design-vue";
|
ref,
|
||||||
|
watch,
|
||||||
|
} from "vue";
|
||||||
|
import { usePage } from "@/api/request";
|
||||||
|
import { STUDENT_LIST } from "@/api/apis";
|
||||||
|
import { delStudentList } from "@/api/index1";
|
||||||
|
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
||||||
|
import { Modal } from "ant-design-vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
@@ -106,12 +125,12 @@ const initParams = {
|
|||||||
studentName: "",
|
studentName: "",
|
||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
type: props.type || '',
|
type: props.type || "",
|
||||||
types: props.types,
|
types: props.types,
|
||||||
pid: props.id || '',
|
pid: props.id || "",
|
||||||
}
|
};
|
||||||
|
|
||||||
const searchParams = ref(initParams)
|
const searchParams = ref(initParams);
|
||||||
|
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{
|
{
|
||||||
@@ -144,7 +163,8 @@ const columns = ref([
|
|||||||
key: "type",
|
key: "type",
|
||||||
width: 30,
|
width: 30,
|
||||||
align: "center",
|
align: "center",
|
||||||
customRender: ({record: {type}}) => ({4: "查看权", 5: "管理权", 6: "归属权"}[type]),
|
customRender: ({ record: { type } }) =>
|
||||||
|
({ 4: "查看权", 5: "管理权", 6: "归属权" }[type]),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
@@ -152,11 +172,16 @@ const columns = ref([
|
|||||||
key: "operation",
|
key: "operation",
|
||||||
width: 50,
|
width: 50,
|
||||||
align: "center",
|
align: "center",
|
||||||
slots: {customRender: "action"},
|
slots: { customRender: "action" },
|
||||||
},
|
},
|
||||||
])
|
]);
|
||||||
|
|
||||||
const {data: studentList, fetch: searchStu, total, loading} = usePage(STUDENT_LIST, searchParams.value)
|
const {
|
||||||
|
data: studentList,
|
||||||
|
fetch: searchStu,
|
||||||
|
total,
|
||||||
|
loading,
|
||||||
|
} = usePage(STUDENT_LIST, searchParams.value);
|
||||||
|
|
||||||
const stuPagination = computed(() => ({
|
const stuPagination = computed(() => ({
|
||||||
total: total,
|
total: total,
|
||||||
@@ -176,14 +201,14 @@ const changePagination = (page) => {
|
|||||||
|
|
||||||
function del(id) {
|
function del(id) {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: () => '确定删除?',
|
title: () => "确定删除?",
|
||||||
icon: () => createVNode(ExclamationCircleOutlined),
|
icon: () => createVNode(ExclamationCircleOutlined),
|
||||||
content: () => '数据删除后不可恢复!',
|
content: () => "数据删除后不可恢复!",
|
||||||
okText: () => '确定',
|
okText: () => "确定",
|
||||||
okType: 'danger',
|
okType: "danger",
|
||||||
cancelText: () => '取消',
|
cancelText: () => "取消",
|
||||||
onOk() {
|
onOk() {
|
||||||
id && delStudentList({ids: [id]}).then(() => searchStu())
|
id && delStudentList({ ids: [id] }).then(() => searchStu());
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -192,14 +217,19 @@ const closeDrawer = () => {
|
|||||||
visiable.value = false;
|
visiable.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
function reset(){
|
function reset() {
|
||||||
searchParams.value = initParams
|
searchParams.value = initParams;
|
||||||
searchStu()
|
searchStu();
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(visiable, () => {
|
watch(visiable, () => {
|
||||||
visiable.value && searchStu()
|
visiable.value && searchStu();
|
||||||
searchParams.value = initParams
|
searchParams.value = initParams;
|
||||||
|
});
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
searchStu,
|
||||||
|
loading,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@@ -691,7 +691,7 @@
|
|||||||
import { reactive, toRefs, onMounted, watch, computed } from "vue";
|
import { reactive, toRefs, onMounted, watch, computed } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import CommonStudent from "@/components/student/CommonStudent";
|
import CommonStudent from "@/components/student/CommonStudent";
|
||||||
import TableModelStudent from "@/components/student/TableModelStudent";
|
import OwnerTableModelStudent from "@/components/student/OwnerTableModelStudent";
|
||||||
import ProjOwnerShip from "../../components/drawers/ProjectOwn";
|
import ProjOwnerShip from "../../components/drawers/ProjectOwn";
|
||||||
import ProjPowerList from "../../components/drawers/ProjPowerList";
|
import ProjPowerList from "../../components/drawers/ProjPowerList";
|
||||||
import ProjCheckShip from "../../components/drawers/ProjCheckPower";
|
import ProjCheckShip from "../../components/drawers/ProjCheckPower";
|
||||||
@@ -700,7 +700,6 @@ import * as apiStu from "../../api/index";
|
|||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import {
|
import {
|
||||||
commonData,
|
commonData,
|
||||||
changeOwnership,
|
|
||||||
} from "@/api/method";
|
} from "@/api/method";
|
||||||
import { storage } from "@/api/storage";
|
import { storage } from "@/api/storage";
|
||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
@@ -1254,7 +1253,7 @@ export default {
|
|||||||
dropdownClassName="tabledropdown"
|
dropdownClassName="tabledropdown"
|
||||||
>
|
>
|
||||||
<a-select-option value="权限名单" label="权限名单">
|
<a-select-option value="权限名单" label="权限名单">
|
||||||
<TableModelStudent types={[7,8,9]} id={text.record.id}>权限名单</TableModelStudent>
|
<OwnerTableModelStudent types={[7,8,9]} id={text.record.id} type={9}>权限名单</OwnerTableModelStudent>
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
<a-select-option value="查看权" label="查看权">
|
<a-select-option value="查看权" label="查看权">
|
||||||
<CommonStudent type={7} id={text.record.id}>查看权</CommonStudent>
|
<CommonStudent type={7} id={text.record.id}>查看权</CommonStudent>
|
||||||
@@ -1497,15 +1496,6 @@ export default {
|
|||||||
.catch((chapterErr) => {
|
.catch((chapterErr) => {
|
||||||
console.log("关卡创建失败", chapterErr);
|
console.log("关卡创建失败", chapterErr);
|
||||||
});
|
});
|
||||||
//添加归属权 [id: '966735050643083264', name: '丁舟航']
|
|
||||||
let selectPeopleArr = [
|
|
||||||
{ id: res.data.data.createId, name: res.data.data.createName },
|
|
||||||
];
|
|
||||||
changeOwnership(
|
|
||||||
"learnPath",
|
|
||||||
res.data.data.routerId,
|
|
||||||
selectPeopleArr
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|||||||
@@ -3,15 +3,14 @@
|
|||||||
<div class="projectAdd">
|
<div class="projectAdd">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<span class="title"
|
<span class="title"
|
||||||
>{{
|
>{{ projectInfo.projectId ? "编辑" : "创建"
|
||||||
projectInfo.projectId ? "编辑" : "创建"
|
|
||||||
}}{{ ptojectType == "3" ? "班级" : "项目" }}</span
|
}}{{ ptojectType == "3" ? "班级" : "项目" }}</span
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@click="backPage"
|
@click="backPage"
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
to="/projectmanage"
|
to="/projectmanage"
|
||||||
class="goback"
|
class="goback"
|
||||||
>
|
>
|
||||||
<span class="return"></span><span class="returntext">返回</span>
|
<span class="return"></span><span class="returntext">返回</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -21,8 +20,8 @@
|
|||||||
<div class="name" v-if="projectInfo.parentName">
|
<div class="name" v-if="projectInfo.parentName">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img
|
||||||
class="nameimg"
|
class="nameimg"
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
/>
|
/>
|
||||||
<div class="inname">项目归属</div>
|
<div class="inname">项目归属</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -35,8 +34,8 @@
|
|||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img
|
||||||
class="nameimg"
|
class="nameimg"
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
/>
|
/>
|
||||||
<div class="inname">
|
<div class="inname">
|
||||||
{{ ptojectType == 3 ? "班级名称" : "项目名称" }}
|
{{ ptojectType == 3 ? "班级名称" : "项目名称" }}
|
||||||
@@ -44,27 +43,27 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<NameInput
|
<NameInput
|
||||||
placeholder="请输入项目名称"
|
placeholder="请输入项目名称"
|
||||||
v-model:value="projectInfo.name"
|
v-model:value="projectInfo.name"
|
||||||
v-model:validate="projectInfo.validate"
|
v-model:validate="projectInfo.validate"
|
||||||
:maxlength="30"
|
:maxlength="30"
|
||||||
show-count
|
show-count
|
||||||
:id="projectInfo.projectId"
|
:id="projectInfo.projectId"
|
||||||
></NameInput>
|
></NameInput>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name flex-top">
|
<div class="name flex-top">
|
||||||
<div class="namebox" style="margin-top: 10px">
|
<div class="namebox" style="margin-top: 10px">
|
||||||
<img
|
<img
|
||||||
class="nameimg"
|
class="nameimg"
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
/>
|
/>
|
||||||
<div class="inname">封面图</div>
|
<div class="inname">封面图</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in select" style="flex: 1; display: flex">
|
<div class="in select" style="flex: 1; display: flex">
|
||||||
<div
|
<div
|
||||||
:class="`box ${projectInfo.picUrl === src.value ? 'active' : ''}`"
|
:class="`box ${projectInfo.picUrl === src.value ? 'active' : ''}`"
|
||||||
style="
|
style="
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
@@ -72,19 +71,19 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
"
|
"
|
||||||
v-for="(src, index) in projectPic"
|
v-for="(src, index) in projectPic"
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="() => (projectInfo.picUrl = src.value)"
|
@click="() => (projectInfo.picUrl = src.value)"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
style="
|
style="
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
"
|
"
|
||||||
:src="src.value"
|
:src="src.value"
|
||||||
alt="avatar"
|
alt="avatar"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -92,65 +91,65 @@
|
|||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img
|
||||||
class="nameimg"
|
class="nameimg"
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
/>
|
/>
|
||||||
<div class="inname">项目时间</div>
|
<div class="inname">项目时间</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
separator="至"
|
separator="至"
|
||||||
:show-time="{ format: 'HH:mm' }"
|
:show-time="{ format: 'HH:mm' }"
|
||||||
:placeholder="[' 开始时间', ' 结束时间']"
|
:placeholder="[' 开始时间', ' 结束时间']"
|
||||||
:disabled-date="disabledDate"
|
:disabled-date="disabledDate"
|
||||||
v-model:value="projectInfo.rangeTime"
|
v-model:value="projectInfo.rangeTime"
|
||||||
style="width: 100%; height: 40px; border-radius: 5px"
|
style="width: 100%; height: 40px; border-radius: 5px"
|
||||||
valueFormat="YYYY-MM-DD HH:mm"
|
valueFormat="YYYY-MM-DD HH:mm"
|
||||||
@change="timeChange"
|
@change="timeChange"
|
||||||
:disabled="viewDetail ? true : false"
|
:disabled="viewDetail ? true : false"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img
|
||||||
class="nameimg"
|
class="nameimg"
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
/>
|
/>
|
||||||
<div class="inname">项目经理</div>
|
<div class="inname">项目经理</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<ProjectManager
|
<ProjectManager
|
||||||
v-model:value="projectInfo.managerId"
|
v-model:value="projectInfo.managerId"
|
||||||
v-model:name="projectInfo.manager"
|
v-model:name="projectInfo.manager"
|
||||||
@onChange="managerChange"
|
@onChange="managerChange"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
></ProjectManager>
|
></ProjectManager>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img
|
||||||
class="nameimg"
|
class="nameimg"
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
/>
|
/>
|
||||||
<div class="inname">资源归属</div>
|
<div class="inname">资源归属</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="in select">
|
<div class="in select">
|
||||||
<OrgClass
|
<OrgClass
|
||||||
v-model:value="projectInfo.sourceBelongId"
|
v-model:value="projectInfo.sourceBelongId"
|
||||||
v-model:name="projectInfo.sourceBelongName"
|
v-model:name="projectInfo.sourceBelongName"
|
||||||
v-model:fullName="projectInfo.sourceBelongFullName"
|
v-model:fullName="projectInfo.sourceBelongFullName"
|
||||||
></OrgClass>
|
></OrgClass>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img
|
||||||
class="nameimg"
|
class="nameimg"
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
/>
|
/>
|
||||||
<div class="inname">项目级别</div>
|
<div class="inname">项目级别</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -161,8 +160,8 @@
|
|||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img
|
||||||
class="nameimg"
|
class="nameimg"
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
/>
|
/>
|
||||||
<div class="inname">培训分类</div>
|
<div class="inname">培训分类</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -173,15 +172,15 @@
|
|||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img
|
||||||
class="nameimg"
|
class="nameimg"
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
/>
|
/>
|
||||||
<div class="inname">是否BOEU实施</div>
|
<div class="inname">是否BOEU实施</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-radio-group
|
<a-radio-group
|
||||||
v-model:value="projectInfo.boeFlag"
|
v-model:value="projectInfo.boeFlag"
|
||||||
:disabled="viewDetail ? true : false"
|
:disabled="viewDetail ? true : false"
|
||||||
>
|
>
|
||||||
<a-radio :style="radioStyle" :value="1">是</a-radio>
|
<a-radio :style="radioStyle" :value="1">是</a-radio>
|
||||||
<a-radio :style="radioStyle" :value="0">否</a-radio>
|
<a-radio :style="radioStyle" :value="0">否</a-radio>
|
||||||
@@ -194,30 +193,28 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="in ggysxz" v-if="courseSyncFlag">
|
<div class="in ggysxz" v-if="courseSyncFlag">
|
||||||
<!-- :disabled="viewDetail ? true : false" -->
|
<!-- :disabled="viewDetail ? true : false" -->
|
||||||
<a-checkbox
|
<a-checkbox v-model:checked="courseSyncFlag" disabled>
|
||||||
v-model:checked="courseSyncFlag"
|
|
||||||
disabled>
|
|
||||||
<span
|
<span
|
||||||
style="
|
style="
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: rgba(109, 117, 132, 1);
|
color: rgba(109, 117, 132, 1);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
">
|
"
|
||||||
|
>
|
||||||
同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)
|
同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)
|
||||||
</span>
|
</span>
|
||||||
</a-checkbox>
|
</a-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="in" v-else>
|
<div class="in" v-else>
|
||||||
<!-- :disabled="viewDetail ? true : false" -->
|
<!-- :disabled="viewDetail ? true : false" -->
|
||||||
<a-checkbox
|
<a-checkbox v-model:checked="courseSyncFlag" disabled>
|
||||||
v-model:checked="courseSyncFlag"
|
|
||||||
disabled>
|
|
||||||
<span
|
<span
|
||||||
style="
|
style="
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: rgba(109, 117, 132, 1);
|
color: rgba(109, 117, 132, 1);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
">
|
"
|
||||||
|
>
|
||||||
同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)
|
同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)
|
||||||
</span>
|
</span>
|
||||||
</a-checkbox>
|
</a-checkbox>
|
||||||
@@ -229,12 +226,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model:value="projectInfo.remark"
|
v-model:value="projectInfo.remark"
|
||||||
style="height: 80px"
|
style="height: 80px"
|
||||||
placeholder="请输入说明"
|
placeholder="请输入说明"
|
||||||
show-count
|
show-count
|
||||||
:maxlength="200"
|
:maxlength="200"
|
||||||
:disabled="viewDetail ? true : false"
|
:disabled="viewDetail ? true : false"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -253,18 +250,18 @@
|
|||||||
<div class="inname" style="width: 50px">模版</div>
|
<div class="inname" style="width: 50px">模版</div>
|
||||||
<div class="in select" style="margin-left: 2px">
|
<div class="in select" style="margin-left: 2px">
|
||||||
<a-select
|
<a-select
|
||||||
:getPopupContainer="
|
:getPopupContainer="
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
return triggerNode.parentNode || document.body;
|
return triggerNode.parentNode || document.body;
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
placeholder="请选择模版"
|
placeholder="请选择模版"
|
||||||
:size="size"
|
:size="size"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:options="classifyList5"
|
:options="classifyList5"
|
||||||
@change="classificationChange5"
|
@change="classificationChange5"
|
||||||
@popupScroll="templateScroll"
|
@popupScroll="templateScroll"
|
||||||
:fieldNames="{
|
:fieldNames="{
|
||||||
label: 'name',
|
label: 'name',
|
||||||
value: 'projectTemplateId',
|
value: 'projectTemplateId',
|
||||||
}"
|
}"
|
||||||
@@ -278,35 +275,34 @@
|
|||||||
<div class="btn">
|
<div class="btn">
|
||||||
<a-button @click="backPage" class="btn2">取消</a-button>
|
<a-button @click="backPage" class="btn2">取消</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
v-on:click="createProject"
|
v-on:click="createProject"
|
||||||
type="primary"
|
type="primary"
|
||||||
class="btn1"
|
class="btn1"
|
||||||
style="margin-left: 20px"
|
style="margin-left: 20px"
|
||||||
>确定
|
>确定
|
||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {onMounted, reactive, toRefs, watch} from "vue";
|
import { onMounted, reactive, toRefs, watch } from "vue";
|
||||||
import {message} from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import {useRoute, useRouter} from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import * as api from "../../api/index";
|
import * as api from "../../api/index";
|
||||||
import {useStore} from "vuex";
|
import { useStore } from "vuex";
|
||||||
// import ProjectClass from "@/components/project/ProjectClass";
|
// import ProjectClass from "@/components/project/ProjectClass";
|
||||||
import TrainClass from "@/components/project/TrainClass";
|
import TrainClass from "@/components/project/TrainClass";
|
||||||
import OrgClass from "@/components/project/OrgClass";
|
import OrgClass from "@/components/project/OrgClass";
|
||||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||||
import NameInput from "@/components/project/NameInput";
|
import NameInput from "@/components/project/NameInput";
|
||||||
import ProjectLevel from "@/components/project/ProjectLevel";
|
import ProjectLevel from "@/components/project/ProjectLevel";
|
||||||
import {changeOwnership, scrollLoad} from "@/api/method";
|
import { storage } from "../../api/storage";
|
||||||
import {storage} from "../../api/storage";
|
|
||||||
import * as api2 from "../../api/indexAudit";
|
import * as api2 from "../../api/indexAudit";
|
||||||
import {validateName} from "@/api/index1";
|
import { validateName } from "@/api/index1";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import { scrollLoad } from "@/api/method";
|
||||||
export default {
|
export default {
|
||||||
name: "projectAdd",
|
name: "projectAdd",
|
||||||
components: {
|
components: {
|
||||||
@@ -369,17 +365,19 @@ export default {
|
|||||||
state.projectInfo.parentId = routers.query.parentId;
|
state.projectInfo.parentId = routers.query.parentId;
|
||||||
state.projectInfo.projectId = routers.query.projectId;
|
state.projectInfo.projectId = routers.query.projectId;
|
||||||
(state.projectInfo.projectId || state.projectInfo.parentId) &&
|
(state.projectInfo.projectId || state.projectInfo.parentId) &&
|
||||||
api
|
api
|
||||||
.getProjectDetail({
|
.getProjectDetail({
|
||||||
projectId:
|
projectId:
|
||||||
state.projectInfo.projectId || state.projectInfo.parentId,
|
state.projectInfo.projectId || state.projectInfo.parentId,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
state.projectInfo = {
|
state.projectInfo = {
|
||||||
...res.data.data.projectInfo,
|
...res.data.data.projectInfo,
|
||||||
...state.projectInfo,
|
...state.projectInfo,
|
||||||
};
|
};
|
||||||
!routers.query.projectId && !!routers.query.parentId && (state.projectInfo.name = '')
|
!routers.query.projectId &&
|
||||||
|
!!routers.query.parentId &&
|
||||||
|
(state.projectInfo.name = "");
|
||||||
state.projectInfo.rangeTime = [
|
state.projectInfo.rangeTime = [
|
||||||
state.projectInfo.beginTime,
|
state.projectInfo.beginTime,
|
||||||
state.projectInfo.endTime,
|
state.projectInfo.endTime,
|
||||||
@@ -398,8 +396,8 @@ export default {
|
|||||||
if (res.rows && res.rows.length > 0) {
|
if (res.rows && res.rows.length > 0) {
|
||||||
let i = res.rows.length;
|
let i = res.rows.length;
|
||||||
state.auditDescription = res.rows[i - 1].description
|
state.auditDescription = res.rows[i - 1].description
|
||||||
? res.rows[i - 1].description
|
? res.rows[i - 1].description
|
||||||
: "-";
|
: "-";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -504,33 +502,29 @@ export default {
|
|||||||
}
|
}
|
||||||
state.projectInfo.type = 3;
|
state.projectInfo.type = 3;
|
||||||
state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0;
|
state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0;
|
||||||
state.loading = true
|
state.loading = true;
|
||||||
api.createProject(state.projectInfo).then((res) => {
|
api.createProject(state.projectInfo).then((res) => {
|
||||||
state.loading = false
|
state.loading = false;
|
||||||
state.projectInfo.projectId ||
|
|
||||||
changeOwnership("project", res.data.data.projectId, [
|
|
||||||
{id: res.data.data.createId, name: res.data.data.createName},
|
|
||||||
]);
|
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success(state.projectInfo.projectId ? "编辑成功" : "创建成功");
|
message.success(state.projectInfo.projectId ? "编辑成功" : "创建成功");
|
||||||
// router.back();
|
// router.back();
|
||||||
router.push({
|
router.push({
|
||||||
path: "/taskpage",
|
path: "/taskpage",
|
||||||
query: {projectId: res.data.data.projectId},
|
query: { projectId: res.data.data.projectId },
|
||||||
});
|
});
|
||||||
storage.set("projectId", res.data.data.projectId);
|
storage.set("projectId", res.data.data.projectId);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function managerChange(e, l, d, t, orgName) {
|
function managerChange(e, l, d, t, orgName) {
|
||||||
console.log(e, l)
|
console.log(e, l);
|
||||||
state.projectInfo.sourceBelongId = d
|
state.projectInfo.sourceBelongId = d;
|
||||||
state.projectInfo.sourceBelongName = t
|
state.projectInfo.sourceBelongName = t;
|
||||||
state.projectInfo.sourceBelongFullName = orgName
|
state.projectInfo.sourceBelongFullName = orgName;
|
||||||
}
|
}
|
||||||
|
|
||||||
const disabledDate = (current) => {
|
const disabledDate = (current) => {
|
||||||
return current && current < dayjs().startOf('day');
|
return current && current < dayjs().startOf("day");
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -549,13 +543,12 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
||||||
.ggysxz {
|
.ggysxz {
|
||||||
.ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner::after {
|
.ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner::after {
|
||||||
border-color: #FFF !important;
|
border-color: #fff !important;
|
||||||
}
|
}
|
||||||
.ant-checkbox-disabled .ant-checkbox-inner {
|
.ant-checkbox-disabled .ant-checkbox-inner {
|
||||||
background-color: #1890ff !important;
|
background-color: #1890ff !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -834,7 +834,6 @@ import TrainClass from "@/components/project/TrainClass";
|
|||||||
import OrgClass from "@/components/project/OrgClass";
|
import OrgClass from "@/components/project/OrgClass";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import * as moment from "moment";
|
import * as moment from "moment";
|
||||||
import { changeOwnership } from "@/api/method";
|
|
||||||
import NameInput from "@/components/project/NameInput";
|
import NameInput from "@/components/project/NameInput";
|
||||||
import { validateName } from "@/api/index1";
|
import { validateName } from "@/api/index1";
|
||||||
import CommonStudent from "@/components/student/CommonStudent";
|
import CommonStudent from "@/components/student/CommonStudent";
|
||||||
@@ -993,14 +992,11 @@ export default {
|
|||||||
return message.warning("项目名称重复,请重新填写");
|
return message.warning("项目名称重复,请重新填写");
|
||||||
}
|
}
|
||||||
api.createProject(state.projectInfo).then((res) => {
|
api.createProject(state.projectInfo).then((res) => {
|
||||||
|
console.log("res", res);
|
||||||
state.doublepro = false;
|
state.doublepro = false;
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("创建成功");
|
message.success("创建成功");
|
||||||
state.currentPage = 1;
|
state.currentPage = 1;
|
||||||
state.projectInfo.projectId ||
|
|
||||||
changeOwnership("project", res.data.data.projectId, [
|
|
||||||
{ id: res.data.data.createId, name: res.data.data.createName },
|
|
||||||
]);
|
|
||||||
getTableDate();
|
getTableDate();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -1512,17 +1508,30 @@ export default {
|
|||||||
)}
|
)}
|
||||||
{
|
{
|
||||||
<div className="tableSelect">
|
<div className="tableSelect">
|
||||||
<a-select style="width: 50px;" value="授权" dropdownClassName="tabledropdown">
|
<a-select
|
||||||
<a-select-option value="权限名单" label="权限名单">
|
style="width: 50px;"
|
||||||
<TableModelStudent types={[4,5,6]} id={value.record.projectId}>权限名单</TableModelStudent>
|
value="授权"
|
||||||
</a-select-option>
|
dropdownClassName="tabledropdown"
|
||||||
<a-select-option value="查看权" label="查看权">
|
>
|
||||||
<CommonStudent type={4} id={value.record.projectId}>查看权</CommonStudent>
|
<a-select-option value="权限名单" label="权限名单">
|
||||||
</a-select-option>
|
<TableModelStudent
|
||||||
<a-select-option value="管理权" label="管理权">
|
types={[4, 5, 6]}
|
||||||
<CommonStudent type={5} id={value.record.projectId}>管理权</CommonStudent>
|
id={value.record.projectId}
|
||||||
</a-select-option>
|
>
|
||||||
</a-select>
|
权限名单
|
||||||
|
</TableModelStudent>
|
||||||
|
</a-select-option>
|
||||||
|
<a-select-option value="查看权" label="查看权">
|
||||||
|
<CommonStudent type={4} id={value.record.projectId}>
|
||||||
|
查看权
|
||||||
|
</CommonStudent>
|
||||||
|
</a-select-option>
|
||||||
|
<a-select-option value="管理权" label="管理权">
|
||||||
|
<CommonStudent type={5} id={value.record.projectId}>
|
||||||
|
管理权
|
||||||
|
</CommonStudent>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
{value.record.type === 1 ? (
|
{value.record.type === 1 ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user