diff --git a/src/App.vue b/src/App.vue index 837b2668..90f631d0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -44,7 +44,7 @@ export default defineComponent({ const store = useStore(); const isLogin = ref(false); // console.log("router", router.getRoutes(), route); - console.log("版本0.11------------"); + console.log("版本0.12------------"); const routes = computed(() => { return router.getRoutes().filter((e) => e.meta?.isLink); }); @@ -69,9 +69,26 @@ export default defineComponent({ initDict("pathmapPic"); initDict("projectClass"); initDict("projectPic"); + getMemberInfo(); getOrgTree(); } + async function getMemberInfo() { + const list = localStorage.getItem('memberInitInfo'); + if (list) { + store.commit("SET_MEMBER_INFO", JSON.parse(list)); + return; + } + const memberInitInfo = await api1.getMemberInfo({keyWord: '', pageNo: 1, pageSize: 10}).then((res) => ( + res.data.data.rows.map(e => ({ + label: e.realName, + value: e.id + })) + )); + store.commit("SET_MEMBER_INFO", memberInitInfo); + localStorage.setItem('memberInitInfo', JSON.stringify(memberInitInfo)); + } + async function getUserInfo() { const userInfo = await api2.userInfo() store.commit("SET_USER", userInfo); diff --git a/src/api/config.js b/src/api/config.js index e5013af6..6adc3193 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -2,7 +2,7 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-11-21 14:32:52 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2022-12-02 17:13:55 + * @LastEditTime: 2022-12-03 19:52:09 * @FilePath: /fe-manage/src/api/config.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ diff --git a/src/components/drawers/ProjCheckPower.vue b/src/components/drawers/ProjCheckPower.vue index 34a536d9..71dc0444 100644 --- a/src/components/drawers/ProjCheckPower.vue +++ b/src/components/drawers/ProjCheckPower.vue @@ -118,6 +118,7 @@ columnWidth: 20, selectedRowKeys: selectedRowKeys, onChange: onSelectChange, + preserveSelectedRowKeys: true, }" />
@@ -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 @@
@@ -104,18 +104,18 @@
课程名称:
{{ xzinputV1.length }}/20 @@ -129,8 +129,8 @@
@@ -138,15 +138,15 @@
@@ -154,8 +154,8 @@
@@ -163,14 +163,14 @@
- 1、课程名称统一不加书名号。
+ 1、课程名称统一不加书名号。
2、项目名称、属地等信息如需体现在课程名称中,请放在课程名称信息 之后,如“时间管理(GROW180项目)”或“时间管理(B*)”确保首先 - 看到的是课程内容主题。
+ 看到的是课程内容主题。
3、同一课程如先后有多个版本,原则上仅开放最新版本,旧版本应停用 版本如必须以年份标明,请以“沟通技巧(2022年)”的方式呈现。
@@ -180,8 +180,8 @@
授课形式 @@ -191,9 +191,9 @@
线上 @@ -202,9 +202,9 @@
面授 @@ -218,8 +218,8 @@
是否设置目录 @@ -228,18 +228,18 @@
@@ -263,29 +263,29 @@
编辑面授课 新建面授课
@@ -299,8 +299,8 @@
课程名称 @@ -308,10 +308,10 @@
@@ -327,19 +327,19 @@ 课程命名规则
收起
展开
@@ -347,14 +347,14 @@
- 1、课程名称统一不加书名号。
+ 1、课程名称统一不加书名号。
2、项目名称、属地等信息如需体现在课程名称中,请放在课程名称信息 之后,如“时间管理(GROW180项目)”或“时间管理(B*)”确保首先 - 看到的是课程内容主题。
+ 看到的是课程内容主题。
3、同一课程如先后有多个版本,原则上仅开放最新版本,旧版本应停用 版本如必须以年份标明,请以“沟通技巧(2022年)”的方式呈现。
@@ -364,26 +364,26 @@
封面图
avatar
@@ -403,9 +403,9 @@
目标人群 @@ -413,10 +413,10 @@
@@ -433,10 +433,10 @@
@@ -450,8 +450,8 @@
内容分类 @@ -459,18 +459,18 @@
{ return triggerNode.parentNode || document.body; } " - v-model:value="fen_lei" - dropdownClassName="dropdown-style" - style="width: 440px" - placeholder="请选择" - :options="options2" - allowClear - showSearch + v-model:value="fen_lei" + dropdownClassName="dropdown-style" + style="width: 440px" + placeholder="请选择" + :options="options2" + allowClear + showSearch >
@@ -482,18 +482,18 @@
{ return triggerNode.parentNode || document.body; } " - v-model:value="chang_jin" - dropdownClassName="dropdown-style" - style="width: 440px" - placeholder="请选择" - :options="options3" - allowClear - showSearch + v-model:value="chang_jin" + dropdownClassName="dropdown-style" + style="width: 440px" + placeholder="请选择" + :options="options3" + allowClear + showSearch >
@@ -504,16 +504,16 @@
{ return triggerNode.parentNode || document.body; } " - v-model:value="tags_val" - mode="tags" - style="width: 440px; height: 40px" - placeholder="请输入按回车键创建成功" - :options="tagsOptions" + v-model:value="tags_val" + mode="tags" + style="width: 440px; height: 40px" + placeholder="请输入按回车键创建成功" + :options="tagsOptions" >
@@ -523,17 +523,18 @@
asterisk
授课教师
- - +
@@ -544,10 +545,10 @@
@@ -563,15 +564,15 @@
enclosure
添加附件 @@ -584,9 +585,9 @@
@@ -644,17 +645,17 @@
@@ -664,9 +665,7 @@
取消
-
- 确定 -
+
确定
已保存
@@ -683,30 +682,30 @@