mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-21 08:46:46 +08:00
Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
<div class="navTop">
|
||||
<div class="navTopMain">
|
||||
<img
|
||||
style="width: 205px; height: 29px; margin-left: 37px; margin-top: 22px"
|
||||
src="../assets/images/navtop/logo.png"
|
||||
style="width: 205px; height: 29px; margin-left: 37px; margin-top: 22px"
|
||||
src="../assets/images/navtop/logo.png"
|
||||
/>
|
||||
<div class="navTopRight">
|
||||
<div class="role">
|
||||
@@ -11,10 +11,10 @@
|
||||
<div class="roleArrow"></div>
|
||||
<div class="roleItems">
|
||||
<div
|
||||
v-for="(value, index) in roleList"
|
||||
:key="index"
|
||||
class="roleItem"
|
||||
@click="changeRole(value)"
|
||||
v-for="(value, index) in roleList"
|
||||
:key="index"
|
||||
class="roleItem"
|
||||
@click="changeRole(value)"
|
||||
>
|
||||
{{ value.name }}
|
||||
</div>
|
||||
@@ -22,14 +22,14 @@
|
||||
</div>
|
||||
<div class="user">
|
||||
<img
|
||||
style="
|
||||
style="
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-left: 8px;
|
||||
border-radius: 15px;
|
||||
margin-right: 10px;
|
||||
"
|
||||
:src="avatar"
|
||||
:src="avatar"
|
||||
/>
|
||||
<div style="margin-right: 20px">{{ username }}</div>
|
||||
</div>
|
||||
@@ -47,20 +47,21 @@
|
||||
</div> -->
|
||||
<div class="signOutMain" @click="logOut">
|
||||
<img
|
||||
style="width: 27px; height: 27px"
|
||||
src="../assets/images/navtop/signout.png"
|
||||
style="width: 27px; height: 27px"
|
||||
src="../assets/images/navtop/signout.png"
|
||||
/>
|
||||
<span class="signOut">登出</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<down-load v-model:downloadVisible="visible" />
|
||||
<down-load v-model:downloadVisible="visible"/>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
import {reactive, toRefs} from "vue";
|
||||
import DownLoad from "../components/drawers/DownLoad";
|
||||
import * as api from "../api/index1";
|
||||
|
||||
export default {
|
||||
name: "NavTop",
|
||||
components: {
|
||||
@@ -100,24 +101,32 @@ export default {
|
||||
};
|
||||
const getUser = () => {
|
||||
api
|
||||
.getUser()
|
||||
.then((res) => {
|
||||
console.log("获取登录信息成功", res);
|
||||
if (res.data.code === 200) {
|
||||
state.username = res.data.data.realName;
|
||||
// state.avatar = res.data.data.avatar
|
||||
// ? res.data.data.avatar
|
||||
// : require("../assets/images/avatar.png");
|
||||
state.avatar = require("../assets/images/avatar.png");
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取登录信息失败", err);
|
||||
});
|
||||
.getUser()
|
||||
.then((res) => {
|
||||
console.log("获取登录信息成功", res);
|
||||
if (res.data.code === 200) {
|
||||
state.username = res.data.data.realName;
|
||||
// state.avatar = res.data.data.avatar
|
||||
// ? res.data.data.avatar
|
||||
// : require("../assets/images/avatar.png");
|
||||
state.avatar = require("../assets/images/avatar.png");
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取登录信息失败", err);
|
||||
});
|
||||
};
|
||||
getUser();
|
||||
|
||||
const logOut = () => {
|
||||
localStorage.removeItem('faceclassPic');
|
||||
localStorage.removeItem('faceclassClass');
|
||||
localStorage.removeItem('faceclassScene');
|
||||
localStorage.removeItem('projectLevel');
|
||||
localStorage.removeItem('projectSys');
|
||||
localStorage.removeItem('pathmapPic');
|
||||
localStorage.removeItem('projectClass');
|
||||
localStorage.removeItem('projectPic');
|
||||
window.open("https://u-pre.boe.com/web/", "_self");
|
||||
};
|
||||
return {
|
||||
@@ -142,9 +151,11 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
|
||||
.navTopRight {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.role {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -154,6 +165,7 @@ export default {
|
||||
line-height: 36px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
|
||||
.roleArrow {
|
||||
width: 13px;
|
||||
height: 7px;
|
||||
@@ -161,6 +173,7 @@ export default {
|
||||
background-image: url(../assets/images/navtop/down.png);
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.roleItems {
|
||||
width: 109px;
|
||||
height: 90px;
|
||||
@@ -174,22 +187,27 @@ export default {
|
||||
display: none;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.roleItem {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: rgba(79, 81, 86, 1);
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.roleItem:hover {
|
||||
color: #4ea6ff;
|
||||
}
|
||||
}
|
||||
|
||||
.role:hover .roleItems {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.role:hover .roleArrow {
|
||||
background-image: url(../assets/images/navtop/up.png);
|
||||
}
|
||||
|
||||
.user {
|
||||
margin-left: 37px;
|
||||
display: flex;
|
||||
@@ -199,12 +217,14 @@ export default {
|
||||
color: #b3bdc4;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.signOutMain {
|
||||
cursor: pointer;
|
||||
margin-right: 29px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.signOut {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<button class="xkbtn" @click="showDrawerSelFacet">
|
||||
{{ chooseCourse == null ? "选择" : 重选 }}面授课
|
||||
{{ chooseCourse == null ? "选择" : "重选" }}面授课
|
||||
</button>
|
||||
<div v-if="chooseCourse">
|
||||
<a-tag closable color="processing" @close="logC">
|
||||
@@ -209,7 +209,7 @@
|
||||
<button class="xkbtn">配置</button>
|
||||
<div v-if="EditWorkId > 0">
|
||||
<a-tag closable color="processing" @close="logW">
|
||||
<span style="font-size:14px;line-height: 33px;">删除作业{{EditWorkId}}</span>
|
||||
<span style="font-size:14px;line-height: 33px;">删除作业</span>
|
||||
</a-tag>
|
||||
</div>
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
<button class="xkbtn">配置</button>
|
||||
<div v-if="EditTestId > 0">
|
||||
<a-tag closable color="processing" @close="logT">
|
||||
<span style="font-size:14px;line-height: 33px;">删除考试{{EditTestId}}</span>
|
||||
<span style="font-size:14px;line-height: 33px;">删除考试</span>
|
||||
</a-tag>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<div class="btnbox">
|
||||
<a-form-item has-feedback label="作业名称" name="workName">
|
||||
<a-input
|
||||
|
||||
v-model:value="formState.workName"
|
||||
style="width: 424px; height: 32px; margin-left: 35px"
|
||||
placeholder="请输入作业名称"
|
||||
@@ -49,10 +50,12 @@
|
||||
placeholder="请输入作业要求"
|
||||
autocomplete="off"
|
||||
allow-clear
|
||||
|
||||
:rows="6"
|
||||
style="margin-left: 35px"
|
||||
show-count :maxlength="200"
|
||||
/></div>
|
||||
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
<div class="signbox"></div>
|
||||
<div class="btnbox">
|
||||
<button class="xkbtn" @click="showAssessment">选择评估</button>
|
||||
<div v-if="(assessmentId !== '0')">
|
||||
<div v-if="(assessmentId > 0)">
|
||||
<a-tag closable @close="removePG" color="processing">
|
||||
<span style="font-size: 14px; line-height: 33px"
|
||||
>删除评估</span
|
||||
@@ -596,10 +596,11 @@ export default {
|
||||
};
|
||||
const showAssessment = () => {
|
||||
state.assessmentVisible = true;
|
||||
console.log("hshs======", state.assessmentVisible);
|
||||
|
||||
};
|
||||
//创建直播
|
||||
const updateLiveBroadcast = () => {
|
||||
console.log("hshs======", state.memberValue);
|
||||
if (!state.inputV1) {
|
||||
message.destroy();
|
||||
return message.warning("请输入直播名称");
|
||||
@@ -612,6 +613,14 @@ export default {
|
||||
message.destroy();
|
||||
return message.warning("请输入直播时长");
|
||||
}
|
||||
if (state.memberValue.value=="") {
|
||||
message.destroy();
|
||||
return message.warning("请选择授课教师");
|
||||
}
|
||||
if (!state.imageUrl) {
|
||||
message.destroy();
|
||||
return message.warning("请上传封面");
|
||||
}
|
||||
const regular = /^[+]{0,1}(\d+)$/;
|
||||
if (!regular.test(state.inputV2)) {
|
||||
message.destroy();
|
||||
|
||||
@@ -115,26 +115,20 @@
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown> -->
|
||||
<span style="margin-left: 10px">
|
||||
<a-tag
|
||||
class="tag-style"
|
||||
v-if="paperName != ''"
|
||||
:closable="true"
|
||||
@close="delTag"
|
||||
>{{ paperName }}</a-tag
|
||||
>
|
||||
<!-- <a-tag
|
||||
class="tag-style"
|
||||
v-for="item in choosedTestList"
|
||||
:closable="true"
|
||||
@close="closeTag(item.key)"
|
||||
:key="item.key"
|
||||
>{{ item.value }}</a-tag
|
||||
> -->
|
||||
</span>
|
||||
|
||||
<a-tag v-if="paperName != ''" closable color="processing" @close="delTag">
|
||||
<span style="font-size:14px;line-height: 33px;">删除考试</span>
|
||||
</a-tag>
|
||||
|
||||
|
||||
</a-form-item>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="main_item">
|
||||
<div class="btnbox">
|
||||
<a-form-item has-feedback label="考试时间" name="choosedTime">
|
||||
@@ -525,6 +519,7 @@ export default {
|
||||
return Promise.reject("请选择时间");
|
||||
}
|
||||
};
|
||||
|
||||
let checkExaminationDuration = async (_rule, value) => {
|
||||
if (!value) {
|
||||
return Promise.reject("请输入考试时长");
|
||||
@@ -674,7 +669,7 @@ export default {
|
||||
state.paperName = "";
|
||||
};
|
||||
const queryTest = () => {
|
||||
state.addLoading = true;
|
||||
// state.addLoading = true;
|
||||
queryExaminationDetailById({ examinationId: props.EditTestId })
|
||||
.then((res) => {
|
||||
formState.examinationName = res.data.data.examinationName;
|
||||
@@ -729,9 +724,13 @@ export default {
|
||||
scoringModel: formState.scoringModel,
|
||||
showAnalysis: formState.showAnalysis,
|
||||
showAnswers: formState.showAnswers,
|
||||
examinationTestId: state.id,
|
||||
examinationTestName: state.testName,
|
||||
examinationTestId: state.paperId,
|
||||
examinationTestName: state.paperName,
|
||||
};
|
||||
if(!(state.paperId >0)){
|
||||
message.destroy();
|
||||
return message.error("请选择考试");
|
||||
}
|
||||
if (props.edit) {
|
||||
// 编辑任务
|
||||
updateExamination(obj)
|
||||
@@ -740,6 +739,7 @@ export default {
|
||||
closeDrawer();
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error(`编辑失败`);
|
||||
});
|
||||
} else {
|
||||
@@ -750,6 +750,7 @@ export default {
|
||||
closeDrawer();
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error(`创建失败`);
|
||||
});
|
||||
}
|
||||
@@ -860,6 +861,7 @@ export default {
|
||||
state.id = value.id;
|
||||
state.testName = value.testName;
|
||||
};
|
||||
|
||||
return {
|
||||
formState,
|
||||
afterVisibleChange,
|
||||
@@ -885,6 +887,7 @@ export default {
|
||||
chooseTest,
|
||||
closeTag,
|
||||
getData,
|
||||
|
||||
...toRefs(state),
|
||||
};
|
||||
},
|
||||
|
||||
@@ -79,7 +79,6 @@
|
||||
<div class="chooseLeft">
|
||||
<div class="boeTree">
|
||||
<div class="boeTreeTitle">BOE组织树</div>
|
||||
|
||||
<a-tree
|
||||
v-model:value="valueSelectboe"
|
||||
class="treeMain"
|
||||
@@ -110,14 +109,14 @@
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tablecolumns"
|
||||
:data-source="tabledata"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
@expand="expandTable"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
rowKey="id"
|
||||
:row-selection="{
|
||||
columnWidth: 20,
|
||||
selectedRowKeys: selectedRowKeys,
|
||||
onChange: onSelectChange,
|
||||
preserveSelectedRowKeys: true,
|
||||
}"
|
||||
/>
|
||||
<div class="pa">
|
||||
@@ -206,7 +205,6 @@
|
||||
>
|
||||
<template #suffixIcon></template>
|
||||
</a-tree>
|
||||
|
||||
<a-tree
|
||||
v-else-if="isSearchOrg"
|
||||
class="treeMain treeMain2"
|
||||
@@ -288,7 +286,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="line">
|
||||
<div class="inline">
|
||||
<div class="left1">
|
||||
@@ -316,6 +313,7 @@
|
||||
columnWidth: 30,
|
||||
selectedRowKeys: selectedRowKeys2,
|
||||
onChange: onSelectChange2,
|
||||
preserveSelectedRowKeys: true,
|
||||
}"
|
||||
/>
|
||||
<div class="pa" style="margin-top: 20px">
|
||||
@@ -356,7 +354,7 @@
|
||||
<div class="selecteds" id="selecteds">
|
||||
<!-- 遍历生成 -->
|
||||
<div class="chose" v-for="item in choosepeople" :key="item.key">
|
||||
<div>{{ item.name }}</div>
|
||||
<div>{{ item.name || item.realName }}</div>
|
||||
<div class="ch" @click="deleteChoosePeople(item)"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -541,7 +539,6 @@
|
||||
<button class="btn2" @click="submitAuth">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 确认添加部门弹窗 -->
|
||||
<a-modal
|
||||
v-model:visible="showOrgModal"
|
||||
@@ -574,7 +571,6 @@
|
||||
<!-- 确认添加部门弹窗 -->
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted, onUnmounted, computed } from "vue";
|
||||
import elementResizeDetectorMaker from "element-resize-detector";
|
||||
@@ -598,6 +594,14 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
classify: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
selectProjectId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
@@ -606,30 +610,24 @@ export default {
|
||||
//快速选人
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
tableDataTotal: 0,
|
||||
tableDataTotal: 100,
|
||||
nameSearch: "", //搜索名称
|
||||
|
||||
loading: false,
|
||||
//受众
|
||||
pageSize2: 10,
|
||||
currentPage2: 1,
|
||||
tableDataTotal2: 0,
|
||||
audienceName: "",
|
||||
|
||||
pageSize1: 10,
|
||||
currentPage1: 1,
|
||||
tableDataTotal1: 0,
|
||||
|
||||
selectedRowKeys1: [],
|
||||
|
||||
activeKey: "1",
|
||||
value: [], //级联选择框
|
||||
choosevalue: null, //受众选择
|
||||
valueSelect: null, //树形选择
|
||||
|
||||
valueSelectboe2: null, //boe树形选择
|
||||
|
||||
nameadd: "",
|
||||
|
||||
searchOrgName: "", //搜索组织
|
||||
//组织树
|
||||
treeData: [],
|
||||
@@ -646,8 +644,8 @@ export default {
|
||||
tablecolumns: [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
dataIndex: "realName",
|
||||
key: "realName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
@@ -655,8 +653,8 @@ export default {
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "numb",
|
||||
key: "numb",
|
||||
dataIndex: "userNo",
|
||||
key: "userNo",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
@@ -664,8 +662,8 @@ export default {
|
||||
},
|
||||
{
|
||||
title: "归属组织",
|
||||
dataIndex: "guishu",
|
||||
key: "guishu",
|
||||
dataIndex: "orgName",
|
||||
key: "orgName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
@@ -673,15 +671,14 @@ export default {
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "bum",
|
||||
key: "bum",
|
||||
dataIndex: "departName",
|
||||
key: "departName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
],
|
||||
|
||||
//受众关联table数据
|
||||
tabledata2: [
|
||||
// {
|
||||
@@ -761,46 +758,59 @@ export default {
|
||||
selectOrgName: null, //选中的组织名称
|
||||
//快速选人-------------------------------------
|
||||
//添加组织-------------------------------------
|
||||
|
||||
selectedKeys1: [], //选中部门的key
|
||||
chooseorganization: [], //添加组织的选择组织
|
||||
chooseorganization1: [], //显示到右侧的数组
|
||||
showMore1: false, //是否显示添加组织的查看更多
|
||||
showHidden1: false, //是否显示添加组织的收回
|
||||
|
||||
showOrgModal: false, //确认弹窗
|
||||
|
||||
isSearchOrg: false,
|
||||
treeData2: [],
|
||||
//添加组织-------------------------------------
|
||||
|
||||
//受众关联-------------------------------------
|
||||
relationpeople: [], //总的数组
|
||||
showMore2: false, //是否显示快速选人的查看更多
|
||||
showHidden2: false, //是否显示收回
|
||||
selectedRowKeys2: [], //表格选中的key
|
||||
//受众关联-------------------------------------
|
||||
|
||||
selectAllArr: null, //所有选中
|
||||
|
||||
expandedKeys: [], //展开的节点
|
||||
});
|
||||
|
||||
const closeDrawer = () => {
|
||||
state.activeKey = "1";
|
||||
ctx.emit("update:ProjCheckvisible", false);
|
||||
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(() => {
|
||||
return store.state.orgtreeList ? store.state.orgtreeList : [];
|
||||
});
|
||||
|
||||
const getClientHeight = () => {
|
||||
state.screenHeight = document.body.clientHeight;
|
||||
};
|
||||
@@ -808,19 +818,14 @@ export default {
|
||||
// const getClientHeightSelecteds = () => {
|
||||
// state.selectedsHeight = document.getElementById('selecteds').offsetHeight
|
||||
// console.log('selectedsHeight',state.selectedsHeight)
|
||||
|
||||
// };
|
||||
onMounted(() => {
|
||||
// console.log("11111", 1);
|
||||
window.addEventListener("resize", getClientHeight, false);
|
||||
// window.addEventListener("resize", getClientHeightSelecteds, false);
|
||||
// judgeUrl();
|
||||
state.tabledata = store.state.memberInitInfo;
|
||||
});
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener("resize", getClientHeight, false);
|
||||
// window.removeEventListener("resize", getClientHeightSelecteds, false);
|
||||
});
|
||||
|
||||
// 开始 快速选人------------------------------------------------------------------
|
||||
//选中部门
|
||||
const departmentSelect = (e, k) => {
|
||||
@@ -836,11 +841,10 @@ export default {
|
||||
};
|
||||
//获取学员
|
||||
const getMember = async (org) => {
|
||||
if (!state.nameSearch && !org) {
|
||||
return false;
|
||||
}
|
||||
console.log("org", org);
|
||||
const item1 = await api
|
||||
// if (!state.nameSearch && !org) {
|
||||
// return false;
|
||||
// }
|
||||
await api
|
||||
.getMemberInfo({
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
@@ -848,30 +852,28 @@ export default {
|
||||
org: state.nameSearch ? null : org,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
console.log("获取学员", res.data);
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
return res.data.data.rows;
|
||||
}
|
||||
state.tabledata = res.data.data.rows;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
});
|
||||
|
||||
state.tabledata = traverseArr(item1, {
|
||||
key: "id",
|
||||
name: "realName",
|
||||
bum: "depName",
|
||||
numb: "id",
|
||||
guishu: "orgName",
|
||||
});
|
||||
};
|
||||
// state.tabledata = traverseArr(item1, {
|
||||
// key: "id",
|
||||
// name: "realName",
|
||||
// bum: "depName",
|
||||
// numb: "id",
|
||||
// guishu: "orgName",
|
||||
// });
|
||||
// };
|
||||
//分页获取学员
|
||||
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 +893,19 @@ 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 +931,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
|
||||
@@ -962,9 +973,7 @@ export default {
|
||||
.getElementById("ProjCheckship")
|
||||
.querySelector("#selectedsBox").style.height = "160px";
|
||||
};
|
||||
|
||||
// 结束 快速选人------------------------------------------------------------------
|
||||
|
||||
// 开始 添加组织------------------------------------------------------------------
|
||||
//搜索组织
|
||||
const searchOrg = (id) => {
|
||||
@@ -1002,7 +1011,6 @@ export default {
|
||||
return store.state.orgtreeList ? store.state.orgtreeList : [];
|
||||
});
|
||||
};
|
||||
|
||||
// //搜索组织
|
||||
// const searchOrg = () => {
|
||||
// let treeTitle = document
|
||||
@@ -1027,7 +1035,6 @@ export default {
|
||||
// message.warning("请输入组织名称");
|
||||
// }
|
||||
// };
|
||||
|
||||
//选中部门
|
||||
const departmentSelect1 = (e, k) => {
|
||||
console.log("选中的部门", e, k);
|
||||
@@ -1046,8 +1053,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// console.log("选中的部门2", state.selectedKeys1, state.chooseorganization);
|
||||
console.log("选中的部门2", state.selectedKeys1, state.chooseorganization);
|
||||
};
|
||||
//点击确认添加-判断是否显示确定弹窗
|
||||
const addOrgModal = () => {
|
||||
@@ -1069,27 +1075,25 @@ export default {
|
||||
const closeOrgModal = () => {
|
||||
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);
|
||||
}
|
||||
}
|
||||
state.selectedKeys1 = array;
|
||||
console.log("state.selectedKeys1", state.selectedKeys1);
|
||||
};
|
||||
|
||||
//根据右侧快速选人高度,判断是否显示更多
|
||||
const selectedsHeight1 = () => {
|
||||
let resize = elementResizeDetectorMaker();
|
||||
@@ -1138,11 +1142,8 @@ export default {
|
||||
.getElementById("ProjCheckship")
|
||||
.querySelector("#selectedsBox1").style.height = "160px";
|
||||
};
|
||||
|
||||
// 结束 添加组织------------------------------------------------------------------
|
||||
|
||||
// 开始 受众关联------------------------------------------------------------------
|
||||
|
||||
//获取受众
|
||||
const getAudienceInfo = async () => {
|
||||
const item1 = await api
|
||||
@@ -1189,13 +1190,13 @@ export default {
|
||||
state.audienceName = "";
|
||||
getAudienceInfo();
|
||||
};
|
||||
|
||||
//受众关联 选中的数组
|
||||
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();
|
||||
};
|
||||
//单个删除选中的人
|
||||
@@ -1263,9 +1264,7 @@ export default {
|
||||
.getElementById("ProjCheckship")
|
||||
.querySelector("#selectedsBox2").style.height = "160px";
|
||||
};
|
||||
|
||||
// 结束 受众关联------------------------------------------------------------------
|
||||
|
||||
//全部清除
|
||||
const deleteAll = () => {
|
||||
//快速选人-------------------------------------
|
||||
@@ -1278,37 +1277,31 @@ export default {
|
||||
state.selectOrgName = null; //选中的组织名称
|
||||
//快速选人-------------------------------------
|
||||
//添加组织-------------------------------------
|
||||
|
||||
state.selectedKeys1 = []; //选中部门的key
|
||||
state.chooseorganization = []; //添加组织的选择组织
|
||||
state.chooseorganization1 = []; //显示到右侧的数组
|
||||
state.showMore1 = false; //是否显示添加组织的查看更多
|
||||
state.showHidden1 = false; //是否显示添加组织的收回
|
||||
|
||||
state.showOrgModal = false; //确认弹窗
|
||||
//添加组织-------------------------------------
|
||||
|
||||
//受众关联-------------------------------------
|
||||
state.relationpeople = []; //总的数组
|
||||
state.showMore2 = false; //是否显示快速选人的查看更多
|
||||
state.showHidden2 = false; //是否显示收回
|
||||
state.selectedRowKeys2 = []; //表格选中的key
|
||||
//受众关联-------------------------------------
|
||||
|
||||
state.selectAllArr = null; //所有选中
|
||||
};
|
||||
|
||||
//确定添加授权
|
||||
const submitAuth = () => {
|
||||
let choosepeople = [];
|
||||
state.choosepeople.map((value) => {
|
||||
let obj = {
|
||||
id: value.key,
|
||||
name: value.name,
|
||||
id: value.id,
|
||||
name: value.realName,
|
||||
};
|
||||
choosepeople.push(obj);
|
||||
});
|
||||
|
||||
let chooseorganization1 = [];
|
||||
state.chooseorganization1.map((value) => {
|
||||
let obj = {
|
||||
@@ -1317,7 +1310,6 @@ export default {
|
||||
};
|
||||
chooseorganization1.push(obj);
|
||||
});
|
||||
|
||||
let relationpeople = [];
|
||||
state.relationpeople.map((value) => {
|
||||
let obj = {
|
||||
@@ -1331,7 +1323,71 @@ 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),
|
||||
afterVisibleChange,
|
||||
@@ -1344,7 +1400,6 @@ export default {
|
||||
selectedsHeight,
|
||||
morePeopleShow,
|
||||
morePeopleHidden,
|
||||
|
||||
departmentSelect1,
|
||||
addOrgModal,
|
||||
addOrg,
|
||||
@@ -1353,32 +1408,26 @@ export default {
|
||||
morePeopleShow1,
|
||||
morePeopleHidden1,
|
||||
deleteChoosePeople1,
|
||||
|
||||
selectedsHeight2,
|
||||
morePeopleShow2,
|
||||
morePeopleHidden2,
|
||||
deleteChoosePeople2,
|
||||
|
||||
deleteAll,
|
||||
|
||||
searchOrg,
|
||||
changePagination,
|
||||
handleSearchStu,
|
||||
resetStu,
|
||||
|
||||
getAudienceInfo,
|
||||
changePagination1,
|
||||
searchAudienceInfo,
|
||||
resetAudienceInfo,
|
||||
|
||||
resetOrg,
|
||||
|
||||
submitAuth,
|
||||
optionAuthPerm,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.ProjCheckship {
|
||||
.ant-drawer-content-wrapper {
|
||||
@@ -1527,42 +1576,35 @@ export default {
|
||||
align-items: center;
|
||||
margin-top: 20px;
|
||||
border: 1px solid #c3e6fc;
|
||||
|
||||
.inline {
|
||||
width: 95%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
// background-color: #bfa;
|
||||
.left1 {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.img {
|
||||
width: 14px;
|
||||
height: 15px;
|
||||
background-image: url(../../assets/images/leveladd/gan.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #999ba3;
|
||||
}
|
||||
|
||||
.text2 {
|
||||
color: #4ea6ff;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.text3 {
|
||||
color: #999ba3;
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.right1 {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
@@ -1649,7 +1691,6 @@ export default {
|
||||
th.h {
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
@@ -1684,7 +1725,6 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tab2 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -1700,7 +1740,6 @@ export default {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.t1 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -1748,7 +1787,6 @@ export default {
|
||||
font-size: 14px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ant-select-dropdown {
|
||||
min-width: 800px !important;
|
||||
}
|
||||
@@ -1904,7 +1942,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 +1960,7 @@ export default {
|
||||
color: rgba(56, 139, 225, 1);
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
.ch {
|
||||
position: absolute;
|
||||
width: 18px;
|
||||
@@ -1977,7 +2018,6 @@ export default {
|
||||
width: 7px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.changetreedropdownboe {
|
||||
width: 240px !important;
|
||||
border-radius: 5px;
|
||||
@@ -2078,7 +2118,6 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
.btnText {
|
||||
@@ -2106,4 +2145,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -133,6 +133,7 @@
|
||||
<script>
|
||||
import { toRefs, reactive } from "vue";
|
||||
import * as api from "../../api/index1";
|
||||
import { message } from "ant-design-vue";
|
||||
export default {
|
||||
name: "ProjPowerList",
|
||||
props: {
|
||||
@@ -172,6 +173,7 @@ export default {
|
||||
// },
|
||||
],
|
||||
cancelAuthInfo: null, //取消授权id
|
||||
cancelAuthState: null, //取消授权种类
|
||||
});
|
||||
|
||||
const closeDrawer = () => {
|
||||
@@ -199,6 +201,7 @@ export default {
|
||||
name: item.name,
|
||||
};
|
||||
state.cancelAuthInfo = obj;
|
||||
state.cancelAuthState = item.state;
|
||||
};
|
||||
const closeCancelModal = () => {
|
||||
state.cancelModal = false;
|
||||
@@ -364,7 +367,14 @@ export default {
|
||||
: props.classify === "course"
|
||||
? 3
|
||||
: null,
|
||||
tag: 1,
|
||||
tag:
|
||||
state.cancelAuthState === "归属权"
|
||||
? 2
|
||||
: state.cancelAuthState === "查看权"
|
||||
? 3
|
||||
: state.cancelAuthState === "管理权"
|
||||
? 4
|
||||
: null,
|
||||
opt: 4,
|
||||
refId: props.selectProjectId,
|
||||
pageNo: 1,
|
||||
@@ -373,7 +383,7 @@ export default {
|
||||
groupList: [],
|
||||
studentList: [state.cancelAuthInfo],
|
||||
};
|
||||
console.log("取消权限名单obj", obj);
|
||||
console.log("取消权限名单obj", obj, state.cancelAuthState);
|
||||
api
|
||||
.optionAuthPerm(obj)
|
||||
.then((res) => {
|
||||
@@ -381,6 +391,7 @@ export default {
|
||||
if (res.data.code === 200) {
|
||||
// console.log("取消授权成功", res.data.data);
|
||||
optionAuthPerm();
|
||||
message.success("取消授权成功");
|
||||
closeCancelModal();
|
||||
}
|
||||
})
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
<div class="nameinp">
|
||||
<div class="namee">姓名:</div>
|
||||
<a-input
|
||||
v-model:value="name"
|
||||
v-model:value="nameSearch"
|
||||
style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div class="btn1">
|
||||
<div class="btn1" @click="handleSearchStu">
|
||||
<div class="img1">
|
||||
<img
|
||||
src="../../assets/images/courseManage/search0.png"
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn2">
|
||||
<div class="btn2" @click="resetStu">
|
||||
<div class="img2">
|
||||
<img
|
||||
src="../../assets/images/courseManage/reset1.png"
|
||||
@@ -242,7 +242,7 @@ export default {
|
||||
valueSelect: null, //树形选择
|
||||
|
||||
valueSelectboe2: null, //boe树形选择
|
||||
name: "",
|
||||
nameSearch: "",
|
||||
nameadd: "",
|
||||
nameaddd: "",
|
||||
com: "",
|
||||
@@ -317,6 +317,18 @@ export default {
|
||||
ctx.emit("update:ProjOwnervisible", false);
|
||||
state.openKeys = [];
|
||||
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) => {
|
||||
@@ -336,16 +348,22 @@ export default {
|
||||
});
|
||||
//获取选中部门的人员信息
|
||||
const getPeoples = () => {
|
||||
if (!state.nameSearch && !state.selectedKeys[0]) {
|
||||
state.tableDataTotal = 0;
|
||||
return false;
|
||||
}
|
||||
// console.log("org", org);
|
||||
let obj = {
|
||||
org: state.selectedKeys[0],
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
keyWord: state.nameSearch,
|
||||
org: state.nameSearch ? null : state.selectedKeys[0],
|
||||
};
|
||||
if (!state.selectedKeys[0]) {
|
||||
state.tableDataTotal = 0;
|
||||
return;
|
||||
}
|
||||
// console.log("obj", obj);
|
||||
// if (!state.selectedKeys[0]) {
|
||||
// state.tableDataTotal = 0;
|
||||
// return;
|
||||
// }
|
||||
console.log("obj", obj);
|
||||
api
|
||||
.getMemberInfo(obj)
|
||||
.then((res) => {
|
||||
@@ -373,7 +391,26 @@ export default {
|
||||
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 = () => {
|
||||
getPeoples();
|
||||
@@ -610,6 +647,8 @@ export default {
|
||||
changeOwnership,
|
||||
addAuth,
|
||||
removeClick,
|
||||
handleSearchStu,
|
||||
resetStu,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div class="mii_ipt">
|
||||
<div class="ipt_name">课程状态:</div>
|
||||
<div class="select fitems">
|
||||
@@ -44,6 +45,7 @@
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
<div class="mi_btns">
|
||||
<div class="btn btn1" @click="search">
|
||||
@@ -113,9 +115,9 @@
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:pagination="false"
|
||||
/>
|
||||
<div class="pa">
|
||||
<div class="pa" style="display:flex;justify-content:center;padding:20px;">
|
||||
<a-pagination
|
||||
v-if="total > 10"
|
||||
v-if="tableDataTotal > 10"
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
@@ -134,7 +136,7 @@
|
||||
</template>
|
||||
<script>
|
||||
//import { ApiFilled } from "@ant-design/icons-vue";
|
||||
import {reactive, toRefs, ref, computed} from "vue";
|
||||
import {reactive, toRefs, computed} from "vue";
|
||||
// import { planList } from "../../api/indexTaskadd";
|
||||
//import {detail} from "../../api/indexCourse";
|
||||
import {list} from "../../api/indexTaskadd";
|
||||
@@ -279,14 +281,14 @@ export default {
|
||||
//获取面授课列表
|
||||
const getClassList = (obj) => {
|
||||
let objn = obj || {
|
||||
auditStatus: state.auditStatus,
|
||||
auditStatus:2,
|
||||
name: state.name,
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize
|
||||
};
|
||||
list(objn)
|
||||
.then((res) => {
|
||||
console.log(res.data.data.rows);
|
||||
console.log('面授课列表', res.data.data);
|
||||
let result = res.data.data;
|
||||
state.tableDataTotal = result.total;
|
||||
getClassData(result.rows);
|
||||
@@ -314,7 +316,7 @@ export default {
|
||||
});
|
||||
state.classTableData = array;
|
||||
};
|
||||
|
||||
/**
|
||||
const options1 = ref([
|
||||
{
|
||||
value: 0,
|
||||
@@ -328,11 +330,8 @@ export default {
|
||||
value: 2,
|
||||
label: "已审核",
|
||||
},
|
||||
{
|
||||
value: -1,
|
||||
label: "审核未通过",
|
||||
},
|
||||
]);
|
||||
|
||||
]);*/
|
||||
const handleChange = (value, option) => {
|
||||
console.log("改变了", value, option);
|
||||
console.log(state.valueContent);
|
||||
@@ -359,7 +358,7 @@ export default {
|
||||
// showDrawerSelFacet,
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
options1,
|
||||
|
||||
columns1,
|
||||
getClassData,
|
||||
handleChange,
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<template>
|
||||
<a-tree-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
"
|
||||
v-model:value="id"
|
||||
style="width: 100%"
|
||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||
@@ -11,58 +16,36 @@
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
}"
|
||||
:disabled="viewDetail ? true : false"
|
||||
:disabled="disabled"
|
||||
@change="change"
|
||||
dropdownClassName="treeDropdown"
|
||||
>
|
||||
</a-tree-select>
|
||||
</template>
|
||||
<script>
|
||||
import {onMounted, reactive, toRefs, watch} from "vue";
|
||||
<script setup>
|
||||
import {computed, defineEmits, defineProps, onMounted, ref} from "vue";
|
||||
import {useStore} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "OrgClass",
|
||||
const store = useStore();
|
||||
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Number,
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
const props = defineProps({
|
||||
value: String
|
||||
})
|
||||
const emit = defineEmits({})
|
||||
|
||||
const state = reactive({
|
||||
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]
|
||||
})
|
||||
const options = ref([])
|
||||
|
||||
function change(key, obj) {
|
||||
ctx.emit('update:name', obj[0])
|
||||
}
|
||||
const id = computed(() => {
|
||||
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>
|
||||
|
||||
@@ -1,55 +1,46 @@
|
||||
<!-- 评估管理-创建评估页面 -->
|
||||
<template>
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
"
|
||||
v-model:value="id"
|
||||
placeholder="请选择分类"
|
||||
style="width: 100%"
|
||||
:options="options"
|
||||
allowClear
|
||||
@change="change"
|
||||
:disabled="disabled"
|
||||
>
|
||||
</a-select>
|
||||
</template>
|
||||
<script>
|
||||
import {onMounted, reactive, toRefs, watch} from "vue";
|
||||
<script setup>
|
||||
import {computed, defineEmits, defineProps, onMounted, ref} from "vue";
|
||||
import {useStore} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "ProjectClass",
|
||||
const store = useStore();
|
||||
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Number,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
const props = defineProps({
|
||||
value: String,
|
||||
disabled: String
|
||||
})
|
||||
const emit = defineEmits({})
|
||||
|
||||
const state = reactive({
|
||||
options: [],
|
||||
id: props.modelValue
|
||||
});
|
||||
const options = ref([])
|
||||
|
||||
watch(props, () => {
|
||||
if (props.modelValue !== state.id) {
|
||||
state.id = props.modelValue
|
||||
}
|
||||
})
|
||||
|
||||
watch(state.id,()=>{
|
||||
ctx.emit('update:modelValue',state.id)
|
||||
})
|
||||
const id = computed(() => {
|
||||
return props.value
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
options.value = store.state.projectClass.map(e => ({value: parseInt(e.dictCode), label: e.dictName}))
|
||||
})
|
||||
|
||||
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>
|
||||
|
||||
@@ -1,45 +1,42 @@
|
||||
<template>
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
"
|
||||
v-model:value="id"
|
||||
:options="options"
|
||||
style="width: 100%"
|
||||
placeholder="请选择项目级别"
|
||||
@change="change"
|
||||
:disabled="disabled"
|
||||
/>
|
||||
</template>
|
||||
<script>
|
||||
import {onMounted, reactive, toRefs, watch} from "vue";
|
||||
<script setup>
|
||||
import {computed, defineEmits, defineProps, onMounted, ref} from "vue";
|
||||
import {useStore} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "ProjectClass",
|
||||
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Number,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
const store = useStore();
|
||||
const props = defineProps({
|
||||
value: String,
|
||||
disabled: String
|
||||
})
|
||||
|
||||
const state = reactive({
|
||||
options: [],
|
||||
id: props.modelValue
|
||||
});
|
||||
watch(state.id, () => {
|
||||
ctx.emit('update:modelValue', state.id)
|
||||
})
|
||||
const id = computed(() => {
|
||||
return props.value
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
state.options = store.state.projectLevel.map(e => ({value: parseInt(e.dictCode), label: e.dictName}))
|
||||
})
|
||||
return {
|
||||
...toRefs(state),
|
||||
};
|
||||
},
|
||||
};
|
||||
const emit = defineEmits({})
|
||||
|
||||
const options = ref([])
|
||||
|
||||
onMounted(() => {
|
||||
options.value = store.state.projectLevel.map(e => ({value: parseInt(e.dictCode), label: e.dictName}))
|
||||
})
|
||||
|
||||
function change(key) {
|
||||
emit('update:value', key)
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<template>
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
"
|
||||
v-model:value="managerArray"
|
||||
:placeholder="placeholder"
|
||||
:filterOption="false"
|
||||
@@ -28,10 +33,12 @@ export default {
|
||||
|
||||
props: {
|
||||
value: {
|
||||
type: Number,
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
name: {
|
||||
type: Number,
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
@@ -55,9 +62,9 @@ export default {
|
||||
loading: false,
|
||||
init: false
|
||||
});
|
||||
const getMemberThrottle = throttle(getMember, 500)
|
||||
|
||||
watch(() => state.memberParam, getMemberThrottle)
|
||||
watch(()=>state.memberParam.keyWord , throttle(getMember, 500))
|
||||
watch(()=>state.memberParam.pageNo , throttle(getPushMember, 500))
|
||||
watch(props, init)
|
||||
|
||||
onMounted(() => {
|
||||
@@ -71,15 +78,21 @@ export default {
|
||||
getMemberData()
|
||||
}
|
||||
|
||||
function getPushMember() {
|
||||
state.loading = true
|
||||
getMemberData()
|
||||
}
|
||||
|
||||
|
||||
function getMemberData() {
|
||||
console.log('getMemberData')
|
||||
api1.getMemberInfo(state.memberParam).then((res) => {
|
||||
const list = res.data.data.rows.filter(e => !props.value?.includes(e.id + '')).map(e => ({
|
||||
const list = res.data.data.rows.filter(e => !(props.value + '')?.includes(e.id + '')).map(e => ({
|
||||
label: e.realName,
|
||||
value: e.id
|
||||
}));
|
||||
if (state.memberParam.pageNo === 1 && props.value) {
|
||||
const arrManagerId = props.value.split(',')
|
||||
const arrManagerId = (props.value + '').split(',')
|
||||
const arrManager = props.name.split(',')
|
||||
state.options = [...arrManager.map((e, i) => ({label: e, value: arrManagerId[i]})), ...list]
|
||||
} else state.options.push(...list)
|
||||
@@ -102,10 +115,11 @@ export default {
|
||||
|
||||
function init() {
|
||||
console.log('init--', props)
|
||||
if (props.value !== typeof state.managerArray === 'object' ? state.managerArray.join(',') : state.managerArray) {
|
||||
console.log(Array.isArray(state.managerArray))
|
||||
if ((props.value + '') !== (Array.isArray(state.managerArray) ? state.managerArray.join(',') : (state.managerArray + ''))) {
|
||||
if (props.value) {
|
||||
const arrManager = props.name.split(',')
|
||||
const arrManagerId = props.value.split(',')
|
||||
const arrManagerId = (props.value + '').split(',')
|
||||
state.managerArray = props.mode === 'select' ? props.value : arrManagerId;
|
||||
state.options = arrManager.map((e, i) => ({label: e, value: arrManagerId[i]}))
|
||||
} else {
|
||||
@@ -124,7 +138,7 @@ export default {
|
||||
}
|
||||
|
||||
function change(e, l) {
|
||||
console.log('change')
|
||||
console.log('change', l)
|
||||
if (Array.isArray(l)) {
|
||||
ctx.emit('update:value', l.map(t => t.value).join(','))
|
||||
ctx.emit('update:name', l.map(t => t.label).join(','))
|
||||
|
||||
126
src/components/project/ProjectManagerNew.vue
Normal file
126
src/components/project/ProjectManagerNew.vue
Normal file
@@ -0,0 +1,126 @@
|
||||
<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')
|
||||
const memberOptions = store.state.memberInitInfo.map(e => ({
|
||||
label: e.realName,
|
||||
value: e.id
|
||||
}))
|
||||
if (props.value) {
|
||||
options.value = [...(props.value + '').split(',').map((value, i) => ({
|
||||
label: (props.name + '').split(',')[i],
|
||||
value
|
||||
})), ...memberOptions]
|
||||
} else options.value = memberOptions
|
||||
})
|
||||
|
||||
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>
|
||||
@@ -1,52 +1,43 @@
|
||||
<template>
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
"
|
||||
v-model:value="id"
|
||||
:options="options"
|
||||
style="width: 100%"
|
||||
placeholder="请选择分类"
|
||||
@change="change"
|
||||
:disabled="disabled"
|
||||
/>
|
||||
</template>
|
||||
<script>
|
||||
import {onMounted, reactive, toRefs, watch} from "vue";
|
||||
<script setup>
|
||||
import {computed, defineEmits, defineProps, onMounted, ref} from "vue";
|
||||
import {useStore} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "TrainClass",
|
||||
const store = useStore();
|
||||
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Number,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
const props = defineProps({
|
||||
value: String,
|
||||
disabled: String
|
||||
})
|
||||
|
||||
const state = reactive({
|
||||
options: [],
|
||||
id: props.modelValue
|
||||
});
|
||||
watch(state.id, () => {
|
||||
ctx.emit('update:modelValue', state.id)
|
||||
})
|
||||
const id = computed(() => {
|
||||
return props.value
|
||||
})
|
||||
|
||||
watch(props, () => {
|
||||
if (props.modelValue !== state.id) {
|
||||
state.id = props.modelValue
|
||||
}
|
||||
})
|
||||
const emit = defineEmits({})
|
||||
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user