zhouwx
2025-10-20 71a112b7d78698b7e4df94e6255bf302bf415b35
src/views/work/onlineEducation/offlineEducation/components/recordDialog.vue
@@ -20,7 +20,21 @@
          </el-select>
        </el-form-item>
        <el-form-item label="计划名称:"  prop="planName" >
          <el-input v-model.trim="state.form.planName" placeholder="请输入计划名称"></el-input>
<!--          <el-input v-model.trim="state.form.planName" placeholder="请输入计划名称"></el-input>-->
          <el-select
              clearable
              v-model="state.form.planName"
              :disabled="state.title =='查看'"
              filterable
              style="width: 100%"
          >
            <el-option
                v-for="item in state.planList"
                :key="item.id"
                :label="item.name"
                :value="item.trainName"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="学员:"  prop="studentId" >
          <el-select
@@ -122,6 +136,7 @@
import {delPic} from "@/api/onlineEducation/banner";
import {getToken} from "@/utils/auth";
import {getUser} from "@/api/onlineEducation/user";
import {getTrainPlanPage} from "@/api/onlineEducation/trainPlan";
const emit = defineEmits(["getList"]);
const dialogVisible = ref(false)
@@ -184,7 +199,8 @@
  header: {
    Authorization: getToken()
  },
  students: []
  students: [],
  planList: []
})
onMounted(() => {
@@ -228,6 +244,7 @@
    state.form.id = value.id
  }
  await   getPeopleList()
  await getPlanList()
  dialogVisible.value = true
}
const onSubmit = async () => {
@@ -346,6 +363,23 @@
    ElMessage.warning(res.message)
  }
};
const getPlanList = async ()=> {
  if(state.isAdmin && !state.form.companyId && (state.form.companyId == 0 || state.form.companyId == null)){
    return
  }
  const queryParams = {
    pageNum: 1,
    pageSize: 9999,
    companyId: state.form.companyId
  }
  const res = await getTrainPlanPage(queryParams);
  if(res.code === 200){
    state.planList = res.data.list
  }else{
    ElMessage.warning(res.message)
  }
};
const handleScrollStu = () => {
  console.log(' student',state.hasMoreStu);
  if(state.stuPageNum >= state.hasMoreStu) return
@@ -452,7 +486,10 @@
const selectValueCom = (val) => {
  state.students = []
  state.form.studentId = null
  state.planList = []
  state.form.planName = ''
  getPeopleList()
  getPlanList()
}