于宏哲PHP 10 months ago
parent
commit
fefd6a9a17
  1. 14
      admin/src/app/api/pay.ts
  2. 8
      admin/src/app/api/student.ts
  3. 4
      admin/src/app/lang/zh-cn/student.student.json
  4. 32
      admin/src/app/views/customer_resources/components/customer-resources-edit.vue
  5. 9
      admin/src/app/views/customer_resources/customer_resources.vue
  6. 656
      admin/src/app/views/order_table/order_table.vue
  7. 48
      admin/src/app/views/student/components/student-edit.vue
  8. 16
      admin/src/app/views/student/student.vue

14
admin/src/app/api/pay.ts

@ -71,6 +71,7 @@ export function getRefundTransfer(params: Record<string, any>) {
})
}
/**
*
*/
@ -107,3 +108,16 @@ export function getFriendsPay(
showErrorMessage: false,
})
}
export function orderPay(params: Record<string, any>) {
return request.post(`pay/order_pay`, params, {
showSuccessMessage: true,
})
}
export function checkPaymentStatus(params: Record<string, any>) {
return request.post(`pay/check_payment_status`, params)
}

8
admin/src/app/api/student.ts

@ -2,6 +2,8 @@ import request from '@/utils/request'
// USER_CODE_BEGIN -- student
/**
*
@ -49,12 +51,12 @@ export function deleteStudent(id: number) {
return request.delete(`student/student/${id}`, { showErrorMessage: true, showSuccessMessage: true })
}
export function getWithCampusList(params: Record<string,any>){
export function getWithCustomerResourcesList(params: Record<string,any>){
return request.get('student/customer_resources_all', {params})
}export function getWithCampusList(params: Record<string,any>){
return request.get('student/campus_all', {params})
}export function getWithClassGradeList(params: Record<string,any>){
return request.get('student/class_grade_all', {params})
}export function getWithMemberList(params: Record<string,any>){
return request.get('student/member_all', {params})
}
// USER_CODE_END -- student

4
admin/src/app/lang/zh-cn/student.student.json

@ -1,10 +1,10 @@
{
"userId":"资源",
"userIdPlaceholder":"请输入资源",
"campusId":"校区",
"campusIdPlaceholder":"全部",
"classId":"班级",
"classIdPlaceholder":"请输入班级",
"userId":"用户",
"userIdPlaceholder":"请输入用户",
"name":"学员姓名",
"namePlaceholder":"请输入学员姓名",
"gender":"性别",

32
admin/src/app/views/customer_resources/components/customer-resources-edit.vue

@ -547,37 +547,7 @@ const formRules = computed(() => {
message: t('cognitiveIdeaPlaceholder'),
trigger: 'blur',
},
],
optional_class_time: [
{
required: true,
message: t('optionalClassTimePlaceholder'),
trigger: 'blur',
},
],
distance: [
{ required: true, message: t('distancePlaceholder'), trigger: 'blur' },
],
decision_maker: [
{
required: true,
message: t('decisionMakerPlaceholder'),
trigger: 'blur',
},
],
initial_intent: [
{
required: true,
message: t('initialIntentPlaceholder'),
trigger: 'blur',
},
],
campus: [
{ required: true, message: t('campusPlaceholder'), trigger: 'blur' },
],
status: [
{ required: true, message: t('statusPlaceholder'), trigger: 'blur' },
],
]
}
})

9
admin/src/app/views/customer_resources/customer_resources.vue

@ -138,11 +138,13 @@
</el-table-column>
<el-table-column :label="t('operation')" fixed="right" min-width="200"
<el-table-column :label="t('operation')" fixed="right" min-width="300"
v-if="customerResourcesTable.searchParam.type == 'zylb'">
<template #default="{ row }">
<el-button type="primary" link @click="editEvent(row)">{{ t('edit') }}</el-button>
<el-button type="primary" link @click="orderList(row.id)">订单列表</el-button>
<el-button type="primary" link @click="addOrder({'resource_id':row.id})">添加订单</el-button>
<el-button type="primary" link @click="tcEvent({'resource_id':row.id})">体测</el-button>
@ -252,6 +254,11 @@
TcCustomerResourcesDialog.value.showDialog = true
}
const orderList = (resource_id : number) => {
router.push({ path: '/order_table/order_table', query: { resource_id: resource_id } })
}

656
admin/src/app/views/order_table/order_table.vue

@ -1,323 +1,363 @@
<template>
<div class="main-container">
<el-card class="box-card !border-none" shadow="never">
<div class="flex justify-between items-center">
<span class="text-lg">{{ pageName }}</span>
<el-button type="primary" @click="addEvent">
{{ t('addOrderTable') }}
</el-button>
</div>
<el-card
class="box-card !border-none my-[10px] table-search-wrap"
shadow="never"
>
<el-form
:inline="true"
:model="orderTableTable.searchParam"
ref="searchFormRef"
>
<el-form-item :label="t('orderStatus')" prop="order_status">
<el-select
class="w-[280px]"
v-model="orderTableTable.searchParam.order_status"
clearable
:placeholder="t('orderStatusPlaceholder')"
>
<el-option label="全部" value=""></el-option>
<el-option
v-for="(item, index) in order_statusList"
:key="index"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="t('paymentType')" prop="payment_type">
<el-select
class="w-[280px]"
v-model="orderTableTable.searchParam.payment_type"
clearable
:placeholder="t('paymentTypePlaceholder')"
>
<el-option label="全部" value=""></el-option>
<el-option
v-for="(item, index) in payment_typeList"
:key="index"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="loadOrderTableList()">{{
<div class="main-container">
<el-card class="box-card !border-none" shadow="never">
<div class="flex justify-between items-center">
<span class="text-lg">{{ pageName }}</span>
<el-button type="primary" @click="addEvent">
{{ t('addOrderTable') }}
</el-button>
</div>
<el-card class="box-card !border-none my-[10px] table-search-wrap" shadow="never">
<el-form :inline="true" :model="orderTableTable.searchParam" ref="searchFormRef">
<el-form-item :label="t('orderStatus')" prop="order_status">
<el-select class="w-[280px]" v-model="orderTableTable.searchParam.order_status" clearable
:placeholder="t('orderStatusPlaceholder')">
<el-option label="全部" value=""></el-option>
<el-option v-for="(item, index) in order_statusList" :key="index" :label="item.name"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item :label="t('paymentType')" prop="payment_type">
<el-select class="w-[280px]" v-model="orderTableTable.searchParam.payment_type" clearable
:placeholder="t('paymentTypePlaceholder')">
<el-option label="全部" value=""></el-option>
<el-option v-for="(item, index) in payment_typeList" :key="index" :label="item.name"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="loadOrderTableList()">{{
t('search')
}}</el-button>
<el-button @click="resetForm(searchFormRef)">{{
<el-button @click="resetForm(searchFormRef)">{{
t('reset')
}}</el-button>
</el-form-item>
</el-form>
</el-card>
<div class="mt-[10px]">
<el-table
:data="orderTableTable.data"
size="large"
v-loading="orderTableTable.loading"
>
<template #empty>
<span>{{ !orderTableTable.loading ? t('emptyData') : '' }}</span>
</template>
<el-table-column
prop="resource_id_name"
:label="t('resourceId')"
min-width="120"
:show-overflow-tooltip="true"
/>
<el-table-column
:label="t('orderStatus')"
min-width="180"
align="center"
:show-overflow-tooltip="true"
>
<template #default="{ row }">
<div v-for="(item, index) in order_statusList">
<div v-if="item.value == row.order_status">{{ item.name }}</div>
</div>
</template>
</el-table-column>
<el-table-column
:label="t('paymentType')"
min-width="180"
align="center"
:show-overflow-tooltip="true"
>
<template #default="{ row }">
<div v-for="(item, index) in payment_typeList">
<div v-if="item.value == row.payment_type">{{ item.name }}</div>
</div>
</template>
</el-table-column>
<el-table-column
prop="order_amount"
:label="t('orderAmount')"
min-width="120"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="course_id_name"
:label="t('courseId')"
min-width="120"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="class_id_name"
:label="t('classId')"
min-width="120"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="staff_id_name"
:label="t('staffId')"
min-width="120"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="payment_time"
:label="t('paymentTime')"
min-width="120"
:show-overflow-tooltip="true"
/>
<el-table-column
:label="t('operation')"
fixed="right"
min-width="120"
>
<template #default="{ row }">
<el-button type="primary" link @click="editEvent(row)">{{
</el-form-item>
</el-form>
</el-card>
<div class="mt-[10px]">
<el-table :data="orderTableTable.data" size="large" v-loading="orderTableTable.loading">
<template #empty>
<span>{{ !orderTableTable.loading ? t('emptyData') : '' }}</span>
</template>
<el-table-column prop="resource_id_name" :label="t('resourceId')" min-width="120"
:show-overflow-tooltip="true" />
<el-table-column :label="t('orderStatus')" min-width="180" align="center"
:show-overflow-tooltip="true">
<template #default="{ row }">
<div v-for="(item, index) in order_statusList">
<div v-if="item.value == row.order_status">{{ item.name }}</div>
</div>
</template>
</el-table-column>
<el-table-column :label="t('paymentType')" min-width="180" align="center"
:show-overflow-tooltip="true">
<template #default="{ row }">
<div v-for="(item, index) in payment_typeList">
<div v-if="item.value == row.payment_type">{{ item.name }}</div>
</div>
</template>
</el-table-column>
<el-table-column prop="order_amount" :label="t('orderAmount')" min-width="120"
:show-overflow-tooltip="true" />
<el-table-column prop="course_id_name" :label="t('courseId')" min-width="120"
:show-overflow-tooltip="true" />
<el-table-column prop="class_id_name" :label="t('classId')" min-width="120"
:show-overflow-tooltip="true" />
<el-table-column prop="staff_id_name" :label="t('staffId')" min-width="120"
:show-overflow-tooltip="true" />
<el-table-column prop="payment_time" :label="t('paymentTime')" min-width="120"
:show-overflow-tooltip="true" />
<el-table-column :label="t('operation')" fixed="right" min-width="120">
<template #default="{ row }">
<el-button type="primary" link @click="startPayment(row.id)" v-if="row.order_status == 'pending'">支付</el-button>
<el-button type="primary" link @click="editEvent(row)">{{
t('edit')
}}</el-button>
<el-button type="primary" link @click="deleteEvent(row.id)">{{
<el-button type="primary" link @click="deleteEvent(row.id)">{{
t('delete')
}}</el-button>
</template>
</el-table-column>
</el-table>
<div class="mt-[16px] flex justify-end">
<el-pagination
v-model:current-page="orderTableTable.page"
v-model:page-size="orderTableTable.limit"
layout="total, sizes, prev, pager, next, jumper"
:total="orderTableTable.total"
@size-change="loadOrderTableList()"
@current-change="loadOrderTableList"
/>
</div>
</div>
<edit ref="editOrderTableDialog" @complete="loadOrderTableList" />
</el-card>
</div>
</template>
</el-table-column>
</el-table>
<div class="mt-[16px] flex justify-end">
<el-pagination v-model:current-page="orderTableTable.page" v-model:page-size="orderTableTable.limit"
layout="total, sizes, prev, pager, next, jumper" :total="orderTableTable.total"
@size-change="loadOrderTableList()" @current-change="loadOrderTableList" />
</div>
</div>
<edit ref="editOrderTableDialog" @complete="loadOrderTableList" />
</el-card>
<el-dialog v-model="showDialog" title="请扫码支付" width="320px" center @close="handleClose">
<div v-if="qrCodeUrl" class="qr-box">
<img :src="qrCodeUrl" alt="二维码" class="qr-img" />
<p class="pay-id">支付编号{{ payId }}</p>
</div>
</el-dialog>
</div>
</template>
<script lang="ts" setup>
import { reactive, ref, watch } from 'vue'
import { t } from '@/lang'
import { useDictionary } from '@/app/api/dict'
import {
getOrderTableList,
deleteOrderTable,
getWithCustomerResourcesList,
getWithCourseList,
getWithClassGradeList,
getWithPersonnelList,
} from '@/app/api/order_table'
import { img } from '@/utils/common'
import { ElMessageBox, FormInstance } from 'element-plus'
import Edit from '@/app/views/order_table/components/order-table-edit.vue'
import { useRoute } from 'vue-router'
const route = useRoute()
const pageName = route.meta.title
let orderTableTable = reactive({
page: 1,
limit: 10,
total: 0,
loading: true,
data: [],
searchParam: {
order_status: '',
payment_type: '',
},
})
const searchFormRef = ref<FormInstance>()
//
const selectData = ref<any[]>([])
//
const order_statusList = ref([] as any[])
const order_statusDictList = async () => {
order_statusList.value = await (
await useDictionary('order_status')
).data.dictionary
}
order_statusDictList()
const payment_typeList = ref([] as any[])
const payment_typeDictList = async () => {
payment_typeList.value = await (
await useDictionary('payment_type')
).data.dictionary
}
payment_typeDictList()
/**
* 获取订单列表
*/
const loadOrderTableList = (page: number = 1) => {
orderTableTable.loading = true
orderTableTable.page = page
getOrderTableList({
page: orderTableTable.page,
limit: orderTableTable.limit,
...orderTableTable.searchParam,
})
.then((res) => {
orderTableTable.loading = false
orderTableTable.data = res.data.data
orderTableTable.total = res.data.total
})
.catch(() => {
orderTableTable.loading = false
})
}
loadOrderTableList()
const editOrderTableDialog: Record<string, any> | null = ref(null)
/**
* 添加订单
*/
const addEvent = () => {
editOrderTableDialog.value.setFormData()
editOrderTableDialog.value.showDialog = true
}
/**
* 编辑订单
* @param data
*/
const editEvent = (data: any) => {
editOrderTableDialog.value.setFormData(data)
editOrderTableDialog.value.showDialog = true
}
/**
* 删除订单
*/
const deleteEvent = (id: number) => {
ElMessageBox.confirm(t('orderTableDeleteTips'), t('warning'), {
confirmButtonText: t('confirm'),
cancelButtonText: t('cancel'),
type: 'warning',
}).then(() => {
deleteOrderTable(id)
.then(() => {
loadOrderTableList()
})
.catch(() => {})
})
}
const resourceIdList = ref([])
const setResourceIdList = async () => {
resourceIdList.value = await (await getWithCustomerResourcesList({})).data
}
setResourceIdList()
const courseIdList = ref([])
const setCourseIdList = async () => {
courseIdList.value = await (await getWithCourseList({})).data
}
setCourseIdList()
const classIdList = ref([])
const setClassIdList = async () => {
classIdList.value = await (await getWithClassGradeList({})).data
}
setClassIdList()
const staffIdList = ref([])
const setStaffIdList = async () => {
staffIdList.value = await (await getWithPersonnelList({})).data
}
setStaffIdList()
const resetForm = (formEl: FormInstance | undefined) => {
if (!formEl) return
formEl.resetFields()
loadOrderTableList()
}
import QrcodeVue from '@/app/views/order_table/components/qrcode.vue'
import { reactive, ref, watch, onBeforeUnmount } from 'vue'
import { t } from '@/lang'
import { useDictionary } from '@/app/api/dict'
import {
getOrderTableList,
deleteOrderTable,
getWithCustomerResourcesList,
getWithCourseList,
getWithClassGradeList,
getWithPersonnelList,
} from '@/app/api/order_table'
import {
orderPay,
checkPaymentStatus
} from '@/app/api/pay'
import { img } from '@/utils/common'
import { ElMessageBox, FormInstance } from 'element-plus'
import Edit from '@/app/views/order_table/components/order-table-edit.vue'
import { useRoute } from 'vue-router'
const route = useRoute()
const pageName = route.meta.title
let orderTableTable = reactive({
page: 1,
limit: 10,
total: 0,
loading: true,
data: [],
searchParam: {
order_status: '',
payment_type: '',
resource_id: route.query.resource_id ?? ''
},
})
const showDialog = ref(false)
const qrCodeUrl = ref('')
const payId = ref('')
let checkTimer: ReturnType<typeof setInterval> | null = null
const startPayment = async (order_id : number) => {
orderPay({
order_id: order_id
})
.then((res) => {
qrCodeUrl.value = res.data.qrcode_url
payId.value = res.data.out_trade_no
showDialog.value = true
//
startCheckingStatus()
})
.catch(() => {
})
}
const startCheckingStatus = () => {
if (checkTimer) clearInterval(checkTimer)
checkTimer = setInterval(async () => {
checkPaymentStatus({
out_trade_no: payId.value
})
.then((res) => {
if (res.data.order_status === 'paid') {
clearInterval(checkTimer!)
showDialog.value = false
handlePaymentSuccess()
}
})
.catch(() => {
})
}, 3000)
}
const handleClose = () => {
if (checkTimer) clearInterval(checkTimer)
}
const handlePaymentSuccess = () => {
//
loadOrderTableList();
}
onBeforeUnmount(() => {
if (checkTimer) clearInterval(checkTimer)
})
const searchFormRef = ref<FormInstance>()
//
const selectData = ref<any[]>([])
//
const order_statusList = ref([] as any[])
const order_statusDictList = async () => {
order_statusList.value = await (
await useDictionary('order_status')
).data.dictionary
}
order_statusDictList()
const payment_typeList = ref([] as any[])
const payment_typeDictList = async () => {
payment_typeList.value = await (
await useDictionary('payment_type')
).data.dictionary
}
payment_typeDictList()
/**
* 获取订单列表
*/
const loadOrderTableList = (page : number = 1) => {
orderTableTable.loading = true
orderTableTable.page = page
getOrderTableList({
page: orderTableTable.page,
limit: orderTableTable.limit,
...orderTableTable.searchParam,
})
.then((res) => {
orderTableTable.loading = false
orderTableTable.data = res.data.data
orderTableTable.total = res.data.total
})
.catch(() => {
orderTableTable.loading = false
})
}
loadOrderTableList()
const editOrderTableDialog : Record<string, any> | null = ref(null)
/**
* 添加订单
*/
const addEvent = () => {
editOrderTableDialog.value.setFormData()
editOrderTableDialog.value.showDialog = true
}
/**
* 编辑订单
* @param data
*/
const editEvent = (data : any) => {
editOrderTableDialog.value.setFormData(data)
editOrderTableDialog.value.showDialog = true
}
/**
* 删除订单
*/
const deleteEvent = (id : number) => {
ElMessageBox.confirm(t('orderTableDeleteTips'), t('warning'), {
confirmButtonText: t('confirm'),
cancelButtonText: t('cancel'),
type: 'warning',
}).then(() => {
deleteOrderTable(id)
.then(() => {
loadOrderTableList()
})
.catch(() => { })
})
}
const resourceIdList = ref([])
const setResourceIdList = async () => {
resourceIdList.value = await (await getWithCustomerResourcesList({})).data
}
setResourceIdList()
const courseIdList = ref([])
const setCourseIdList = async () => {
courseIdList.value = await (await getWithCourseList({})).data
}
setCourseIdList()
const classIdList = ref([])
const setClassIdList = async () => {
classIdList.value = await (await getWithClassGradeList({})).data
}
setClassIdList()
const staffIdList = ref([])
const setStaffIdList = async () => {
staffIdList.value = await (await getWithPersonnelList({})).data
}
setStaffIdList()
const resetForm = (formEl : FormInstance | undefined) => {
if (!formEl) return
formEl.resetFields()
loadOrderTableList()
}
</script>
<style lang="scss" scoped>
/* 多行超出隐藏 */
.multi-hidden {
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
</style>
/* 多行超出隐藏 */
.multi-hidden {
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.qr-box {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 16px;
background-color: #fdfdfd;
border-radius: 12px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
transition: all 0.3s ease-in-out;
}
.qr-img {
width: 200px;
height: 200px;
border-radius: 8px;
object-fit: contain;
border: 1px solid #e5e5e5;
}
.pay-id {
margin-top: 14px;
font-size: 13px;
color: #666;
word-break: break-all;
}
</style>

48
admin/src/app/views/student/components/student-edit.vue

@ -1,6 +1,18 @@
<template>
<el-dialog v-model="showDialog" :title="formData.id ? t('updateStudent') : t('addStudent')" width="50%" class="diy-dialog-wrap" :destroy-on-close="true">
<el-form :model="formData" label-width="120px" ref="formRef" :rules="formRules" class="page-form" v-loading="loading">
<el-form-item :label="t('userId')" prop="user_id">
<el-select class="input-width" v-model="formData.user_id" clearable :placeholder="t('userIdPlaceholder')">
<el-option label="请选择" value=""></el-option>
<el-option
v-for="(item, index) in userIdList"
:key="index"
:label="item['name']"
:value="item['id']"
/>
</el-select>
</el-form-item>
<el-form-item :label="t('campusId')" >
<el-select class="input-width" v-model="formData.campus_id" clearable :placeholder="t('campusIdPlaceholder')">
<el-option label="请选择" value=""></el-option>
@ -25,18 +37,6 @@
</el-select>
</el-form-item>
<el-form-item :label="t('userId')" prop="user_id">
<el-select class="input-width" v-model="formData.user_id" clearable :placeholder="t('userIdPlaceholder')">
<el-option label="请选择" value=""></el-option>
<el-option
v-for="(item, index) in userIdList"
:key="index"
:label="item['nickname']"
:value="item['member_id']"
/>
</el-select>
</el-form-item>
<el-form-item :label="t('name')" prop="name">
<el-input v-model="formData.name" clearable :placeholder="t('namePlaceholder')" class="input-width" />
</el-form-item>
@ -109,7 +109,7 @@ import { ref, reactive, computed, watch } from 'vue'
import { useDictionary } from '@/app/api/dict'
import { t } from '@/lang'
import type { FormInstance } from 'element-plus'
import { addStudent, editStudent, getStudentInfo, getWithCampusList, getWithClassGradeList, getWithMemberList } from '@/app/api/student'
import { addStudent, editStudent, getStudentInfo, getWithCustomerResourcesList, getWithCampusList, getWithClassGradeList } from '@/app/api/student'
let showDialog = ref(false)
const loading = ref(false)
@ -119,9 +119,9 @@ const loading = ref(false)
*/
const initialFormData = {
id: '',
user_id: '',
campus_id: '',
class_id: '',
user_id: '',
name: '',
gender: '',
age: '',
@ -138,6 +138,11 @@ const formRef = ref<FormInstance>()
//
const formRules = computed(() => {
return {
user_id: [
{ required: true, message: t('userIdPlaceholder'), trigger: 'blur' },
]
,
campus_id: [
{ required: true, message: t('campusIdPlaceholder'), trigger: 'blur' },
@ -146,11 +151,6 @@ const formRules = computed(() => {
class_id: [
{ required: true, message: t('classIdPlaceholder'), trigger: 'blur' },
]
,
user_id: [
{ required: true, message: t('userIdPlaceholder'), trigger: 'blur' },
]
,
name: [
@ -238,6 +238,11 @@ const confirm = async (formEl: FormInstance | undefined) => {
watch(() => statusList.value, () => { formData.status = statusList.value[0].value })
const userIdList = ref([] as any[])
const setUserIdList = async () => {
userIdList.value = await (await getWithCustomerResourcesList({})).data
}
setUserIdList()
const campusIdList = ref([] as any[])
const setCampusIdList = async () => {
campusIdList.value = await (await getWithCampusList({})).data
@ -248,11 +253,6 @@ const confirm = async (formEl: FormInstance | undefined) => {
classIdList.value = await (await getWithClassGradeList({})).data
}
setClassIdList()
const userIdList = ref([] as any[])
const setUserIdList = async () => {
userIdList.value = await (await getWithMemberList({})).data
}
setUserIdList()
const setFormData = async (row: any = null) => {
Object.assign(formData, initialFormData)
loading.value = true

16
admin/src/app/views/student/student.vue

@ -49,12 +49,12 @@
<template #empty>
<span>{{ !studentTable.loading ? t('emptyData') : '' }}</span>
</template>
<el-table-column prop="user_id_name" :label="t('userId')" min-width="120" :show-overflow-tooltip="true"/>
<el-table-column prop="campus_id_name" :label="t('campusId')" min-width="120" :show-overflow-tooltip="true"/>
<el-table-column prop="class_id_name" :label="t('classId')" min-width="120" :show-overflow-tooltip="true"/>
<el-table-column prop="user_id_name" :label="t('userId')" min-width="120" :show-overflow-tooltip="true"/>
<el-table-column prop="name" :label="t('name')" min-width="120" :show-overflow-tooltip="true"/>
<el-table-column :label="t('gender')" min-width="180" align="center" :show-overflow-tooltip="true">
@ -105,7 +105,7 @@
import { reactive, ref, watch } from 'vue'
import { t } from '@/lang'
import { useDictionary } from '@/app/api/dict'
import { getStudentList, deleteStudent, getWithCampusList, getWithClassGradeList, getWithMemberList } from '@/app/api/student'
import { getStudentList, deleteStudent, getWithCustomerResourcesList, getWithCampusList, getWithClassGradeList } from '@/app/api/student'
import { img } from '@/utils/common'
import { ElMessageBox,FormInstance } from 'element-plus'
import Edit from '@/app/views/student/components/student-edit.vue'
@ -204,6 +204,11 @@ const deleteEvent = (id: number) => {
}
const userIdList = ref([])
const setUserIdList = async () => {
userIdList.value = await (await getWithCustomerResourcesList({})).data
}
setUserIdList()
const campusIdList = ref([])
const setCampusIdList = async () => {
campusIdList.value = await (await getWithCampusList({})).data
@ -214,11 +219,6 @@ const deleteEvent = (id: number) => {
classIdList.value = await (await getWithClassGradeList({})).data
}
setClassIdList()
const userIdList = ref([])
const setUserIdList = async () => {
userIdList.value = await (await getWithMemberList({})).data
}
setUserIdList()
const resetForm = (formEl: FormInstance | undefined) => {
if (!formEl) return

Loading…
Cancel
Save