Browse Source

修改班级和排课

wangzeyan
王泽彦 11 months ago
parent
commit
89b9e21057
  1. 58
      admin/package-lock.json
  2. 5
      admin/package.json
  3. 6
      admin/src/app/views/classroom/classroom.vue
  4. 5
      admin/src/app/views/classroom/components/classroom-edit.vue
  5. 127
      admin/src/app/views/timetables/timetables.vue
  6. 7
      admin/src/app/views/yjpz_config/yjpz_config.vue
  7. 7620
      admin/yarn.lock

58
admin/package-lock.json

@ -9,6 +9,11 @@
"version": "1.0.0", "version": "1.0.0",
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "2.0.10", "@element-plus/icons-vue": "2.0.10",
"@fullcalendar/core": "^6.1.17",
"@fullcalendar/daygrid": "^6.1.17",
"@fullcalendar/interaction": "^6.1.17",
"@fullcalendar/timegrid": "^6.1.17",
"@fullcalendar/vue3": "^6.1.17",
"@highlightjs/vue-plugin": "2.1.0", "@highlightjs/vue-plugin": "2.1.0",
"@types/lodash-es": "4.17.6", "@types/lodash-es": "4.17.6",
"@vueuse/core": "9.12.0", "@vueuse/core": "9.12.0",
@ -962,6 +967,50 @@
"resolved": "https://registry.npmmirror.com/@floating-ui/utils/-/utils-0.1.6.tgz", "resolved": "https://registry.npmmirror.com/@floating-ui/utils/-/utils-0.1.6.tgz",
"integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A=="
}, },
"node_modules/@fullcalendar/core": {
"version": "6.1.17",
"resolved": "https://registry.npmmirror.com/@fullcalendar/core/-/core-6.1.17.tgz",
"integrity": "sha512-0W7lnIrv18ruJ5zeWBeNZXO8qCWlzxDdp9COFEsZnyNjiEhUVnrW/dPbjRKYpL0edGG0/Lhs0ghp1z/5ekt8ZA==",
"dependencies": {
"preact": "~10.12.1"
}
},
"node_modules/@fullcalendar/daygrid": {
"version": "6.1.17",
"resolved": "https://registry.npmmirror.com/@fullcalendar/daygrid/-/daygrid-6.1.17.tgz",
"integrity": "sha512-K7m+pd7oVJ9fW4h7CLDdDGJbc9szJ1xDU1DZ2ag+7oOo1aCNLv44CehzkkknM6r8EYlOOhgaelxQpKAI4glj7A==",
"peerDependencies": {
"@fullcalendar/core": "~6.1.17"
}
},
"node_modules/@fullcalendar/interaction": {
"version": "6.1.17",
"resolved": "https://registry.npmmirror.com/@fullcalendar/interaction/-/interaction-6.1.17.tgz",
"integrity": "sha512-AudvQvgmJP2FU89wpSulUUjeWv24SuyCx8FzH2WIPVaYg+vDGGYarI7K6PcM3TH7B/CyaBjm5Rqw9lXgnwt5YA==",
"peerDependencies": {
"@fullcalendar/core": "~6.1.17"
}
},
"node_modules/@fullcalendar/timegrid": {
"version": "6.1.17",
"resolved": "https://registry.npmmirror.com/@fullcalendar/timegrid/-/timegrid-6.1.17.tgz",
"integrity": "sha512-K4PlA3L3lclLOs3IX8cvddeiJI9ZVMD7RA9IqaWwbvac771971foc9tFze9YY+Pqesf6S+vhS2dWtEVlERaGlQ==",
"dependencies": {
"@fullcalendar/daygrid": "~6.1.17"
},
"peerDependencies": {
"@fullcalendar/core": "~6.1.17"
}
},
"node_modules/@fullcalendar/vue3": {
"version": "6.1.17",
"resolved": "https://registry.npmmirror.com/@fullcalendar/vue3/-/vue3-6.1.17.tgz",
"integrity": "sha512-0+qi/PK/xCkTQXh2CaeN2AkP+SvQTznPhwBXuIyrtsR0Ua8UpmGEXI+my3qQ6o003r8gPUY2e785ywIyhX2zCA==",
"peerDependencies": {
"@fullcalendar/core": "~6.1.17",
"vue": "^3.0.11"
}
},
"node_modules/@highlightjs/vue-plugin": { "node_modules/@highlightjs/vue-plugin": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/@highlightjs/vue-plugin/-/vue-plugin-2.1.0.tgz", "resolved": "https://registry.npmmirror.com/@highlightjs/vue-plugin/-/vue-plugin-2.1.0.tgz",
@ -4997,6 +5046,15 @@
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
"dev": true "dev": true
}, },
"node_modules/preact": {
"version": "10.12.1",
"resolved": "https://registry.npmmirror.com/preact/-/preact-10.12.1.tgz",
"integrity": "sha512-l8386ixSsBdbreOAkqtrwqHwdvR35ID8c3rKPa8lCWuO86dBi32QWHV4vfsZK1utLLFMvw+Z5Ad4XLkZzchscg==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/preact"
}
},
"node_modules/prelude-ls": { "node_modules/prelude-ls": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz", "resolved": "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz",

5
admin/package.json

@ -10,6 +10,11 @@
}, },
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "2.0.10", "@element-plus/icons-vue": "2.0.10",
"@fullcalendar/core": "^6.1.17",
"@fullcalendar/daygrid": "^6.1.17",
"@fullcalendar/interaction": "^6.1.17",
"@fullcalendar/timegrid": "^6.1.17",
"@fullcalendar/vue3": "^6.1.17",
"@highlightjs/vue-plugin": "2.1.0", "@highlightjs/vue-plugin": "2.1.0",
"@types/lodash-es": "4.17.6", "@types/lodash-es": "4.17.6",
"@vueuse/core": "9.12.0", "@vueuse/core": "9.12.0",

6
admin/src/app/views/classroom/classroom.vue

@ -79,6 +79,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="loadClassroomList()">{{ t('search') }}</el-button> <el-button type="primary" @click="loadClassroomList()">{{ t('search') }}</el-button>
<el-button @click="resetForm(searchFormRef)">{{ t('reset') }}</el-button> <el-button @click="resetForm(searchFormRef)">{{ t('reset') }}</el-button>
@ -119,6 +120,7 @@
<el-table-column prop="sort_order" :label="t('sortOrder')" min-width="120" :show-overflow-tooltip="true"/> <el-table-column prop="sort_order" :label="t('sortOrder')" min-width="120" :show-overflow-tooltip="true"/>
<el-table-column :label="t('operation')" fixed="right" min-width="120"> <el-table-column :label="t('operation')" fixed="right" min-width="120">
<template #default="{ row }"> <template #default="{ row }">
<el-button type="primary" link @click="editEvent(row)">{{ t('edit') }}</el-button> <el-button type="primary" link @click="editEvent(row)">{{ t('edit') }}</el-button>
@ -143,8 +145,7 @@
import { reactive, ref, watch } from 'vue' import { reactive, ref, watch } from 'vue'
import { t } from '@/lang' import { t } from '@/lang'
import { useDictionary } from '@/app/api/dict' import { useDictionary } from '@/app/api/dict'
import { getClassroomList, deleteClassroom, getWithCampusList, getWithPersonnelList, getWithPersonnelList } from '@/app/api/classroom' import { getClassroomList, deleteClassroom, getWithCampusList, getWithPersonnelList } from '@/app/api/classroom'
import { img } from '@/utils/common'
import { ElMessageBox,FormInstance } from 'element-plus' import { ElMessageBox,FormInstance } from 'element-plus'
import Edit from '@/app/views/classroom/components/classroom-edit.vue' import Edit from '@/app/views/classroom/components/classroom-edit.vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
@ -185,6 +186,7 @@ const selectData = ref<any[]>([])
} }
statusDictList(); statusDictList();
/** /**
* 获取场地管理列表 * 获取场地管理列表
*/ */

5
admin/src/app/views/classroom/components/classroom-edit.vue

@ -75,6 +75,7 @@
<el-input v-model="formData.remarks" clearable :placeholder="t('remarksPlaceholder')" class="input-width" /> <el-input v-model="formData.remarks" clearable :placeholder="t('remarksPlaceholder')" class="input-width" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
@ -93,7 +94,7 @@ import { ref, reactive, computed, watch } from 'vue'
import { useDictionary } from '@/app/api/dict' import { useDictionary } from '@/app/api/dict'
import { t } from '@/lang' import { t } from '@/lang'
import type { FormInstance } from 'element-plus' import type { FormInstance } from 'element-plus'
import { addClassroom, editClassroom, getClassroomInfo, getWithCampusList, getWithPersonnelList, getWithPersonnelList } from '@/app/api/classroom' import { addClassroom, editClassroom, getClassroomInfo, getWithCampusList, getWithPersonnelList } from '@/app/api/classroom'
let showDialog = ref(false) let showDialog = ref(false)
const loading = ref(false) const loading = ref(false)
@ -112,6 +113,7 @@ const initialFormData = {
status: '', status: '',
sort_order: '', sort_order: '',
remarks: '', remarks: '',
} }
const formData: Record<string, any> = reactive({ ...initialFormData }) const formData: Record<string, any> = reactive({ ...initialFormData })
@ -210,6 +212,7 @@ const confirm = async (formEl: FormInstance | undefined) => {
watch(() => statusList.value, () => { formData.status = statusList.value[0].value }) watch(() => statusList.value, () => { formData.status = statusList.value[0].value })
const campusIdList = ref([] as any[]) const campusIdList = ref([] as any[])
const setCampusIdList = async () => { const setCampusIdList = async () => {
campusIdList.value = await (await getWithCampusList({})).data campusIdList.value = await (await getWithCampusList({})).data

127
admin/src/app/views/timetables/timetables.vue

@ -0,0 +1,127 @@
<template>
<div class="schedule-container">
<!-- 周视图日历 -->
<FullCalendar
:options="calendarOptions"
ref="fullCalendar"
class="calendar"
/>
<!-- 课程详情弹窗 -->
<el-dialog
v-model="dialogVisible"
title="课程人员安排"
width="30%"
:before-close="handleClose"
>
<div v-if="selectedEvent">
<h3>{{ selectedEvent.title }}</h3>
<p>时间{{ selectedEvent.time }}</p>
<h4>参与人员</h4>
<ul>
<li v-for="person in selectedEvent.people" :key="person.id">
{{ person.name }} - {{ person.role }}
</li>
</ul>
</div>
</el-dialog>
</div>
</template>
<script setup>
import {ref} from 'vue';
import FullCalendar from '@fullcalendar/vue3';
import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid';
import interactionPlugin from '@fullcalendar/interaction'; //
import zhLocale from '@fullcalendar/core/locales/zh-cn';
//
const courses = ref([
{
id: 1,
title: '数学课',
start: '2025-05-18 08:00:00',
end: '2025-05-18 09:00:00',
people: [
{id: 1, name: '张老师', role: '主讲'},
{id: 2, name: '李同学', role: '学生'}
]
},
{
id: 2,
title: '英语课',
start: '2025-05-18 10:00:00',
end: '2025-05-18 11:00:00',
people: [
{id: 3, name: '王老师', role: '主讲'}
]
}
]);
//
const dialogVisible = ref(false);
const selectedEvent = ref(null);
// FullCalendar
const calendarOptions = ref({
locale: zhLocale,
plugins: [
dayGridPlugin,
timeGridPlugin,
interactionPlugin //
],
initialView: 'timeGridWeek', //
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'timeGridWeek,timeGridDay' //
},
events: courses.value,
eventClick: (info) => {
selectedEvent.value = {
title: info.event.title,
time: `${info.event.start.toLocaleTimeString()} - ${info.event.end.toLocaleTimeString()}`,
people: info.event.extendedProps.people
};
dialogVisible.value = true;
},
eventContent: (arg) => {
//
return {html: `<div class="fc-event-title">${arg.event.title}</div>`};
},
allDaySlot: false, //
slotDuration: '01:00', // 1
slotLabelFormat: {
hour: 'numeric',
minute: '2-digit',
omitZeroMinute: false,
meridiem: 'short'
}
});
//
const handleClose = () => {
dialogVisible.value = false;
selectedEvent.value = null;
};
</script>
<style>
.schedule-container {
padding: 20px;
}
.calendar {
margin-bottom: 20px;
}
.fc-event-title {
white-space: normal !important;
font-size: 14px;
}
.fc-timegrid-event {
cursor: pointer;
}
</style>

7
admin/src/app/views/yjpz_config/yjpz_config.vue

@ -1,6 +1,10 @@
<template> <template>
<div class="main-container"> <div class="main-container">
<el-card class="box-card !border-none" shadow="never"> <el-card class="box-card !border-none" shadow="never">
<div class="flex justify-between items-center">
<span class="text-lg">市场人员绩效配置</span>
</div>
<div style="margin-top: 20px">
<el-form <el-form
class="page-form" class="page-form"
:model="formData" :model="formData"
@ -39,11 +43,12 @@
<span style="margin-left: 4px"></span> <span style="margin-left: 4px"></span>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
</el-card> </el-card>
<div class="fixed-footer-wrap"> <div class="fixed-footer-wrap">
<div class="fixed-footer"> <div class="fixed-footer">
<el-button type="primary" @click="onSave()">提交</el-button> <el-button type="primary" @click="onSave()">保存</el-button>
</div> </div>
</div> </div>
</div> </div>

7620
admin/yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save