Merge branch 'master' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage

This commit is contained in:
songwc
2022-11-04 16:09:46 +08:00
14 changed files with 5130 additions and 4650 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

View File

@@ -9,7 +9,6 @@
animation="500" animation="500"
@start="onStart" @start="onStart"
@end="onEnd" @end="onEnd"
:list="openList"
style="display: flex" style="display: flex"
> >
<template #item="{ element }"> <template #item="{ element }">

View File

@@ -276,7 +276,6 @@ export default {
RouterEditTask(editObj1) RouterEditTask(editObj1)
.then((res) => { .then((res) => {
console.log("调用学历路径添加接口后", res.data); console.log("调用学历路径添加接口后", res.data);
ctx.emit("changeData", false);
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);

View File

@@ -76,7 +76,7 @@
</div> </div>
</a-drawer> </a-drawer>
</template> </template>
<script> <script>
import { reactive, toRefs, ref } from "vue"; import { reactive, toRefs, ref } from "vue";
import * as api from "../../api/indexExternalChain"; import * as api from "../../api/indexExternalChain";
import * as apiTask from "../../api/indexTaskadd"; import * as apiTask from "../../api/indexTaskadd";
@@ -121,6 +121,7 @@ export default {
const closeDrawer = () => { const closeDrawer = () => {
console.log(props, 1111); console.log(props, 1111);
ctx.emit("update:addrefVisible", false); ctx.emit("update:addrefVisible", false);
console.log("props", props.routerId);
state.inputV2 = ""; state.inputV2 = "";
state.inputV1 = ""; state.inputV1 = "";
state.textV1 = ""; state.textV1 = "";
@@ -206,7 +207,7 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.ant-table-striped :deep(.table-striped) td { .ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important; background-color: #fafafa !important;
} }
@@ -346,4 +347,3 @@ export default {
} }
} }
</style> </style>

View File

@@ -52,7 +52,8 @@
</div> </div>
<!-- 创建投票侧弹窗 --> <!-- 创建投票侧弹窗 -->
<div> <div>
<cre-vote v-model:crevoteVisible="crevotevisible" /> <cre-vote v-model:crevoteVisible="crevotevisible"
@setStemId="changeStemId"/>
</div> </div>
<!-- 创建投票侧弹窗 --> <!-- 创建投票侧弹窗 -->
</div> </div>
@@ -132,6 +133,7 @@ const rowSelection = ref({
console.log(selected, selectedRows, changeRows); console.log(selected, selectedRows, changeRows);
}, },
}); });
export default { export default {
name: "AddVote", name: "AddVote",
components: { components: {
@@ -204,8 +206,9 @@ export default {
.createVote(obj) .createVote(obj)
.then((res) => { .then((res) => {
console.log("创建成功", res); console.log("创建成功", res);
message.success("创建成功"); message.success("创建成功");
closeDrawer(); // changeStemId();
closeDrawer();
apitaskadd apitaskadd
.addTask({ .addTask({
courseId: 0, courseId: 0,
@@ -223,6 +226,9 @@ export default {
// state.createLoading = false; // state.createLoading = false;
}); });
}; };
const changeStemId = (stemId) => {
console.log(stemId);
}
return { return {
...toRefs(state), ...toRefs(state),
showDrawerCreVote, showDrawerCreVote,
@@ -231,6 +237,7 @@ export default {
rowSelection, rowSelection,
options1, options1,
createVoteText, createVoteText,
changeStemId,
}; };
}, },
}; };

View File

@@ -72,41 +72,15 @@
</div> </div>
<div class="main_btns"> <div class="main_btns">
<button class="btn1">取消</button> <button class="btn1">取消</button>
<button <button class="btn2" @click="createQueTit">确定</button>
class="btn2"
onclick="{()=> {
createVoteText()
}}"
>
确定
</button>
</div> </div>
</div> </div>
</a-drawer> </a-drawer>
</template> </template>
<script> <script>
import { reactive, toRefs, ref } from "vue"; import { reactive, toRefs } from "vue";
import { useRouter } from "vue-router";
import * as api from "../../api/indexVote"; import * as api from "../../api/indexVote";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import { toDate } from "../../api/method";
const router = useRouter();
const rowSelection = ref({
checkStrictly: false,
onChange: (selectedRowKeys, selectedRows) => {
console.log(
`selectedRowKeys: ${selectedRowKeys}`,
"selectedRows: ",
selectedRows
);
},
onSelect: (record, selected, selectedRows) => {
console.log(record, selected, selectedRows);
},
onSelectAll: (selected, selectedRows, changeRows) => {
console.log(selected, selectedRows, changeRows);
},
});
export default { export default {
name: "CreVote", name: "CreVote",
// components: { // components: {
@@ -119,12 +93,6 @@ export default {
}, },
setup(props, ctx) { setup(props, ctx) {
const state = reactive({ const state = reactive({
inputV1: "",
inputV2: "",
inputV3: "",
time: undefined,
endTimes: "",
startTimes: "",
questions: [ questions: [
{ {
inputV: "", inputV: "",
@@ -171,60 +139,54 @@ export default {
const afterVisibleChange = (bool) => { const afterVisibleChange = (bool) => {
console.log("state", bool); console.log("state", bool);
}; };
//创建投票信息
const createVoteText = () => {
if (!state.inputV1) return message.info("请输入投票名称");
if (state.time != undefined) {
state.endTimes = toDate(
new Date(state.time[0].$d).getTime() / 1000,
"Y-M-D"
);
state.startTimes = toDate(
new Date(state.time[1].$d).getTime() / 1000,
"Y-M-D"
);
}
let obj = { const createQueTit = () => {
baseVote: "", if (!state.questions[0].inputV) {
createTime: "", message.destroy();
createUser: 0, return message.info("请输入题干");
stem: "", }
stemId: 0, // if (!state.questions.optins.opvalue) {
updateTime: "", // message.destroy();
updateUser: 0, // return message.info("请输入选项");
voteEndTime: state.endTimes, // }
voteExplain: "", console.log(state.questions[0].inputV);
voteFlag: "", let obj = {
voteId: 0, createTime: "",
voteName: state.inputV1, createUser: 0,
voteStartTime: state.startTimes, optionDto: [
voteTag: "", {
}; optionId: 0,
api optionName: "",
.createVote(obj) optionPictureAddress: "",
.then((res) => { },
setTimeout(() => { ],
console.log("创建成功", res); optionId: 0,
message.success("创建成功"); optionName: "",
// state.createLoading = false; optionPictureAddress: "",
router.push("/leveladd"); stem: state.questions[0].inputV,
// getLearnPath(); stemId: 0,
}, 1000); updateTime: "",
}) updateUser: 0,
.catch((err) => { };
console.log("创建失败", err); api
// state.createLoading = false; .createOptionMessage(obj)
}); .then((res) => {
console.log("创建成功", res);
message.success("创建成功");
// ctx.emit("setStemId",obj.stem);
closeDrawer();
})
.catch((err) => {
console.log(err);
});
}; };
return { return {
...toRefs(state), ...toRefs(state),
afterVisibleChange, afterVisibleChange,
closeDrawer, closeDrawer,
rowSelection,
createVoteText,
addQue, addQue,
addOpt, addOpt,
createQueTit,
}; };
}, },
}; };

View File

@@ -603,6 +603,7 @@ import ManageRight from "../../components/drawers/ManageRight";
import * as api from "../../api/index1"; import * as api from "../../api/index1";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import { toDate } from "../../api/method"; import { toDate } from "../../api/method";
import { storage } from "../../api/storage";
export default { export default {
name: "learningPath", name: "learningPath",
components: { OwnerShip, PowerList, QueryRight, ManageRight }, components: { OwnerShip, PowerList, QueryRight, ManageRight },
@@ -1080,7 +1081,7 @@ export default {
router.push({ router.push({
path: "/leveladd", path: "/leveladd",
}); });
localStorage.setItem("routerId", text.record.id); storage.set("routerId", text.record.id);
}} }}
> >
管理 管理

View File

@@ -899,6 +899,8 @@ import WorkManage from "../../components/drawers/WorkManage";
// import { useRoute } from "vue-router"; // import { useRoute } from "vue-router";
// import { useStore } from "vuex"; // import { useStore } from "vuex";
import * as api from "../../api/index1"; import * as api from "../../api/index1";
import { storage } from "../../api/storage";
export default { export default {
name: "LevelAdd", name: "LevelAdd",
components: { components: {
@@ -917,7 +919,7 @@ export default {
// const routers = useRoute(); // const routers = useRoute();
// const store = useStore(); // const store = useStore();
const state = reactive({ const state = reactive({
routerId: localStorage.getItem("routerId"), //学习路径页面传的学习路径id routerId: storage.get("routerId") ? storage.get("routerId") : null, //学习路径页面传的学习路径id
gatename: null, //关卡名称 gatename: null, //关卡名称
gatenamee: null, //学员管理关卡名称 gatenamee: null, //学员管理关卡名称
deleteAll: false, //批量删除学员弹窗 deleteAll: false, //批量删除学员弹窗
@@ -1236,7 +1238,7 @@ export default {
}, },
], ],
}); });
console.log("store", state.routerId); // console.log("store", state.routerId);
const selectProjectName = (value, index) => { const selectProjectName = (value, index) => {
console.log("value", value, index); console.log("value", value, index);
if (value === "批量删除") { if (value === "批量删除") {

View File

@@ -258,14 +258,14 @@
<img src="../../assets/images/leveladd/diao.png" /> <img src="../../assets/images/leveladd/diao.png" />
</div> </div>
<div class="text">评估</div> <div class="text">评估</div>
<!-- 添加评估侧弹窗 --> <!-- 添加评估侧弹窗 -->
<div> <div>
<add-invist <add-invist
v-model:addinvistVisible="addinvistvisible" v-model:addinvistVisible="addinvistvisible"
@changeData="updateTableData" @changeData="updateTableData"
/> />
</div> </div>
<!-- 添加评估侧弹窗 --> <!-- 添加评估侧弹窗 -->
</div> </div>
<div class="lin"></div> <div class="lin"></div>
</div> </div>
@@ -275,7 +275,7 @@
<img src="../../assets/images/leveladd/tou.png" /> <img src="../../assets/images/leveladd/tou.png" />
</div> </div>
<div class="text">投票</div> <div class="text">投票</div>
<!-- 添加投票侧弹窗 --> <!-- 添加投票侧弹窗 -->
<div> <div>
<add-vote <add-vote
v-model:addvoteVisible="addvotevisible" v-model:addvoteVisible="addvotevisible"
@@ -525,18 +525,20 @@
<!-- 导入学员抽屉 --> <!-- 导入学员抽屉 -->
<imp-stu v-model:AddImpStuvisible="AddImpStuvisible" /> <imp-stu v-model:AddImpStuvisible="AddImpStuvisible" />
<!-- 添加讨论侧弹窗 --> <!-- 添加讨论侧弹窗 -->
<div> <div>
<add-discuss <add-discuss
v-model:adddiscussVisible="adddiscussvisible" v-model:isStudiscuss="isStudiscuss" v-model:adddiscussVisible="adddiscussvisible"
/> v-model:isStudiscuss="isStudiscuss"
</div> />
</div>
<!-- 添加讨论侧弹窗 --> <!-- 添加讨论侧弹窗 -->
<!-- 添加活动侧弹窗 --> <!-- 添加活动侧弹窗 -->
<div> <div>
<add-active <add-active
v-model:addactiveVisible="addactivevisible" v-model:isStudiscuss="isStudiscuss" v-model:addactiveVisible="addactivevisible"
/> v-model:isStudiscuss="isStudiscuss"
</div> />
</div>
<!-- 添加活动侧弹窗 --> <!-- 添加活动侧弹窗 -->
<!-- 批量删除学员弹窗 --> <!-- 批量删除学员弹窗 -->
<a-modal <a-modal
@@ -625,6 +627,7 @@ import AddRef from "../../components/drawers/AddRef.vue";
import * as api from "../../api/indexLevel"; import * as api from "../../api/indexLevel";
import { GetRouterDetail, RouterDeleteTask } from "../../api/indexTask"; import { GetRouterDetail, RouterDeleteTask } from "../../api/indexTask";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import { storage } from "../../api/storage";
export default { export default {
name: "LevelAddDetail", name: "LevelAddDetail",
components: { components: {
@@ -636,12 +639,13 @@ export default {
AddTest, AddTest,
AddEval, AddEval,
AddInvist, AddInvist,
AddVote, AddVote,
AddLive, AddLive,
AddRef, AddRef,
}, },
setup() { setup() {
const state = reactive({ const state = reactive({
routerId: storage.get("routerId") ? storage.get("routerId") : null,
level: [ level: [
{ {
chapterId: "1", chapterId: "1",
@@ -1099,8 +1103,8 @@ export default {
<span <span
style="color:#4EA6FF;margin-right:25px;cursor:pointer" style="color:#4EA6FF;margin-right:25px;cursor:pointer"
onClick={() => { onClick={() => {
console.log("编辑id",e.record.routerTaskId); console.log("编辑id", e.record.routerTaskId);
console.log("编辑类型",e.record.lei); console.log("编辑类型", e.record.lei);
state.editID = e.record.routerTaskId; state.editID = e.record.routerTaskId;
//state.addhomeworkvisible = true; //state.addhomeworkvisible = true;
}} }}
@@ -1409,7 +1413,7 @@ export default {
showDrawerAddInvist, showDrawerAddInvist,
showDrawerAddVote, showDrawerAddVote,
deleteLevelTask, deleteLevelTask,
showDrawerAddLive, showDrawerAddLive,
showDrawerAddRef, showDrawerAddRef,
closeDeleteModel, closeDeleteModel,
clearEditData, clearEditData,

View File

@@ -635,7 +635,7 @@ import ProjCheckShip from "../../components/drawers/ProjCheckPower";
import ProjManageShip from "../../components/drawers/ProjManagePower"; import ProjManageShip from "../../components/drawers/ProjManagePower";
import * as api from "../../api/index"; import * as api from "../../api/index";
import { toDate } from "../../api/method"; import { toDate } from "../../api/method";
import { storage } from "../../api/storage";
export default { export default {
name: "projectManage", name: "projectManage",
components: { ProjOwnerShip, ProjPowerList, ProjCheckShip, ProjManageShip }, components: { ProjOwnerShip, ProjPowerList, ProjCheckShip, ProjManageShip },
@@ -1984,7 +1984,13 @@ export default {
</div> </div>
</a-select-option> </a-select-option>
<a-select-option value="基础信息" label="基础信息"> <a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link> <div onClick={()=>{
router.push({
path: "/taskpage",
});
storage.set("projectId", value.record.projectId);
}}>基础信息</div>
</a-select-option> </a-select-option>
</a-select> </a-select>
) : value.record.status ===1|| value.record.status == 1 && Number(value.record.beginTime) > Math.ceil(new Date().getTime / 1000) ? ( ) : value.record.status ===1|| value.record.status == 1 && Number(value.record.beginTime) > Math.ceil(new Date().getTime / 1000) ? (
@@ -2031,7 +2037,12 @@ export default {
</div> </div>
</a-select-option> </a-select-option>
<a-select-option value="基础信息" label="基础信息"> <a-select-option value="基础信息" label="基础信息">
<router-link to="/taskpage">基础信息</router-link> <div onClick={()=>{
router.push({
path: "/taskpage",
});
storage.set("projectId", value.record.projectId);
}}>基础信息</div>
</a-select-option> </a-select-option>
</a-select> </a-select>
) : value.record.status === -1 ? ( ) : value.record.status === -1 ? (
@@ -2069,7 +2080,15 @@ export default {
</div> </div>
</a-select-option> </a-select-option>
<a-select-option value="基础信息" label="基础信息"> <a-select-option value="基础信息" label="基础信息">
<div onClick={()=>{
router.push({
path: "/taskpage",
});
storage.set("projectId", value.record.projectId);
}}>基础信息</div>
{/**
<router-link to="/taskpage">基础信息</router-link> <router-link to="/taskpage">基础信息</router-link>
*/}
</a-select-option> </a-select-option>
</a-select> </a-select>
) : ( ) : (

View File

@@ -24,7 +24,6 @@
animation="500" animation="500"
@start="onStart" @start="onStart"
@end="onEnd" @end="onEnd"
:list="level"
> >
<template #item="{ element }"> <template #item="{ element }">
<div <div
@@ -346,8 +345,27 @@
margin-left: 46px; margin-left: 46px;
" "
> >
<a-checkbox :checked="selectRow.length !== 0 ? true : false"> <img
</a-checkbox> style="
width: 16px;
height: 16px;
cursor: pointer;
margin-top: 12px;
"
:src="
selectAll === 0
? require('../../assets/images/notSelect.png')
: selectAll === 1
? require('../../assets/images/selectAll.png')
: require('../../assets/images/select.png')
"
@click="selectRowAll"
/>
<!-- <a-checkbox
v-model:checked="selectAll"
@change="selectRowAll"
>
</a-checkbox> -->
<div style="margin-top: 2px; margin-left: 8px">类型</div> <div style="margin-top: 2px; margin-left: 8px">类型</div>
</div> </div>
<div style="width: 120px; text-align: center">任务名称</div> <div style="width: 120px; text-align: center">任务名称</div>
@@ -368,7 +386,6 @@
animation="500" animation="500"
@start="onStart" @start="onStart"
@end="onEnd" @end="onEnd"
:list="tableData"
> >
<template #item="{ element }"> <template #item="{ element }">
<div <div
@@ -406,7 +423,7 @@
></div> ></div>
<a-checkbox <a-checkbox
:id="element.id" :id="element.id"
v-model:checked="checked" v-model:checked="element.checked"
@change="changeRow" @change="changeRow"
> >
</a-checkbox> </a-checkbox>
@@ -426,6 +443,7 @@
:checked="element.checked1" :checked="element.checked1"
size="small" size="small"
active-color="red" active-color="red"
@click="changeCourseType(element.id)"
/> />
<div class="showt clearfix"> <div class="showt clearfix">
<div <div
@@ -462,7 +480,10 @@
> >
编辑 编辑
</span> </span>
<span style="color: #4ea6ff; cursor: pointer" @click="showDelete()"> <span
style="color: #4ea6ff; cursor: pointer"
@click="showDelete()"
>
删除 删除
</span> </span>
</div> </div>
@@ -735,6 +756,7 @@ import * as apiinvist from "../../api/indexInvist";
import * as apivote from "../../api/indexVote"; import * as apivote from "../../api/indexVote";
import * as apistage from "../../api/indexStage"; import * as apistage from "../../api/indexStage";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import { storage } from "../../api/storage";
const drawercolumns = [ const drawercolumns = [
{ {
title: "项目名称", title: "项目名称",
@@ -793,6 +815,7 @@ export default {
}, },
setup() { setup() {
const state = reactive({ const state = reactive({
projectId: storage.get("projectId") ? storage.get("projectId") : null,
projectNameList: [ projectNameList: [
{ {
id: 1, id: 1,
@@ -971,7 +994,9 @@ export default {
deleteActivityID: null, //删除活动id deleteActivityID: null, //删除活动id
deleteID: "", deleteID: "",
selectRow: [], //选择行 selectRow: [], //选择行
selectAll: 0, //0未选择1全选2部分选择
}); });
console.log("projectId", state.projectId);
const selectProjectName = (value, index) => { const selectProjectName = (value, index) => {
console.log("value", value, index); console.log("value", value, index);
}; };
@@ -1040,10 +1065,12 @@ export default {
creater: value.name, creater: value.name,
cretime: value.duration ? value.duration : "-", cretime: value.duration ? value.duration : "-",
checked1: value.flag ? true : false, checked1: value.flag ? true : false,
checked: false, //是否选中类型
}; };
array.push(obj); array.push(obj);
}); });
state.tableData = array; state.tableData = array;
console.log("state.tableData", state.tableData);
}; };
const tableDataFunc = () => { const tableDataFunc = () => {
@@ -1667,9 +1694,9 @@ export default {
state.isActive = !state.isActive; state.isActive = !state.isActive;
}; };
//选择表格 //选择单个任务
const changeRow = (e) => { const changeRow = (e) => {
console.log("选择行", e); //selectRow:已经选择的任务的id数组
let arr = state.selectRow; let arr = state.selectRow;
if (e.target.checked) { if (e.target.checked) {
arr.push(e.target.id); arr.push(e.target.id);
@@ -1681,7 +1708,46 @@ export default {
}); });
} }
state.selectRow = arr; state.selectRow = arr;
console.log("state.selectRow", state.selectRow); //判断是否是全部选择或者是全部未选择来修改selectAll框的样式
if (arr.length !== 0) {
if (arr.length === state.tableData.length) {
state.selectAll = 1;
} else {
state.selectAll = 2;
}
} else {
state.selectAll = 0;
}
console.log("state.selectRow", state.selectRow, state.selectAll);
};
//全选任务或全不选任务
const selectRowAll = () => {
let arr = state.tableData;
let array = [];
if (state.selectAll === 0 || state.selectAll === 2) {
arr.map((value) => {
// console.log("value", value, index);
value.checked = true;
array.push(value.id);
// if (value == e.target.id) {
// arr.splice(index, 1);
// }
state.selectAll = 1;
});
} else {
array = [];
arr.map((value) => {
// console.log("value", value, index);
value.checked = false;
state.selectAll = 0;
});
}
state.tableData = arr;
state.selectRow = array;
};
//修改任务的课程类型 id为任务id
const changeCourseType = (id) => {
console.log("任务id", id);
}; };
return { return {
...toRefs(state), ...toRefs(state),
@@ -1734,6 +1800,8 @@ export default {
editStage, editStage,
updateTableData, updateTableData,
changeRow, changeRow,
selectRowAll,
changeCourseType,
}; };
}, },
}; };
@@ -2517,7 +2585,7 @@ export default {
} }
} }
.tableBox { .tableBox {
padding-bottom: 20px; margin-bottom: 20px;
margin-top: 20px; margin-top: 20px;
.chosen { .chosen {
background-color: #f2f6fc; background-color: #f2f6fc;

File diff suppressed because it is too large Load Diff