@@ -316,6 +317,7 @@
columnWidth: 30,
selectedRowKeys: selectedRowKeys2,
onChange: onSelectChange2,
+ preserveSelectedRowKeys: true,
}"
/>
@@ -598,6 +600,14 @@ export default {
type: Number,
default: null,
},
+ classify: {
+ type: String,
+ default: "",
+ },
+ selectProjectId: {
+ type: Number,
+ default: null,
+ },
},
setup(props, ctx) {
const store = useStore();
@@ -792,9 +802,35 @@ export default {
deleteAll();
// console.log("expandedKeys", state.expandedKeys);
state.expandedKeys = [];
+ state.tabledata = [];
+ //快速选人
+ state.currentPage = 1;
+ state.tableDataTotal = 0;
+ state.nameSearch = ""; //搜索名称
+
+ //受众
+ state.currentPage2 = 1;
+ state.tableDataTotal2 = 0;
+ state.audienceName = "";
+
+ state.currentPage1 = 1;
+ state.tableDataTotal1 = 0;
+
+ state.selectedKeys = [];
+ state.selectOrgId = null; //选中的组织id
+ state.selectOrgName = null; //选中的组织名称
+
+ state.searchOrgName = null;
+ state.isSearchOrg = false;
+ state.treeData2 = [];
+
+ getAudienceInfo();
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
+ if (bool) {
+ optionAuthPerm();
+ }
};
//获取组织树
state.treeData = computed(() => {
@@ -866,12 +902,13 @@ export default {
//分页获取学员
const changePagination = (page) => {
state.currentPage = page;
- console.log("1111111");
+ console.log("1111111", state.selectedRowKeys, state.choosepeople);
getMember(state.selectOrgId);
};
//搜索学员
const handleSearchStu = () => {
deleteDepSelect();
+ state.currentPage = 1;
state.currentPage2 = 1;
console.log("22222");
getMember();
@@ -891,10 +928,20 @@ export default {
};
//快速选人 选中的数组
const onSelectChange = (selectedRowKeys, item) => {
- // console.log("selectedRowKeys changed: ", selectedRowKeys,item);
- state.selectedRowKeys.push(selectedRowKeys[selectedRowKeys.length - 1]);
- state.choosepeople.unshift(item[item.length - 1]);
+ console.log("selectedRowKeys changed: ", selectedRowKeys, item);
+ state.selectedRowKeys = selectedRowKeys;
+ state.choosepeople = item.reverse();
selectedsHeight();
+ // if (selectedRowKeys.length > 0 && item.length > 0) {
+
+ // state.selectedRowKeys.push(selectedRowKeys[selectedRowKeys.length - 1]);
+ // state.choosepeople.unshift(item[item.length - 1]);
+ // // console.log(
+ // // "selectedRowKeys changed22222: ",
+ // // state.selectedRowKeys,
+ // // state.choosepeople
+ // // );
+ // }
};
//单个删除选中的人
const deleteChoosePeople = (item) => {
@@ -920,7 +967,7 @@ export default {
resize.listenTo(
document.getElementById("ProjCheckship").querySelector("#selecteds"),
function (ele) {
- console.log("ele", ele.offsetHeight);
+ console.log("ele", ele.clientHeight, ele.offsetHeight);
if (ele.offsetHeight > 160 && !state.showHidden) {
state.showMore = true;
document
@@ -1047,7 +1094,7 @@ export default {
}
}
- // console.log("选中的部门2", state.selectedKeys1, state.chooseorganization);
+ console.log("选中的部门2", state.selectedKeys1, state.chooseorganization);
};
//点击确认添加-判断是否显示确定弹窗
const addOrgModal = () => {
@@ -1070,19 +1117,19 @@ export default {
state.showOrgModal = false;
};
- //单个删除选中的人
+ //单个删除选中的组织
const deleteChoosePeople1 = (item) => {
- console.log("item", item);
+ console.log("item", item, state.chooseorganization);
let arr = state.chooseorganization;
for (let i = 0; i < arr.length; i++) {
- if (arr[i].key === item.key) {
+ if (arr[i].id === item.id) {
arr.splice(i, 1);
}
}
state.chooseorganization = arr;
let array = state.selectedKeys1;
for (let i = 0; i < array.length; i++) {
- if (array[i] === item.key) {
+ if (array[i] === item.id) {
array.splice(i, 1);
}
}
@@ -1193,8 +1240,10 @@ export default {
//受众关联 选中的数组
const onSelectChange2 = (selectedRowKeys, item) => {
// console.log("selectedRowKeys changed: ", selectedRowKeys, item);
- state.selectedRowKeys2.push(selectedRowKeys[selectedRowKeys.length - 1]);
- state.relationpeople.unshift(item[item.length - 1]);
+ state.selectedRowKeys2 = selectedRowKeys;
+ state.relationpeople = item.reverse();
+ // state.selectedRowKeys2.push(selectedRowKeys[selectedRowKeys.length - 1]);
+ // state.relationpeople.unshift(item[item.length - 1]);
selectedsHeight2();
};
@@ -1331,6 +1380,73 @@ export default {
ctx.emit("update:addAuthList", state.selectAllArr);
closeDrawer();
};
+ //获取授权 坐回显
+ const optionAuthPerm = () => {
+ let obj = {
+ keyWord: "",
+ type:
+ props.classify === "learnPath"
+ ? 1
+ : props.classify === "project"
+ ? 2
+ : props.classify === "course"
+ ? 3
+ : null,
+ tag: props.authClassify === 1 ? 3 : props.authClassify === 2 ? 4 : "",
+ opt: 1,
+ refId: props.selectProjectId,
+ pageNo: 0,
+ pageSize: 0,
+ deptList: [],
+ groupList: [],
+ studentList: [],
+ };
+ console.log("获取权限名单obj", obj);
+ api
+ .optionAuthPerm(obj)
+ .then((res) => {
+ // console.log("获取权限名单成功", res);
+ if (res.data.code === 200) {
+ let studentArr = res.data.data.studentList;
+ let selectedRowKeys = [];
+ let choosepeople = [];
+ for (let i = 0; i < studentArr.length; i++) {
+ selectedRowKeys.push(studentArr[i].id);
+ choosepeople.push(studentArr[i]);
+ }
+ //快速选人
+ state.selectedRowKeys = selectedRowKeys;
+ state.choosepeople = choosepeople;
+
+ let deptArr = res.data.data.deptList;
+ let selectedKeys1 = [];
+ let chooseorganization = [];
+ for (let i = 0; i < deptArr.length; i++) {
+ selectedKeys1.push(deptArr[i].id);
+ chooseorganization.push(deptArr[i]);
+ }
+ //组织
+ state.selectedKeys1 = selectedKeys1;
+ state.chooseorganization = chooseorganization;
+ state.chooseorganization1 = chooseorganization;
+
+ let groupArr = res.data.data.groupList;
+ let selectedRowKeys2 = [];
+ let relationpeople = [];
+ for (let i = 0; i < groupArr.length; i++) {
+ selectedRowKeys2.push(groupArr[i].id);
+ relationpeople.push(groupArr[i]);
+ }
+ //受众
+ state.selectedRowKeys2 = selectedRowKeys2;
+ state.relationpeople = relationpeople;
+ console.log("获取权限名单成功", res);
+ }
+ })
+ .catch((err) => {
+ console.log("获取权限名单失败", err);
+ });
+ };
return {
...toRefs(state),
@@ -1374,6 +1490,7 @@ export default {
resetOrg,
submitAuth,
+ optionAuthPerm,
};
},
};
@@ -1904,7 +2021,9 @@ export default {
margin-right: 32px;
margin-left: 32px;
min-height: 100px;
+ // height: 170px;
// overflow: hidden;
+ flex-shrink: 0;
.chose {
// width: 64px;
padding-left: 10px;
@@ -1920,6 +2039,7 @@ export default {
color: rgba(56, 139, 225, 1);
font-size: 12px;
position: relative;
+ flex-shrink: 0;
.ch {
position: absolute;
width: 18px;
diff --git a/src/components/drawers/ProjPowerList.vue b/src/components/drawers/ProjPowerList.vue
index 5c65c17e..228b2399 100644
--- a/src/components/drawers/ProjPowerList.vue
+++ b/src/components/drawers/ProjPowerList.vue
@@ -133,6 +133,7 @@
diff --git a/src/components/project/ProjectClass.vue b/src/components/project/ProjectClass.vue
index 6364db17..854235d3 100644
--- a/src/components/project/ProjectClass.vue
+++ b/src/components/project/ProjectClass.vue
@@ -1,55 +1,46 @@
-
diff --git a/src/components/project/ProjectLevel.vue b/src/components/project/ProjectLevel.vue
index 87f724f1..c8eeee67 100644
--- a/src/components/project/ProjectLevel.vue
+++ b/src/components/project/ProjectLevel.vue
@@ -1,45 +1,42 @@
-
diff --git a/src/components/project/ProjectManager.vue b/src/components/project/ProjectManager.vue
index c10e879e..21b31a40 100644
--- a/src/components/project/ProjectManager.vue
+++ b/src/components/project/ProjectManager.vue
@@ -1,5 +1,10 @@
+
+
+
+
+
+
+
diff --git a/src/components/project/TrainClass.vue b/src/components/project/TrainClass.vue
index ccac922a..3d837b53 100644
--- a/src/components/project/TrainClass.vue
+++ b/src/components/project/TrainClass.vue
@@ -1,52 +1,43 @@
-
diff --git a/src/store/index.js b/src/store/index.js
index 4a43ddea..c7979bfa 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -31,6 +31,7 @@ export default createStore({
projectLevel: [],//项目级别
projectSys: [],//培训分类
pathmapPic: [],//学习路径背景图
+ memberInitInfo: [],//学员默认
},
getters: {},
mutations: {
@@ -55,6 +56,9 @@ export default createStore({
SET_DICT(state, {key, data}) {
state[key] = data
},
+ SET_MEMBER_INFO(state, data) {
+ state.memberInitInfo = data
+ },
SET_USER(state, userInfo) {
state.userInfo = userInfo
},
diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue
index 8c60136d..10af2ccf 100644
--- a/src/views/courselibrary/CoursewareManage.vue
+++ b/src/views/courselibrary/CoursewareManage.vue
@@ -7,53 +7,53 @@
@@ -81,16 +81,16 @@