This commit is contained in:
songwc
2022-11-14 18:24:33 +08:00
18 changed files with 5827 additions and 1904 deletions

View File

@@ -70,6 +70,9 @@ export const getRouterDetail = (routerId) => http.get('/admin/router/detail', {
});
//添加学员
export const addStudent = (obj) => http.post('/admin/router/addStudent', obj);
//删除学员
export const delStudent = (obj) => http.post('/admin/router/deleteStudent', obj);
//项目基础信息-----------------------------------

View File

@@ -65,7 +65,7 @@
</button>
<div :style="{ display: creVote ? 'block' : 'none' }">
<div class="fileTigan">
<span style="color: #388be1">{{voteStemName}}</span>
<span style="color: #388be1">{{ballotName}}</span>
<div class="delBox" @click="dleVoteStem()"></div>
</div>
</div>
@@ -76,6 +76,7 @@
v-model:crevoteVisible="crevotevisible"
@getData="getStemId"
v-model:voteStemId="voteStemId"
v-model:editStem="editStem"
/>
</div>
<!-- 创建投票侧弹窗 -->
@@ -122,7 +123,7 @@
</div>
<div class="main_btns">
<button class="btn1">取消</button>
<button class="btn2" @click="createVoteText()">确定</button>
<button class="btn2" @click="creoredi()">确定</button>
</div>
</div>
</a-drawer>
@@ -184,6 +185,14 @@ export default {
type: Number,
default: null,
},
voteId: {
type: Number,
default: null,
},
ballotId: {
type: Number,
default: null,
}
},
setup(props, ctx) {
const state = reactive({
@@ -199,34 +208,52 @@ export default {
voteStemId: null,
voteId:"",
voteStemName:"",
ballotName: "",
editStem: false, //编辑状态
ballotId: "", //题干id
optionId: "", //删除修改选项id
});
const closeDrawer = () => {
state.inputV1 = "",
state.textV1 = "",
state.startTimes = "",
state.time = undefined,
state.endTimes = "",
state.basevote = "",
ctx.emit("update:addvoteVisible", false);
ctx.emit("update:edit", false);
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
// if (props.edit == true) {
// queryVoteText()
// }
};
const showDrawerCreVote = () => {
state.crevotevisible = true;
if (state.creVote == true) {
state.editStem = true
}
};
const getStemId = (data) => {
state.ballotName = data.ballotName;
state.voteStemName = data.voteStemName;
state.voteStemId = Number(data.voteStemId);
state.ballotId = Number(data.ballotId)
state.creVote = data.creVote;
console.log('state.voteStemId', state.voteStemId);
console.log('state.voteStemId', state.creVote);
}
//暂时没用 之前给子用传参来着
const changeVData = (data) => {
console.log("111", data);
state.creVote = data.creVote;
state.ascriptionId = data.ascriptionId;
state.voteStemId = data.voteStemId;
state.voteStemName = data.voteStemName;
console.log("222", state.creVote);
console.log("333", state.ascriptionId);
};
// const changeVData = (data) => {
// console.log("111", data);
// state.creVote = data.creVote;
// state.ascriptionId = data.ascriptionId;
// state.voteStemId = data.voteStemId;
// state.voteStemName = data.voteStemName;
// console.log("222", state.creVote);
// console.log("333", state.ascriptionId);
// };
const delBox = () => {
state.creVote = false;
};
@@ -247,6 +274,16 @@ export default {
delBox()
})
}
//新建还是编辑方法
const creoredi = () => {
if (props.eidt == false) {
createVoteText()
}
else {
changeVoteText()
}
}
//创建投票信息
const createVoteText = () => {
if (!state.inputV1) {
@@ -271,25 +308,34 @@ export default {
let obj = {
ascriptionId: state.ascriptionId,
ballotId: state.ballotId,
baseVote: state.basevote,
createTime: "",
createUser: 0,
updateTime: "",
updateUser: 0,
voteEndTime: state.endTimes,
voteExplain: state.textV1,
voteFlag: "",
voteId: 0,
voteName: state.inputV1,
voteStartTime: state.startTimes,
voteTag: "",
voteTag: ""
};
api
.createVote(obj)
.then((res) => {
console.log("创建成功123", res);
message.success("创建成功");
ctx.emit("getData", res.data.data.voteId);
let changeVoteId = {
voteId: res.data.data.voteId,
ballotId: state.ballotId,
}
ctx.emit("getData", changeVoteId);
closeDrawer();
if (props.learn == 0)
//添加到项目任务列表
apitaskadd
.addTask({
courseId: 0,
@@ -330,18 +376,71 @@ export default {
console.log("创建失败", err);
});
};
//根据投票id获取投票信息
// const queryVoteText = ()=>{
// let objqurvt = {
// voteStemId:state.voteStemId
// //没有接口 个人认为应该是这个id
// }
// api
// //目前没接口 大概写的
// .queryVoteText(objqurvt)
// .then((res)=>{
// console.log('获取投票信息成功',res);
// state.inputV1 = res.data.data.voteName
// state.endTimes = res.data.data.voteEndTime
// state.startTimes = res.data.data.voteStartTime
// state.textV1 = res.data.data.voteExplain
// state.baseVote = res.data.data.baseVote
// state.ascriptionId = res.data.data.ascriptionId
// state.ballotId = res.data.data.ballotId
// })
// .catch((err)=>{
// console.log('获取投票信息失败',err);
// })
// }
//修改投票信息接口
const changeVoteText = () => {
let objcvt = {
ballotId: state.ballotId,
baseVote: state.basevote,
createTime: "",
createUser: 0,
updateTime: "",
updateUser: 0,
voteEndTime: state.endTimes,
voteExplain: state.textV1,
voteFlag: "",
voteId: state.voteId,
voteName: state.inputV1,
voteStartTime: state.startTimes,
voteTag: ""
}
api
.editVote(objcvt)
.then((res) => {
console.log('修改投票信息成功', res);
})
.catch((err) => {
console.log('修改投票信息失败', err);
})
}
return {
...toRefs(state),
showDrawerCreVote,
afterVisibleChange,
closeDrawer,
getStemId,
changeVData,
// changeVData,
rowSelection,
options1,
dleVoteStem,
creoredi,
createVoteText,
changeVoteText,
delBox,
// queryVoteText,
updateTableData,
};
},

View File

@@ -9,7 +9,8 @@
>
<div class="drawerMain">
<div class="header">
<div class="headerTitle">创建投票</div>
<div v-if="editStem" class="headerTitle">编辑投票</div>
<div v-else class="headerTitle">创建投票</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@@ -106,7 +107,7 @@
</div>
<div class="main_btns">
<button class="btn1">取消</button>
<button class="btn2" @click="createQueTit">确定</button>
<button class="btn2" @click="creoredi()">确定</button>
</div>
</div>
</a-drawer>
@@ -122,6 +123,10 @@ export default {
type: Boolean,
default: false,
},
editStem: {
type: Boolean,
default: false,
},
},
setup(props, ctx) {
const state = reactive({
@@ -178,12 +183,40 @@ export default {
value.splice(value[index],1)
}
const closeDrawer = () => {
state.inputV1 ="",
state.questions=[
{
stemTit: "题干",
inputV: "",
options: [
{
title: "选项",
opvalue: "",
},
{
title: "选项",
opvalue: "",
},
],
},
],
ctx.emit("update:crevoteVisible", false);
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
if (props.editStem == true) {
queryStemText()
}
};
//创建题干还是编辑题干
const creoredi = () => {
if (props.eidtStem == false) {
createQueTit()
}
else {
changeStemText()
}
}
//创建题干接口
const createQueTit = () => {
if (!state.inputV1) {
@@ -258,8 +291,10 @@ export default {
// console.log('state.questions[0].inputV',state.questions[0].inputV);
message.success("创建成功");
let objstem = {
ballotName: state.inputV1,
voteStemName: state.questions[0].inputV,
voteStemId: res.data.data.voteStemVoList[0].voteStemId,
ballotId: res.data.data.ballotId,
creVote: true,
};
ctx.emit("getData", objstem);
@@ -269,6 +304,82 @@ export default {
console.log(err);
});
};
//删除选项信息
const delOptText = () => {
let objdelopt = {
// optionId: optionId
}
api
.deleteVoteStemOption(objdelopt)
.then((res) => {
console.log('删除选项信息成功', res);
})
.catch((err) => {
console.log('删除选项信息失败', err);
});
}
//根据id获取题干信息
const queryStemText = () => {
let objqurst = {
stemId: 1,
ballotId: "",
}
api
.queryStemByStemId(objqurst)
.then((res) => {
console.log('获取题干信息成功', res);
state.inputV1 = res.data.data.voteName
})
.catch((err) => {
console.log('获取题干信息失败', err);
})
}
//编辑题干信息
const changeStemText = () => {
let objcst = {
"ballotId": 0,
"ballotName": "",
"createTime": "",
"createUser": 0,
"updateTime": "",
"updateUser": 0,
"voteStemDtoList": [
{
"ballotId": 0,
"createTime": "",
"createUser": 0,
"optionDetailList": [
{
"createTime": "",
"createUser": 0,
"optionFlag": "",
"optionId": 0,
"optionName": "",
"optionOrderNum": "",
"optionPictureAddress": "",
"stem": "",
"updateTime": "",
"updateUser": 0,
"voteStemId": 0
}
],
"orderNumber": "",
"updateTime": "",
"updateUser": 0,
"voteStemFlag": "",
"voteStemId": 0,
"voteStemName": ""
}
]
}
api.updateStemMessage(objcst)
.then((res) => {
console.log('修改题干信息成功', res);
})
.catch((err) => {
console.log('修改题干信息失败', err);
})
}
return {
...toRefs(state),
afterVisibleChange,
@@ -277,7 +388,9 @@ export default {
delQue,
addOpt,
delOpt,
creoredi,
createQueTit,
delOptText,
};
},
};

View File

@@ -362,7 +362,7 @@ export default {
let timer;
onMounted(() => {
setTimeout(() => {
getManageList();
// getManageList();
}, 1000);
timer = setInterval(() => {
state.open = false;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,7 @@
width="85%"
@after-visible-change="afterVisibleChange"
>
<div class="drawerMain">
<div class="drawerMain" id="ProjOwnership">
<div class="header">
<div class="headerTitle">归属权</div>
<img
@@ -121,7 +121,6 @@
</div>
</div>
</a-tab-pane>
</a-tabs>
</div>
</div>
@@ -140,11 +139,7 @@
<div class="line"></div>
<div class="tit">快速选人</div>
<div style="position: relative; min-height: 180px">
<div
style="height: 160px"
class="selectedsBox"
id="selectedsBox"
>
<div style="height: 160px" class="selectedsBox" id="selectedsBox">
<div class="selecteds" id="selecteds">
<!-- 遍历生成 -->
<div class="chose" v-for="item in choosepeople" :key="item.key">
@@ -152,14 +147,13 @@
<div class="ch" @click="deleteChoosePeople(item)"></div>
</div>
</div>
</div>
<div
class="chose"
style="
position: absolute;
right: 32px;
bottom: -9px;
display: flex;
justify-content: flex-end;
margin-right: 20px;
font-size: 12px;
font-weight: 500;
color: #409eff;
@@ -168,17 +162,20 @@
v-if="showMore"
@click="morePeopleShow"
>
<div>查看更多 <img
<div>
查看更多
<img
style="width: 10px; height: 12px; margin-top: -2px"
src="../../assets/images/projectadd/go.png"
/></div>
/>
</div>
</div>
<div
class="chose"
style="
position: absolute;
right: 32px;
bottom: -9px;
display: flex;
justify-content: flex-end;
margin-right: 20px;
font-size: 12px;
font-weight: 500;
color: #409eff;
@@ -187,13 +184,15 @@
v-if="showHidden"
@click="morePeopleHidden"
>
<div>收起 <img
<div>
收起
<img
style="width: 10px; height: 12px; margin-top: -2px"
src="../../assets/images/projectadd/pickUp.png"
/></div>
/>
</div>
</div>
</div>
</div>
</div>
<div class="btnn">
@@ -594,7 +593,6 @@ export default {
},
],
//快速选人-------------------------------------
valueSelectboe: null, //快速选人的选择组织
choosepeople: [], //总的数组
@@ -603,7 +601,6 @@ export default {
showHidden: false, //是否显示收回
selectedRowKeys: [], //表格选中的key
//快速选人-------------------------------------
});
const closeDrawer = () => {
state.activeKey = "1";
@@ -614,8 +611,6 @@ export default {
console.log("state", bool);
};
const getClientHeight = () => {
state.screenHeight = document.body.clientHeight;
};
@@ -670,31 +665,31 @@ export default {
//根据右侧快速选人高度,判断是否显示更多
const selectedsHeight = () => {
let resize = elementResizeDetectorMaker();
resize.listenTo(document.getElementById("selecteds"), function (ele) {
resize.listenTo(document.getElementById('Ownership').querySelector("#selecteds"), function (ele) {
console.log("ele", ele.offsetHeight);
if (ele.offsetHeight > 160 && !state.showHidden) {
state.showMore = true;
document.getElementById("selectedsBox").style.overflow = "hidden";
document.getElementById("selectedsBox").style.height = "160px";
document.getElementById('Ownership').querySelector("#selectedsBox").style.overflow = "hidden";
document.getElementById('Ownership').querySelector("#selectedsBox").style.height = "160px";
} else if (ele.offsetHeight < 160) {
state.showMore = false;
state.showHidden = false;
document.getElementById("selectedsBox").style.overflow = "hidden";
document.getElementById("selectedsBox").style.height = "160px";
document.getElementById('Ownership').querySelector("#selectedsBox").style.overflow = "hidden";
document.getElementById('Ownership').querySelector("#selectedsBox").style.height = "160px";
}
});
};
const morePeopleShow = () => {
state.showMore = false;
state.showHidden = true;
document.getElementById("selectedsBox").style.overflow = "";
document.getElementById("selectedsBox").style.height = "";
document.getElementById('Ownership').querySelector("#selectedsBox").style.overflow = "";
document.getElementById('Ownership').querySelector("#selectedsBox").style.height = "";
};
const morePeopleHidden = () => {
state.showMore = true;
state.showHidden = false;
document.getElementById("selectedsBox").style.overflow = "hidden";
document.getElementById("selectedsBox").style.height = "160px";
document.getElementById('Ownership').querySelector("#selectedsBox").style.overflow = "hidden";
document.getElementById('Ownership').querySelector("#selectedsBox").style.height = "160px";
};
// 结束 快速选人------------------------------------------------------------------
@@ -702,14 +697,13 @@ export default {
//全部清除
const deleteAll = () => {
//快速选人-------------------------------------
state.valueSelectboe=null //快速选人的选择组织
state.choosepeople=[] //总的数组
state.showMore=false //是否显示快速选人的查看更多
state.showHidden=false//是否显示收回
state.selectedRowKeys=[]//表格选中的key
state.valueSelectboe = null; //快速选人的选择组织
state.choosepeople = []; //总的数组
state.showMore = false; //是否显示快速选人的查看更多
state.showHidden = false; //是否显示收回
state.selectedRowKeys = []; //表格选中的key
//快速选人-------------------------------------
}
};
return {
...toRefs(state),
afterVisibleChange,

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,7 @@
width="85%"
@after-visible-change="afterVisibleChange"
>
<div class="drawerMain">
<div class="drawerMain" id="stuadd">
<div class="header">
<div class="headerTitle">添加学员</div>
<img
@@ -136,7 +136,7 @@
/>
</div>
<div class="btns">
<div class="btn1">
<div class="btn1" @click="searchOrg">
<div class="img1">
<img
src="../../assets/images/courseManage/search0.png"
@@ -166,7 +166,7 @@
<div class="boeTreeTitle">BOE组织树</div>
<a-tree
class="treeMain"
class="treeMain treeMain2"
:style="{ height: screenHeight - 430 + 'px' }"
dropdownClassName="changetreedropdownboe"
defaultExpandAll
@@ -314,9 +314,9 @@
<div
class="chose"
style="
position: absolute;
right: 32px;
bottom: -9px;
display: flex;
justify-content: flex-end;
margin-right: 20px;
font-size: 12px;
font-weight: 500;
color: #409eff;
@@ -336,9 +336,9 @@
<div
class="chose"
style="
position: absolute;
right: 32px;
bottom: -9px;
display: flex;
justify-content: flex-end;
margin-right: 20px;
font-size: 12px;
font-weight: 500;
color: #409eff;
@@ -379,9 +379,9 @@
<div
class="chose"
style="
position: absolute;
right: 32px;
bottom: -9px;
display: flex;
justify-content: flex-end;
margin-right: 20px;
font-size: 12px;
font-weight: 500;
color: #409eff;
@@ -401,9 +401,9 @@
<div
class="chose"
style="
position: absolute;
right: 32px;
bottom: -9px;
display: flex;
justify-content: flex-end;
margin-right: 20px;
font-size: 12px;
font-weight: 500;
color: #409eff;
@@ -442,9 +442,9 @@
<div
class="chose"
style="
position: absolute;
right: 32px;
bottom: -9px;
display: flex;
justify-content: flex-end;
margin-right: 20px;
font-size: 12px;
font-weight: 500;
color: #409eff;
@@ -464,9 +464,9 @@
<div
class="chose"
style="
position: absolute;
right: 32px;
bottom: -9px;
display: flex;
justify-content: flex-end;
margin-right: 20px;
font-size: 12px;
font-weight: 500;
color: #409eff;
@@ -529,6 +529,7 @@
import { reactive, toRefs, onMounted, onUnmounted } from "vue";
import elementResizeDetectorMaker from "element-resize-detector";
import { message } from "ant-design-vue";
import { toDate } from "../../api/method";
export default {
name: "StuAdd",
props: {
@@ -888,71 +889,78 @@ export default {
tabledata2: [
{
key: 1,
name: "小李小李小李小李",
bum: "产研部",
numb: "000000",
guishu: "",
name: "学习受众",
time: "1668410969",
number: "20",
type: "普通受众",
},
{
key: 2,
name: "小刘小刘小刘",
bum: "产研部",
numb: "000000",
guishu: "",
name: "案例受众",
time: "1668324569",
number: "10",
type: "普通受众",
},
{
key: 3,
name: "小李",
bum: "产研部",
numb: "000000",
guishu: "",
name: "学习受众",
time: "1668238169",
number: "20",
type: "普通受众",
},
{
key: 4,
name: "小李",
bum: "产研部",
numb: "000000",
guishu: "",
name: "显示受众",
time: "1668133769",
number: "30",
type: "普通受众2",
},
{
key: 5,
name: "小李",
bum: "产研部",
numb: "000000",
guishu: "",
name: "惯例受众",
time: "1668047369",
number: "50",
type: "普通受众",
},
{
key: 6,
name: "小李",
bum: "产研部",
numb: "000000",
guishu: "",
name: "管理受众",
time: "1667960969",
number: "20",
type: "普通受众",
},
{
key: 7,
name: "小李",
bum: "产研部",
numb: "000000",
guishu: "",
name: "学习小组受众",
time: "1667874569",
number: "20",
type: "普通受众",
},
{
key: 8,
name: "小李",
bum: "产研部",
numb: "000000",
guishu: "",
name: "学习受众",
time: "1667701769",
number: "10",
type: "普通受众",
},
{
key: 9,
name: "小李",
bum: "产研部",
numb: "000000",
guishu: "",
name: "案例受众",
time: "1667442569",
number: "5",
type: "普通受众",
},
{
key: 10,
name: "项目受众",
time: "1667262569",
number: "25",
type: "普通受众",
},
],
tablecolumns2: [
{
title: "姓名",
title: "受众名称",
dataIndex: "name",
key: "name",
width: 30,
@@ -960,25 +968,38 @@ export default {
className: "h",
},
{
title: "工号",
dataIndex: "numb",
key: "numb",
title: "创建时间",
dataIndex: "time",
key: "time",
width: 35,
align: "center",
className: "h",
sorter: {
compare: (a, b) => a.time - b.time,
multiple: 3,
},
scopedSlots: { customRender: "action" }, //引入的插槽
customRender: (text) => {
// console.log(text.record.checked1);
return (
<div class="racona">
<span> {toDate(Number(text.record.time), "Y-M-D h:m:s")}</span>
</div>
);
},
},
{
title: "归属组织",
dataIndex: "guishu",
key: "guishu",
title: "人数",
dataIndex: "number",
key: "number",
width: 30,
align: "center",
className: "h",
},
{
title: "部门",
dataIndex: "bum",
key: "bum",
title: "类型",
dataIndex: "type",
key: "type",
width: 40,
align: "center",
className: "h",
@@ -1084,31 +1105,50 @@ export default {
//根据右侧快速选人高度,判断是否显示更多
const selectedsHeight = () => {
let resize = elementResizeDetectorMaker();
resize.listenTo(document.getElementById("selecteds"), function (ele) {
resize.listenTo(
document.getElementById("stuadd").querySelector("#selecteds"),
function (ele) {
console.log("ele", ele.offsetHeight);
if (ele.offsetHeight > 160 && !state.showHidden) {
state.showMore = true;
document.getElementById("selectedsBox").style.overflow = "hidden";
document.getElementById("selectedsBox").style.height = "160px";
document
.getElementById("stuadd")
.querySelector("#selectedsBox").style.overflow = "hidden";
document
.getElementById("stuadd")
.querySelector("#selectedsBox").style.height = "160px";
} else if (ele.offsetHeight < 160) {
state.showMore = false;
state.showHidden = false;
document.getElementById("selectedsBox").style.overflow = "hidden";
document.getElementById("selectedsBox").style.height = "160px";
document
.getElementById("stuadd")
.querySelector("#selectedsBox").style.overflow = "hidden";
document
.getElementById("stuadd")
.querySelector("#selectedsBox").style.height = "160px";
}
});
}
);
};
const morePeopleShow = () => {
state.showMore = false;
state.showHidden = true;
document.getElementById("selectedsBox").style.overflow = "";
document.getElementById("selectedsBox").style.height = "";
document
.getElementById("stuadd")
.querySelector("#selectedsBox").style.overflow = "";
document
.getElementById("stuadd")
.querySelector("#selectedsBox").style.height = "";
};
const morePeopleHidden = () => {
state.showMore = true;
state.showHidden = false;
document.getElementById("selectedsBox").style.overflow = "hidden";
document.getElementById("selectedsBox").style.height = "160px";
document
.getElementById("stuadd")
.querySelector("#selectedsBox").style.overflow = "hidden";
document
.getElementById("stuadd")
.querySelector("#selectedsBox").style.height = "160px";
};
// 结束 快速选人------------------------------------------------------------------
@@ -1176,33 +1216,75 @@ export default {
//根据右侧快速选人高度,判断是否显示更多
const selectedsHeight1 = () => {
let resize = elementResizeDetectorMaker();
resize.listenTo(document.getElementById("selecteds1"), function (ele) {
resize.listenTo(
document.getElementById("stuadd").querySelector("#selecteds1"),
function (ele) {
console.log("ele", ele.offsetHeight);
if (ele.offsetHeight > 160 && !state.showHidden1) {
state.showMore1 = true;
document.getElementById("selectedsBox1").style.overflow = "hidden";
document.getElementById("selectedsBox1").style.height = "160px";
document
.getElementById("stuadd")
.querySelector("#selectedsBox1").style.overflow = "hidden";
document
.getElementById("stuadd")
.querySelector("#selectedsBox1").style.height = "160px";
} else if (ele.offsetHeight < 160) {
state.showMore1 = false;
state.showHidden1 = false;
document.getElementById("selectedsBox1").style.overflow = "hidden";
document.getElementById("selectedsBox1").style.height = "160px";
document
.getElementById("stuadd")
.querySelector("#selectedsBox1").style.overflow = "hidden";
document
.getElementById("stuadd")
.querySelector("#selectedsBox1").style.height = "160px";
}
});
}
);
};
const morePeopleShow1 = () => {
state.showMore1 = false;
state.showHidden1 = true;
document.getElementById("selectedsBox1").style.overflow = "";
document.getElementById("selectedsBox1").style.height = "";
document
.getElementById("stuadd")
.querySelector("#selectedsBox1").style.overflow = "";
document
.getElementById("stuadd")
.querySelector("#selectedsBox1").style.height = "";
};
const morePeopleHidden1 = () => {
state.showMore1 = true;
state.showHidden1 = false;
document.getElementById("selectedsBox1").style.overflow = "hidden";
document.getElementById("selectedsBox1").style.height = "160px";
document
.getElementById("stuadd")
.querySelector("#selectedsBox1").style.overflow = "hidden";
document
.getElementById("stuadd")
.querySelector("#selectedsBox1").style.height = "160px";
};
//搜索组织
const searchOrg = () => {
let treeTitle = document
.getElementById("stuadd")
.querySelector(".treeMain2")
.querySelectorAll(".ant-tree-title");
if (state.com) {
for (let i = 0; i < treeTitle.length; i++) {
if (state.com === treeTitle[i].innerHTML) {
document
.getElementById("stuadd")
.querySelector(".treeMain2")
.scrollTo(0, treeTitle[i].offsetTop + 28 * i);
return;
} else if (i == treeTitle.length - 1) {
message.destroy();
message.warning("未找到该部门");
}
}
} else {
message.destroy();
message.warning("请输入组织名称");
}
};
// 结束 添加组织------------------------------------------------------------------
// 开始 受众关联------------------------------------------------------------------
@@ -1235,31 +1317,50 @@ export default {
//根据右侧快速选人高度,判断是否显示更多
const selectedsHeight2 = () => {
let resize = elementResizeDetectorMaker();
resize.listenTo(document.getElementById("selecteds2"), function (ele) {
resize.listenTo(
document.getElementById("stuadd").querySelector("#selecteds2"),
function (ele) {
console.log("ele", ele.offsetHeight);
if (ele.offsetHeight > 160 && !state.showHidden2) {
state.showMore2 = true;
document.getElementById("selectedsBox2").style.overflow = "hidden";
document.getElementById("selectedsBox2").style.height = "160px";
document
.getElementById("stuadd")
.querySelector("#selectedsBox2").style.overflow = "hidden";
document
.getElementById("stuadd")
.querySelector("#selectedsBox2").style.height = "160px";
} else if (ele.offsetHeight < 160) {
state.showMore2 = false;
state.showHidden2 = false;
document.getElementById("selectedsBox2").style.overflow = "hidden";
document.getElementById("selectedsBox2").style.height = "160px";
document
.getElementById("stuadd")
.querySelector("#selectedsBox2").style.overflow = "hidden";
document
.getElementById("stuadd")
.querySelector("#selectedsBox2").style.height = "160px";
}
});
}
);
};
const morePeopleShow2 = () => {
state.showMore2 = false;
state.showHidden2 = true;
document.getElementById("selectedsBox2").style.overflow = "";
document.getElementById("selectedsBox2").style.height = "";
document
.getElementById("stuadd")
.querySelector("#selectedsBox2").style.overflow = "";
document
.getElementById("stuadd")
.querySelector("#selectedsBox2").style.height = "";
};
const morePeopleHidden2 = () => {
state.showMore2 = true;
state.showHidden2 = false;
document.getElementById("selectedsBox2").style.overflow = "hidden";
document.getElementById("selectedsBox2").style.height = "160px";
document
.getElementById("stuadd")
.querySelector("#selectedsBox2").style.overflow = "hidden";
document
.getElementById("stuadd")
.querySelector("#selectedsBox2").style.height = "160px";
};
// 结束 受众关联------------------------------------------------------------------
@@ -1319,6 +1420,8 @@ export default {
deleteChoosePeople2,
deleteAll,
searchOrg,
};
},
};

View File

@@ -291,7 +291,7 @@ export default {
let timer;
onMounted(() => {
setTimeout(() => {
getManageList();
// getManageList();
}, 1000);
timer = setInterval(() => {
state.open = false;

View File

@@ -291,7 +291,7 @@ export default {
let timer;
onMounted(() => {
setTimeout(() => {
getManageList();
// getManageList();
}, 500);
timer = setInterval(() => {
state.open = false;

View File

@@ -312,7 +312,7 @@ export default {
onMounted(() => {
setTimeout(() => {
getManageList();
// getManageList();
}, 1000);
});
return {

File diff suppressed because it is too large Load Diff

View File

@@ -263,6 +263,7 @@
</router-link>
</div>
<!-- 无数据显示快速创建 -->
<div v-show="!taskSyllabus.length">
<router-link :to="{ path: '/leveladddetail' }">
<div
class="taskbox"
@@ -283,6 +284,7 @@
<div class="centermain">快速创建关卡任务</div>
</div>
</router-link>
</div>
<!-- 无数据显示快速创建 -->
<!-- 有数据-->
@@ -396,7 +398,7 @@
class="operation"
style="cursor: pointer"
:style="{
display: item.course === '面授' ? 'flex' : 'none',
display: item.type === 2 ? 'flex' : 'none',
}"
@click="showFS"
>
@@ -405,10 +407,10 @@
<div
class="operation"
style="cursor: pointer"
@click="showAA(item.course, item.name)"
@click="showAA(item.type, item.name)"
:style="{
display:
item.course === '直播' || item.course === '活动'
item.type === 6 || item.type === 9
? 'flex'
: 'none',
}"
@@ -420,19 +422,19 @@
style="cursor: pointer"
:style="{
display:
item.course === '直播' ||
item.course === '活动' ||
item.course === '面授'
item.type === 6 ||
item.type === 9 ||
item.type === 2
? 'flex'
: 'none',
}"
@click="
item.course === '面授'
? showCopyModal(item.course)
: item.course === '直播'
? showzhibModal(item.course)
: item.course === '活动'
? showhuodModal(item.course)
item.type ===2
? showCopyModal(item.type)
: item.type === 6
? showzhibModal(item.type)
: item.type === 9
? showhuodModal(item.type)
: null
"
>
@@ -442,21 +444,21 @@
class="operation"
style="cursor: pointer; margin-right: 35px"
@click="
item.course === '在线' ||
item.course === '案例' ||
item.course === '外链' ||
item.course === '讨论' ||
item.course === '直播' ||
item.course === '评估' ||
item.course === '投票' ||
item.course === '活动'
? showTime(item.course, item.name)
: item.course === '考试' || item.course === '测评'
? showTest(item.course, item.name)
: item.course === '面授'
? showFace(item.course)
: item.course === '作业'
? showWork(item.course)
item.type === 1 ||
item.type === 3 ||
item.type === 7 ||
item.type === 8 ||
item.type === 6 ||
item.type === 11 ||
item.type === 12 ||
item.type === 9
? showTime(item.type, item.name)
: item.type === 5 || item.type === 10
? showTest(item.type, item.name)
: item.type === 2
? showFace(item.type)
: item.type === 4
? showWork(item.type)
: null
"
>
@@ -638,81 +640,7 @@
</div>
</div>
</div>
<div class="Gcon">
<div class="pad"></div>
<div class="Gin" style="margin-top: 0px">
<div class="headone">
<div class="box"></div>
<div class="onetitle">关卡晋级规则</div>
</div>
<div class="twomain clearfix">
<a-switch
size="small"
v-model:checked="checked2"
style="margin-top: -5px"
/>
<span class="info">启用关卡自动规则加入</span>
<div class="infor">
若开启新建/编辑关卡-添加学员支持设定自动加入规则将于每日8点同步数据
</div>
<div :class="[checked2 ? 'chooseshow' : 'choo']">
<div class="fane">选择范围</div>
<div class="select">
<a-select
v-model:value="projectName"
style="
width: 250px;
border-radius: 8px;
margin-top: 15px;
"
placeholder="请选择部门"
:options="projectNameList"
@change="selectProjectName3"
allowClear
showSearch
></a-select>
</div>
<div class="select">
<a-select
v-model:value="projectName2"
style="
width: 250px;
border-radius: 8px;
margin-top: 15px;
"
placeholder="请选择岗位"
:options="projectNameList2"
@change="selectProjectName2"
allowClear
showSearch
></a-select>
</div>
</div>
<div class="btm">
<div class="bmo">关卡学习方案展示设置</div>
<div class="bmt">仅支持移动端</div>
<div class="chosecon">
<div class="chose">
<input
type="checkbox"
name="cb1"
value="lieb"
class="inl"
/><span class="sh">列表展示</span>
</div>
<div class="chose" style="margin-left: 20px">
<input
type="checkbox"
name="cb1"
value="lieb"
class="inl"
/><span class="sh">路径展示</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</a-tab-pane>
@@ -749,7 +677,7 @@
<img src="@/assets/images/basicinfo/download.png" style="cursor: pointer;
width:40px;height:40px;margin-right:40px;
" alt="">
<span style="font: oblique bold 16px Sans-serif">{{item.name}}</span>
<span style="font: oblique 16px Sans-serif">{{item.name}}</span>
<span style="color: #4ea6ff;float:right;">删除</span>
</div>
</div>
@@ -915,7 +843,7 @@
</div>
</a-modal>
<!-- 添加学员抽屉 -->
<add-stu v-model:AddSvisible="AddSvisible" />
<path-add-stu v-model:Stuvisible="Stuvisible" />
<!-- 导入学员抽屉 -->
<imp-stu v-model:AddImpStuvisible="AddImpStuvisible" />
<!-- 学员管理查看抽屉 -->
@@ -945,7 +873,7 @@
<script>
import { ref, reactive, toRefs,onMounted } from "vue";
import { message } from "ant-design-vue";
import AddStu from "../../components/drawers/AddLevelAddStu";
import PathAddStu from "../../components/drawers/pathStuAdd";
import ImpStu from "../../components/drawers/AddLevelImportStu";
import CheckStu from "../../components/drawers/CheckStu";
import FaceStu from "../../components/drawers/FaceStu";
@@ -956,16 +884,15 @@ import FaceManage from "../../components/drawers/FaceManage";
import WorkManage from "../../components/drawers/WorkManage";
// import { useRoute } from "vue-router";
// import { useStore } from "vuex";
import * as api from "../../api/index1";
import { storage } from "../../api/storage";
import { getRouterOverview } from "@/api/indexLearningPath";
import { GetRouterDetail } from "@/api/indexTask";
import * as api from "../../api/index1";
export default {
name: "LevelAdd",
components: {
AddStu,
PathAddStu,
ImpStu,
CheckStu,
FaceStu,
@@ -984,7 +911,7 @@ export default {
gatename: null, //关卡名称
gatenamee: null, //学员管理关卡名称
deleteAll: false, //批量删除学员弹窗
AddSvisible: false, //添加学员抽屉
Stuvisible: false, //添加学员抽屉
AddImpStuvisible: false, //导入学员抽屉
CheckStuvisible: false, //学员管理的查看抽屉
addLoading:false, // 加载动画
@@ -994,6 +921,7 @@ export default {
twobtnn: false,
inputbox: false,
Wvisible: false, //作业管理
// 共享文档列表
docList:[
{
name:'测试文档1.doc',
@@ -1007,82 +935,9 @@ export default {
name:'测试文档3.doc',
src:"",
}
], // 共享文档列表
],
huodModal: false,
zhibModal: false,
projectNameListt: [
{
id: 1,
value: "导出信息",
label: "导出信息",
},
{
id: 2,
value: "批量调整关卡",
label: "批量调整关卡",
},
{
id: 3,
value: "批量删除",
label: "批量删除",
},
],
projectNameList: [
{
id: 1,
value: "项目一",
label: "项目一",
},
{
id: 2,
value: "项目二",
label: "项目二",
},
{
id: 3,
value: "项目三",
label: "项目三",
},
{
id: 4,
value: "项目四",
label: "项目四",
},
],
projectNameList2: [
{
id: 1,
value: "项目一",
label: "项目一",
},
{
id: 2,
value: "项目二",
label: "项目二",
},
{
id: 3,
value: "项目三",
label: "项目三",
},
{
id: 4,
value: "项目四",
label: "项目四",
},
],
projectNameList4: [
{
id: 1,
value: "关卡1",
label: "关卡1",
},
{
id: 2,
value: "关卡2",
label: "关卡2",
},
],
//任务大纲列表
taskSyllabus: [
{
@@ -1109,7 +964,6 @@ export default {
nubvalue3: ref("4"),
nubvalue1: ref("4"),
fileList:ref([]),
checked2: false,
docChecked:true,
currentPage: 1,
tableDataTotal: 100,
@@ -1263,22 +1117,6 @@ export default {
]
})
// console.log("store", state.routerId);
const selectProjectName = (value, index) => {
console.log("value", value, index);
if (value === "批量删除") {
showDeleteALLModal();
}
};
const selectProjectName2 = (value, index) => {
console.log("value", value, index);
};
const selectProjectName3 = (value, index) => {
console.log("value", value, index);
};
const selectProjectName4 = (value, index) => {
console.log("value", value, index);
};
const tableDataFunc = () => {
const columns = [
{
@@ -1377,7 +1215,9 @@ export default {
>
调整
</span>
<span style="color:#4EA6FF;cursor:pointer">删除</span>
<span style="color:#4EA6FF;cursor:pointer"
onClick={() => {myDelStudent}}
>删除</span>
</div>
</div>
);
@@ -1403,7 +1243,7 @@ export default {
state.visiblene = false;
};
const showAddStu = () => {
state.AddSvisible = true;
state.Stuvisible = true;
};
const showImpStu = () => {
state.AddImpStuvisible = true;
@@ -1488,9 +1328,10 @@ export default {
//获取学员列表
const getStudent = () => {
let obj = {
name: "",
pageNo: 0,
pageSize: 0,
routerId: state.routerId,
pageNo: 1,
pageSize: 10,
};
api
.getStudent(obj)
@@ -1501,8 +1342,19 @@ export default {
console.log("获取学员列表失败", err);
});
};
const myDelStudent = () => {
let obj = {
"routerId": 0,
"studentIds": []
};
api.methods(obj).then(res => {
message.success("删除成功")
console.log(res)
}).catch(err => {
message.error("删除失败"+err)
console.log(err)
})
}
const checkType = (type) => {
let typeRules = [
"",
@@ -1587,10 +1439,6 @@ export default {
return {
...toRefs(state),
...toRefs(levelList),
selectProjectName,
selectProjectName2,
selectProjectName3,
selectProjectName4,
showDeleteALLModal,
closeDeleteALLModal,
tableDataFunc,
@@ -1616,7 +1464,8 @@ export default {
closezhibModal,
changeTabs,
checkType,
handleChange
handleChange,
myDelStudent,
};
},
};

View File

@@ -1244,18 +1244,21 @@ export default {
};
//测试评估投票抽屉
const showDrawerAddEval = (id, eleId) => {
state.addevalVisible = true;
// state.addevalVisible = true;
state.addevalvisible = true;
state.EditEvalId = id;
state.routerTaskId = eleId;
};
const showDrawerAddInvist = (id, eleId) => {
state.addinvistVisible = true;
// state.addinvistVisible = true;
state.addinvistvisible = true;
state.routerTaskId = eleId;
state.EditInvistId =id;
};
const showDrawerAddVote = (id, eleId) => {
state.addhomeworkvisible = true;
// state.addhomeworkvisible = true;
state.addvotevisible = true;
state.EditVoteId = id;
state.routerTaskId = eleId;
};

View File

@@ -383,6 +383,8 @@
</a-tab-pane>
<a-tab-pane key="4" tab="设置">
<div class="split"></div>
<a-tabs>
<a-tab-pane key="1" tab="编辑">
<div class="setting">
<div class="set_tit">
<span>基本信息</span>
@@ -460,6 +462,49 @@
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="共享文档">
<div class="sametab">
<div class="Gcon">
<div class="pad"></div>
<div class="Gin">
<div class="headone">
<div class="box"></div>
<div class="onetitle">上传共享文档</div>
<div class="oneedi">
<a-switch v-model:checked="docChecked" ></a-switch>
</div>
</div>
<div class="btnbox" style="margin:20px;">
<a-upload
v-model:file-list="fileList"
name="file"
action="/api/file/upload"
@change="handleChange"
>
<span class="xkbtn" style="cursor: pointer; font-size: 17px" >上传</span>
<img src="@/assets/images/basicinfo/cloud.png" style="cursor: pointer;
width:34px;height:34px;
" alt="">
</a-upload>
<div class="btnbox" style="margin:20px;">
<span style="color: #999999">
支持pdf.ppt.pptx.doc.docx.xls.xlsx.jpeg.png.gif.zip
</span>
</div>
<div v-for="item in docList" :key="item.src" class="docListStyle">
<img src="@/assets/images/basicinfo/download.png" style="cursor: pointer;
width:40px;height:40px;margin-right:40px;
" alt="">
<span style="font: oblique 16px Sans-serif">{{item.name}}</span>
<span style="color: #4ea6ff;float:right;">删除</span>
</div>
</div>
</div>
</div>
</div>
</a-tab-pane>
</a-tabs>
</a-tab-pane>
</a-tabs>
<a-modal
style="padding: 0"
@@ -639,12 +684,28 @@ export default defineComponent({
checked: false,
checked2: false,
checked3: false,
docChecked:true,
value3: false,
value4: false,
hideshow: false,
score1: 5,
score2: 5,
edit: true,
// 共享文档列表
docList:[
{
name:'测试文档1.doc',
src:"",
},
{
name:'测试文档2.doc',
src:"",
},
{
name:'测试文档3.doc',
src:"",
}
],
});
const value = ref("");
const value2 = ref("");
@@ -849,7 +910,11 @@ export default defineComponent({
height: 20px;
background-color: #edf0f5;
}
.docListStyle {
display: flex;
width: 300px !important;
justify-content: space-around;
}
.taskBox {
.onerow {
//width: 100%;

View File

@@ -326,6 +326,8 @@
v-model:chooseStageId="chooseStageId"
v-model:projectTaskId="projectTaskId"
v-model:EditVoteId="EditVoteId"
v-model:voteId = "voteId"
v-model:ballotId = "ballotId"
/>
</div>
<!-- 添加投票侧弹窗 -->
@@ -948,15 +950,16 @@ export default {
isLiveEdit: false, //直播编辑
EditRefId: null, //要编辑的外链的id
EditLiveId: null, //要编辑的直播的ids
deAll: false,
EditDiscussId:null,//要编辑的讨论的id
EditActiveId:null,//要编辑的活动id
EditWorkId:null, // 要编辑的作业id
EditTestId: null,// 要编辑的考试id
EditEvalId:null,
EditInvistId:null,
EditVoteId: null,
EditVoteId: null, //编辑需要投票的id
ballotId: "", //编辑需要的题干id
projectTaskId:null, // 要编辑的具体任务id
deAll: false,
projectNameList: [
{
id: 1,
@@ -1379,10 +1382,13 @@ export default {
});
};
//获取删除id投票)
//获取修改、删除id投票)
const changeVData = (data) => {
console.log("8989", data);
console.log("获取修改、删除id投票", data);
state.voteId = data.voteId;
state.ballotId = data.ballotId;
};
//数据变化
const updateTableData = (data) => {
@@ -1548,9 +1554,12 @@ export default {
state.projectTaskId = eleId;
};
const showDrawerAddVote = (id, eleId) => {
console.log(id, eleId, '95835325932953295325');
state.addvotevisible = true;
state.EditVoteId = id;
state.projectTaskId = eleId;
// voteId = state.voteId;
// ballotId = state.ballotId;
};
const showConfirm = () => {
state.confirmModal = true;

View File

@@ -475,6 +475,7 @@
background: linear-gradient(180deg, #ddeaff, #f0f8fe);
display: block;
"
v-if="taskSyllabus.length == 0"
>
<div class="leftt">
<img src="../../assets/images/taskpage/left2.png" />