mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 04:46:46 +08:00
合并
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="allCon">
|
||||
<div class="leveladddetail">
|
||||
<div class="left clearfix">
|
||||
<div class="leftmain">
|
||||
<div class="tit" style="margin-left: 18px">关卡</div>
|
||||
@@ -319,7 +319,7 @@
|
||||
</div>
|
||||
<div class="drawerbox">
|
||||
<a-table
|
||||
:columns="drawercolumns"
|
||||
:columns="drawertableColumns()"
|
||||
:data-source="drawertableData"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:scroll="{ x: 700 }"
|
||||
@@ -374,9 +374,11 @@
|
||||
<button class="addx" @click="showAddStu">添加学员</button>
|
||||
<!-- 点击抽屉组件在LevelAdd,此处没添加showAddStu、showImpStu -->
|
||||
<button class="addd" @click="showImpStu">导入学员</button>
|
||||
<button class="addd" @click="showDeleteALLModal">批量删除</button>
|
||||
<button class="addd" @click="showDeleteALLModal">
|
||||
批量删除
|
||||
</button>
|
||||
</div>
|
||||
<div class="talk">
|
||||
<!-- <div class="talk">
|
||||
<img class="im" src="../../assets/images/leveladd/gan.png" />
|
||||
<div class="xu">
|
||||
<span class="yi">已选择</span>
|
||||
@@ -388,12 +390,11 @@
|
||||
<span class="yi">5</span>
|
||||
<span class="yi">条</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tablebox1" style="margin-top: 30px">
|
||||
</div> -->
|
||||
<div class="tablebox1" style="margin-top: 20px">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc2()"
|
||||
:scroll="{ y: 235 }"
|
||||
:data-source="tableData2"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
@@ -405,7 +406,7 @@
|
||||
onChange: onSelectChange,
|
||||
}"
|
||||
/>
|
||||
<div class="pa">
|
||||
<!-- <div class="pa">
|
||||
<a-pagination
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
@@ -415,7 +416,7 @@
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 无数据样式 -->
|
||||
<div
|
||||
class="notable"
|
||||
@@ -496,44 +497,6 @@
|
||||
import { reactive, toRefs, onMounted, onUnmounted } from "vue";
|
||||
import AddStu from "../../components/drawers/AddLevelAddStu";
|
||||
import ImpStu from "../../components/drawers/AddLevelImportStu";
|
||||
const drawercolumns = [
|
||||
{
|
||||
title: "项目名称",
|
||||
dataIndex: "projectName",
|
||||
key: "projectName",
|
||||
width: 200,
|
||||
// align: "center",
|
||||
ellipsis: true,
|
||||
// scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
// customRender: (text, record) => {
|
||||
// console.log(text, record);
|
||||
// return <span>{text.text}</span>;
|
||||
// },
|
||||
},
|
||||
{
|
||||
title: "项目经理",
|
||||
dataIndex: "manager",
|
||||
key: "manager",
|
||||
width: 100,
|
||||
align: "center",
|
||||
},
|
||||
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "creater",
|
||||
// width: "30%",
|
||||
key: "creater",
|
||||
width: 100,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
width: 180,
|
||||
align: "center",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
name: "LevelAddDetail",
|
||||
components: {
|
||||
@@ -737,7 +700,6 @@ export default {
|
||||
key: "1-1",
|
||||
projectName: "管理者进阶-腾飞班",
|
||||
manager: "黄华 刘俊",
|
||||
|
||||
creater: "毛继禹",
|
||||
time: "2022-07-20 14:00:03",
|
||||
children: [
|
||||
@@ -836,6 +798,8 @@ export default {
|
||||
selectedRowKeys: [],
|
||||
isActive: false,
|
||||
gqxy_hs: true,
|
||||
|
||||
projectChecked: null, //项目单选框
|
||||
});
|
||||
const showDrawer = () => {
|
||||
state.visible = true;
|
||||
@@ -1067,6 +1031,82 @@ export default {
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
};
|
||||
|
||||
const drawertableColumns = () => {
|
||||
// let arr = state.drawertableData;
|
||||
// function traverse(arr) {
|
||||
// for (var a in arr) {
|
||||
// // console.log(arr[a]);
|
||||
// if (arr[a].children) {
|
||||
// traverse(arr[a].children); //递归遍历
|
||||
// } else {
|
||||
// console.log(arr[a].children); //如果是值就显示
|
||||
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// traverse(arr);
|
||||
const drawercolumns = [
|
||||
{
|
||||
title: "项目名称",
|
||||
dataIndex: "projectName",
|
||||
key: "projectName",
|
||||
width: 200,
|
||||
// align: "center",
|
||||
ellipsis: true,
|
||||
// scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
customRender: (text) => {
|
||||
// console.log(text.record.key);
|
||||
if (!text.record.children) {
|
||||
return (
|
||||
<div style={{ display: "flex" }}>
|
||||
<a-checkbox
|
||||
checked={
|
||||
state.projectChecked === text.record.key ? true : false
|
||||
}
|
||||
value={text.record.key}
|
||||
onChange={() => {
|
||||
// console.log("改变了", text.record.key);
|
||||
if (state.projectChecked === text.record.key) {
|
||||
state.projectChecked = null;
|
||||
} else {
|
||||
state.projectChecked = text.record.key;
|
||||
}
|
||||
}}
|
||||
></a-checkbox>
|
||||
<span style="margin-left: 5px">{text.text}</span>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
return <span>{text.text}</span>;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "项目经理",
|
||||
dataIndex: "manager",
|
||||
key: "manager",
|
||||
width: 100,
|
||||
align: "center",
|
||||
},
|
||||
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "creater",
|
||||
// width: "30%",
|
||||
key: "creater",
|
||||
width: 100,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
width: 180,
|
||||
align: "center",
|
||||
},
|
||||
];
|
||||
return drawercolumns;
|
||||
};
|
||||
// const getClientHeight = () => {
|
||||
// state.rightheight =
|
||||
// document.getElementsByClassName("addhead")[0].offsetHeight +
|
||||
@@ -1096,8 +1136,8 @@ export default {
|
||||
state.deleteAll = true;
|
||||
};
|
||||
const delete_exit = () => {
|
||||
state.deleteAll = false
|
||||
}
|
||||
state.deleteAll = false;
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
tableDataFunc,
|
||||
@@ -1109,12 +1149,13 @@ export default {
|
||||
afterVisibleChange,
|
||||
showAddStu,
|
||||
showImpStu,
|
||||
drawercolumns,
|
||||
// drawercolumns,
|
||||
onSelectChange,
|
||||
changebgc,
|
||||
gqxy_hShow,
|
||||
showDeleteALLModal,
|
||||
delete_exit,
|
||||
drawertableColumns,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -1342,7 +1383,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.allCon {
|
||||
.leveladddetail {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
min-width: 933px;
|
||||
@@ -1681,7 +1722,7 @@ export default {
|
||||
}
|
||||
.tableBox {
|
||||
margin-top: 21px;
|
||||
margin-bottom: 80px;
|
||||
margin-bottom: 20px;
|
||||
.classify {
|
||||
margin-left: 10px !important;
|
||||
padding-left: 9px !important;
|
||||
@@ -1786,8 +1827,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.tableBox {
|
||||
margin-bottom: 80px;
|
||||
|
||||
margin-block-end: 20px;
|
||||
.classify {
|
||||
margin-left: 11px !important;
|
||||
padding-left: 9px !important;
|
||||
|
||||
Reference in New Issue
Block a user