讲师管理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 postParam = computed(() => ({ ...params.value, ...props.params }));
const { data, loading, total, fetch: onFetch } = props.request(props.url, postParam); const { data, loading, total, fetch: onFetch } = props.request(props.url, postParam);
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 // // selectsData.value = props.selectedRows
} // // }
emit('dataLists',data.value) // emit('dataLists',data.value)
}) // })
const rowSelection = computed(() => (props.type ? { const rowSelection = computed(() => (props.type ? {
type: props.type, type: props.type,
columnWidth: 20, 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) { function onSelectChange(e, l) {
rowSelectKeys.value = e; rowSelectKeys.value = e;

View File

@@ -52,7 +52,7 @@
<BaseTable ref="stuTableRef" :columns="stuColumns" :url="USER_LIST_PAGE" pageKey="pageNo" <BaseTable ref="stuTableRef" :columns="stuColumns" :url="USER_LIST_PAGE" pageKey="pageNo"
v-model:params="nameSearch" :request="useNewRowsPageNoInit" v-model:params="nameSearch" :request="useNewRowsPageNoInit"
v-model:selectedRows="stuSelectRows" v-model:selectedRowKeys="stuSelectRowKeys" v-model:selectedRows="stuSelectRows" v-model:selectedRowKeys="stuSelectRowKeys"
@dataLists="dataLists" type="checkbox"></BaseTable> type="checkbox"></BaseTable>
</div> </div>
</div> </div>
</div> </div>
@@ -72,14 +72,14 @@
<div v-if="i < 11"> <div v-if="i < 11">
<div class="chose"> <div class="chose">
{{ item.realName }} {{ item.realName }}
<div class="ch" @click="deleteStu(i)"></div> <div class="ch" @click="stuTableRef.remove(i)"></div>
</div> </div>
</div> </div>
<div v-else> <div v-else>
<div v-if="person"> <div v-if="person">
<div class="chose"> <div class="chose">
{{ item.realName }} {{ item.realName }}
<div class="ch" @click="deleteStu(i)"></div> <div class="ch" @click="stuTableRef.remove(i)"></div>
</div> </div>
</div> </div>
</div> </div>
@@ -145,12 +145,6 @@ const onlineLearningList = () =>{
} }
const dataList = ref(false) const dataList = ref(false)
const stuSelectRows = ref([]); const stuSelectRows = ref([]);
const deleteStu = (i) => {
dataList.value && stuTableRef.value.remove(i)
}
const dataLists = (data) => {
dataList.value = data
}
const stuSelectRowKeys = ref([]); const stuSelectRowKeys = ref([]);
const stuTableRef = ref(); const stuTableRef = ref();
const teaunm = 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?.affiliationCode||'-'}}</a-descriptions-item>
<a-descriptions-item :labelStyle="{ width: '165px' }" label="培训发生组名称">{{formData?.affiliationName||'-'}}</a-descriptions-item> <a-descriptions-item :labelStyle="{ width: '165px' }" label="培训发生组名称">{{formData?.affiliationName||'-'}}</a-descriptions-item>
<a-descriptions-item label="是否为根节点"> <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> <span v-else>({{ {1:'',2:'',3:''}[formData?.code] }}级审批)</span>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="组织担当">{{formData?.act||'-'}}</a-descriptions-item> <a-descriptions-item label="组织担当">{{formData?.act||'-'}}</a-descriptions-item>
@@ -104,7 +104,8 @@ const props = defineProps({
title: { title: {
type: String, type: String,
default: "" default: ""
} },
parentName: String,
}); });
const emit = defineEmits({}); const emit = defineEmits({});
const visibleModal = ref(false) const visibleModal = ref(false)
@@ -288,6 +289,7 @@ watch(visible, (val)=>{
api.getAffiliationById(props.id).then(res=>{ api.getAffiliationById(props.id).then(res=>{
if(res.data.code == 200){ if(res.data.code == 200){
formData.value = res.data.data formData.value = res.data.data
formData.value.parentName = props.parentName
formData.value.act = filterList(formData.value.affiliationUserList,0) formData.value.act = filterList(formData.value.affiliationUserList,0)
formData.value.one = filterList(formData.value.affiliationUserList,1) formData.value.one = filterList(formData.value.affiliationUserList,1)
formData.value.two = filterList(formData.value.affiliationUserList,2) formData.value.two = filterList(formData.value.affiliationUserList,2)

View File

@@ -35,7 +35,7 @@
<template #bodyCell="{ record, column }"> <template #bodyCell="{ record, column }">
<template v-if="column.key === 'operation'"> <template v-if="column.key === 'operation'">
<a-space > <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> <div style="color: #1890ff;cursor: pointer;">查看</div>
</lockLecturer> </lockLecturer>
<a-button v-if="record.status!=2" type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button> <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.leveOneArray = []
state.formParam.leveTwoArray = [] state.formParam.leveTwoArray = []
state.formParam.leveThreeArray = [] state.formParam.leveThreeArray = []
state.formParam.leveOneValue = null
state.formParam.leveTwoValue = null
state.formParam.leveThreeValue = null
} }
state.formParam.code = null state.formParam.code = null
} }