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"
@start="onStart"
@end="onEnd"
:list="openList"
style="display: flex"
>
<template #item="{ element }">

View File

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

View File

@@ -121,6 +121,7 @@ export default {
const closeDrawer = () => {
console.log(props, 1111);
ctx.emit("update:addrefVisible", false);
console.log("props", props.routerId);
state.inputV2 = "";
state.inputV1 = "";
state.textV1 = "";
@@ -346,4 +347,3 @@ export default {
}
}
</style>

View File

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

View File

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

View File

@@ -603,6 +603,7 @@ import ManageRight from "../../components/drawers/ManageRight";
import * as api from "../../api/index1";
import { message } from "ant-design-vue";
import { toDate } from "../../api/method";
import { storage } from "../../api/storage";
export default {
name: "learningPath",
components: { OwnerShip, PowerList, QueryRight, ManageRight },
@@ -1080,7 +1081,7 @@ export default {
router.push({
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 { useStore } from "vuex";
import * as api from "../../api/index1";
import { storage } from "../../api/storage";
export default {
name: "LevelAdd",
components: {
@@ -917,7 +919,7 @@ export default {
// const routers = useRoute();
// const store = useStore();
const state = reactive({
routerId: localStorage.getItem("routerId"), //学习路径页面传的学习路径id
routerId: storage.get("routerId") ? storage.get("routerId") : null, //学习路径页面传的学习路径id
gatename: null, //关卡名称
gatenamee: null, //学员管理关卡名称
deleteAll: false, //批量删除学员弹窗
@@ -1236,7 +1238,7 @@ export default {
},
],
});
console.log("store", state.routerId);
// console.log("store", state.routerId);
const selectProjectName = (value, index) => {
console.log("value", value, index);
if (value === "批量删除") {

View File

@@ -527,14 +527,16 @@
<!-- 添加讨论侧弹窗 -->
<div>
<add-discuss
v-model:adddiscussVisible="adddiscussvisible" v-model:isStudiscuss="isStudiscuss"
v-model:adddiscussVisible="adddiscussvisible"
v-model:isStudiscuss="isStudiscuss"
/>
</div>
<!-- 添加讨论侧弹窗 -->
<!-- 添加活动侧弹窗 -->
<div>
<add-active
v-model:addactiveVisible="addactivevisible" v-model:isStudiscuss="isStudiscuss"
v-model:addactiveVisible="addactivevisible"
v-model:isStudiscuss="isStudiscuss"
/>
</div>
<!-- 添加活动侧弹窗 -->
@@ -625,6 +627,7 @@ import AddRef from "../../components/drawers/AddRef.vue";
import * as api from "../../api/indexLevel";
import { GetRouterDetail, RouterDeleteTask } from "../../api/indexTask";
import { message } from "ant-design-vue";
import { storage } from "../../api/storage";
export default {
name: "LevelAddDetail",
components: {
@@ -642,6 +645,7 @@ export default {
},
setup() {
const state = reactive({
routerId: storage.get("routerId") ? storage.get("routerId") : null,
level: [
{
chapterId: "1",

View File

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

View File

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

File diff suppressed because it is too large Load Diff