Commit 7e2fca77 by peijy

11.12 学生选课修改

parent 28614cd6
......@@ -29,3 +29,6 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
开发测试时路径访问/login正常登录测试
测试钉钉免登陆是路径访问/dd或者/进行测试
2.退出登录不需要了
3.
测试 corpId: 'dingaa3937ff8b7dd267f2c783f7214b6d69',
正式 corpId: 'dingccea40788226c988f2c783f7214b6d69',
......@@ -12,7 +12,7 @@
<van-tabbar v-model="active">
<van-tabbar-item replace to="/Main" icon="apps-o">首页</van-tabbar-item>
<van-tabbar-item replace to="/gardenIntr" icon="shop-collect-o"
>园区介绍</van-tabbar-item
>校园介绍</van-tabbar-item
>
<van-tabbar-item replace to="/Calendar" icon="todo-list-o"
......
......@@ -183,7 +183,7 @@ const routes = [
name: "StudentLeaveApply",
component: () => import("../views/parent/StudentLeaveApply.vue"),
},
/* 园区介绍 */
/* 校园介绍 */
{
path: "/gardenIntr",
name: "GardenIntr",
......@@ -231,6 +231,12 @@ const routes = [
name: "studentCourseSelection",
component: () => import("../views/parent/studentCourseSelection/index"),
},
/* 学生选课 选课列表 */
{
path: "/courseList",
name: "courseList",
component: () => import("../views/parent/studentCourseSelection/courseList"),
},
/* 学生选课 家长端 超过日期页面 */
{
path: "/studentCourse",
......
import axios from "../utils/axios";
/**
* 园区介绍
* 校园介绍
* */
// 获取园区数据
......
......@@ -263,13 +263,13 @@ export function editParents(params) {
return result;
}
//园区介绍 获取园所信息接口
//校园介绍 获取园所信息接口
export function schoolIntroducelist() {
let result = axios.get("/wx/introduce/list");
return result;
}
//园区介绍 获取园所信息接口 园区展示图片
//校园介绍 获取园所信息接口 校园展示图片
export function schoolPiclist() {
let result = axios.get("/wx/pic/schoolPiclist");
return result;
......@@ -1130,7 +1130,7 @@ export function getschoolDutyList(query) {
params: query,
});
}
// 园区介绍
// 校园介绍
export function getOther(query) {
return axios({
url: "/wx/introduce/getOther",
......
<template>
<van-nav-bar
title="选课列表"
left-text="返回"
left-arrow
@click-left="goback"
/>
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<div
class="c_main_list"
v-for="item in list"
:key="item"
style="padding: 18px 12px 15px 17px"
>
<div style="position: relative">
<!-- <div style="position: absolute; top: -18px; right: -12px">-->
<!-- <div-->
<!-- v-if="item.ryZdzt === '0'"-->
<!-- style="-->
<!-- width: 52px;-->
<!-- height: 20px;-->
<!-- background: #39befe;-->
<!-- border-radius: 0px 6px 0px 6px;-->
<!-- font-family: PingFang SC;-->
<!-- color: #ffffff;-->
<!-- font-size: 12px;-->
<!-- text-align: center;-->
<!-- "-->
<!-- >-->
<!-- 未填写-->
<!-- </div>-->
<!-- <div-->
<!-- v-if="item.ryZdzt === '1'"-->
<!-- style="-->
<!-- width: 52px;-->
<!-- height: 20px;-->
<!-- background: #aebdc5;-->
<!-- border-radius: 0px 6px 0px 6px;-->
<!-- font-family: PingFang SC;-->
<!-- color: #ffffff;-->
<!-- font-size: 12px;-->
<!-- text-align: center;-->
<!-- "-->
<!-- >-->
<!-- 已完成-->
<!-- </div>-->
<!-- </div>-->
<div
style="
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 16px;
"
>
{{ item.taskName }}
</div>
<div
style="
height: 20px;
font-family: PingFang SC;
color: #6f787d;
font-size: 14px;
margin-top: 15px;
"
>
有效期:{{ item.startTime }}{{ item.endTime}}
</div>
<div
style="
display: flex;
align-items: center;
justify-content: flex-end;
margin-top: 23px;
"
>
<div
@click="goDetails(item)"
class="flex_center"
style="
width: 64px;
height: 32px;
border: 1px solid;
border-color: #4ea0fc;
background: #4ea0fc;
border-radius: 3px;
font-family: PingFang SC;
font-weight: 700;
color: #ffffff;
font-size: 14px;
text-align: center;
margin-left: 10px;
"
>
查看
</div
>
</div>
</div>
</div>
</van-list>
</van-pull-refresh>
</template>
<script setup>
import {onMounted, ref, reactive} from "vue";
import {formatDatetime, formatDate} from "@/utils/time.js";
import {useRoute, useRouter} from "vue-router";
import {useStore} from "vuex";
import {
getStudentInfo,//学生选课信息查询
} from "@/service/studentCourseSelection";
const router = useRouter();
const route = useRoute();
const store = useStore();
const list = ref([]);
const loading = ref(false);
const finished = ref(false);
const refreshing = ref(false);
const goback = (g) => {
router.back()
// router.replace({
// path: "/main"
// });
};
const onRefresh = () => {
refreshing.value = true;
// 清空列表数据
finished.value = false;
// 重新加载数据
// 将 loading 设置为 true,表示处于加载状态
loading.value = true;
onLoad();
};
const onLoad = async () => {
if (refreshing.value) {
list.value = [];
// pageNum.value = 0;
refreshing.value = false;
}
let result = await getStudentInfo(store.state.userInfo.studentId)
console.log('getStudentInfo',result)
if (result.code == 200) {
list.value.push(...result.data);
loading.value = false;
finished.value = true
}
};
const goDetails = (item) => {
// Toast("开发中");
// if (item.ryZdzt == 0) {
router.push({
path: "/studentCourseSelection",
query: {
detail: encodeURIComponent(JSON.stringify(item)),
},
});
// }
};
</script>
<style scoped>
</style>
......@@ -789,17 +789,8 @@ const choiceArr = ref([]);
//接口返回的已选中的志愿
const paramsArr = ref([]);
const flag = ref();
const detail = JSON.parse(decodeURIComponent(route.query.detail));
onMounted(async () => {
checkedSub.value = '';
checkedArt.value = '';
checkedArtSub.value = '';
console.log('isShowDialog', isShowDialog.show)
console.log('route.query', route.query)
console.log('store', store.state.userInfo.studentId)
if (route.query.type == '2') {
checkedType.value = '2';
checkedSub.value = route.query.value
}
//课程类型 1-春季选课,2-夏季选课,3-艺体
let courseType = await getDicts('course_type')
console.log('courseType', courseType)
......@@ -812,17 +803,6 @@ onMounted(async () => {
})
console.log('typeColumn', typeColumn.value)
}
//已选课程 物理化。。。
let selectionType = await getDicts('section_type')
console.log('selectionType', selectionType)
if (selectionType.code == 200) {
selectionType.data.forEach(item => {
selectionColumn.value.push({
dictValue: item.dictValue,
dictLabel: item.dictLabel
})
})
}
//志愿下拉框
let specialty = await getDicts('specialty')
console.log('specialty', specialty)
......@@ -835,7 +815,6 @@ onMounted(async () => {
}
)
})
console.log('volunteerColumn.value', volunteerColumn.value)
}
//艺体所选科目
let artSubject = await getDicts('art_subject')
......@@ -847,30 +826,42 @@ onMounted(async () => {
dictValue: item.dictValue,
})
})
}
//已选课程 物理化。。。
let selectionType = await getDicts('section_type')
console.log('selectionType', selectionType)
if (selectionType.code == 200) {
selectionType.data.forEach(item => {
selectionColumn.value.push({
dictValue: item.dictValue,
dictLabel: item.dictLabel
})
})
}
let result = await getStudentInfo(store.state.userInfo.studentId)
console.log('result66', result)
if (result.code == 200) {
flag.value = result.data.flag
// flag.value = true
startTime.value = result.data.startTime
endTime.value = result.data.endTime
state.selectionTime = result.data.startTime + '-' + result.data.endTime
id.value = result.data.id
checkedType.value = result.data.courseType
if(result.data.courseType == '2'){
checkedSub.value = result.data.selectedCourse
//判断是否还可以选课
checkedSub.value = '';
checkedArt.value = '';
checkedArtSub.value = '';
console.log('detail', detail)
state.selectionTime = detail.startTime + '-' + detail.endTime
flag.value = detail.flag
id.value = detail.id
checkedType.value = detail.courseType
//课程类型 1-春季 2-夏季 3-艺体
if (detail.courseType == '2') {
checkedSub.value = detail.selectedCourse
}
if (result.data.selectedMajor.length != 0) {
const newArr = result.data.selectedMajor.split(",")
//志愿
if (detail.selectedMajor) {
const newArr = detail.selectedMajor.split(",")
console.log('newArr', newArr)
console.log('1224', volunteerColumn.value)
console.log('volunteerColumn.value', volunteerColumn.value)
state.firstChoice = volunteerColumn.value.find(item =>
item.value == newArr[0]
).text
console.log('state.firstChoice66', state.firstChoice)
// console.log('state.firstChoice', state.firstChoice)
// console.log('state.firstChoice66', state.firstChoice)
selectArr.value[0] = state.firstChoice
state.secondChoice = volunteerColumn.value.find(item =>
item.value == newArr[1]
......@@ -893,33 +884,39 @@ onMounted(async () => {
).text
selectArr.value[5] = state.sixChoice
volunteerIndex.value = newArr
console.log('volunteerIndex.value', volunteerIndex.value)
console.log('choiceArr.value', choiceArr.value)
// console.log('volunteerIndex.value', volunteerIndex.value)
// console.log('choiceArr.value', choiceArr.value)
}
if(result.data.courseType == '3'){
checkedArt.value = result.data.selectedCourse
checkedArtSub.value = result.data.selectedSubject
//课程类型 1-春季 2-夏季 3-艺体
if (detail.courseType == '3') {
checkedArt.value = detail.selectedCourse
checkedArtSub.value = detail.selectedSubject
}
// console.log('isShowDialog', isShowDialog.show)
// console.log('store', store.state.userInfo.studentId)
if (route.query.type == '2') {
checkedType.value = '2';
checkedSub.value = route.query.value
}
});
//成绩查看按钮
const checkGrade = async () => {
let gradeResult = await getPersonGrade(store.state.userInfo.studentId)
console.log('gradeResult',gradeResult)
if(gradeResult.code == 200){
if(gradeResult.data.length > 0){
console.log('gradeResult', gradeResult)
if (gradeResult.code == 200) {
if (gradeResult.data.length > 0) {
router.push({
path: "/totalScoreView",
query: {
data: gradeResult.data
}
})
}else{
} else {
Toast('暂无成绩')
}
}else{
} else {
Toast('信息获取失败')
}
......@@ -947,13 +944,13 @@ const toSubjectGrade = async (name, value) => {
let result = await getSelectGrade(data)
console.log('result66', result)
if (result.code == 200) {
if( result.data.length > 0){
if (result.data.length > 0) {
subjectColumn.value = result.data
isShowDialog.show = true;
}else{
} else {
Toast("暂无成绩!");
}
}else{
} else {
Toast("信息获取失败!");
}
......@@ -1224,15 +1221,15 @@ const onSubmit = async () => {
curriculaTime: formatDatetime(new Date()),
curriculaState: '2',
//物理化学科
selectedCourse: checkedArtSub.value,
selectedCourse: checkedArt.value,
selectedMajor: '',
// 艺考
selectedSubject: checkedArt.value,
selectedSubject: checkedArtSub.value,
id: id.value
}
if(data.selectedCourse == '' || data.selectedSubject == ''){
if (data.selectedCourse == '' || data.selectedSubject == '') {
Toast("艺体选课未完成");
}else{
} else {
let result = await saveSelectInfo(data)
console.log('result', result)
if (result.code == 200) {
......
<template>
<van-nav-bar
title="园区介绍"
title="校园介绍"
left-text="返回"
left-arrow
@click-left="goback"
......@@ -29,7 +29,7 @@
title-style="
font-family: PingFang SC;
font-size: 14px;border-radius:16px;border:0"
title="园区展示"
title="校园展示"
name="tab_yqzs"
>
<van-grid :border="true" :column-num="2">
......@@ -241,8 +241,8 @@ const state = reactive({
gradeList: [], // 班级列表
gradeId: 0, //选中班级
curriculum: "", //搜索框输入 教师姓名检索条件
picList: [], // 园区展示图片列表
picListNoTop: [], // 园区展示图片列表 不带第一个顶部图片
picList: [], // 校园展示图片列表
picListNoTop: [], // 校园展示图片列表 不带第一个顶部图片
top_pic_url: "", // 顶部 图片 路径
msg: "",
list: [],
......@@ -332,7 +332,7 @@ const onGetTeacher = async () => {
}
};
const onGetPics = async () => {
/* 获取园区展示图片列表 */
/* 获取校园展示图片列表 */
//访问后台接口
let result = await schoolPiclist();
if (result.code == 200) {
......
......@@ -51,12 +51,12 @@
</div>
<!-- 公共资源 -->
<van-grid :border="false" class="theIconGrid" :column-num="4">
<!-- <van-grid-item icon="photo-o" text="园区介绍" url=" #/gardenIntr">
<!-- <van-grid-item icon="photo-o" text="校园介绍" url=" #/gardenIntr">
<van-image
style="width: 48px"
:src="require('@/assets/index/yqjs.png')"
/>
<span class="item_text">园区介绍</span>
<span class="item_text">校园介绍</span>
</van-grid-item> -->
<!-- <van-grid-item icon="photo-o" text="食谱查看" url=" #/everydayFood">
<van-image
......@@ -87,12 +87,12 @@
</van-grid>
<!-- 家长登录查看的 -->
<van-grid class="theIconGrid" :column-num="4" v-show="parentShow">
<van-grid-item icon="photo-o" text="园区介绍" url=" #/gardenIntr">
<van-grid-item icon="photo-o" text="校园介绍" url=" #/gardenIntr">
<van-image
style="width: 48px"
:src="require('@/assets/index/yqjs.png')"
/>
<span class="item_text">园区介绍</span>
<span class="item_text">校园介绍</span>
</van-grid-item>
<van-grid-item icon="todo-list-o" text="校历" url=" #/Calendar">
<van-image
......@@ -238,12 +238,12 @@
</van-grid>
<!-- 老师登录查看的 -->
<van-grid class="theIconGrid" :column-num="4" v-show="teacherShow">
<van-grid-item icon="photo-o" text="园区介绍" url=" #/gardenIntr">
<van-grid-item icon="photo-o" text="校园介绍" url=" #/gardenIntr">
<van-image
style="width: 48px"
:src="require('@/assets/index/yqjs.png')"
/>
<span class="item_text">园区介绍</span>
<span class="item_text">校园介绍</span>
</van-grid-item>
<van-grid-item @click="goGrade" icon="photo-o" text="班级查看">
<van-image
......@@ -513,7 +513,6 @@ import { formatDate } from "@/utils/time";
// import Tabbar from "@/components/tabbar";
import image1 from "@/assets/swiper1.jpeg"
import image2 from "@/assets/swiper2.jpeg"
import axios from "axios";
import {
schoolPiclist,
......@@ -552,7 +551,7 @@ export default {
teacherShow: false, // 教职工端内容是否显示 教职工登录true 显示
msg: "",
list: [],
picList: [], // 园区展示图片列表
picList: [], // 校园展示图片列表
gradeListOption: [],
});
const router = useRouter();
......@@ -656,7 +655,7 @@ export default {
storetyprelationshiptyp();
getnumb();
if(store.state.userInfo.studentId){
courseInfo();
// courseInfo();
}
};
const flag = ref();
......@@ -682,8 +681,9 @@ export default {
if(noCourse.value == true){
Toast("当前没有选课任务!");
}else{
router.push({
path: "/studentCourseSelection",
path: "/courseList",
})
}
}
......
......@@ -9,7 +9,7 @@
<div>自编码:{{ item.encode }}</div>
<div>设备名称:{{ item.equipmentName }}</div>
<div>型号:{{item.model}}</div>
<div>投产日期{{ item.dateOfProduction }}</div>
<div>安装时间{{ item.dateOfProduction }}</div>
<div>地点:{{ item.place }}</div>
<div>报修日期:{{ item.reportRepairTime }}</div>
<div>报修人:{{ item.reportRepair }}</div>
......
......@@ -34,10 +34,10 @@
v-if="name == '反馈' ? false : true"
readonly
v-model="fixForm.dateOfProduction"
name="投产日期"
label="投产日期"
placeholder="投产日期"
:rules="[{ required: true, message: '请填写投产日期' }]"
name="安装时间"
label="安装时间"
placeholder="安装时间"
:rules="[{ required: true, message: '请填写安装时间' }]"
/>
<van-field
v-if="name == '反馈' ? false : true"
......@@ -209,7 +209,7 @@ const fixForm = reactive({
encode: '', //自编码
equipmentName: '', //设备名称
model: '', //型号
dateOfProduction: '', //投产日期
dateOfProduction: '', //安装时间
place: '', //地点
reportRepairTime: '', //报修时间
reportRepair: '', //报修人
......
......@@ -31,10 +31,10 @@
<van-field
readonly
v-model="fixForm.dateOfProduction"
name="投产日期"
label="投产日期"
placeholder="投产日期"
:rules="[{ required: true, message: '请填写投产日期' }]"
name="安装时间"
label="安装时间"
placeholder="安装时间"
:rules="[{ required: true, message: '请填写安装时间' }]"
/>
<van-field
readonly
......@@ -129,7 +129,7 @@ const fixForm = reactive({
encode:'', //自编码
equipmentName:'', //设备名称
model:'', //型号
dateOfProduction:'', //投产日期
dateOfProduction:'', //安装时间
place:'', //地点
reportRepairTime:'', //报修时间
reportRepair:'', //报修人
......
......@@ -5,17 +5,17 @@
<van-field readonly v-model="equipmentForm.encode" label="自编码" />
<van-field readonly v-model="equipmentForm.equipmentName" label="设备名称" />
<van-field readonly v-model="equipmentForm.model" label="型号"/>
<van-field readonly v-model="equipmentForm.specification" label="规格"/>
<!-- <van-field readonly v-model="equipmentForm.specification" label="规格"/>-->
<van-field readonly v-model="equipmentForm.classificationCode" label="分类编码"/>
<van-field readonly v-model="equipmentForm.unit" label="单位"/>
<van-field readonly v-model="affiliationType" label="归属类型"/>
<van-field readonly v-model="equipmentState" label="设备状态"/>
<van-field readonly v-model="isAllowLend" label="是否允许借出"/>
<van-field readonly v-model="isLend" label="是否借出"/>
<van-field readonly v-model="equipmentForm.dateOfProduction" label="投产日期"/>
<van-field readonly v-model="equipmentForm.dateOfProduction" label="安装时间"/>
<van-field readonly v-model="equipmentForm.price" label="价格(元)"/>
<van-field readonly v-model="equipmentForm.lifeOfUtility" label="效用年限(年)"/>
<van-field readonly v-model="equipmentForm.model" label="地点"/>
<van-field readonly v-model="equipmentForm.place" label="地点"/>
<van-field readonly v-model="equipmentForm.useName" label="使用人" />
<van-field readonly v-model="equipmentForm.remark" label="备注" />
</van-cell-group>
......@@ -35,7 +35,7 @@ const equipmentForm = reactive({
encode:'',
equipmentName:'',
model:'',
specification:'',
// specification:'',
classificationCode:'',
unit:'',
dateOfProduction:'',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment