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 CreateExternalExam = (obj) => http.post('/external/exam/createExternalExam',obj);
|
||||
@@ -382,6 +382,13 @@ export default {
|
||||
console.log("value", value, index);
|
||||
};
|
||||
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);
|
||||
};
|
||||
|
||||
@@ -462,6 +469,7 @@ export default {
|
||||
taskType: props.datasource.type,
|
||||
status: state.projectName,
|
||||
studentName: state.name,
|
||||
signStatus: state.projectName2
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
@@ -506,6 +514,7 @@ export default {
|
||||
taskType: props.datasource.type,
|
||||
status: state.projectName,
|
||||
studentName: state.name,
|
||||
signStatus: state.projectName2
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
@@ -899,7 +908,7 @@ export default {
|
||||
process.env.VUE_APP_BASE_API
|
||||
}/admin/student/exportTaskStudent?currentStageId=${
|
||||
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{
|
||||
window.open(
|
||||
@@ -907,7 +916,7 @@ export default {
|
||||
process.env.VUE_APP_BASE_API
|
||||
}/admin/student/exportTaskStudent?currentStageId=${
|
||||
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 class="btnbox">
|
||||
<a-input
|
||||
v-model:value="test1.examinationName"
|
||||
v-model:value="test1.externalName"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入考试名称"
|
||||
:maxlength="20"
|
||||
@@ -322,9 +322,9 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="test1.examinationName"
|
||||
v-model:value="test1.source"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入考试名称"
|
||||
placeholder="请输入数据来源"
|
||||
:maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
@@ -335,7 +335,7 @@
|
||||
</div>
|
||||
<div class="textarea">
|
||||
<a-textarea
|
||||
v-model:value="test1.examinationExplain"
|
||||
v-model:value="test1.externalExplain"
|
||||
placeholder="请输入考试说明"
|
||||
allow-clear
|
||||
show-count
|
||||
@@ -369,7 +369,7 @@ import {
|
||||
} from "@/api/indexExam";
|
||||
// updateExamination,
|
||||
import STest from "./SelectTest.vue";
|
||||
import {ProjectEditTask, RouterEditTask} from "@/api/indexTask";
|
||||
import {ProjectEditTask, RouterEditTask,CreateExternalExam} from "@/api/indexTask";
|
||||
import {addTempTask} from "../../api/indexTaskadd";
|
||||
import dayjs from "dayjs";
|
||||
//import { toDate } from "@/api/method";
|
||||
@@ -456,16 +456,9 @@ export default {
|
||||
questionArrangement: 4,
|
||||
},
|
||||
test1: {
|
||||
examinationName: '',
|
||||
chooseTime: '',
|
||||
examinationDuration: '',
|
||||
passLine: '',
|
||||
examinationExplain: null,
|
||||
examinationLimit: null,
|
||||
showAnswers: 1,
|
||||
showAnalysis: 1,
|
||||
scoringModel: 2,
|
||||
questionArrangement: 4,
|
||||
externalName: '',
|
||||
source: '',
|
||||
externalExplain: null
|
||||
},
|
||||
|
||||
addLoading: false,
|
||||
@@ -510,7 +503,7 @@ export default {
|
||||
ctx.emit("update:addtestVisible", false);
|
||||
ctx.emit("update:edit", false);
|
||||
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);
|
||||
localStorage.setItem("stageId", props.chooseStageId);
|
||||
localStorage.setItem("chapterId", props.isactive);
|
||||
@@ -570,6 +563,8 @@ export default {
|
||||
});
|
||||
};
|
||||
const updateTest = () => {
|
||||
if(state.isOuter==1){
|
||||
|
||||
if (!state.test.examinationName) {
|
||||
message.destroy();
|
||||
return message.warning("请输入考试名称");
|
||||
@@ -658,7 +653,51 @@ export default {
|
||||
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;
|
||||
|
||||
}
|
||||
}
|
||||
// 新建外部考试
|
||||
CreateExternalExam(state.test1).then( async res=>{
|
||||
console.log(res)
|
||||
// 添加更新到任务
|
||||
await updateTask1(res);
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
};
|
||||
// 系统考试
|
||||
const updateTask = (res) => {
|
||||
state.EditTestId = res.data.data.examinationId;
|
||||
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) => {
|
||||
if (value != "") {
|
||||
state.showAnswers = "";
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="drawerMain" id="ProjCheckship" style="">
|
||||
<div class="header">
|
||||
<div class="headerTitle">
|
||||
{{ {1: "添加学员", 2: "添加学员", 3: "添加学员",4: "查看权",5: "管理权"}[type] || "" }}
|
||||
{{ {1: "添加学员", 2: "添加学员", 3: "添加学员",4: "查看权",5: "管理权"}[type] || title }}
|
||||
</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
@@ -99,7 +99,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</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 class="tab2">
|
||||
<a-form-item label="组织:">
|
||||
@@ -146,7 +146,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
<a-form-item label="受众名称:">
|
||||
@@ -174,7 +174,7 @@
|
||||
</div>
|
||||
<div class="tableBox tabb">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
style="border: 1px solid #f2f6fe;width:800px"
|
||||
row-key="id"
|
||||
:columns="audiColums"
|
||||
:data-source="audiData"
|
||||
@@ -193,11 +193,8 @@
|
||||
<div class="already">已选</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="selecteds"
|
||||
:style="{ 'max-height': screenHeight - 235 + 'px' }"
|
||||
style="overflow-y: auto"
|
||||
>
|
||||
<div :style="{ 'max-height': screenHeight - 235 + 'px' }" style="overflow-y: auto">
|
||||
<div class="selecteds">
|
||||
<div class="person">快速选人</div>
|
||||
<div v-for="(item, i) in selectsData.studentList">
|
||||
<div v-if="i < 11">
|
||||
@@ -227,6 +224,8 @@
|
||||
>
|
||||
<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">
|
||||
@@ -242,9 +241,7 @@
|
||||
<div class="ch1" @click="orgDel(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="!dept && selectsData.deptList.length >10" class="ifsw">
|
||||
<div @click="dept = !dept" class=“sw”>查看更多></div>
|
||||
@@ -252,7 +249,9 @@
|
||||
<div v-if="dept && selectsData.deptList.length >10" class="ifsw">
|
||||
<div @click="dept = !dept" class="sw"> 收起<</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--受众-->
|
||||
<div v-if="!selectStu" class="selecteds">
|
||||
<div class="group">受众关联</div>
|
||||
<div v-for="(item, i) in selectsData.groupList">
|
||||
<div v-if="i < 11">
|
||||
@@ -281,39 +280,8 @@
|
||||
</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 class="btnn">
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="submitAuth">确定</button>
|
||||
@@ -419,6 +387,22 @@ const emit = defineEmits({});
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
id: String,
|
||||
title: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
clear: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
selectStu: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
selectOne: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
stage: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
@@ -577,6 +561,7 @@ const auditSelectKeys = ref([]);
|
||||
const screenHeight = ref(document.body.clientHeight);
|
||||
//const screenWidth = ref(document.body.clientWidth);
|
||||
const stuRowSelection = computed(() => ({
|
||||
type:props.selectOne?'radio':'checkbox',
|
||||
columnWidth: 20,
|
||||
selectedRowKeys: stuSelectKeys.value,
|
||||
onChange: onStuSelectChange,
|
||||
@@ -764,6 +749,7 @@ function handleStageOk() {
|
||||
saveStu({
|
||||
targetId: props.id,
|
||||
type: props.type,
|
||||
clear:props.clear,
|
||||
deptIds: selectsData.value.deptList?.map((e) => e.id),
|
||||
stageId: selectsData.value.stageId,
|
||||
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>
|
||||
@@ -8,9 +8,7 @@
|
||||
>
|
||||
<div class="drawerMain" id="ProjCheckship" style="">
|
||||
<div class="header">
|
||||
<div class="headerTitle">
|
||||
权限名单
|
||||
</div>
|
||||
<div class="headerTitle">权限名单</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@@ -38,14 +36,26 @@
|
||||
style="background: #4ea6ff; color: #fff; width: 100px"
|
||||
@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>
|
||||
搜索
|
||||
</a-button>
|
||||
</a-col>
|
||||
<a-col :span="2">
|
||||
<a-button class="cus-btn white" style="width: 100px" @click="reset">
|
||||
<template #icon><img style="margin-right: 10px" src="../../assets/images/leveladd/reset.png"/>
|
||||
<a-button
|
||||
class="cus-btn white"
|
||||
style="width: 100px"
|
||||
@click="reset"
|
||||
>
|
||||
<template #icon
|
||||
><img
|
||||
style="margin-right: 10px"
|
||||
src="../../assets/images/leveladd/reset.png"
|
||||
/>
|
||||
</template>
|
||||
重置
|
||||
</a-button>
|
||||
@@ -62,7 +72,9 @@
|
||||
<template #action="{ record }">
|
||||
<a-space :size="2">
|
||||
<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>
|
||||
</template>
|
||||
</a-table>
|
||||
@@ -80,12 +92,19 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {computed, createVNode, defineProps, 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";
|
||||
import {
|
||||
computed,
|
||||
createVNode,
|
||||
defineProps,
|
||||
defineExpose,
|
||||
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({
|
||||
type: Number,
|
||||
@@ -106,12 +125,12 @@ const initParams = {
|
||||
studentName: "",
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
type: props.type || '',
|
||||
type: props.type || "",
|
||||
types: props.types,
|
||||
pid: props.id || '',
|
||||
}
|
||||
pid: props.id || "",
|
||||
};
|
||||
|
||||
const searchParams = ref(initParams)
|
||||
const searchParams = ref(initParams);
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
@@ -144,7 +163,8 @@ const columns = ref([
|
||||
key: "type",
|
||||
width: 30,
|
||||
align: "center",
|
||||
customRender: ({record: {type}}) => ({4: "查看权", 5: "管理权", 6: "归属权"}[type]),
|
||||
customRender: ({ record: { type } }) =>
|
||||
({ 4: "查看权", 5: "管理权", 6: "归属权" }[type]),
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
@@ -152,11 +172,16 @@ const columns = ref([
|
||||
key: "operation",
|
||||
width: 50,
|
||||
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(() => ({
|
||||
total: total,
|
||||
@@ -176,14 +201,14 @@ const changePagination = (page) => {
|
||||
|
||||
function del(id) {
|
||||
Modal.confirm({
|
||||
title: () => '确定删除?',
|
||||
title: () => "确定删除?",
|
||||
icon: () => createVNode(ExclamationCircleOutlined),
|
||||
content: () => '数据删除后不可恢复!',
|
||||
okText: () => '确定',
|
||||
okType: 'danger',
|
||||
cancelText: () => '取消',
|
||||
content: () => "数据删除后不可恢复!",
|
||||
okText: () => "确定",
|
||||
okType: "danger",
|
||||
cancelText: () => "取消",
|
||||
onOk() {
|
||||
id && delStudentList({ids: [id]}).then(() => searchStu())
|
||||
id && delStudentList({ ids: [id] }).then(() => searchStu());
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -192,14 +217,19 @@ const closeDrawer = () => {
|
||||
visiable.value = false;
|
||||
};
|
||||
|
||||
function reset(){
|
||||
searchParams.value = initParams
|
||||
searchStu()
|
||||
function reset() {
|
||||
searchParams.value = initParams;
|
||||
searchStu();
|
||||
}
|
||||
|
||||
watch(visiable, () => {
|
||||
visiable.value && searchStu()
|
||||
searchParams.value = initParams
|
||||
visiable.value && searchStu();
|
||||
searchParams.value = initParams;
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
searchStu,
|
||||
loading,
|
||||
});
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -691,7 +691,7 @@
|
||||
import { reactive, toRefs, onMounted, watch, computed } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
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 ProjPowerList from "../../components/drawers/ProjPowerList";
|
||||
import ProjCheckShip from "../../components/drawers/ProjCheckPower";
|
||||
@@ -700,7 +700,6 @@ import * as apiStu from "../../api/index";
|
||||
import { message } from "ant-design-vue";
|
||||
import {
|
||||
commonData,
|
||||
changeOwnership,
|
||||
} from "@/api/method";
|
||||
import { storage } from "@/api/storage";
|
||||
import { useStore } from "vuex";
|
||||
@@ -1254,7 +1253,7 @@ export default {
|
||||
dropdownClassName="tabledropdown"
|
||||
>
|
||||
<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 value="查看权" label="查看权">
|
||||
<CommonStudent type={7} id={text.record.id}>查看权</CommonStudent>
|
||||
@@ -1497,15 +1496,6 @@ export default {
|
||||
.catch((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) => {
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
<div class="projectAdd">
|
||||
<div class="header">
|
||||
<span class="title"
|
||||
>{{
|
||||
projectInfo.projectId ? "编辑" : "创建"
|
||||
>{{ projectInfo.projectId ? "编辑" : "创建"
|
||||
}}{{ ptojectType == "3" ? "班级" : "项目" }}</span
|
||||
>
|
||||
<div
|
||||
@@ -194,30 +193,28 @@
|
||||
</div>
|
||||
<div class="in ggysxz" v-if="courseSyncFlag">
|
||||
<!-- :disabled="viewDetail ? true : false" -->
|
||||
<a-checkbox
|
||||
v-model:checked="courseSyncFlag"
|
||||
disabled>
|
||||
<a-checkbox v-model:checked="courseSyncFlag" disabled>
|
||||
<span
|
||||
style="
|
||||
width: 100%;
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
">
|
||||
"
|
||||
>
|
||||
同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)
|
||||
</span>
|
||||
</a-checkbox>
|
||||
</div>
|
||||
<div class="in" v-else>
|
||||
<!-- :disabled="viewDetail ? true : false" -->
|
||||
<a-checkbox
|
||||
v-model:checked="courseSyncFlag"
|
||||
disabled>
|
||||
<a-checkbox v-model:checked="courseSyncFlag" disabled>
|
||||
<span
|
||||
style="
|
||||
width: 100%;
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
">
|
||||
"
|
||||
>
|
||||
同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)
|
||||
</span>
|
||||
</a-checkbox>
|
||||
@@ -290,23 +287,22 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {onMounted, reactive, toRefs, watch} from "vue";
|
||||
import {message} from "ant-design-vue";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import { onMounted, reactive, toRefs, watch } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import * as api from "../../api/index";
|
||||
import {useStore} from "vuex";
|
||||
import { useStore } from "vuex";
|
||||
// import ProjectClass from "@/components/project/ProjectClass";
|
||||
import TrainClass from "@/components/project/TrainClass";
|
||||
import OrgClass from "@/components/project/OrgClass";
|
||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||
import NameInput from "@/components/project/NameInput";
|
||||
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 {validateName} from "@/api/index1";
|
||||
import { validateName } from "@/api/index1";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
import { scrollLoad } from "@/api/method";
|
||||
export default {
|
||||
name: "projectAdd",
|
||||
components: {
|
||||
@@ -379,7 +375,9 @@ export default {
|
||||
...res.data.data.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.beginTime,
|
||||
state.projectInfo.endTime,
|
||||
@@ -504,33 +502,29 @@ export default {
|
||||
}
|
||||
state.projectInfo.type = 3;
|
||||
state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0;
|
||||
state.loading = true
|
||||
state.loading = true;
|
||||
api.createProject(state.projectInfo).then((res) => {
|
||||
state.loading = false
|
||||
state.projectInfo.projectId ||
|
||||
changeOwnership("project", res.data.data.projectId, [
|
||||
{id: res.data.data.createId, name: res.data.data.createName},
|
||||
]);
|
||||
state.loading = false;
|
||||
message.destroy();
|
||||
message.success(state.projectInfo.projectId ? "编辑成功" : "创建成功");
|
||||
// router.back();
|
||||
router.push({
|
||||
path: "/taskpage",
|
||||
query: {projectId: res.data.data.projectId},
|
||||
query: { projectId: res.data.data.projectId },
|
||||
});
|
||||
storage.set("projectId", res.data.data.projectId);
|
||||
});
|
||||
};
|
||||
|
||||
function managerChange(e, l, d, t, orgName) {
|
||||
console.log(e, l)
|
||||
state.projectInfo.sourceBelongId = d
|
||||
state.projectInfo.sourceBelongName = t
|
||||
state.projectInfo.sourceBelongFullName = orgName
|
||||
console.log(e, l);
|
||||
state.projectInfo.sourceBelongId = d;
|
||||
state.projectInfo.sourceBelongName = t;
|
||||
state.projectInfo.sourceBelongFullName = orgName;
|
||||
}
|
||||
|
||||
const disabledDate = (current) => {
|
||||
return current && current < dayjs().startOf('day');
|
||||
return current && current < dayjs().startOf("day");
|
||||
};
|
||||
|
||||
return {
|
||||
@@ -549,10 +543,9 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
.ggysxz {
|
||||
.ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner::after {
|
||||
border-color: #FFF !important;
|
||||
border-color: #fff !important;
|
||||
}
|
||||
.ant-checkbox-disabled .ant-checkbox-inner {
|
||||
background-color: #1890ff !important;
|
||||
|
||||
@@ -834,7 +834,6 @@ import TrainClass from "@/components/project/TrainClass";
|
||||
import OrgClass from "@/components/project/OrgClass";
|
||||
import dayjs from "dayjs";
|
||||
import * as moment from "moment";
|
||||
import { changeOwnership } from "@/api/method";
|
||||
import NameInput from "@/components/project/NameInput";
|
||||
import { validateName } from "@/api/index1";
|
||||
import CommonStudent from "@/components/student/CommonStudent";
|
||||
@@ -993,14 +992,11 @@ export default {
|
||||
return message.warning("项目名称重复,请重新填写");
|
||||
}
|
||||
api.createProject(state.projectInfo).then((res) => {
|
||||
console.log("res", res);
|
||||
state.doublepro = false;
|
||||
message.destroy();
|
||||
message.success("创建成功");
|
||||
state.currentPage = 1;
|
||||
state.projectInfo.projectId ||
|
||||
changeOwnership("project", res.data.data.projectId, [
|
||||
{ id: res.data.data.createId, name: res.data.data.createName },
|
||||
]);
|
||||
getTableDate();
|
||||
});
|
||||
};
|
||||
@@ -1512,15 +1508,28 @@ export default {
|
||||
)}
|
||||
{
|
||||
<div className="tableSelect">
|
||||
<a-select style="width: 50px;" value="授权" dropdownClassName="tabledropdown">
|
||||
<a-select
|
||||
style="width: 50px;"
|
||||
value="授权"
|
||||
dropdownClassName="tabledropdown"
|
||||
>
|
||||
<a-select-option value="权限名单" label="权限名单">
|
||||
<TableModelStudent types={[4,5,6]} id={value.record.projectId}>权限名单</TableModelStudent>
|
||||
<TableModelStudent
|
||||
types={[4, 5, 6]}
|
||||
id={value.record.projectId}
|
||||
>
|
||||
权限名单
|
||||
</TableModelStudent>
|
||||
</a-select-option>
|
||||
<a-select-option value="查看权" label="查看权">
|
||||
<CommonStudent type={4} id={value.record.projectId}>查看权</CommonStudent>
|
||||
<CommonStudent type={4} id={value.record.projectId}>
|
||||
查看权
|
||||
</CommonStudent>
|
||||
</a-select-option>
|
||||
<a-select-option value="管理权" label="管理权">
|
||||
<CommonStudent type={5} id={value.record.projectId}>管理权</CommonStudent>
|
||||
<CommonStudent type={5} id={value.record.projectId}>
|
||||
管理权
|
||||
</CommonStudent>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user