sc
This commit is contained in:
@@ -16,6 +16,14 @@ export const auditStation = async (data) => {
|
||||
})
|
||||
}
|
||||
|
||||
// 修改机构
|
||||
export const updateStation = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/wrj/school/update',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询教员
|
||||
export const searchTeacher = async (params) => {
|
||||
return await request.get({
|
||||
@@ -27,7 +35,14 @@ export const searchTeacher = async (params) => {
|
||||
// 审核教员
|
||||
export const auditTeacher = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/wrj/teacher/audit',
|
||||
url: '/admin-api/applet/wrj/teacher/check',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 修改
|
||||
export const updateTeacher = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/wrj/teacher/update',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -26,3 +26,11 @@ export const deleteTestroom = async (params) => {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 查询考试时间
|
||||
export const searchTesttime = async (params) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/wrj/examPlace/queryDate',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -9,13 +9,20 @@
|
||||
<template #reference>
|
||||
<div>
|
||||
<div>{{ new Date(data.day).getDate() }}</div>
|
||||
<div class="mt-10px">考场数量:{{ new Date(data.day).getDate() % 5 }}</div>
|
||||
<div class="mt-10px">
|
||||
考场数量:{{ getRoomCount(new Date(data.day).getDate()) }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<el-table :data="roomList" border stripe>
|
||||
<el-table-column prop="name" label="考场名称" width="120px" />
|
||||
<el-table-column prop="address" label="考场地址" />
|
||||
</el-table>
|
||||
<div style="max-height: 300px; overflow: auto">
|
||||
<el-table :data="showRoomList(new Date(data.day).getDate())" border stripe>
|
||||
<el-table-column prop="placeName" label="考场名称" width="120px" />
|
||||
<el-table-column
|
||||
:prop="examType == 1 ? 'theoryExamAddress' : 'practiceExamAddress'"
|
||||
label="考场地址"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-calendar>
|
||||
@@ -24,14 +31,44 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Calendar">
|
||||
import { searchTestroom } from '@/api/uav/testRoom'
|
||||
|
||||
const examType = ref(1)
|
||||
|
||||
const roomList = ref([
|
||||
{
|
||||
name: '合肥瑶海长安考场',
|
||||
address: '合肥瑶海大道100号'
|
||||
}
|
||||
])
|
||||
const roomList = ref([])
|
||||
|
||||
onMounted(() => {
|
||||
getRoomList()
|
||||
})
|
||||
|
||||
function getRoomList() {
|
||||
searchTestroom({
|
||||
pageNum: -1,
|
||||
pageSize: -1
|
||||
}).then((res) => {
|
||||
roomList.value = res.list
|
||||
})
|
||||
}
|
||||
|
||||
function getRoomCount(date) {
|
||||
return roomList.value.filter((item) => {
|
||||
const pro = {
|
||||
1: 'theoryExamDate',
|
||||
2: 'practiceExamDate'
|
||||
}[examType.value]
|
||||
return item[pro].split(',').includes(date + '')
|
||||
}).length
|
||||
}
|
||||
|
||||
function showRoomList(date) {
|
||||
return roomList.value.filter((item) => {
|
||||
const pro = {
|
||||
1: 'theoryExamDate',
|
||||
2: 'practiceExamDate'
|
||||
}[examType.value]
|
||||
return item[pro].split(',').includes(date + '')
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -24,13 +24,27 @@
|
||||
<el-table-column prop="name" label="教员姓名" />
|
||||
<el-table-column prop="phone" label="联系方式" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="createTime" label="申请时间" />
|
||||
<el-table-column prop="auditRemark" label="审核状态" />
|
||||
<el-table-column prop="auditUser" label="审核人" />
|
||||
<el-table-column prop="auditTime" label="审核时间" />
|
||||
<el-table-column prop="applyTime" label="申请时间" />
|
||||
<el-table-column prop="status" label="审核状态">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.status == 1" type="info">待审核</el-tag>
|
||||
<el-tag v-else-if="row.status == 2" type="success">已通过</el-tag>
|
||||
<el-tag v-else type="danger">未通过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="checkUser" label="审核人" />
|
||||
<el-table-column prop="checkTime" label="审核时间" />
|
||||
<!-- 操作 -->
|
||||
<el-table-column label="操作" fixed="right" width="150">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
v-hasPermi="['JoinUs:Station:audit']"
|
||||
@click="handleDetail(row, 'edit')"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.status == 1"
|
||||
type="primary"
|
||||
@@ -40,15 +54,6 @@
|
||||
>
|
||||
审核
|
||||
</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="primary"
|
||||
link
|
||||
v-hasPermi="['JoinUs:Station:audit']"
|
||||
@click="handleDetail(row, 'detail')"
|
||||
>
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -60,22 +65,16 @@
|
||||
/>
|
||||
|
||||
<Dialog v-model="dialogVisible" title="教员详情" style="width: 600px">
|
||||
<el-form
|
||||
:model="form"
|
||||
ref="formRef"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
:disabled="form.status != 1"
|
||||
>
|
||||
<el-form-item label="教员姓名" prop="applyUser">
|
||||
<el-input v-model="form.applyUser" placeholder="请输入姓名" />
|
||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="80px">
|
||||
<el-form-item label="教员姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="xcwa">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
v-model="form.remark"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2 }"
|
||||
placeholder="请输入"
|
||||
@@ -83,15 +82,15 @@
|
||||
</el-form-item>
|
||||
<div v-if="dialogType == 'audit'">
|
||||
<el-divider direction="horizontal" content-position="left">审核信息</el-divider>
|
||||
<el-form-item label="审核结果" prop="shjg">
|
||||
<el-radio-group v-model="form.shjg">
|
||||
<el-form-item label="审核结果" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio :label="2" :value="2">通过</el-radio>
|
||||
<el-radio :label="3" :value="3">不通过</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核说明" prop="shsm">
|
||||
<el-form-item label="审核说明" prop="checkRemark">
|
||||
<el-input
|
||||
v-model="form.shsm"
|
||||
v-model="form.checkRemark"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2 }"
|
||||
placeholder="请输入"
|
||||
@@ -100,7 +99,7 @@
|
||||
</div>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="submitForm">保 存</el-button>
|
||||
<el-button type="primary" :disabled="formLoading" @click="submitForm">保 存</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
@@ -108,7 +107,10 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Coach">
|
||||
import { searchTeacher } from '@/api/uav/regiest'
|
||||
import { auditTeacher, searchTeacher, updateTeacher } from '@/api/uav/regiest'
|
||||
|
||||
const message = useMessage()
|
||||
|
||||
const searchForm = ref({
|
||||
name: '',
|
||||
phone: '',
|
||||
@@ -150,8 +152,35 @@ function handleDetail(row, type) {
|
||||
form.value = { ...row }
|
||||
}
|
||||
|
||||
function submitForm() {
|
||||
dialogVisible.value = false
|
||||
const formLoading = ref(false)
|
||||
const formRef = ref(null)
|
||||
async function submitForm() {
|
||||
if (!formRef.value) return
|
||||
const valid = await formRef.value.validate()
|
||||
if (!valid) return
|
||||
|
||||
try {
|
||||
formLoading.value = true
|
||||
let params = { ...form.value }
|
||||
if (dialogType.value == 'audit') {
|
||||
auditTeacher(params).then((response) => {
|
||||
if (response) {
|
||||
dialogVisible.value = false
|
||||
message.success('操作成功')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
updateTeacher(params).then((response) => {
|
||||
if (response) {
|
||||
dialogVisible.value = false
|
||||
message.success('操作成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -21,13 +21,27 @@
|
||||
<el-table-column prop="schoolName" label="机构名称" />
|
||||
<el-table-column prop="contacts" label="联系人" />
|
||||
<el-table-column prop="phone" label="联系方式" />
|
||||
<el-table-column prop="createTime" label="申请时间" />
|
||||
<el-table-column prop="auditRemark" label="审核状态" />
|
||||
<el-table-column prop="auditUser" label="审核人" />
|
||||
<el-table-column prop="auditTime" label="审核时间" />
|
||||
<el-table-column prop="applyTime" label="申请时间" />
|
||||
<el-table-column prop="status" label="审核状态" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.status == 1" type="info">待审核</el-tag>
|
||||
<el-tag v-else-if="row.status == 2" type="success">已通过</el-tag>
|
||||
<el-tag v-else type="danger">未通过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="checkUser" label="审核人" />
|
||||
<el-table-column prop="checkTime" label="审核时间" />
|
||||
<!-- 操作 -->
|
||||
<el-table-column label="操作" fixed="right" width="150">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
v-hasPermi="['JoinUs:Station:audit']"
|
||||
@click="handleDetail(row, 'edit')"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.status == 1"
|
||||
type="primary"
|
||||
@@ -37,15 +51,6 @@
|
||||
>
|
||||
审核
|
||||
</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="primary"
|
||||
link
|
||||
v-hasPermi="['JoinUs:Station:audit']"
|
||||
@click="handleDetail(row, 'detail')"
|
||||
>
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -232,7 +237,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Station">
|
||||
import { searchStation, auditStation } from '@/api/uav/regiest'
|
||||
import { searchStation, auditStation, updateStation } from '@/api/uav/regiest'
|
||||
|
||||
const message = useMessage()
|
||||
|
||||
@@ -317,6 +322,12 @@ async function submitForm() {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
updateStation(params).then((response) => {
|
||||
if (response) {
|
||||
dialogVisible.value = false
|
||||
message.success('操作成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
|
||||
Reference in New Issue
Block a user