讲师管理bug

This commit is contained in:
zhangsir
2024-12-17 15:11:18 +08:00
parent b24858d31f
commit 5d924f7091
4 changed files with 23 additions and 20 deletions

View File

@@ -82,13 +82,13 @@
const postParam = computed(() => ({ ...params.value, ...props.params }));
const { data, loading, total, fetch: onFetch } = props.request(props.url, postParam);
watch(()=>data.value,(val)=>{
if(val&&props.selectedRowKeys){
rowSelectKeys.value = props.selectedRowKeys
selectsData.value = props.selectedRows
}
emit('dataLists',data.value)
})
// watch(()=>data.value,(val)=>{
// // if(val&&props.selectedRowKeys){
// // rowSelectKeys.value = props.selectedRowKeys
// // selectsData.value = props.selectedRows
// // }
// emit('dataLists',data.value)
// })
const rowSelection = computed(() => (props.type ? {
type: props.type,
columnWidth: 20,
@@ -118,7 +118,11 @@
}
});
onMounted(() => props.init && nextTick(onFetch));
onMounted(() => {
props.init && nextTick(onFetch)
rowSelectKeys.value = props.selectedRowKeys
selectsData.value = props.selectedRows
});
function onSelectChange(e, l) {
rowSelectKeys.value = e;

View File

@@ -52,7 +52,7 @@
<BaseTable ref="stuTableRef" :columns="stuColumns" :url="USER_LIST_PAGE" pageKey="pageNo"
v-model:params="nameSearch" :request="useNewRowsPageNoInit"
v-model:selectedRows="stuSelectRows" v-model:selectedRowKeys="stuSelectRowKeys"
@dataLists="dataLists" type="checkbox"></BaseTable>
type="checkbox"></BaseTable>
</div>
</div>
</div>
@@ -72,14 +72,14 @@
<div v-if="i < 11">
<div class="chose">
{{ item.realName }}
<div class="ch" @click="deleteStu(i)"></div>
<div class="ch" @click="stuTableRef.remove(i)"></div>
</div>
</div>
<div v-else>
<div v-if="person">
<div class="chose">
{{ item.realName }}
<div class="ch" @click="deleteStu(i)"></div>
<div class="ch" @click="stuTableRef.remove(i)"></div>
</div>
</div>
</div>
@@ -145,12 +145,6 @@ const onlineLearningList = () =>{
}
const dataList = ref(false)
const stuSelectRows = ref([]);
const deleteStu = (i) => {
dataList.value && stuTableRef.value.remove(i)
}
const dataLists = (data) => {
dataList.value = data
}
const stuSelectRowKeys = ref([]);
const stuTableRef = ref();
const teaunm = ref([])

View File

@@ -27,7 +27,7 @@
<a-descriptions-item :labelStyle="{ width: '165px' }" label="培训发生组织编号">{{formData?.affiliationCode||'-'}}</a-descriptions-item>
<a-descriptions-item :labelStyle="{ width: '165px' }" label="培训发生组名称">{{formData?.affiliationName||'-'}}</a-descriptions-item>
<a-descriptions-item label="是否为根节点">
<span v-if="formData?.parentName">{{ (formData?.parentName) }}</span>
<span v-if="formData?.parentName">({{ formData?.parentName }})</span>
<span v-else>({{ {1:'',2:'',3:''}[formData?.code] }}级审批)</span>
</a-descriptions-item>
<a-descriptions-item label="组织担当">{{formData?.act||'-'}}</a-descriptions-item>
@@ -104,7 +104,8 @@ const props = defineProps({
title: {
type: String,
default: ""
}
},
parentName: String,
});
const emit = defineEmits({});
const visibleModal = ref(false)
@@ -288,6 +289,7 @@ watch(visible, (val)=>{
api.getAffiliationById(props.id).then(res=>{
if(res.data.code == 200){
formData.value = res.data.data
formData.value.parentName = props.parentName
formData.value.act = filterList(formData.value.affiliationUserList,0)
formData.value.one = filterList(formData.value.affiliationUserList,1)
formData.value.two = filterList(formData.value.affiliationUserList,2)

View File

@@ -35,7 +35,7 @@
<template #bodyCell="{ record, column }">
<template v-if="column.key === 'operation'">
<a-space >
<lockLecturer :id="record.id" :title="'培训发生组织详情'" @searchList="searchList">
<lockLecturer :parentName="record.parentName" :id="record.id" :title="'培训发生组织详情'" @searchList="searchList">
<div style="color: #1890ff;cursor: pointer;">查看</div>
</lockLecturer>
<a-button v-if="record.status!=2" type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
@@ -378,6 +378,9 @@ export default{
state.formParam.leveOneArray = []
state.formParam.leveTwoArray = []
state.formParam.leveThreeArray = []
state.formParam.leveOneValue = null
state.formParam.leveTwoValue = null
state.formParam.leveThreeValue = null
}
state.formParam.code = null
}