mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +08:00
讲师管理bug
This commit is contained in:
@@ -70,6 +70,10 @@
|
|||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
},
|
},
|
||||||
|
selectedRows:{
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits(["update:params", "update:selectedRowKeys", "update:selectedRows"]);
|
const emit = defineEmits(["update:params", "update:selectedRowKeys", "update:selectedRows"]);
|
||||||
const rowSelectKeys = ref([]);
|
const rowSelectKeys = ref([]);
|
||||||
@@ -81,6 +85,7 @@
|
|||||||
watch(()=>data.value,(val)=>{
|
watch(()=>data.value,(val)=>{
|
||||||
if(val&&props.selectedRowKeys){
|
if(val&&props.selectedRowKeys){
|
||||||
rowSelectKeys.value = props.selectedRowKeys
|
rowSelectKeys.value = props.selectedRowKeys
|
||||||
|
selectsData.value = props.selectedRows
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const rowSelection = computed(() => (props.type ? {
|
const rowSelection = computed(() => (props.type ? {
|
||||||
@@ -116,6 +121,22 @@
|
|||||||
|
|
||||||
function onSelectChange(e, l) {
|
function onSelectChange(e, l) {
|
||||||
rowSelectKeys.value = e;
|
rowSelectKeys.value = e;
|
||||||
|
const array = []
|
||||||
|
l.includes(undefined)&&(
|
||||||
|
selectsData.value = [...selectsData.value,...l],
|
||||||
|
selectsData.value = selectsData.value.filter(t => t),
|
||||||
|
selectsData.value = Array.from(new Set(selectsData.value.map(item => item.id)))
|
||||||
|
.map(id => selectsData.value.find(item => item.id === id)),
|
||||||
|
selectsData.value.map(item=>{
|
||||||
|
e.some(i=>{
|
||||||
|
if(item.id === i){
|
||||||
|
array.push(item)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
l = array
|
||||||
|
)
|
||||||
selectsData.value = l;
|
selectsData.value = l;
|
||||||
emit("update:selectedRowKeys", e);
|
emit("update:selectedRowKeys", e);
|
||||||
emit("update:selectedRows", l);
|
emit("update:selectedRows", l);
|
||||||
|
|||||||
@@ -154,11 +154,11 @@ watch(stuSelectRows,(val)=>{
|
|||||||
}
|
}
|
||||||
teaunm.value = val.map((res,index)=>{
|
teaunm.value = val.map((res,index)=>{
|
||||||
return {
|
return {
|
||||||
userName:res.realName,
|
userName:res?.realName,
|
||||||
userNo:res.userNo,
|
userNo:res?.userNo,
|
||||||
type: props.type,
|
type: props.type,
|
||||||
userId: res.id,
|
userId: res?.id,
|
||||||
label: res.realName + res.userNo,
|
label: res?.realName + res?.userNo,
|
||||||
...res
|
...res
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -536,7 +536,7 @@ const getTableDate = (obj) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const downOpen = () => {
|
const downOpen = () => {
|
||||||
alert('没有接口')
|
window.open(`/manageApi/admin/export/exportTeacherAffiliation?name=${state.searchParam.name || ''}`)
|
||||||
}
|
}
|
||||||
const addContentData = () => {
|
const addContentData = () => {
|
||||||
state.showContent = true
|
state.showContent = true
|
||||||
@@ -555,7 +555,8 @@ const getTableDate = (obj) => {
|
|||||||
label: item.userName + item.userNo,
|
label: item.userName + item.userNo,
|
||||||
value: item.userId,
|
value: item.userId,
|
||||||
realName: item.userName,
|
realName: item.userName,
|
||||||
...item
|
...item,
|
||||||
|
id: item.userId
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
state.formParam.actValue = state.formParam.actArray.map(item => item.label).join(',');
|
state.formParam.actValue = state.formParam.actArray.map(item => item.label).join(',');
|
||||||
|
|||||||
Reference in New Issue
Block a user