Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop

This commit is contained in:
zhangyc
2022-12-11 11:55:07 +08:00
35 changed files with 3285 additions and 1437 deletions

View File

@@ -77,8 +77,7 @@
</div>
</div> -->
<div class="chooseLeft">
<div class="boeTree">
<div class="boeTreeTitle">BOE组织树</div>
<div class="boeTree" style="margin-top: 20px">
<a-tree
v-model:value="valueSelectboe"
class="treeMain"
@@ -179,7 +178,6 @@
</div> -->
</div>
<div class="boeTree">
<div class="boeTreeTitle">BOE组织树</div>
<a-tree
v-if="!isSearchOrg"
class="treeMain treeMain2"
@@ -417,7 +415,7 @@
<div
class="chose"
v-for="item in chooseorganization1"
:key="item.key"
:key="item.id"
>
<div>{{ item.name }}</div>
<div class="ch" @click="deleteChoosePeople1(item)"></div>
@@ -575,15 +573,11 @@
import {reactive, toRefs, onMounted, onUnmounted, computed} from "vue";
import elementResizeDetectorMaker from "element-resize-detector";
import {message} from "ant-design-vue";
// import { toDate } from "../../api/method";
import {useStore} from "vuex";
import {
traverseArr,
// deepClone,
// batchLoadList,
} from "../../utils/utils";
import * as api from "../../api/index1";
import {getStuList} from "../../api/index1";
export default {
name: "ProjCheckShip",
@@ -810,9 +804,9 @@ export default {
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
if (bool) {
props.type === 1 ? optionAuthPerm() : getStuentList()
}
// if (bool) {
// props.type === 1 ? optionAuthPerm() : getStuentList()
// }
};
//获取组织树
state.treeData = computed(() => {
@@ -903,26 +897,8 @@ export default {
console.log("selectedRowKeys changed: ", selectedRowKeys, item);
console.log("choosepeople : ", state.choosepeople);
state.selectedRowKeys = selectedRowKeys;
const se = state.studentList.map(e => e.id).join(',') || ''
const addItem = item.filter(e => (e && !se.includes(e.id + '')))
addItem.forEach(e => {
e.name = e.realName
})
const selectStr = selectedRowKeys.join(',')
console.log(selectStr)
state.studentList = state.studentList.filter(e => selectStr.includes(e.id + ''))
console.log(state.studentList)
state.choosepeople = [...addItem.reverse(), ...state.studentList];
state.choosepeople = item.map(e => ({...e, name: e.realName})).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) => {
@@ -1059,18 +1035,18 @@ export default {
// if (state.isSearchOrg) {
// searchOrg(e[0]);
// }
if (!k.node.treeChildList) {
state.selectedKeys1 = e.reverse();
if (k.selected) {
state.chooseorganization.unshift(k.node);
} else {
for (let i = 0; i < state.chooseorganization.length; i++) {
if (state.chooseorganization[i].key === k.node.key) {
state.chooseorganization.splice(i, 1);
}
}
}
}
state.selectedKeys1 = e.reverse();
state.chooseorganization = k.selectedNodes.reverse()
state.chooseorganization1 = k.selectedNodes.reverse()
// if (k.selected) {
// state.chooseorganization.unshift(k.node);
// } else {
// for (let i = 0; i < state.chooseorganization.length; i++) {
// if (state.chooseorganization[i].key === k.node.key) {
// state.chooseorganization.splice(i, 1);
// }
// }
// }
console.log("选中的部门2", state.selectedKeys1, state.chooseorganization);
};
//点击确认添加-判断是否显示确定弹窗
@@ -1342,15 +1318,15 @@ export default {
closeDrawer();
};
//获取学员列表
const getStuentList = () => {
getStuList({
refType: {learnPath: 1, project: 2, course: 3, addstudent: 2}[props.classify],
refId: props.selectProjectId,
extId: 0
}).then(res => {
initResp(res)
})
}
// const getStuentList = () => {
// getStuList({
// refType: {learnPath: 1, project: 2, course: 3, addstudent: 2}[props.classify],
// refId: props.selectProjectId,
// extId: 0
// }).then(res => {
// initResp(res)
// })
// }
function initResp(res) {
let studentArr = res.data.data.studentList;