feat:合并

This commit is contained in:
songwc
2022-11-04 09:24:06 +08:00
8 changed files with 460 additions and 122 deletions

View File

@@ -4,8 +4,9 @@
v-model="openList"
chosenClass="chosen"
forceFallback="true"
group="people"
animation="1000"
ghostClass="ghost"
group="openPage"
animation="500"
@start="onStart"
@end="onEnd"
:list="openList"
@@ -121,5 +122,13 @@ export default {
.close:hover {
background: rgba(220, 220, 220, 1);
}
.chosen {
// background-color: pink;
}
.ghost {
// background-color: red;
opacity: 0;
}
}
</style>

View File

@@ -360,6 +360,7 @@ export default {
})
.then((res) => {
console.log("调用项目添加接口后", res.data);
ctx.emit("changeData", false);
//重新获取任务列表
// apiTask.getTask({ projectId: 28 });
// router.push("/taskadd");
@@ -408,6 +409,11 @@ export default {
.contentMain {
display: flex;
justify-content: space-between;
.ant-input {
height: 88px;
width: 384px;
border-radius: 8px;
}
.ant-picker {
border-radius: 8px;
}

View File

@@ -143,7 +143,6 @@ export default {
state.textV1 = "";
message.success("创建成功");
ctx.emit("update:adddiscussVisible", false);
//ctx.emit("changeData","传的参数");
//console.log("discussName",obj.discussName);
apiTask
.addTask({
@@ -158,6 +157,7 @@ export default {
})
.then((res) => {
console.log("调用项目添加接口后", res.data);
ctx.emit("changeData",false);
//重新获取任务列表
// apiTask.getTask({ projectId: 28 });
// router.push("/taskadd");

View File

@@ -248,8 +248,14 @@ export default {
projectTaskId: 0,
stageId: 3,
type: 10,
},
);
})
.then((res) => {
console.log("调用项目添加接口后", res.data);
ctx.emit("changeData",false);
})
.catch((err) => {
console.log(err);
});
})
.catch((err) => {
console.log("创建失败", err);

View File

@@ -215,6 +215,13 @@ export default {
projectTaskId: 0,
stageId: 3,
type: 11,
})
.then((res) => {
console.log("调用项目添加接口后", res.data);
ctx.emit("changeData",false);
})
.catch((err) => {
console.log(err);
});
})
.catch((err) => {

View File

@@ -238,7 +238,10 @@
<div class="text">测评</div>
<!-- 添加测评侧弹窗 -->
<div>
<add-eval v-model:addevalVisible="addevalvisible" v-model:edit="edit" />
<add-eval
v-model:addevalVisible="addevalvisible"
v-model:edit="edit"
/>
</div>
<!-- 添加测评侧弹窗 -->
</div>
@@ -770,7 +773,7 @@ export default {
value1: "",
value2: "",
selectedRowKeys: [],
edit:false, //是否点击编辑
edit: false, //是否点击编辑
gqxy_hs: true,
isactive: 0,
projectChecked: null, //项目单选框
@@ -865,6 +868,7 @@ export default {
};
});
};
const getDetail = (index) => {
GetRouterDetail(92)
.then((res) => {
@@ -1009,7 +1013,7 @@ export default {
<div class="opacation">
<span
style="color:#4EA6FF;margin-right:25px;cursor:pointer"
onClick={()=>{
onClick={() => {
state.edit = true;
state.addevalvisible = true;
}}

View File

@@ -1355,10 +1355,13 @@ export default {
// options={state.projectNameList}
dropdownClassName="tabledropdown"
>
{/*
<a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link>
</a-select-option>
{/* <a-select-option value="存为模版" label="存为模版">
<a-select-option value="存为模版" label="存为模版">
<div
onClick={() => {
showStartModal();
@@ -1367,6 +1370,24 @@ export default {
存为模版
</div>
</a-select-option> */}
<a-select-option value="复制" label="复制">
<div
onClick={() => {
showCopyModal();
}}
>
复制
</div>
</a-select-option>
<a-select-option value="删除" label="删除">
<div
onClick={() => {
showDeleteModal();
}}
>
删除
</div>
</a-select-option>
</a-select>
</div>
</div>
@@ -1422,13 +1443,46 @@ export default {
</div>
<span
class="operation3"
onClick={() => {
showCopyModal();
}}
// onClick={() => {
// showCopyModal();
// }}
>
复制
</span>
<span class="more"></span>
<div class="tableSelect">
<a-select
style="width: 50px"
value="更多"
// options={state.projectNameList}
dropdownClassName="tabledropdown"
>
{/*
<a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link>
</a-select-option>
<a-select-option value="存为模版" label="存为模版">
<div
onClick={() => {
showStartModal();
}}
>
存为模版
</div>
</a-select-option> */}
<a-select-option value="复制" label="复制">
<div
onClick={() => {
showCopyModal();
}}
>
复制
</div>
</a-select-option>
</a-select>
</div>
</div>
) : value.record.status === -1 ? (
<div class="operation">
@@ -1482,20 +1536,53 @@ export default {
</div>
<span
class="operation3"
onClick={() => {
showCopyModal();
}}
// onClick={() => {
// showCopyModal();
// }}
>
复制
</span>
<span
class="more"
onClick={() => {
showDeleteModal();
}}
>
删除
</span>
<div class="tableSelect">
<a-select
style="width: 50px"
value="更多"
// options={state.projectNameList}
dropdownClassName="tabledropdown"
>
{/*
<a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link>
</a-select-option>
<a-select-option value="存为模版" label="存为模版">
<div
onClick={() => {
showStartModal();
}}
>
存为模版
</div>
</a-select-option> */}
<a-select-option value="复制" label="复制">
<div
onClick={() => {
showCopyModal();
}}
>
复制
</div>
</a-select-option>
<a-select-option value="删除" label="删除">
<div
onClick={() => {
showDeleteModal();
}}
>
删除
</div>
</a-select-option>
</a-select>
</div>
</div>
) : (
<div></div>
@@ -1603,7 +1690,7 @@ export default {
</a-select>
</div>
</div>
) : value.record.status === 1 ? (
) : value.record.status === 1 ? (
<div class="operation">
<span class="operation1">查看</span>
<div class="tableSelect">
@@ -1657,14 +1744,26 @@ export default {
<router-link to="/classadd" class="operation3">
创建班级
</router-link>
<span
class="more"
onClick={() => {
showCopyModal();
}}
>
复制
</span>
<div class="tableSelect">
<a-select
style="width: 50px"
value="更多"
// options={state.projectNameList}
dropdownClassName="tabledropdown"
>
<a-select-option value="复制" label="复制">
<div
onClick={() => {
showCopyModal();
}}
>
复制
</div>
</a-select-option>
</a-select>
</div>
</div>
) : value.record.status === -1 ? (
<div class="operation">
@@ -1718,20 +1817,38 @@ export default {
</div>
<span
class="operation3"
onClick={() => {
showCopyModal();
}}
>
复制
</span>
<span
class="more"
onClick={() => {
showDeleteModal();
}}
>
删除
</span>
<div class="tableSelect">
<a-select
style="width: 50px"
value="更多"
// options={state.projectNameList}
dropdownClassName="tabledropdown"
>
<a-select-option value="复制" label="复制">
<div
onClick={() => {
showCopyModal();
}}
>
复制
</div>
</a-select-option>
<a-select-option value="删除" label="删除">
<div
onClick={() => {
showDeleteModal();
}}
>
删除
</div>
</a-select-option>
</a-select>
</div>
</div>
) : (
<div></div>
@@ -1827,11 +1944,8 @@ export default {
) : (
<span
class="operation3"
onClick={() => {
showCopyModal();
}}
>
复制
</span>
)}
<div class="tableSelect">
@@ -1873,7 +1987,7 @@ export default {
<router-link to="/taskpage">基础信息</router-link>
</a-select-option>
</a-select>
) : value.record.status === "进行中" ? (
) : value.record.status ===1|| value.record.status == 1 && Number(value.record.beginTime) > Math.ceil(new Date().getTime / 1000) ? (
<a-select
style="width: 50px"
value="更多"
@@ -1881,6 +1995,15 @@ export default {
dropdownClassName="tabledropdown"
>
<a-select-option value="存为模版" label="存为模版">
<a-select-option value="复制" label="复制">
<div
onClick={() => {
showCopyModal();
}}
>
复制
</div>
</a-select-option>
<div
onClick={() => {
showStartModal();
@@ -1927,6 +2050,15 @@ export default {
存为模版
</div>
</a-select-option>
<a-select-option value="复制" label="复制">
<div
onClick={() => {
showCopyModal();
}}
>
复制
</div>
</a-select-option>
<a-select-option value="删除" label="删除">
<div
onClick={() => {
@@ -1940,44 +2072,6 @@ export default {
<router-link to="/taskpage">基础信息</router-link>
</a-select-option>
</a-select>
) : value.record.status === "未开始" ? (
<a-select
style="width: 50px"
value="更多"
// options={state.projectNameList}
dropdownClassName="tabledropdown"
>
<a-select-option value="存为模版" label="存为模版">
<div
onClick={() => {
showStartModal();
}}
>
存为模版
</div>
</a-select-option>
<a-select-option value="撤回" label="撤回">
<div
onClick={() => {
// showDeleteModal();
}}
>
撤回
</div>
</a-select-option>
<a-select-option value="结束" label="结束">
<div
onClick={() => {
// showDeleteModal();
}}
>
结束
</div>
</a-select-option>
<a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link>
</a-select-option>
</a-select>
) : (
<div></div>
)}

View File

@@ -15,25 +15,39 @@
<div class="btnText">添加阶段</div>
</div>
<div class="maincon" style="background-color: #fff">
<div
class="item"
:class="isactive == index && isActive == true ? 'bgcactive' : ''"
v-for="(item, index) in level"
@click="changebgc(index)"
:key="item.id"
<draggable
v-model="level"
chosenClass="chosen"
ghostClass="ghost"
forceFallback="true"
group="stage"
animation="500"
@start="onStart"
@end="onEnd"
:list="level"
>
<div class="itemle">
<div class="tit">{{ item.tit }}</div>
<div class="name">{{ item.name }}</div>
</div>
<div class="itemri">
<img src="../../assets/images/leveladd/z1.png" />
<img
style="margin-top: 40px"
src="../../assets/images/leveladd/z2.png"
/>
</div>
</div>
<template #item="{ element }">
<div
class="item"
:class="
isactive == index && isActive == true ? 'bgcactive' : ''
"
@click="changebgc(index)"
>
<div class="itemle">
<div class="tit">{{ element.tit }}</div>
<div class="name">{{ element.name }}</div>
</div>
<div class="itemri">
<img src="../../assets/images/leveladd/z1.png" />
<img
style="margin-top: 40px"
src="../../assets/images/leveladd/z2.png"
/>
</div>
</div>
</template>
</draggable>
</div>
</div>
</div>
@@ -207,7 +221,10 @@
</div>
<!-- 添加活动侧弹窗 -->
<div>
<add-active v-model:addactiveVisible="addactivevisible" />
<add-active
v-model:addactiveVisible="addactivevisible"
@changeData="updateTableData"
/>
</div>
<!-- 添加活动侧弹窗 -->
<div class="lin"></div>
@@ -221,7 +238,10 @@
</div>
<!-- 添加测评侧弹窗 -->
<div>
<add-eval v-model:addevalVisible="addevalvisible" />
<add-eval
v-model:addevalVisible="addevalvisible"
@changeData="updateTableData"
/>
</div>
<!-- 添加测评侧弹窗 -->
<div class="lin"></div>
@@ -235,7 +255,10 @@
</div>
<!-- 添加评估侧弹窗 -->
<div>
<add-invist v-model:addinvistVisible="addinvistvisible" />
<add-invist
v-model:addinvistVisible="addinvistvisible"
@changeData="updateTableData"
/>
</div>
<!-- 添加评估侧弹窗 -->
<div class="lin"></div>
@@ -248,7 +271,10 @@
<div class="text">投票</div>
<!-- 添加投票侧弹窗 -->
<div>
<add-vote v-model:addvoteVisible="addvotevisible" />
<add-vote
v-model:addvoteVisible="addvotevisible"
@changeData="updateTableData"
/>
</div>
<!-- 添加投票侧弹窗 -->
</div>
@@ -297,8 +323,155 @@
<span class="yi"></span>
</div>
</div> -->
<div class="tableBox">
<a-table
<div class="tableBox" style="border: 1px solid #f2f6fc">
<div
style="
height: 50px;
display: flex;
justify-content: space-between;
align-items: center;
background-color: #eff4fc;
font-size: 14px;
font-weight: 400;
color: #999ba3;
line-height: 36px;
border-bottom: 1px solid #f2f6fc;
"
>
<div
style="
width: 87px;
text-align: center;
display: flex;
margin-left: 46px;
"
>
<a-checkbox :checked="selectRow.length !== 0 ? true : false">
</a-checkbox>
<div style="margin-top: 2px; margin-left: 8px">类型</div>
</div>
<div style="width: 120px; text-align: center">任务名称</div>
<div style="width: 120px; text-align: center">必修/选修</div>
<div style="width: 87px; text-align: center">时长</div>
<div
style="width: 120px; text-align: center; margin-right: 20px"
>
操作
</div>
</div>
<draggable
v-model="tableData"
chosenClass="chosen"
ghostClass="ghost"
forceFallback="true"
group="task"
animation="500"
@start="onStart"
@end="onEnd"
:list="tableData"
>
<template #item="{ element }">
<div
style="
height: 50px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #f2f6fc;
font-size: 14px;
font-weight: 400;
color: #4f5156;
line-height: 36px;
"
class="tableRow"
>
<div
style="
width: 87px;
text-align: center;
margin-left: 46px;
position: relative;
"
>
<div class="racona">
<div
class="img"
style="
cursor: pointer;
margin-top: 2px;
margin-right: 9px;
position: absolute;
left: -25px;
"
></div>
<a-checkbox
:id="element.id"
v-model:checked="checked"
@change="changeRow"
>
</a-checkbox>
<div style="margin-top: 2px; margin-left: 8px">
{{ element.lei }}
</div>
</div>
</div>
<div style="width: 120px; text-align: center">
{{ element.creater }}
</div>
<div style="width: 120px; text-align: center">
<div class="opat">
<div class="opacationt clearfix">
<a-switch
style="margin-left: -50px; margin-top: 3px"
:checked="element.checked1"
size="small"
active-color="red"
/>
<div class="showt clearfix">
<div
class="bi"
:style="{
'z-index': element.checked1 ? 999 : 998,
}"
>
必修
</div>
<div class="xuan">选修</div>
</div>
</div>
</div>
</div>
<div style="width: 87px; text-align: center">
{{ element.cretime }}分钟
</div>
<div
style="
width: 120px;
text-align: center;
margin-right: 20px;
"
>
<div class="opa">
<div class="opacation">
<span
style="
color: #4ea6ff;
margin-right: 25px;
cursor: pointer;
"
>
编辑
</span>
<span style="color: #4ea6ff; cursor: pointer">
删除
</span>
</div>
</div>
</div>
</div>
</template>
</draggable>
<!-- <a-table
style="border: 1px solid #f2f6fe"
:columns="tableDataFunc()"
:data-source="tableData"
@@ -311,7 +484,7 @@
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
/>
/> -->
<!-- <div class="pa">
<a-pagination
@@ -561,6 +734,7 @@ import * as apieval from "../../api/indexEval";
import * as apiinvist from "../../api/indexInvist";
import * as apivote from "../../api/indexVote";
import * as apistage from "../../api/indexStage";
import draggable from "vuedraggable";
const drawercolumns = [
{
title: "项目名称",
@@ -602,6 +776,7 @@ const drawercolumns = [
export default {
name: "TaskAdd",
components: {
draggable,
AddOnline,
EditOnline,
AddFaceteach,
@@ -795,6 +970,7 @@ export default {
deleteDiscussID: null, //删除讨论id
deleteActivityID: null, //删除活动id
deleteID: "",
selectRow: [], //选择行
});
const selectProjectName = (value, index) => {
console.log("value", value, index);
@@ -852,6 +1028,8 @@ export default {
? "外链"
: value.type == 8
? "讨论"
: value.type == 9
? "活动"
: value.type == 10
? "测评"
: value.type == 11
@@ -1021,7 +1199,7 @@ export default {
//数据变化
const updateTableData = (data) => {
console.log("添加数据", data);
getTask();
getTask(data);
};
//删除直播
@@ -1488,6 +1666,22 @@ export default {
state.isActive = !state.isActive;
};
//选择表格
const changeRow = (e) => {
console.log("选择行", e);
let arr = state.selectRow;
if (e.target.checked) {
arr.push(e.target.id);
} else {
arr.map((value, index) => {
if (value == e.target.id) {
arr.splice(index, 1);
}
});
}
state.selectRow = arr;
console.log("state.selectRow", state.selectRow);
};
return {
...toRefs(state),
selectProjectName,
@@ -1538,6 +1732,7 @@ export default {
deleteTask,
editStage,
updateTableData,
changeRow,
};
},
};
@@ -1928,6 +2123,13 @@ export default {
display: flex;
flex-direction: column;
align-items: center; // background-color: #bfa;
.chosen {
// background-color: pink;
}
.ghost {
// background-color: red;
opacity: 0 !important;
}
.item {
width: 171px;
height: 83px;
@@ -2316,6 +2518,20 @@ export default {
.tableBox {
padding-bottom: 20px;
margin-top: 20px;
.chosen {
background-color: #f2f6fc;
opacity: 1;
}
.ghost {
// background-color: red;
opacity: 0;
}
.tableRow:hover {
background-color: #f2f6fc;
}
// .tableRow: {
// background-color: #f2f6fc;
// }
.classify {
margin-left: 10px !important;
padding-left: 9px !important;
@@ -2407,19 +2623,15 @@ export default {
}
}
.racona {
// background-color: #bfa;
display: flex;
align-items: center;
// justify-content: center;
height: 100%;
.img {
// margin-left: -40px;
// margin-top: -2px;
width: 17px;
height: 14px;
background-image: url("../../assets/images/leveladd/z1.png");
position: absolute;
left: -40px;
// position: absolute;
// left: -40px;
}
.ch {
margin-left: 10px;