feat:合并

This commit is contained in:
lixg
2023-02-19 15:53:03 +08:00
42 changed files with 2487 additions and 2109 deletions

View File

@@ -59,6 +59,8 @@ function init() {
initDict("project_pic"); //项目封面
initDict("router_pic"); //路径图封面
initDict("course_pic"); //课程封面
initDict("job_type"); //岗位
initDict("band"); //band
}
function unloadHandler() {

View File

@@ -1,7 +1,7 @@
export const STUDENT_LIST = '/admin/student/getStudent'
export const ONLINE_COURSE_PAGE = '/onlineClasses/queryOnlineList'
export const ASSESSMENT_PAGE = '/assessment/queryAssessmentDetailList post'
export const PROJECT_AUDIT_PAGE = '/admin/project/auditedlist post'
export const ROUTER_DETAIL_MODIFY = '/admin/router/routerInfoTemp post'
export const PROJECT_DETAIL_MODIFY = '/admin/project/projectInfoTemp post'
export const PROJECT_RELEASE = '/admin/project/realease post'
export const STUDENT_LIST = '/admin/student/getStudent';
export const ONLINE_COURSE_PAGE = '/onlineClasses/queryOnlineList';
export const ASSESSMENT_PAGE = '/assessment/queryAssessmentDetailList post';
export const PROJECT_AUDIT_PAGE = '/admin/project/auditedlist post';
export const ROUTER_DETAIL_MODIFY = '/admin/router/routerInfoTemp post';
export const PROJECT_DETAIL_MODIFY = '/admin/project/projectInfoTemp post';
export const PROJECT_RELEASE = '/admin/project/realease';

View File

@@ -32,6 +32,7 @@ export const edit = (obj) => http.post("/admin/offcourse/edit", obj);
//7新建或编辑面授课开课
export const editPlan = (obj) => http.post("/admin/offcourse/editPlan", obj);
export const copyCoursePlan = (params) => http.get("/admin/offcourse/copyCoursePlan", {params});
export const copyCourse = (params) => http.get("/admin/offcourse/copyCourse", {params});
//8课程导出
export const exportP = (obj) => http.post("/admin/offcourse/export", obj);
//9操作面授课(发布,撤回,删除,审核,停用)

View File

@@ -24,7 +24,7 @@
{{ datasource && datasource.endTime ? datasource.endTime : "-" }}
</div>
<div class="endtime" style="margin-left: 64px">签到时间{{beginTime}}</div>
<!-- <div class="endtime" style="margin-left: 40px">签退时间{{endTime}}</div> -->
</div>
@@ -407,24 +407,25 @@ export default {
// 计算签到时间
const isSignClick = () => {
debugger
console.log("计算签到时间", props.datasource);
let beginTime = new Date(props.datasource.startTime).getTime();
let endTime = !props.datasource.afterStart
let endTime = !props.datasource.info.afterSignIn
? new Date(props.datasource.endTime).getTime()
: new Date(props.datasource.startTime).getTime();
if (props.datasource.beforeStart && props.datasource.afterStart) {
if (props.datasource.info.beforeSignIn && props.datasource.info.afterSignIn) {
//有开始前有开始后
beginTime = beginTime - props.datasource.beforeStart * 60 * 1000;
endTime = endTime + props.datasource.afterStart * 60 * 1000;
beginTime = beginTime - props.datasource.info.beforeSignIn * 60 * 1000;
endTime = endTime + props.datasource.info.afterSignIn * 60 * 1000;
console.log("1111", beginTime, endTime);
} else if (props.datasource.beforeStart && !props.datasource.afterStart) {
} else if (props.datasource.info.beforeSignIn && !props.datasource.info.afterSignIn) {
//只有开始前无开始后
beginTime = beginTime - props.datasource.beforeStart * 60 * 1000;
beginTime = beginTime - props.datasource.info.beforeSignIn * 60 * 1000;
console.log("11112222", beginTime);
} else if (!props.datasource.beforeStart && props.datasource.afterStart) {
} else if (!props.datasource.info.beforeSignIn && props.datasource.info.afterSignIn) {
//无开始前有开始后
endTime = endTime + props.datasource.afterStart * 60 * 1000;
endTime = endTime + props.datasource.info.afterSignIn * 60 * 1000;
console.log("1111333", endTime);
}
@@ -443,6 +444,7 @@ export default {
};
const getTableData = () => {
debugger
console.log('当前是项目还是路径图 1 路径图 2 项目', props.types)
if ( props.datasource.type == 6 && props.types==1 || props.datasource.type == 9 && props.types==1) {
// 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可
@@ -452,8 +454,8 @@ export default {
currentStageId: props.datasource.chapterId,
type: 2,
pid: props.datasource.routerId,
taskId: props.datasource.routerTaskId,
taskType: props.datasource.type,
taskId: props.datasource.id,
taskType: props.datasource.type,
status: state.projectName,
studentName: state.name,
signStatus: state.projectName2
@@ -465,7 +467,7 @@ export default {
currentStageId: props.datasource.chapterId,
type: 2, // 1项目 2 路径
pid: props.datasource.routerId,
taskId: props.datasource.routerTaskId,
taskId: props.datasource.id,
taskType: props.datasource.type,
status: state.projectName,
studentName: state.name,
@@ -497,8 +499,8 @@ export default {
currentStageId: props.datasource.stageId,
type: 1,
pid: props.datasource.projectId,
taskId: props.datasource.projectTaskId,
taskType: props.datasource.type,
taskId: props.datasource.projectTaskId,
taskType: props.datasource.type,
status: state.projectName,
studentName: state.name,
signStatus: state.projectName2
@@ -510,7 +512,7 @@ export default {
currentStageId: props.datasource.stageId,
type: 1, // 1项目 2 路径
pid: props.datasource.projectId,
taskId: props.datasource.projectTaskId,
taskId: props.datasource.projectTaskId,
taskType: props.datasource.type,
status: state.projectName,
studentName: state.name,
@@ -735,12 +737,13 @@ export default {
customRender: (value) => {
return (
<div class="opa" style='display:flex;justify-content:center;align-items:center;'>
<div
<div
onClick={()=>{
console.log("点击签到", value);
// 获取当前时间
{/* showsingleqdModal(); */}
{/* AttendanceSign */}
let obj = {
courseId: Number(props.datasource.courseId),
routerId: Number(props.datasource.routerId),
@@ -779,7 +782,7 @@ export default {
}
<div>签到</div>
</div>
<div
<div
onClick={()=>{
console.log("点击请假", value);
{/* showsingleqjModal(); */}
@@ -901,6 +904,8 @@ export default {
// 导出数据
function exportTaskStu() {
debugger
console.log("props.datasource此处的taskId 应该是router_task 表中主键", props.datasource);
console.log("props.datasource", props.datasource);
if(props.types==1){
window.open(
@@ -908,7 +913,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}&taskType=${props.datasource.type}`
}&type=2&pid=${props.datasource.courseId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}`
);
}else{
window.open(
@@ -919,7 +924,7 @@ export default {
}&type=1&pid=${props.datasource.courseId}&thirdType=1&taskId=${props.datasource.projectTaskId}&taskType=${props.datasource.type}`
);
}
// api
// .exportTaskStudent({
// pageNo: state.currentPage,

View File

@@ -188,10 +188,12 @@
<span style="margin-right: 3px">回放设置</span>
</div>
<div class="btnbox">
<a-switch v-model:checked="formData.livePlayback"/>
<a-switch v-model:checked="formData.livePlayback"
@change="getchange(formData.livePlayback)"
/>
</div>
</div>
<div v-if="switchC1">
<div v-if="formData.livePlayback">
<div class="main_item">
<div class="signbox">
<span style="margin-right: 3px">回放链接</span>
@@ -325,6 +327,9 @@ const removePG = () => {
formData.value.assessmentId = ''
formData.value.assessmentName = ''
};
const getchange=(mess)=> {
console.log(mess); //输出true或者false
};
const props = defineProps({
type: Number,
taskList: []
@@ -493,11 +498,14 @@ const beforeUpload = (file) => {
formDatas.append("file", file);
fileUp(formDatas).then((res) => {
if (res.data.code === 200) {
console.log(res)
imageUrl.value = res.data
formData.value.liveCover = res.data
console.log(res.data.data,45);
imageUrl.value = process.env.VUE_APP_FILE_PATH +res.data.data
formData.value.liveCover =process.env.VUE_APP_FILE_PATH + res.data.data
// state.hasImgName = file.name;
// emit("src", { id: curItem.value.id, src: res.data.data });
// emit("src", { id: '', src: res.data.data });
}
});
return false;

View File

@@ -11,79 +11,28 @@
>
<div class="drawerMain">
<div class="header">
<div v-if="taskIndex>=0" class="headerTitle">编辑在线</div>
<div v-else class="headerTitle">添加在线</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"
/>
<div class="headerTitle">{{ taskIndex === -1 ? "编辑" : "添加" }}任务</div>
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"/>
</div>
<div class="contentMain">
<div class="main_items">
<div class="mi_ipts">
<div class="mii_ipt">
<div class="ipt_name"></div>
<div class="fi_input">
<a-input
v-model:value="params.keyword"
style="
width: 280px;
height: 40px;
border-radius: 8px;
padding-right: 49px;
"
placeholder="请输入课程名称"
maxlength="20"
/>
<div class="inp_num" style="position: absolute; right: 7px">
<span style="color: #c7cbd2"> </span>
</div>
</div>
</div>
<div class="mii_ipt">
<div class="ipt_name">课程分类</div>
<div class="select">
<a-select
v-model:value="params.type"
dropdownClassName="dropdown-style"
style="width: 240px"
placeholder="请选择课程分类"
:options="categoryOption"
allowClear
/>
</div>
</div>
</div>
<div class="mi_btns">
<div class="btn btn1" @click="fetch()">
<div class="search"></div>
<div class="btnText">搜索</div>
</div>
<div class="btn btn2" @click="reset()">
<div class="search"></div>
<div class="btnText">重置</div>
</div>
</div>
</div>
<div class="main_table">
<div>
<div>
<a-table
:customRow="customRow"
class="ant-table-striped"
:row-class-name="(_, index) => (index % 2 === 1 ? 'table-striped' : null)"
row-key="id"
:columns="columns"
:data-source="data"
:loading="loading"
:pagination="pagination"
:row-selection="rowSelection"
/>
</div>
</div>
<div>
<div class="contentMain" style="padding:20px">
<CreateOnline>
<a-button type="primary" style="border-radius: 4px">{{
taskIndex === -1 ? '选择/新建课程' : '重新选择'
}}
</a-button>
</CreateOnline>
</div>
</div>
<div class="drawerMain">
<a-table
:columns="columns"
:data-source="selectsData"
row-key="id"
:pagination="false"
/>
</div>
<div class="main_btns">
<button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="confirm">确定</button>
@@ -92,10 +41,9 @@
</a-drawer>
</template>
<script setup>
import {computed, defineEmits, defineProps, ref, watch} from "vue";
import {useBoeApiPage} from "@/api/request";
import {ONLINE_PAGE} from "@/api/ThirdApi";
import {defineEmits, defineProps, ref, watch} from "vue";
import {message} from "ant-design-vue";
import CreateOnline from "@/components/drawers/CreateOnline.vue";
const props = defineProps({
type: Number,
@@ -107,146 +55,61 @@ const rowSelectKeys = ref([]);
const selectsData = ref([]);
const emit = defineEmits({})
watch(taskIndex, () => {
if (taskIndex.value >= 0) {
rowSelectKeys.value = [props.taskList[taskIndex.value].courseId]
selectsData.value = data.value.find(t => t.id === props.taskList[taskIndex.value].courseId) || {}
}
})
const categoryOption = ref([
{
value: 10,
label: "微课",
},
{
value: 20,
label: "录播课",
},
{
value: 21,
label: "直播",
},
{
value: 30,
label: "面授",
},
{
value: 90,
label: "混合",
},
])
const columns = ref([
{
title: "名称",
title: "课程名称",
dataIndex: "name",
key: "name",
width: "30%",
width: "200px",
ellipsis: true,
},
{
title: "课程分类",
dataIndex: "type",
key: "type",
width: "15%",
width: "100px",
align: "center",
ellipsis: true,
customRender: ({record: {type}}) => ({10: '微课', 21: '直播', 20: '录播', 30: '面授', 90: '混合'}[type]),
},
{
title: "创建人",
dataIndex: "sysCreateBy",
key: "sysCreateBy",
width: "15%x",
dataIndex: "authorName",
key: "authorName",
width: "100px",
align: "center",
ellipsis: true,
},
{
title: "时长",
dataIndex: "studyTime",
key: "studyTime",
width: "15%x",
dataIndex: "authorName",
key: "authorName",
width: "80px",
align: "center",
ellipsis: true,
},
{
title: "发布时间",
dataIndex: "publishTime",
key: "publishTime",
width: "25%",
width: "100px",
align: "center",
ellipsis: true,
},
])
const params = ref({
keyword: '',
pageIndex: 1,
pageSize: 10,
orderAsc: true,
publish: true,
contenttype: 20
})
const {data, loading, total, fetch} = useBoeApiPage(ONLINE_PAGE, params.value, {
init: false,
result: res => res.result.list,
totalPage: res => res.result.totalPages,
total: res => res.result.count
})
const pagination = computed(() => ({
total: total.value,
showSizeChanger: false,
current: params.value.pageIndex,
pageSize: params.value.pageSize,
onChange: changePagination,
}));
const customRow = (record) => ({
onClick: () => {
rowSelectKeys.value = [record.id]
selectsData.value = [record]
watch(taskIndex, () => {
if (taskIndex.value >= 0) {
rowSelectKeys.value = []
}
})
const changePagination = (e) => {
params.value.pageIndex = e;
fetch()
};
const rowSelection = computed(() => ({
type: 'radio',
columnWidth: 20,
selectedRowKeys: rowSelectKeys.value,
onChange: onSelectChange,
preserveSelectedRowKeys: true,
}));
function onSelectChange(e, l) {
rowSelectKeys.value = e;
selectsData.value = l;
}
function reset() {
rowSelectKeys.value = [];
selectsData.value = [];
params.value.pageIndex = 1
params.value.keyword = ''
fetch()
}
const closeDrawer = () => {
visible.value = false
taskIndex.value = -1
reset()
selectsData.value = []
rowSelectKeys.value = []
};
function confirm() {
if (!selectsData.value.length || !rowSelectKeys.value.length) {
message.warning("请选择案例");
message.warning("请选择在线课!");
return
}
if (taskIndex.value === -1) {
@@ -267,14 +130,20 @@ function confirm() {
closeDrawer()
}
function selectCourse(id, name) {
rowSelectKeys.value = [id]
selectsData.value = [{id, name}]
}
function openDrawer(i, row) {
row && (rowSelectKeys.value = [row.info]);
row && (selectsData.value = [{name: row.name, id: row.courseId}]);
window.selectCourse = selectCourse
row && (rowSelectKeys.value = [row.courseId]);
row && (selectsData.value = [row.info]);
(i >= 0) && (taskIndex.value = i);
visible.value = true
}
defineExpose({openDrawer})
defineExpose({openDrawer, selectCourse})
</script>
<style lang="scss">

View File

@@ -21,7 +21,7 @@
<iframe
id="iframe"
style="width: 100%; height: 100%;"
:src="iframeUrl + '/exam/viewanswer?id=' + datasource.targetId "
:src="iframeUrl + '/exam/viewanswer?id=' + datasource.answerId "
frameborder="0"
name="myframe"
security="restricted"

View File

@@ -68,7 +68,7 @@
<div><img src="../../assets/images/studentimg/chak.png" /></div>
</div> -->
</div>
<!-- <div v-for="(item) in pro.chapterProcessList" class="mainbox"
<div v-for="(item) in pro.chapterProcessList" class="mainbox"
style="margin-top: 15px; height: 56px"
:key="item.chapterId">
<div class="rowtitle" @click="changeDown">
@@ -99,7 +99,7 @@
</div>
</div>
</div>
</div> -->
</div>
<div class="mainbox">
<a-collapse v-model:activeKey="stageListActive">

View File

@@ -0,0 +1,394 @@
<template>
<div @click="openModal">
<slot></slot>
</div>
<a-modal
:visible="visible"
:footer="null"
:centered="true"
:maskClosable="false"
width="679"
height="437"
@cancel="closeModal"
>
<iframe
id="iframe"
style="width: 800px; height: 500px"
:src="iframeUrl + '/course/manages?f=choose'"
name="myframe"
security="restricted"
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
></iframe>
</a-modal>
</template>
<script setup>
import {ref} from "vue";
import {iframeUrl} from "@/api/method";
const visible = ref(false)
function openModal() {
window.selectCourse(1,'测试测试测试测试测试测试')
visible.value = true
}
function closeModal() {
visible.value = false
}
</script>
<style lang="scss">
.ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important;
}
.addonlineDrawer {
.drawerMain {
.header {
height: 73px;
border-bottom: 1px solid #e8e8e8;
display: flex;
justify-content: space-between;
align-items: center;
flex-shrink: 0;
.headerTitle {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
margin-left: 24px;
}
}
.contentMain {
padding-right: 12px;
.main_items {
display: flex;
margin-top: 32px;
margin-bottom: 12px;
flex-wrap: wrap;
.mi_ipts {
display: flex;
margin-bottom: 20px;
.mii_ipt {
display: flex;
align-items: center;
margin-right: 24px;
.ipt_name {
white-space: nowrap;
}
}
}
.mi_btns {
display: flex;
margin-left: 38px;
margin-bottom: 20px;
cursor: pointer;
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
align-items: center;
justify-content: center;
margin-left: 14px;
flex-shrink: 0;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
line-height: 36px;
margin-left: 5px;
}
}
.btn1 {
background: rgb(64, 158, 255);
.search {
width: 15px;
height: 17px;
background-image: url("@/assets/images/coursewareManage/search0.png");
}
.btnText {
color: rgb(255, 255, 255);
}
}
.btn2 {
background: rgb(255, 255, 255);
.search {
width: 15px;
height: 17px;
background-image: url("@/assets/images/coursewareManage/reset1.png");
}
.btnText {
color: rgb(64, 158, 255);
}
}
.btn1:hover {
background: rgb(255, 255, 255);
.search {
background-image: url("@/assets/images/courseManage/search1.png");
}
.btnText {
color: #4ea6ff;
}
}
.btn2:hover {
background: rgba(64, 158, 255, 1);
.search {
background-image: url("@/assets/images/courseManage/reset0.png");
}
.btnText {
color: #ffffff;
}
}
}
}
.main_notice {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 3px;
height: 40px;
background-color: #e9f6fe;
.mntc_left {
display: flex;
align-items: center;
.notice_icon {
width: 14px;
height: 14px;
margin-right: 9px;
margin-left: 9px;
background-image: url(@/assets/images/coursewareManage/gan.png);
background-size: 100% 100%;
}
}
.mntc_right {
cursor: pointer;
}
}
.main_table {
position: relative;
padding-bottom: 80px;
.ant-checkbox-wrapper {
align-items: center;
margin-top: -2px;
}
.ant-table-selection-column {
padding: 0px !important;
padding-left: 5px !important;
}
.ant-table-thead > tr > th {
background-color: rgba(239, 244, 252, 1);
}
th.h {
background-color: #eff4fc !important;
}
.ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> td {
background: #f6f9fd;
}
.pa {
left: 0;
width: 100%;
display: flex;
justify-content: center;
position: absolute;
bottom: 20px;
}
}
}
.main_btns {
height: 72px;
width: 100%;
bottom: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
border: 1px solid #4ea6ff;
border-radius: 8px;
color: #4ea6ff;
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;
height: 40px;
background: #4ea6ff;
border-radius: 8px;
border: 0;
margin-left: 15px;
color: #fff;
}
}
}
}
.changeModal {
.ant-modal {
width: 549px !important;
height: 245px !important;
.ant-modal-close-x {
display: none;
}
.ant-modal-content {
width: 549px !important;
height: 245px !important;
.ant-modal-body {
padding: 0 !important;
width: 549px !important;
height: 245px !important;
.con {
// background-color: #bfa;
width: 100%;
height: 100%;
.header {
width: 100%;
display: flex;
height: 68px;
position: relative;
justify-content: center;
background: linear-gradient(
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
);
.inhe {
width: 80%;
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.mod {
left: 30px;
top: 27px;
position: absolute;
width: 18px;
height: 17px;
background-image: url(../../assets/images/leveladd/mod.png);
}
.tz {
color: #000000;
font-weight: 400;
font-size: 16px;
}
.mg {
width: 20px;
height: 20px;
background-image: url(../../assets/images/basicinfo/close22.png);
background-size: 100% 100%;
cursor: pointer;
}
}
}
.mid {
width: 100%;
display: flex;
height: 100%;
justify-content: center;
.inher {
width: 80%;
height: 100%;
.cur {
color: #6f6f6f;
font-size: 14px;
}
.select {
margin-top: 10px;
}
.btn {
width: 100%;
display: flex;
justify-content: center;
margin-top: 30px;
.sameb {
width: 100px;
height: 40px;
font-size: 14px;
border-radius: 8px;
}
.btn1 {
color: #4ea6ff;
background: #ffffff;
border: 1px solid #4ea6ff;
}
.btn2 {
margin-left: 16px;
border: 0;
color: #ffffff;
background: #4ea6ff;
}
}
}
}
}
}
}
}
}
</style>

View File

@@ -17,7 +17,7 @@
<div class="ipt_name"></div>
<div class="fi_input">
<a-input v-model:value="params.keyword" style="width: 424px; height: 40px; border-radius: 8px"
placeholder="请输入项目名称"/>
placeholder="请输入测评名称"/>
</div>
</div>
</div>
@@ -117,11 +117,18 @@ const taskIndex = ref(-1);
const {data, loading, total, fetch} = useBoeApiPage(TEST_PAGE, params.value, {
init: false,
result: res => res.result.data,
result: res => {
let newArr = []
for(let i=0;i<res.result.data.length;i++){
res.result.data[i].id = res.result.data[i].quiz_kid;
newArr.push(res.result.data[i])
}
return newArr
},
totalPage: res => res.result.total_page_num,
total: res => res.result.count
})
console.log(data,222)
watch(taskIndex, () => {
if (taskIndex.value >= 0) {
rowSelectKeys.value = [props.taskList[taskIndex.value].courseId]
@@ -182,24 +189,31 @@ const closeDrawer = () => {
function confirm() {
if (!selectsData.value.length || !rowSelectKeys.value.length) {
message.warning("请选择案例");
message.warning("请选择测评");
return
}
if (taskIndex.value === -1) {
const list = props.taskList
list.push({
let list = props.taskList
console.log(props,222,list);
if(list!=undefined){
list.push({
name: selectsData.value[0].title,
type: 3,
courseId: selectsData.value[0].id,
info: selectsData.value[0]
})
}
} else {
const data = props.taskList[taskIndex.value]
data.name = selectsData.value[0].title
data.courseId = selectsData.value[0].id
data.info = selectsData.value[0]
}
emit('update:taskList', [...props.taskList])
if(props.taskList!=undefined){
emit('update:taskList', [...props.taskList])
}
closeDrawer()
}

View File

@@ -24,12 +24,28 @@
<div class="upload">
<div class="text">上传</div>
<div class="right">
<div class="load">
<div style="height: 176px; margin-bottom: 20px">
<a-upload-dragger
v-model:fileList="fileList"
:action="importLeader"
name="uploadFile"
:multiple="true"
@change="handleChange"
:showUploadList="false"
>
<p class="ant-upload-drag-icon">
<inbox-outlined></inbox-outlined>
</p>
<p class="ant-upload-text">点击或将文件拖拽到此处上传</p>
<p class="ant-upload-hint">支持扩展名.xls/.xlsx</p>
</a-upload-dragger>
</div>
<!-- <div class="load">
<div class="cloud"></div>
<div class="tip">点击或将文件拖拽到此处上传</div>
<div class="tipz">支持扩展名.xls/.xlsx</div>
</div>
<div class="loadstate">
</div> -->
<!-- <div class="loadstate">
<div class="loadborder">
<div class="content">
<div class="img"></div>
@@ -97,13 +113,135 @@
<div class="lefimg"></div>
<div class="tacl">20条数据导入成功5条数据导入失败</div>
</div>
</div> -->
<div class="loadstate">
<div
class="loadborder"
v-if="uploadpercent < 100 && uploadpercent !== -1"
>
<div class="content">
<div class="img"></div>
<div class="timebox">
<div class="timetop">
<div class="tit">{{ fileName }}</div>
<div class="stateloading">正在上传</div>
</div>
<a-progress :percent="uploadpercent" />
<!-- <div class="prog">
<div class="inprogloading"></div>
</div> -->
</div>
<div class="curloading">
<!-- <div class="cur">55%</div> -->
<!-- <div class="cancel" style="margin-left: 20px">暂停</div>
<div class="cancel" style="margin-left: 15px">取消</div> -->
</div>
</div>
</div>
<div class="loadborder" v-if="uploadErr">
<div class="content">
<div class="img"></div>
<div class="timebox">
<div class="timetop">
<div class="tit">{{ fileName }}</div>
<div class="statedefeat">上传失败</div>
</div>
<a-progress :percent="uploadpercent" />
<!-- <div class="prog">
<div class="inprogdefeat"></div>
</div> -->
</div>
<div class="curloading">
<!-- <div class="cur">55%</div> -->
<div
style="color: #387df7; margin-left: 20px; cursor: pointer"
>
下载失败数据
</div>
<!-- <div class="cancel" style="margin-left: 20px">暂停</div>
<div class="cancel" style="margin-left: 15px">取消</div> -->
</div>
<div
class="defeat"
style="display: flex; align-items: center"
>
<div style="color: #ff7474">
{{ succNum }}条数据导入成功{{ errNum }}条数据导入失败
</div>
</div>
</div>
</div>
<!-- v-if="uploadpercent === 100" -->
<div class="loadborder" v-if="uploadpercent === 100">
<div class="content">
<div class="img"></div>
<div class="timebox">
<div class="timetop">
<div class="tit">{{ fileName }}</div>
<div class="statesucce">上传成功</div>
</div>
<a-progress :percent="uploadpercent" />
<!-- <div class="prog">
<div class="inprogsucce"></div>
</div> -->
</div>
<div class="curloading">
<!-- <div class="cur">100%</div> -->
<div
class="cancel"
style="margin-left: 20px; cursor: pointer"
@click="removeUpload"
>
删除
</div>
</div>
</div>
<div v-if="errNum">
<div class="downloadErr" @click="downloadEeeorData">
下载失败数据
</div>
</div>
</div>
<div
v-if="uploadpercent === 100"
class="defeat"
style="
display: flex;
align-items: center;
width: 500px;
height: 40px;
"
:style="{
background: errNum
? 'rgba(255, 116, 116, 0.1)'
: 'rgba(53, 174, 105, 0.1)',
border: errNum ? '1px solid #ff7474' : '1px solid #35AE69',
}"
>
<img
style="width: 14px; height: 14px; margin-left: 16px"
:src="
errNum
? require('../../assets/images/err.png')
: require('../../assets/images/success.png')
"
/>
<div
style="margin-left: 8px"
:style="{ color: errNum ? '#ff7474' : 'rgba(0,0,0,0.65)' }"
>
{{ succNum }}条数据导入成功{{ errNum }}条数据导入失败
</div>
</div>
</div>
</div>
</div>
</div>
<div class="btnn">
<button class="btn1">取消</button>
<button class="btn2">确定</button>
<button class="closeDrawer">取消</button>
<button class="closeDrawer">确定</button>
</div>
</div>
</a-drawer>
@@ -111,6 +249,9 @@
<script>
import { reactive, toRefs } from "vue";
import { message } from "ant-design-vue";
import * as api from "../../api/index1";
import { BATCH_IMPORT_SCORE } from "@/api/config";
export default {
name: "ImportStu",
props: {
@@ -120,19 +261,176 @@ export default {
},
},
setup(props, ctx) {
const state = reactive({});
console.log(1222)
const state = reactive({
fileType: ["xls", "xlsx"],
importLeader:
process.env.VUE_APP_BASE_API +
`/admin/studentGroup/importGroup/${props.projectId}`,
uploadpercent: -1,
uploadErr: false, //上传失败
addLoading: false,
fileList: [],
succNum: 0, //成功数据数
errNum: 0, //失败数据数
downloadErrUrl: null, //下载失败数据
fileName: "",
locationHref:
location.href.indexOf("http://") !== -1
? "http://43.143.139.204:12016/"
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE,
});
const closeDrawer = () => {
ctx.emit("update:Importvisible", false);
ctx.emit("closeDraw", true);
ctx.emit("update:TaskFaceImpStuvisible", false);
state.fileList = [];
state.uploadpercent = -1;
state.uploadErr = false; //上传失败
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
if (bool) {
console.log("当前是 1 项目 2 路径图", props.type);
}
};
//上传文件
const handleChange = (info) => {
if (info) {
var FileExt = info.file.name.replace(/.+\./, "");
if (["xls", "xlsx"].indexOf(FileExt.toLowerCase()) === -1) {
state.fileList = [];
state.uploadpercent = -1;
message.destroy();
message.error("请上传正确的文件格式");
return;
}
}
state.addLoading = true;
state.uploadpercent = parseInt(info.file.percent);
console.log("我是文件上传的进度---------->", info.file.percent);
const status = info.file.status;
if (status !== "uploading") {
// console.log(info.file, info.fileList);
}
if (status === "done") {
state.fileName = info.file.name;
let i = 0;
let timeouts = setTimeout(() => {
clearInterval(timer);
state.addLoading = false;
message.destroy();
message.error(`文件导入超时`);
}, 30000);
let timer = setInterval(() => {
let uid = info.file.response.data;
api
.getImportStatus(uid)
.then((res) => {
console.log("查询导入状态", res);
if (res.data.code === 200) {
if (res.data.data.status !== "START") {
i++;
if (i === 1) {
message.destroy();
message.success(`${info.file.name}上传成功`);
state.addLoading = false;
props.searchTaskList && props.searchTaskList();
}
state.succNum = res.data.data.successNum;
state.errNum = res.data.data.failedNum;
state.downloadErrUrl = res.data.data.url;
console.log("props.getStudent", props.getStudent);
clearInterval(timer);
clearTimeout(timeouts);
}
}
})
.catch((err) => {
state.addLoading = false;
clearInterval(timer);
clearTimeout(timeouts);
console.log("查询导入状态失败", err);
});
}, 500);
} else if (status === "error") {
state.uploadErr = true;
message.error(`${info.file.name}上传失败`);
}
};
const beforeUpload = (file) => {
return new Promise((resolve, reject) => {
// const isJpgOrPng =
// file.name.indexOf(".xlsx") !== "-1" ||
// file.name.indexOf(".xls") !== "-1";
// if (!isJpgOrPng) {
// message.destroy();
// message.error("仅支持xls、xlsx格式!");
// return reject(false);
// }
const formData = new FormData();
formData.append("uploadFile", file);
// let progress = { percent: 1 };
// const intervalId = setInterval(() => {
// if (progress.percent < 100) {
// progress.percent++;
// file.onProgress(progress);
// } else {
// clearInterval(intervalId);
// }
// }, 100);
api.batchImportScore(formData).then((res) => {
if (res.data.code === 200) {
console.log("上传成功", res);
return reject(true);
}
});
return reject(false);
});
};
const handleUpload = (e) => {
console.log("handleUpload", e);
};
//删除
const removeUpload = () => {
state.fileList = [];
state.uploadpercent = -1;
state.uploadErr = false; //上传失败
state.succNum = 0;
state.errNum = 0;
state.downloadErrUrl = null;
state.addLoading = false;
};
// 下载失败数据
const downloadEeeorData = () => {
if (state.downloadErrUrl !== "") {
window.open(process.env.VUE_APP_FILE_PATH + state.downloadErrUrl);
}
};
function downTemplate() {
// console.log(state.locationHref + state.template);
// window.open(state.locationHref + state.template);
}
return {
...toRefs(state),
afterVisibleChange,
closeDrawer,
handleChange,
downTemplate,
BATCH_IMPORT_SCORE,
beforeUpload,
handleUpload,
removeUpload,
downloadEeeorData,
// change,
};
},

View File

@@ -55,6 +55,8 @@
:id="projectId"
:groupId="chooseGroupId"
:groupName="chooseGroupName"
:groupMemberCount="groupMemberCount"
:groupMemberNumber="total"
>
<a-button class="cus-btn" style="background: #4ea6ff; color: #fff">
<template #icon
@@ -210,6 +212,10 @@ export default {
type: String,
default: null,
},
groupMemberCount: {
type: Number,
default: null,
},
projectId: {
type: Number,
default: null,
@@ -372,7 +378,6 @@ export default {
};
//获取组员列表
const getStu = (obj) => {
console.log("获取学员");
let objf = obj || {
studentName: state.name,
pageNo: state.currentPage,

View File

@@ -107,8 +107,11 @@ export default {
};
const noticeFlag = () => {
//state.noticeChecked = !state.noticeChecked;
console.log("111", state.projectInfo);
console.log("111", state.projectInfo,props.projectId);
state.projectInfo.noticeFlag = state.noticeChecked ? 1 : 0;
state.projectInfo.projectId = props.projectId;
state.projectInfo.beginTime = null;
state.projectInfo.endTime = null;
editProj(state.projectInfo)
.then((res) => {
console.log("res5555555555", res);

View File

@@ -65,8 +65,8 @@
</div>
<div class="secondrow">
<div class="rowleft">{{ name }}</div>
<div class="rowleft">{{ name }} </div>
<div class="rowRight"> 排序号{{ sort }}</div>
</div>
<div class="mainbox">
<a-collapse v-model:activeKey="stageListActive">
@@ -205,6 +205,7 @@ export default {
showDown: true,
showDown1: false,
rank:{total:1,current:1},
sort:null,
stageList: [
// {
// stageName: "阶段1腾飞班阶段1",
@@ -362,14 +363,16 @@ export default {
state.loading = false
console.log("查看了学员", res.data.data);
let result = res.data.data;
state.userName = result.userInfoBo.userName;
state.deptName = result.userInfoBo.deptName;
state.jobName = result.userInfoBo.jobName;
state.userName = result.userName;
state.deptName = result.deptName;
state.jobName = result.jobName;
state.certCnt = result.certCnt == null ? 0 : result.certCnt;
state.name = result.name;
state.currentReqCnt = result.currentReqCnt;
state.totalReqCnt = result.totalReqCnt;
if (result.stageProcessList.length > 0) {
state.sort = result.stageProcessList[0].sort;
setStageList(result.stageProcessList);
}
});

View File

@@ -143,6 +143,7 @@ export default {
};
//添加小组
const addGroup = () => {
state.loading = true;
console.log("state.groupNum2", state.groupNum2);
let obj = {
pid: props.projectId,
@@ -156,6 +157,11 @@ export default {
message.success("小组添加成功");
props.getGroup && props.getGroup();
}
// 清空数据
state.groupNum = null;
state.peopleNum = null;
state.groupNum2 = [];
state.loading = false
})
.catch((err) => {
console.log("随机分组失败", err);

View File

@@ -8,14 +8,14 @@
>
<div class="drawerMain">
<!-- 2022-11-30注释 后面放开 -->
<!-- <div class="header">
<div class="header">
<div class="headerTitle">批量面授报名</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"
/>
</div> -->
</div>
<div class="main">
<div class="minatitl">
<div class="up1">请下载</div>
@@ -25,18 +25,154 @@
<div class="upload">
<div class="text">上传</div>
<div class="right">
<div class="load">
<div style="height: 176px; margin-bottom: 20px">
<a-upload-dragger
v-model:fileList="fileList"
:action="importLeader"
name="uploadFile"
:multiple="true"
@change="handleChange"
:showUploadList="false"
>
<p class="ant-upload-drag-icon">
<inbox-outlined></inbox-outlined>
</p>
<p class="ant-upload-text">点击或将文件拖拽到此处上传</p>
<p class="ant-upload-hint">支持扩展名.xls/.xlsx</p>
</a-upload-dragger>
</div>
<!-- <div class="load">
<div class="cloud"></div>
<div class="tip">点击或将文件拖拽到此处上传</div>
<div class="tipz">支持扩展名.xls/.xlsx</div>
</div>
</div> -->
<div class="loadstate">
<div
class="loadborder"
v-if="uploadpercent < 100 && uploadpercent !== -1"
>
<div class="content">
<div class="img"></div>
<div class="timebox">
<div class="timetop">
<div class="tit">{{ fileName }}</div>
<div class="stateloading">正在上传</div>
</div>
<a-progress :percent="uploadpercent" />
<!-- <div class="prog">
<div class="inprogloading"></div>
</div> -->
</div>
<div class="curloading">
<!-- <div class="cur">55%</div> -->
<!-- <div class="cancel" style="margin-left: 20px">暂停</div>
<div class="cancel" style="margin-left: 15px">取消</div> -->
</div>
</div>
</div>
<div class="loadborder" v-if="uploadErr">
<div class="content">
<div class="img"></div>
<div class="timebox">
<div class="timetop">
<div class="tit">{{ fileName }}</div>
<div class="statedefeat">上传失败</div>
</div>
<a-progress :percent="uploadpercent" />
<!-- <div class="prog">
<div class="inprogdefeat"></div>
</div> -->
</div>
<div class="curloading">
<!-- <div class="cur">55%</div> -->
<div
style="color: #387df7; margin-left: 20px; cursor: pointer"
>
下载失败数据
</div>
<!-- <div class="cancel" style="margin-left: 20px">暂停</div>
<div class="cancel" style="margin-left: 15px">取消</div> -->
</div>
<div
class="defeat"
style="display: flex; align-items: center"
>
<div style="color: #ff7474">
{{ succNum }}条数据导入成功{{ errNum }}条数据导入失败
</div>
</div>
</div>
</div>
<!-- v-if="uploadpercent === 100" -->
<div class="loadborder" v-if="uploadpercent === 100">
<div class="content">
<div class="img"></div>
<div class="timebox">
<div class="timetop">
<div class="tit">{{ fileName }}</div>
<div class="statesucce">上传成功</div>
</div>
<a-progress :percent="uploadpercent" />
<!-- <div class="prog">
<div class="inprogsucce"></div>
</div> -->
</div>
<div class="curloading">
<!-- <div class="cur">100%</div> -->
<div
class="cancel"
style="margin-left: 20px; cursor: pointer"
@click="removeUpload"
>
删除
</div>
</div>
</div>
<div v-if="errNum">
<div class="downloadErr" @click="downloadEeeorData">
下载失败数据
</div>
</div>
</div>
<div
v-if="uploadpercent === 100"
class="defeat"
style="
display: flex;
align-items: center;
width: 500px;
height: 40px;
"
:style="{
background: errNum
? 'rgba(255, 116, 116, 0.1)'
: 'rgba(53, 174, 105, 0.1)',
border: errNum ? '1px solid #ff7474' : '1px solid #35AE69',
}"
>
<img
style="width: 14px; height: 14px; margin-left: 16px"
:src="
errNum
? require('../../assets/images/err.png')
: require('../../assets/images/success.png')
"
/>
<div
style="margin-left: 8px"
:style="{ color: errNum ? '#ff7474' : 'rgba(0,0,0,0.65)' }"
>
{{ succNum }}条数据导入成功{{ errNum }}条数据导入失败
</div>
</div>
</div>
</div>
</div>
</div>
<div class="btnn">
<button class="btn1" @click="exitDraw">取消</button>
<button class="btn2" @click="exitDraw">确定</button>
<button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="closeDrawer">确定</button>
</div>
</div>
</a-drawer>
@@ -44,6 +180,9 @@
<script>
import { reactive, toRefs } from "vue";
import { message } from "ant-design-vue";
import * as api from "../../api/index1";
import { BATCH_IMPORT_SCORE } from "@/api/config";
export default {
name: "TaskImpStu",
props: {
@@ -51,26 +190,193 @@ export default {
type: Boolean,
default: false,
},
projectId: {
type: Number,
default: null,
},
studentId: {
type: Number,
default: null,
},
routerId: {
type: Number,
default: null,
},
},
setup(props, ctx) {
const state = reactive({});
const state = reactive({
fileType: ["xls", "xlsx"],
importLeader:
process.env.VUE_APP_BASE_API +
`/admin/offcourse/importGroup/${props.routerId}`,
uploadpercent: -1,
uploadErr: false, //上传失败
addLoading: false,
fileList: [],
succNum: 0, //成功数据数
errNum: 0, //失败数据数
downloadErrUrl: null, //下载失败数据
fileName: "",
locationHref:
location.href.indexOf("http://") !== -1
? "http://43.143.139.204:12016/"
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE,
});
const closeDrawer = () => {
ctx.emit("closeDraw", true);
ctx.emit("update:TaskFaceImpStuvisible", false);
state.fileList = [];
state.uploadpercent = -1;
state.uploadErr = false; //上传失败
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
if (bool) {
console.log("当前是 1 项目 2 路径图", props.type);
}
};
const exitDraw = () => {
ctx.emit("update:TaskFaceImpStuvisible", false);
//上传文件
const handleChange = (info) => {
if (info) {
var FileExt = info.file.name.replace(/.+\./, "");
if (["xls", "xlsx"].indexOf(FileExt.toLowerCase()) === -1) {
state.fileList = [];
state.uploadpercent = -1;
message.destroy();
message.error("请上传正确的文件格式");
return;
}
}
state.addLoading = true;
state.uploadpercent = parseInt(info.file.percent);
console.log("我是文件上传的进度---------->", info.file.percent);
const status = info.file.status;
if (status !== "uploading") {
// console.log(info.file, info.fileList);
}
if (status === "done") {
state.fileName = info.file.name;
let i = 0;
let timeouts = setTimeout(() => {
clearInterval(timer);
state.addLoading = false;
message.destroy();
message.error(`文件导入超时`);
}, 30000);
let timer = setInterval(() => {
let uid = info.file.response.data;
api
.getImportStatus(uid)
.then((res) => {
console.log("查询导入状态", res);
if (res.data.code === 200) {
if (res.data.data.status !== "START") {
i++;
if (i === 1) {
message.destroy();
message.success(`${info.file.name}上传成功`);
state.addLoading = false;
props.searchTaskList && props.searchTaskList();
}
state.succNum = res.data.data.successNum;
state.errNum = res.data.data.failedNum;
state.downloadErrUrl = res.data.data.url;
console.log("props.getStudent", props.getStudent);
clearInterval(timer);
clearTimeout(timeouts);
}
}
})
.catch((err) => {
state.addLoading = false;
clearInterval(timer);
clearTimeout(timeouts);
console.log("查询导入状态失败", err);
});
}, 500);
} else if (status === "error") {
state.uploadErr = true;
message.error(`${info.file.name}上传失败`);
}
};
const beforeUpload = (file) => {
return new Promise((resolve, reject) => {
// const isJpgOrPng =
// file.name.indexOf(".xlsx") !== "-1" ||
// file.name.indexOf(".xls") !== "-1";
// if (!isJpgOrPng) {
// message.destroy();
// message.error("仅支持xls、xlsx格式!");
// return reject(false);
// }
const formData = new FormData();
formData.append("uploadFile", file);
// let progress = { percent: 1 };
// const intervalId = setInterval(() => {
// if (progress.percent < 100) {
// progress.percent++;
// file.onProgress(progress);
// } else {
// clearInterval(intervalId);
// }
// }, 100);
api.batchImportScore(formData).then((res) => {
if (res.data.code === 200) {
console.log("上传成功", res);
return reject(true);
}
});
return reject(false);
});
};
const handleUpload = (e) => {
console.log("handleUpload", e);
};
//删除
const removeUpload = () => {
state.fileList = [];
state.uploadpercent = -1;
state.uploadErr = false; //上传失败
state.succNum = 0;
state.errNum = 0;
state.downloadErrUrl = null;
state.addLoading = false;
};
// 下载失败数据
const downloadEeeorData = () => {
if (state.downloadErrUrl !== "") {
window.open(process.env.VUE_APP_FILE_PATH + state.downloadErrUrl);
}
};
function downTemplate() {
// console.log(state.locationHref + state.template);
// window.open(state.locationHref + state.template);
}
// const exitDraw = () => {
// ctx.emit("update:TaskFaceImpStuvisible", false);
// }
return {
...toRefs(state),
afterVisibleChange,
closeDrawer,
exitDraw
handleChange,
downTemplate,
BATCH_IMPORT_SCORE,
beforeUpload,
handleUpload,
removeUpload,
downloadEeeorData,
// exitDraw
// change,
};
},

View File

@@ -372,6 +372,7 @@ import { reactive, toRefs } from "vue";
import CreateCertificate from "../../../components/drawers/project/CreateCertificate";
import { message } from "ant-design-vue";
import * as api from "@/api/index1";
import { fileUp } from "../../../api/indexEval";
export default {
name: "AddCertificate",
components: {
@@ -587,12 +588,43 @@ export default {
}
};
function beforeUpload(file) {
if (!state.fileType.includes(file.name.split(".").slice(-1).join(""))) {
message.error("不支持该格式");
const beforeUpload = (file) => {
const isJpgOrPng =
file.type === "image/jpg" ||
file.type === "image/jpeg" ||
file.type === "image/png" ||
file.type === "image/svg" ||
file.type === "image/bmp" ||
file.type === "image/gif";
if (!isJpgOrPng) {
message.error("仅支持jpg、gif、png、jpeg、svg、bmp格式!");
return false;
}
}
let isLt1M = file.size / 10240 / 10240 <= 1;
if (!isLt1M) {
this.$message.error("图片大小超过10MB!");
return false;
}
const formDatas = new FormData();
formDatas.append("file", file);
fileUp(formDatas).then((res) => {
if (res.data.code === 200) {
console.log(file)
state.imageUrl = res.data.data;
state.imageName = file.name;
}
});
return false;
};
// function beforeUpload(file) {
// if (!state.fileType.includes(file.name.split(".").slice(-1).join(""))) {
// message.error("不支持该格式");
// return false;
// }
// }
//查看证书
const getcertificate = () => {

View File

@@ -187,15 +187,15 @@ export default {
tablecolumns: [
{
title: "工号",
dataIndex: "studentUserNo",
key: "studentUserNo",
dataIndex: "studentCode",
key: "studentCode",
width: 60,
align: "center",
className: "h head",
customRender: (text) => {
return (
<div class="racona">
<span> {text.record.studentUserNo?text.record.studentUserNo:"-"}</span>
<span> {text.record.studentCode?text.record.studentCode:"-"}</span>
</div>
);
},
@@ -347,6 +347,7 @@ export default {
const afterVisibleChange = (bol) => {
if (bol == true) {
state.loadingData = true;
console.log(props.datasource)
getData();
}
};
@@ -377,19 +378,16 @@ export default {
// 获取数据
function getData() {
api.AssessmentManagementMessage({
api.ExamManagementMessage({
studentName: state.name,
pageNo: state.currentPage,
pageSize: state.pageSize,
currentStageId: props.datasource.stageId,
type: 1,
pid: props.datasource.projectId,
taskId: props.datasource.projectTaskId,
taskType: props.datasource.type,
status: state.projectName,
studentName: state.name,
chapterId: props.datasource.chapterId,
type: 2,
taskId: props.datasource.courseId,
targetId: props.datasource.projectId
}).then(res=>{
console.log(res)
state.tabledata = res.data.data.records;
state.tabledata = res.data.data.managementDtoList;
state.tableDataTotal = res.data.data.total;
state.loadingData = false;
})
@@ -418,8 +416,8 @@ export default {
{/* 导出数据 */}
function exportData() {
// window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?chapterId=${props.datasource.stageId=="0"?"":props.datasource.stageId}&targetId=${props.datasource.projectId}&taskId=${props.datasource.courseId}&type=${2}`)
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}&taskType=${props.datasource.type}`)
window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?currentStageId=${props.datasource.stageId}&type=${2}&targetId=${props.datasource.projectId}&pid=${props.datasource.projectId}&taskId=${props.datasource.courseId}&taskType=${props.datasource.type}`)
{/* api.ExportExam({
"chapterId": props.datasource.chapterId,
"targetId": props.datasource.routerId,

View File

@@ -155,6 +155,10 @@
return {};
},
},
outchapter: {
type: Number,
default: null,
},
},
setup(props, ctx) {
@@ -371,13 +375,13 @@
function getData() {
state.loadingData = true;
api.QueryExternalExamManageDetail({
chapterId: props.datasource.stageId,
chapterId: props.outchapter,
pageNo: state.currentPage,
pageSize: state.pageSize,
status: state.projectName,
studentName: state.name,
targetId: props.datasource.projectId,
taskId: props.datasource.projectTaskId,
taskId: props.datasource.courseId,
type: 2,
}).then(res=>{
console.log(res)

View File

@@ -578,7 +578,7 @@ export default {
props.projectTaskInfo.stageId
}&type=${1}&pid=${
props.projectTaskInfo.projectId
}&taskType=${4}&taskId=${props.projectTaskInfo.projectTaskId}`
}&taskType=${4}&taskId=${props.projectTaskInfo.id}`
);
// api
// .exportTaskStudent({

View File

@@ -23,7 +23,7 @@
v-if="datasource.type !== 6 && datasource.type !== 9"
class="endtime"
>
<!-- 起止时间-->
</div>
<div v-else class="endtime">
@@ -48,7 +48,7 @@
placeholder="请选择"
:options="projectNameList"
@change="selectProjectName"
></a-select>
</div>
</div>
@@ -112,13 +112,13 @@
</div>-->
</div>
</a-drawer>
<CVote
<CVote
v-model:CVvisible="CVvisible"
:voteID="voteID"
:courseID="courseID"
/>
</template>
<script>
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
@@ -159,7 +159,7 @@
},
},
},
setup(props, ctx) {
const state = reactive({
visible: props.ProjectVoteModelVisible,
@@ -170,27 +170,17 @@
tableDataTotal: 0,
projectName: undefined,
projectNameList: [
{
id: 1,
value: "1",
label: "未开始",
},
{
id: 2,
value: "2",
label: "进行中",
},
{
id: 3,
value: "3",
label: "已完成",
},
{
id: 4,
value: "4",
label: "未完成",
},
],
tabledata: [],
tableDataTotalLoading: true, // 表格loading加载配置
@@ -238,7 +228,7 @@
key: "studentDepartName",
width: "20%",
align: "center",
className: "h",
ellipsis: true,
customRender: (text) => {
@@ -332,7 +322,7 @@
];
return columns;
};
const closeDrawer = () => {
ctx.emit("update:ProjectVoteModelVisible", false);
state.currentPage = 1;
@@ -358,7 +348,7 @@
const onChange = (pageNumber) => {
console.log("Page: ", pageNumber);
};
// 获取数据
function getData() {
if(props.datasource.type == 12){
@@ -390,9 +380,9 @@
// 处理在线课字段和表格中字段保持一致
let obj = {
studentUserNo: res.data.data.rows[i].studentCode,
studentName: res.data.data.rows[i].studentName,
studentDepartName: res.data.data.rows[i].studentDepartName,
studentJobName: res.data.data.rows[i].studentJobName,
studentName: res.data.data.rows[i].studentName,
studentDepartName: res.data.data.rows[i].studentDepartName,
studentJobName: res.data.data.rows[i].studentJobName,
lastStudyTime: res.data.data.rows[i].submitTime,
finishStatus: res.data.data.rows[i].status?res.data.data.rows[i].status:0,
voteSubmitId: res.data.data.rows[i].voteSubmitId
@@ -412,7 +402,7 @@
state.tabledata = [];
}
}
// 搜索按钮
function searchTaskList() {
state.currentPage = 1;
@@ -427,20 +417,21 @@
state.projectName = undefined;
getData();
}
//分页
const changePaginationStu = (page) => {
state.tableDataTotalLoading = true;
state.currentPage = page;
getData();
};
// 导出数据
function exportTaskStu() {
console.log(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${2}&voteId=${props.datasource.projectTaskId}`)
window.open(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${2}&voteId=${props.datasource.projectTaskId}`)
console.log("导出数据")
console.log(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${2}&voteId=${props.datasource.courseId}`)
window.open(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${2}&voteId=${props.datasource.courseId}`)
}
return {
...toRefs(state),
selectProjectName,
@@ -459,7 +450,7 @@
},
};
</script>
<style lang="scss">
// .drawerStyle {
// .ant-drawer-content-wrapper {
@@ -531,7 +522,7 @@
flex-wrap: wrap;
margin-top: 20px;
justify-content: space-between;
.sealeft {
display: flex;
flex-wrap: wrap;
@@ -548,7 +539,7 @@
.btns {
display: flex;
flex-wrap: nowrap;
.btn {
cursor: pointer;
width: 100px;
@@ -572,15 +563,15 @@
margin-right: 7px;
}
}
.btn1 {
background: #4ea6ff;
color: #ffffff;
}
.btn2 {
background: #ffffff;
color: #4ea6ff;
border: 1px solid #4ea6ff;
}
@@ -589,7 +580,7 @@
.btnss {
display: flex;
flex-wrap: nowrap;
.btn {
cursor: pointer;
width: 130px;
@@ -613,15 +604,15 @@
margin-right: 7px;
}
}
.btn1 {
background: #4ea6ff;
color: #ffffff;
}
.btn2 {
background: #ffffff;
color: #4ea6ff;
border: 1px solid #4ea6ff;
}
@@ -630,7 +621,7 @@
th.h {
background-color: #eff4fc !important;
}
.ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> td {
@@ -657,7 +648,7 @@
}
}
}
.btnn {
height: 72px;
width: 100%;
@@ -692,5 +683,4 @@
}
}
</style>

View File

@@ -190,15 +190,15 @@ export default {
tablecolumns: [
{
title: "工号",
dataIndex: "studentUserNo",
key: "studentUserNo",
dataIndex: "studentCode",
key: "studentCode",
width: 120,
align: "center",
className: "h head",
customRender: (text) => {
return (
<div class="racona">
<span> {text.record.studentUserNo?text.record.studentUserNo:"-"}</span>
<span> {text.record.studentCode?text.record.studentCode:"-"}</span>
</div>
);
},
@@ -395,22 +395,21 @@ export default {
// 获取数据
function getData() {
api.AssessmentManagementMessage({
api.ExamManagementMessage({
studentName: state.name,
pageNo: state.currentPage,
pageSize: state.pageSize,
currentStageId: props.datasource.chapterId,
type: 2,
pid: props.datasource.routerId,
taskId: props.datasource.routerTaskId,
taskType: props.datasource.type,
status: state.projectName,
studentName: state.name,
chapterId: props.datasource.chapterId,
type: 1,
taskId: props.datasource.courseId,
targetId: props.datasource.routerId
}).then(res=>{
state.tabledata = res.data.data.records;
state.tabledata = res.data.data.managementDtoList;
state.tableDataTotal = res.data.data.total;
state.loadingData = false;
})
}
// 搜索
function searchTableData() {
state.currentPage = 1;
@@ -436,7 +435,7 @@ export default {
{/* 导出数据 */}
function exportData() {
// window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?chapterId=${props.datasource.chapterId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&type=${1}`)
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.routerTaskId}&taskType=${props.datasource.type}`)
window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?currentStageId=${props.datasource.chapterId}&type=${1}&pid=${props.datasource.routerId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&taskType=${props.datasource.type}`)
{/* api.ExportExam({
"chapterId": props.datasource.chapterId,

View File

@@ -567,7 +567,7 @@ export default {
}/admin/student/exportTaskStudent?currentStageId=${
props.datasource.chapterId
}&type=${2}&pid=${props.datasource.routerId}&taskType=${4}&taskId=${
props.datasource.routerTaskId
props.datasource.id
}`
);
// api

View File

@@ -23,7 +23,7 @@
v-if="datasource.type !== 6 && datasource.type !== 9"
class="endtime"
>
<!-- 起止时间-->
</div>
<div v-else class="endtime">
@@ -48,7 +48,7 @@
placeholder="请选择"
:options="projectNameList"
@change="selectProjectName"
></a-select>
</div>
</div>
@@ -112,13 +112,13 @@
</div>-->
</div>
</a-drawer>
<CVote
<CVote
v-model:CVvisible="CVvisible"
:voteID="voteID"
:courseID="courseID"
/>
</template>
<script>
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
@@ -163,7 +163,7 @@
default: null,
},
},
setup(props, ctx) {
const state = reactive({
visible: props.VoteModelVisible,
@@ -174,27 +174,17 @@
tableDataTotal: 0,
projectName: undefined,
projectNameList: [
{
id: 1,
value: "1",
label: "未开始",
},
{
id: 2,
value: "2",
label: "进行中",
},
{
id: 3,
value: "3",
label: "已完成",
},
{
id: 4,
value: "4",
label: "未完成",
},
}
],
tabledata: [],
tableDataTotalLoading: true, // 表格loading加载配置
@@ -242,7 +232,7 @@
key: "studentDepartName",
width: "20%",
align: "center",
className: "h",
ellipsis: true,
customRender: (text) => {
@@ -352,7 +342,7 @@
];
return columns;
};
const closeDrawer = () => {
ctx.emit("update:VoteModelVisible", false);
state.currentPage = 1;
@@ -363,6 +353,7 @@
const afterVisibleChange = (bol) => {
if (bol == true) {
console.log("当前是什么类型", props.datasource.type);
console.log("当前是什么类型", props.datasource);
state.tableDataTotalLoading = true;
getData();
}
@@ -378,7 +369,7 @@
const onChange = (pageNumber) => {
console.log("Page: ", pageNumber);
};
// 获取数据
function getData() {
if(props.datasource.type == 12){
@@ -410,9 +401,9 @@
// 处理在线课字段和表格中字段保持一致
let obj = {
studentUserNo: res.data.data.rows[i].studentCode,
studentName: res.data.data.rows[i].studentName,
studentDepartName: res.data.data.rows[i].studentDepartName,
studentJobName: res.data.data.rows[i].studentJobName,
studentName: res.data.data.rows[i].studentName,
studentDepartName: res.data.data.rows[i].studentDepartName,
studentJobName: res.data.data.rows[i].studentJobName,
lastStudyTime: res.data.data.rows[i].submitTime,
finishStatus: res.data.data.rows[i].status?res.data.data.rows[i].status:0,
voteSubmitId: res.data.data.rows[i].voteSubmitId
@@ -432,7 +423,7 @@
state.tabledata = [];
}
}
// 搜索按钮
function searchTaskList() {
state.currentPage = 1;
@@ -447,20 +438,20 @@
state.projectName = undefined;
getData();
}
//分页
const changePaginationStu = (page) => {
state.tableDataTotalLoading = true;
state.currentPage = page;
getData();
};
// 导出数据
function exportTaskStu() {
console.log(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${1}&voteId=${props.datasource.routerTaskId}`)
window.open(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${1}&voteId=${props.datasource.routerTaskId}`)
console.log(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${1}&voteId=${props.datasource.courseId}`)
window.open(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${1}&voteId=${props.datasource.courseId}`)
}
return {
...toRefs(state),
selectProjectName,
@@ -479,7 +470,7 @@
},
};
</script>
<style lang="scss">
// .drawerStyle {
// .ant-drawer-content-wrapper {
@@ -551,7 +542,7 @@
flex-wrap: wrap;
margin-top: 20px;
justify-content: space-between;
.sealeft {
display: flex;
flex-wrap: wrap;
@@ -568,7 +559,7 @@
.btns {
display: flex;
flex-wrap: nowrap;
.btn {
cursor: pointer;
width: 100px;
@@ -592,15 +583,15 @@
margin-right: 7px;
}
}
.btn1 {
background: #4ea6ff;
color: #ffffff;
}
.btn2 {
background: #ffffff;
color: #4ea6ff;
border: 1px solid #4ea6ff;
}
@@ -609,7 +600,7 @@
.btnss {
display: flex;
flex-wrap: nowrap;
.btn {
cursor: pointer;
width: 130px;
@@ -633,15 +624,15 @@
margin-right: 7px;
}
}
.btn1 {
background: #4ea6ff;
color: #ffffff;
}
.btn2 {
background: #ffffff;
color: #4ea6ff;
border: 1px solid #4ea6ff;
}
@@ -650,7 +641,7 @@
th.h {
background-color: #eff4fc !important;
}
.ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> td {
@@ -677,7 +668,7 @@
}
}
}
.btnn {
height: 72px;
width: 100%;
@@ -712,4 +703,3 @@
}
}
</style>

View File

@@ -33,7 +33,7 @@
/>
<a-button
type="primary"
@click="searchAudi"
@click="getStu"
style="margin-left: 20px; border-radius: 4px"
>
<template #icon>
@@ -42,7 +42,7 @@
搜索
</a-button>
<a-button
@click="resetAudienceInfo"
@click="getStu"
style="margin-left: 20px; border-radius: 4px"
>重置
</a-button>
@@ -430,6 +430,7 @@
</a-modal>
</template>
<script setup>
import {message} from "ant-design-vue";
import { computed, defineEmits, defineProps, ref, watch } from "vue";
import { boeRequest, useBoeApi, useBoeApiPage } from "@/api/request";
import {
@@ -484,6 +485,14 @@ const props = defineProps({
type: String,
default: null,
},
groupMemberCount: {
type: Number,
default: null,
},
groupMemberNumber: {
type: Number,
default: null,
},
});
// 获取项目学员;
const procurrentPage = ref(1);
@@ -511,7 +520,7 @@ const getStu = () => {
studentName: proStudentName.value,
pageNo: procurrentPage.value,
pageSize: 10,
projectId: props.projectId,
projectId: props.id,
};
projectListTotal.value = -1;
console.log("获取项目学员", obj);
@@ -888,6 +897,15 @@ const submitAuth = () => {
};
function handleStageOk() {
// 判断添加人数是否已超过限制人数
if (props.groupMemberCount < selectsData.value.projectMemberList.length + props.groupMemberNumber) {
return message.warning("添加小组学员超过最大值");
}
// 对选中的人员进行判断是否已经分组了
let haveGroupNum = selectsData.value.projectMemberList.filter(item => item.groupId !== null);
if (haveGroupNum.length > 0) {
message.warning("部分学员已经有小组,再次添加会被添加到当前小组.");
}
stageVisible.value = false;
visiable.value = false;
emit("finash", false);
@@ -1186,4 +1204,4 @@ watch(visiable, () => {
}
}
}
</style>
</style>

View File

@@ -2,22 +2,22 @@
<a-modal
:visible="visiable"
:centered="true"
:width="1000"
width="70%"
title="学员管理"
@cancel="closeDrawer"
>
<div class="header-content">
<div>
xxxxxxxx课程
<div style="font-size: 16px">
xxxxxxxx 课程
</div>
<div>
内容分类:12312
<span style="color:#999">内容分类</span>12312
</div>
<div>
授课教师:12312
<span style="color:#999">授课教师</span>12312
</div>
<div>
状态审核:12312
<span style="color:#999">审核状态</span>12312
</div>
</div>
<div class="TableStudent">
@@ -41,21 +41,14 @@
style="background: #4ea6ff; color: #fff; width: 100px"
@click="searchStu"
>
<template #icon>
<img
style="margin-right: 10px"
src="../../assets/images/courseManage/search0.png"
/></template>
<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"
/></template>
<template #icon><img style="margin-right: 10px" src="../../assets/images/leveladd/reset.png"/></template>
重置
</a-button>
</a-col>
@@ -65,7 +58,6 @@
type="flex"
gutter="12"
style="padding-left: 20px; margin-right: 0px"
v-if="checkPer(permissions)"
>
<a-col :span="1.5">
<CommonStudent
@@ -75,103 +67,12 @@
:stage="stage"
>
<a-button class="cus-btn" style="background: #4ea6ff; color: #fff">
<template #icon
><img
style="margin-right: 10px"
src="../../assets/images/courseManage/add0.png"
/></template>
<template #icon><img style="margin-right: 10px" src="../../assets/images/courseManage/add0.png"/>
</template>
添加学员
</a-button>
</CommonStudent>
</a-col>
<!-- 新加导入学员 批量换组 导出学习信息 -->
<a-col :span="1.5" v-if="type === 1 || type === 2">
<a-button class="cus-btn white" @click="showImpStu">
<template #icon
><img
style="margin-right: 10px"
src="../../assets/images/basicinfo/in2.png"
/></template>
导入学员
</a-button>
</a-col>
<!--
<a-col :span="1.5" v-if="type === 1">
<a-button class="cus-btn white"> 批量换组 </a-button>
</a-col>-->
<a-col :span="1.5" v-if="type === 1">
<a-button class="cus-btn white" @click="exportTaskStu">
导出学习信息
</a-button>
</a-col>
<a-col :span="1.5" v-if="type === 2">
<a-button class="cus-btn white" @click="exportTaskStuRouter">
导出学习信息
</a-button>
</a-col>
<a-col :span="1.5">
<a-button class="cus-btn white" @click="bathDel">
<template #icon
><img
style="margin-right: 10px"
src="../../assets/images/projectadd/delete.png"
/></template>
批量删除
</a-button>
</a-col>
<a-col :span="1.5" v-if="type === 2">
<a-button class="cus-btn white" @click="showChangeModal">
<template #icon></template>
批量调整关卡
</a-button>
</a-col>
<!-- 新加批量操作导出导出作业 -->
<a-col :span="1.5" v-if="type === 3" class="batchOpera">
<div class="stmm_btn btn4" @click="hideShow">
<div class="btn4_sub">
<span style="color: #4ea6ff; margin-right: 4px"> 批量操作 </span>
<div
class="b_zk"
:style="{ display: hideshow ? 'block' : 'none' }"
></div>
<div
class="b_sq"
:style="{ display: hideshow ? 'none' : 'block' }"
></div>
</div>
<div
class="btn4_sup"
:style="{ display: hideshow ? 'none' : 'block' }"
>
<div class="btnsbox">
<div class="btn4_tit" @click="showEScoreModal">
<span>批量录入成绩</span>
</div>
<div class="btn4_op1" @click="updateStatus(1)">
<span>批量结业</span>
</div>
<div class="btn4_op2" @click="updateStatus(0)">
<span>批量通过</span>
</div>
<div class="btn4_op3" @click="updateStatus(2)">
<span>批量拒绝</span>
</div>
</div>
</div>
</div>
<div class="stmm_btn btn5" @click="exportStu">
<div class="export"></div>
<div class="btnText">导出</div>
</div>
<div
class="stmm_btn btn5"
style="margin-left: 15px"
@click="exportHomeWorkShow"
>
<div class="btnText">导出作业</div>
</div>
</a-col>
</a-row>
<div style="margin-top: 20px">
<a-table
@@ -194,7 +95,7 @@
</a-modal>
</template>
<script setup>
import {computed, createVNode, defineProps, defineExpose, ref, watch} from "vue";
import {computed, createVNode, defineExpose, defineProps, ref, watch} from "vue";
import {usePage} from "@/api/request";
import {STUDENT_LIST} from "@/api/apis";
import {delStudentList} from "@/api/index1";
@@ -339,14 +240,16 @@ defineExpose({
})
</script>
<style lang="scss">
.header-content{
padding:20px;
border:1px solid #eef9f3;
.header-content {
padding: 20px;
border: 1px solid #eef9f3;
margin-bottom: 20px;
div{
div {
margin-top: 10px;
}
}
.cus-btn {
width: 100%;
height: 40px;

View File

@@ -109,10 +109,12 @@
导入学员
</a-button>
</a-col>
<!--
<a-col :span="1.5" v-if="type === 1">
<a-button class="cus-btn white"> 批量换组 </a-button>
</a-col>-->
<a-button class="cus-btn white" @click="showChangeGroupModal">
批量换组
</a-button>
</a-col>
<a-col :span="1.5" v-if="type === 1">
<a-button class="cus-btn white" @click="exportTaskStu">
导出学习信息
@@ -242,6 +244,13 @@
:ids="stuSelectKeys"
@finash="submitCall"
/>
<!-- 换组弹窗 -->
<ChangeGroupModal
v-model:changegroupV="checkgroupParam.changegroupV"
:groupList="checkgroupParam.checkgroupList"
:checkgroupStuId="checkgroupParam.checkgroupStuId"
/>
<!-- 批量调整关卡弹窗 -->
<!-- 取消学员弹窗 -->
<div>
@@ -341,6 +350,7 @@
<script setup>
import { computed, createVNode, defineProps, onMounted, ref, watch } from "vue";
import { delStudentList, getStuPage, batchUpdateStatus } from "@/api/index1";
import ChangeGroupModal from "@/components/student/ChangeGroupModal.vue";
import CommonStudent from "@/components/student/CommonStudent";
import ChangeLevelModal from "./ChangeLevelModal.vue";
import { message, Modal } from "ant-design-vue";
@@ -390,6 +400,7 @@ const topFlagList = ref([
label: "优秀学员",
},
]);
const tablecolumns = ref([
{
title: "姓名",
@@ -501,6 +512,13 @@ const tableParam = ref({
type: props.type,
pid: props.id,
});
const checkgroupParam = ref({
changegroupV: false, //学员名称
checkgroupList: "", //学员小组
checkgroupStuId: null,
});
const stuSelectKeys = ref([]);
const tableData = ref({
list: [],
@@ -514,13 +532,22 @@ const stuRowSelection = computed(() => ({
onChange: onStuSelectChange,
preserveSelectedRowKeys: true,
}));
//显示学员换组弹窗
function showChangeGroupModal () {
debugger
checkgroupParam.value.changegroupV = true;
}
// 导出数据
function exportTaskStu() {
console.log("props.datasource", props);
window.open(
`${
process.env.VUE_APP_BASE_API
}/admin/student/exportTaskStudent?type=${1}&pid=${props.id}`
}/admin/student/exportTaskStudent?type=${1}&pid=${props.targetId}`
);
}
@@ -776,7 +803,11 @@ const AddImpStuvisibleClose = (isget) => {
if (isget) {
getStuList();
}
};
}
function startLoading(){
tableData.value.loading = true;
}
defineExpose({getStuList,startLoading})
</script>
<style lang="scss">
.TableStudent {
@@ -1177,4 +1208,4 @@ const AddImpStuvisibleClose = (isget) => {
height: 258px !important;
}
*/
</style>
</style>

View File

@@ -74,7 +74,7 @@
<span>创建投票题干</span>
</div>
<div class="btnbox">
<CreateVote v-model:options="formData.voteStemDtoList">
<CreateVote v-model:options="formData.voteStemDtoList" :list="formData.voteStemDtoList">
<button class="xkbtn">
{{ formData.voteStemDtoList.length ? "编辑" : "创建" }}投票题干
</button>

View File

@@ -71,28 +71,58 @@
</a-drawer>
</template>
<script setup>
import {defineEmits, defineProps, ref} from "vue";
import {defineEmits, defineProps, ref, watch} from "vue";
import VoteQuestion from "./VoteQuestion.vue";
defineProps({
options: []
const prop = defineProps({
options: [],
list: []
})
const emit = defineEmits({})
const formData = ref({list: []})
const formData = ref({list: [{}]})
const initData = ref({list: [{}]})
console.log(prop.options.length);
const visible = ref(false)
function openDrawer() {
if (prop.options.length > 0) {
for(let i in initData.value) {
console.log(formData.value[i])
if (initData.value[i].valueSingle != formData.value[i].valueSingle) {
console.log('不等于')
formData.value[i].valueSingle = initData.value[i].valueSingle
}
}
}else {
formData.value.list = []
setTimeout(() =>{
formData.value.list = [{}]
}, 100)
}
visible.value = true
}
watch(formData.value, () => {
console.log('111',formData.value)
})
const closeDrawer = () => {
console.log('formData',formData.value)
// formData.value = JSON.parse(JSON.stringify(initData.value));
visible.value = false
};
async function confirm() {
console.log('confirm');
initData.value = JSON.parse(JSON.stringify(formData.value));
emit('update:options', formData.value.list)
closeDrawer()
// closeDrawer()
visible.value = false
}
function handleAdd() {

View File

@@ -62,6 +62,7 @@ const emit = defineEmits({})
const formData = ref({optionDetailList: []})
watch(formData.value, () => {
console.log(formData.value)
emit('update:item', formData.value)
})

File diff suppressed because it is too large Load Diff

View File

@@ -21,7 +21,7 @@
></iframe>
<OnlineClassModelStudent ref="stuRef"></OnlineClassModelStudent>
<div @click="test">
asdfasdf
测试
</div>
</div>
</template>
@@ -32,12 +32,12 @@ import OnlineClassModelStudent from "@/components/student/OnlineClassModelStuden
const stuRef = ref()
onMounted(()=>{
window.openStudentModel = stuRef.value.openDrawer
onMounted(() => {
window.openSelectStu = stuRef.value.openDrawer
})
function test(){
window.openStudentModel()
function test() {
window.openSelectStu()
}
</script>
<style lang="scss">
@@ -47,6 +47,7 @@ function test(){
display: flex;
flex-direction: column;
}
.btnn {
height: 72px;
width: 100%;
@@ -55,6 +56,7 @@ function test(){
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
@@ -64,6 +66,7 @@ function test(){
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;

View File

@@ -369,7 +369,7 @@ export default defineComponent({
// 课程三级分类
});
const store = useStore();
console.log(store,666);
const sysTypeOptions = computed(() => store.state.content_type);
const optionsUrl = computed(() => store.state.course_pic);
@@ -513,6 +513,7 @@ export default defineComponent({
// 点击图片选择图片
const choicePic = (value) => {
console.log(111111112);
state.feng_mian_1 = value;
}

View File

@@ -35,7 +35,7 @@
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
margin-right: 5%;
" placeholder="请输入创建人" />
</div>
<div class="inpbox1">
@@ -43,7 +43,7 @@
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
margin-right:5%;
" placeholder="请输入名称" />
</div>
<div class="select addTimeBox">
@@ -759,16 +759,17 @@ export default {
console.log('我是邀请审核得传递参数',{
"inviteContent": state.valueSuggInvitation,
"offcourseId": state.inviteReview.offcourseId,
"teacherId": state.inviteReview.teacherId,
"teacherName": state.inviteReview.teacherName
"teacherId": state.memberValue.value,
"teacherName": state.memberValue.label
})
inviteAudit({
"inviteContent": state.valueSuggInvitation,
"offcourseId": state.inviteReview.offcourseId,
"teacherId": state.inviteReview.teacherId,
"teacherName": state.inviteReview.teacherName
"teacherId": state.memberValue.value,
"teacherName": state.memberValue.label
}).then((res) => {
console.log(res)
getFaceList();
state.courInvitationAuditModal = false;
}).catch(err=>{
console.log(err)

View File

@@ -574,24 +574,7 @@
<a-tab-pane key="3" tab="学员管理" force-render>
<TableStudent
:permissions="permissions"
v-if="isreload"
:type="2"
:id="routerId"
:stage="stage"
:columns="tableDataFunc()"
>
<template #extension="{ data: { record } }">
<a-button type="link" @click="showStudent(record)">查看</a-button>
<a-button
type="link"
@click="setLevels(record)"
v-if="checkPer(permissions)"
>调整</a-button
>
</template>
</TableStudent>
<TableStudent
v-else
ref="stuRef"
:type="2"
:id="routerId"
:stage="stage"
@@ -1090,7 +1073,11 @@
v-model:studentId="studentId"
/>
<!-- 面授学员抽屉 -->
<RouterFaceStu v-model:FSvisible="FSvisible" :datasource="facestudent" />
<RouterFaceStu v-model:FSvisible="FSvisible"
:datasource="facestudent"
:type="2"
:routerId="routerId"
/>
<!-- 活动考勤抽屉 -->
<active-attendance
v-model:AAvisible="AAvisible"
@@ -1368,7 +1355,9 @@
<!-- 项目管理抽屉 结束-->
<!-- 批量面授报名 -->
<task-imp-stu v-model:TaskFaceImpStuvisible="TaskFaceImpStuvisible" />
<task-imp-stu v-model:TaskFaceImpStuvisible="TaskFaceImpStuvisible"
:type="2"
:routerId="routerId" />
</div>
</template>
<script>
@@ -1436,7 +1425,7 @@ export default {
setup() {
const router = useRouter();
const route = useRoute();
const stuRef = ref()
// const store = useStore();
const state = reactive({
permissions: "",
@@ -1864,6 +1853,8 @@ export default {
};
//考勤的抽屉
const showAA = (course, a, data) => {
debugger
console.log("直播管理", data);
state.AAvisible = true;
state.liveData = data;
state.showKaoqinText = "直播";
@@ -1930,7 +1921,7 @@ export default {
// 考试点击管理弹框
const examinationModel = (data, levelname, outchapterid) => {
console.log(data);
if (data.startTime == null && data.endTime == null) {
if (data.examType==2) {
// 外部考试
state.examinationExaminaModelVisible = true;
state.outchapter = outchapterid;
@@ -2837,33 +2828,19 @@ export default {
}
// 点击确定 调整关卡
function changeLevel() {
state.isreload = false;
async function changeLevel() {
if (!state.curLevel) {
message.error("请选择关卡");
return;
}
moveStudent({ targetId: state.curLevel, ids: [state.curStuID] })
.then((res) => {
console.log(res);
state.visiblene = false;
message.destroy();
state.isreload = true;
message.success("调整关卡成功");
state.curLevel = undefined;
state.curStuID = "";
state.curLevelName = "";
getStudent();
})
.catch((err) => {
console.log(err);
state.visiblene = false;
message.error("调整关卡失败");
state.isreload = true;
state.curLevel = undefined;
state.curStuID = "";
state.curLevelName = "";
});
state.visiblene = false;
message.success("调整关卡成功");
stuRef.value.startLoading()
await moveStudent({targetId: state.curLevel, ids: [state.curStuID]})
state.curLevel = undefined;
state.curStuID = "";
state.curLevelName = "";
stuRef.value.getStuList()
}
// 面授课学员报名弹框
@@ -2875,6 +2852,7 @@ export default {
return {
...toRefs(state),
...toRefs(levelList),
stuRef,
clearChooseStu,
showDeleteALLModal,
closeDeleteALLModal,

View File

@@ -621,6 +621,7 @@ const closeChangeModal = () => {
const temporaryStorage = async () => {
templateLoading.value = true
await request(ROUTER_DETAIL_MODIFY, routerInfo.value)
await getDetail()
message.success("暂存成功");
templateLoading.value = false
};

View File

@@ -38,7 +38,8 @@
><div style="display: flex">
<img class="img2" src="../../assets/images/leveladd/back.png" />
<div class="return">返回</div>
</div></router-link
</div>
</router-link
>
</div>
</div>
@@ -332,7 +333,7 @@
</a-tab-pane>
</a-tabs>
</a-tab-pane>
<!--
<a-tab-pane key="3" tab="项目积分">
<div class="split"></div>
<div class="projectscore">
@@ -343,7 +344,7 @@
<div class="pjc_body">
<div class="groupright">
<div class="spandiv"><span class="spantext">规则</span></div>
<div v-if="edit" class="btns" style="display: none">
<div v-if="edit" class="btns" >
<div class="btn1" @click="edit = !edit">
<img src="../../assets/images/projectadd/edit1.png" />
<span class="btn1text">编辑</span>
@@ -478,7 +479,7 @@
</div>
</div>
</a-tab-pane>
-->
<a-tab-pane key="4" tab="设置">
<div class="split"></div>
@@ -1144,7 +1145,9 @@ export default defineComponent({
.then((res) => {
console.log("获取了项目积分规则", res.data.data);
let result = res.data.data;
scoresum.value = result.totalScore; //Write operation failed: computed value is readonly
console.log("获取了项目积分规则:", result);
if(result.size>0){
scoresum.value = result.totalScore==null?0:result.totalScore; //Write operation failed: computed value is readonly
state.seven1 = result.leaderScore;
state.score1 = result.courseScore;
state.done2 = result.homeworkItem[1].scoreLimit;
@@ -1159,6 +1162,8 @@ export default defineComponent({
state.six1 = result.signScore;
state.seven1 = result.leaderScore;
state.seven2 = result.topStudentScore;
}
})
.catch((err) => {
console.log("获取项目积分规则失败了", err);

View File

@@ -3,14 +3,15 @@
<div class="projectAdd">
<div class="header">
<span class="title"
>{{ projectInfo.projectId ? "编辑" : "创建"
>{{
projectInfo.projectId ? "编辑" : "创建"
}}{{ ptojectType == "3" ? "班级" : "项目" }}</span
>
<div
@click="backPage"
style="cursor: pointer"
to="/projectmanage"
class="goback"
@click="backPage"
style="cursor: pointer"
to="/projectmanage"
class="goback"
>
<span class="return"></span><span class="returntext">返回</span>
</div>
@@ -20,8 +21,8 @@
<div class="name" v-if="projectInfo.parentName">
<div class="namebox">
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">项目归属</div>
</div>
@@ -34,8 +35,8 @@
<div class="name">
<div class="namebox">
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">
{{ ptojectType == 3 ? "班级名称" : "项目名称" }}
@@ -43,27 +44,27 @@
</div>
<div class="in">
<NameInput
placeholder="请输入项目名称"
v-model:value="projectInfo.name"
v-model:validate="projectInfo.validate"
:maxlength="30"
show-count
:id="projectInfo.projectId"
placeholder="请输入项目名称"
v-model:value="projectInfo.name"
v-model:validate="projectInfo.validate"
:maxlength="30"
show-count
:id="projectInfo.projectId"
></NameInput>
</div>
</div>
<div class="name flex-top">
<div class="namebox" style="margin-top: 10px">
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">封面图</div>
</div>
<div class="in select" style="flex: 1; display: flex">
<div
:class="`box ${projectInfo.picUrl === src.value ? 'active' : ''}`"
style="
:class="`box ${projectInfo.picUrl === src.value ? 'active' : ''}`"
style="
width: 100px;
height: 100px;
border-radius: 5px;
@@ -71,19 +72,19 @@
position: relative;
overflow: hidden;
"
v-for="(src, index) in projectPic"
:key="index"
@click="() => (projectInfo.picUrl = src.value)"
v-for="(src, index) in projectPic"
:key="index"
@click="() => (projectInfo.picUrl = src.value)"
>
<img
style="
style="
width: 100px;
height: 100px;
margin-bottom: 4px;
margin-right: 4px;
"
:src="src.value"
alt="avatar"
:src="src.value"
alt="avatar"
/>
</div>
</div>
@@ -91,81 +92,81 @@
<div class="name">
<div class="namebox">
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">项目时间</div>
</div>
<div v-if="projectInfo.projectId" class="in">
<a-range-picker
separator="至"
:show-time="{ format: 'HH:mm' }"
:placeholder="[' 开始时间', ' 结束时间']"
:disabled-date="disabledDate1"
v-model:value="projectInfo.rangeTime"
style="width: 100%; height: 40px; border-radius: 5px"
:allowClear="false"
valueFormat="YYYY-MM-DD HH:mm"
@change="timeChange"
@ok="clickOk"
@openChange="panelOpen"
:disabled="viewDetail ? true : false"
separator="至"
:show-time="{ format: 'HH:mm' }"
:placeholder="[' 开始时间', ' 结束时间']"
:disabled-date="disabledDate1"
v-model:value="projectInfo.rangeTime"
style="width: 100%; height: 40px; border-radius: 5px"
:allowClear="false"
valueFormat="YYYY-MM-DD HH:mm"
@change="timeChange"
@ok="clickOk"
@openChange="panelOpen"
:disabled="viewDetail ? true : false"
/>
</div>
<div v-else class="in">
<a-range-picker
separator="至"
:show-time="{ format: 'HH:mm' }"
:placeholder="[' 开始时间', ' 结束时间']"
:disabled-date="disabledDate"
v-model:value="projectInfo.rangeTime"
style="width: 100%; height: 40px; border-radius: 5px"
valueFormat="YYYY-MM-DD HH:mm"
@change="timeChange"
:disabled="viewDetail ? true : false"
separator="至"
:show-time="{ format: 'HH:mm' }"
:placeholder="[' 开始时间', ' 结束时间']"
v-model:value="projectInfo.rangeTime"
style="width: 100%; height: 40px; border-radius: 5px"
valueFormat="YYYY-MM-DD HH:mm"
@change="timeChange"
:disabled="viewDetail ? true : false"
/>
</div>
</div>
<div class="name">
<div class="namebox">
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">项目经理</div>
</div>
<div class="in">
<ProjectManager
v-model:value="projectInfo.managerId"
v-model:name="projectInfo.manager"
@onChange="managerChange"
mode="multiple"
v-model:value="projectInfo.managerId"
v-model:name="projectInfo.manager"
@onChange="managerChange"
mode="multiple"
></ProjectManager>
</div>
</div>
<div class="name">
<div class="namebox">
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">资源归属</div>
</div>
<div class="in select">
<OrgClass
v-model:value="projectInfo.sourceBelongId"
v-model:name="projectInfo.sourceBelongName"
v-model:fullName="projectInfo.sourceBelongFullName"
v-model:value="projectInfo.sourceBelongId"
v-model:name="projectInfo.sourceBelongName"
v-model:fullName="projectInfo.sourceBelongFullName"
></OrgClass>
</div>
</div>
<div class="name">
<div class="namebox">
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">项目级别</div>
</div>
@@ -176,8 +177,8 @@
<div class="name">
<div class="namebox">
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">培训分类</div>
</div>
@@ -188,15 +189,15 @@
<div class="name">
<div class="namebox">
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">是否BOEU实施</div>
</div>
<div class="in">
<a-radio-group
v-model:value="projectInfo.boeFlag"
:disabled="viewDetail ? true : false"
v-model:value="projectInfo.boeFlag"
:disabled="viewDetail ? true : false"
>
<a-radio :style="radioStyle" :value="1"></a-radio>
<a-radio :style="radioStyle" :value="0"></a-radio>
@@ -211,7 +212,7 @@
<!-- :disabled="viewDetail ? true : false" -->
<a-checkbox v-model:checked="courseSyncFlag" disabled>
<span
style="
style="
width: 100%;
color: rgba(109, 117, 132, 1);
font-size: 14px;
@@ -225,7 +226,7 @@
<!-- :disabled="viewDetail ? true : false" -->
<a-checkbox v-model:checked="courseSyncFlag" disabled>
<span
style="
style="
width: 100%;
color: rgba(109, 117, 132, 1);
font-size: 14px;
@@ -242,12 +243,12 @@
</div>
<div class="in">
<a-textarea
v-model:value="projectInfo.remark"
style="height: 80px"
placeholder="请输入说明"
show-count
:maxlength="200"
:disabled="viewDetail ? true : false"
v-model:value="projectInfo.remark"
style="height: 80px"
placeholder="请输入说明"
show-count
:maxlength="200"
:disabled="viewDetail ? true : false"
/>
</div>
</div>
@@ -266,20 +267,15 @@
<div class="inname" style="width: 50px">模版</div>
<div class="in select" style="margin-left: 2px">
<a-select
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
placeholder="请选择模版"
:size="size"
style="width: 100%"
:options="classifyList5"
@change="classificationChange5"
@popupScroll="templateScroll"
:fieldNames="{
:getPopupContainer="triggerNode => (triggerNode.parentNode || document.body)"
placeholder="请选择模版"
style="width: 100%"
:options="classifyList5"
@change="classificationChange5"
@popupScroll="templateScroll"
:fieldNames="{
label: 'name',
value: 'projectTemplateId',
value: 'id',
}"
>
</a-select>
@@ -291,12 +287,12 @@
<div class="btn">
<a-button @click="backPage" class="btn2">取消</a-button>
<a-button
:loading="loading"
v-on:click="createProject"
type="primary"
class="btn1"
style="margin-left: 20px"
>确定
:loading="loading"
v-on:click="createProject"
type="primary"
class="btn1"
style="margin-left: 20px"
>确定
</a-button>
</div>
</div>
@@ -383,10 +379,10 @@ export default {
state.projectInfo.parentId = routers.query.parentId;
state.projectInfo.projectId = routers.query.projectId;
(state.projectInfo.projectId || state.projectInfo.parentId) &&
api
api
.getProjectDetail({
projectId:
state.projectInfo.projectId || state.projectInfo.parentId,
state.projectInfo.projectId || state.projectInfo.parentId,
})
.then((res) => {
state.projectInfo = {
@@ -394,8 +390,8 @@ export default {
...state.projectInfo,
};
!routers.query.projectId &&
!!routers.query.parentId &&
(state.projectInfo.name = "");
!!routers.query.parentId &&
(state.projectInfo.name = "");
state.projectInfo.rangeTime = [
state.projectInfo.beginTime,
state.projectInfo.endTime,
@@ -422,8 +418,8 @@ export default {
if (res.rows && res.rows.length > 0) {
let i = res.rows.length;
state.auditDescription = res.rows[i - 1].description
? res.rows[i - 1].description
: "-";
? res.rows[i - 1].description
: "-";
}
}
});
@@ -437,14 +433,15 @@ export default {
//选择分类
const classificationChange = (value) => {
console.log(`selected ${value}`);
state.projectType = value; //分类选择的id
};
const classificationChange5 = (key, option) => {
state.projectInfo = option;
state.projectInfo.projectTemplateId = option.id
state.projectInfo.id = ''
state.projectInfo.type = 3;
state.projectInfo.rangeTime = [option.beginTime, option.endTime];
state.projectInfo.rangeTime = [dayjs(option.beginTime, "YYYY-MM-DD HH:mm"), dayjs(option.endTime, "YYYY-MM-DD HH:mm")];
state.projectInfo.parentName = routers.query.parentName;
state.projectInfo.parentId = routers.query.parentId;
};
@@ -505,8 +502,10 @@ export default {
}
const createProject = async () => {
state.loading = true;
console.log("保存", state.projectInfo);
if (!validate(state.projectInfo, errorMsgs)) {
state.loading = false;
return;
}
/**
@@ -524,18 +523,18 @@ export default {
});
if (offName) {
message.destroy();
state.loading = false;
return message.warning("项目名称重复,请重新填写");
}
state.projectInfo.type = 3;
state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0;
state.loading = true;
api.createProject(state.projectInfo).then((res) => {
state.loading = false;
message.destroy();
message.success(state.projectInfo.projectId ? "编辑成功" : "创建成功");
router.push({
path: "/taskpage",
query: { projectId: res.data.data.id },
query: {projectId: res.data.data},
});
});
};
@@ -549,10 +548,10 @@ export default {
const clickOk = (e) => {
state.clickNum = state.clickNum + 1
if(state.clickNum==2) {
if (state.clickNum == 2) {
state.clickNum = 0
state.changeCondition = false;
}else{
} else {
state.changeCondition = true;
}
console.log(e)
@@ -560,18 +559,16 @@ export default {
const panelOpen = (e) => {
console.log(e)
if(!e){
if (!e) {
state.clickNum = 0
state.changeCondition = false;
}
}
const disabledDate1 = (current) => {
// return current && current < dayjs().startOf("day");
console.log(state.projectInfo.rangeTime1)
if(state.changeCondition){
return current && current < moment(state.projectInfo.rangeTime[0]).endOf("YYYY-MM-DD HH:mm:ss");
}else{
if (state.changeCondition) {
return current && current < moment(state.projectInfo.rangeTime[0]).endOf("YYYY-MM-DD HH:mm:ss");
} else {
return current && current > moment(state.projectInfo.rangeTime1[0]).endOf("YYYY-MM-DD HH:mm:ss")
}
};
@@ -603,6 +600,7 @@ export default {
.ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner::after {
border-color: #fff !important;
}
.ant-checkbox-disabled .ant-checkbox-inner {
background-color: #1890ff !important;
}

View File

@@ -942,7 +942,7 @@
</template>
<script>
import { reactive, toRefs, ref, watch } from "vue";
import { message, Modal } from "ant-design-vue";
import { message } from "ant-design-vue";
import { useRouter } from "vue-router";
import ProjOwnerShip from "../../components/drawers/ProjectOwn";
import ProjPowerList from "../../components/drawers/ProjPowerList";
@@ -1326,19 +1326,9 @@ export default {
};
//确认存为模版
const templateProject = () => {
let obj = {
projectId: state.templateProjectId,
type: 1,
};
api.handleProject(obj).then((res) => {
state.startModal = false;
if (res.data.code === 200) {
message.destroy();
message.success("模版保存成功");
return;
}
Modal.error({ title: res.data.msg });
});
state.startModal = false
message.success("模版保存成功");
api.handleProject({projectId: state.templateProjectId, type: 1});
};
//关闭存为模版弹窗
const closeStartModal = () => {

View File

@@ -5,8 +5,8 @@
<div class="leftmain">
<div class="tit">
阶段
<img src="../../assets/images/projectadd/right.png" style="margin-left: 10px; cursor: pointer"
@click="showCancel"/>
<img src="../../assets/images/projectadd/right.png" style="margin-left: 10px; cursor: pointer"
@click="showCancel" v-show="projectInfo.stageList[0].id != '0'" />
</div>
<div class="btn btn3" @click="showModal" style="margin-left: 19px">
<div class="search"></div>
@@ -14,8 +14,8 @@
</div>
<div class="maincon" style="background-color: #fff">
<Draggable v-model="projectInfo.stageList" chosenClass="chosen" ghostClass="ghost" forceFallback="true"
group="stage" animation="500">
<template #item="{ element,index }">
group="stage" animation="500" v-if="JSON.stringify(projectInfo.stageList[0].taskDraftDtoList[0]) != '{}'">
<template #item="{ element,index }" >
<div class="items" v-if="element.id !=='0' && !element.deleted"
:class="activeIndex === index ? 'active' : ''"
@click="changeStageIndex(index)">
@@ -498,7 +498,7 @@
<div class="header">
<div class="icon"></div>
<span>提示</span>
<div class="close_exit" @click="closeDeleteStage"></div>
<!-- <div class="close_exit" @click="closeDeleteStage"></div> -->
</div>
<div class="body">
<span style="width:320px;display:flex;justify-content:center;align-items:center;">{{
@@ -659,11 +659,15 @@ const closeDeleteStage = () => {
};
//删除阶段
const deleteStage = () => {
console.log(12345);
if (projectInfo.value.stageList.length === 1) {
projectInfo.value.stageList = [{id: '0', stageId: '0', name: '', remark: '', taskDraftDtoList: []}];
deleteStageModal.value = false;
return
}
projectInfo.value.stageList.splice(activeIndex.value, 1)
projectInfo.value.stageList.splice(activeIndex.value, 1);
activeIndex.value = activeIndex.value-1;
deleteStageModal.value = false;
};
onMounted(() => {
document.getElementsByTagName("main")[0].style.background = "rgb(245, 247, 250,1)";

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,7 @@
height: 40px;
border-radius: 8px;
margin-right: 14px;
" placeholder="请输入模板名称" />
" placeholder="请输入模板名称"/>
</div>
<!--
<div class="inpbox1">
@@ -40,12 +40,12 @@
</div>
<div class="tmpl_body">
<div class="tableBox">
<a-table :columns="columns1" :data-source="tableData1"
expandRowByClick="true" @expand="expandTable" :pagination="false"/>
<div class="tableBox" style="display:flex;justify-content:center;padding:20px;">
<div class="pa">
<a-pagination
<a-table :columns="columns1" :data-source="tableData1" :loading="loading"
expandRowByClick="true" @expand="expandTable" :pagination="false"/>
<div class="tableBox" style="display:flex;justify-content:center;padding:20px;">
<div class="pa">
<a-pagination
v-if="tableDataTotal > 10"
:showSizeChanger="false"
showQuickJumper="true"
@@ -55,18 +55,18 @@
:total="tableDataTotal"
class="pagination"
@change="changePagination"
/>
</div>
/>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { reactive, defineComponent, toRefs, onMounted } from "vue";
import { message } from "ant-design-vue";
import { useRouter } from "vue-router";
import {reactive, defineComponent, toRefs, onMounted} from "vue";
import {message} from "ant-design-vue";
import {useRouter} from "vue-router";
import * as api from "@/api/indexTemplate"
const columns1 = [
@@ -92,19 +92,19 @@ const columns1 = [
key: "creator",
align: "center",
},
{
title: "创建时间",
width: "20%",
dataIndex: "createTime",
key: "createTime",
align: "center",
},
//{
// title: "发布时间",
// width: "15%",
// dataIndex: "publishTime",
// key: "publishTime",
// align: "center",
{
title: "创建时间",
width: "20%",
dataIndex: "createTime",
key: "createTime",
align: "center",
},
//{
// title: "发布时间",
// width: "15%",
// dataIndex: "publishTime",
// key: "publishTime",
// align: "center",
// },
{
title: "操作",
@@ -122,15 +122,14 @@ export default defineComponent({
const router = useRouter();
const state = reactive({
value1: null,
time:null,
loading: false,
time: null,
currentPage: 1,
pageSize: 10,
total:0,
tableDataTotal:0,
total: 0,
tableDataTotal: 0,
tableData1: [
{
}
{}
],
});
const getTableDate1 = () => {
@@ -139,51 +138,63 @@ export default defineComponent({
{
//单层项目
value.operation = (
<div class="operation" style="justify-content: flex-end; margin-right:65px;">
<div class="nSelect">
{value.status === "已发布" ? (
<div class="nselect">
<div class="ops2">
<div class="jc" onClick={() => {toLibraryAdd(value.projectTemplateId)}}>
查看{" "}
<span style="color:#E9E9E9;margin-left:15px;">|</span>
<div class="operation" style="justify-content: flex-end; margin-right:65px;">
<div class="nSelect">
{value.status === "已发布" ? (
<div class="nselect">
<div class="ops2">
<div class="jc" onClick={() => {
toLibraryAdd(value.projectTemplateId)
}}>
查看{" "}
<span style="color:#E9E9E9;margin-left:15px;">|</span>
</div>
</div>
<div class="ops3">
<div class="jc"
onClick={() => {
templateHadler({"projectTemplateId": value.projectTemplateId, "type": 0})
}}
>撤回
</div>
</div>
</div>
<div class="ops3">
<div class="jc"
onClick={() => { templateHadler({ "projectTemplateId": value.projectTemplateId, "type": 0 }) }}
>撤回</div>
</div>
</div>
) : (
<div></div>
)}
{value.status === "未发布" ? (
<div class="nselect">
<div class="ops1">
<div class="jc"
onClick={() => { templateHadler({ "projectTemplateId": value.projectTemplateId, "type": 1 }) }}>
发布
<span style="color:#E9E9E9;margin-left:15px;">|</span>
</div>
</div>
<div class="ops2">
<div class="jc" onClick={() => {toLibraryAdd(value.projectTemplateId)}}>
查看
<span style="color:#E9E9E9;margin-left:15px;">|</span>
) : (
<div></div>
)}
{value.status === "未发布" ? (
<div class="nselect">
<div class="ops1">
<div class="jc"
onClick={() => {
templateHadler({"projectTemplateId": value.projectTemplateId, "type": 1})
}}>
发布
<span style="color:#E9E9E9;margin-left:15px;">|</span>
</div>
</div>
</div>
<div class="ops3">
<div class="jc"
onClick={() => { templateHadler({ "projectTemplateId": value.projectTemplateId, "type": -1 }) }}
>删除</div>
</div>
</div>
) : (
<div></div>
)}
<div class="ops2">
<div class="jc" onClick={() => {
toLibraryAdd(value.projectTemplateId)
}}>
查看
<span style="color:#E9E9E9;margin-left:15px;">|</span>
</div>
</div>
<div class="ops3">
<div class="jc"
onClick={() => {
templateHadler({"projectTemplateId": value.projectTemplateId, "type": -1})
}}
>删除
</div>
</div>
</div>
) : (
<div></div>
)}
</div>
</div>
</div>
);
}
});
@@ -193,7 +204,10 @@ export default defineComponent({
current: state.currentPage,
total: state.total,
defaultPageSize: state.pageSize,
onChange: (id) => { pagination.current = id; getLibraryList() },
onChange: (id) => {
pagination.current = id;
getLibraryList()
},
})
getTableDate1();
@@ -201,40 +215,42 @@ export default defineComponent({
getLibraryList();
})
// 翻页
const changePagination = (page) => {
// 翻页
const changePagination = (page) => {
pagination.current = page;
getLibraryList();
};
// 获取模板列表
const getLibraryList = () => {
state.loading = true
let date = Math.ceil(new Date(state.time).getTime() / 1000);
let obj = {
// "create_time": state.time,
"createTime" : date==0?null:date,
// "create_time": state.time,
"createTime": date == 0 ? null : date,
"name": state.value1,
"pageNo": pagination.current,
"pageSize": state.pageSize
}
api.templateList(obj).then((res) => {
state.loading = false
state.tableData1 = []
state.tableDataTotal = res.data.data.total;
console.log(res);
let resData = res.data.data.rows;
state.total =res.data.data.total;
state.total = res.data.data.total;
if (resData.length) {
for (let i in resData) {
state.tableData1.push({
id : i + 1,
projectTemplateId:resData[i].id,
status:resData[i].status ? "已发布" : "未发布",
name:resData[i].name,
creator:resData[i].createName,
publishTime:resData[i].publishTime,
createTime:resData[i].createTime,
operation:"operation"
id: i + 1,
projectTemplateId: resData[i].id,
status: resData[i].status ? "已发布" : "未发布",
name: resData[i].name,
creator: resData[i].createName,
publishTime: resData[i].publishTime,
createTime: resData[i].createTime,
operation: "operation"
})
}
getTableDate1()
@@ -245,15 +261,11 @@ export default defineComponent({
message.error(`获取模板列表失败` + error)
});
};
const templateHadler = (obj) => {
api.handleTemplates(obj).then((res) => {
if (res.data.success) {
message.success(`模板${obj.type == 1 ? '发布' : obj.type == 0 ? '撤回' : '删除'}成功`)
getLibraryList();
}
}).catch((error) => {
message.error(`模板${obj.type == 1 ? '发布' : obj.type == 0 ? '撤回' : '删除'}失败` + error)
})
const templateHadler = async (obj) => {
state.loading = true
message.success(`模板${obj.type == 1 ? '发布' : obj.type == 0 ? '撤回' : '删除'}成功`)
await api.handleTemplates(obj)
getLibraryList();
}
const searchLevel = () => {
getLibraryList();
@@ -272,7 +284,7 @@ export default defineComponent({
};
const toLibraryAdd = (id) => {
router.push("/libraryAdd");
localStorage.setItem("projectTemplateId",id);
localStorage.setItem("projectTemplateId", id);
}
return {
@@ -430,14 +442,15 @@ export default defineComponent({
}
}
}
.tableBox {
margin: 20px 38px 30px;
.ant-table-thead > tr > th {
background-color: #eff4fc;
.tableBox {
margin: 20px 38px 30px;
.ant-table-thead > tr > th {
background-color: #eff4fc;
}
}
}
}
}
</style>