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

This commit is contained in:
zhangyc
2022-12-04 06:45:57 +08:00
17 changed files with 2734 additions and 2446 deletions

View File

@@ -44,7 +44,7 @@ export default defineComponent({
const store = useStore(); const store = useStore();
const isLogin = ref(false); const isLogin = ref(false);
// console.log("router", router.getRoutes(), route); // console.log("router", router.getRoutes(), route);
console.log("版本0.11------------"); console.log("版本0.12------------");
const routes = computed(() => { const routes = computed(() => {
return router.getRoutes().filter((e) => e.meta?.isLink); return router.getRoutes().filter((e) => e.meta?.isLink);
}); });
@@ -69,9 +69,26 @@ export default defineComponent({
initDict("pathmapPic"); initDict("pathmapPic");
initDict("projectClass"); initDict("projectClass");
initDict("projectPic"); initDict("projectPic");
getMemberInfo();
getOrgTree(); 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() { async function getUserInfo() {
const userInfo = await api2.userInfo() const userInfo = await api2.userInfo()
store.commit("SET_USER", userInfo); store.commit("SET_USER", userInfo);

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com * @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-21 14:32:52 * @Date: 2022-11-21 14:32:52
* @LastEditors: lixg lixg@dongwu-inc.com * @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 * @FilePath: /fe-manage/src/api/config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */

View File

@@ -118,6 +118,7 @@
columnWidth: 20, columnWidth: 20,
selectedRowKeys: selectedRowKeys, selectedRowKeys: selectedRowKeys,
onChange: onSelectChange, onChange: onSelectChange,
preserveSelectedRowKeys: true,
}" }"
/> />
<div class="pa"> <div class="pa">
@@ -316,6 +317,7 @@
columnWidth: 30, columnWidth: 30,
selectedRowKeys: selectedRowKeys2, selectedRowKeys: selectedRowKeys2,
onChange: onSelectChange2, onChange: onSelectChange2,
preserveSelectedRowKeys: true,
}" }"
/> />
<div class="pa" style="margin-top: 20px"> <div class="pa" style="margin-top: 20px">
@@ -598,6 +600,14 @@ export default {
type: Number, type: Number,
default: null, default: null,
}, },
classify: {
type: String,
default: "",
},
selectProjectId: {
type: Number,
default: null,
},
}, },
setup(props, ctx) { setup(props, ctx) {
const store = useStore(); const store = useStore();
@@ -792,9 +802,35 @@ export default {
deleteAll(); deleteAll();
// console.log("expandedKeys", state.expandedKeys); // console.log("expandedKeys", state.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) => { const afterVisibleChange = (bool) => {
console.log("state", bool); console.log("state", bool);
if (bool) {
optionAuthPerm();
}
}; };
//获取组织树 //获取组织树
state.treeData = computed(() => { state.treeData = computed(() => {
@@ -866,12 +902,13 @@ export default {
//分页获取学员 //分页获取学员
const changePagination = (page) => { const changePagination = (page) => {
state.currentPage = page; state.currentPage = page;
console.log("1111111"); console.log("1111111", state.selectedRowKeys, state.choosepeople);
getMember(state.selectOrgId); getMember(state.selectOrgId);
}; };
//搜索学员 //搜索学员
const handleSearchStu = () => { const handleSearchStu = () => {
deleteDepSelect(); deleteDepSelect();
state.currentPage = 1;
state.currentPage2 = 1; state.currentPage2 = 1;
console.log("22222"); console.log("22222");
getMember(); getMember();
@@ -891,10 +928,20 @@ export default {
}; };
//快速选人 选中的数组 //快速选人 选中的数组
const onSelectChange = (selectedRowKeys, item) => { const onSelectChange = (selectedRowKeys, item) => {
// console.log("selectedRowKeys changed: ", selectedRowKeys,item); console.log("selectedRowKeys changed: ", selectedRowKeys, item);
state.selectedRowKeys.push(selectedRowKeys[selectedRowKeys.length - 1]); state.selectedRowKeys = selectedRowKeys;
state.choosepeople.unshift(item[item.length - 1]); state.choosepeople = item.reverse();
selectedsHeight(); 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) => { const deleteChoosePeople = (item) => {
@@ -920,7 +967,7 @@ export default {
resize.listenTo( resize.listenTo(
document.getElementById("ProjCheckship").querySelector("#selecteds"), document.getElementById("ProjCheckship").querySelector("#selecteds"),
function (ele) { function (ele) {
console.log("ele", ele.offsetHeight); console.log("ele", ele.clientHeight, ele.offsetHeight);
if (ele.offsetHeight > 160 && !state.showHidden) { if (ele.offsetHeight > 160 && !state.showHidden) {
state.showMore = true; state.showMore = true;
document document
@@ -1047,7 +1094,7 @@ export default {
} }
} }
// console.log("选中的部门2", state.selectedKeys1, state.chooseorganization); console.log("选中的部门2", state.selectedKeys1, state.chooseorganization);
}; };
//点击确认添加-判断是否显示确定弹窗 //点击确认添加-判断是否显示确定弹窗
const addOrgModal = () => { const addOrgModal = () => {
@@ -1070,19 +1117,19 @@ export default {
state.showOrgModal = false; state.showOrgModal = false;
}; };
//单个删除选中的 //单个删除选中的组织
const deleteChoosePeople1 = (item) => { const deleteChoosePeople1 = (item) => {
console.log("item", item); console.log("item", item, state.chooseorganization);
let arr = state.chooseorganization; let arr = state.chooseorganization;
for (let i = 0; i < arr.length; i++) { for (let i = 0; i < arr.length; i++) {
if (arr[i].key === item.key) { if (arr[i].id === item.id) {
arr.splice(i, 1); arr.splice(i, 1);
} }
} }
state.chooseorganization = arr; state.chooseorganization = arr;
let array = state.selectedKeys1; let array = state.selectedKeys1;
for (let i = 0; i < array.length; i++) { for (let i = 0; i < array.length; i++) {
if (array[i] === item.key) { if (array[i] === item.id) {
array.splice(i, 1); array.splice(i, 1);
} }
} }
@@ -1193,8 +1240,10 @@ export default {
//受众关联 选中的数组 //受众关联 选中的数组
const onSelectChange2 = (selectedRowKeys, item) => { const onSelectChange2 = (selectedRowKeys, item) => {
// console.log("selectedRowKeys changed: ", selectedRowKeys, item); // console.log("selectedRowKeys changed: ", selectedRowKeys, item);
state.selectedRowKeys2.push(selectedRowKeys[selectedRowKeys.length - 1]); state.selectedRowKeys2 = selectedRowKeys;
state.relationpeople.unshift(item[item.length - 1]); state.relationpeople = item.reverse();
// state.selectedRowKeys2.push(selectedRowKeys[selectedRowKeys.length - 1]);
// state.relationpeople.unshift(item[item.length - 1]);
selectedsHeight2(); selectedsHeight2();
}; };
@@ -1331,6 +1380,73 @@ export default {
ctx.emit("update:addAuthList", state.selectAllArr); ctx.emit("update:addAuthList", state.selectAllArr);
closeDrawer(); 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 { return {
...toRefs(state), ...toRefs(state),
@@ -1374,6 +1490,7 @@ export default {
resetOrg, resetOrg,
submitAuth, submitAuth,
optionAuthPerm,
}; };
}, },
}; };
@@ -1904,7 +2021,9 @@ export default {
margin-right: 32px; margin-right: 32px;
margin-left: 32px; margin-left: 32px;
min-height: 100px; min-height: 100px;
// height: 170px;
// overflow: hidden; // overflow: hidden;
flex-shrink: 0;
.chose { .chose {
// width: 64px; // width: 64px;
padding-left: 10px; padding-left: 10px;
@@ -1920,6 +2039,7 @@ export default {
color: rgba(56, 139, 225, 1); color: rgba(56, 139, 225, 1);
font-size: 12px; font-size: 12px;
position: relative; position: relative;
flex-shrink: 0;
.ch { .ch {
position: absolute; position: absolute;
width: 18px; width: 18px;

View File

@@ -133,6 +133,7 @@
<script> <script>
import { toRefs, reactive } from "vue"; import { toRefs, reactive } from "vue";
import * as api from "../../api/index1"; import * as api from "../../api/index1";
import { message } from "ant-design-vue";
export default { export default {
name: "ProjPowerList", name: "ProjPowerList",
props: { props: {
@@ -172,6 +173,7 @@ export default {
// }, // },
], ],
cancelAuthInfo: null, //取消授权id cancelAuthInfo: null, //取消授权id
cancelAuthState: null, //取消授权种类
}); });
const closeDrawer = () => { const closeDrawer = () => {
@@ -199,6 +201,7 @@ export default {
name: item.name, name: item.name,
}; };
state.cancelAuthInfo = obj; state.cancelAuthInfo = obj;
state.cancelAuthState = item.state;
}; };
const closeCancelModal = () => { const closeCancelModal = () => {
state.cancelModal = false; state.cancelModal = false;
@@ -364,7 +367,14 @@ export default {
: props.classify === "course" : props.classify === "course"
? 3 ? 3
: null, : null,
tag: 1, tag:
state.cancelAuthState === "归属权"
? 2
: state.cancelAuthState === "查看权"
? 3
: state.cancelAuthState === "管理权"
? 4
: null,
opt: 4, opt: 4,
refId: props.selectProjectId, refId: props.selectProjectId,
pageNo: 1, pageNo: 1,
@@ -373,7 +383,7 @@ export default {
groupList: [], groupList: [],
studentList: [state.cancelAuthInfo], studentList: [state.cancelAuthInfo],
}; };
console.log("取消权限名单obj", obj); console.log("取消权限名单obj", obj, state.cancelAuthState);
api api
.optionAuthPerm(obj) .optionAuthPerm(obj)
.then((res) => { .then((res) => {
@@ -381,6 +391,7 @@ export default {
if (res.data.code === 200) { if (res.data.code === 200) {
// console.log("取消授权成功", res.data.data); // console.log("取消授权成功", res.data.data);
optionAuthPerm(); optionAuthPerm();
message.success("取消授权成功");
closeCancelModal(); closeCancelModal();
} }
}) })

View File

@@ -28,13 +28,13 @@
<div class="nameinp"> <div class="nameinp">
<div class="namee">姓名</div> <div class="namee">姓名</div>
<a-input <a-input
v-model:value="name" v-model:value="nameSearch"
style="width: 270px; height: 40px; border-radius: 8px" style="width: 270px; height: 40px; border-radius: 8px"
placeholder="请输入姓名" placeholder="请输入姓名"
/> />
</div> </div>
<div class="btns"> <div class="btns">
<div class="btn1"> <div class="btn1" @click="handleSearchStu">
<div class="img1"> <div class="img1">
<img <img
src="../../assets/images/courseManage/search0.png" src="../../assets/images/courseManage/search0.png"
@@ -42,7 +42,7 @@
</div> </div>
<div class="wz">搜索</div> <div class="wz">搜索</div>
</div> </div>
<div class="btn2"> <div class="btn2" @click="resetStu">
<div class="img2"> <div class="img2">
<img <img
src="../../assets/images/courseManage/reset1.png" src="../../assets/images/courseManage/reset1.png"
@@ -242,7 +242,7 @@ export default {
valueSelect: null, //树形选择 valueSelect: null, //树形选择
valueSelectboe2: null, //boe树形选择 valueSelectboe2: null, //boe树形选择
name: "", nameSearch: "",
nameadd: "", nameadd: "",
nameaddd: "", nameaddd: "",
com: "", com: "",
@@ -317,6 +317,18 @@ export default {
ctx.emit("update:ProjOwnervisible", false); ctx.emit("update:ProjOwnervisible", false);
state.openKeys = []; state.openKeys = [];
state.isDisabled = true; state.isDisabled = true;
state.nameSearch = "";
state.tabledata = [];
state.currentPage = 1;
state.selectedKeys = [];
state.valueSelectboe = null;
state.choosepeople = []; //选中的组织名称
state.selectDepartment = null; //选中部门名称
state.showMore = false; //是否显示快速选人的查看更多
state.showHidden = false; //是否显示收回
state.selectedRowKeys = []; //表格选中的key
state.selectPeopleArr = []; //表格选中的人
}; };
const afterVisibleChange = (bool) => { const afterVisibleChange = (bool) => {
@@ -336,16 +348,22 @@ export default {
}); });
//获取选中部门的人员信息 //获取选中部门的人员信息
const getPeoples = () => { const getPeoples = () => {
if (!state.nameSearch && !state.selectedKeys[0]) {
state.tableDataTotal = 0;
return false;
}
// console.log("org", org);
let obj = { let obj = {
org: state.selectedKeys[0],
pageNo: state.currentPage, pageNo: state.currentPage,
pageSize: state.pageSize, pageSize: state.pageSize,
keyWord: state.nameSearch,
org: state.nameSearch ? null : state.selectedKeys[0],
}; };
if (!state.selectedKeys[0]) { // if (!state.selectedKeys[0]) {
state.tableDataTotal = 0; // state.tableDataTotal = 0;
return; // return;
} // }
// console.log("obj", obj); console.log("obj", obj);
api api
.getMemberInfo(obj) .getMemberInfo(obj)
.then((res) => { .then((res) => {
@@ -373,7 +391,26 @@ export default {
console.log("获取学员失败", err); console.log("获取学员失败", err);
}); });
}; };
//搜索学员
const handleSearchStu = () => {
// deleteDepSelect();
state.currentPage = 1;
console.log("22222");
getPeoples();
};
//重置
const resetStu = () => {
state.nameSearch = "";
state.currentPage = 1;
state.tableDataTotal = 0;
state.tabledata = [];
};
// //清空选择部门信息
// const deleteDepSelect = () => {
// state.selectedKeys = null;
// state.selectOrgId = null;
// state.selectOrgName = null;
// };
//分页 //分页
const changePagination = () => { const changePagination = () => {
getPeoples(); getPeoples();
@@ -610,6 +647,8 @@ export default {
changeOwnership, changeOwnership,
addAuth, addAuth,
removeClick, removeClick,
handleSearchStu,
resetStu,
}; };
}, },
}; };

View File

@@ -1,5 +1,10 @@
<template> <template>
<a-tree-select <a-tree-select
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="id" v-model:value="id"
style="width: 100%" style="width: 100%"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
@@ -11,58 +16,36 @@
label: 'name', label: 'name',
value: 'id', value: 'id',
}" }"
:disabled="viewDetail ? true : false" :disabled="disabled"
@change="change" @change="change"
dropdownClassName="treeDropdown" dropdownClassName="treeDropdown"
> >
</a-tree-select> </a-tree-select>
</template> </template>
<script> <script setup>
import {onMounted, reactive, toRefs, watch} from "vue"; import {computed, defineEmits, defineProps, onMounted, ref} from "vue";
import {useStore} from "vuex"; import {useStore} from "vuex";
export default { const store = useStore();
name: "OrgClass",
props: { const props = defineProps({
modelValue: { value: String
type: Number, })
}, const emit = defineEmits({})
name: {
type: String,
},
disabled: {
type: Boolean,
default: false
},
},
setup(props, ctx) {
const store = useStore();
const state = reactive({ const options = ref([])
options: [],
id: props.value
});
watch(state.id, () => {
ctx.emit('update:modelValue', state.id)
})
watch(props, () => {
if (props.modelValue !== state.id) {
state.id = props.modelValue
}
})
onMounted(() => {
state.options = [...store.state.orgtreeList]
})
function change(key, obj) { const id = computed(() => {
ctx.emit('update:name', obj[0]) return props.value
} })
onMounted(() => {
options.value = [...store.state.orgtreeList]
})
function change(key, obj) {
emit('update:name', obj[0])
emit('update:value', key)
}
return {
...toRefs(state),
change
};
},
};
</script> </script>

View File

@@ -1,55 +1,46 @@
<!-- 评估管理-创建评估页面 --> <!-- 评估管理-创建评估页面 -->
<template> <template>
<a-select <a-select
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="id" v-model:value="id"
placeholder="请选择分类" placeholder="请选择分类"
style="width: 100%" style="width: 100%"
:options="options" :options="options"
allowClear allowClear
@change="change"
:disabled="disabled" :disabled="disabled"
> >
</a-select> </a-select>
</template> </template>
<script> <script setup>
import {onMounted, reactive, toRefs, watch} from "vue"; import {computed, defineEmits, defineProps, onMounted, ref} from "vue";
import {useStore} from "vuex"; import {useStore} from "vuex";
export default { const store = useStore();
name: "ProjectClass",
props: { const props = defineProps({
modelValue: { value: String,
type: Number, disabled: String
}, })
disabled: { const emit = defineEmits({})
type: Boolean,
default: false
},
},
setup(props, ctx) {
const store = useStore();
const state = reactive({ const options = ref([])
options: [],
id: props.modelValue
});
watch(props, () => { const id = computed(() => {
if (props.modelValue !== state.id) { return props.value
state.id = props.modelValue })
}
}) onMounted(() => {
options.value = store.state.projectClass.map(e => ({value: parseInt(e.dictCode), label: e.dictName}))
watch(state.id,()=>{ })
ctx.emit('update:modelValue',state.id)
}) function change(key, obj) {
emit('update:name', obj[0])
emit('update:value', key)
}
onMounted(() => {
state.options = store.state.projectClass.map(e => ({value: parseInt(e.dictCode), label: e.dictName}))
})
return {
...toRefs(state),
};
},
};
</script> </script>

View File

@@ -1,45 +1,42 @@
<template> <template>
<a-select <a-select
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="id" v-model:value="id"
:options="options" :options="options"
style="width: 100%" style="width: 100%"
placeholder="请选择项目级别" placeholder="请选择项目级别"
@change="change"
:disabled="disabled" :disabled="disabled"
/> />
</template> </template>
<script> <script setup>
import {onMounted, reactive, toRefs, watch} from "vue"; import {computed, defineEmits, defineProps, onMounted, ref} from "vue";
import {useStore} from "vuex"; import {useStore} from "vuex";
export default {
name: "ProjectClass",
props: { const store = useStore();
modelValue: { const props = defineProps({
type: Number, value: String,
}, disabled: String
disabled: { })
type: Boolean,
default: false
},
},
setup(props, ctx) {
const store = useStore();
const state = reactive({ const id = computed(() => {
options: [], return props.value
id: props.modelValue })
});
watch(state.id, () => {
ctx.emit('update:modelValue', state.id)
})
onMounted(() => { const emit = defineEmits({})
state.options = store.state.projectLevel.map(e => ({value: parseInt(e.dictCode), label: e.dictName}))
}) const options = ref([])
return {
...toRefs(state), onMounted(() => {
}; options.value = store.state.projectLevel.map(e => ({value: parseInt(e.dictCode), label: e.dictName}))
}, })
};
function change(key) {
emit('update:value', key)
}
</script> </script>

View File

@@ -1,5 +1,10 @@
<template> <template>
<a-select <a-select
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="managerArray" v-model:value="managerArray"
:placeholder="placeholder" :placeholder="placeholder"
:filterOption="false" :filterOption="false"

View File

@@ -0,0 +1,122 @@
<template>
<a-select
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="managerArray"
:placeholder="placeholder"
:filterOption="true"
style="width: 100%"
:options="options"
allowClear
showSearch
:mode="mode"
:disabled="disabled"
@popupScroll="memberScroll"
@search="searchMember"
@change="change"
>
<template v-if="loading" #notFoundContent>
<a-spin size="small"/>
</template>
</a-select>
</template>
<script setup>
import {computed, defineEmits, defineProps, onMounted, ref, watch} from "vue";
import {scrollLoad, throttle} from "@/api/method";
import * as api1 from "@/api/index1";
import {useStore} from "vuex";
const props = defineProps({
value: {
type: String,
default: ''
},
name: {
type: String,
default: ''
},
disabled: Boolean,
placeholder: String,
mode: String
})
const store = useStore();
const managerArray = computed(() => {
return props.mode === 'select' ? props.value : props.value.split(',')
})
const emit = defineEmits({})
const options = ref([])
const memberParam = ref({keyWord: '', pageNo: 1, pageSize: 10})
const loading = ref(false)
watch(() => memberParam.value.keyWord, throttle(getSearchMember, 500))
watch(() => memberParam.value.pageNo, throttle(getPageMember, 500))
onMounted(() => {
console.log('onMounted')
if (props.value) {
options.value = [...(props.value + '').split(',').map((value, i) => ({
label: (props.name + '').split(',')[i],
value
})), ...store.state.memberInitInfo]
} else options.value = store.state.memberInitInfo
})
function getSearchMember() {
loading.value = true
options.value = []
getMemberData()
}
function getPageMember() {
loading.value = true
getMemberData()
}
function getMemberData() {
api1.getMemberInfo(memberParam.value).then((res) => {
const list = res.data.data.rows.filter(e => !(props.value + '').includes(e.id)).map(e => ({
label: e.realName,
value: e.id
}));
if (memberParam.value.pageNo === 1 && props.value) {
const arrManagerId = (props.value + '').split(',')
const arrManager = props.name.split(',')
options.value = [...arrManager.map((e, i) => ({label: e, value: arrManagerId[i]})), ...list]
} else options.value.push(...list)
loading.value = false
});
}
const memberScroll = (e) => {
let num = scrollLoad(e);
if (num === 2) {
memberParam.value.pageNo++;
}
};
//搜索学员
const searchMember = (keyWord) => {
keyWord && (memberParam.value = {keyWord, pageNo: 1, pageSize: 10});
};
function change(e, l) {
console.log('change', l)
if (Array.isArray(l)) {
emit('update:value', l.map(t => t.value).join(','))
emit('update:name', l.map(t => t.label).join(','))
} else {
emit('update:value', l.value)
emit('update:name', l.label)
}
}
</script>

View File

@@ -1,52 +1,43 @@
<template> <template>
<a-select <a-select
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="id" v-model:value="id"
:options="options" :options="options"
style="width: 100%" style="width: 100%"
placeholder="请选择分类" placeholder="请选择分类"
@change="change"
:disabled="disabled" :disabled="disabled"
/> />
</template> </template>
<script> <script setup>
import {onMounted, reactive, toRefs, watch} from "vue"; import {computed, defineEmits, defineProps, onMounted, ref} from "vue";
import {useStore} from "vuex"; import {useStore} from "vuex";
export default { const store = useStore();
name: "TrainClass",
props: { const props = defineProps({
modelValue: { value: String,
type: Number, disabled: String
}, })
disabled: {
type: Boolean,
default: false
},
},
setup(props, ctx) {
const store = useStore();
const state = reactive({ const id = computed(() => {
options: [], return props.value
id: props.modelValue })
});
watch(state.id, () => {
ctx.emit('update:modelValue', state.id)
})
watch(props, () => { const emit = defineEmits({})
if (props.modelValue !== state.id) {
state.id = props.modelValue
}
})
const options = ref([])
onMounted(() => {
options.value = store.state.projectSys.map(e => ({value: parseInt(e.dictCode), label: e.dictName}))
})
function change(key) {
emit('update:value', key)
}
onMounted(() => {
state.options = store.state.projectSys.map(e => ({value: parseInt(e.dictCode), label: e.dictName}))
})
return {
...toRefs(state),
};
},
};
</script> </script>

View File

@@ -31,6 +31,7 @@ export default createStore({
projectLevel: [],//项目级别 projectLevel: [],//项目级别
projectSys: [],//培训分类 projectSys: [],//培训分类
pathmapPic: [],//学习路径背景图 pathmapPic: [],//学习路径背景图
memberInitInfo: [],//学员默认
}, },
getters: {}, getters: {},
mutations: { mutations: {
@@ -55,6 +56,9 @@ export default createStore({
SET_DICT(state, {key, data}) { SET_DICT(state, {key, data}) {
state[key] = data state[key] = data
}, },
SET_MEMBER_INFO(state, data) {
state.memberInitInfo = data
},
SET_USER(state, userInfo) { SET_USER(state, userInfo) {
state.userInfo = userInfo state.userInfo = userInfo
}, },

File diff suppressed because it is too large Load Diff

View File

@@ -589,20 +589,20 @@
/> />
<!-- 查看权抽屉 --> <!-- 查看权抽屉 -->
<proj-check-ship <proj-check-ship
v-model:ProjCheckvisible="Queryvisible" v-model:ProjCheckvisible="showCheck"
:selectProjectId="selectPathId" v-model:selectProjectId="selectPathId"
v-model:addAuthList="addAuthList" v-model:addAuthList="addAuthList"
:authClassify="authClassify" v-model:authClassify="authClassify"
classify="learnPath" classify="learnPath"
/> />
<!-- 管理权抽屉 --> <!-- 管理权抽屉 -->
<proj-check-ship <!-- <proj-check-ship
v-model:ProjCheckvisible="Managevisible" v-model:ProjCheckvisible="Managevisible"
:selectProjectId="selectPathId" :selectProjectId="selectPathId"
v-model:addAuthList="addAuthList" v-model:addAuthList="addAuthList"
:authClassify="authClassify" :authClassify="authClassify"
classify="learnPath" classify="learnPath"
/> /> -->
<!-- 创建路径loading --> <!-- 创建路径loading -->
<!-- 更多背景图 v-model:visible="learnBgMore" --> <!-- 更多背景图 v-model:visible="learnBgMore" -->
@@ -733,6 +733,7 @@ export default {
PLvisible: false, //授权名单抽屉 PLvisible: false, //授权名单抽屉
Queryvisible: false, //查看权抽屉 Queryvisible: false, //查看权抽屉
Managevisible: false, //管理权抽屉 Managevisible: false, //管理权抽屉
showCheck: false,
value1: "", value1: "",
value2: "", value2: "",
@@ -991,12 +992,12 @@ export default {
const showQuery = (id) => { const showQuery = (id) => {
state.authClassify = 1; state.authClassify = 1;
state.selectPathId = id; state.selectPathId = id;
state.Queryvisible = true; state.showCheck = true;
}; };
const showManage = (id) => { const showManage = (id) => {
state.authClassify = 2; state.authClassify = 2;
state.selectPathId = id; state.selectPathId = id;
state.Managevisible = true; state.showCheck = true;
}; };
const getTableDate = (tableData) => { const getTableDate = (tableData) => {
let data = tableData; let data = tableData;
@@ -1713,6 +1714,7 @@ export default {
}); });
} }
); );
return { return {
...toRefs(state), ...toRefs(state),
selectProjectName, selectProjectName,

View File

@@ -98,7 +98,7 @@
<div class="taskmain">快速创建项目详情</div> <div class="taskmain">快速创建项目详情</div>
</div> </div>
<div class="second"> <div class="second">
<router-link :to="{ path: '/leveladddetail' }"> <div @click="totask">
<div <div
class="taskbox" class="taskbox"
style="background: linear-gradient(180deg, #fef3dd, #fffaf0)" style="background: linear-gradient(180deg, #fef3dd, #fffaf0)"
@@ -117,10 +117,10 @@
</div> </div>
<div class="centermain">快速添加任务/关卡</div> <div class="centermain">快速添加任务/关卡</div>
</div> </div>
</router-link> </div>
<div <div
class="taskbox" class="taskbox"
@click="showAddStu" @click="tostudent"
style="background: linear-gradient(180deg, #ddeaff, #f0f8fe)" style="background: linear-gradient(180deg, #ddeaff, #f0f8fe)"
> >
<div class="leftt"> <div class="leftt">
@@ -460,7 +460,7 @@
</div> </div>
<div class="time"> <div class="time">
<div class="timetext">开始时间</div> <div class="timetext">开始时间</div>
<div class="timetext">{{ item.beginTime }}</div> <div class="timetext">{{ item.startTime!==null?item.startTime[0]+'-'+ item.startTime[1]+'-'+item.startTime[2]:''}}</div>
</div> </div>
<div class="progress"> <div class="progress">
<div class="progresstext"> <div class="progresstext">
@@ -773,7 +773,7 @@
</div> </div>
<div class="btnbox" style="margin: 20px"> <div class="btnbox" style="margin: 20px">
<a-upload <a-upload
v-if="(docChecked==true)" v-if="docChecked == true"
v-model:file-list="fileList" v-model:file-list="fileList"
name="file" name="file"
action="/manageApi/file/upload" action="/manageApi/file/upload"
@@ -790,7 +790,11 @@
alt="" alt=""
/> />
</a-upload> </a-upload>
<div v-if="(docChecked==true)" class="btnbox" style="margin: 20px"> <div
v-if="docChecked == true"
class="btnbox"
style="margin: 20px"
>
<span style="color: #999999"> <span style="color: #999999">
支持pdf.ppt.pptx.doc.docx.xls.xlsx.jpeg.png.gif.zip 支持pdf.ppt.pptx.doc.docx.xls.xlsx.jpeg.png.gif.zip
</span> </span>
@@ -2115,6 +2119,15 @@ export default {
}); });
} }
); );
const totask = () => {
state.activeKey = "2";
};
const tostudent = () => {
state.activeKey = "3";
getStudent();
// state.activeKey1 = "8";
};
return { return {
...toRefs(state), ...toRefs(state),
...toRefs(levelList), ...toRefs(levelList),
@@ -2166,6 +2179,8 @@ export default {
setconfig, setconfig,
deFile, deFile,
deleteStu, deleteStu,
totask,
tostudent,
}; };
}, },
}; };

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff