mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 04:46:46 +08:00
-- 学员选择bug
This commit is contained in:
@@ -31,10 +31,19 @@ export function useBoeApiPage(_url, params = {}, config = {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function reset(){
|
||||||
|
state.data = []
|
||||||
|
state.loading = false
|
||||||
|
state.page = 1
|
||||||
|
state.totalPage = 0
|
||||||
|
state.total = 0
|
||||||
|
}
|
||||||
|
|
||||||
config.init && fetch()
|
config.init && fetch()
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
fetch,
|
fetch,
|
||||||
|
reset
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,8 @@
|
|||||||
<a-button
|
<a-button
|
||||||
@click="resetStu"
|
@click="resetStu"
|
||||||
style="margin-left: 20px; border-radius: 4px"
|
style="margin-left: 20px; border-radius: 4px"
|
||||||
>重置</a-button
|
>重置
|
||||||
|
</a-button
|
||||||
>
|
>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -64,6 +65,7 @@
|
|||||||
allow-clear
|
allow-clear
|
||||||
tree-default-expand-all
|
tree-default-expand-all
|
||||||
:tree-data="treeData"
|
:tree-data="treeData"
|
||||||
|
v-model:selectedKeys="stuTreeSelectKeys"
|
||||||
:fieldNames="{
|
:fieldNames="{
|
||||||
children: 'treeChildList',
|
children: 'treeChildList',
|
||||||
key: 'id',
|
key: 'id',
|
||||||
@@ -154,7 +156,8 @@
|
|||||||
<a-button
|
<a-button
|
||||||
@click="resetAudienceInfo"
|
@click="resetAudienceInfo"
|
||||||
style="margin-left: 20px; border-radius: 4px"
|
style="margin-left: 20px; border-radius: 4px"
|
||||||
>重置</a-button
|
>重置
|
||||||
|
</a-button
|
||||||
>
|
>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -384,7 +387,6 @@
|
|||||||
</a-modal>
|
</a-modal>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {computed, defineEmits, defineProps, ref, watch} from "vue";
|
import {computed, defineEmits, defineProps, ref, watch} from "vue";
|
||||||
@@ -422,6 +424,7 @@ const nameSearch = ref({
|
|||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
});
|
});
|
||||||
|
const stuTreeSelectKeys = ref([])
|
||||||
const audienceName = ref({
|
const audienceName = ref({
|
||||||
keyword: "",
|
keyword: "",
|
||||||
page: 1,
|
page: 1,
|
||||||
@@ -440,6 +443,7 @@ const {
|
|||||||
pageSize: stuPageSize,
|
pageSize: stuPageSize,
|
||||||
loading: stuLoading,
|
loading: stuLoading,
|
||||||
total: stuTotal,
|
total: stuTotal,
|
||||||
|
reset: stuReset
|
||||||
} = useBoeApiPage(USER_LIST, nameSearch.value, {
|
} = useBoeApiPage(USER_LIST, nameSearch.value, {
|
||||||
init: false,
|
init: false,
|
||||||
result: (res) => res.result.userInfoList,
|
result: (res) => res.result.userInfoList,
|
||||||
@@ -457,6 +461,7 @@ const {
|
|||||||
pageSize: audiPageSize,
|
pageSize: audiPageSize,
|
||||||
loading: audiLoading,
|
loading: audiLoading,
|
||||||
total: audiTotal,
|
total: audiTotal,
|
||||||
|
reset: auditReset
|
||||||
} = useBoeApiPage(AUDIENCE_LIST, audienceName.value, {
|
} = useBoeApiPage(AUDIENCE_LIST, audienceName.value, {
|
||||||
init: true,
|
init: true,
|
||||||
result: (res) =>
|
result: (res) =>
|
||||||
@@ -582,20 +587,24 @@ const openDrawer = () => {
|
|||||||
const treeData = computed(() => {
|
const treeData = computed(() => {
|
||||||
return store.state.orgtreeList ? store.state.orgtreeList : [];
|
return store.state.orgtreeList ? store.state.orgtreeList : [];
|
||||||
});
|
});
|
||||||
|
|
||||||
function onSearchStu() {
|
function onSearchStu() {
|
||||||
nameSearch.value.page = 1;
|
nameSearch.value.page = 1;
|
||||||
searchStu();
|
searchStu();
|
||||||
}
|
}
|
||||||
|
|
||||||
function stuStuOrgSelect(e) {
|
function stuStuOrgSelect(e) {
|
||||||
nameSearch.value.departId = e.join("");
|
nameSearch.value.departId = e.join("");
|
||||||
searchStu();
|
searchStu();
|
||||||
}
|
}
|
||||||
|
|
||||||
function stuDel(i) {
|
function stuDel(i) {
|
||||||
stuSelectKeys.value = stuSelectKeys.value.filter(
|
stuSelectKeys.value = stuSelectKeys.value.filter(
|
||||||
(e) => e !== selectsData.value.studentList[i].id
|
(e) => e !== selectsData.value.studentList[i].id
|
||||||
);
|
);
|
||||||
selectsData.value.studentList.splice(i, 1);
|
selectsData.value.studentList.splice(i, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// function orgDel(i) {
|
// function orgDel(i) {
|
||||||
// orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id)
|
// orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id)
|
||||||
// selectsData.value.deptList.splice(i, 1)
|
// selectsData.value.deptList.splice(i, 1)
|
||||||
@@ -606,6 +615,7 @@ function AuditDel(i) {
|
|||||||
);
|
);
|
||||||
selectsData.value.groupList.splice(i, 1);
|
selectsData.value.groupList.splice(i, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// function orgSelect(key, obj) {
|
// function orgSelect(key, obj) {
|
||||||
// console.log(obj)
|
// console.log(obj)
|
||||||
//request(ORG_CHILD_LIST, {orgId: null}).then(res => {
|
//request(ORG_CHILD_LIST, {orgId: null}).then(res => {
|
||||||
@@ -616,14 +626,17 @@ function onStuSelectChange(e, l) {
|
|||||||
stuSelectKeys.value = e;
|
stuSelectKeys.value = e;
|
||||||
selectsData.value.studentList = l;
|
selectsData.value.studentList = l;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onOrgSelectChange(e, l) {
|
function onOrgSelectChange(e, l) {
|
||||||
orgRowSelection.value = e;
|
orgRowSelection.value = e;
|
||||||
selectsData.value.deptList = l.selectedNodes;
|
selectsData.value.deptList = l.selectedNodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onAuditSelectChange(e, l) {
|
function onAuditSelectChange(e, l) {
|
||||||
auditSelectKeys.value = e;
|
auditSelectKeys.value = e;
|
||||||
selectsData.value.groupList = l;
|
selectsData.value.groupList = l;
|
||||||
}
|
}
|
||||||
|
|
||||||
// const stuDepartmentSelect = (e) => {
|
// const stuDepartmentSelect = (e) => {
|
||||||
// nameSearch.value.orgId = e.join('')
|
// nameSearch.value.orgId = e.join('')
|
||||||
// searchStu()
|
// searchStu()
|
||||||
@@ -641,7 +654,7 @@ const auditChangePagination = (page) => {
|
|||||||
const resetStu = () => {
|
const resetStu = () => {
|
||||||
deleteDepSelect();
|
deleteDepSelect();
|
||||||
nameSearch.value = {keyword: "", page: 1, pageSize: 10};
|
nameSearch.value = {keyword: "", page: 1, pageSize: 10};
|
||||||
|
stuReset()
|
||||||
};
|
};
|
||||||
//清空选择部门信息
|
//清空选择部门信息
|
||||||
const deleteDepSelect = () => {
|
const deleteDepSelect = () => {
|
||||||
@@ -654,7 +667,8 @@ const deleteDepSelect = () => {
|
|||||||
//重置受众
|
//重置受众
|
||||||
const resetAudienceInfo = () => {
|
const resetAudienceInfo = () => {
|
||||||
audienceName.value = {keyword: "", page: 1, pageSize: 10};
|
audienceName.value = {keyword: "", page: 1, pageSize: 10};
|
||||||
searchStu();
|
auditReset()
|
||||||
|
searchAudi()
|
||||||
};
|
};
|
||||||
//全部清除
|
//全部清除
|
||||||
// const deleteAll = () => {
|
// const deleteAll = () => {
|
||||||
@@ -672,6 +686,7 @@ const submitAuth = () => {
|
|||||||
handleStageOk();
|
handleStageOk();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function handleStageOk() {
|
function handleStageOk() {
|
||||||
stageVisible.value = false;
|
stageVisible.value = false;
|
||||||
visiable.value = false;
|
visiable.value = false;
|
||||||
@@ -687,14 +702,16 @@ function handleStageOk() {
|
|||||||
emit("finash", true);
|
emit("finash", true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(visiable, () => {
|
watch(visiable, () => {
|
||||||
stuSelectKeys.value = [];
|
stuSelectKeys.value = [];
|
||||||
orgSelectKeys.value = [];
|
orgSelectKeys.value = [];
|
||||||
auditSelectKeys.value = [];
|
auditSelectKeys.value = [];
|
||||||
stuData.value = [];
|
|
||||||
audienceName.value.keyword = "";
|
audienceName.value.keyword = "";
|
||||||
audienceName.value.page = 1;
|
audienceName.value.page = 1;
|
||||||
audienceName.value.pageSize = 10;
|
audienceName.value.pageSize = 10;
|
||||||
|
nameSearch.value.departId = null
|
||||||
|
stuTreeSelectKeys.value=[]
|
||||||
activeKey.value = 1;
|
activeKey.value = 1;
|
||||||
selectsData.value = {
|
selectsData.value = {
|
||||||
stageId: "",
|
stageId: "",
|
||||||
@@ -702,7 +719,8 @@ watch(visiable, () => {
|
|||||||
deptList: [],
|
deptList: [],
|
||||||
groupList: [],
|
groupList: [],
|
||||||
};
|
};
|
||||||
|
stuReset()
|
||||||
|
auditReset()
|
||||||
|
|
||||||
searchAudi();
|
searchAudi();
|
||||||
});
|
});
|
||||||
@@ -712,10 +730,12 @@ watch(visiable, () => {
|
|||||||
.ant-btn-primary {
|
.ant-btn-primary {
|
||||||
background-color: #4ea6ff !important;
|
background-color: #4ea6ff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cus-select {
|
.cus-select {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableBox .ant-table-row .ant-table-cell {
|
.tableBox .ant-table-row .ant-table-cell {
|
||||||
height: 48px;
|
height: 48px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -724,18 +744,23 @@ watch(visiable, () => {
|
|||||||
line-height: 29px;
|
line-height: 29px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableBox .ant-table-thead tr th {
|
.tableBox .ant-table-thead tr th {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-tabs-tabpane {
|
.ant-tabs-tabpane {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-tabs {
|
.ant-tabs {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right1 {
|
.right1 {
|
||||||
border-left: 1px solid #f2f6fe;
|
border-left: 1px solid #f2f6fe;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
|
|
||||||
.onerow {
|
.onerow {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -770,6 +795,7 @@ watch(visiable, () => {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.clbox {
|
.clbox {
|
||||||
margin-right: 50px;
|
margin-right: 50px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -780,6 +806,7 @@ watch(visiable, () => {
|
|||||||
height: 32px;
|
height: 32px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: #4ea6ff;
|
background: #4ea6ff;
|
||||||
|
|
||||||
.colose {
|
.colose {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
@@ -790,21 +817,25 @@ watch(visiable, () => {
|
|||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.allclear {
|
.allclear {
|
||||||
color: rgba(255, 255, 255, 1);
|
color: rgba(255, 255, 255, 1);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.selecteds {
|
.selecteds {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-left: 32px;
|
margin-left: 32px;
|
||||||
|
|
||||||
.person {
|
.person {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
border-top: 1px solid #f2f6fe;
|
border-top: 1px solid #f2f6fe;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chose {
|
.chose {
|
||||||
width: 64px;
|
width: 64px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
@@ -818,6 +849,7 @@ watch(visiable, () => {
|
|||||||
color: rgba(56, 139, 225, 1);
|
color: rgba(56, 139, 225, 1);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.ch {
|
.ch {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
@@ -827,12 +859,14 @@ watch(visiable, () => {
|
|||||||
top: -8px;
|
top: -8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ifsw {
|
.ifsw {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: end;
|
align-items: end;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
color: #4ea6ff;
|
color: #4ea6ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sw {
|
.sw {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -842,11 +876,13 @@ watch(visiable, () => {
|
|||||||
margin-top: 23px;
|
margin-top: 23px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dept {
|
.dept {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
border-top: 1px solid #f2f6fe;
|
border-top: 1px solid #f2f6fe;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chose1 {
|
.chose1 {
|
||||||
//width: 90px;
|
//width: 90px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
@@ -860,11 +896,13 @@ watch(visiable, () => {
|
|||||||
color: rgba(56, 139, 225, 1);
|
color: rgba(56, 139, 225, 1);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.span {
|
.span {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ch1 {
|
.ch1 {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
@@ -874,11 +912,13 @@ watch(visiable, () => {
|
|||||||
top: -8px;
|
top: -8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.group {
|
.group {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
border-top: 1px solid #f2f6fe;
|
border-top: 1px solid #f2f6fe;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chose2 {
|
.chose2 {
|
||||||
//width: 120px;
|
//width: 120px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
@@ -892,11 +932,13 @@ watch(visiable, () => {
|
|||||||
color: rgba(56, 139, 225, 1);
|
color: rgba(56, 139, 225, 1);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.span {
|
.span {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ch2 {
|
.ch2 {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
|
|||||||
Reference in New Issue
Block a user