This commit is contained in:
dongwug
2022-11-04 16:26:00 +08:00
11 changed files with 5056 additions and 4545 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

@@ -76,7 +76,7 @@
</div>
</a-drawer>
</template>
<script>
<script>
import { reactive, toRefs, ref } from "vue";
import * as api from "../../api/indexExternalChain";
import * as apiTask from "../../api/indexTaskadd";
@@ -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 = "";
@@ -206,7 +207,7 @@ export default {
},
};
</script>
<style lang="scss">
<style lang="scss">
.ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important;
}
@@ -346,4 +347,3 @@ export default {
}
}
</style>

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

@@ -629,6 +629,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: {
@@ -646,6 +647,7 @@ export default {
},
setup() {
const state = reactive({
routerId: storage.get("routerId") ? storage.get("routerId") : null,
level: [
{
chapterId: "1",
@@ -887,7 +889,7 @@ export default {
let obj = {
name: state.value1,
remark: state.value2,
routerId: 0,
routerId: state.routerId,
};
api
.editChapter(obj)
@@ -967,7 +969,7 @@ export default {
});
};
const getDetail = (index) => {
GetRouterDetail(92)
GetRouterDetail(state.routerId)
.then((res) => {
state.level = res.data.data.chapterList;
console.log(state.level);

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 = () => {
@@ -1196,6 +1223,7 @@ export default {
});
};
//数据变化
const updateTableData = (data) => {
console.log("添加数据", data);
@@ -1666,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);
@@ -1680,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),
@@ -1733,6 +1800,8 @@ export default {
editStage,
updateTableData,
changeRow,
selectRowAll,
changeCourseType,
};
},
};
@@ -2516,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