Compare commits
No commits in common. "master" and "dev" have entirely different histories.
@ -1,4 +1,3 @@
|
||||
import { status } from 'nprogress'
|
||||
import http from './http.js'
|
||||
// export function GetGradeName() {
|
||||
// return http.get(`/api/Grade/GetGradeName`)
|
||||
@ -22,11 +21,11 @@ export function ModifyTeacher(params) {
|
||||
}
|
||||
|
||||
export function StudentGetClassPageList(a, b, c, d, e, f, g) {
|
||||
return http.get(`/api/Student/GetStudentPageList?ClassId=${a ?? 0}&StudentNo=${b}&StudentName=${c}&Sex=${d}&StudentStatus=${e}&PageIndex=${f}&PageSize=${g}`)
|
||||
return http.get(`/api/Student/GetStudentPageList?ClassId=${a}&StudentNo=${b}&StudentName=${c}&Sex=${d}&StudentStatus=${e}&PageIndex=${f}&PageSize=${g}`)
|
||||
}
|
||||
|
||||
export function StudentGetClassAll(a) {
|
||||
return http.get(`/api/Student/GetStudentList?ClassId=${a ?? 0}`)
|
||||
return http.get(`/api/Student/GetStudentList?ClassId=${a}`)
|
||||
}
|
||||
|
||||
export function AddStudent(params) {
|
||||
@ -321,18 +320,8 @@ export function StudentClassReportDetails(a) {
|
||||
return http.get(`/api/TrainingData/GetStudentClassReportDetails?`+a)
|
||||
}
|
||||
|
||||
//学校账号开通预约列表
|
||||
export function getSchoolReservationList(pageIndex, status) {
|
||||
return http.get(`/api/School/GetSchoolAccountApplicationPageList?PageIndex=${pageIndex}&PageSize=20&Status=${status ? status : 0}`)
|
||||
}
|
||||
|
||||
//更新预约状态
|
||||
export function changeSchoolReservationStatus(id, status) {
|
||||
return http.post(`/api/School/UpdateSchoolAccountApplicationStatus?id=${id}&Status=${status ? status : 0}`,{
|
||||
status: status ? status : 0,
|
||||
id: id
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -14,11 +14,10 @@ let loadingStatus = false;
|
||||
console.log(process.env.NODE_ENV, 'process.env.NODE_ENV')
|
||||
if (process.env.NODE_ENV == 'development') {
|
||||
// axios.defaults.baseURL = 'http://101.132.164.149:9991/';
|
||||
// axios.defaults.baseURL = 'http://212.129.154.46:9991/'; //测试
|
||||
axios.defaults.baseURL = 'http://8.153.108.90:9991/'; //测试
|
||||
// axios.defaults.baseURL = 'http://192.168.0.146:9991/'; //汤龙本地
|
||||
axios.defaults.baseURL = 'http://212.129.154.46:9991/'; //测试
|
||||
// axios.defaults.baseURL = 'http://192.168.0.32:9991/'; //汤龙本地
|
||||
// axios.defaults.baseURL = 'http://47.101.60.251:9991/';
|
||||
// axios.defaults.baseURL = 'http://localhost:9991/';
|
||||
axios.defaults.baseURL = 'http://localhost:9991/';
|
||||
// axios.defaults.baseURL = 'http://120.48.130.27:14102/';
|
||||
|
||||
} else if (process.env.NODE_ENV == 'debug') {
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
let loadingInstance;
|
||||
let loadingStatus = false;
|
||||
if (process.env.NODE_ENV == 'development') {
|
||||
axios.defaults.baseWeChatURL = 'https://wechatapi-qa.yuedongsports.com/';
|
||||
axios.defaults.baseWeChatURL = 'https://wechatapi.yuedongsports.com/';
|
||||
|
||||
} else if (process.env.NODE_ENV == 'debug') {
|
||||
|
||||
|
@ -10,7 +10,6 @@ import viewgird from './viewGird'
|
||||
import store from '../store/index'
|
||||
import redirect from './redirect'
|
||||
import charts from './charts'
|
||||
import links from './outlink'
|
||||
const routes = [{
|
||||
path: '/',
|
||||
name: 'index',
|
||||
@ -23,7 +22,6 @@ const routes = [{
|
||||
...viewgird,
|
||||
...redirect,
|
||||
...charts,
|
||||
...links, //外链
|
||||
// {
|
||||
// path: '/home',
|
||||
// name: 'home',
|
||||
@ -584,11 +582,6 @@ const routes = [{
|
||||
path: '/sportsHallClass', //运动馆/班级管理
|
||||
name: 'sportsHallClass',
|
||||
component: () => import('@/views/sportsHall/classManage/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/openReservation', //学校管理/开放预约
|
||||
name: 'openReservation',
|
||||
component: () => import('@/views/openReservation/index.vue'),
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1,8 +0,0 @@
|
||||
|
||||
let links=[
|
||||
{
|
||||
path: '/heart',
|
||||
name: 'heart',
|
||||
component: () => import('@/views/outlink/heart/index.vue')
|
||||
}]
|
||||
export default links
|
@ -1,309 +0,0 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { Table, Tag, Divider, ConfigProvider, Input, Button, Modal, Select, Pagination, message ,Popconfirm} from 'ant-design-vue';
|
||||
import zhCN from 'ant-design-vue/es/locale/zh_CN';
|
||||
import { getSchoolReservationList } from '@/api/grade';
|
||||
import { changeSchoolReservationStatus } from '@/api/grade';
|
||||
|
||||
|
||||
// Component logic goes here
|
||||
onMounted(() => {
|
||||
// Initialization code
|
||||
getSchoolList()
|
||||
})
|
||||
|
||||
const getSchoolList = async () => {
|
||||
const res = await getSchoolReservationList(pageIndex.value, searchSchoolStatus.value);
|
||||
schoolList.value = res.data.datas
|
||||
total.value = res.data.total;
|
||||
}
|
||||
|
||||
const schoolList = ref([]);
|
||||
const total = ref(0);
|
||||
const pageIndex = ref(1);
|
||||
const columns = [
|
||||
{
|
||||
title: '序号',
|
||||
key: 'index',
|
||||
// width: 80,
|
||||
customRender: ({ index }) => index + 1
|
||||
},
|
||||
{
|
||||
title: '学校名称',
|
||||
dataIndex: 'schoolName',
|
||||
key: 'schoolName',
|
||||
},
|
||||
{
|
||||
title: '学校地址',
|
||||
dataIndex: 'schoolAddress',
|
||||
key: 'schoolAddress',
|
||||
},
|
||||
{
|
||||
title: '联系人',
|
||||
dataIndex: 'userName',
|
||||
key: 'userName',
|
||||
},
|
||||
{
|
||||
title: '联系电话',
|
||||
dataIndex: 'phoneNo',
|
||||
key: 'phoneNo',
|
||||
},
|
||||
{
|
||||
title: '申请时间',
|
||||
dataIndex: 'visitingTime',
|
||||
key: 'visitingTime',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'set',
|
||||
key: 'set',
|
||||
},
|
||||
]
|
||||
|
||||
const statusList = [
|
||||
{ label: '全部', value: 0 },
|
||||
{ label: '未联系', value: 1 },
|
||||
{ label: '已联系', value: 2 },
|
||||
]
|
||||
|
||||
const searchSchoolStatus = ref(0);
|
||||
|
||||
const handleChange = (value) => {
|
||||
searchSchoolStatus.value = value;
|
||||
getSchoolList();
|
||||
}
|
||||
|
||||
const changeStutus = async (id ) =>{
|
||||
const res = await changeSchoolReservationStatus(id,2);
|
||||
message.success('状态变更成功');
|
||||
getSchoolList();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="class-manage">
|
||||
<div class="select-box">
|
||||
学校状态:
|
||||
<!-- <Input type="text" placeholder="请输入学校名称" v-model:value="searchSchoolName" class="inputt" /> -->
|
||||
<Select
|
||||
v-model:value="searchSchoolStatus"
|
||||
placeholder="请选择状态"
|
||||
class="select"
|
||||
@change="handleChange"
|
||||
>
|
||||
<Select.Option v-for="item in statusList" :key="item.value" :value="item.value">
|
||||
{{ item.label }}
|
||||
</Select.Option>
|
||||
</Select>
|
||||
|
||||
<Button class="btn" type="primary" @click="handleChange(0)"> 重置</Button>
|
||||
|
||||
</div>
|
||||
|
||||
<ConfigProvider :locale="zhCN">
|
||||
<Table :columns="columns" :data-source="schoolList" :locale="zhCN" :pagination="{ pageSize: 20 ,total: total, current: pageIndex, onChange: (page) => { pageIndex = page; getSchoolList() } }">
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template v-if="column.key === 'index'">
|
||||
|
||||
{{ index + 1 }}
|
||||
</template>
|
||||
<!-- <template v-if="column.key === 'studentCount' && record.id == allStudentClass.id">
|
||||
{{ studentslist.length }}
|
||||
</template> -->
|
||||
<template v-if="column.key == 'set'">
|
||||
<Popconfirm
|
||||
title="是否变更联系状态状态?"
|
||||
ok-text="是"
|
||||
cancel-text="否"
|
||||
@confirm="changeStutus(record.id, record.status)"
|
||||
@cancel="cancel"
|
||||
v-if="record.status == 1"
|
||||
>
|
||||
<a >未联系</a>
|
||||
</Popconfirm>
|
||||
<view v-if="record.status == 2">已联系</view>
|
||||
<!-- <a @click="setCilck" class="settingg">删除</a> -->
|
||||
</template>
|
||||
</template>
|
||||
</Table>
|
||||
</ConfigProvider>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.ever {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
|
||||
.inputtt {
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.posi {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 20px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.student-box {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 16px;
|
||||
justify-content: flex-start;
|
||||
padding: 0 30px 30px;
|
||||
}
|
||||
|
||||
.action {
|
||||
margin-left: 94px;
|
||||
margin-top: 20px;
|
||||
margin-bottom: -10px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.student-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
min-width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
background-color: #fff;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 10px;
|
||||
box-sizing: border-box;
|
||||
padding: 0 16px;
|
||||
font-size: 14px;
|
||||
position: relative;
|
||||
border: 1px solid #1890ff;
|
||||
|
||||
.sex {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-color: #fff;
|
||||
border-radius: 50%;
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.index {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #1890ff;
|
||||
color: #fff;
|
||||
min-width: 20px;
|
||||
border-radius: 5px 0 5px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.click {
|
||||
background-color: #1890ff;
|
||||
color: #fff;
|
||||
animation: selectAnimation 0.3s ease;
|
||||
}
|
||||
|
||||
.noClick {
|
||||
// animation: noSelectAnimation 0.3s ease;
|
||||
}
|
||||
|
||||
@keyframes noSelectAnimation {
|
||||
0% {
|
||||
background-color: #1890ff;
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
100% {
|
||||
background-color: #f0f0f0;
|
||||
transform: scale(1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes selectAnimation {
|
||||
0% {
|
||||
background-color: #f0f0f0;
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
100% {
|
||||
background-color: #1890ff;
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
.click-box {
|
||||
margin-left: 86px;
|
||||
margin-right: 66px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
|
||||
.class-manage {
|
||||
padding: 24px;
|
||||
background: #fff;
|
||||
margin: 12px;
|
||||
border-radius: 10px;
|
||||
min-height: 90vh;
|
||||
|
||||
.select-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* justify-content: space-between; */
|
||||
margin-bottom: 16px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.select-name {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-right: 16px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.new-class-btn {
|
||||
margin-bottom: 16px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.inputt {
|
||||
width: 250px;
|
||||
height: 36px;
|
||||
border-radius: 5px;
|
||||
padding-left: 5px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.settingg {
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
@ -1,28 +0,0 @@
|
||||
<template>
|
||||
<!-- 页面无内容,自动跳转外部链接 -->
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted } from 'vue'
|
||||
import { useRouter , useRoute } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
let externalUrl = 'https://allheartrates.yuedongsports.com/#/auth/login?token=' // 替换为你的外部链接
|
||||
if (process.env.NODE_ENV == 'development') {
|
||||
externalUrl = 'http://localhost:5666/auth/login?token='
|
||||
}else if(window.location.host == 'smartsports-qa.yuedongsports.com'){
|
||||
externalUrl = 'https://allheartrates-qa.yuedongsports.com/#/auth/login?token='
|
||||
}
|
||||
const token = 'Bearer' + JSON.parse(localStorage.getItem('user'))?.token || ''
|
||||
// const token ='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIxNjIiLCJpYXQiOiIxNzUyODE5MzcyIiwibmJmIjoiMTc1MjgxOTM3MiIsImV4cCI6IjE3NTI4MjY1NzIiLCJpc3MiOiJ2b2wuY29yZS5vd25lciIsImF1ZCI6InZvbC5jb3JlIn0.fIlBVdJdMd7kcIrmtyKKKRDaqK8GhReheHfVse5FSk4'
|
||||
window.open(externalUrl + token)
|
||||
console.log(router, route.matched[route.matched.length - 2],localStorage.getItem('user'))
|
||||
router.replace('/')
|
||||
})
|
||||
|
||||
</script>
|
@ -135,7 +135,7 @@ const columns = [
|
||||
title: '班级人数',
|
||||
dataIndex: 'studentCount',
|
||||
key: 'studentCount',
|
||||
sorter: (a, b) => a.studentCount - b.studentCount ,
|
||||
sorter: (a, b) => a - b,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@ -174,23 +174,20 @@ const handleOk = () => {
|
||||
message.error('班级名称不能为空');
|
||||
return;
|
||||
}
|
||||
// if (!classFrom.value.teacherDetail) {
|
||||
// message.error('所属教练不能为空');
|
||||
// return;
|
||||
// }
|
||||
// if (classFrom.value.studentIds.length == 0) {
|
||||
// message.error('学生列表不能为空');
|
||||
// return;
|
||||
// }
|
||||
let teacherDetail = {}
|
||||
if(classFrom.value.teacherDetail) {
|
||||
teacherDetail = teacherList.value.find(item => item.teacherName === classFrom.value.teacherDetail);
|
||||
}
|
||||
if (!classFrom.value.teacherDetail) {
|
||||
message.error('所属教练不能为空');
|
||||
return;
|
||||
}
|
||||
if (classFrom.value.studentIds.length == 0) {
|
||||
message.error('学生列表不能为空');
|
||||
return;
|
||||
}
|
||||
|
||||
// if (!teacherDetail) {
|
||||
// message.error('请选择有效的教练');
|
||||
// return;
|
||||
// }
|
||||
let teacherDetail = teacherList.value.find(item => item.teacherName === classFrom.value.teacherDetail);
|
||||
if (!teacherDetail) {
|
||||
message.error('请选择有效的教练');
|
||||
return;
|
||||
}
|
||||
|
||||
let studentIds = [];
|
||||
classFrom.value.studentIds.map(item => {
|
||||
@ -198,7 +195,7 @@ const handleOk = () => {
|
||||
})
|
||||
let params = {
|
||||
className: classFrom.value.className,
|
||||
teacherIds: teacherDetail.id ? [teacherDetail.id] : [],
|
||||
teacherIds: [teacherDetail.id],
|
||||
studentNoList: studentIds // 只传学生ID
|
||||
};
|
||||
|
||||
@ -273,7 +270,7 @@ const nowStudentShow = ref(false);
|
||||
const lookStudent = (id) => {
|
||||
console.log('查看学员详情', id);
|
||||
nowStudentShow.value = true;
|
||||
getStundList( id);
|
||||
getStundList(id == allStudentClass.value.id ? 0 : id);
|
||||
}
|
||||
|
||||
watch(open, (newVal) => {
|
||||
@ -330,13 +327,13 @@ const handleSearch = () => {
|
||||
<template v-if="column.key === 'index'">
|
||||
{{ index + 1 }}
|
||||
</template>
|
||||
<!-- <template v-if="column.key === 'studentCount' && record.id == allStudentClass.id">
|
||||
<template v-if="column.key === 'studentCount' && record.id == allStudentClass.id">
|
||||
{{ studentslist.length }}
|
||||
</template> -->
|
||||
</template>
|
||||
<template v-if="column.key == 'set'">
|
||||
<a @click="lookStudent(record.id)" class="settingg">学员详情</a>
|
||||
<a @click="setCilck(record.id, record.className, record.teacherName)"
|
||||
class="settingg">编辑</a>
|
||||
v-if="record.id != allStudentClass.id" class="settingg">编辑</a>
|
||||
<!-- <a @click="setCilck" class="settingg">删除</a> -->
|
||||
</template>
|
||||
</template>
|
||||
@ -350,7 +347,7 @@ const handleSearch = () => {
|
||||
:maxlength="32" />
|
||||
</div>
|
||||
|
||||
<div class="ever">学生列表:
|
||||
<div class="ever"><text style="color: red;">* </text>学生列表:
|
||||
<Button @click="showStudent" type="primary">分配学生</Button>
|
||||
</div>
|
||||
<div class="action">
|
||||
@ -373,8 +370,7 @@ const handleSearch = () => {
|
||||
</transition-group>
|
||||
</vue-draggable-next>
|
||||
|
||||
<!-- <text style="color: red;">* </text> -->
|
||||
<div class="ever">所属教练:
|
||||
<div class="ever"><text style="color: red;">* </text>所属教练:
|
||||
<Select v-model:value="classFrom.teacherDetail" style="width: 200px"
|
||||
:options="teacherList.map(item => ({ value: item.teacherName }))"></Select>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user