mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
合并
This commit is contained in:
BIN
src/assets/images/notSelect.png
Normal file
BIN
src/assets/images/notSelect.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 152 B |
BIN
src/assets/images/select.png
Normal file
BIN
src/assets/images/select.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 173 B |
BIN
src/assets/images/selectAll.png
Normal file
BIN
src/assets/images/selectAll.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 352 B |
@@ -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 }">
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
@@ -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);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
管理
|
管理
|
||||||
|
|||||||
@@ -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 === "批量删除") {
|
||||||
|
|||||||
@@ -629,6 +629,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: {
|
||||||
@@ -646,6 +647,7 @@ export default {
|
|||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
routerId: storage.get("routerId") ? storage.get("routerId") : null,
|
||||||
level: [
|
level: [
|
||||||
{
|
{
|
||||||
chapterId: "1",
|
chapterId: "1",
|
||||||
@@ -887,7 +889,7 @@ export default {
|
|||||||
let obj = {
|
let obj = {
|
||||||
name: state.value1,
|
name: state.value1,
|
||||||
remark: state.value2,
|
remark: state.value2,
|
||||||
routerId: 0,
|
routerId: state.routerId,
|
||||||
};
|
};
|
||||||
api
|
api
|
||||||
.editChapter(obj)
|
.editChapter(obj)
|
||||||
@@ -967,7 +969,7 @@ export default {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const getDetail = (index) => {
|
const getDetail = (index) => {
|
||||||
GetRouterDetail(92)
|
GetRouterDetail(state.routerId)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
state.level = res.data.data.chapterList;
|
state.level = res.data.data.chapterList;
|
||||||
console.log(state.level);
|
console.log(state.level);
|
||||||
|
|||||||
@@ -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>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -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 = () => {
|
||||||
@@ -1196,6 +1223,7 @@ export default {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//数据变化
|
//数据变化
|
||||||
const updateTableData = (data) => {
|
const updateTableData = (data) => {
|
||||||
console.log("添加数据", data);
|
console.log("添加数据", data);
|
||||||
@@ -1666,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);
|
||||||
@@ -1680,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),
|
||||||
@@ -1733,6 +1800,8 @@ export default {
|
|||||||
editStage,
|
editStage,
|
||||||
updateTableData,
|
updateTableData,
|
||||||
changeRow,
|
changeRow,
|
||||||
|
selectRowAll,
|
||||||
|
changeCourseType,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -2516,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
Reference in New Issue
Block a user