Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
yuping
2022-12-03 19:57:55 +08:00
14 changed files with 1647 additions and 1554 deletions

View File

@@ -30,8 +30,12 @@
</div>
<div class="btnbox">
<button class="xkbtn" @click="showDrawerSelFacet">
<!--
{{ chooseCourse == null ? "选择" : chooseCourseName }}面授课
</button>
</button> -->
{{ chooseCourse == null ? "选择" : "重选" }}面授课
</button>
<div v-if="chooseCourse">
<a-tag closable color="processing" @close="logC">
<span style="font-size:14px;line-height: 33px;">删除课程</span>

View File

@@ -114,26 +114,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">
@@ -721,9 +715,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)
@@ -732,6 +730,7 @@ export default {
closeDrawer();
})
.catch(() => {
message.destroy();
message.error(`编辑失败`);
});
} else {
@@ -742,6 +741,7 @@ export default {
closeDrawer();
})
.catch(() => {
message.destroy();
message.error(`创建失败`);
});
}
@@ -852,6 +852,7 @@ export default {
state.id = value.id;
state.testName = value.testName;
};
return {
formState,
afterVisibleChange,
@@ -876,6 +877,7 @@ export default {
chooseTest,
closeTag,
getData,
...toRefs(state),
};
},

View File

@@ -118,6 +118,7 @@
columnWidth: 20,
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
preserveSelectedRowKeys: true,
}"
/>
<div class="pa">
@@ -316,6 +317,7 @@
columnWidth: 30,
selectedRowKeys: selectedRowKeys2,
onChange: onSelectChange2,
preserveSelectedRowKeys: true,
}"
/>
<div class="pa" style="margin-top: 20px">
@@ -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;

View File

@@ -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();
}
})

View File

@@ -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,
};
},
};

View File

@@ -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">
@@ -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,7 +281,7 @@ export default {
//获取面授课列表
const getClassList = (obj) => {
let objn = obj || {
auditStatus: state.auditStatus,
auditStatus:2,
name: state.name,
pageNo: state.currentPage,
pageSize: state.pageSize
@@ -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,