1202 changed files with 5436 additions and 758 deletions
@ -0,0 +1,60 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// USER_CODE_BEGIN -- zhjw_roll
|
||||
|
/** |
||||
|
* 获取学籍列列表 |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function getZhjwRollList(params: Record<string, any>) { |
||||
|
return request.get(`zhjw/zhjw_roll`, {params}) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取学籍列详情 |
||||
|
* @param id 学籍列id |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function getZhjwRollInfo(id: number) { |
||||
|
return request.get(`zhjw/zhjw_roll/${id}`); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加学籍列 |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function addZhjwRoll(params: Record<string, any>) { |
||||
|
return request.post('zhjw/zhjw_roll', params, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑学籍列 |
||||
|
* @param id |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function editZhjwRoll(params: Record<string, any>) { |
||||
|
return request.put(`zhjw/zhjw_roll/${params.id}`, params, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除学籍列 |
||||
|
* @param id |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function deleteZhjwRoll(id: number) { |
||||
|
return request.delete(`zhjw/zhjw_roll/${id}`, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
export function getWithStudentsList(params: Record<string,any>){ |
||||
|
return request.get('zhjw/students_all', {params}) |
||||
|
}export function getWithStaffList(params: Record<string,any>){ |
||||
|
return request.get('zhjw/staff_all', {params}) |
||||
|
}export function getWithCoursesList(params: Record<string,any>){ |
||||
|
return request.get('zhjw/courses_all', {params}) |
||||
|
}export function getWithClassesList(params: Record<string,any>){ |
||||
|
return request.get('zhjw/classes_all', {params}) |
||||
|
} |
||||
|
|
||||
|
// USER_CODE_END -- zhjw_roll
|
||||
@ -0,0 +1,62 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
// USER_CODE_BEGIN -- zhjw_students_survey
|
||||
|
/** |
||||
|
* 获取学员体测列表 |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function getZhjwStudentsSurveyList(params: Record<string, any>) { |
||||
|
return request.get(`zhjw/zhjw_students_survey`, {params}) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取学员体测详情 |
||||
|
* @param id 学员体测id |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function getZhjwStudentsSurveyInfo(id: number) { |
||||
|
return request.get(`zhjw/zhjw_students_survey/${id}`); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加学员体测 |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function addZhjwStudentsSurvey(params: Record<string, any>) { |
||||
|
return request.post('zhjw/zhjw_students_survey', params, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑学员体测 |
||||
|
* @param id |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function editZhjwStudentsSurvey(params: Record<string, any>) { |
||||
|
return request.put(`zhjw/zhjw_students_survey/${params.id}`, params, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除学员体测 |
||||
|
* @param id |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function deleteZhjwStudentsSurvey(id: number) { |
||||
|
return request.delete(`zhjw/zhjw_students_survey/${id}`, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
export function getWithStudentsList(params: Record<string,any>){ |
||||
|
return request.get('zhjw/students_all', {params}) |
||||
|
} |
||||
|
|
||||
|
// USER_CODE_END -- zhjw_students_survey
|
||||
@ -0,0 +1,26 @@ |
|||||
|
{ |
||||
|
"studentsId":"学员", |
||||
|
"studentsIdPlaceholder":"全部", |
||||
|
"registrationDate":"报名日期", |
||||
|
"registrationDatePlaceholder":"请输入报名日期", |
||||
|
"studentNumber":"学号", |
||||
|
"studentNumberPlaceholder":"请输入学号", |
||||
|
"name":"学员姓名", |
||||
|
"namePlaceholder":"请输入学员姓名", |
||||
|
"price":"金额", |
||||
|
"pricePlaceholder":"请输入金额", |
||||
|
"staffId":"班主任", |
||||
|
"staffIdPlaceholder":"全部", |
||||
|
"courseValidity":"课程有效期", |
||||
|
"courseValidityPlaceholder":"请输入课程有效期", |
||||
|
"renewalClass":"续费等级", |
||||
|
"renewalClassPlaceholder":"请输入续费等级", |
||||
|
"coursesId":"课程", |
||||
|
"coursesIdPlaceholder":"全部", |
||||
|
"phone":"联系电话", |
||||
|
"addZhjwRoll":"添加学籍列", |
||||
|
"updateZhjwRoll":"编辑学籍列", |
||||
|
"zhjwRollDeleteTips":"确定要删除该数据吗?", |
||||
|
"startDate":"请选择开始时间", |
||||
|
"endDate":"请选择结束时间" |
||||
|
} |
||||
@ -0,0 +1,59 @@ |
|||||
|
{ |
||||
|
"studentsId":"学员", |
||||
|
"registrationDate":"报名日期", |
||||
|
"studentNumber":"学号", |
||||
|
"name":"学员姓名", |
||||
|
"price":"金额", |
||||
|
"staffId":"班主任", |
||||
|
"courseValidity":"课程有效期", |
||||
|
"renewalClass":"续费等级", |
||||
|
"coursesId":"课程", |
||||
|
"birthDate":"出生日期", |
||||
|
"classesId":"班级", |
||||
|
"sex":"性别", |
||||
|
"decisionMaker":"决策人", |
||||
|
"phone":"联系电话", |
||||
|
"requirement":"需求", |
||||
|
"timeDistance":"时间距离", |
||||
|
"purchasingPower":"购买力", |
||||
|
"attendanceRate":"出勤率", |
||||
|
"emotionalViscosity":"情感粘度", |
||||
|
"ideaCommunication":"理念沟通", |
||||
|
"effectRecognition":"效果认可", |
||||
|
"childrenLike":"孩子喜欢", |
||||
|
"referral":"转介绍", |
||||
|
"missedLessons":"待补课数", |
||||
|
"classHour":"正式课时", |
||||
|
"beCovered":"续费待补", |
||||
|
"renewalPeriod":"续费课时", |
||||
|
"studentsIdPlaceholder":"请选择学员", |
||||
|
"registrationDatePlaceholder":"请选择报名日期", |
||||
|
"studentNumberPlaceholder":"请输入学号", |
||||
|
"namePlaceholder":"请输入学员姓名", |
||||
|
"pricePlaceholder":"请输入金额", |
||||
|
"staffIdPlaceholder":"请选择班主任", |
||||
|
"courseValidityPlaceholder":"请输入课程有效期", |
||||
|
"renewalClassPlaceholder":"请输入续费等级", |
||||
|
"coursesIdPlaceholder":"请选择课程", |
||||
|
"birthDatePlaceholder":"请输入出生日期", |
||||
|
"classesIdPlaceholder":"请选择班级", |
||||
|
"sexPlaceholder":"请输入性别", |
||||
|
"decisionMakerPlaceholder":"请输入决策人", |
||||
|
"phonePlaceholder":"请输入联系电话", |
||||
|
"requirementPlaceholder":"请输入需求", |
||||
|
"timeDistancePlaceholder":"请输入时间距离", |
||||
|
"purchasingPowerPlaceholder":"请输入购买力", |
||||
|
"attendanceRatePlaceholder":"请输入出勤率", |
||||
|
"emotionalViscosityPlaceholder":"请输入情感粘度", |
||||
|
"ideaCommunicationPlaceholder":"请输入理念沟通", |
||||
|
"effectRecognitionPlaceholder":"请输入效果认可", |
||||
|
"childrenLikePlaceholder":"请输入孩子喜欢", |
||||
|
"referralPlaceholder":"请输入转介绍", |
||||
|
"missedLessonsPlaceholder":"请输入待补课数", |
||||
|
"classHourPlaceholder":"请输入正式课时", |
||||
|
"beCoveredPlaceholder":"请输入续费待补", |
||||
|
"renewalPeriodPlaceholder":"请输入续费课时", |
||||
|
"addZhjwRoll":"添加学籍列", |
||||
|
"updateZhjwRoll":"编辑学籍列", |
||||
|
"zhjwRollDeleteTips":"确定要删除该学籍列吗?" |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
{ |
||||
|
"studentsId":"学员", |
||||
|
"studentsIdPlaceholder":"全部", |
||||
|
"age":"年龄", |
||||
|
"agePlaceholder":"请输入年龄", |
||||
|
"height":"身高", |
||||
|
"heightPlaceholder":"请输入身高", |
||||
|
"weight":"体重", |
||||
|
"weightPlaceholder":"请输入体重", |
||||
|
"content":"寄语", |
||||
|
"createTime":"添加时间", |
||||
|
"addZhjwStudentsSurvey":"添加学员体测", |
||||
|
"updateZhjwStudentsSurvey":"编辑学员体测", |
||||
|
"zhjwStudentsSurveyDeleteTips":"确定要删除该数据吗?", |
||||
|
"startDate":"请选择开始时间", |
||||
|
"endDate":"请选择结束时间" |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
{ |
||||
|
"studentsId":"学员", |
||||
|
"age":"年龄", |
||||
|
"height":"身高", |
||||
|
"weight":"体重", |
||||
|
"content":"寄语", |
||||
|
"studentsIdPlaceholder":"请选择学员", |
||||
|
"agePlaceholder":"请输入年龄", |
||||
|
"heightPlaceholder":"请输入身高", |
||||
|
"weightPlaceholder":"请输入体重", |
||||
|
"contentPlaceholder":"请输入寄语", |
||||
|
"addZhjwStudentsSurvey":"添加学员体测", |
||||
|
"updateZhjwStudentsSurvey":"编辑学员体测", |
||||
|
"zhjwStudentsSurveyDeleteTips":"确定要删除该学员体测吗?" |
||||
|
} |
||||
@ -0,0 +1,256 @@ |
|||||
|
<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('addZhjwRoll') }} |
||||
|
</el-button> |
||||
|
</div> |
||||
|
|
||||
|
<el-card class="box-card !border-none my-[10px] table-search-wrap" shadow="never"> |
||||
|
<el-form :inline="true" :model="zhjwRollTable.searchParam" ref="searchFormRef"> |
||||
|
|
||||
|
<el-form-item :label="t('studentsId')" prop="students_id"> |
||||
|
<el-select class="w-[280px]" v-model="zhjwRollTable.searchParam.students_id" clearable :placeholder="t('studentsIdPlaceholder')"> |
||||
|
<el-option |
||||
|
v-for="(item, index) in studentsIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('registrationDate')" prop="registration_date"> |
||||
|
<el-date-picker v-model="zhjwRollTable.searchParam.registration_date" type="datetimerange" format="YYYY-MM-DD hh:mm:ss" |
||||
|
:start-placeholder="t('startDate')" :end-placeholder="t('endDate')" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('studentNumber')" prop="student_number"> |
||||
|
<el-input v-model="zhjwRollTable.searchParam.student_number" :placeholder="t('studentNumberPlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="t('name')" prop="name"> |
||||
|
<el-input v-model="zhjwRollTable.searchParam.name" :placeholder="t('namePlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="t('price')" prop="price"> |
||||
|
<el-input v-model="zhjwRollTable.searchParam.price" :placeholder="t('pricePlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('staffId')" prop="staff_id"> |
||||
|
<el-select class="w-[280px]" v-model="zhjwRollTable.searchParam.staff_id" clearable :placeholder="t('staffIdPlaceholder')"> |
||||
|
<el-option |
||||
|
v-for="(item, index) in staffIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('courseValidity')" prop="course_validity"> |
||||
|
<el-input v-model="zhjwRollTable.searchParam.course_validity" :placeholder="t('courseValidityPlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="t('renewalClass')" prop="renewal_class"> |
||||
|
<el-input v-model="zhjwRollTable.searchParam.renewal_class" :placeholder="t('renewalClassPlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('coursesId')" prop="courses_id"> |
||||
|
<el-select class="w-[280px]" v-model="zhjwRollTable.searchParam.courses_id" clearable :placeholder="t('coursesIdPlaceholder')"> |
||||
|
<el-option |
||||
|
v-for="(item, index) in coursesIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item> |
||||
|
<el-button type="primary" @click="loadZhjwRollList()">{{ t('search') }}</el-button> |
||||
|
<el-button @click="resetForm(searchFormRef)">{{ t('reset') }}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-card> |
||||
|
|
||||
|
<div class="mt-[10px]"> |
||||
|
<el-table :data="zhjwRollTable.data" size="large" v-loading="zhjwRollTable.loading"> |
||||
|
<template #empty> |
||||
|
<span>{{ !zhjwRollTable.loading ? t('emptyData') : '' }}</span> |
||||
|
</template> |
||||
|
<el-table-column prop="students_id_name" :label="t('studentsId')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="registration_date" :label="t('registrationDate')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="student_number" :label="t('studentNumber')" 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 prop="price" :label="t('price')" 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="course_validity" :label="t('courseValidity')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="renewal_class" :label="t('renewalClass')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="courses_id_name" :label="t('coursesId')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="phone" :label="t('phone')" 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)">{{ t('edit') }}</el-button> |
||||
|
<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="zhjwRollTable.page" v-model:page-size="zhjwRollTable.limit" |
||||
|
layout="total, sizes, prev, pager, next, jumper" :total="zhjwRollTable.total" |
||||
|
@size-change="loadZhjwRollList()" @current-change="loadZhjwRollList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</el-card> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, watch } from 'vue' |
||||
|
import { t } from '@/lang' |
||||
|
import { useDictionary } from '@/app/api/dict' |
||||
|
import { getZhjwRollList, deleteZhjwRoll, getWithStudentsList, getWithStaffList, getWithCoursesList, getWithClassesList } from '@/addon/zhjw/api/zhjw_roll' |
||||
|
import { img } from '@/utils/common' |
||||
|
import { ElMessageBox,FormInstance } from 'element-plus' |
||||
|
import { useRouter } from 'vue-router' |
||||
|
import { useRoute } from 'vue-router' |
||||
|
const route = useRoute() |
||||
|
const pageName = route.meta.title; |
||||
|
|
||||
|
let zhjwRollTable = reactive({ |
||||
|
page: 1, |
||||
|
limit: 10, |
||||
|
total: 0, |
||||
|
loading: true, |
||||
|
data: [], |
||||
|
searchParam:{ |
||||
|
"students_id":"", |
||||
|
"registration_date":"", |
||||
|
"student_number":"", |
||||
|
"name":"", |
||||
|
"price":"", |
||||
|
"staff_id":"", |
||||
|
"course_validity":"", |
||||
|
"renewal_class":"", |
||||
|
"courses_id":"" |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const searchFormRef = ref<FormInstance>() |
||||
|
|
||||
|
// 选中数据 |
||||
|
const selectData = ref<any[]>([]) |
||||
|
|
||||
|
// 字典数据 |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取学籍列列表 |
||||
|
*/ |
||||
|
const loadZhjwRollList = (page: number = 1) => { |
||||
|
zhjwRollTable.loading = true |
||||
|
zhjwRollTable.page = page |
||||
|
|
||||
|
getZhjwRollList({ |
||||
|
page: zhjwRollTable.page, |
||||
|
limit: zhjwRollTable.limit, |
||||
|
...zhjwRollTable.searchParam |
||||
|
}).then(res => { |
||||
|
zhjwRollTable.loading = false |
||||
|
zhjwRollTable.data = res.data.data |
||||
|
zhjwRollTable.total = res.data.total |
||||
|
}).catch(() => { |
||||
|
zhjwRollTable.loading = false |
||||
|
}) |
||||
|
} |
||||
|
loadZhjwRollList() |
||||
|
|
||||
|
const router = useRouter() |
||||
|
|
||||
|
/** |
||||
|
* 添加学籍列 |
||||
|
*/ |
||||
|
const addEvent = () => { |
||||
|
router.push('/zhjw_roll/zhjw_roll_edit') |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑学籍列 |
||||
|
* @param data |
||||
|
*/ |
||||
|
const editEvent = (data: any) => { |
||||
|
router.push('/zhjw_roll/zhjw_roll_edit?id='+data.id) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除学籍列 |
||||
|
*/ |
||||
|
const deleteEvent = (id: number) => { |
||||
|
ElMessageBox.confirm(t('zhjwRollDeleteTips'), t('warning'), |
||||
|
{ |
||||
|
confirmButtonText: t('confirm'), |
||||
|
cancelButtonText: t('cancel'), |
||||
|
type: 'warning', |
||||
|
} |
||||
|
).then(() => { |
||||
|
deleteZhjwRoll(id).then(() => { |
||||
|
loadZhjwRollList() |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
const studentsIdList = ref([]) |
||||
|
const setStudentsIdList = async () => { |
||||
|
studentsIdList.value = await (await getWithStudentsList({})).data |
||||
|
} |
||||
|
setStudentsIdList() |
||||
|
const staffIdList = ref([]) |
||||
|
const setStaffIdList = async () => { |
||||
|
staffIdList.value = await (await getWithStaffList({})).data |
||||
|
} |
||||
|
setStaffIdList() |
||||
|
const coursesIdList = ref([]) |
||||
|
const setCoursesIdList = async () => { |
||||
|
coursesIdList.value = await (await getWithCoursesList({})).data |
||||
|
} |
||||
|
setCoursesIdList() |
||||
|
const classesIdList = ref([]) |
||||
|
const setClassesIdList = async () => { |
||||
|
classesIdList.value = await (await getWithClassesList({})).data |
||||
|
} |
||||
|
setClassesIdList() |
||||
|
|
||||
|
const resetForm = (formEl: FormInstance | undefined) => { |
||||
|
if (!formEl) return |
||||
|
formEl.resetFields() |
||||
|
loadZhjwRollList() |
||||
|
} |
||||
|
</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> |
||||
@ -0,0 +1,458 @@ |
|||||
|
<template> |
||||
|
<div class="main-container"> |
||||
|
<div class="detail-head"> |
||||
|
<div class="left" @click="back()"> |
||||
|
<span class="iconfont iconxiangzuojiantou !text-xs"></span> |
||||
|
<span class="ml-[1px]">{{t('returnToPreviousPage')}}</span> |
||||
|
</div> |
||||
|
<span class="adorn">|</span> |
||||
|
<span class="right">{{ pageName }}</span> |
||||
|
</div> |
||||
|
<el-card class="box-card !border-none" shadow="never"> |
||||
|
<el-form :model="formData" label-width="90px" ref="formRef" :rules="formRules" class="page-form"> |
||||
|
<el-form-item :label="t('studentsId')" prop="students_id"> |
||||
|
<el-select class="input-width" v-model="formData.students_id" clearable :placeholder="t('studentsIdPlaceholder')"> |
||||
|
<el-option label="请选择" value=""></el-option> |
||||
|
<el-option |
||||
|
v-for="(item, index) in studentsIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('registrationDate')" prop="registration_date" class="input-width"> |
||||
|
<el-date-picker |
||||
|
class="flex-1 !flex" |
||||
|
v-model="formData.registration_date" |
||||
|
clearable |
||||
|
type="datetime" |
||||
|
value-format="YYYY-MM-DD HH:mm:ss" |
||||
|
:placeholder="t('registrationDatePlaceholder')"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="t('studentNumber')" prop="student_number"> |
||||
|
<el-input v-model="formData.student_number" clearable :placeholder="t('studentNumberPlaceholder')" class="input-width" /> |
||||
|
</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> |
||||
|
|
||||
|
<el-form-item :label="t('price')" prop="price"> |
||||
|
<el-input v-model="formData.price" clearable :placeholder="t('pricePlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('staffId')" prop="staff_id"> |
||||
|
<el-select class="input-width" v-model="formData.staff_id" clearable :placeholder="t('staffIdPlaceholder')"> |
||||
|
<el-option label="请选择" value=""></el-option> |
||||
|
<el-option |
||||
|
v-for="(item, index) in staffIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('courseValidity')" prop="course_validity"> |
||||
|
<el-input v-model="formData.course_validity" clearable :placeholder="t('courseValidityPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('renewalClass')" prop="renewal_class"> |
||||
|
<el-input v-model="formData.renewal_class" clearable :placeholder="t('renewalClassPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('coursesId')" prop="courses_id"> |
||||
|
<el-select class="input-width" v-model="formData.courses_id" clearable :placeholder="t('coursesIdPlaceholder')"> |
||||
|
<el-option label="请选择" value=""></el-option> |
||||
|
<el-option |
||||
|
v-for="(item, index) in coursesIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('birthDate')" prop="birth_date"> |
||||
|
<el-input v-model="formData.birth_date" clearable :placeholder="t('birthDatePlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('classesId')" prop="classes_id"> |
||||
|
<el-select class="input-width" v-model="formData.classes_id" clearable :placeholder="t('classesIdPlaceholder')"> |
||||
|
<el-option label="请选择" value=""></el-option> |
||||
|
<el-option |
||||
|
v-for="(item, index) in classesIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('sex')" prop="sex"> |
||||
|
<el-input v-model="formData.sex" clearable :placeholder="t('sexPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('decisionMaker')" prop="decision_maker"> |
||||
|
<el-input v-model="formData.decision_maker" clearable :placeholder="t('decisionMakerPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('phone')" prop="phone"> |
||||
|
<el-input v-model="formData.phone" clearable :placeholder="t('phonePlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('requirement')" prop="requirement"> |
||||
|
<el-input v-model="formData.requirement" clearable :placeholder="t('requirementPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('timeDistance')" prop="time_distance"> |
||||
|
<el-input v-model="formData.time_distance" clearable :placeholder="t('timeDistancePlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('purchasingPower')" prop="purchasing_power"> |
||||
|
<el-input v-model="formData.purchasing_power" clearable :placeholder="t('purchasingPowerPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('attendanceRate')" prop="attendance_rate"> |
||||
|
<el-input v-model="formData.attendance_rate" clearable :placeholder="t('attendanceRatePlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('emotionalViscosity')" prop="emotional_viscosity"> |
||||
|
<el-input v-model="formData.emotional_viscosity" clearable :placeholder="t('emotionalViscosityPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('ideaCommunication')" prop="idea_communication"> |
||||
|
<el-input v-model="formData.idea_communication" clearable :placeholder="t('ideaCommunicationPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('effectRecognition')" prop="effect_recognition"> |
||||
|
<el-input v-model="formData.effect_recognition" clearable :placeholder="t('effectRecognitionPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('childrenLike')" prop="children_like"> |
||||
|
<el-input v-model="formData.children_like" clearable :placeholder="t('childrenLikePlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('referral')" prop="referral"> |
||||
|
<el-input v-model="formData.referral" clearable :placeholder="t('referralPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('missedLessons')" prop="missed_lessons"> |
||||
|
<el-input v-model="formData.missed_lessons" clearable :placeholder="t('missedLessonsPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('classHour')" prop="class_hour"> |
||||
|
<el-input v-model="formData.class_hour" clearable :placeholder="t('classHourPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('beCovered')" prop="be_covered"> |
||||
|
<el-input v-model="formData.be_covered" clearable :placeholder="t('beCoveredPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('renewalPeriod')" prop="renewal_period"> |
||||
|
<el-input v-model="formData.renewal_period" clearable :placeholder="t('renewalPeriodPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
</el-form> |
||||
|
</el-card> |
||||
|
<div class="fixed-footer-wrap"> |
||||
|
<div class="fixed-footer"> |
||||
|
<el-button type="primary" @click="onSave(formRef)">{{ t('save') }}</el-button> |
||||
|
<el-button @click="back()">{{ t('cancel') }}</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { ref, reactive, computed, watch } from 'vue' |
||||
|
import { t } from '@/lang' |
||||
|
import { useDictionary } from '@/app/api/dict' |
||||
|
import type { FormInstance } from 'element-plus' |
||||
|
import { getZhjwRollInfo,addZhjwRoll,editZhjwRoll, getWithStudentsList, getWithStaffList, getWithCoursesList, getWithClassesList } from '@/addon/zhjw/api/zhjw_roll'; |
||||
|
import { useRoute } from 'vue-router' |
||||
|
|
||||
|
const route = useRoute() |
||||
|
const id:number = parseInt(route.query.id); |
||||
|
const loading = ref(false) |
||||
|
const pageName = route.meta.title |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 表单数据 |
||||
|
*/ |
||||
|
const initialFormData = { |
||||
|
id: 0, |
||||
|
students_id: '', |
||||
|
registration_date: '', |
||||
|
student_number: '', |
||||
|
name: '', |
||||
|
price: '', |
||||
|
staff_id: '', |
||||
|
course_validity: '', |
||||
|
renewal_class: '', |
||||
|
courses_id: '', |
||||
|
birth_date: '', |
||||
|
classes_id: '', |
||||
|
sex: '', |
||||
|
decision_maker: '', |
||||
|
phone: '', |
||||
|
requirement: '', |
||||
|
time_distance: '', |
||||
|
purchasing_power: '', |
||||
|
attendance_rate: '', |
||||
|
emotional_viscosity: '', |
||||
|
idea_communication: '', |
||||
|
effect_recognition: '', |
||||
|
children_like: '', |
||||
|
referral: '', |
||||
|
missed_lessons: '', |
||||
|
class_hour: '', |
||||
|
be_covered: '', |
||||
|
renewal_period: '', |
||||
|
} |
||||
|
const formData: Record<string, any> = reactive({ ...initialFormData }) |
||||
|
|
||||
|
const setFormData = async (id:number = 0) => { |
||||
|
Object.assign(formData, initialFormData) |
||||
|
const data = await (await getZhjwRollInfo(id)).data |
||||
|
Object.keys(formData).forEach((key: string) => { |
||||
|
if (data[key] != undefined) formData[key] = data[key] |
||||
|
}) |
||||
|
} |
||||
|
if(id) setFormData(id); |
||||
|
|
||||
|
const formRef = ref<FormInstance>() |
||||
|
// 选中数据 |
||||
|
const selectData = ref<any[]>([]) |
||||
|
|
||||
|
// 字典数据 |
||||
|
|
||||
|
|
||||
|
|
||||
|
const studentsIdList = ref([] as any[]) |
||||
|
const setStudentsIdList = async () => { |
||||
|
studentsIdList.value = await (await getWithStudentsList({})).data |
||||
|
} |
||||
|
setStudentsIdList() |
||||
|
const staffIdList = ref([] as any[]) |
||||
|
const setStaffIdList = async () => { |
||||
|
staffIdList.value = await (await getWithStaffList({})).data |
||||
|
} |
||||
|
setStaffIdList() |
||||
|
const coursesIdList = ref([] as any[]) |
||||
|
const setCoursesIdList = async () => { |
||||
|
coursesIdList.value = await (await getWithCoursesList({})).data |
||||
|
} |
||||
|
setCoursesIdList() |
||||
|
const classesIdList = ref([] as any[]) |
||||
|
const setClassesIdList = async () => { |
||||
|
classesIdList.value = await (await getWithClassesList({})).data |
||||
|
} |
||||
|
setClassesIdList() |
||||
|
// 表单验证规则 |
||||
|
const formRules = computed(() => { |
||||
|
return { |
||||
|
students_id: [ |
||||
|
{ required: true, message: t('studentsIdPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
registration_date: [ |
||||
|
{ required: true, message: t('registrationDatePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
student_number: [ |
||||
|
{ required: true, message: t('studentNumberPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
name: [ |
||||
|
{ required: true, message: t('namePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
price: [ |
||||
|
{ required: true, message: t('pricePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
staff_id: [ |
||||
|
{ required: true, message: t('staffIdPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
course_validity: [ |
||||
|
{ required: true, message: t('courseValidityPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
renewal_class: [ |
||||
|
{ required: true, message: t('renewalClassPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
courses_id: [ |
||||
|
{ required: true, message: t('coursesIdPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
birth_date: [ |
||||
|
{ required: true, message: t('birthDatePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
classes_id: [ |
||||
|
{ required: true, message: t('classesIdPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
sex: [ |
||||
|
{ required: true, message: t('sexPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
decision_maker: [ |
||||
|
{ required: true, message: t('decisionMakerPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
phone: [ |
||||
|
{ required: true, message: t('phonePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
requirement: [ |
||||
|
{ required: true, message: t('requirementPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
time_distance: [ |
||||
|
{ required: true, message: t('timeDistancePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
purchasing_power: [ |
||||
|
{ required: true, message: t('purchasingPowerPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
attendance_rate: [ |
||||
|
{ required: true, message: t('attendanceRatePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
emotional_viscosity: [ |
||||
|
{ required: true, message: t('emotionalViscosityPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
idea_communication: [ |
||||
|
{ required: true, message: t('ideaCommunicationPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
effect_recognition: [ |
||||
|
{ required: true, message: t('effectRecognitionPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
children_like: [ |
||||
|
{ required: true, message: t('childrenLikePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
referral: [ |
||||
|
{ required: true, message: t('referralPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
missed_lessons: [ |
||||
|
{ required: true, message: t('missedLessonsPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
class_hour: [ |
||||
|
{ required: true, message: t('classHourPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
be_covered: [ |
||||
|
{ required: true, message: t('beCoveredPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
renewal_period: [ |
||||
|
{ required: true, message: t('renewalPeriodPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const onSave = async (formEl: FormInstance | undefined) => { |
||||
|
if (loading.value || !formEl) return |
||||
|
await formEl.validate(async (valid) => { |
||||
|
if (valid) { |
||||
|
loading.value = true |
||||
|
let data = formData |
||||
|
|
||||
|
const save = id ? editZhjwRoll : addZhjwRoll |
||||
|
save(data).then(res => { |
||||
|
loading.value = false |
||||
|
history.back() |
||||
|
}).catch(err => { |
||||
|
loading.value = false |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 验证手机号格式 |
||||
|
const mobileVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/^1[3-9]\d{9}$/.test(value)) { |
||||
|
callback(new Error(t('generateMobile'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 验证身份证号 |
||||
|
const idCardVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value)) { |
||||
|
callback(new Error(t('generateIdCard'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 验证邮箱号 |
||||
|
const emailVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(value)) { |
||||
|
callback(new Error(t('generateEmail'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
// 验证请输入整数 |
||||
|
const numberVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (!Number.isInteger(value)) { |
||||
|
callback(new Error(t('generateNumber'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
const back = () => { |
||||
|
history.back() |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped></style> |
||||
@ -0,0 +1,193 @@ |
|||||
|
<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('addZhjwStudentsSurvey') }} |
||||
|
</el-button> |
||||
|
</div> |
||||
|
|
||||
|
<el-card class="box-card !border-none my-[10px] table-search-wrap" shadow="never"> |
||||
|
<el-form :inline="true" :model="zhjwStudentsSurveyTable.searchParam" ref="searchFormRef"> |
||||
|
|
||||
|
<el-form-item :label="t('studentsId')" prop="students_id"> |
||||
|
<el-select class="w-[280px]" v-model="zhjwStudentsSurveyTable.searchParam.students_id" clearable :placeholder="t('studentsIdPlaceholder')"> |
||||
|
<el-option |
||||
|
v-for="(item, index) in studentsIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('age')" prop="age"> |
||||
|
<el-input v-model="zhjwStudentsSurveyTable.searchParam.age" :placeholder="t('agePlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="t('height')" prop="height"> |
||||
|
<el-input v-model="zhjwStudentsSurveyTable.searchParam.height" :placeholder="t('heightPlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="t('weight')" prop="weight"> |
||||
|
<el-input v-model="zhjwStudentsSurveyTable.searchParam.weight" :placeholder="t('weightPlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" @click="loadZhjwStudentsSurveyList()">{{ t('search') }}</el-button> |
||||
|
<el-button @click="resetForm(searchFormRef)">{{ t('reset') }}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-card> |
||||
|
|
||||
|
<div class="mt-[10px]"> |
||||
|
<el-table :data="zhjwStudentsSurveyTable.data" size="large" v-loading="zhjwStudentsSurveyTable.loading"> |
||||
|
<template #empty> |
||||
|
<span>{{ !zhjwStudentsSurveyTable.loading ? t('emptyData') : '' }}</span> |
||||
|
</template> |
||||
|
<el-table-column prop="students_id_name" :label="t('studentsId')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="age" :label="t('age')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="height" :label="t('height')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="weight" :label="t('weight')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="content" :label="t('content')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="create_time" :label="t('createTime')" 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)">{{ t('edit') }}</el-button> |
||||
|
<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="zhjwStudentsSurveyTable.page" v-model:page-size="zhjwStudentsSurveyTable.limit" |
||||
|
layout="total, sizes, prev, pager, next, jumper" :total="zhjwStudentsSurveyTable.total" |
||||
|
@size-change="loadZhjwStudentsSurveyList()" @current-change="loadZhjwStudentsSurveyList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</el-card> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, watch } from 'vue' |
||||
|
import { t } from '@/lang' |
||||
|
import { useDictionary } from '@/app/api/dict' |
||||
|
import { getZhjwStudentsSurveyList, deleteZhjwStudentsSurvey, getWithStudentsList } from '@/addon/zhjw/api/zhjw_students_survey' |
||||
|
import { img } from '@/utils/common' |
||||
|
import { ElMessageBox,FormInstance } from 'element-plus' |
||||
|
import { useRouter } from 'vue-router' |
||||
|
import { useRoute } from 'vue-router' |
||||
|
const route = useRoute() |
||||
|
const pageName = route.meta.title; |
||||
|
|
||||
|
let zhjwStudentsSurveyTable = reactive({ |
||||
|
page: 1, |
||||
|
limit: 10, |
||||
|
total: 0, |
||||
|
loading: true, |
||||
|
data: [], |
||||
|
searchParam:{ |
||||
|
"students_id":"", |
||||
|
"age":"", |
||||
|
"height":"", |
||||
|
"weight":"" |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const searchFormRef = ref<FormInstance>() |
||||
|
|
||||
|
// 选中数据 |
||||
|
const selectData = ref<any[]>([]) |
||||
|
|
||||
|
// 字典数据 |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取学员体测列表 |
||||
|
*/ |
||||
|
const loadZhjwStudentsSurveyList = (page: number = 1) => { |
||||
|
zhjwStudentsSurveyTable.loading = true |
||||
|
zhjwStudentsSurveyTable.page = page |
||||
|
|
||||
|
getZhjwStudentsSurveyList({ |
||||
|
page: zhjwStudentsSurveyTable.page, |
||||
|
limit: zhjwStudentsSurveyTable.limit, |
||||
|
...zhjwStudentsSurveyTable.searchParam |
||||
|
}).then(res => { |
||||
|
zhjwStudentsSurveyTable.loading = false |
||||
|
zhjwStudentsSurveyTable.data = res.data.data |
||||
|
zhjwStudentsSurveyTable.total = res.data.total |
||||
|
}).catch(() => { |
||||
|
zhjwStudentsSurveyTable.loading = false |
||||
|
}) |
||||
|
} |
||||
|
loadZhjwStudentsSurveyList() |
||||
|
|
||||
|
const router = useRouter() |
||||
|
|
||||
|
/** |
||||
|
* 添加学员体测 |
||||
|
*/ |
||||
|
const addEvent = () => { |
||||
|
router.push('/zhjw_students_survey/zhjw_students_survey_edit') |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑学员体测 |
||||
|
* @param data |
||||
|
*/ |
||||
|
const editEvent = (data: any) => { |
||||
|
router.push('/zhjw_students_survey/zhjw_students_survey_edit?id='+data.id) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除学员体测 |
||||
|
*/ |
||||
|
const deleteEvent = (id: number) => { |
||||
|
ElMessageBox.confirm(t('zhjwStudentsSurveyDeleteTips'), t('warning'), |
||||
|
{ |
||||
|
confirmButtonText: t('confirm'), |
||||
|
cancelButtonText: t('cancel'), |
||||
|
type: 'warning', |
||||
|
} |
||||
|
).then(() => { |
||||
|
deleteZhjwStudentsSurvey(id).then(() => { |
||||
|
loadZhjwStudentsSurveyList() |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
const studentsIdList = ref([]) |
||||
|
const setStudentsIdList = async () => { |
||||
|
studentsIdList.value = await (await getWithStudentsList({})).data |
||||
|
} |
||||
|
setStudentsIdList() |
||||
|
|
||||
|
const resetForm = (formEl: FormInstance | undefined) => { |
||||
|
if (!formEl) return |
||||
|
formEl.resetFields() |
||||
|
loadZhjwStudentsSurveyList() |
||||
|
} |
||||
|
</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> |
||||
@ -0,0 +1,192 @@ |
|||||
|
<template> |
||||
|
<div class="main-container"> |
||||
|
<div class="detail-head"> |
||||
|
<div class="left" @click="back()"> |
||||
|
<span class="iconfont iconxiangzuojiantou !text-xs"></span> |
||||
|
<span class="ml-[1px]">{{t('returnToPreviousPage')}}</span> |
||||
|
</div> |
||||
|
<span class="adorn">|</span> |
||||
|
<span class="right">{{ pageName }}</span> |
||||
|
</div> |
||||
|
<el-card class="box-card !border-none" shadow="never"> |
||||
|
<el-form :model="formData" label-width="90px" ref="formRef" :rules="formRules" class="page-form"> |
||||
|
<el-form-item :label="t('studentsId')" prop="students_id"> |
||||
|
<el-select class="input-width" v-model="formData.students_id" clearable :placeholder="t('studentsIdPlaceholder')"> |
||||
|
<el-option label="请选择" value=""></el-option> |
||||
|
<el-option |
||||
|
v-for="(item, index) in studentsIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('age')" prop="age"> |
||||
|
<el-input v-model="formData.age" clearable :placeholder="t('agePlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('height')" prop="height"> |
||||
|
<el-input v-model="formData.height" clearable :placeholder="t('heightPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('weight')" prop="weight"> |
||||
|
<el-input v-model="formData.weight" clearable :placeholder="t('weightPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('content')" prop="content"> |
||||
|
<editor v-model="formData.content" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-card> |
||||
|
<div class="fixed-footer-wrap"> |
||||
|
<div class="fixed-footer"> |
||||
|
<el-button type="primary" @click="onSave(formRef)">{{ t('save') }}</el-button> |
||||
|
<el-button @click="back()">{{ t('cancel') }}</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { ref, reactive, computed, watch } from 'vue' |
||||
|
import { t } from '@/lang' |
||||
|
import { useDictionary } from '@/app/api/dict' |
||||
|
import type { FormInstance } from 'element-plus' |
||||
|
import { getZhjwStudentsSurveyInfo,addZhjwStudentsSurvey,editZhjwStudentsSurvey, getWithStudentsList } from '@/addon/zhjw/api/zhjw_students_survey'; |
||||
|
import { useRoute } from 'vue-router' |
||||
|
|
||||
|
const route = useRoute() |
||||
|
const id:number = parseInt(route.query.id); |
||||
|
const loading = ref(false) |
||||
|
const pageName = route.meta.title |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 表单数据 |
||||
|
*/ |
||||
|
const initialFormData = { |
||||
|
id: 0, |
||||
|
students_id: '', |
||||
|
age: 0, |
||||
|
height: '', |
||||
|
weight: '', |
||||
|
content: '', |
||||
|
} |
||||
|
const formData: Record<string, any> = reactive({ ...initialFormData }) |
||||
|
|
||||
|
const setFormData = async (id:number = 0) => { |
||||
|
Object.assign(formData, initialFormData) |
||||
|
const data = await (await getZhjwStudentsSurveyInfo(id)).data |
||||
|
Object.keys(formData).forEach((key: string) => { |
||||
|
if (data[key] != undefined) formData[key] = data[key] |
||||
|
}) |
||||
|
} |
||||
|
if(id) setFormData(id); |
||||
|
|
||||
|
const formRef = ref<FormInstance>() |
||||
|
// 选中数据 |
||||
|
const selectData = ref<any[]>([]) |
||||
|
|
||||
|
// 字典数据 |
||||
|
|
||||
|
|
||||
|
|
||||
|
const studentsIdList = ref([] as any[]) |
||||
|
const setStudentsIdList = async () => { |
||||
|
studentsIdList.value = await (await getWithStudentsList({})).data |
||||
|
} |
||||
|
setStudentsIdList() |
||||
|
// 表单验证规则 |
||||
|
const formRules = computed(() => { |
||||
|
return { |
||||
|
students_id: [ |
||||
|
{ required: true, message: t('studentsIdPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
age: [ |
||||
|
{ required: true, message: t('agePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
height: [ |
||||
|
{ required: true, message: t('heightPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
weight: [ |
||||
|
{ required: true, message: t('weightPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
content: [ |
||||
|
{ required: true, message: t('contentPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const onSave = async (formEl: FormInstance | undefined) => { |
||||
|
if (loading.value || !formEl) return |
||||
|
await formEl.validate(async (valid) => { |
||||
|
if (valid) { |
||||
|
loading.value = true |
||||
|
let data = formData |
||||
|
|
||||
|
const save = id ? editZhjwStudentsSurvey : addZhjwStudentsSurvey |
||||
|
save(data).then(res => { |
||||
|
loading.value = false |
||||
|
history.back() |
||||
|
}).catch(err => { |
||||
|
loading.value = false |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 验证手机号格式 |
||||
|
const mobileVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/^1[3-9]\d{9}$/.test(value)) { |
||||
|
callback(new Error(t('generateMobile'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 验证身份证号 |
||||
|
const idCardVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value)) { |
||||
|
callback(new Error(t('generateIdCard'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 验证邮箱号 |
||||
|
const emailVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(value)) { |
||||
|
callback(new Error(t('generateEmail'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
// 验证请输入整数 |
||||
|
const numberVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (!Number.isInteger(value)) { |
||||
|
callback(new Error(t('generateNumber'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
const back = () => { |
||||
|
history.back() |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped></style> |
||||
@ -0,0 +1,54 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// USER_CODE_BEGIN -- zhjw_students_survey
|
||||
|
/** |
||||
|
* 获取学员体测列表 |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function getZhjwStudentsSurveyList(params: Record<string, any>) { |
||||
|
return request.get(`zhjw_students_survey/zhjw_students_survey`, {params}) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取学员体测详情 |
||||
|
* @param id 学员体测id |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function getZhjwStudentsSurveyInfo(id: number) { |
||||
|
return request.get(`zhjw_students_survey/zhjw_students_survey/${id}`); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加学员体测 |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function addZhjwStudentsSurvey(params: Record<string, any>) { |
||||
|
return request.post('zhjw_students_survey/zhjw_students_survey', params, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑学员体测 |
||||
|
* @param id |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function editZhjwStudentsSurvey(params: Record<string, any>) { |
||||
|
return request.put(`zhjw_students_survey/zhjw_students_survey/${params.id}`, params, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除学员体测 |
||||
|
* @param id |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function deleteZhjwStudentsSurvey(id: number) { |
||||
|
return request.delete(`zhjw_students_survey/zhjw_students_survey/${id}`, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
export function getWithStudentsList(params: Record<string,any>){ |
||||
|
return request.get('zhjw_students_survey/students_all', {params}) |
||||
|
} |
||||
|
|
||||
|
// USER_CODE_END -- zhjw_students_survey
|
||||
@ -0,0 +1,18 @@ |
|||||
|
{ |
||||
|
"studentsId":"学员", |
||||
|
"studentsIdPlaceholder":"全部", |
||||
|
"height":"身高", |
||||
|
"heightPlaceholder":"请输入身高", |
||||
|
"weight":"体重", |
||||
|
"weightPlaceholder":"请输入体重", |
||||
|
"content":"寄语", |
||||
|
"contentPlaceholder":"请输入寄语", |
||||
|
"createTime":"添加时间", |
||||
|
"updateTime":"更新时间", |
||||
|
"updateTimePlaceholder":"请输入更新时间", |
||||
|
"addZhjwStudentsSurvey":"添加学员体测", |
||||
|
"updateZhjwStudentsSurvey":"编辑学员体测", |
||||
|
"zhjwStudentsSurveyDeleteTips":"确定要删除该数据吗?", |
||||
|
"startDate":"请选择开始时间", |
||||
|
"endDate":"请选择结束时间" |
||||
|
} |
||||
@ -0,0 +1,186 @@ |
|||||
|
<template> |
||||
|
<el-dialog v-model="showDialog" :title="formData.id ? t('updateZhjwStudentsSurvey') : t('addZhjwStudentsSurvey')" 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('studentsId')" prop="students_id"> |
||||
|
<el-select class="input-width" v-model="formData.students_id" clearable :placeholder="t('studentsIdPlaceholder')"> |
||||
|
<el-option label="请选择" value=""></el-option> |
||||
|
<el-option |
||||
|
v-for="(item, index) in studentsIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('height')" prop="height"> |
||||
|
<el-input v-model="formData.height" clearable :placeholder="t('heightPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('weight')" prop="weight"> |
||||
|
<el-input v-model="formData.weight" clearable :placeholder="t('weightPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('content')" prop="content"> |
||||
|
<el-input v-model="formData.content" clearable :placeholder="t('contentPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
</el-form> |
||||
|
|
||||
|
<template #footer> |
||||
|
<span class="dialog-footer"> |
||||
|
<el-button @click="showDialog = false">{{ t('cancel') }}</el-button> |
||||
|
<el-button type="primary" :loading="loading" @click="confirm(formRef)">{{ |
||||
|
t('confirm') |
||||
|
}}</el-button> |
||||
|
</span> |
||||
|
</template> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { ref, reactive, computed, watch } from 'vue' |
||||
|
import { useDictionary } from '@/app/api/dict' |
||||
|
import { t } from '@/lang' |
||||
|
import type { FormInstance } from 'element-plus' |
||||
|
import { addZhjwStudentsSurvey, editZhjwStudentsSurvey, getZhjwStudentsSurveyInfo, getWithStudentsList } from '@/app/api/zhjw_students_survey' |
||||
|
|
||||
|
let showDialog = ref(false) |
||||
|
const loading = ref(false) |
||||
|
|
||||
|
/** |
||||
|
* 表单数据 |
||||
|
*/ |
||||
|
const initialFormData = { |
||||
|
id: '', |
||||
|
students_id: '', |
||||
|
height: '', |
||||
|
weight: '', |
||||
|
content: '', |
||||
|
} |
||||
|
const formData: Record<string, any> = reactive({ ...initialFormData }) |
||||
|
|
||||
|
const formRef = ref<FormInstance>() |
||||
|
|
||||
|
// 表单验证规则 |
||||
|
const formRules = computed(() => { |
||||
|
return { |
||||
|
students_id: [ |
||||
|
{ required: true, message: t('studentsIdPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
height: [ |
||||
|
{ required: true, message: t('heightPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
weight: [ |
||||
|
{ required: true, message: t('weightPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
content: [ |
||||
|
{ required: true, message: t('contentPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const emit = defineEmits(['complete']) |
||||
|
|
||||
|
/** |
||||
|
* 确认 |
||||
|
* @param formEl |
||||
|
*/ |
||||
|
const confirm = async (formEl: FormInstance | undefined) => { |
||||
|
if (loading.value || !formEl) return |
||||
|
let save = formData.id ? editZhjwStudentsSurvey : addZhjwStudentsSurvey |
||||
|
|
||||
|
await formEl.validate(async (valid) => { |
||||
|
if (valid) { |
||||
|
loading.value = true |
||||
|
|
||||
|
let data = formData |
||||
|
|
||||
|
save(data).then(res => { |
||||
|
loading.value = false |
||||
|
showDialog.value = false |
||||
|
emit('complete') |
||||
|
}).catch(err => { |
||||
|
loading.value = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 获取字典数据 |
||||
|
|
||||
|
|
||||
|
|
||||
|
const studentsIdList = ref([] as any[]) |
||||
|
const setStudentsIdList = async () => { |
||||
|
studentsIdList.value = await (await getWithStudentsList({})).data |
||||
|
} |
||||
|
setStudentsIdList() |
||||
|
const setFormData = async (row: any = null) => { |
||||
|
Object.assign(formData, initialFormData) |
||||
|
loading.value = true |
||||
|
if(row){ |
||||
|
const data = await (await getZhjwStudentsSurveyInfo(row.id)).data |
||||
|
if (data) Object.keys(formData).forEach((key: string) => { |
||||
|
if (data[key] != undefined) formData[key] = data[key] |
||||
|
}) |
||||
|
} |
||||
|
loading.value = false |
||||
|
} |
||||
|
|
||||
|
// 验证手机号格式 |
||||
|
const mobileVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/^1[3-9]\d{9}$/.test(value)) { |
||||
|
callback(new Error(t('generateMobile'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 验证身份证号 |
||||
|
const idCardVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value)) { |
||||
|
callback(new Error(t('generateIdCard'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 验证邮箱号 |
||||
|
const emailVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(value)) { |
||||
|
callback(new Error(t('generateEmail'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 验证请输入整数 |
||||
|
const numberVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (!Number.isInteger(value)) { |
||||
|
callback(new Error(t('generateNumber'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
defineExpose({ |
||||
|
showDialog, |
||||
|
setFormData |
||||
|
}) |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped></style> |
||||
|
<style lang="scss"> |
||||
|
.diy-dialog-wrap .el-form-item__label{ |
||||
|
height: auto !important; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,191 @@ |
|||||
|
<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('addZhjwStudentsSurvey') }} |
||||
|
</el-button> |
||||
|
</div> |
||||
|
|
||||
|
<el-card class="box-card !border-none my-[10px] table-search-wrap" shadow="never"> |
||||
|
<el-form :inline="true" :model="zhjwStudentsSurveyTable.searchParam" ref="searchFormRef"> |
||||
|
|
||||
|
<el-form-item :label="t('studentsId')" prop="students_id"> |
||||
|
<el-select class="w-[280px]" v-model="zhjwStudentsSurveyTable.searchParam.students_id" clearable :placeholder="t('studentsIdPlaceholder')"> |
||||
|
<el-option |
||||
|
v-for="(item, index) in studentsIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('height')" prop="height"> |
||||
|
<el-input v-model="zhjwStudentsSurveyTable.searchParam.height" :placeholder="t('heightPlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="t('weight')" prop="weight"> |
||||
|
<el-input v-model="zhjwStudentsSurveyTable.searchParam.weight" :placeholder="t('weightPlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="t('updateTime')" prop="update_time"> |
||||
|
<el-input v-model="zhjwStudentsSurveyTable.searchParam.update_time" :placeholder="t('updateTimePlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" @click="loadZhjwStudentsSurveyList()">{{ t('search') }}</el-button> |
||||
|
<el-button @click="resetForm(searchFormRef)">{{ t('reset') }}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-card> |
||||
|
|
||||
|
<div class="mt-[10px]"> |
||||
|
<el-table :data="zhjwStudentsSurveyTable.data" size="large" v-loading="zhjwStudentsSurveyTable.loading"> |
||||
|
<template #empty> |
||||
|
<span>{{ !zhjwStudentsSurveyTable.loading ? t('emptyData') : '' }}</span> |
||||
|
</template> |
||||
|
<el-table-column prop="students_id_name" :label="t('studentsId')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="height" :label="t('height')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="weight" :label="t('weight')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="create_time" :label="t('createTime')" 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)">{{ t('edit') }}</el-button> |
||||
|
<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="zhjwStudentsSurveyTable.page" v-model:page-size="zhjwStudentsSurveyTable.limit" |
||||
|
layout="total, sizes, prev, pager, next, jumper" :total="zhjwStudentsSurveyTable.total" |
||||
|
@size-change="loadZhjwStudentsSurveyList()" @current-change="loadZhjwStudentsSurveyList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<edit ref="editZhjwStudentsSurveyDialog" @complete="loadZhjwStudentsSurveyList" /> |
||||
|
</el-card> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, watch } from 'vue' |
||||
|
import { t } from '@/lang' |
||||
|
import { useDictionary } from '@/app/api/dict' |
||||
|
import { getZhjwStudentsSurveyList, deleteZhjwStudentsSurvey, getWithStudentsList } from '@/app/api/zhjw_students_survey' |
||||
|
import { img } from '@/utils/common' |
||||
|
import { ElMessageBox,FormInstance } from 'element-plus' |
||||
|
import Edit from '@/app/views/zhjw_students_survey/components/zhjw-students-survey-edit.vue' |
||||
|
import { useRoute } from 'vue-router' |
||||
|
const route = useRoute() |
||||
|
const pageName = route.meta.title; |
||||
|
|
||||
|
let zhjwStudentsSurveyTable = reactive({ |
||||
|
page: 1, |
||||
|
limit: 10, |
||||
|
total: 0, |
||||
|
loading: true, |
||||
|
data: [], |
||||
|
searchParam:{ |
||||
|
"students_id":"", |
||||
|
"height":"", |
||||
|
"weight":"", |
||||
|
"update_time":"" |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const searchFormRef = ref<FormInstance>() |
||||
|
|
||||
|
// 选中数据 |
||||
|
const selectData = ref<any[]>([]) |
||||
|
|
||||
|
// 字典数据 |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取学员体测列表 |
||||
|
*/ |
||||
|
const loadZhjwStudentsSurveyList = (page: number = 1) => { |
||||
|
zhjwStudentsSurveyTable.loading = true |
||||
|
zhjwStudentsSurveyTable.page = page |
||||
|
|
||||
|
getZhjwStudentsSurveyList({ |
||||
|
page: zhjwStudentsSurveyTable.page, |
||||
|
limit: zhjwStudentsSurveyTable.limit, |
||||
|
...zhjwStudentsSurveyTable.searchParam |
||||
|
}).then(res => { |
||||
|
zhjwStudentsSurveyTable.loading = false |
||||
|
zhjwStudentsSurveyTable.data = res.data.data |
||||
|
zhjwStudentsSurveyTable.total = res.data.total |
||||
|
}).catch(() => { |
||||
|
zhjwStudentsSurveyTable.loading = false |
||||
|
}) |
||||
|
} |
||||
|
loadZhjwStudentsSurveyList() |
||||
|
|
||||
|
const editZhjwStudentsSurveyDialog: Record<string, any> | null = ref(null) |
||||
|
|
||||
|
/** |
||||
|
* 添加学员体测 |
||||
|
*/ |
||||
|
const addEvent = () => { |
||||
|
editZhjwStudentsSurveyDialog.value.setFormData() |
||||
|
editZhjwStudentsSurveyDialog.value.showDialog = true |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑学员体测 |
||||
|
* @param data |
||||
|
*/ |
||||
|
const editEvent = (data: any) => { |
||||
|
editZhjwStudentsSurveyDialog.value.setFormData(data) |
||||
|
editZhjwStudentsSurveyDialog.value.showDialog = true |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除学员体测 |
||||
|
*/ |
||||
|
const deleteEvent = (id: number) => { |
||||
|
ElMessageBox.confirm(t('zhjwStudentsSurveyDeleteTips'), t('warning'), |
||||
|
{ |
||||
|
confirmButtonText: t('confirm'), |
||||
|
cancelButtonText: t('cancel'), |
||||
|
type: 'warning', |
||||
|
} |
||||
|
).then(() => { |
||||
|
deleteZhjwStudentsSurvey(id).then(() => { |
||||
|
loadZhjwStudentsSurveyList() |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
const studentsIdList = ref([]) |
||||
|
const setStudentsIdList = async () => { |
||||
|
studentsIdList.value = await (await getWithStudentsList({})).data |
||||
|
} |
||||
|
setStudentsIdList() |
||||
|
|
||||
|
const resetForm = (formEl: FormInstance | undefined) => { |
||||
|
if (!formEl) return |
||||
|
formEl.resetFields() |
||||
|
loadZhjwStudentsSurveyList() |
||||
|
} |
||||
|
</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> |
||||
@ -0,0 +1,60 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// USER_CODE_BEGIN -- zhjw_roll
|
||||
|
/** |
||||
|
* 获取学籍列列表 |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function getZhjwRollList(params: Record<string, any>) { |
||||
|
return request.get(`zhjw/zhjw_roll`, {params}) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取学籍列详情 |
||||
|
* @param id 学籍列id |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function getZhjwRollInfo(id: number) { |
||||
|
return request.get(`zhjw/zhjw_roll/${id}`); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加学籍列 |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function addZhjwRoll(params: Record<string, any>) { |
||||
|
return request.post('zhjw/zhjw_roll', params, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑学籍列 |
||||
|
* @param id |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function editZhjwRoll(params: Record<string, any>) { |
||||
|
return request.put(`zhjw/zhjw_roll/${params.id}`, params, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除学籍列 |
||||
|
* @param id |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function deleteZhjwRoll(id: number) { |
||||
|
return request.delete(`zhjw/zhjw_roll/${id}`, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
export function getWithStudentsList(params: Record<string,any>){ |
||||
|
return request.get('zhjw/students_all', {params}) |
||||
|
}export function getWithStaffList(params: Record<string,any>){ |
||||
|
return request.get('zhjw/staff_all', {params}) |
||||
|
}export function getWithCoursesList(params: Record<string,any>){ |
||||
|
return request.get('zhjw/courses_all', {params}) |
||||
|
}export function getWithClassesList(params: Record<string,any>){ |
||||
|
return request.get('zhjw/classes_all', {params}) |
||||
|
} |
||||
|
|
||||
|
// USER_CODE_END -- zhjw_roll
|
||||
@ -0,0 +1,62 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
// USER_CODE_BEGIN -- zhjw_students_survey
|
||||
|
/** |
||||
|
* 获取学员体测列表 |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function getZhjwStudentsSurveyList(params: Record<string, any>) { |
||||
|
return request.get(`zhjw/zhjw_students_survey`, {params}) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取学员体测详情 |
||||
|
* @param id 学员体测id |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function getZhjwStudentsSurveyInfo(id: number) { |
||||
|
return request.get(`zhjw/zhjw_students_survey/${id}`); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加学员体测 |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function addZhjwStudentsSurvey(params: Record<string, any>) { |
||||
|
return request.post('zhjw/zhjw_students_survey', params, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑学员体测 |
||||
|
* @param id |
||||
|
* @param params |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function editZhjwStudentsSurvey(params: Record<string, any>) { |
||||
|
return request.put(`zhjw/zhjw_students_survey/${params.id}`, params, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除学员体测 |
||||
|
* @param id |
||||
|
* @returns |
||||
|
*/ |
||||
|
export function deleteZhjwStudentsSurvey(id: number) { |
||||
|
return request.delete(`zhjw/zhjw_students_survey/${id}`, { showErrorMessage: true, showSuccessMessage: true }) |
||||
|
} |
||||
|
|
||||
|
export function getWithStudentsList(params: Record<string,any>){ |
||||
|
return request.get('zhjw/students_all', {params}) |
||||
|
} |
||||
|
|
||||
|
// USER_CODE_END -- zhjw_students_survey
|
||||
@ -0,0 +1,26 @@ |
|||||
|
{ |
||||
|
"studentsId":"学员", |
||||
|
"studentsIdPlaceholder":"全部", |
||||
|
"registrationDate":"报名日期", |
||||
|
"registrationDatePlaceholder":"请输入报名日期", |
||||
|
"studentNumber":"学号", |
||||
|
"studentNumberPlaceholder":"请输入学号", |
||||
|
"name":"学员姓名", |
||||
|
"namePlaceholder":"请输入学员姓名", |
||||
|
"price":"金额", |
||||
|
"pricePlaceholder":"请输入金额", |
||||
|
"staffId":"班主任", |
||||
|
"staffIdPlaceholder":"全部", |
||||
|
"courseValidity":"课程有效期", |
||||
|
"courseValidityPlaceholder":"请输入课程有效期", |
||||
|
"renewalClass":"续费等级", |
||||
|
"renewalClassPlaceholder":"请输入续费等级", |
||||
|
"coursesId":"课程", |
||||
|
"coursesIdPlaceholder":"全部", |
||||
|
"phone":"联系电话", |
||||
|
"addZhjwRoll":"添加学籍列", |
||||
|
"updateZhjwRoll":"编辑学籍列", |
||||
|
"zhjwRollDeleteTips":"确定要删除该数据吗?", |
||||
|
"startDate":"请选择开始时间", |
||||
|
"endDate":"请选择结束时间" |
||||
|
} |
||||
@ -0,0 +1,59 @@ |
|||||
|
{ |
||||
|
"studentsId":"学员", |
||||
|
"registrationDate":"报名日期", |
||||
|
"studentNumber":"学号", |
||||
|
"name":"学员姓名", |
||||
|
"price":"金额", |
||||
|
"staffId":"班主任", |
||||
|
"courseValidity":"课程有效期", |
||||
|
"renewalClass":"续费等级", |
||||
|
"coursesId":"课程", |
||||
|
"birthDate":"出生日期", |
||||
|
"classesId":"班级", |
||||
|
"sex":"性别", |
||||
|
"decisionMaker":"决策人", |
||||
|
"phone":"联系电话", |
||||
|
"requirement":"需求", |
||||
|
"timeDistance":"时间距离", |
||||
|
"purchasingPower":"购买力", |
||||
|
"attendanceRate":"出勤率", |
||||
|
"emotionalViscosity":"情感粘度", |
||||
|
"ideaCommunication":"理念沟通", |
||||
|
"effectRecognition":"效果认可", |
||||
|
"childrenLike":"孩子喜欢", |
||||
|
"referral":"转介绍", |
||||
|
"missedLessons":"待补课数", |
||||
|
"classHour":"正式课时", |
||||
|
"beCovered":"续费待补", |
||||
|
"renewalPeriod":"续费课时", |
||||
|
"studentsIdPlaceholder":"请选择学员", |
||||
|
"registrationDatePlaceholder":"请选择报名日期", |
||||
|
"studentNumberPlaceholder":"请输入学号", |
||||
|
"namePlaceholder":"请输入学员姓名", |
||||
|
"pricePlaceholder":"请输入金额", |
||||
|
"staffIdPlaceholder":"请选择班主任", |
||||
|
"courseValidityPlaceholder":"请输入课程有效期", |
||||
|
"renewalClassPlaceholder":"请输入续费等级", |
||||
|
"coursesIdPlaceholder":"请选择课程", |
||||
|
"birthDatePlaceholder":"请输入出生日期", |
||||
|
"classesIdPlaceholder":"请选择班级", |
||||
|
"sexPlaceholder":"请输入性别", |
||||
|
"decisionMakerPlaceholder":"请输入决策人", |
||||
|
"phonePlaceholder":"请输入联系电话", |
||||
|
"requirementPlaceholder":"请输入需求", |
||||
|
"timeDistancePlaceholder":"请输入时间距离", |
||||
|
"purchasingPowerPlaceholder":"请输入购买力", |
||||
|
"attendanceRatePlaceholder":"请输入出勤率", |
||||
|
"emotionalViscosityPlaceholder":"请输入情感粘度", |
||||
|
"ideaCommunicationPlaceholder":"请输入理念沟通", |
||||
|
"effectRecognitionPlaceholder":"请输入效果认可", |
||||
|
"childrenLikePlaceholder":"请输入孩子喜欢", |
||||
|
"referralPlaceholder":"请输入转介绍", |
||||
|
"missedLessonsPlaceholder":"请输入待补课数", |
||||
|
"classHourPlaceholder":"请输入正式课时", |
||||
|
"beCoveredPlaceholder":"请输入续费待补", |
||||
|
"renewalPeriodPlaceholder":"请输入续费课时", |
||||
|
"addZhjwRoll":"添加学籍列", |
||||
|
"updateZhjwRoll":"编辑学籍列", |
||||
|
"zhjwRollDeleteTips":"确定要删除该学籍列吗?" |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
{ |
||||
|
"studentsId":"学员", |
||||
|
"studentsIdPlaceholder":"全部", |
||||
|
"age":"年龄", |
||||
|
"agePlaceholder":"请输入年龄", |
||||
|
"height":"身高", |
||||
|
"heightPlaceholder":"请输入身高", |
||||
|
"weight":"体重", |
||||
|
"weightPlaceholder":"请输入体重", |
||||
|
"content":"寄语", |
||||
|
"createTime":"添加时间", |
||||
|
"addZhjwStudentsSurvey":"添加学员体测", |
||||
|
"updateZhjwStudentsSurvey":"编辑学员体测", |
||||
|
"zhjwStudentsSurveyDeleteTips":"确定要删除该数据吗?", |
||||
|
"startDate":"请选择开始时间", |
||||
|
"endDate":"请选择结束时间" |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
{ |
||||
|
"studentsId":"学员", |
||||
|
"age":"年龄", |
||||
|
"height":"身高", |
||||
|
"weight":"体重", |
||||
|
"content":"寄语", |
||||
|
"studentsIdPlaceholder":"请选择学员", |
||||
|
"agePlaceholder":"请输入年龄", |
||||
|
"heightPlaceholder":"请输入身高", |
||||
|
"weightPlaceholder":"请输入体重", |
||||
|
"contentPlaceholder":"请输入寄语", |
||||
|
"addZhjwStudentsSurvey":"添加学员体测", |
||||
|
"updateZhjwStudentsSurvey":"编辑学员体测", |
||||
|
"zhjwStudentsSurveyDeleteTips":"确定要删除该学员体测吗?" |
||||
|
} |
||||
@ -0,0 +1,256 @@ |
|||||
|
<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('addZhjwRoll') }} |
||||
|
</el-button> |
||||
|
</div> |
||||
|
|
||||
|
<el-card class="box-card !border-none my-[10px] table-search-wrap" shadow="never"> |
||||
|
<el-form :inline="true" :model="zhjwRollTable.searchParam" ref="searchFormRef"> |
||||
|
|
||||
|
<el-form-item :label="t('studentsId')" prop="students_id"> |
||||
|
<el-select class="w-[280px]" v-model="zhjwRollTable.searchParam.students_id" clearable :placeholder="t('studentsIdPlaceholder')"> |
||||
|
<el-option |
||||
|
v-for="(item, index) in studentsIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('registrationDate')" prop="registration_date"> |
||||
|
<el-date-picker v-model="zhjwRollTable.searchParam.registration_date" type="datetimerange" format="YYYY-MM-DD hh:mm:ss" |
||||
|
:start-placeholder="t('startDate')" :end-placeholder="t('endDate')" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('studentNumber')" prop="student_number"> |
||||
|
<el-input v-model="zhjwRollTable.searchParam.student_number" :placeholder="t('studentNumberPlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="t('name')" prop="name"> |
||||
|
<el-input v-model="zhjwRollTable.searchParam.name" :placeholder="t('namePlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="t('price')" prop="price"> |
||||
|
<el-input v-model="zhjwRollTable.searchParam.price" :placeholder="t('pricePlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('staffId')" prop="staff_id"> |
||||
|
<el-select class="w-[280px]" v-model="zhjwRollTable.searchParam.staff_id" clearable :placeholder="t('staffIdPlaceholder')"> |
||||
|
<el-option |
||||
|
v-for="(item, index) in staffIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('courseValidity')" prop="course_validity"> |
||||
|
<el-input v-model="zhjwRollTable.searchParam.course_validity" :placeholder="t('courseValidityPlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="t('renewalClass')" prop="renewal_class"> |
||||
|
<el-input v-model="zhjwRollTable.searchParam.renewal_class" :placeholder="t('renewalClassPlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('coursesId')" prop="courses_id"> |
||||
|
<el-select class="w-[280px]" v-model="zhjwRollTable.searchParam.courses_id" clearable :placeholder="t('coursesIdPlaceholder')"> |
||||
|
<el-option |
||||
|
v-for="(item, index) in coursesIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item> |
||||
|
<el-button type="primary" @click="loadZhjwRollList()">{{ t('search') }}</el-button> |
||||
|
<el-button @click="resetForm(searchFormRef)">{{ t('reset') }}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-card> |
||||
|
|
||||
|
<div class="mt-[10px]"> |
||||
|
<el-table :data="zhjwRollTable.data" size="large" v-loading="zhjwRollTable.loading"> |
||||
|
<template #empty> |
||||
|
<span>{{ !zhjwRollTable.loading ? t('emptyData') : '' }}</span> |
||||
|
</template> |
||||
|
<el-table-column prop="students_id_name" :label="t('studentsId')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="registration_date" :label="t('registrationDate')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="student_number" :label="t('studentNumber')" 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 prop="price" :label="t('price')" 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="course_validity" :label="t('courseValidity')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="renewal_class" :label="t('renewalClass')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="courses_id_name" :label="t('coursesId')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="phone" :label="t('phone')" 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)">{{ t('edit') }}</el-button> |
||||
|
<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="zhjwRollTable.page" v-model:page-size="zhjwRollTable.limit" |
||||
|
layout="total, sizes, prev, pager, next, jumper" :total="zhjwRollTable.total" |
||||
|
@size-change="loadZhjwRollList()" @current-change="loadZhjwRollList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</el-card> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, watch } from 'vue' |
||||
|
import { t } from '@/lang' |
||||
|
import { useDictionary } from '@/app/api/dict' |
||||
|
import { getZhjwRollList, deleteZhjwRoll, getWithStudentsList, getWithStaffList, getWithCoursesList, getWithClassesList } from '@/addon/zhjw/api/zhjw_roll' |
||||
|
import { img } from '@/utils/common' |
||||
|
import { ElMessageBox,FormInstance } from 'element-plus' |
||||
|
import { useRouter } from 'vue-router' |
||||
|
import { useRoute } from 'vue-router' |
||||
|
const route = useRoute() |
||||
|
const pageName = route.meta.title; |
||||
|
|
||||
|
let zhjwRollTable = reactive({ |
||||
|
page: 1, |
||||
|
limit: 10, |
||||
|
total: 0, |
||||
|
loading: true, |
||||
|
data: [], |
||||
|
searchParam:{ |
||||
|
"students_id":"", |
||||
|
"registration_date":"", |
||||
|
"student_number":"", |
||||
|
"name":"", |
||||
|
"price":"", |
||||
|
"staff_id":"", |
||||
|
"course_validity":"", |
||||
|
"renewal_class":"", |
||||
|
"courses_id":"" |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const searchFormRef = ref<FormInstance>() |
||||
|
|
||||
|
// 选中数据 |
||||
|
const selectData = ref<any[]>([]) |
||||
|
|
||||
|
// 字典数据 |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取学籍列列表 |
||||
|
*/ |
||||
|
const loadZhjwRollList = (page: number = 1) => { |
||||
|
zhjwRollTable.loading = true |
||||
|
zhjwRollTable.page = page |
||||
|
|
||||
|
getZhjwRollList({ |
||||
|
page: zhjwRollTable.page, |
||||
|
limit: zhjwRollTable.limit, |
||||
|
...zhjwRollTable.searchParam |
||||
|
}).then(res => { |
||||
|
zhjwRollTable.loading = false |
||||
|
zhjwRollTable.data = res.data.data |
||||
|
zhjwRollTable.total = res.data.total |
||||
|
}).catch(() => { |
||||
|
zhjwRollTable.loading = false |
||||
|
}) |
||||
|
} |
||||
|
loadZhjwRollList() |
||||
|
|
||||
|
const router = useRouter() |
||||
|
|
||||
|
/** |
||||
|
* 添加学籍列 |
||||
|
*/ |
||||
|
const addEvent = () => { |
||||
|
router.push('/zhjw_roll/zhjw_roll_edit') |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑学籍列 |
||||
|
* @param data |
||||
|
*/ |
||||
|
const editEvent = (data: any) => { |
||||
|
router.push('/zhjw_roll/zhjw_roll_edit?id='+data.id) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除学籍列 |
||||
|
*/ |
||||
|
const deleteEvent = (id: number) => { |
||||
|
ElMessageBox.confirm(t('zhjwRollDeleteTips'), t('warning'), |
||||
|
{ |
||||
|
confirmButtonText: t('confirm'), |
||||
|
cancelButtonText: t('cancel'), |
||||
|
type: 'warning', |
||||
|
} |
||||
|
).then(() => { |
||||
|
deleteZhjwRoll(id).then(() => { |
||||
|
loadZhjwRollList() |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
const studentsIdList = ref([]) |
||||
|
const setStudentsIdList = async () => { |
||||
|
studentsIdList.value = await (await getWithStudentsList({})).data |
||||
|
} |
||||
|
setStudentsIdList() |
||||
|
const staffIdList = ref([]) |
||||
|
const setStaffIdList = async () => { |
||||
|
staffIdList.value = await (await getWithStaffList({})).data |
||||
|
} |
||||
|
setStaffIdList() |
||||
|
const coursesIdList = ref([]) |
||||
|
const setCoursesIdList = async () => { |
||||
|
coursesIdList.value = await (await getWithCoursesList({})).data |
||||
|
} |
||||
|
setCoursesIdList() |
||||
|
const classesIdList = ref([]) |
||||
|
const setClassesIdList = async () => { |
||||
|
classesIdList.value = await (await getWithClassesList({})).data |
||||
|
} |
||||
|
setClassesIdList() |
||||
|
|
||||
|
const resetForm = (formEl: FormInstance | undefined) => { |
||||
|
if (!formEl) return |
||||
|
formEl.resetFields() |
||||
|
loadZhjwRollList() |
||||
|
} |
||||
|
</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> |
||||
@ -0,0 +1,458 @@ |
|||||
|
<template> |
||||
|
<div class="main-container"> |
||||
|
<div class="detail-head"> |
||||
|
<div class="left" @click="back()"> |
||||
|
<span class="iconfont iconxiangzuojiantou !text-xs"></span> |
||||
|
<span class="ml-[1px]">{{t('returnToPreviousPage')}}</span> |
||||
|
</div> |
||||
|
<span class="adorn">|</span> |
||||
|
<span class="right">{{ pageName }}</span> |
||||
|
</div> |
||||
|
<el-card class="box-card !border-none" shadow="never"> |
||||
|
<el-form :model="formData" label-width="90px" ref="formRef" :rules="formRules" class="page-form"> |
||||
|
<el-form-item :label="t('studentsId')" prop="students_id"> |
||||
|
<el-select class="input-width" v-model="formData.students_id" clearable :placeholder="t('studentsIdPlaceholder')"> |
||||
|
<el-option label="请选择" value=""></el-option> |
||||
|
<el-option |
||||
|
v-for="(item, index) in studentsIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('registrationDate')" prop="registration_date" class="input-width"> |
||||
|
<el-date-picker |
||||
|
class="flex-1 !flex" |
||||
|
v-model="formData.registration_date" |
||||
|
clearable |
||||
|
type="datetime" |
||||
|
value-format="YYYY-MM-DD HH:mm:ss" |
||||
|
:placeholder="t('registrationDatePlaceholder')"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="t('studentNumber')" prop="student_number"> |
||||
|
<el-input v-model="formData.student_number" clearable :placeholder="t('studentNumberPlaceholder')" class="input-width" /> |
||||
|
</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> |
||||
|
|
||||
|
<el-form-item :label="t('price')" prop="price"> |
||||
|
<el-input v-model="formData.price" clearable :placeholder="t('pricePlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('staffId')" prop="staff_id"> |
||||
|
<el-select class="input-width" v-model="formData.staff_id" clearable :placeholder="t('staffIdPlaceholder')"> |
||||
|
<el-option label="请选择" value=""></el-option> |
||||
|
<el-option |
||||
|
v-for="(item, index) in staffIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('courseValidity')" prop="course_validity"> |
||||
|
<el-input v-model="formData.course_validity" clearable :placeholder="t('courseValidityPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('renewalClass')" prop="renewal_class"> |
||||
|
<el-input v-model="formData.renewal_class" clearable :placeholder="t('renewalClassPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('coursesId')" prop="courses_id"> |
||||
|
<el-select class="input-width" v-model="formData.courses_id" clearable :placeholder="t('coursesIdPlaceholder')"> |
||||
|
<el-option label="请选择" value=""></el-option> |
||||
|
<el-option |
||||
|
v-for="(item, index) in coursesIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('birthDate')" prop="birth_date"> |
||||
|
<el-input v-model="formData.birth_date" clearable :placeholder="t('birthDatePlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('classesId')" prop="classes_id"> |
||||
|
<el-select class="input-width" v-model="formData.classes_id" clearable :placeholder="t('classesIdPlaceholder')"> |
||||
|
<el-option label="请选择" value=""></el-option> |
||||
|
<el-option |
||||
|
v-for="(item, index) in classesIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('sex')" prop="sex"> |
||||
|
<el-input v-model="formData.sex" clearable :placeholder="t('sexPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('decisionMaker')" prop="decision_maker"> |
||||
|
<el-input v-model="formData.decision_maker" clearable :placeholder="t('decisionMakerPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('phone')" prop="phone"> |
||||
|
<el-input v-model="formData.phone" clearable :placeholder="t('phonePlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('requirement')" prop="requirement"> |
||||
|
<el-input v-model="formData.requirement" clearable :placeholder="t('requirementPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('timeDistance')" prop="time_distance"> |
||||
|
<el-input v-model="formData.time_distance" clearable :placeholder="t('timeDistancePlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('purchasingPower')" prop="purchasing_power"> |
||||
|
<el-input v-model="formData.purchasing_power" clearable :placeholder="t('purchasingPowerPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('attendanceRate')" prop="attendance_rate"> |
||||
|
<el-input v-model="formData.attendance_rate" clearable :placeholder="t('attendanceRatePlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('emotionalViscosity')" prop="emotional_viscosity"> |
||||
|
<el-input v-model="formData.emotional_viscosity" clearable :placeholder="t('emotionalViscosityPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('ideaCommunication')" prop="idea_communication"> |
||||
|
<el-input v-model="formData.idea_communication" clearable :placeholder="t('ideaCommunicationPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('effectRecognition')" prop="effect_recognition"> |
||||
|
<el-input v-model="formData.effect_recognition" clearable :placeholder="t('effectRecognitionPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('childrenLike')" prop="children_like"> |
||||
|
<el-input v-model="formData.children_like" clearable :placeholder="t('childrenLikePlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('referral')" prop="referral"> |
||||
|
<el-input v-model="formData.referral" clearable :placeholder="t('referralPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('missedLessons')" prop="missed_lessons"> |
||||
|
<el-input v-model="formData.missed_lessons" clearable :placeholder="t('missedLessonsPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('classHour')" prop="class_hour"> |
||||
|
<el-input v-model="formData.class_hour" clearable :placeholder="t('classHourPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('beCovered')" prop="be_covered"> |
||||
|
<el-input v-model="formData.be_covered" clearable :placeholder="t('beCoveredPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('renewalPeriod')" prop="renewal_period"> |
||||
|
<el-input v-model="formData.renewal_period" clearable :placeholder="t('renewalPeriodPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
</el-form> |
||||
|
</el-card> |
||||
|
<div class="fixed-footer-wrap"> |
||||
|
<div class="fixed-footer"> |
||||
|
<el-button type="primary" @click="onSave(formRef)">{{ t('save') }}</el-button> |
||||
|
<el-button @click="back()">{{ t('cancel') }}</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { ref, reactive, computed, watch } from 'vue' |
||||
|
import { t } from '@/lang' |
||||
|
import { useDictionary } from '@/app/api/dict' |
||||
|
import type { FormInstance } from 'element-plus' |
||||
|
import { getZhjwRollInfo,addZhjwRoll,editZhjwRoll, getWithStudentsList, getWithStaffList, getWithCoursesList, getWithClassesList } from '@/addon/zhjw/api/zhjw_roll'; |
||||
|
import { useRoute } from 'vue-router' |
||||
|
|
||||
|
const route = useRoute() |
||||
|
const id:number = parseInt(route.query.id); |
||||
|
const loading = ref(false) |
||||
|
const pageName = route.meta.title |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 表单数据 |
||||
|
*/ |
||||
|
const initialFormData = { |
||||
|
id: 0, |
||||
|
students_id: '', |
||||
|
registration_date: '', |
||||
|
student_number: '', |
||||
|
name: '', |
||||
|
price: '', |
||||
|
staff_id: '', |
||||
|
course_validity: '', |
||||
|
renewal_class: '', |
||||
|
courses_id: '', |
||||
|
birth_date: '', |
||||
|
classes_id: '', |
||||
|
sex: '', |
||||
|
decision_maker: '', |
||||
|
phone: '', |
||||
|
requirement: '', |
||||
|
time_distance: '', |
||||
|
purchasing_power: '', |
||||
|
attendance_rate: '', |
||||
|
emotional_viscosity: '', |
||||
|
idea_communication: '', |
||||
|
effect_recognition: '', |
||||
|
children_like: '', |
||||
|
referral: '', |
||||
|
missed_lessons: '', |
||||
|
class_hour: '', |
||||
|
be_covered: '', |
||||
|
renewal_period: '', |
||||
|
} |
||||
|
const formData: Record<string, any> = reactive({ ...initialFormData }) |
||||
|
|
||||
|
const setFormData = async (id:number = 0) => { |
||||
|
Object.assign(formData, initialFormData) |
||||
|
const data = await (await getZhjwRollInfo(id)).data |
||||
|
Object.keys(formData).forEach((key: string) => { |
||||
|
if (data[key] != undefined) formData[key] = data[key] |
||||
|
}) |
||||
|
} |
||||
|
if(id) setFormData(id); |
||||
|
|
||||
|
const formRef = ref<FormInstance>() |
||||
|
// 选中数据 |
||||
|
const selectData = ref<any[]>([]) |
||||
|
|
||||
|
// 字典数据 |
||||
|
|
||||
|
|
||||
|
|
||||
|
const studentsIdList = ref([] as any[]) |
||||
|
const setStudentsIdList = async () => { |
||||
|
studentsIdList.value = await (await getWithStudentsList({})).data |
||||
|
} |
||||
|
setStudentsIdList() |
||||
|
const staffIdList = ref([] as any[]) |
||||
|
const setStaffIdList = async () => { |
||||
|
staffIdList.value = await (await getWithStaffList({})).data |
||||
|
} |
||||
|
setStaffIdList() |
||||
|
const coursesIdList = ref([] as any[]) |
||||
|
const setCoursesIdList = async () => { |
||||
|
coursesIdList.value = await (await getWithCoursesList({})).data |
||||
|
} |
||||
|
setCoursesIdList() |
||||
|
const classesIdList = ref([] as any[]) |
||||
|
const setClassesIdList = async () => { |
||||
|
classesIdList.value = await (await getWithClassesList({})).data |
||||
|
} |
||||
|
setClassesIdList() |
||||
|
// 表单验证规则 |
||||
|
const formRules = computed(() => { |
||||
|
return { |
||||
|
students_id: [ |
||||
|
{ required: true, message: t('studentsIdPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
registration_date: [ |
||||
|
{ required: true, message: t('registrationDatePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
student_number: [ |
||||
|
{ required: true, message: t('studentNumberPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
name: [ |
||||
|
{ required: true, message: t('namePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
price: [ |
||||
|
{ required: true, message: t('pricePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
staff_id: [ |
||||
|
{ required: true, message: t('staffIdPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
course_validity: [ |
||||
|
{ required: true, message: t('courseValidityPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
renewal_class: [ |
||||
|
{ required: true, message: t('renewalClassPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
courses_id: [ |
||||
|
{ required: true, message: t('coursesIdPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
birth_date: [ |
||||
|
{ required: true, message: t('birthDatePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
classes_id: [ |
||||
|
{ required: true, message: t('classesIdPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
sex: [ |
||||
|
{ required: true, message: t('sexPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
decision_maker: [ |
||||
|
{ required: true, message: t('decisionMakerPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
phone: [ |
||||
|
{ required: true, message: t('phonePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
requirement: [ |
||||
|
{ required: true, message: t('requirementPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
time_distance: [ |
||||
|
{ required: true, message: t('timeDistancePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
purchasing_power: [ |
||||
|
{ required: true, message: t('purchasingPowerPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
attendance_rate: [ |
||||
|
{ required: true, message: t('attendanceRatePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
emotional_viscosity: [ |
||||
|
{ required: true, message: t('emotionalViscosityPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
idea_communication: [ |
||||
|
{ required: true, message: t('ideaCommunicationPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
effect_recognition: [ |
||||
|
{ required: true, message: t('effectRecognitionPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
children_like: [ |
||||
|
{ required: true, message: t('childrenLikePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
referral: [ |
||||
|
{ required: true, message: t('referralPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
missed_lessons: [ |
||||
|
{ required: true, message: t('missedLessonsPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
class_hour: [ |
||||
|
{ required: true, message: t('classHourPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
be_covered: [ |
||||
|
{ required: true, message: t('beCoveredPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
renewal_period: [ |
||||
|
{ required: true, message: t('renewalPeriodPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const onSave = async (formEl: FormInstance | undefined) => { |
||||
|
if (loading.value || !formEl) return |
||||
|
await formEl.validate(async (valid) => { |
||||
|
if (valid) { |
||||
|
loading.value = true |
||||
|
let data = formData |
||||
|
|
||||
|
const save = id ? editZhjwRoll : addZhjwRoll |
||||
|
save(data).then(res => { |
||||
|
loading.value = false |
||||
|
history.back() |
||||
|
}).catch(err => { |
||||
|
loading.value = false |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 验证手机号格式 |
||||
|
const mobileVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/^1[3-9]\d{9}$/.test(value)) { |
||||
|
callback(new Error(t('generateMobile'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 验证身份证号 |
||||
|
const idCardVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value)) { |
||||
|
callback(new Error(t('generateIdCard'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 验证邮箱号 |
||||
|
const emailVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(value)) { |
||||
|
callback(new Error(t('generateEmail'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
// 验证请输入整数 |
||||
|
const numberVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (!Number.isInteger(value)) { |
||||
|
callback(new Error(t('generateNumber'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
const back = () => { |
||||
|
history.back() |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped></style> |
||||
@ -0,0 +1,193 @@ |
|||||
|
<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('addZhjwStudentsSurvey') }} |
||||
|
</el-button> |
||||
|
</div> |
||||
|
|
||||
|
<el-card class="box-card !border-none my-[10px] table-search-wrap" shadow="never"> |
||||
|
<el-form :inline="true" :model="zhjwStudentsSurveyTable.searchParam" ref="searchFormRef"> |
||||
|
|
||||
|
<el-form-item :label="t('studentsId')" prop="students_id"> |
||||
|
<el-select class="w-[280px]" v-model="zhjwStudentsSurveyTable.searchParam.students_id" clearable :placeholder="t('studentsIdPlaceholder')"> |
||||
|
<el-option |
||||
|
v-for="(item, index) in studentsIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('age')" prop="age"> |
||||
|
<el-input v-model="zhjwStudentsSurveyTable.searchParam.age" :placeholder="t('agePlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="t('height')" prop="height"> |
||||
|
<el-input v-model="zhjwStudentsSurveyTable.searchParam.height" :placeholder="t('heightPlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="t('weight')" prop="weight"> |
||||
|
<el-input v-model="zhjwStudentsSurveyTable.searchParam.weight" :placeholder="t('weightPlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" @click="loadZhjwStudentsSurveyList()">{{ t('search') }}</el-button> |
||||
|
<el-button @click="resetForm(searchFormRef)">{{ t('reset') }}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-card> |
||||
|
|
||||
|
<div class="mt-[10px]"> |
||||
|
<el-table :data="zhjwStudentsSurveyTable.data" size="large" v-loading="zhjwStudentsSurveyTable.loading"> |
||||
|
<template #empty> |
||||
|
<span>{{ !zhjwStudentsSurveyTable.loading ? t('emptyData') : '' }}</span> |
||||
|
</template> |
||||
|
<el-table-column prop="students_id_name" :label="t('studentsId')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="age" :label="t('age')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="height" :label="t('height')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="weight" :label="t('weight')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="content" :label="t('content')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="create_time" :label="t('createTime')" 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)">{{ t('edit') }}</el-button> |
||||
|
<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="zhjwStudentsSurveyTable.page" v-model:page-size="zhjwStudentsSurveyTable.limit" |
||||
|
layout="total, sizes, prev, pager, next, jumper" :total="zhjwStudentsSurveyTable.total" |
||||
|
@size-change="loadZhjwStudentsSurveyList()" @current-change="loadZhjwStudentsSurveyList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</el-card> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, watch } from 'vue' |
||||
|
import { t } from '@/lang' |
||||
|
import { useDictionary } from '@/app/api/dict' |
||||
|
import { getZhjwStudentsSurveyList, deleteZhjwStudentsSurvey, getWithStudentsList } from '@/addon/zhjw/api/zhjw_students_survey' |
||||
|
import { img } from '@/utils/common' |
||||
|
import { ElMessageBox,FormInstance } from 'element-plus' |
||||
|
import { useRouter } from 'vue-router' |
||||
|
import { useRoute } from 'vue-router' |
||||
|
const route = useRoute() |
||||
|
const pageName = route.meta.title; |
||||
|
|
||||
|
let zhjwStudentsSurveyTable = reactive({ |
||||
|
page: 1, |
||||
|
limit: 10, |
||||
|
total: 0, |
||||
|
loading: true, |
||||
|
data: [], |
||||
|
searchParam:{ |
||||
|
"students_id":"", |
||||
|
"age":"", |
||||
|
"height":"", |
||||
|
"weight":"" |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const searchFormRef = ref<FormInstance>() |
||||
|
|
||||
|
// 选中数据 |
||||
|
const selectData = ref<any[]>([]) |
||||
|
|
||||
|
// 字典数据 |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取学员体测列表 |
||||
|
*/ |
||||
|
const loadZhjwStudentsSurveyList = (page: number = 1) => { |
||||
|
zhjwStudentsSurveyTable.loading = true |
||||
|
zhjwStudentsSurveyTable.page = page |
||||
|
|
||||
|
getZhjwStudentsSurveyList({ |
||||
|
page: zhjwStudentsSurveyTable.page, |
||||
|
limit: zhjwStudentsSurveyTable.limit, |
||||
|
...zhjwStudentsSurveyTable.searchParam |
||||
|
}).then(res => { |
||||
|
zhjwStudentsSurveyTable.loading = false |
||||
|
zhjwStudentsSurveyTable.data = res.data.data |
||||
|
zhjwStudentsSurveyTable.total = res.data.total |
||||
|
}).catch(() => { |
||||
|
zhjwStudentsSurveyTable.loading = false |
||||
|
}) |
||||
|
} |
||||
|
loadZhjwStudentsSurveyList() |
||||
|
|
||||
|
const router = useRouter() |
||||
|
|
||||
|
/** |
||||
|
* 添加学员体测 |
||||
|
*/ |
||||
|
const addEvent = () => { |
||||
|
router.push('/zhjw_students_survey/zhjw_students_survey_edit') |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑学员体测 |
||||
|
* @param data |
||||
|
*/ |
||||
|
const editEvent = (data: any) => { |
||||
|
router.push('/zhjw_students_survey/zhjw_students_survey_edit?id='+data.id) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除学员体测 |
||||
|
*/ |
||||
|
const deleteEvent = (id: number) => { |
||||
|
ElMessageBox.confirm(t('zhjwStudentsSurveyDeleteTips'), t('warning'), |
||||
|
{ |
||||
|
confirmButtonText: t('confirm'), |
||||
|
cancelButtonText: t('cancel'), |
||||
|
type: 'warning', |
||||
|
} |
||||
|
).then(() => { |
||||
|
deleteZhjwStudentsSurvey(id).then(() => { |
||||
|
loadZhjwStudentsSurveyList() |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
const studentsIdList = ref([]) |
||||
|
const setStudentsIdList = async () => { |
||||
|
studentsIdList.value = await (await getWithStudentsList({})).data |
||||
|
} |
||||
|
setStudentsIdList() |
||||
|
|
||||
|
const resetForm = (formEl: FormInstance | undefined) => { |
||||
|
if (!formEl) return |
||||
|
formEl.resetFields() |
||||
|
loadZhjwStudentsSurveyList() |
||||
|
} |
||||
|
</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> |
||||
@ -0,0 +1,192 @@ |
|||||
|
<template> |
||||
|
<div class="main-container"> |
||||
|
<div class="detail-head"> |
||||
|
<div class="left" @click="back()"> |
||||
|
<span class="iconfont iconxiangzuojiantou !text-xs"></span> |
||||
|
<span class="ml-[1px]">{{t('returnToPreviousPage')}}</span> |
||||
|
</div> |
||||
|
<span class="adorn">|</span> |
||||
|
<span class="right">{{ pageName }}</span> |
||||
|
</div> |
||||
|
<el-card class="box-card !border-none" shadow="never"> |
||||
|
<el-form :model="formData" label-width="90px" ref="formRef" :rules="formRules" class="page-form"> |
||||
|
<el-form-item :label="t('studentsId')" prop="students_id"> |
||||
|
<el-select class="input-width" v-model="formData.students_id" clearable :placeholder="t('studentsIdPlaceholder')"> |
||||
|
<el-option label="请选择" value=""></el-option> |
||||
|
<el-option |
||||
|
v-for="(item, index) in studentsIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('age')" prop="age"> |
||||
|
<el-input v-model="formData.age" clearable :placeholder="t('agePlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('height')" prop="height"> |
||||
|
<el-input v-model="formData.height" clearable :placeholder="t('heightPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('weight')" prop="weight"> |
||||
|
<el-input v-model="formData.weight" clearable :placeholder="t('weightPlaceholder')" class="input-width" /> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('content')" prop="content"> |
||||
|
<editor v-model="formData.content" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-card> |
||||
|
<div class="fixed-footer-wrap"> |
||||
|
<div class="fixed-footer"> |
||||
|
<el-button type="primary" @click="onSave(formRef)">{{ t('save') }}</el-button> |
||||
|
<el-button @click="back()">{{ t('cancel') }}</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { ref, reactive, computed, watch } from 'vue' |
||||
|
import { t } from '@/lang' |
||||
|
import { useDictionary } from '@/app/api/dict' |
||||
|
import type { FormInstance } from 'element-plus' |
||||
|
import { getZhjwStudentsSurveyInfo,addZhjwStudentsSurvey,editZhjwStudentsSurvey, getWithStudentsList } from '@/addon/zhjw/api/zhjw_students_survey'; |
||||
|
import { useRoute } from 'vue-router' |
||||
|
|
||||
|
const route = useRoute() |
||||
|
const id:number = parseInt(route.query.id); |
||||
|
const loading = ref(false) |
||||
|
const pageName = route.meta.title |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 表单数据 |
||||
|
*/ |
||||
|
const initialFormData = { |
||||
|
id: 0, |
||||
|
students_id: '', |
||||
|
age: 0, |
||||
|
height: '', |
||||
|
weight: '', |
||||
|
content: '', |
||||
|
} |
||||
|
const formData: Record<string, any> = reactive({ ...initialFormData }) |
||||
|
|
||||
|
const setFormData = async (id:number = 0) => { |
||||
|
Object.assign(formData, initialFormData) |
||||
|
const data = await (await getZhjwStudentsSurveyInfo(id)).data |
||||
|
Object.keys(formData).forEach((key: string) => { |
||||
|
if (data[key] != undefined) formData[key] = data[key] |
||||
|
}) |
||||
|
} |
||||
|
if(id) setFormData(id); |
||||
|
|
||||
|
const formRef = ref<FormInstance>() |
||||
|
// 选中数据 |
||||
|
const selectData = ref<any[]>([]) |
||||
|
|
||||
|
// 字典数据 |
||||
|
|
||||
|
|
||||
|
|
||||
|
const studentsIdList = ref([] as any[]) |
||||
|
const setStudentsIdList = async () => { |
||||
|
studentsIdList.value = await (await getWithStudentsList({})).data |
||||
|
} |
||||
|
setStudentsIdList() |
||||
|
// 表单验证规则 |
||||
|
const formRules = computed(() => { |
||||
|
return { |
||||
|
students_id: [ |
||||
|
{ required: true, message: t('studentsIdPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
age: [ |
||||
|
{ required: true, message: t('agePlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
height: [ |
||||
|
{ required: true, message: t('heightPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
weight: [ |
||||
|
{ required: true, message: t('weightPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
content: [ |
||||
|
{ required: true, message: t('contentPlaceholder'), trigger: 'blur' }, |
||||
|
|
||||
|
] |
||||
|
, |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const onSave = async (formEl: FormInstance | undefined) => { |
||||
|
if (loading.value || !formEl) return |
||||
|
await formEl.validate(async (valid) => { |
||||
|
if (valid) { |
||||
|
loading.value = true |
||||
|
let data = formData |
||||
|
|
||||
|
const save = id ? editZhjwStudentsSurvey : addZhjwStudentsSurvey |
||||
|
save(data).then(res => { |
||||
|
loading.value = false |
||||
|
history.back() |
||||
|
}).catch(err => { |
||||
|
loading.value = false |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 验证手机号格式 |
||||
|
const mobileVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/^1[3-9]\d{9}$/.test(value)) { |
||||
|
callback(new Error(t('generateMobile'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 验证身份证号 |
||||
|
const idCardVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value)) { |
||||
|
callback(new Error(t('generateIdCard'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 验证邮箱号 |
||||
|
const emailVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (value && !/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(value)) { |
||||
|
callback(new Error(t('generateEmail'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
// 验证请输入整数 |
||||
|
const numberVerify = (rule: any, value: any, callback: any) => { |
||||
|
if (!Number.isInteger(value)) { |
||||
|
callback(new Error(t('generateNumber'))) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
const back = () => { |
||||
|
history.back() |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped></style> |
||||
@ -0,0 +1,161 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace addon\zhjw\app\adminapi\controller\zhjw_roll; |
||||
|
|
||||
|
use core\base\BaseAdminController; |
||||
|
use addon\zhjw\app\service\admin\zhjw_roll\ZhjwRollService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 学籍列控制器 |
||||
|
* Class ZhjwRoll |
||||
|
* @package addon\zhjw\app\adminapi\controller\zhjw_roll |
||||
|
*/ |
||||
|
class ZhjwRoll extends BaseAdminController |
||||
|
{ |
||||
|
/** |
||||
|
* 获取学籍列列表 |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function lists(){ |
||||
|
$data = $this->request->params([ |
||||
|
["students_id",""], |
||||
|
["registration_date",""], |
||||
|
["student_number",""], |
||||
|
["name",""], |
||||
|
["price",""], |
||||
|
["staff_id",""], |
||||
|
["course_validity",""], |
||||
|
["renewal_class",""], |
||||
|
["courses_id",""] |
||||
|
]); |
||||
|
return success((new ZhjwRollService())->getPage($data)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 学籍列详情 |
||||
|
* @param int $id |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function info(int $id){ |
||||
|
return success((new ZhjwRollService())->getInfo($id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加学籍列 |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function add(){ |
||||
|
$data = $this->request->params([ |
||||
|
["students_id",0], |
||||
|
["registration_date","2025-04-07 12:45:31"], |
||||
|
["student_number",""], |
||||
|
["name",""], |
||||
|
["price",0.00], |
||||
|
["staff_id",0], |
||||
|
["course_validity",""], |
||||
|
["renewal_class",""], |
||||
|
["courses_id",0], |
||||
|
["birth_date",""], |
||||
|
["classes_id",0], |
||||
|
["sex",""], |
||||
|
["decision_maker",""], |
||||
|
["phone",""], |
||||
|
["requirement",""], |
||||
|
["time_distance",""], |
||||
|
["purchasing_power",""], |
||||
|
["attendance_rate",""], |
||||
|
["emotional_viscosity",""], |
||||
|
["idea_communication",""], |
||||
|
["effect_recognition",""], |
||||
|
["children_like",""], |
||||
|
["referral",""], |
||||
|
["missed_lessons",""], |
||||
|
["class_hour",""], |
||||
|
["be_covered",""], |
||||
|
["renewal_period",""], |
||||
|
|
||||
|
]); |
||||
|
$this->validate($data, 'addon\zhjw\app\validate\zhjw_roll\ZhjwRoll.add'); |
||||
|
$id = (new ZhjwRollService())->add($data); |
||||
|
return success('ADD_SUCCESS', ['id' => $id]); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 学籍列编辑 |
||||
|
* @param $id 学籍列id |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function edit(int $id){ |
||||
|
$data = $this->request->params([ |
||||
|
["students_id",0], |
||||
|
["registration_date","2025-04-07 12:45:31"], |
||||
|
["student_number",""], |
||||
|
["name",""], |
||||
|
["price",0.00], |
||||
|
["staff_id",0], |
||||
|
["course_validity",""], |
||||
|
["renewal_class",""], |
||||
|
["courses_id",0], |
||||
|
["birth_date",""], |
||||
|
["classes_id",0], |
||||
|
["sex",""], |
||||
|
["decision_maker",""], |
||||
|
["phone",""], |
||||
|
["requirement",""], |
||||
|
["time_distance",""], |
||||
|
["purchasing_power",""], |
||||
|
["attendance_rate",""], |
||||
|
["emotional_viscosity",""], |
||||
|
["idea_communication",""], |
||||
|
["effect_recognition",""], |
||||
|
["children_like",""], |
||||
|
["referral",""], |
||||
|
["missed_lessons",""], |
||||
|
["class_hour",""], |
||||
|
["be_covered",""], |
||||
|
["renewal_period",""], |
||||
|
|
||||
|
]); |
||||
|
$this->validate($data, 'addon\zhjw\app\validate\zhjw_roll\ZhjwRoll.edit'); |
||||
|
(new ZhjwRollService())->edit($id, $data); |
||||
|
return success('EDIT_SUCCESS'); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 学籍列删除 |
||||
|
* @param $id 学籍列id |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function del(int $id){ |
||||
|
(new ZhjwRollService())->del($id); |
||||
|
return success('DELETE_SUCCESS'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function getStudentsAll(){ |
||||
|
return success(( new ZhjwRollService())->getStudentsAll()); |
||||
|
} |
||||
|
|
||||
|
public function getStaffAll(){ |
||||
|
return success(( new ZhjwRollService())->getStaffAll()); |
||||
|
} |
||||
|
|
||||
|
public function getCoursesAll(){ |
||||
|
return success(( new ZhjwRollService())->getCoursesAll()); |
||||
|
} |
||||
|
|
||||
|
public function getClassesAll(){ |
||||
|
return success(( new ZhjwRollService())->getClassesAll()); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,100 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace addon\zhjw\app\adminapi\controller\zhjw_students_survey; |
||||
|
|
||||
|
use core\base\BaseAdminController; |
||||
|
use addon\zhjw\app\service\admin\zhjw_students_survey\ZhjwStudentsSurveyService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 学员体测控制器 |
||||
|
* Class ZhjwStudentsSurvey |
||||
|
* @package addon\zhjw\app\adminapi\controller\zhjw_students_survey |
||||
|
*/ |
||||
|
class ZhjwStudentsSurvey extends BaseAdminController |
||||
|
{ |
||||
|
/** |
||||
|
* 获取学员体测列表 |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function lists(){ |
||||
|
$data = $this->request->params([ |
||||
|
["students_id",""], |
||||
|
["age",""], |
||||
|
["height",""], |
||||
|
["weight",""] |
||||
|
]); |
||||
|
return success((new ZhjwStudentsSurveyService())->getPage($data)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 学员体测详情 |
||||
|
* @param int $id |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function info(int $id){ |
||||
|
return success((new ZhjwStudentsSurveyService())->getInfo($id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加学员体测 |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function add(){ |
||||
|
$data = $this->request->params([ |
||||
|
["students_id",0], |
||||
|
["age",0], |
||||
|
["height",0.00], |
||||
|
["weight",0.00], |
||||
|
["content",""], |
||||
|
|
||||
|
]); |
||||
|
$this->validate($data, 'addon\zhjw\app\validate\zhjw_students_survey\ZhjwStudentsSurvey.add'); |
||||
|
$id = (new ZhjwStudentsSurveyService())->add($data); |
||||
|
return success('ADD_SUCCESS', ['id' => $id]); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 学员体测编辑 |
||||
|
* @param $id 学员体测id |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function edit(int $id){ |
||||
|
$data = $this->request->params([ |
||||
|
["students_id",0], |
||||
|
["age",0], |
||||
|
["height",0.00], |
||||
|
["weight",0.00], |
||||
|
["content",""], |
||||
|
|
||||
|
]); |
||||
|
$this->validate($data, 'addon\zhjw\app\validate\zhjw_students_survey\ZhjwStudentsSurvey.edit'); |
||||
|
(new ZhjwStudentsSurveyService())->edit($id, $data); |
||||
|
return success('EDIT_SUCCESS'); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 学员体测删除 |
||||
|
* @param $id 学员体测id |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function del(int $id){ |
||||
|
(new ZhjwStudentsSurveyService())->del($id); |
||||
|
return success('DELETE_SUCCESS'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function getStudentsAll(){ |
||||
|
return success(( new ZhjwStudentsSurveyService())->getStudentsAll()); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,190 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace addon\zhjw\app\model\zhjw_roll; |
||||
|
|
||||
|
use core\base\BaseModel; |
||||
|
use think\model\concern\SoftDelete; |
||||
|
use think\model\relation\HasMany; |
||||
|
use think\model\relation\HasOne; |
||||
|
|
||||
|
use addon\zhjw\app\model\students\Students; |
||||
|
|
||||
|
use addon\zhjw\app\model\staff\Staff; |
||||
|
|
||||
|
use addon\zhjw\app\model\courses\Courses; |
||||
|
|
||||
|
use addon\zhjw\app\model\classes\Classes; |
||||
|
|
||||
|
/** |
||||
|
* 学籍列模型 |
||||
|
* Class ZhjwRoll |
||||
|
* @package addon\zhjw\app\model\zhjw_roll |
||||
|
*/ |
||||
|
class ZhjwRoll extends BaseModel |
||||
|
{ |
||||
|
|
||||
|
use SoftDelete; |
||||
|
|
||||
|
/** |
||||
|
* 数据表主键 |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $pk = 'id'; |
||||
|
|
||||
|
/** |
||||
|
* 模型名称 |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $name = 'zhjw_roll'; |
||||
|
|
||||
|
/** |
||||
|
* 定义软删除标记字段. |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $deleteTime = 'is_deleted'; |
||||
|
|
||||
|
/** |
||||
|
* 定义软删除字段的默认值. |
||||
|
* @var int |
||||
|
*/ |
||||
|
protected $defaultSoftDelete = 0; |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学籍列学员 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchStudentsIdAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("students_id", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学籍列报名日期 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchRegistrationDateAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("registration_date", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学籍列学号 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchStudentNumberAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("student_number", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学籍列学员姓名 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchNameAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("name", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学籍列金额 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchPriceAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("price", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学籍列班主任 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchStaffIdAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("staff_id", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学籍列课程有效期 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchCourseValidityAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("course_validity", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学籍列续费等级 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchRenewalClassAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("renewal_class", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学籍列课程 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchCoursesIdAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("courses_id", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
public function students(){ |
||||
|
return $this->hasOne(Students::class, 'id', 'students_id')->joinType('left')->withField('name,id')->bind(['students_id_name'=>'name']); |
||||
|
} |
||||
|
|
||||
|
public function staff(){ |
||||
|
return $this->hasOne(Staff::class, 'id', 'staff_id')->joinType('left')->withField('name,id')->bind(['staff_id_name'=>'name']); |
||||
|
} |
||||
|
|
||||
|
public function courses(){ |
||||
|
return $this->hasOne(Courses::class, 'id', 'courses_id')->joinType('left')->withField('name,id')->bind(['courses_id_name'=>'name']); |
||||
|
} |
||||
|
|
||||
|
public function classes(){ |
||||
|
return $this->hasOne(Classes::class, 'id', 'classes_id')->joinType('left')->withField('name,id')->bind(['classes_id_name'=>'name']); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,113 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace addon\zhjw\app\model\zhjw_students_survey; |
||||
|
|
||||
|
use core\base\BaseModel; |
||||
|
use think\model\concern\SoftDelete; |
||||
|
use think\model\relation\HasMany; |
||||
|
use think\model\relation\HasOne; |
||||
|
|
||||
|
use addon\zhjw\app\model\students\Students; |
||||
|
|
||||
|
/** |
||||
|
* 学员体测模型 |
||||
|
* Class ZhjwStudentsSurvey |
||||
|
* @package addon\zhjw\app\model\zhjw_students_survey |
||||
|
*/ |
||||
|
class ZhjwStudentsSurvey extends BaseModel |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
use SoftDelete; |
||||
|
|
||||
|
/** |
||||
|
* 数据表主键 |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $pk = 'id'; |
||||
|
|
||||
|
/** |
||||
|
* 模型名称 |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $name = 'zhjw_students_survey'; |
||||
|
|
||||
|
/** |
||||
|
* 定义软删除标记字段. |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $deleteTime = 'is_deleted'; |
||||
|
|
||||
|
/** |
||||
|
* 定义软删除字段的默认值. |
||||
|
* @var int |
||||
|
*/ |
||||
|
protected $defaultSoftDelete = 0; |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学员体测学员 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchStudentsIdAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("students_id", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学员体测年龄 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchAgeAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("age", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学员体测身高 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchHeightAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("height", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学员体测体重 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchWeightAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("weight", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
public function students(){ |
||||
|
return $this->hasOne(Students::class, 'id', 'students_id')->joinType('left')->withField('name,id')->bind(['students_id_name'=>'name']); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,123 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace addon\zhjw\app\service\admin\zhjw_roll; |
||||
|
|
||||
|
use addon\zhjw\app\model\zhjw_roll\ZhjwRoll; |
||||
|
use addon\zhjw\app\model\students\Students; |
||||
|
use addon\zhjw\app\model\staff\Staff; |
||||
|
use addon\zhjw\app\model\courses\Courses; |
||||
|
use addon\zhjw\app\model\classes\Classes; |
||||
|
|
||||
|
use core\base\BaseAdminService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 学籍列服务层 |
||||
|
* Class ZhjwRollService |
||||
|
* @package addon\zhjw\app\service\admin\zhjw_roll |
||||
|
*/ |
||||
|
class ZhjwRollService extends BaseAdminService |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
parent::__construct(); |
||||
|
$this->model = new ZhjwRoll(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取学籍列列表 |
||||
|
* @param array $where |
||||
|
* @return array |
||||
|
*/ |
||||
|
public function getPage(array $where = []) |
||||
|
{ |
||||
|
$field = 'id,students_id,registration_date,student_number,name,price,staff_id,course_validity,renewal_class,courses_id,birth_date,classes_id,sex,decision_maker,phone,requirement,time_distance,purchasing_power,attendance_rate,emotional_viscosity,idea_communication,effect_recognition,children_like,referral,missed_lessons,class_hour,be_covered,renewal_period,create_time,update_time,is_deleted,created_by,created_role,updated_by,updated_role'; |
||||
|
$order = 'id desc'; |
||||
|
|
||||
|
$search_model = $this->model->withSearch(["students_id","registration_date","student_number","name","price","staff_id","course_validity","renewal_class","courses_id"], $where)->with(['students','staff','courses','classes'])->field($field)->order($order); |
||||
|
$list = $this->pageQuery($search_model); |
||||
|
return $list; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取学籍列信息 |
||||
|
* @param int $id |
||||
|
* @return array |
||||
|
*/ |
||||
|
public function getInfo(int $id) |
||||
|
{ |
||||
|
$field = 'id,students_id,registration_date,student_number,name,price,staff_id,course_validity,renewal_class,courses_id,birth_date,classes_id,sex,decision_maker,phone,requirement,time_distance,purchasing_power,attendance_rate,emotional_viscosity,idea_communication,effect_recognition,children_like,referral,missed_lessons,class_hour,be_covered,renewal_period,create_time,update_time,is_deleted,created_by,created_role,updated_by,updated_role'; |
||||
|
|
||||
|
$info = $this->model->field($field)->where([['id', "=", $id]])->with(['students','staff','courses','classes'])->findOrEmpty()->toArray(); |
||||
|
return $info; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加学籍列 |
||||
|
* @param array $data |
||||
|
* @return mixed |
||||
|
*/ |
||||
|
public function add(array $data) |
||||
|
{ |
||||
|
$res = $this->model->create($data); |
||||
|
return $res->id; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 学籍列编辑 |
||||
|
* @param int $id |
||||
|
* @param array $data |
||||
|
* @return bool |
||||
|
*/ |
||||
|
public function edit(int $id, array $data) |
||||
|
{ |
||||
|
|
||||
|
$this->model->where([['id', '=', $id]])->update($data); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除学籍列 |
||||
|
* @param int $id |
||||
|
* @return bool |
||||
|
*/ |
||||
|
public function del(int $id) |
||||
|
{ |
||||
|
$model = $this->model->where([['id', '=', $id]])->find(); |
||||
|
$res = $model->delete(); |
||||
|
return $res; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function getStudentsAll(){ |
||||
|
$studentsModel = new Students(); |
||||
|
return $studentsModel->select()->toArray(); |
||||
|
} |
||||
|
|
||||
|
public function getStaffAll(){ |
||||
|
$staffModel = new Staff(); |
||||
|
return $staffModel->select()->toArray(); |
||||
|
} |
||||
|
|
||||
|
public function getCoursesAll(){ |
||||
|
$coursesModel = new Courses(); |
||||
|
return $coursesModel->select()->toArray(); |
||||
|
} |
||||
|
|
||||
|
public function getClassesAll(){ |
||||
|
$classesModel = new Classes(); |
||||
|
return $classesModel->select()->toArray(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,105 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace addon\zhjw\app\service\admin\zhjw_students_survey; |
||||
|
|
||||
|
use addon\zhjw\app\model\zhjw_students_survey\ZhjwStudentsSurvey; |
||||
|
use addon\zhjw\app\model\students\Students; |
||||
|
|
||||
|
use core\base\BaseAdminService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 学员体测服务层 |
||||
|
* Class ZhjwStudentsSurveyService |
||||
|
* @package addon\zhjw\app\service\admin\zhjw_students_survey |
||||
|
*/ |
||||
|
class ZhjwStudentsSurveyService extends BaseAdminService |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
parent::__construct(); |
||||
|
$this->model = new ZhjwStudentsSurvey(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取学员体测列表 |
||||
|
* @param array $where |
||||
|
* @return array |
||||
|
*/ |
||||
|
public function getPage(array $where = []) |
||||
|
{ |
||||
|
$field = 'id,students_id,age,height,weight,score,content,create_time,update_time,is_deleted,created_by,created_role,updated_by,updated_role'; |
||||
|
$order = 'id desc'; |
||||
|
|
||||
|
$search_model = $this->model->withSearch(["students_id","age","height","weight"], $where)->with(['students'])->field($field)->order($order); |
||||
|
$list = $this->pageQuery($search_model); |
||||
|
return $list; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取学员体测信息 |
||||
|
* @param int $id |
||||
|
* @return array |
||||
|
*/ |
||||
|
public function getInfo(int $id) |
||||
|
{ |
||||
|
$field = 'id,students_id,age,height,weight,score,content,create_time,update_time,is_deleted,created_by,created_role,updated_by,updated_role'; |
||||
|
|
||||
|
$info = $this->model->field($field)->where([['id', "=", $id]])->with(['students'])->findOrEmpty()->toArray(); |
||||
|
return $info; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加学员体测 |
||||
|
* @param array $data |
||||
|
* @return mixed |
||||
|
*/ |
||||
|
public function add(array $data) |
||||
|
{ |
||||
|
$res = $this->model->create($data); |
||||
|
return $res->id; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 学员体测编辑 |
||||
|
* @param int $id |
||||
|
* @param array $data |
||||
|
* @return bool |
||||
|
*/ |
||||
|
public function edit(int $id, array $data) |
||||
|
{ |
||||
|
|
||||
|
$this->model->where([['id', '=', $id]])->update($data); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除学员体测 |
||||
|
* @param int $id |
||||
|
* @return bool |
||||
|
*/ |
||||
|
public function del(int $id) |
||||
|
{ |
||||
|
$model = $this->model->where([['id', '=', $id]])->find(); |
||||
|
$res = $model->delete(); |
||||
|
return $res; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function getStudentsAll(){ |
||||
|
$studentsModel = new Students(); |
||||
|
return $studentsModel->select()->toArray(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,87 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace addon\zhjw\app\validate\zhjw_roll; |
||||
|
use core\base\BaseValidate; |
||||
|
/** |
||||
|
* 学籍列验证器 |
||||
|
* Class ZhjwRoll |
||||
|
* @package addon\zhjw\app\validate\zhjw_roll |
||||
|
*/ |
||||
|
class ZhjwRoll extends BaseValidate |
||||
|
{ |
||||
|
|
||||
|
protected $rule = [ |
||||
|
'students_id' => 'require', |
||||
|
'registration_date' => 'require', |
||||
|
'student_number' => 'require', |
||||
|
'name' => 'require', |
||||
|
'price' => 'require', |
||||
|
'staff_id' => 'require', |
||||
|
'course_validity' => 'require', |
||||
|
'renewal_class' => 'require', |
||||
|
'courses_id' => 'require', |
||||
|
'birth_date' => 'require', |
||||
|
'classes_id' => 'require', |
||||
|
'sex' => 'require', |
||||
|
'decision_maker' => 'require', |
||||
|
'phone' => 'require', |
||||
|
'requirement' => 'require', |
||||
|
'time_distance' => 'require', |
||||
|
'purchasing_power' => 'require', |
||||
|
'attendance_rate' => 'require', |
||||
|
'emotional_viscosity' => 'require', |
||||
|
'idea_communication' => 'require', |
||||
|
'effect_recognition' => 'require', |
||||
|
'children_like' => 'require', |
||||
|
'referral' => 'require', |
||||
|
'missed_lessons' => 'require', |
||||
|
'class_hour' => 'require', |
||||
|
'be_covered' => 'require', |
||||
|
'renewal_period' => 'require', |
||||
|
]; |
||||
|
|
||||
|
protected $message = [ |
||||
|
'students_id.require' => ['common_validate.require', ['students_id']], |
||||
|
'registration_date.require' => ['common_validate.require', ['registration_date']], |
||||
|
'student_number.require' => ['common_validate.require', ['student_number']], |
||||
|
'name.require' => ['common_validate.require', ['name']], |
||||
|
'price.require' => ['common_validate.require', ['price']], |
||||
|
'staff_id.require' => ['common_validate.require', ['staff_id']], |
||||
|
'course_validity.require' => ['common_validate.require', ['course_validity']], |
||||
|
'renewal_class.require' => ['common_validate.require', ['renewal_class']], |
||||
|
'courses_id.require' => ['common_validate.require', ['courses_id']], |
||||
|
'birth_date.require' => ['common_validate.require', ['birth_date']], |
||||
|
'classes_id.require' => ['common_validate.require', ['classes_id']], |
||||
|
'sex.require' => ['common_validate.require', ['sex']], |
||||
|
'decision_maker.require' => ['common_validate.require', ['decision_maker']], |
||||
|
'phone.require' => ['common_validate.require', ['phone']], |
||||
|
'requirement.require' => ['common_validate.require', ['requirement']], |
||||
|
'time_distance.require' => ['common_validate.require', ['time_distance']], |
||||
|
'purchasing_power.require' => ['common_validate.require', ['purchasing_power']], |
||||
|
'attendance_rate.require' => ['common_validate.require', ['attendance_rate']], |
||||
|
'emotional_viscosity.require' => ['common_validate.require', ['emotional_viscosity']], |
||||
|
'idea_communication.require' => ['common_validate.require', ['idea_communication']], |
||||
|
'effect_recognition.require' => ['common_validate.require', ['effect_recognition']], |
||||
|
'children_like.require' => ['common_validate.require', ['children_like']], |
||||
|
'referral.require' => ['common_validate.require', ['referral']], |
||||
|
'missed_lessons.require' => ['common_validate.require', ['missed_lessons']], |
||||
|
'class_hour.require' => ['common_validate.require', ['class_hour']], |
||||
|
'be_covered.require' => ['common_validate.require', ['be_covered']], |
||||
|
'renewal_period.require' => ['common_validate.require', ['renewal_period']], |
||||
|
]; |
||||
|
|
||||
|
protected $scene = [ |
||||
|
"add" => ['students_id', 'registration_date', 'student_number', 'name', 'price', 'staff_id', 'course_validity', 'renewal_class', 'courses_id', 'birth_date', 'classes_id', 'sex', 'decision_maker', 'phone', 'requirement', 'time_distance', 'purchasing_power', 'attendance_rate', 'emotional_viscosity', 'idea_communication', 'effect_recognition', 'children_like', 'referral', 'missed_lessons', 'class_hour', 'be_covered', 'renewal_period'], |
||||
|
"edit" => ['students_id', 'registration_date', 'student_number', 'name', 'price', 'staff_id', 'course_validity', 'renewal_class', 'courses_id', 'birth_date', 'classes_id', 'sex', 'decision_maker', 'phone', 'requirement', 'time_distance', 'purchasing_power', 'attendance_rate', 'emotional_viscosity', 'idea_communication', 'effect_recognition', 'children_like', 'referral', 'missed_lessons', 'class_hour', 'be_covered', 'renewal_period'] |
||||
|
]; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,43 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace addon\zhjw\app\validate\zhjw_students_survey; |
||||
|
use core\base\BaseValidate; |
||||
|
/** |
||||
|
* 学员体测验证器 |
||||
|
* Class ZhjwStudentsSurvey |
||||
|
* @package addon\zhjw\app\validate\zhjw_students_survey |
||||
|
*/ |
||||
|
class ZhjwStudentsSurvey extends BaseValidate |
||||
|
{ |
||||
|
|
||||
|
protected $rule = [ |
||||
|
'students_id' => 'require', |
||||
|
'age' => 'require', |
||||
|
'height' => 'require', |
||||
|
'weight' => 'require', |
||||
|
'content' => 'require', |
||||
|
]; |
||||
|
|
||||
|
protected $message = [ |
||||
|
'students_id.require' => ['common_validate.require', ['students_id']], |
||||
|
'age.require' => ['common_validate.require', ['age']], |
||||
|
'height.require' => ['common_validate.require', ['height']], |
||||
|
'weight.require' => ['common_validate.require', ['weight']], |
||||
|
'content.require' => ['common_validate.require', ['content']], |
||||
|
]; |
||||
|
|
||||
|
protected $scene = [ |
||||
|
"add" => ['students_id', 'age', 'height', 'weight', 'content'], |
||||
|
"edit" => ['students_id', 'age', 'height', 'weight', 'content'] |
||||
|
]; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,98 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace app\adminapi\controller\zhjw_students_survey; |
||||
|
|
||||
|
use core\base\BaseAdminController; |
||||
|
use app\service\admin\zhjw_students_survey\ZhjwStudentsSurveyService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 学员体测控制器 |
||||
|
* Class ZhjwStudentsSurvey |
||||
|
* @package app\adminapi\controller\zhjw_students_survey |
||||
|
*/ |
||||
|
class ZhjwStudentsSurvey extends BaseAdminController |
||||
|
{ |
||||
|
/** |
||||
|
* 获取学员体测列表 |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function lists(){ |
||||
|
$data = $this->request->params([ |
||||
|
["students_id",""], |
||||
|
["height",""], |
||||
|
["weight",""], |
||||
|
["update_time",""] |
||||
|
]); |
||||
|
return success((new ZhjwStudentsSurveyService())->getPage($data)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 学员体测详情 |
||||
|
* @param int $id |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function info(int $id){ |
||||
|
return success((new ZhjwStudentsSurveyService())->getInfo($id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加学员体测 |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function add(){ |
||||
|
$data = $this->request->params([ |
||||
|
["students_id",0], |
||||
|
["height",0.00], |
||||
|
["weight",0.00], |
||||
|
["content",""], |
||||
|
|
||||
|
]); |
||||
|
$this->validate($data, 'app\validate\zhjw_students_survey\ZhjwStudentsSurvey.add'); |
||||
|
$id = (new ZhjwStudentsSurveyService())->add($data); |
||||
|
return success('ADD_SUCCESS', ['id' => $id]); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 学员体测编辑 |
||||
|
* @param $id 学员体测id |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function edit(int $id){ |
||||
|
$data = $this->request->params([ |
||||
|
["students_id",0], |
||||
|
["height",0.00], |
||||
|
["weight",0.00], |
||||
|
["content",""], |
||||
|
|
||||
|
]); |
||||
|
$this->validate($data, 'app\validate\zhjw_students_survey\ZhjwStudentsSurvey.edit'); |
||||
|
(new ZhjwStudentsSurveyService())->edit($id, $data); |
||||
|
return success('EDIT_SUCCESS'); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 学员体测删除 |
||||
|
* @param $id 学员体测id |
||||
|
* @return \think\Response |
||||
|
*/ |
||||
|
public function del(int $id){ |
||||
|
(new ZhjwStudentsSurveyService())->del($id); |
||||
|
return success('DELETE_SUCCESS'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function getStudentsAll(){ |
||||
|
return success(( new ZhjwStudentsSurveyService())->getStudentsAll()); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,39 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
use think\facade\Route; |
||||
|
|
||||
|
use app\adminapi\middleware\AdminCheckRole; |
||||
|
use app\adminapi\middleware\AdminCheckToken; |
||||
|
use app\adminapi\middleware\AdminLog; |
||||
|
// USER_CODE_BEGIN -- zhjw_students_survey |
||||
|
|
||||
|
Route::group('zhjw_students_survey', function () { |
||||
|
|
||||
|
//学员体测列表 |
||||
|
Route::get('zhjw_students_survey', 'zhjw_students_survey.ZhjwStudentsSurvey/lists'); |
||||
|
//学员体测详情 |
||||
|
Route::get('zhjw_students_survey/:id', 'zhjw_students_survey.ZhjwStudentsSurvey/info'); |
||||
|
//添加学员体测 |
||||
|
Route::post('zhjw_students_survey', 'zhjw_students_survey.ZhjwStudentsSurvey/add'); |
||||
|
//编辑学员体测 |
||||
|
Route::put('zhjw_students_survey/:id', 'zhjw_students_survey.ZhjwStudentsSurvey/edit'); |
||||
|
//删除学员体测 |
||||
|
Route::delete('zhjw_students_survey/:id', 'zhjw_students_survey.ZhjwStudentsSurvey/del'); |
||||
|
|
||||
|
Route::get('students_all','zhjw_students_survey.ZhjwStudentsSurvey/getStudentsAll'); |
||||
|
|
||||
|
})->middleware([ |
||||
|
AdminCheckToken::class, |
||||
|
AdminCheckRole::class, |
||||
|
AdminLog::class |
||||
|
]); |
||||
|
// USER_CODE_END -- zhjw_students_survey |
||||
@ -0,0 +1,104 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace app\model\zhjw_students_survey; |
||||
|
|
||||
|
use core\base\BaseModel; |
||||
|
use think\model\concern\SoftDelete; |
||||
|
use think\model\relation\HasMany; |
||||
|
use think\model\relation\HasOne; |
||||
|
|
||||
|
use addon\zhjw\app\model\students\Students; |
||||
|
|
||||
|
/** |
||||
|
* 学员体测模型 |
||||
|
* Class ZhjwStudentsSurvey |
||||
|
* @package app\model\zhjw_students_survey |
||||
|
*/ |
||||
|
class ZhjwStudentsSurvey extends BaseModel |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 数据表主键 |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $pk = 'id'; |
||||
|
|
||||
|
/** |
||||
|
* 模型名称 |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $name = 'zhjw_students_survey'; |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学员体测学员 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchStudentsIdAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("students_id", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学员体测身高 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchHeightAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("height", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学员体测体重 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchWeightAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("weight", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:学员体测更新时间 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchUpdateTimeAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("update_time", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
public function students(){ |
||||
|
return $this->hasOne(Students::class, 'id', 'students_id')->joinType('left')->withField('name,id')->bind(['students_id_name'=>'name']); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,105 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace app\service\admin\zhjw_students_survey; |
||||
|
|
||||
|
use app\model\zhjw_students_survey\ZhjwStudentsSurvey; |
||||
|
use addon\zhjw\app\model\students\Students; |
||||
|
|
||||
|
use core\base\BaseAdminService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 学员体测服务层 |
||||
|
* Class ZhjwStudentsSurveyService |
||||
|
* @package app\service\admin\zhjw_students_survey |
||||
|
*/ |
||||
|
class ZhjwStudentsSurveyService extends BaseAdminService |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
parent::__construct(); |
||||
|
$this->model = new ZhjwStudentsSurvey(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取学员体测列表 |
||||
|
* @param array $where |
||||
|
* @return array |
||||
|
*/ |
||||
|
public function getPage(array $where = []) |
||||
|
{ |
||||
|
$field = 'id,students_id,height,weight,score,content,create_time,update_time,is_deleted,created_by,created_role,updated_by,updated_role'; |
||||
|
$order = ''; |
||||
|
|
||||
|
$search_model = $this->model->withSearch(["students_id","height","weight","update_time"], $where)->with(['students'])->field($field)->order($order); |
||||
|
$list = $this->pageQuery($search_model); |
||||
|
return $list; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取学员体测信息 |
||||
|
* @param int $id |
||||
|
* @return array |
||||
|
*/ |
||||
|
public function getInfo(int $id) |
||||
|
{ |
||||
|
$field = 'id,students_id,height,weight,score,content,create_time,update_time,is_deleted,created_by,created_role,updated_by,updated_role'; |
||||
|
|
||||
|
$info = $this->model->field($field)->where([['id', "=", $id]])->with(['students'])->findOrEmpty()->toArray(); |
||||
|
return $info; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加学员体测 |
||||
|
* @param array $data |
||||
|
* @return mixed |
||||
|
*/ |
||||
|
public function add(array $data) |
||||
|
{ |
||||
|
$res = $this->model->create($data); |
||||
|
return $res->id; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 学员体测编辑 |
||||
|
* @param int $id |
||||
|
* @param array $data |
||||
|
* @return bool |
||||
|
*/ |
||||
|
public function edit(int $id, array $data) |
||||
|
{ |
||||
|
|
||||
|
$this->model->where([['id', '=', $id]])->update($data); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除学员体测 |
||||
|
* @param int $id |
||||
|
* @return bool |
||||
|
*/ |
||||
|
public function del(int $id) |
||||
|
{ |
||||
|
$model = $this->model->where([['id', '=', $id]])->find(); |
||||
|
$res = $model->delete(); |
||||
|
return $res; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function getStudentsAll(){ |
||||
|
$studentsModel = new Students(); |
||||
|
return $studentsModel->select()->toArray(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,41 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace app\validate\zhjw_students_survey; |
||||
|
use core\base\BaseValidate; |
||||
|
/** |
||||
|
* 学员体测验证器 |
||||
|
* Class ZhjwStudentsSurvey |
||||
|
* @package addon\app\validate\zhjw_students_survey |
||||
|
*/ |
||||
|
class ZhjwStudentsSurvey extends BaseValidate |
||||
|
{ |
||||
|
|
||||
|
protected $rule = [ |
||||
|
'students_id' => 'require', |
||||
|
'height' => 'require', |
||||
|
'weight' => 'require', |
||||
|
'content' => 'require', |
||||
|
]; |
||||
|
|
||||
|
protected $message = [ |
||||
|
'students_id.require' => ['common_validate.require', ['students_id']], |
||||
|
'height.require' => ['common_validate.require', ['height']], |
||||
|
'weight.require' => ['common_validate.require', ['weight']], |
||||
|
'content.require' => ['common_validate.require', ['content']], |
||||
|
]; |
||||
|
|
||||
|
protected $scene = [ |
||||
|
"add" => ['students_id', 'height', 'weight', 'content'], |
||||
|
"edit" => ['students_id', 'height', 'weight', 'content'] |
||||
|
]; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1 @@ |
|||||
|
import{d as l,r as d,o as i,c as p,a as t,b as u,e as m,w as x,u as v,f,E as h,p as b,g,h as I,i as w,t as S}from"./index-35ab0ec6.js";/* empty css */import{_ as B}from"./_plugin-vue_export-helper-c27b6911.js";const k=""+new URL("error-ab7e4004.png",import.meta.url).href,o=e=>(b("data-v-4f4088b5"),e=e(),g(),e),y={class:"error"},C={class:"flex items-center"},E=o(()=>t("div",null,[t("img",{class:"w-[240px]",src:k})],-1)),N={class:"text-left ml-[100px]"},R=o(()=>t("div",{class:"error-text text-[28px] font-bold"},"404错误!",-1)),U=o(()=>t("div",{class:"text-[#222] text-[20px] mt-[15px]"},"哎呀,出错了!您访问的页面不存在...",-1)),V=o(()=>t("div",{class:"text-[#c4c2c2] text-[12px] mt-[5px]"},"尝试检查URL的错误,然后点击浏览器刷新按钮。",-1)),L={class:"mt-[40px]"},$=l({__name:"404",setup(e){let s=null;const a=d(5),n=f();return s=setInterval(()=>{a.value===0?(clearInterval(s),n.go(-1)):a.value--},1e3),i(()=>{s&&clearInterval(s)}),(r,c)=>{const _=h;return I(),p("div",y,[t("div",C,[u(r.$slots,"content",{},()=>[E],!0),t("div",N,[R,U,V,t("div",L,[m(_,{class:"bottom",onClick:c[0]||(c[0]=D=>v(n).go(-1))},{default:x(()=>[w(S(a.value)+" 秒后返回上一页",1)]),_:1})])])])])}}});const z=B($,[["__scopeId","data-v-4f4088b5"]]);export{z as default}; |
||||
@ -1 +0,0 @@ |
|||||
import{d as l,r as d,o as i,c as p,a as t,b as u,e as m,w as x,u as v,f,E as h,p as b,g,h as I,i as w,t as S}from"./index-b867c57c.js";/* empty css */import{_ as B}from"./_plugin-vue_export-helper-c27b6911.js";const k=""+new URL("error-ab7e4004.png",import.meta.url).href,o=e=>(b("data-v-4f4088b5"),e=e(),g(),e),y={class:"error"},C={class:"flex items-center"},E=o(()=>t("div",null,[t("img",{class:"w-[240px]",src:k})],-1)),N={class:"text-left ml-[100px]"},R=o(()=>t("div",{class:"error-text text-[28px] font-bold"},"404错误!",-1)),U=o(()=>t("div",{class:"text-[#222] text-[20px] mt-[15px]"},"哎呀,出错了!您访问的页面不存在...",-1)),V=o(()=>t("div",{class:"text-[#c4c2c2] text-[12px] mt-[5px]"},"尝试检查URL的错误,然后点击浏览器刷新按钮。",-1)),L={class:"mt-[40px]"},$=l({__name:"404",setup(e){let s=null;const a=d(5),n=f();return s=setInterval(()=>{a.value===0?(clearInterval(s),n.go(-1)):a.value--},1e3),i(()=>{s&&clearInterval(s)}),(r,c)=>{const _=h;return I(),p("div",y,[t("div",C,[u(r.$slots,"content",{},()=>[E],!0),t("div",N,[R,U,V,t("div",L,[m(_,{class:"bottom",onClick:c[0]||(c[0]=D=>v(n).go(-1))},{default:x(()=>[w(S(a.value)+" 秒后返回上一页",1)]),_:1})])])])])}}});const z=B($,[["__scopeId","data-v-4f4088b5"]]);export{z as default}; |
|
||||
@ -1 +0,0 @@ |
|||||
import{c4 as f}from"./index-b867c57c.js";export{f as default}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{c4 as f}from"./index-35ab0ec6.js";export{f as default}; |
||||
@ -1 +0,0 @@ |
|||||
import z from"./VerifySlide-16447821.js";import g from"./VerifyPoints-5464424a.js";import{aA as k,r as o,M as w,aB as B,J as T,a9 as V,h as p,c as u,a as c,i as N,B as y,aC as d,m as C,aD as j,n as v}from"./index-b867c57c.js";import{_ as D}from"./_plugin-vue_export-helper-c27b6911.js";import"./index-3f35b10e.js";const O={name:"Vue2Verify",components:{VerifySlide:z,VerifyPoints:g},props:{captchaType:{type:String,required:!0},figure:{type:Number},arith:{type:Number},mode:{type:String,default:"pop"},vSpace:{type:Number},explain:{type:String},imgSize:{type:Object,default(){return{width:"310px",height:"155px"}}},blockSize:{type:Object},barSize:{type:Object}},setup(m){const{captchaType:a,figure:e,arith:t,mode:n,vSpace:h,explain:f,imgSize:I,blockSize:J,barSize:M}=k(m),i=o(!1),r=o(void 0),s=o(void 0),l=o({}),S=w(()=>n.value=="pop"?i.value:!0),b=()=>{l.value.refresh&&l.value.refresh()},x=()=>{i.value=!1,b()},_=()=>{n.value=="pop"&&(i.value=!0)};return B(()=>{switch(a.value){case"blockPuzzle":r.value="2",s.value="VerifySlide";break;case"clickWord":r.value="",s.value="VerifyPoints";break}}),{clickShow:i,verifyType:r,componentType:s,instance:l,showBox:S,closeBox:x,show:_}}},P={key:0,class:"verifybox-top"},E=c("i",{class:"iconfont icon-close"},null,-1),q=[E];function A(m,a,e,t,n,h){return T((p(),u("div",{class:v(e.mode=="pop"?"mask":"")},[c("div",{class:v(e.mode=="pop"?"verifybox":""),style:d({"max-width":parseInt(e.imgSize.width)+30+"px"})},[e.mode=="pop"?(p(),u("div",P,[N(" 请完成安全验证 "),c("span",{class:"verifybox-close",onClick:a[0]||(a[0]=(...f)=>t.closeBox&&t.closeBox(...f))},q)])):y("",!0),c("div",{class:"verifybox-bottom",style:d({padding:e.mode=="pop"?"15px":"0"})},[t.componentType?(p(),C(j(t.componentType),{key:0,captchaType:e.captchaType,type:t.verifyType,figure:e.figure,arith:e.arith,mode:e.mode,vSpace:e.vSpace,explain:e.explain,imgSize:e.imgSize,blockSize:e.blockSize,barSize:e.barSize,ref:"instance"},null,8,["captchaType","type","figure","arith","mode","vSpace","explain","imgSize","blockSize","barSize"])):y("",!0)],4)],6)],2)),[[V,t.showBox]])}const K=D(O,[["render",A]]);export{K as default}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import z from"./VerifySlide-687de582.js";import g from"./VerifyPoints-bf8125fe.js";import{aA as k,r as o,M as w,aB as B,J as T,a9 as V,h as p,c as u,a as c,i as N,B as y,aC as d,m as C,aD as j,n as v}from"./index-35ab0ec6.js";import{_ as D}from"./_plugin-vue_export-helper-c27b6911.js";import"./index-a9e87fc3.js";const O={name:"Vue2Verify",components:{VerifySlide:z,VerifyPoints:g},props:{captchaType:{type:String,required:!0},figure:{type:Number},arith:{type:Number},mode:{type:String,default:"pop"},vSpace:{type:Number},explain:{type:String},imgSize:{type:Object,default(){return{width:"310px",height:"155px"}}},blockSize:{type:Object},barSize:{type:Object}},setup(m){const{captchaType:a,figure:e,arith:t,mode:n,vSpace:h,explain:f,imgSize:I,blockSize:J,barSize:M}=k(m),i=o(!1),r=o(void 0),s=o(void 0),l=o({}),S=w(()=>n.value=="pop"?i.value:!0),b=()=>{l.value.refresh&&l.value.refresh()},x=()=>{i.value=!1,b()},_=()=>{n.value=="pop"&&(i.value=!0)};return B(()=>{switch(a.value){case"blockPuzzle":r.value="2",s.value="VerifySlide";break;case"clickWord":r.value="",s.value="VerifyPoints";break}}),{clickShow:i,verifyType:r,componentType:s,instance:l,showBox:S,closeBox:x,show:_}}},P={key:0,class:"verifybox-top"},E=c("i",{class:"iconfont icon-close"},null,-1),q=[E];function A(m,a,e,t,n,h){return T((p(),u("div",{class:v(e.mode=="pop"?"mask":"")},[c("div",{class:v(e.mode=="pop"?"verifybox":""),style:d({"max-width":parseInt(e.imgSize.width)+30+"px"})},[e.mode=="pop"?(p(),u("div",P,[N(" 请完成安全验证 "),c("span",{class:"verifybox-close",onClick:a[0]||(a[0]=(...f)=>t.closeBox&&t.closeBox(...f))},q)])):y("",!0),c("div",{class:"verifybox-bottom",style:d({padding:e.mode=="pop"?"15px":"0"})},[t.componentType?(p(),C(j(t.componentType),{key:0,captchaType:e.captchaType,type:t.verifyType,figure:e.figure,arith:e.arith,mode:e.mode,vSpace:e.vSpace,explain:e.explain,imgSize:e.imgSize,blockSize:e.blockSize,barSize:e.barSize,ref:"instance"},null,8,["captchaType","type","figure","arith","mode","vSpace","explain","imgSize","blockSize","barSize"])):y("",!0)],4)],6)],2)),[[V,t.showBox]])}const K=D(O,[["render",A]]);export{K as default}; |
||||
@ -1 +0,0 @@ |
|||||
import{r as E,a as V,b as G,c as K}from"./index-3f35b10e.js";import{aA as X,r as s,l as m,am as Y,h as H,c as A,a as l,aC as I,J as Q,a9 as U,F as Z,O as $,t as F,aF as ee,aG as te}from"./index-b867c57c.js";import{_ as ae}from"./_plugin-vue_export-helper-c27b6911.js";const ie={name:"VerifyPoints",props:{mode:{type:String,default:"fixed"},captchaType:{type:String},vSpace:{type:Number,default:5},imgSize:{type:Object,default(){return{width:"310px",height:"155px"}}},barSize:{type:Object,default(){return{width:"310px",height:"40px"}}}},setup(O,f){const{mode:_,captchaType:e,vSpace:L,imgSize:R,barSize:c}=X(O),{proxy:n}=ee(),h=s(""),z=s(3),p=m([]),a=m([]),o=s(1),N=s(""),w=m([]),v=s(""),u=m({imgHeight:0,imgWidth:0,barHeight:0,barWidth:0}),y=m([]),d=s(""),b=s(void 0),x=s(void 0),j=s(!0),C=s(!0),J=()=>{p.splice(0,p.length),a.splice(0,a.length),o.value=1,P(),te(()=>{const{imgHeight:i,imgWidth:t,barHeight:g,barWidth:r}=E(n);u.imgHeight=i,u.imgWidth=t,u.barHeight=g,u.barWidth=r,n.$parent.$emit("ready",n)})};Y(()=>{J(),n.$el.onselectstart=function(){return!1}});const S=s(null),q=i=>{if(a.push(k(S,i)),o.value==z.value){o.value=T(k(S,i));const t=M(a,u);a.length=0,a.push(...t),setTimeout(()=>{const g=h.value?V(v.value+"---"+JSON.stringify(a),h.value):v.value+"---"+JSON.stringify(a),r={captchaType:e.value,captcha_code:h.value?V(JSON.stringify(a),h.value):JSON.stringify(a),captcha_key:v.value};G(r).then(W=>{W.code==1?(b.value="#4cae4c",x.value="#5cb85c",d.value="验证成功",C.value=!1,_.value=="pop"&&setTimeout(()=>{n.$parent.clickShow=!1,B()},1500),n.$parent.$emit("success",{captchaVerification:g})):(n.$parent.$emit("error",n),b.value="#d9534f",x.value="#d9534f",d.value="验证失败",setTimeout(()=>{B()},700))})},400)}o.value<z.value&&(o.value=T(k(S,i)))},k=function(i,t){const g=t.offsetX,r=t.offsetY;return{x:g,y:r}},T=function(i){return y.push(Object.assign({},i)),o.value+1},B=function(){y.splice(0,y.length),b.value="#000",x.value="#ddd",C.value=!0,p.splice(0,p.length),a.splice(0,a.length),o.value=1,P(),d.value="验证失败",j.value=!0};function P(){const i={captchaType:e.value};K(i).then(t=>{t.code==1?(N.value=t.data.originalImageBase64,v.value=t.data.token,h.value=t.data.secretKey,w.value=t.data.wordList,d.value="请依次点击【"+w.value.join(",")+"】"):d.value=t.msg})}const M=function(i,t){return i.map(r=>{const W=Math.round(310*r.x/parseInt(t.imgWidth)),D=Math.round(155*r.y/parseInt(t.imgHeight));return{x:W,y:D}})};return{secretKey:h,checkNum:z,fontPos:p,checkPosArr:a,num:o,pointBackImgBase:N,pointTextList:w,backToken:v,setSize:u,tempPoints:y,text:d,barAreaColor:b,barAreaBorderColor:x,showRefresh:j,bindingClick:C,init:J,canvas:S,canvasClick:q,getMousePos:k,createPoint:T,refresh:B,getPictrue:P,pointTransfrom:M}}},ne={style:{position:"relative"}},se={class:"verify-img-out"},oe=l("i",{class:"iconfont icon-refresh"},null,-1),re=[oe],ce=["src"],le={class:"verify-msg"};function he(O,f,_,e,L,R){return H(),A("div",ne,[l("div",se,[l("div",{class:"verify-img-panel",style:I({width:e.setSize.imgWidth,height:e.setSize.imgHeight,"background-size":e.setSize.imgWidth+" "+e.setSize.imgHeight,"margin-bottom":_.vSpace+"px"})},[Q(l("div",{class:"verify-refresh",style:{"z-index":"3"},onClick:f[0]||(f[0]=(...c)=>e.refresh&&e.refresh(...c))},re,512),[[U,e.showRefresh]]),l("img",{src:"data:image/png;base64,"+e.pointBackImgBase,ref:"canvas",alt:"",style:{width:"100%",height:"100%",display:"block"},onClick:f[1]||(f[1]=c=>e.bindingClick?e.canvasClick(c):void 0)},null,8,ce),(H(!0),A(Z,null,$(e.tempPoints,(c,n)=>(H(),A("div",{key:n,class:"point-area",style:I({"background-color":"#1abd6c",color:"#fff","z-index":9999,width:"20px",height:"20px","text-align":"center","line-height":"20px","border-radius":"50%",position:"absolute",top:parseInt(c.y-10)+"px",left:parseInt(c.x-10)+"px"})},F(n+1),5))),128))],4)]),l("div",{class:"verify-bar-area",style:I({width:e.setSize.imgWidth,color:this.barAreaColor,"border-color":this.barAreaBorderColor,"line-height":this.barSize.height})},[l("span",le,F(e.text),1)],4)])}const fe=ae(ie,[["render",he]]);export{fe as default}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{r as E,a as V,b as G,c as K}from"./index-a9e87fc3.js";import{aA as X,r as s,l as m,am as Y,h as H,c as A,a as l,aC as I,J as Q,a9 as U,F as Z,O as $,t as F,aF as ee,aG as te}from"./index-35ab0ec6.js";import{_ as ae}from"./_plugin-vue_export-helper-c27b6911.js";const ie={name:"VerifyPoints",props:{mode:{type:String,default:"fixed"},captchaType:{type:String},vSpace:{type:Number,default:5},imgSize:{type:Object,default(){return{width:"310px",height:"155px"}}},barSize:{type:Object,default(){return{width:"310px",height:"40px"}}}},setup(O,f){const{mode:_,captchaType:e,vSpace:L,imgSize:R,barSize:c}=X(O),{proxy:n}=ee(),h=s(""),z=s(3),p=m([]),a=m([]),o=s(1),N=s(""),w=m([]),v=s(""),u=m({imgHeight:0,imgWidth:0,barHeight:0,barWidth:0}),y=m([]),d=s(""),b=s(void 0),x=s(void 0),j=s(!0),C=s(!0),J=()=>{p.splice(0,p.length),a.splice(0,a.length),o.value=1,P(),te(()=>{const{imgHeight:i,imgWidth:t,barHeight:g,barWidth:r}=E(n);u.imgHeight=i,u.imgWidth=t,u.barHeight=g,u.barWidth=r,n.$parent.$emit("ready",n)})};Y(()=>{J(),n.$el.onselectstart=function(){return!1}});const S=s(null),q=i=>{if(a.push(k(S,i)),o.value==z.value){o.value=T(k(S,i));const t=M(a,u);a.length=0,a.push(...t),setTimeout(()=>{const g=h.value?V(v.value+"---"+JSON.stringify(a),h.value):v.value+"---"+JSON.stringify(a),r={captchaType:e.value,captcha_code:h.value?V(JSON.stringify(a),h.value):JSON.stringify(a),captcha_key:v.value};G(r).then(W=>{W.code==1?(b.value="#4cae4c",x.value="#5cb85c",d.value="验证成功",C.value=!1,_.value=="pop"&&setTimeout(()=>{n.$parent.clickShow=!1,B()},1500),n.$parent.$emit("success",{captchaVerification:g})):(n.$parent.$emit("error",n),b.value="#d9534f",x.value="#d9534f",d.value="验证失败",setTimeout(()=>{B()},700))})},400)}o.value<z.value&&(o.value=T(k(S,i)))},k=function(i,t){const g=t.offsetX,r=t.offsetY;return{x:g,y:r}},T=function(i){return y.push(Object.assign({},i)),o.value+1},B=function(){y.splice(0,y.length),b.value="#000",x.value="#ddd",C.value=!0,p.splice(0,p.length),a.splice(0,a.length),o.value=1,P(),d.value="验证失败",j.value=!0};function P(){const i={captchaType:e.value};K(i).then(t=>{t.code==1?(N.value=t.data.originalImageBase64,v.value=t.data.token,h.value=t.data.secretKey,w.value=t.data.wordList,d.value="请依次点击【"+w.value.join(",")+"】"):d.value=t.msg})}const M=function(i,t){return i.map(r=>{const W=Math.round(310*r.x/parseInt(t.imgWidth)),D=Math.round(155*r.y/parseInt(t.imgHeight));return{x:W,y:D}})};return{secretKey:h,checkNum:z,fontPos:p,checkPosArr:a,num:o,pointBackImgBase:N,pointTextList:w,backToken:v,setSize:u,tempPoints:y,text:d,barAreaColor:b,barAreaBorderColor:x,showRefresh:j,bindingClick:C,init:J,canvas:S,canvasClick:q,getMousePos:k,createPoint:T,refresh:B,getPictrue:P,pointTransfrom:M}}},ne={style:{position:"relative"}},se={class:"verify-img-out"},oe=l("i",{class:"iconfont icon-refresh"},null,-1),re=[oe],ce=["src"],le={class:"verify-msg"};function he(O,f,_,e,L,R){return H(),A("div",ne,[l("div",se,[l("div",{class:"verify-img-panel",style:I({width:e.setSize.imgWidth,height:e.setSize.imgHeight,"background-size":e.setSize.imgWidth+" "+e.setSize.imgHeight,"margin-bottom":_.vSpace+"px"})},[Q(l("div",{class:"verify-refresh",style:{"z-index":"3"},onClick:f[0]||(f[0]=(...c)=>e.refresh&&e.refresh(...c))},re,512),[[U,e.showRefresh]]),l("img",{src:"data:image/png;base64,"+e.pointBackImgBase,ref:"canvas",alt:"",style:{width:"100%",height:"100%",display:"block"},onClick:f[1]||(f[1]=c=>e.bindingClick?e.canvasClick(c):void 0)},null,8,ce),(H(!0),A(Z,null,$(e.tempPoints,(c,n)=>(H(),A("div",{key:n,class:"point-area",style:I({"background-color":"#1abd6c",color:"#fff","z-index":9999,width:"20px",height:"20px","text-align":"center","line-height":"20px","border-radius":"50%",position:"absolute",top:parseInt(c.y-10)+"px",left:parseInt(c.x-10)+"px"})},F(n+1),5))),128))],4)]),l("div",{class:"verify-bar-area",style:I({width:e.setSize.imgWidth,color:this.barAreaColor,"border-color":this.barAreaBorderColor,"line-height":this.barSize.height})},[l("span",le,F(e.text),1)],4)])}const fe=ae(ie,[["render",he]]);export{fe as default}; |
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@ |
|||||
|
import{d as q,v as N,f as T,r as i,am as B,o as j,h as R,c as $,e as s,w as n,a as t,t as o,u as e,k as a,i as x,z as I,a7 as M,a8 as U,E as W,an as z,ao as D,ap as F,C as G,aq as K,K as L}from"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as P}from"./wechat-d900d916.js";const Q={class:"main-container"},H={class:"flex justify-between items-center"},J={class:"text-page-title"},O={class:"p-[20px]"},X={class:"panel-title !text-sm"},Y={class:"text-[14px] font-[700]"},Z={class:"text-[#999]"},ee={class:"mt-[20px] mb-[40px] h-[32px]"},te={class:"text-[14px] font-[700]"},se={class:"text-[#999]"},ae={class:"mt-[20px] mb-[40px] h-[32px]"},ne={class:"text-[14px] font-[700]"},oe={class:"text-[#999]"},le={class:"mt-[20px] mb-[40px] h-[32px]"},ce={class:"flex justify-center"},ie={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},pe={class:"mt-[22px] text-center"},_e={class:"text-[12px]"},ge=q({__name:"access",setup(re){const w=N(),m=T(),v=w.meta.title,d=i("/channel/wechat");i(2);const p=i(""),b=i({});i({});const g=async()=>{await P().then(({data:c})=>{b.value=c,p.value=c.qr_code})};B(async()=>{g()}),j(()=>{document.removeEventListener("visibilitychange",()=>{})});const y=c=>{window.open(c,"_blank")},C=c=>{m.push({path:d.value})};return(c,l)=>{const _=M,E=U,u=W,h=z,k=D,f=F,A=G,S=K,V=L;return R(),$("div",Q,[s(V,{class:"card !border-none",shadow:"never"},{default:n(()=>[t("div",H,[t("span",J,o(e(v)),1)]),s(E,{modelValue:d.value,"onUpdate:modelValue":l[0]||(l[0]=r=>d.value=r),class:"my-[20px]",onTabChange:C},{default:n(()=>[s(_,{label:e(a)("wechatAccessFlow"),name:"/channel/wechat"},null,8,["label"]),s(_,{label:e(a)("customMenu"),name:"/channel/wechat/menu"},null,8,["label"]),s(_,{label:e(a)("wechatTemplate"),name:"/channel/wechat/message"},null,8,["label"]),s(_,{label:e(a)("reply"),name:"/channel/wechat/reply"},null,8,["label"])]),_:1},8,["modelValue"]),t("div",O,[t("h3",X,o(e(a)("wechatInlet")),1),s(S,null,{default:n(()=>[s(f,{span:20},{default:n(()=>[s(k,{class:"!mt-[10px]",active:3,direction:"vertical"},{default:n(()=>[s(h,null,{title:n(()=>[t("p",Y,o(e(a)("wechatAttestation")),1)]),description:n(()=>[t("span",Z,o(e(a)("wechatAttestation1")),1),t("div",ee,[s(u,{type:"primary",onClick:l[1]||(l[1]=r=>y("https://mp.weixin.qq.com/"))},{default:n(()=>[x(o(e(a)("clickAccess")),1)]),_:1})])]),_:1}),s(h,null,{title:n(()=>[t("p",te,o(e(a)("wechatSetting")),1)]),description:n(()=>[t("span",se,o(e(a)("wechatSetting1")),1),t("div",ae,[s(u,{type:"primary",onClick:l[2]||(l[2]=r=>e(m).push("/channel/wechat/config"))},{default:n(()=>[x(o(e(a)("clickSetting")),1)]),_:1})])]),_:1}),s(h,null,{title:n(()=>[t("p",ne,o(e(a)("wechatAccess")),1)]),description:n(()=>[t("span",oe,o(e(a)("wechatAccess")),1),t("div",le,[s(u,{type:"primary",plain:"",onClick:l[3]||(l[3]=r=>e(m).push("/channel/wechat/course"))},{default:n(()=>[x(o(e(a)("releaseCourse")),1)]),_:1})])]),_:1})]),_:1})]),_:1}),s(f,{span:4},{default:n(()=>[t("div",ce,[s(A,{class:"w-[180px] h-[180px]",src:p.value?e(I)(p.value):""},{error:n(()=>[t("div",ie,[t("span",null,o(p.value?e(a)("fileErr"):e(a)("emptyQrCode")),1)])]),_:1},8,["src"])]),t("div",pe,[t("p",_e,o(e(a)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{ge as default}; |
||||
@ -1 +0,0 @@ |
|||||
import{d as V,v as B,f as N,r as d,am as S,h as T,c as j,e as o,w as s,a as t,t as n,u as e,k as a,i as h,z as q,a7 as R,a8 as I,E as $,an as z,ao as D,ap as F,C as K,aq as M,K as P}from"./index-b867c57c.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as Q}from"./aliapp-ad242f3d.js";const U={class:"main-container"},G={class:"flex justify-between items-center"},H={class:"text-page-title"},J={class:"p-[20px]"},L={class:"panel-title !text-sm"},O={class:"text-[14px] font-[700]"},W={class:"text-[#999]"},X={class:"mt-[20px] mb-[40px] h-[32px]"},Y={class:"text-[14px] font-[700]"},Z={class:"text-[#999]"},tt={class:"mt-[20px] mb-[40px] h-[32px]"},et={class:"text-[14px] font-[700]"},st={class:"text-[#999]"},at=t("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1),ot={class:"text-[14px] font-[700]"},nt={class:"text-[#999]"},lt={class:"flex justify-center"},ct={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},pt={class:"mt-[22px] text-center"},it={class:"text-[12px]"},bt=V({__name:"access",setup(_t){const f=B(),m=N(),v=f.meta.title,_=d("/channel/aliapp");d(2);const p=d("");S(async()=>{const c=await Q();p.value=c.data.qr_code});const w=c=>{window.open(c,"_blank")},b=c=>{m.push({path:_.value})};return(c,l)=>{const g=R,C=I,u=$,i=z,E=D,x=F,y=K,k=M,A=P;return T(),j("div",U,[o(A,{class:"card !border-none",shadow:"never"},{default:s(()=>[t("div",G,[t("span",H,n(e(v)),1)]),o(C,{modelValue:_.value,"onUpdate:modelValue":l[0]||(l[0]=r=>_.value=r),class:"my-[20px]",onTabChange:b},{default:s(()=>[o(g,{label:e(a)("weappAccessFlow"),name:"/channel/aliapp"},null,8,["label"])]),_:1},8,["modelValue"]),t("div",J,[t("h3",L,n(e(a)("weappInlet")),1),o(k,null,{default:s(()=>[o(x,{span:20},{default:s(()=>[o(E,{active:4,direction:"vertical"},{default:s(()=>[o(i,null,{title:s(()=>[t("p",O,n(e(a)("weappAttestation")),1)]),description:s(()=>[t("span",W,n(e(a)("weappAttest")),1),t("div",X,[o(u,{type:"primary",onClick:l[1]||(l[1]=r=>w("https://open.alipay.com/develop/manage"))},{default:s(()=>[h(n(e(a)("clickAccess")),1)]),_:1})])]),_:1}),o(i,null,{title:s(()=>[t("p",Y,n(e(a)("weappSetting")),1)]),description:s(()=>[t("span",Z,n(e(a)("emplace")),1),t("div",tt,[o(u,{type:"primary",plain:"",onClick:l[2]||(l[2]=r=>e(m).push("/channel/aliapp/config"))},{default:s(()=>[h(n(e(a)("weappSettingBtn")),1)]),_:1})])]),_:1}),o(i,null,{title:s(()=>[t("p",et,n(e(a)("uploadVersion")),1)]),description:s(()=>[t("span",st,n(e(a)("releaseCourse")),1),at]),_:1}),o(i,null,{title:s(()=>[t("p",ot,n(e(a)("completeAccess")),1)]),description:s(()=>[t("span",nt,n(e(a)("releaseCourse")),1)]),_:1})]),_:1})]),_:1}),o(x,{span:4},{default:s(()=>[t("div",lt,[o(y,{class:"w-[180px] h-[180px]",src:p.value?e(q)(p.value):""},{error:s(()=>[t("div",ct,[t("span",null,n(p.value?e(a)("fileErr"):e(a)("emptyQrCode")),1)])]),_:1},8,["src"])]),t("div",pt,[t("p",it,n(e(a)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{bt as default}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{d as q,v as B,f as N,r as m,am as R,o as T,h as $,c as j,e as n,w as s,a as t,t as o,u as e,k as a,i as u,z as I,a7 as M,a8 as U,E as W,an as z,ao as D,ap as F,C as G,aq as K,K as L}from"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as P}from"./weapp-bdffa8fa.js";const Q={class:"main-container"},H={class:"flex justify-between items-center"},J={class:"text-page-title"},O={class:"p-[20px]"},X={class:"panel-title !text-sm"},Y={class:"text-[14px] font-[700]"},Z={class:"text-[#999]"},ee={class:"mt-[20px] mb-[40px] h-[32px]"},te={class:"text-[14px] font-[700]"},se={class:"text-[#999]"},ne={class:"mt-[20px] mb-[40px] h-[32px]"},ae={class:"text-[14px] font-[700]"},oe={class:"text-[#999]"},le={class:"mt-[20px] mb-[40px] h-[32px]"},pe={class:"text-[14px] font-[700]"},ce={class:"text-[#999]"},ie=t("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1),_e={class:"flex justify-center"},re={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},de={class:"mt-[22px] text-center"},me={class:"text-[12px]"},Ee=q({__name:"access",setup(ue){const v=B(),i=N(),w=v.meta.title,x=m("/channel/weapp");m(2);const _=m(""),b=m({}),g=async()=>{await P().then(({data:p})=>{b.value=p,_.value=p.qr_code})};R(async()=>{g()}),T(()=>{document.removeEventListener("visibilitychange",()=>{})});const C=p=>{window.open(p,"_blank")},y=p=>{i.push({path:x.value})};return(p,l)=>{const h=M,E=U,r=W,d=z,k=D,f=F,V=G,A=K,S=L;return $(),j("div",Q,[n(S,{class:"card !border-none",shadow:"never"},{default:s(()=>[t("div",H,[t("span",J,o(e(w)),1)]),n(E,{modelValue:x.value,"onUpdate:modelValue":l[0]||(l[0]=c=>x.value=c),class:"mt-[20px]",onTabChange:y},{default:s(()=>[n(h,{label:e(a)("weappAccessFlow"),name:"/channel/weapp"},null,8,["label"]),n(h,{label:e(a)("subscribeMessage"),name:"/channel/weapp/message"},null,8,["label"]),n(h,{label:e(a)("weappRelease"),name:"/channel/weapp/code"},null,8,["label"])]),_:1},8,["modelValue"]),t("div",O,[t("h3",X,o(e(a)("weappInlet")),1),n(A,null,{default:s(()=>[n(f,{span:20},{default:s(()=>[n(k,{class:"!mt-[10px]",active:4,direction:"vertical"},{default:s(()=>[n(d,null,{title:s(()=>[t("p",Y,o(e(a)("weappAttestation")),1)]),description:s(()=>[t("span",Z,o(e(a)("weappAttest")),1),t("div",ee,[n(r,{type:"primary",onClick:l[1]||(l[1]=c=>C("https://mp.weixin.qq.com/"))},{default:s(()=>[u(o(e(a)("clickAccess")),1)]),_:1})])]),_:1}),n(d,null,{title:s(()=>[t("p",te,o(e(a)("weappSetting")),1)]),description:s(()=>[t("span",se,o(e(a)("emplace")),1),t("div",ne,[n(r,{type:"primary",onClick:l[2]||(l[2]=c=>e(i).push("/channel/weapp/config"))},{default:s(()=>[u(o(e(a)("weappSettingBtn")),1)]),_:1}),n(r,{type:"primary",plain:"",onClick:l[3]||(l[3]=c=>e(i).push("/channel/weapp/course"))},{default:s(()=>[u("配置教程")]),_:1})])]),_:1}),n(d,null,{title:s(()=>[t("p",ae,o(e(a)("uploadVersion")),1)]),description:s(()=>[t("span",oe,o(e(a)("releaseCourse")),1),t("div",le,[n(r,{type:"primary",plain:"",onClick:l[4]||(l[4]=c=>e(i).push("/channel/weapp/code"))},{default:s(()=>[u(o(e(a)("weappRelease")),1)]),_:1})])]),_:1}),n(d,null,{title:s(()=>[t("p",pe,o(e(a)("completeAccess")),1)]),description:s(()=>[t("span",ce,o(e(a)("releaseCourse")),1),ie]),_:1})]),_:1})]),_:1}),n(f,{span:4},{default:s(()=>[t("div",_e,[n(V,{class:"w-[180px] h-[180px]",src:_.value?e(I)(_.value):""},{error:s(()=>[t("div",re,[t("span",null,o(_.value?e(a)("fileErr"):e(a)("emptyQrCode")),1)])]),_:1},8,["src"])]),t("div",de,[t("p",me,o(e(a)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{Ee as default}; |
||||
@ -1 +0,0 @@ |
|||||
import{d as q,v as B,f as N,r as m,am as R,o as T,h as $,c as j,e as n,w as s,a as t,t as o,u as e,k as a,i as u,z as I,a7 as M,a8 as U,E as W,an as z,ao as D,ap as F,C as G,aq as K,K as L}from"./index-b867c57c.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as P}from"./weapp-7dfd954f.js";const Q={class:"main-container"},H={class:"flex justify-between items-center"},J={class:"text-page-title"},O={class:"p-[20px]"},X={class:"panel-title !text-sm"},Y={class:"text-[14px] font-[700]"},Z={class:"text-[#999]"},ee={class:"mt-[20px] mb-[40px] h-[32px]"},te={class:"text-[14px] font-[700]"},se={class:"text-[#999]"},ne={class:"mt-[20px] mb-[40px] h-[32px]"},ae={class:"text-[14px] font-[700]"},oe={class:"text-[#999]"},le={class:"mt-[20px] mb-[40px] h-[32px]"},pe={class:"text-[14px] font-[700]"},ce={class:"text-[#999]"},ie=t("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1),_e={class:"flex justify-center"},re={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},de={class:"mt-[22px] text-center"},me={class:"text-[12px]"},Ee=q({__name:"access",setup(ue){const v=B(),i=N(),w=v.meta.title,x=m("/channel/weapp");m(2);const _=m(""),b=m({}),g=async()=>{await P().then(({data:p})=>{b.value=p,_.value=p.qr_code})};R(async()=>{g()}),T(()=>{document.removeEventListener("visibilitychange",()=>{})});const C=p=>{window.open(p,"_blank")},y=p=>{i.push({path:x.value})};return(p,l)=>{const h=M,E=U,r=W,d=z,k=D,f=F,V=G,A=K,S=L;return $(),j("div",Q,[n(S,{class:"card !border-none",shadow:"never"},{default:s(()=>[t("div",H,[t("span",J,o(e(w)),1)]),n(E,{modelValue:x.value,"onUpdate:modelValue":l[0]||(l[0]=c=>x.value=c),class:"mt-[20px]",onTabChange:y},{default:s(()=>[n(h,{label:e(a)("weappAccessFlow"),name:"/channel/weapp"},null,8,["label"]),n(h,{label:e(a)("subscribeMessage"),name:"/channel/weapp/message"},null,8,["label"]),n(h,{label:e(a)("weappRelease"),name:"/channel/weapp/code"},null,8,["label"])]),_:1},8,["modelValue"]),t("div",O,[t("h3",X,o(e(a)("weappInlet")),1),n(A,null,{default:s(()=>[n(f,{span:20},{default:s(()=>[n(k,{class:"!mt-[10px]",active:4,direction:"vertical"},{default:s(()=>[n(d,null,{title:s(()=>[t("p",Y,o(e(a)("weappAttestation")),1)]),description:s(()=>[t("span",Z,o(e(a)("weappAttest")),1),t("div",ee,[n(r,{type:"primary",onClick:l[1]||(l[1]=c=>C("https://mp.weixin.qq.com/"))},{default:s(()=>[u(o(e(a)("clickAccess")),1)]),_:1})])]),_:1}),n(d,null,{title:s(()=>[t("p",te,o(e(a)("weappSetting")),1)]),description:s(()=>[t("span",se,o(e(a)("emplace")),1),t("div",ne,[n(r,{type:"primary",onClick:l[2]||(l[2]=c=>e(i).push("/channel/weapp/config"))},{default:s(()=>[u(o(e(a)("weappSettingBtn")),1)]),_:1}),n(r,{type:"primary",plain:"",onClick:l[3]||(l[3]=c=>e(i).push("/channel/weapp/course"))},{default:s(()=>[u("配置教程")]),_:1})])]),_:1}),n(d,null,{title:s(()=>[t("p",ae,o(e(a)("uploadVersion")),1)]),description:s(()=>[t("span",oe,o(e(a)("releaseCourse")),1),t("div",le,[n(r,{type:"primary",plain:"",onClick:l[4]||(l[4]=c=>e(i).push("/channel/weapp/code"))},{default:s(()=>[u(o(e(a)("weappRelease")),1)]),_:1})])]),_:1}),n(d,null,{title:s(()=>[t("p",pe,o(e(a)("completeAccess")),1)]),description:s(()=>[t("span",ce,o(e(a)("releaseCourse")),1),ie]),_:1})]),_:1})]),_:1}),n(f,{span:4},{default:s(()=>[t("div",_e,[n(V,{class:"w-[180px] h-[180px]",src:_.value?e(I)(_.value):""},{error:s(()=>[t("div",re,[t("span",null,o(_.value?e(a)("fileErr"):e(a)("emptyQrCode")),1)])]),_:1},8,["src"])]),t("div",de,[t("p",me,o(e(a)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{Ee as default}; |
|
||||
@ -1 +0,0 @@ |
|||||
import{d as q,v as N,f as T,r as i,am as B,o as j,h as R,c as $,e as s,w as n,a as t,t as o,u as e,k as a,i as x,z as I,a7 as M,a8 as U,E as W,an as z,ao as D,ap as F,C as G,aq as K,K as L}from"./index-b867c57c.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as P}from"./wechat-15594faa.js";const Q={class:"main-container"},H={class:"flex justify-between items-center"},J={class:"text-page-title"},O={class:"p-[20px]"},X={class:"panel-title !text-sm"},Y={class:"text-[14px] font-[700]"},Z={class:"text-[#999]"},ee={class:"mt-[20px] mb-[40px] h-[32px]"},te={class:"text-[14px] font-[700]"},se={class:"text-[#999]"},ae={class:"mt-[20px] mb-[40px] h-[32px]"},ne={class:"text-[14px] font-[700]"},oe={class:"text-[#999]"},le={class:"mt-[20px] mb-[40px] h-[32px]"},ce={class:"flex justify-center"},ie={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},pe={class:"mt-[22px] text-center"},_e={class:"text-[12px]"},ge=q({__name:"access",setup(re){const w=N(),m=T(),v=w.meta.title,d=i("/channel/wechat");i(2);const p=i(""),b=i({});i({});const g=async()=>{await P().then(({data:c})=>{b.value=c,p.value=c.qr_code})};B(async()=>{g()}),j(()=>{document.removeEventListener("visibilitychange",()=>{})});const y=c=>{window.open(c,"_blank")},C=c=>{m.push({path:d.value})};return(c,l)=>{const _=M,E=U,u=W,h=z,k=D,f=F,A=G,S=K,V=L;return R(),$("div",Q,[s(V,{class:"card !border-none",shadow:"never"},{default:n(()=>[t("div",H,[t("span",J,o(e(v)),1)]),s(E,{modelValue:d.value,"onUpdate:modelValue":l[0]||(l[0]=r=>d.value=r),class:"my-[20px]",onTabChange:C},{default:n(()=>[s(_,{label:e(a)("wechatAccessFlow"),name:"/channel/wechat"},null,8,["label"]),s(_,{label:e(a)("customMenu"),name:"/channel/wechat/menu"},null,8,["label"]),s(_,{label:e(a)("wechatTemplate"),name:"/channel/wechat/message"},null,8,["label"]),s(_,{label:e(a)("reply"),name:"/channel/wechat/reply"},null,8,["label"])]),_:1},8,["modelValue"]),t("div",O,[t("h3",X,o(e(a)("wechatInlet")),1),s(S,null,{default:n(()=>[s(f,{span:20},{default:n(()=>[s(k,{class:"!mt-[10px]",active:3,direction:"vertical"},{default:n(()=>[s(h,null,{title:n(()=>[t("p",Y,o(e(a)("wechatAttestation")),1)]),description:n(()=>[t("span",Z,o(e(a)("wechatAttestation1")),1),t("div",ee,[s(u,{type:"primary",onClick:l[1]||(l[1]=r=>y("https://mp.weixin.qq.com/"))},{default:n(()=>[x(o(e(a)("clickAccess")),1)]),_:1})])]),_:1}),s(h,null,{title:n(()=>[t("p",te,o(e(a)("wechatSetting")),1)]),description:n(()=>[t("span",se,o(e(a)("wechatSetting1")),1),t("div",ae,[s(u,{type:"primary",onClick:l[2]||(l[2]=r=>e(m).push("/channel/wechat/config"))},{default:n(()=>[x(o(e(a)("clickSetting")),1)]),_:1})])]),_:1}),s(h,null,{title:n(()=>[t("p",ne,o(e(a)("wechatAccess")),1)]),description:n(()=>[t("span",oe,o(e(a)("wechatAccess")),1),t("div",le,[s(u,{type:"primary",plain:"",onClick:l[3]||(l[3]=r=>e(m).push("/channel/wechat/course"))},{default:n(()=>[x(o(e(a)("releaseCourse")),1)]),_:1})])]),_:1})]),_:1})]),_:1}),s(f,{span:4},{default:n(()=>[t("div",ce,[s(A,{class:"w-[180px] h-[180px]",src:p.value?e(I)(p.value):""},{error:n(()=>[t("div",ie,[t("span",null,o(p.value?e(a)("fileErr"):e(a)("emptyQrCode")),1)])]),_:1},8,["src"])]),t("div",pe,[t("p",_e,o(e(a)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{ge as default}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{d as V,v as B,f as N,r as d,am as S,h as T,c as j,e as o,w as s,a as t,t as n,u as e,k as a,i as h,z as q,a7 as R,a8 as I,E as $,an as z,ao as D,ap as F,C as K,aq as M,K as P}from"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as Q}from"./aliapp-64f93693.js";const U={class:"main-container"},G={class:"flex justify-between items-center"},H={class:"text-page-title"},J={class:"p-[20px]"},L={class:"panel-title !text-sm"},O={class:"text-[14px] font-[700]"},W={class:"text-[#999]"},X={class:"mt-[20px] mb-[40px] h-[32px]"},Y={class:"text-[14px] font-[700]"},Z={class:"text-[#999]"},tt={class:"mt-[20px] mb-[40px] h-[32px]"},et={class:"text-[14px] font-[700]"},st={class:"text-[#999]"},at=t("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1),ot={class:"text-[14px] font-[700]"},nt={class:"text-[#999]"},lt={class:"flex justify-center"},ct={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},pt={class:"mt-[22px] text-center"},it={class:"text-[12px]"},bt=V({__name:"access",setup(_t){const f=B(),m=N(),v=f.meta.title,_=d("/channel/aliapp");d(2);const p=d("");S(async()=>{const c=await Q();p.value=c.data.qr_code});const w=c=>{window.open(c,"_blank")},b=c=>{m.push({path:_.value})};return(c,l)=>{const g=R,C=I,u=$,i=z,E=D,x=F,y=K,k=M,A=P;return T(),j("div",U,[o(A,{class:"card !border-none",shadow:"never"},{default:s(()=>[t("div",G,[t("span",H,n(e(v)),1)]),o(C,{modelValue:_.value,"onUpdate:modelValue":l[0]||(l[0]=r=>_.value=r),class:"my-[20px]",onTabChange:b},{default:s(()=>[o(g,{label:e(a)("weappAccessFlow"),name:"/channel/aliapp"},null,8,["label"])]),_:1},8,["modelValue"]),t("div",J,[t("h3",L,n(e(a)("weappInlet")),1),o(k,null,{default:s(()=>[o(x,{span:20},{default:s(()=>[o(E,{active:4,direction:"vertical"},{default:s(()=>[o(i,null,{title:s(()=>[t("p",O,n(e(a)("weappAttestation")),1)]),description:s(()=>[t("span",W,n(e(a)("weappAttest")),1),t("div",X,[o(u,{type:"primary",onClick:l[1]||(l[1]=r=>w("https://open.alipay.com/develop/manage"))},{default:s(()=>[h(n(e(a)("clickAccess")),1)]),_:1})])]),_:1}),o(i,null,{title:s(()=>[t("p",Y,n(e(a)("weappSetting")),1)]),description:s(()=>[t("span",Z,n(e(a)("emplace")),1),t("div",tt,[o(u,{type:"primary",plain:"",onClick:l[2]||(l[2]=r=>e(m).push("/channel/aliapp/config"))},{default:s(()=>[h(n(e(a)("weappSettingBtn")),1)]),_:1})])]),_:1}),o(i,null,{title:s(()=>[t("p",et,n(e(a)("uploadVersion")),1)]),description:s(()=>[t("span",st,n(e(a)("releaseCourse")),1),at]),_:1}),o(i,null,{title:s(()=>[t("p",ot,n(e(a)("completeAccess")),1)]),description:s(()=>[t("span",nt,n(e(a)("releaseCourse")),1)]),_:1})]),_:1})]),_:1}),o(x,{span:4},{default:s(()=>[t("div",lt,[o(y,{class:"w-[180px] h-[180px]",src:p.value?e(q)(p.value):""},{error:s(()=>[t("div",ct,[t("span",null,n(p.value?e(a)("fileErr"):e(a)("emptyQrCode")),1)])]),_:1},8,["src"])]),t("div",pt,[t("p",it,n(e(a)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{bt as default}; |
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@ |
|||||
|
import{_ as o}from"./add-member.vue_vue_type_script_setup_true_lang-09510b9c.js";import"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import"./member-4391bdda.js";export{o as default}; |
||||
@ -1 +0,0 @@ |
|||||
import{_ as o}from"./add-member.vue_vue_type_script_setup_true_lang-3a42ee84.js";import"./index-b867c57c.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import"./member-e564ea4f.js";export{o as default}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{d as I,r as m,l as L,M as R,k as o,h as N,m as k,w as d,a as j,e as s,i as M,t as C,u as t,J as z,bk as A,D as O,G as T,H as G,E as J,V as K,L as S}from"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{p as Z,z as Q,A as W}from"./member-4391bdda.js";const X={class:"dialog-footer"},me=I({__name:"add-member",emits:["complete"],setup(Y,{expose:$,emit:D}){const p=m(!1),i=m(!1),b=m(!1);let f="",c="";const w=m(!0),v=m(!0),g=m(!0),_={member_id:"",nickname:"",member_no:"",init_member_no:"",mobile:"",password:"",password_copy:""},r=L({..._}),y=m(),P=R(()=>({member_no:[{required:!0,message:o("memberNoPlaceholder"),trigger:"blur"},{validator:B,trigger:"blur"}],mobile:[{required:!0,message:o("mobilePlaceholder"),trigger:"blur"},{validator:x,trigger:"blur"}],password:[{required:!0,message:o("passwordPlaceholder"),trigger:"blur"}],password_copy:[{required:!0,message:o("passwordPlaceholder"),trigger:"blur"},{validator:E,trigger:"blur"}]})),x=(n,e,a)=>{e&&!/^1[3-9]\d{9}$/.test(e)?a(new Error(o("mobileHint"))):a()},E=(n,e,a)=>{e!=r.password?a(o("doubleCipherHint")):a()},B=(n,e,a)=>{e&&!/^[0-9a-zA-Z]*$/g.test(e)?a(new Error(o("memberNoHint"))):a()},U=async()=>{await Q().then(n=>{c=n.data}).catch(()=>{})},F=async n=>{if(i.value||!n)return;const e=W;await n.validate(async a=>{if(a){if(i.value=!0,b.value)return;b.value=!0,e(r).then(V=>{i.value=!1,b.value=!1,p.value=!1,D("complete")}).catch(()=>{i.value=!1,b.value=!1})}})};return $({showDialog:p,setFormData:async(n=null)=>{if(i.value=!0,Object.assign(r,_),f=o("addMember"),n){f=o("updateMember");const e=await(await Z(n.member_id)).data;e&&Object.keys(r).forEach(a=>{e[a]!=null&&(r[a]=e[a])})}else await U(),r.member_no=c,r.init_member_no=c;i.value=!1}}),(n,e)=>{const a=O,u=T,V=G,h=J,q=K,H=S;return N(),k(q,{modelValue:p.value,"onUpdate:modelValue":e[14]||(e[14]=l=>p.value=l),title:t(f),width:"500px","destroy-on-close":!0},{footer:d(()=>[j("span",X,[s(h,{onClick:e[12]||(e[12]=l=>p.value=!1)},{default:d(()=>[M(C(t(o)("cancel")),1)]),_:1}),s(h,{type:"primary",loading:i.value,onClick:e[13]||(e[13]=l=>F(y.value))},{default:d(()=>[M(C(t(o)("confirm")),1)]),_:1},8,["loading"])])]),default:d(()=>[z((N(),k(V,{model:r,"label-width":"90px",ref_key:"formRef",ref:y,rules:t(P),class:"page-form"},{default:d(()=>[s(u,{label:t(o)("memberNo"),prop:"member_no"},{default:d(()=>[s(a,{modelValue:r.member_no,"onUpdate:modelValue":e[0]||(e[0]=l=>r.member_no=l),modelModifiers:{trim:!0},clearable:"",maxlength:"20",placeholder:t(o)("memberNoPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),s(u,{label:t(o)("mobile"),prop:"mobile"},{default:d(()=>[s(a,{modelValue:r.mobile,"onUpdate:modelValue":e[1]||(e[1]=l=>r.mobile=l),modelModifiers:{trim:!0},clearable:"",placeholder:t(o)("mobilePlaceholder"),onKeyup:e[2]||(e[2]=l=>t(A)(l)),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),s(u,{label:t(o)("nickname")},{default:d(()=>[s(a,{modelValue:r.nickname,"onUpdate:modelValue":e[3]||(e[3]=l=>r.nickname=l),modelModifiers:{trim:!0},clearable:"",placeholder:t(o)("nickNamePlaceholder"),class:"input-width",maxlength:"10","show-word-limit":"",readonly:w.value,onClick:e[4]||(e[4]=l=>w.value=!1),onBlur:e[5]||(e[5]=l=>w.value=!0)},null,8,["modelValue","placeholder","readonly"])]),_:1},8,["label"]),s(u,{label:t(o)("password"),prop:"password"},{default:d(()=>[s(a,{modelValue:r.password,"onUpdate:modelValue":e[6]||(e[6]=l=>r.password=l),modelModifiers:{trim:!0},type:"password",placeholder:t(o)("passwordPlaceholder"),clearable:"",class:"input-width","show-password":!0,readonly:v.value,onClick:e[7]||(e[7]=l=>v.value=!1),onBlur:e[8]||(e[8]=l=>v.value=!0)},null,8,["modelValue","placeholder","readonly"])]),_:1},8,["label"]),s(u,{label:t(o)("passwordCopy"),prop:"password_copy"},{default:d(()=>[s(a,{modelValue:r.password_copy,"onUpdate:modelValue":e[9]||(e[9]=l=>r.password_copy=l),modelModifiers:{trim:!0},type:"password",placeholder:t(o)("passwordPlaceholder"),clearable:"",class:"input-width","show-password":!0,readonly:g.value,onClick:e[10]||(e[10]=l=>g.value=!1),onBlur:e[11]||(e[11]=l=>g.value=!0)},null,8,["modelValue","placeholder","readonly"])]),_:1},8,["label"])]),_:1},8,["model","rules"])),[[H,i.value]])]),_:1},8,["modelValue","title"])}}});export{me as _}; |
||||
@ -1 +0,0 @@ |
|||||
import{d as I,r as m,l as L,M as R,k as o,h as N,m as k,w as d,a as j,e as s,i as M,t as C,u as t,J as z,bk as A,D as O,G as T,H as G,E as J,V as K,L as S}from"./index-b867c57c.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{p as Z,z as Q,A as W}from"./member-e564ea4f.js";const X={class:"dialog-footer"},me=I({__name:"add-member",emits:["complete"],setup(Y,{expose:$,emit:D}){const p=m(!1),i=m(!1),b=m(!1);let f="",c="";const w=m(!0),v=m(!0),g=m(!0),_={member_id:"",nickname:"",member_no:"",init_member_no:"",mobile:"",password:"",password_copy:""},r=L({..._}),y=m(),P=R(()=>({member_no:[{required:!0,message:o("memberNoPlaceholder"),trigger:"blur"},{validator:B,trigger:"blur"}],mobile:[{required:!0,message:o("mobilePlaceholder"),trigger:"blur"},{validator:x,trigger:"blur"}],password:[{required:!0,message:o("passwordPlaceholder"),trigger:"blur"}],password_copy:[{required:!0,message:o("passwordPlaceholder"),trigger:"blur"},{validator:E,trigger:"blur"}]})),x=(n,e,a)=>{e&&!/^1[3-9]\d{9}$/.test(e)?a(new Error(o("mobileHint"))):a()},E=(n,e,a)=>{e!=r.password?a(o("doubleCipherHint")):a()},B=(n,e,a)=>{e&&!/^[0-9a-zA-Z]*$/g.test(e)?a(new Error(o("memberNoHint"))):a()},U=async()=>{await Q().then(n=>{c=n.data}).catch(()=>{})},F=async n=>{if(i.value||!n)return;const e=W;await n.validate(async a=>{if(a){if(i.value=!0,b.value)return;b.value=!0,e(r).then(V=>{i.value=!1,b.value=!1,p.value=!1,D("complete")}).catch(()=>{i.value=!1,b.value=!1})}})};return $({showDialog:p,setFormData:async(n=null)=>{if(i.value=!0,Object.assign(r,_),f=o("addMember"),n){f=o("updateMember");const e=await(await Z(n.member_id)).data;e&&Object.keys(r).forEach(a=>{e[a]!=null&&(r[a]=e[a])})}else await U(),r.member_no=c,r.init_member_no=c;i.value=!1}}),(n,e)=>{const a=O,u=T,V=G,h=J,q=K,H=S;return N(),k(q,{modelValue:p.value,"onUpdate:modelValue":e[14]||(e[14]=l=>p.value=l),title:t(f),width:"500px","destroy-on-close":!0},{footer:d(()=>[j("span",X,[s(h,{onClick:e[12]||(e[12]=l=>p.value=!1)},{default:d(()=>[M(C(t(o)("cancel")),1)]),_:1}),s(h,{type:"primary",loading:i.value,onClick:e[13]||(e[13]=l=>F(y.value))},{default:d(()=>[M(C(t(o)("confirm")),1)]),_:1},8,["loading"])])]),default:d(()=>[z((N(),k(V,{model:r,"label-width":"90px",ref_key:"formRef",ref:y,rules:t(P),class:"page-form"},{default:d(()=>[s(u,{label:t(o)("memberNo"),prop:"member_no"},{default:d(()=>[s(a,{modelValue:r.member_no,"onUpdate:modelValue":e[0]||(e[0]=l=>r.member_no=l),modelModifiers:{trim:!0},clearable:"",maxlength:"20",placeholder:t(o)("memberNoPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),s(u,{label:t(o)("mobile"),prop:"mobile"},{default:d(()=>[s(a,{modelValue:r.mobile,"onUpdate:modelValue":e[1]||(e[1]=l=>r.mobile=l),modelModifiers:{trim:!0},clearable:"",placeholder:t(o)("mobilePlaceholder"),onKeyup:e[2]||(e[2]=l=>t(A)(l)),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),s(u,{label:t(o)("nickname")},{default:d(()=>[s(a,{modelValue:r.nickname,"onUpdate:modelValue":e[3]||(e[3]=l=>r.nickname=l),modelModifiers:{trim:!0},clearable:"",placeholder:t(o)("nickNamePlaceholder"),class:"input-width",maxlength:"10","show-word-limit":"",readonly:w.value,onClick:e[4]||(e[4]=l=>w.value=!1),onBlur:e[5]||(e[5]=l=>w.value=!0)},null,8,["modelValue","placeholder","readonly"])]),_:1},8,["label"]),s(u,{label:t(o)("password"),prop:"password"},{default:d(()=>[s(a,{modelValue:r.password,"onUpdate:modelValue":e[6]||(e[6]=l=>r.password=l),modelModifiers:{trim:!0},type:"password",placeholder:t(o)("passwordPlaceholder"),clearable:"",class:"input-width","show-password":!0,readonly:v.value,onClick:e[7]||(e[7]=l=>v.value=!1),onBlur:e[8]||(e[8]=l=>v.value=!0)},null,8,["modelValue","placeholder","readonly"])]),_:1},8,["label"]),s(u,{label:t(o)("passwordCopy"),prop:"password_copy"},{default:d(()=>[s(a,{modelValue:r.password_copy,"onUpdate:modelValue":e[9]||(e[9]=l=>r.password_copy=l),modelModifiers:{trim:!0},type:"password",placeholder:t(o)("passwordPlaceholder"),clearable:"",class:"input-width","show-password":!0,readonly:g.value,onClick:e[10]||(e[10]=l=>g.value=!1),onBlur:e[11]||(e[11]=l=>g.value=!0)},null,8,["modelValue","placeholder","readonly"])]),_:1},8,["label"])]),_:1},8,["model","rules"])),[[H,i.value]])]),_:1},8,["modelValue","title"])}}});export{me as _}; |
|
||||
@ -1 +0,0 @@ |
|||||
import{_ as o}from"./add-table.vue_vue_type_script_setup_true_lang-44b2e598.js";import"./index-b867c57c.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./tools-7d1f211d.js";export{o as default}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{_ as o}from"./add-table.vue_vue_type_script_setup_true_lang-1ce89a18.js";import"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./tools-aad0f04c.js";export{o as default}; |
||||
@ -0,0 +1 @@ |
|||||
|
import{d as L,f as N,r as c,l as k,M as E,h as p,m as _,w as o,a as b,J as x,u as t,t as f,k as n,e as d,i as B,$ as z,D as F,E as M,a0 as P,V as U,L as $}from"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{k as q,l as G}from"./tools-aad0f04c.js";const le=L({__name:"add-table",setup(I,{expose:h}){const g=N(),m=c(!1),s=c(""),e=k({loading:!0,data:[],searchParam:{table_name:"",table_content:""}}),v=E(()=>e.data.filter(a=>!s.value||a.Name.toLowerCase().includes(s.value.toLowerCase())||a.Comment.toLowerCase().includes(s.value.toLowerCase()))),u=()=>{e.loading=!0,q().then(a=>{e.loading=!1,e.data=a.data}).catch(()=>{e.loading=!1})};u();const w=a=>{const l=a.Name;e.loading=!0,G({table_name:l}).then(i=>{e.loading=!1,m.value=!1,g.push({path:"/tools/code/edit",query:{id:i.data.id}})}).catch(()=>{e.loading=!1})};return h({showDialog:m,setFormData:async(a=null)=>{u()}}),(a,l)=>{const i=z,C=F,D=M,V=P,y=U,T=$;return p(),_(y,{modelValue:m.value,"onUpdate:modelValue":l[1]||(l[1]=r=>m.value=r),title:t(n)("addCode"),width:"800px","destroy-on-close":!0},{default:o(()=>[b("div",null,[x((p(),_(V,{data:t(v),size:"large",height:"400"},{empty:o(()=>[b("span",null,f(e.loading?"":t(n)("emptyData")),1)]),default:o(()=>[d(i,{prop:"Name",label:t(n)("tableName"),"min-width":"150"},null,8,["label"]),d(i,{prop:"Comment",label:t(n)("tableComment"),"min-width":"120"},null,8,["label"]),d(i,{align:"right","min-width":"150"},{header:o(()=>[d(C,{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=r=>s.value=r),modelModifiers:{trim:!0},size:"small",placeholder:t(n)("searchPlaceholder")},null,8,["modelValue","placeholder"])]),default:o(r=>[d(D,{size:"small",type:"primary",onClick:R=>w(r.row)},{default:o(()=>[B(f(t(n)("addBtn")),1)]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[T,e.loading]])])]),_:1},8,["modelValue","title"])}}});export{le as _}; |
||||
@ -1 +0,0 @@ |
|||||
import{d as L,f as N,r as c,l as k,M as E,h as p,m as _,w as o,a as b,J as x,u as t,t as f,k as n,e as d,i as B,$ as z,D as F,E as M,a0 as P,V as U,L as $}from"./index-b867c57c.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{k as q,l as G}from"./tools-7d1f211d.js";const le=L({__name:"add-table",setup(I,{expose:h}){const g=N(),m=c(!1),s=c(""),e=k({loading:!0,data:[],searchParam:{table_name:"",table_content:""}}),v=E(()=>e.data.filter(a=>!s.value||a.Name.toLowerCase().includes(s.value.toLowerCase())||a.Comment.toLowerCase().includes(s.value.toLowerCase()))),u=()=>{e.loading=!0,q().then(a=>{e.loading=!1,e.data=a.data}).catch(()=>{e.loading=!1})};u();const w=a=>{const l=a.Name;e.loading=!0,G({table_name:l}).then(i=>{e.loading=!1,m.value=!1,g.push({path:"/tools/code/edit",query:{id:i.data.id}})}).catch(()=>{e.loading=!1})};return h({showDialog:m,setFormData:async(a=null)=>{u()}}),(a,l)=>{const i=z,C=F,D=M,V=P,y=U,T=$;return p(),_(y,{modelValue:m.value,"onUpdate:modelValue":l[1]||(l[1]=r=>m.value=r),title:t(n)("addCode"),width:"800px","destroy-on-close":!0},{default:o(()=>[b("div",null,[x((p(),_(V,{data:t(v),size:"large",height:"400"},{empty:o(()=>[b("span",null,f(e.loading?"":t(n)("emptyData")),1)]),default:o(()=>[d(i,{prop:"Name",label:t(n)("tableName"),"min-width":"150"},null,8,["label"]),d(i,{prop:"Comment",label:t(n)("tableComment"),"min-width":"120"},null,8,["label"]),d(i,{align:"right","min-width":"150"},{header:o(()=>[d(C,{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=r=>s.value=r),modelModifiers:{trim:!0},size:"small",placeholder:t(n)("searchPlaceholder")},null,8,["modelValue","placeholder"])]),default:o(r=>[d(D,{size:"small",type:"primary",onClick:R=>w(r.row)},{default:o(()=>[B(f(t(n)("addBtn")),1)]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[T,e.loading]])])]),_:1},8,["modelValue","title"])}}});export{le as _}; |
|
||||
@ -1 +0,0 @@ |
|||||
import{_ as e}from"./add-theme.vue_vue_type_script_setup_true_lang-8768df27.js";const o=Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"}));export{o as _}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{_ as e}from"./add-theme.vue_vue_type_script_setup_true_lang-868a8ec9.js";const o=Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"}));export{o as _}; |
||||
@ -0,0 +1 @@ |
|||||
|
import{d as U,r as u,l as _,h as B,m as h,w as r,a as q,e as a,i as c,u as g,Q as F,D as N,G as O,b2 as R,H as $,E as j,V as A}from"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import{u as I}from"./diy-1811e9cd.js";const S={class:"dialog-footer"},M=U({__name:"add-theme",emits:["confirm"],setup(T,{expose:v,emit:V}){const b=I(),n=u(!1),y={title:"",label:"",value:"",tip:""};let m=[],d=u("");const l=_({...y}),k=o=>{m=o.key,d.value="";for(let e in l)l[e]="";o.data&&Object.keys(o.data).length&&(d.value="edit",Object.keys(l).forEach((e,s)=>{l[e]=o.data[e]?o.data[e]:""})),n.value=!0},p=u(),x=_({title:[{required:!0,message:"请输入颜色名称",trigger:"blur"}],value:[{required:!0,message:"请输入颜色value值",trigger:"blur"}],label:[{required:!0,message:"请输入颜色key值",trigger:"blur"},{validator:(o,e,s)=>{const i=/^[a-zA-Z0-9-]+$/;m.indexOf(e)!=-1&&s("新增颜色key值与已存在颜色key值命名重复,请修改命名"),i.test(e)?s():s("颜色key值只能输入字母、数字和连字符")},trigger:"blur"}]}),w=async o=>{o&&await o.validate(async e=>{e&&(V("confirm",F(l)),n.value=!1)})};return v({dialogThemeVisible:n,open:k}),(o,e)=>{const s=N,i=O,E=R,C=$,f=j,D=A;return B(),h(D,{modelValue:n.value,"onUpdate:modelValue":e[6]||(e[6]=t=>n.value=t),title:"新增颜色",width:"550px","align-center":""},{footer:r(()=>[q("div",S,[a(f,{onClick:e[4]||(e[4]=t=>n.value=!1)},{default:r(()=>[c("取消")]),_:1}),a(f,{type:"primary",onClick:e[5]||(e[5]=t=>w(p.value))},{default:r(()=>[c("保存")]),_:1})])]),default:r(()=>[a(C,{model:l,"label-width":"120px",ref_key:"formRef",ref:p,rules:x},{default:r(()=>[a(i,{label:"名字",prop:"title"},{default:r(()=>[a(s,{modelValue:l.title,"onUpdate:modelValue":e[0]||(e[0]=t=>l.title=t),class:"!w-[250px]",maxlength:"7",placeholder:"请输入颜色名称"},null,8,["modelValue"])]),_:1}),a(i,{label:"颜色key值",prop:"label"},{default:r(()=>[a(s,{modelValue:l.label,"onUpdate:modelValue":e[1]||(e[1]=t=>l.label=t),class:"!w-[250px]",maxlength:"20",disabled:g(d)=="edit",placeholder:"请输入颜色key值"},null,8,["modelValue","disabled"])]),_:1}),a(i,{label:"颜色value值",prop:"value"},{default:r(()=>[a(E,{modelValue:l.value,"onUpdate:modelValue":e[2]||(e[2]=t=>l.value=t),"show-alpha":"",predefine:g(b).predefineColors},null,8,["modelValue","predefine"])]),_:1}),a(i,{label:"颜色提示"},{default:r(()=>[a(s,{modelValue:l.tip,"onUpdate:modelValue":e[3]||(e[3]=t=>l.tip=t),class:"!w-[250px]",placeholder:"请输入颜色提示"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])}}});export{M as _}; |
||||
@ -1 +0,0 @@ |
|||||
import{d as U,r as u,l as _,h as B,m as h,w as r,a as q,e as a,i as c,u as g,Q as F,D as N,G as O,b2 as R,H as $,E as j,V as A}from"./index-b867c57c.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import{u as I}from"./diy-0372aa3e.js";const S={class:"dialog-footer"},M=U({__name:"add-theme",emits:["confirm"],setup(T,{expose:v,emit:V}){const b=I(),n=u(!1),y={title:"",label:"",value:"",tip:""};let m=[],d=u("");const l=_({...y}),k=o=>{m=o.key,d.value="";for(let e in l)l[e]="";o.data&&Object.keys(o.data).length&&(d.value="edit",Object.keys(l).forEach((e,s)=>{l[e]=o.data[e]?o.data[e]:""})),n.value=!0},p=u(),x=_({title:[{required:!0,message:"请输入颜色名称",trigger:"blur"}],value:[{required:!0,message:"请输入颜色value值",trigger:"blur"}],label:[{required:!0,message:"请输入颜色key值",trigger:"blur"},{validator:(o,e,s)=>{const i=/^[a-zA-Z0-9-]+$/;m.indexOf(e)!=-1&&s("新增颜色key值与已存在颜色key值命名重复,请修改命名"),i.test(e)?s():s("颜色key值只能输入字母、数字和连字符")},trigger:"blur"}]}),w=async o=>{o&&await o.validate(async e=>{e&&(V("confirm",F(l)),n.value=!1)})};return v({dialogThemeVisible:n,open:k}),(o,e)=>{const s=N,i=O,E=R,C=$,f=j,D=A;return B(),h(D,{modelValue:n.value,"onUpdate:modelValue":e[6]||(e[6]=t=>n.value=t),title:"新增颜色",width:"550px","align-center":""},{footer:r(()=>[q("div",S,[a(f,{onClick:e[4]||(e[4]=t=>n.value=!1)},{default:r(()=>[c("取消")]),_:1}),a(f,{type:"primary",onClick:e[5]||(e[5]=t=>w(p.value))},{default:r(()=>[c("保存")]),_:1})])]),default:r(()=>[a(C,{model:l,"label-width":"120px",ref_key:"formRef",ref:p,rules:x},{default:r(()=>[a(i,{label:"名字",prop:"title"},{default:r(()=>[a(s,{modelValue:l.title,"onUpdate:modelValue":e[0]||(e[0]=t=>l.title=t),class:"!w-[250px]",maxlength:"7",placeholder:"请输入颜色名称"},null,8,["modelValue"])]),_:1}),a(i,{label:"颜色key值",prop:"label"},{default:r(()=>[a(s,{modelValue:l.label,"onUpdate:modelValue":e[1]||(e[1]=t=>l.label=t),class:"!w-[250px]",maxlength:"20",disabled:g(d)=="edit",placeholder:"请输入颜色key值"},null,8,["modelValue","disabled"])]),_:1}),a(i,{label:"颜色value值",prop:"value"},{default:r(()=>[a(E,{modelValue:l.value,"onUpdate:modelValue":e[2]||(e[2]=t=>l.value=t),"show-alpha":"",predefine:g(b).predefineColors},null,8,["modelValue","predefine"])]),_:1}),a(i,{label:"颜色提示"},{default:r(()=>[a(s,{modelValue:l.tip,"onUpdate:modelValue":e[3]||(e[3]=t=>l.tip=t),class:"!w-[250px]",placeholder:"请输入颜色提示"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])}}});export{M as _}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{_ as o}from"./adjust-money.vue_vue_type_style_index_0_lang-12fdc260.js";import"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import"./order-c361de7c.js";export{o as default}; |
||||
@ -1 +0,0 @@ |
|||||
import{_ as o}from"./adjust-money.vue_vue_type_style_index_0_lang-603dec09.js";import"./index-b867c57c.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import"./order-c4b84cc1.js";export{o as default}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{d as O,r as f,l as R,h as b,m as M,w as d,a as r,e as a,i as x,t as u,u as t,k as l,B as $,c as V,bi as z,Q as G,D as L,G as P,H as S,$ as A,ax as H,a0 as K,E as Q,V as q}from"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{o as J}from"./order-c361de7c.js";const W={class:"max-h-[600px] overflow-y-auto"},X={class:"panel-title ml-[10px]"},Y={class:"mb-[20px]"},Z={class:"multi-hidden text-[14px]"},ee=r("text",{class:"nc-iconfont nc-icon-bangzhuV6xx ml-[5px] text-[12px]"},null,-1),oe=r("h3",{class:"panel-title ml-[10px]"},[r("span",{class:"text-primary"},"实际商品金额"),r("span",null," = 商品总额 - 优惠金额 + 调价")],-1),te={class:"panel-title ml-[10px]"},le=r("span",{class:"text-primary"},"订单总额",-1),ae={key:0},ne={key:1},se={class:"dialog-footer"},Me=O({__name:"adjust-money",emits:["complete"],setup(de,{expose:w,emit:E}){const m=f(!1),y=f(!1),n=R({}),_=f(0),g=f([]),F=o=>{z(o),_.value=o.target.value},k=o=>{for(let e in n)delete n[e];Object.assign(n,G(o)),n.order_goods=n.order_goods.filter(e=>e.is_gift!=1),g.value=[],n.order_goods.forEach(e=>{e.adjust_money="",e.total=(parseFloat(e.goods_money)-parseFloat(e.discount_money)).toFixed(2),g.value.push(e.goods_type)}),_.value=n.delivery_money},D=(o,e,c)=>{let i=parseFloat(c.goods_money)-parseFloat(c.discount_money);o.length==0||isNaN(o)?(o=0,n.order_goods[e].adjust_money=""):o=parseFloat(o),parseFloat(o)+i<0?(o=i,n.order_goods[e].adjust_money=-o,i=0):i+=o,i=Math.round(i*100)/100,n.order_goods[e].total=i.toFixed(2)},h=f(!1),C=()=>{if(y.value=!0,h.value)return;h.value=!0;let o={};n.order_goods.forEach(e=>{e.adjust_money&&(o[e.order_goods_id]={money:e.adjust_money})}),J({order_id:n.order_id,delivery_money:parseFloat(_.value),order_goods_data:o}).then(e=>{h.value=!1,y.value=!1,m.value=!1,E("complete")}).catch(()=>{h.value=!1,y.value=!1})};return w({showDialog:m,setFormData:k}),(o,e)=>{const c=L,i=P,T=S,p=A,N=H,B=K,j=Q,U=q;return b(),M(U,{modelValue:m.value,"onUpdate:modelValue":e[4]||(e[4]=s=>m.value=s),title:t(l)("adjustMoneyDialogTitle"),width:"1000px",class:"diy-dialog-wrap","destroy-on-close":!0},{footer:d(()=>[r("span",se,[a(j,{onClick:e[2]||(e[2]=s=>m.value=!1)},{default:d(()=>[x(u(t(l)("cancel")),1)]),_:1}),a(j,{type:"primary",loading:y.value,onClick:e[3]||(e[3]=s=>C(o.formRef))},{default:d(()=>[x(u(t(l)("confirm")),1)]),_:1},8,["loading"])])]),default:d(()=>[r("div",W,[r("h3",X,u(t(l)("adjustMoneyTips")),1),g.value.indexOf("real")!=-1?(b(),M(T,{key:0,"label-width":"50px",ref:"formRef",class:"page-form"},{default:d(()=>[a(i,{label:t(l)("adjustMoneyDeliveryMoney"),prop:"express_number"},{default:d(()=>[a(c,{modelValue:_.value,"onUpdate:modelValue":e[0]||(e[0]=s=>_.value=s),modelModifiers:{trim:!0},clearable:"",placeholder:"0.00",class:"!w-[200px]",maxlength:"8",onKeyup:e[1]||(e[1]=s=>F(s))},{append:d(()=>[x(u(t(l)("adjustMoneyUnit")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1},512)):$("",!0),r("div",Y,[a(B,{data:n.order_goods,size:"large"},{default:d(()=>[a(p,{label:t(l)("adjustMoneyGoodsInfo"),align:"left",width:"200"},{default:d(({row:s})=>[r("p",Z,u(s.goods_name),1)]),_:1},8,["label"]),a(p,{prop:"price",label:t(l)("adjustMoneyPrice"),"min-width":"50",align:"left"},null,8,["label"]),a(p,{prop:"num",label:t(l)("adjustMoneyNum"),"min-width":"50",align:"right"},null,8,["label"]),a(p,{prop:"goods_money",label:t(l)("adjustMoneySubTotal"),"min-width":"50",align:"right"},null,8,["label"]),a(p,{prop:"discount_money",label:t(l)("adjustMoneyDiscountMoney"),"min-width":"50",align:"right"},null,8,["label"]),a(p,{prop:"goods_name",label:t(l)("adjustMoneyLabel"),"min-width":"100"},{header:d(()=>[r("div",null,[r("span",null,u(t(l)("adjustMoneyLabel")),1),a(N,{effect:"dark",content:"负数表示下调金额,正数表示上调金额",placement:"top"},{default:d(()=>[ee]),_:1})])]),default:d(({row:s,$index:I})=>[a(c,{modelValue:s.adjust_money,"onUpdate:modelValue":v=>s.adjust_money=v,modelModifiers:{trim:!0},clearable:"",placeholder:"0.00",maxlength:"6",onChange:v=>D(v,I,s)},{append:d(()=>[x(u(t(l)("adjustMoneyUnit")),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),_:1},8,["label"]),a(p,{prop:"total",label:t(l)("adjustMoneyTotal"),"min-width":"70",align:"right"},null,8,["label"])]),_:1},8,["data"])]),oe,r("h3",te,[le,g.value.indexOf("real")!=-1?(b(),V("span",ae," = 实际商品金额 + 运费")):(b(),V("span",ne," = 实际商品金额"))])])]),_:1},8,["modelValue","title"])}}});export{Me as _}; |
||||
@ -1 +0,0 @@ |
|||||
import{d as O,r as f,l as R,h as b,m as M,w as d,a as r,e as a,i as x,t as u,u as t,k as l,B as $,c as V,bi as z,Q as G,D as L,G as P,H as S,$ as A,ax as H,a0 as K,E as Q,V as q}from"./index-b867c57c.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{o as J}from"./order-c4b84cc1.js";const W={class:"max-h-[600px] overflow-y-auto"},X={class:"panel-title ml-[10px]"},Y={class:"mb-[20px]"},Z={class:"multi-hidden text-[14px]"},ee=r("text",{class:"nc-iconfont nc-icon-bangzhuV6xx ml-[5px] text-[12px]"},null,-1),oe=r("h3",{class:"panel-title ml-[10px]"},[r("span",{class:"text-primary"},"实际商品金额"),r("span",null," = 商品总额 - 优惠金额 + 调价")],-1),te={class:"panel-title ml-[10px]"},le=r("span",{class:"text-primary"},"订单总额",-1),ae={key:0},ne={key:1},se={class:"dialog-footer"},Me=O({__name:"adjust-money",emits:["complete"],setup(de,{expose:w,emit:E}){const m=f(!1),y=f(!1),n=R({}),_=f(0),g=f([]),F=o=>{z(o),_.value=o.target.value},k=o=>{for(let e in n)delete n[e];Object.assign(n,G(o)),n.order_goods=n.order_goods.filter(e=>e.is_gift!=1),g.value=[],n.order_goods.forEach(e=>{e.adjust_money="",e.total=(parseFloat(e.goods_money)-parseFloat(e.discount_money)).toFixed(2),g.value.push(e.goods_type)}),_.value=n.delivery_money},D=(o,e,c)=>{let i=parseFloat(c.goods_money)-parseFloat(c.discount_money);o.length==0||isNaN(o)?(o=0,n.order_goods[e].adjust_money=""):o=parseFloat(o),parseFloat(o)+i<0?(o=i,n.order_goods[e].adjust_money=-o,i=0):i+=o,i=Math.round(i*100)/100,n.order_goods[e].total=i.toFixed(2)},h=f(!1),C=()=>{if(y.value=!0,h.value)return;h.value=!0;let o={};n.order_goods.forEach(e=>{e.adjust_money&&(o[e.order_goods_id]={money:e.adjust_money})}),J({order_id:n.order_id,delivery_money:parseFloat(_.value),order_goods_data:o}).then(e=>{h.value=!1,y.value=!1,m.value=!1,E("complete")}).catch(()=>{h.value=!1,y.value=!1})};return w({showDialog:m,setFormData:k}),(o,e)=>{const c=L,i=P,T=S,p=A,N=H,B=K,j=Q,U=q;return b(),M(U,{modelValue:m.value,"onUpdate:modelValue":e[4]||(e[4]=s=>m.value=s),title:t(l)("adjustMoneyDialogTitle"),width:"1000px",class:"diy-dialog-wrap","destroy-on-close":!0},{footer:d(()=>[r("span",se,[a(j,{onClick:e[2]||(e[2]=s=>m.value=!1)},{default:d(()=>[x(u(t(l)("cancel")),1)]),_:1}),a(j,{type:"primary",loading:y.value,onClick:e[3]||(e[3]=s=>C(o.formRef))},{default:d(()=>[x(u(t(l)("confirm")),1)]),_:1},8,["loading"])])]),default:d(()=>[r("div",W,[r("h3",X,u(t(l)("adjustMoneyTips")),1),g.value.indexOf("real")!=-1?(b(),M(T,{key:0,"label-width":"50px",ref:"formRef",class:"page-form"},{default:d(()=>[a(i,{label:t(l)("adjustMoneyDeliveryMoney"),prop:"express_number"},{default:d(()=>[a(c,{modelValue:_.value,"onUpdate:modelValue":e[0]||(e[0]=s=>_.value=s),modelModifiers:{trim:!0},clearable:"",placeholder:"0.00",class:"!w-[200px]",maxlength:"8",onKeyup:e[1]||(e[1]=s=>F(s))},{append:d(()=>[x(u(t(l)("adjustMoneyUnit")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1},512)):$("",!0),r("div",Y,[a(B,{data:n.order_goods,size:"large"},{default:d(()=>[a(p,{label:t(l)("adjustMoneyGoodsInfo"),align:"left",width:"200"},{default:d(({row:s})=>[r("p",Z,u(s.goods_name),1)]),_:1},8,["label"]),a(p,{prop:"price",label:t(l)("adjustMoneyPrice"),"min-width":"50",align:"left"},null,8,["label"]),a(p,{prop:"num",label:t(l)("adjustMoneyNum"),"min-width":"50",align:"right"},null,8,["label"]),a(p,{prop:"goods_money",label:t(l)("adjustMoneySubTotal"),"min-width":"50",align:"right"},null,8,["label"]),a(p,{prop:"discount_money",label:t(l)("adjustMoneyDiscountMoney"),"min-width":"50",align:"right"},null,8,["label"]),a(p,{prop:"goods_name",label:t(l)("adjustMoneyLabel"),"min-width":"100"},{header:d(()=>[r("div",null,[r("span",null,u(t(l)("adjustMoneyLabel")),1),a(N,{effect:"dark",content:"负数表示下调金额,正数表示上调金额",placement:"top"},{default:d(()=>[ee]),_:1})])]),default:d(({row:s,$index:I})=>[a(c,{modelValue:s.adjust_money,"onUpdate:modelValue":v=>s.adjust_money=v,modelModifiers:{trim:!0},clearable:"",placeholder:"0.00",maxlength:"6",onChange:v=>D(v,I,s)},{append:d(()=>[x(u(t(l)("adjustMoneyUnit")),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),_:1},8,["label"]),a(p,{prop:"total",label:t(l)("adjustMoneyTotal"),"min-width":"70",align:"right"},null,8,["label"])]),_:1},8,["data"])]),oe,r("h3",te,[le,g.value.indexOf("real")!=-1?(b(),V("span",ae," = 实际商品金额 + 运费")):(b(),V("span",ne," = 实际商品金额"))])])]),_:1},8,["modelValue","title"])}}});export{Me as _}; |
|
||||
@ -1 +0,0 @@ |
|||||
import{d as V,v as C,r as u,l as E,h as f,c as k,J as y,m as B,w as s,e,a as m,t as c,u as r,k as n,i as D,Q as F,av as I,G as L,K as N,H as R,E as S,L as H}from"./index-b867c57c.js";/* empty css *//* empty css *//* empty css *//* empty css */import T from"./index-1c42493a.js";import"./el-form-item-4ed993c7.js";/* empty css */import{H as U,I as j}from"./sys-7c664cff.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-a9b624ac.js";/* empty css *//* empty css */import"./attachment-147edd8b.js";import"./index.vue_vue_type_script_setup_true_lang-74e5798e.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-6a42996e.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-00ceafe8.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./sortable.esm-be94e56d.js";const G={class:"main-container"},J={class:"panel-title !text-sm"},K={class:"form-tip"},O={class:"fixed-footer-wrap"},Q={class:"fixed-footer"},Dt=V({__name:"adminlogin",setup($){C().meta.title;const a=u(!0),d=u(),o=E({is_captcha:0,bg:""});(async()=>{const i=await(await U()).data;Object.keys(o).forEach(t=>{o[t]=i[t]}),a.value=!1})();const v=async i=>{a.value||!i||await i.validate(t=>{if(t){const p=F(o);j(p).then(()=>{a.value=!1}).catch(()=>{a.value=!1})}})};return(i,t)=>{const p=I,_=L,g=T,h=N,b=R,w=S,x=H;return f(),k("div",G,[y((f(),B(b,{class:"page-form",model:o,"label-width":"150px",ref_key:"ruleFormRef",ref:d},{default:s(()=>[e(h,{class:"box-card !border-none",shadow:"never"},{default:s(()=>[m("h3",J,c(r(n)("admin")),1),e(_,{label:r(n)("isCaptcha")},{default:s(()=>[e(p,{modelValue:o.is_captcha,"onUpdate:modelValue":t[0]||(t[0]=l=>o.is_captcha=l),"active-value":1,"inactive-value":0},null,8,["modelValue"])]),_:1},8,["label"]),e(_,{label:r(n)("bgImg")},{default:s(()=>[e(g,{modelValue:o.bg,"onUpdate:modelValue":t[1]||(t[1]=l=>o.bg=l)},null,8,["modelValue"]),m("div",K,c(r(n)("adminBgImgTip")),1)]),_:1},8,["label"])]),_:1})]),_:1},8,["model"])),[[x,a.value]]),m("div",O,[m("div",Q,[e(w,{type:"primary",onClick:t[2]||(t[2]=l=>v(d.value))},{default:s(()=>[D(c(r(n)("save")),1)]),_:1})])])])}}});export{Dt as default}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{d as V,v as C,r as u,l as E,h as f,c as k,J as y,m as B,w as s,e,a as m,t as c,u as r,k as n,i as D,Q as F,av as I,G as L,K as N,H as R,E as S,L as H}from"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css *//* empty css */import T from"./index-da3b13a8.js";import"./el-form-item-4ed993c7.js";/* empty css */import{H as U,I as j}from"./sys-8c546569.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-a89a11d7.js";/* empty css *//* empty css */import"./attachment-833f0f9c.js";import"./index.vue_vue_type_script_setup_true_lang-622ded9e.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-7a621647.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-dbdc262b.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./sortable.esm-be94e56d.js";const G={class:"main-container"},J={class:"panel-title !text-sm"},K={class:"form-tip"},O={class:"fixed-footer-wrap"},Q={class:"fixed-footer"},Dt=V({__name:"adminlogin",setup($){C().meta.title;const a=u(!0),d=u(),o=E({is_captcha:0,bg:""});(async()=>{const i=await(await U()).data;Object.keys(o).forEach(t=>{o[t]=i[t]}),a.value=!1})();const v=async i=>{a.value||!i||await i.validate(t=>{if(t){const p=F(o);j(p).then(()=>{a.value=!1}).catch(()=>{a.value=!1})}})};return(i,t)=>{const p=I,_=L,g=T,h=N,b=R,w=S,x=H;return f(),k("div",G,[y((f(),B(b,{class:"page-form",model:o,"label-width":"150px",ref_key:"ruleFormRef",ref:d},{default:s(()=>[e(h,{class:"box-card !border-none",shadow:"never"},{default:s(()=>[m("h3",J,c(r(n)("admin")),1),e(_,{label:r(n)("isCaptcha")},{default:s(()=>[e(p,{modelValue:o.is_captcha,"onUpdate:modelValue":t[0]||(t[0]=l=>o.is_captcha=l),"active-value":1,"inactive-value":0},null,8,["modelValue"])]),_:1},8,["label"]),e(_,{label:r(n)("bgImg")},{default:s(()=>[e(g,{modelValue:o.bg,"onUpdate:modelValue":t[1]||(t[1]=l=>o.bg=l)},null,8,["modelValue"]),m("div",K,c(r(n)("adminBgImgTip")),1)]),_:1},8,["label"])]),_:1})]),_:1},8,["model"])),[[x,a.value]]),m("div",O,[m("div",Q,[e(w,{type:"primary",onClick:t[2]||(t[2]=l=>v(d.value))},{default:s(()=>[D(c(r(n)("save")),1)]),_:1})])])])}}});export{Dt as default}; |
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@ |
|||||
import{_ as o}from"./adv-edit.vue_vue_type_style_index_0_lang-ba5cc88b.js";import"./index-b867c57c.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index-1c42493a.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-a9b624ac.js";import"./attachment-147edd8b.js";import"./index.vue_vue_type_script_setup_true_lang-74e5798e.js";import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-6a42996e.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-00ceafe8.js";import"./sys-7c664cff.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./sortable.esm-be94e56d.js";import"./web-link.vue_vue_type_style_index_0_lang-7dc3d30a.js";import"./web-a5069dc0.js";export{o as default}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{_ as o}from"./adv-edit.vue_vue_type_style_index_0_lang-4bf56e64.js";import"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index-da3b13a8.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-a89a11d7.js";import"./attachment-833f0f9c.js";import"./index.vue_vue_type_script_setup_true_lang-622ded9e.js";import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-7a621647.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-dbdc262b.js";import"./sys-8c546569.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./sortable.esm-be94e56d.js";import"./web-link.vue_vue_type_style_index_0_lang-fc7481c0.js";import"./web-326996f6.js";export{o as default}; |
||||
@ -0,0 +1 @@ |
|||||
|
import{d as I,r as p,l as F,M,k as t,h as g,m as b,w as n,a as $,e as o,i as V,t as k,u as d,J as h,D as R,G as j,b2 as q,H as L,E as O,V as T,L as G}from"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import H from"./index-da3b13a8.js";import{_ as J}from"./web-link.vue_vue_type_style_index_0_lang-fc7481c0.js";import"./el-form-item-4ed993c7.js";import{a as K,b as S,c as z}from"./web-326996f6.js";const Q={class:"dialog-footer"},ie=I({__name:"adv-edit",emits:["complete"],setup(W,{expose:w,emit:y}){const u=p(!1),i=p(!1),_={adv_key:"",ap_name:"",adv_id:"",adv_title:"",adv_url:{name:""},adv_image:"",sort:"",background:""},a=F({..._}),v=p(),E={number:/^\d{0,10}$/},N=M(()=>({adv_title:[{required:!0,message:t("advNamePlaceholder"),trigger:"blur"}],adv_image:[{required:!0,message:t("advImagePlaceholder"),trigger:"blur"}],sort:[{trigger:"blur",validator:(s,e,r)=>{isNaN(e)||!E.number.test(e)?r(new Error(t("sortTips"))):r()}}]})),x=async s=>{if(i.value||!s)return;const e=a.adv_id?K:S;await s.validate(async r=>{r&&(i.value=!0,e(a).then(f=>{i.value=!1,u.value=!1,y("complete")}).catch(()=>{i.value=!1}))})},D=async(s=null)=>{if(Object.assign(a,_),i.value=!0,s.adv_id){const e=await(await z(s.adv_id)).data;e&&Object.keys(a).forEach(r=>{e[r]!=null&&(a[r]=e[r])})}else a.adv_key=s.adv_key,a.ap_name=s.ap_name;i.value=!1};return p([]),w({showDialog:u,setFormData:D}),(s,e)=>{const r=R,m=j,f=J,U=H,P=q,A=L,c=O,B=T,C=G;return g(),b(B,{modelValue:u.value,"onUpdate:modelValue":e[10]||(e[10]=l=>u.value=l),title:a.adv_id?d(t)("updateAdv"):d(t)("addAdv"),width:"30%",class:"diy-dialog-wrap","destroy-on-close":!0},{footer:n(()=>[$("span",Q,[o(c,{onClick:e[8]||(e[8]=l=>u.value=!1)},{default:n(()=>[V(k(d(t)("cancel")),1)]),_:1}),o(c,{type:"primary",loading:i.value,onClick:e[9]||(e[9]=l=>x(v.value))},{default:n(()=>[V(k(d(t)("confirm")),1)]),_:1},8,["loading"])])]),default:n(()=>[h((g(),b(A,{model:a,"label-width":"120px",ref_key:"formRef",ref:v,rules:d(N),class:"page-form"},{default:n(()=>[o(m,{label:d(t)("advName"),prop:"adv_title"},{default:n(()=>[o(r,{modelValue:a.adv_title,"onUpdate:modelValue":e[0]||(e[0]=l=>a.adv_title=l),modelModifiers:{trim:!0},clearable:"",placeholder:d(t)("advNamePlaceholder"),class:"input-width",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(m,{label:d(t)("advPosition"),prop:"ap_name"},{default:n(()=>[o(r,{modelValue:a.ap_name,"onUpdate:modelValue":e[1]||(e[1]=l=>a.ap_name=l),modelModifiers:{trim:!0},disabled:"",class:"input-width"},null,8,["modelValue"])]),_:1},8,["label"]),o(m,{label:d(t)("advUrl")},{default:n(()=>[o(f,{modelValue:a.adv_url,"onUpdate:modelValue":e[2]||(e[2]=l=>a.adv_url=l)},null,8,["modelValue"])]),_:1},8,["label"]),o(m,{label:d(t)("advImg"),prop:"adv_image"},{default:n(()=>[o(U,{modelValue:a.adv_image,"onUpdate:modelValue":e[3]||(e[3]=l=>a.adv_image=l)},null,8,["modelValue"])]),_:1},8,["label"]),o(m,{label:d(t)("background")},{default:n(()=>[o(P,{modelValue:a.background,"onUpdate:modelValue":e[4]||(e[4]=l=>a.background=l)},null,8,["modelValue"])]),_:1},8,["label"]),o(m,{label:d(t)("sort"),prop:"sort"},{default:n(()=>[o(r,{modelValue:a.sort,"onUpdate:modelValue":e[5]||(e[5]=l=>a.sort=l),modelModifiers:{trim:!0},clearable:"",placeholder:d(t)("sortPlaceholder"),class:"input-width","show-word-limit":"",maxlength:"8",onKeyup:e[6]||(e[6]=l=>s.filterNumber(l)),onBlur:e[7]||(e[7]=l=>a.sort=l.target.value)},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])),[[C,i.value]])]),_:1},8,["modelValue","title"])}}});export{ie as _}; |
||||
@ -1 +0,0 @@ |
|||||
import{d as I,r as p,l as F,M,k as t,h as g,m as b,w as n,a as $,e as o,i as V,t as k,u as d,J as h,D as R,G as j,b2 as q,H as L,E as O,V as T,L as G}from"./index-b867c57c.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import H from"./index-1c42493a.js";import{_ as J}from"./web-link.vue_vue_type_style_index_0_lang-7dc3d30a.js";import"./el-form-item-4ed993c7.js";import{a as K,b as S,c as z}from"./web-a5069dc0.js";const Q={class:"dialog-footer"},ie=I({__name:"adv-edit",emits:["complete"],setup(W,{expose:w,emit:y}){const u=p(!1),i=p(!1),_={adv_key:"",ap_name:"",adv_id:"",adv_title:"",adv_url:{name:""},adv_image:"",sort:"",background:""},a=F({..._}),v=p(),E={number:/^\d{0,10}$/},N=M(()=>({adv_title:[{required:!0,message:t("advNamePlaceholder"),trigger:"blur"}],adv_image:[{required:!0,message:t("advImagePlaceholder"),trigger:"blur"}],sort:[{trigger:"blur",validator:(s,e,r)=>{isNaN(e)||!E.number.test(e)?r(new Error(t("sortTips"))):r()}}]})),x=async s=>{if(i.value||!s)return;const e=a.adv_id?K:S;await s.validate(async r=>{r&&(i.value=!0,e(a).then(f=>{i.value=!1,u.value=!1,y("complete")}).catch(()=>{i.value=!1}))})},D=async(s=null)=>{if(Object.assign(a,_),i.value=!0,s.adv_id){const e=await(await z(s.adv_id)).data;e&&Object.keys(a).forEach(r=>{e[r]!=null&&(a[r]=e[r])})}else a.adv_key=s.adv_key,a.ap_name=s.ap_name;i.value=!1};return p([]),w({showDialog:u,setFormData:D}),(s,e)=>{const r=R,m=j,f=J,U=H,P=q,A=L,c=O,B=T,C=G;return g(),b(B,{modelValue:u.value,"onUpdate:modelValue":e[10]||(e[10]=l=>u.value=l),title:a.adv_id?d(t)("updateAdv"):d(t)("addAdv"),width:"30%",class:"diy-dialog-wrap","destroy-on-close":!0},{footer:n(()=>[$("span",Q,[o(c,{onClick:e[8]||(e[8]=l=>u.value=!1)},{default:n(()=>[V(k(d(t)("cancel")),1)]),_:1}),o(c,{type:"primary",loading:i.value,onClick:e[9]||(e[9]=l=>x(v.value))},{default:n(()=>[V(k(d(t)("confirm")),1)]),_:1},8,["loading"])])]),default:n(()=>[h((g(),b(A,{model:a,"label-width":"120px",ref_key:"formRef",ref:v,rules:d(N),class:"page-form"},{default:n(()=>[o(m,{label:d(t)("advName"),prop:"adv_title"},{default:n(()=>[o(r,{modelValue:a.adv_title,"onUpdate:modelValue":e[0]||(e[0]=l=>a.adv_title=l),modelModifiers:{trim:!0},clearable:"",placeholder:d(t)("advNamePlaceholder"),class:"input-width",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(m,{label:d(t)("advPosition"),prop:"ap_name"},{default:n(()=>[o(r,{modelValue:a.ap_name,"onUpdate:modelValue":e[1]||(e[1]=l=>a.ap_name=l),modelModifiers:{trim:!0},disabled:"",class:"input-width"},null,8,["modelValue"])]),_:1},8,["label"]),o(m,{label:d(t)("advUrl")},{default:n(()=>[o(f,{modelValue:a.adv_url,"onUpdate:modelValue":e[2]||(e[2]=l=>a.adv_url=l)},null,8,["modelValue"])]),_:1},8,["label"]),o(m,{label:d(t)("advImg"),prop:"adv_image"},{default:n(()=>[o(U,{modelValue:a.adv_image,"onUpdate:modelValue":e[3]||(e[3]=l=>a.adv_image=l)},null,8,["modelValue"])]),_:1},8,["label"]),o(m,{label:d(t)("background")},{default:n(()=>[o(P,{modelValue:a.background,"onUpdate:modelValue":e[4]||(e[4]=l=>a.background=l)},null,8,["modelValue"])]),_:1},8,["label"]),o(m,{label:d(t)("sort"),prop:"sort"},{default:n(()=>[o(r,{modelValue:a.sort,"onUpdate:modelValue":e[5]||(e[5]=l=>a.sort=l),modelModifiers:{trim:!0},clearable:"",placeholder:d(t)("sortPlaceholder"),class:"input-width","show-word-limit":"",maxlength:"8",onKeyup:e[6]||(e[6]=l=>s.filterNumber(l)),onBlur:e[7]||(e[7]=l=>a.sort=l.target.value)},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])),[[C,i.value]])]),_:1},8,["modelValue","title"])}}});export{ie as _}; |
|
||||
@ -1 +0,0 @@ |
|||||
import{d as g,v as k,f as w,l as y,h as d,c as x,e as o,w as n,a as l,t as r,u as a,J as C,m as E,k as s,i as L,$ as B,E as N,a0 as A,K as D,L as P}from"./index-b867c57c.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{h as T}from"./web-a5069dc0.js";const $={class:"main-container"},V={class:"flex justify-between items-center mb-[20px]"},R={class:"text-page-title"},Y=g({__name:"adv_position",setup(j){const c=k(),p=w(),m=c.meta.title,t=y({loading:!0,data:[]});(()=>{T({}).then(e=>{t.loading=!1,t.data=e.data}).catch(()=>{t.loading=!1})})();const _=e=>{p.push(`/web/adv?adv_key=${e.keywords}&ap_name=${e.ap_name}`)};return(e,J)=>{const i=B,u=N,b=A,h=D,v=P;return d(),x("div",$,[o(h,{class:"box-card !border-none",shadow:"never"},{default:n(()=>[l("div",V,[l("span",R,r(a(m)),1)]),C((d(),E(b,{data:t.data,size:"large"},{empty:n(()=>[l("span",null,r(t.loading?"":a(s)("emptyData")),1)]),default:n(()=>[o(i,{prop:"ap_name",label:a(s)("apName"),"min-width":"120"},null,8,["label"]),o(i,{prop:"keywords",label:a(s)("keywords"),"min-width":"120"},null,8,["label"]),o(i,{label:a(s)("operation"),fixed:"right",align:"right","min-width":"160"},{default:n(({row:f})=>[o(u,{type:"primary",link:"",onClick:K=>_(f)},{default:n(()=>[L(r(a(s)("manageAdv")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[v,t.loading]])]),_:1})])}}});export{Y as default}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{d as g,v as k,f as w,l as y,h as d,c as x,e as o,w as n,a as l,t as r,u as a,J as C,m as E,k as s,i as L,$ as B,E as N,a0 as A,K as D,L as P}from"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{h as T}from"./web-326996f6.js";const $={class:"main-container"},V={class:"flex justify-between items-center mb-[20px]"},R={class:"text-page-title"},Y=g({__name:"adv_position",setup(j){const c=k(),p=w(),m=c.meta.title,t=y({loading:!0,data:[]});(()=>{T({}).then(e=>{t.loading=!1,t.data=e.data}).catch(()=>{t.loading=!1})})();const _=e=>{p.push(`/web/adv?adv_key=${e.keywords}&ap_name=${e.ap_name}`)};return(e,J)=>{const i=B,u=N,b=A,h=D,v=P;return d(),x("div",$,[o(h,{class:"box-card !border-none",shadow:"never"},{default:n(()=>[l("div",V,[l("span",R,r(a(m)),1)]),C((d(),E(b,{data:t.data,size:"large"},{empty:n(()=>[l("span",null,r(t.loading?"":a(s)("emptyData")),1)]),default:n(()=>[o(i,{prop:"ap_name",label:a(s)("apName"),"min-width":"120"},null,8,["label"]),o(i,{prop:"keywords",label:a(s)("keywords"),"min-width":"120"},null,8,["label"]),o(i,{label:a(s)("operation"),fixed:"right",align:"right","min-width":"160"},{default:n(({row:f})=>[o(u,{type:"primary",link:"",onClick:K=>_(f)},{default:n(()=>[L(r(a(s)("manageAdv")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[v,t.loading]])]),_:1})])}}});export{Y as default}; |
||||
@ -1 +0,0 @@ |
|||||
import{d as w,v as y,l as k,f as x,h as m,c as E,e as a,w as o,a as s,t as r,u as t,J as C,m as B,k as n,i as p,$ as L,E as N,a0 as T,K as D,L as A}from"./index-b867c57c.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{J as V}from"./sys-7c664cff.js";const $={class:"main-container"},j={class:"flex justify-between items-center"},J={class:"text-page-title"},R={class:"mt-[20px]"},Z=w({__name:"agreement",setup(z){const _=y().meta.title,e=k({loading:!0,data:[]});(()=>{e.loading=!0,e.data=[],V().then(l=>{Object.keys(l.data).forEach(d=>e.data.push(l.data[d])),e.loading=!1}).catch(()=>{e.loading=!1})})();const u=x(),g=l=>{u.push(`/setting/agreement/edit?key=${l.agreement_key}`)};return(l,d)=>{const i=L,h=N,f=T,b=D,v=A;return m(),E("div",$,[a(b,{class:"box-card !border-none",shadow:"never"},{default:o(()=>[s("div",j,[s("span",J,r(t(_)),1)]),s("div",R,[C((m(),B(f,{data:e.data,size:"large"},{empty:o(()=>[s("span",null,r(e.loading?"":t(n)("emptyData")),1)]),default:o(()=>[a(i,{prop:"type_name",label:t(n)("typeName"),"min-width":"100","show-overflow-tooltip":!0},null,8,["label"]),a(i,{prop:"title",label:t(n)("title"),"min-width":"100","show-overflow-tooltip":!0},null,8,["label"]),a(i,{label:t(n)("updateTime"),"min-width":"180",align:"center"},{default:o(({row:c})=>[p(r(c.update_time||""),1)]),_:1},8,["label"]),a(i,{label:t(n)("operation"),align:"right",fixed:"right",width:"100"},{default:o(({row:c})=>[a(h,{type:"primary",link:"",onClick:S=>g(c)},{default:o(()=>[p(r(t(n)("config")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[v,e.loading]])])]),_:1})])}}});export{Z as default}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{d as w,v as y,l as k,f as x,h as m,c as E,e as a,w as o,a as s,t as r,u as t,J as C,m as B,k as n,i as p,$ as L,E as N,a0 as T,K as D,L as A}from"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{J as V}from"./sys-8c546569.js";const $={class:"main-container"},j={class:"flex justify-between items-center"},J={class:"text-page-title"},R={class:"mt-[20px]"},Z=w({__name:"agreement",setup(z){const _=y().meta.title,e=k({loading:!0,data:[]});(()=>{e.loading=!0,e.data=[],V().then(l=>{Object.keys(l.data).forEach(d=>e.data.push(l.data[d])),e.loading=!1}).catch(()=>{e.loading=!1})})();const u=x(),g=l=>{u.push(`/setting/agreement/edit?key=${l.agreement_key}`)};return(l,d)=>{const i=L,h=N,f=T,b=D,v=A;return m(),E("div",$,[a(b,{class:"box-card !border-none",shadow:"never"},{default:o(()=>[s("div",j,[s("span",J,r(t(_)),1)]),s("div",R,[C((m(),B(f,{data:e.data,size:"large"},{empty:o(()=>[s("span",null,r(e.loading?"":t(n)("emptyData")),1)]),default:o(()=>[a(i,{prop:"type_name",label:t(n)("typeName"),"min-width":"100","show-overflow-tooltip":!0},null,8,["label"]),a(i,{prop:"title",label:t(n)("title"),"min-width":"100","show-overflow-tooltip":!0},null,8,["label"]),a(i,{label:t(n)("updateTime"),"min-width":"180",align:"center"},{default:o(({row:c})=>[p(r(c.update_time||""),1)]),_:1},8,["label"]),a(i,{label:t(n)("operation"),align:"right",fixed:"right",width:"100"},{default:o(({row:c})=>[a(h,{type:"primary",link:"",onClick:S=>g(c)},{default:o(()=>[p(r(t(n)("config")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[v,e.loading]])])]),_:1})])}}});export{Z as default}; |
||||
@ -0,0 +1 @@ |
|||||
|
import{d as N,v as P,f as S,r as y,bE as T,l as $,M as q,k as r,h,c as I,e as a,w as s,u as n,as as L,J as U,m as j,a as w,i as k,t as x,at as A,K as H,D as K,G as O,H as G,E as J,L as z}from"./index-35ab0ec6.js";/* empty css *//* empty css *//* empty css */import{_ as Q}from"./index.vue_vue_type_script_setup_true_lang-71c57f8b.js";import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css */import{K as W,L as X}from"./sys-8c546569.js";import"./index.vue_vue_type_style_index_0_lang-a89a11d7.js";/* empty css *//* empty css */import"./attachment-833f0f9c.js";import"./index.vue_vue_type_script_setup_true_lang-622ded9e.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-7a621647.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-dbdc262b.js";import"./_plugin-vue_export-helper-c27b6911.js";const Y={class:"main-container"},Z={class:"fixed-footer-wrap"},ee={class:"fixed-footer"},Ie=N({__name:"agreement_edit",setup(te){const d=P(),V=S(),_=d.query.key||"",i=y(!1),E=T(),D=d.meta.title,f={agreement_key:"",content:"",title:"",agreement_key_name:""},t=$({...f});i.value=!0,_&&(async(m="")=>{Object.assign(t,f);const e=await(await W(m)).data;Object.keys(t).forEach(o=>{e[o]!=null&&(t[o]=e[o])}),i.value=!1})(_);const g=y(),B=q(()=>({title:[{required:!0,message:r("titlePlaceholder"),trigger:"blur"}],content:[{required:!0,trigger:["blur","change"],validator:(m,e,o)=>{if(e==="")o(new Error(r("contentPlaceholder")));else{if(e.length<5||e.length>1e5)return o(new Error(r("contentMaxTips"))),!1;o()}}}]})),C=async m=>{i.value||!m||await m.validate(async e=>{if(e){i.value=!0;const o=t;o.key=t.agreement_key,X(o).then(c=>{i.value=!1,p()}).catch(()=>{i.value=!1})}})},p=()=>{E.removeTab(d.path),V.push({path:"/setting/agreement"})};return(m,e)=>{const o=A,c=H,v=K,u=O,F=Q,R=G,b=J,M=z;return h(),I("div",Y,[a(c,{class:"card !border-none",shadow:"never"},{default:s(()=>[a(o,{content:n(D),icon:n(L),onBack:e[0]||(e[0]=l=>p())},null,8,["content","icon"])]),_:1}),U((h(),j(c,{class:"box-card mt-[15px] !border-none",shadow:"never"},{default:s(()=>[a(R,{model:t,"label-width":"90px",ref_key:"formRef",ref:g,rules:n(B),class:"page-form"},{default:s(()=>[a(u,{label:n(r)("type")},{default:s(()=>[a(v,{modelValue:t.agreement_key_name,"onUpdate:modelValue":e[1]||(e[1]=l=>t.agreement_key_name=l),modelModifiers:{trim:!0},readonly:"",class:"input-width"},null,8,["modelValue"])]),_:1},8,["label"]),a(u,{label:n(r)("title"),prop:"title"},{default:s(()=>[a(v,{modelValue:t.title,"onUpdate:modelValue":e[2]||(e[2]=l=>t.title=l),modelModifiers:{trim:!0},clearable:"",placeholder:n(r)("titlePlaceholder"),class:"input-width",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(u,{label:n(r)("content"),prop:"content"},{default:s(()=>[a(F,{modelValue:t.content,"onUpdate:modelValue":e[3]||(e[3]=l=>t.content=l)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1})),[[M,i.value]]),w("div",Z,[w("div",ee,[a(b,{type:"primary",onClick:e[4]||(e[4]=l=>C(g.value))},{default:s(()=>[k(x(n(r)("save")),1)]),_:1}),a(b,{onClick:e[5]||(e[5]=l=>p())},{default:s(()=>[k(x(n(r)("cancel")),1)]),_:1})])])])}}});export{Ie as default}; |
||||
@ -1 +0,0 @@ |
|||||
import{d as N,v as P,f as S,r as y,bE as T,l as $,M as q,k as r,h,c as I,e as a,w as s,u as n,as as L,J as U,m as j,a as w,i as k,t as x,at as A,K as H,D as K,G as O,H as G,E as J,L as z}from"./index-b867c57c.js";/* empty css *//* empty css *//* empty css */import{_ as Q}from"./index.vue_vue_type_script_setup_true_lang-f304aee8.js";import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css */import{K as W,L as X}from"./sys-7c664cff.js";import"./index.vue_vue_type_style_index_0_lang-a9b624ac.js";/* empty css *//* empty css */import"./attachment-147edd8b.js";import"./index.vue_vue_type_script_setup_true_lang-74e5798e.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-6a42996e.js";/* empty css */import"./index.vue_vue_type_script_setup_true_lang-00ceafe8.js";import"./_plugin-vue_export-helper-c27b6911.js";const Y={class:"main-container"},Z={class:"fixed-footer-wrap"},ee={class:"fixed-footer"},Ie=N({__name:"agreement_edit",setup(te){const d=P(),V=S(),_=d.query.key||"",i=y(!1),E=T(),D=d.meta.title,f={agreement_key:"",content:"",title:"",agreement_key_name:""},t=$({...f});i.value=!0,_&&(async(m="")=>{Object.assign(t,f);const e=await(await W(m)).data;Object.keys(t).forEach(o=>{e[o]!=null&&(t[o]=e[o])}),i.value=!1})(_);const g=y(),B=q(()=>({title:[{required:!0,message:r("titlePlaceholder"),trigger:"blur"}],content:[{required:!0,trigger:["blur","change"],validator:(m,e,o)=>{if(e==="")o(new Error(r("contentPlaceholder")));else{if(e.length<5||e.length>1e5)return o(new Error(r("contentMaxTips"))),!1;o()}}}]})),C=async m=>{i.value||!m||await m.validate(async e=>{if(e){i.value=!0;const o=t;o.key=t.agreement_key,X(o).then(c=>{i.value=!1,p()}).catch(()=>{i.value=!1})}})},p=()=>{E.removeTab(d.path),V.push({path:"/setting/agreement"})};return(m,e)=>{const o=A,c=H,v=K,u=O,F=Q,R=G,b=J,M=z;return h(),I("div",Y,[a(c,{class:"card !border-none",shadow:"never"},{default:s(()=>[a(o,{content:n(D),icon:n(L),onBack:e[0]||(e[0]=l=>p())},null,8,["content","icon"])]),_:1}),U((h(),j(c,{class:"box-card mt-[15px] !border-none",shadow:"never"},{default:s(()=>[a(R,{model:t,"label-width":"90px",ref_key:"formRef",ref:g,rules:n(B),class:"page-form"},{default:s(()=>[a(u,{label:n(r)("type")},{default:s(()=>[a(v,{modelValue:t.agreement_key_name,"onUpdate:modelValue":e[1]||(e[1]=l=>t.agreement_key_name=l),modelModifiers:{trim:!0},readonly:"",class:"input-width"},null,8,["modelValue"])]),_:1},8,["label"]),a(u,{label:n(r)("title"),prop:"title"},{default:s(()=>[a(v,{modelValue:t.title,"onUpdate:modelValue":e[2]||(e[2]=l=>t.title=l),modelModifiers:{trim:!0},clearable:"",placeholder:n(r)("titlePlaceholder"),class:"input-width",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(u,{label:n(r)("content"),prop:"content"},{default:s(()=>[a(F,{modelValue:t.content,"onUpdate:modelValue":e[3]||(e[3]=l=>t.content=l)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1})),[[M,i.value]]),w("div",Z,[w("div",ee,[a(b,{type:"primary",onClick:e[4]||(e[4]=l=>C(g.value))},{default:s(()=>[k(x(n(r)("save")),1)]),_:1}),a(b,{onClick:e[5]||(e[5]=l=>p())},{default:s(()=>[k(x(n(r)("cancel")),1)]),_:1})])])])}}});export{Ie as default}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{au as t}from"./index-35ab0ec6.js";function e(){return t.get("aliapp/config")}function p(a){return t.put("aliapp/config",a,{showSuccessMessage:!0})}function n(){return t.get("aliapp/static")}export{n as a,e as g,p as s}; |
||||
@ -1 +0,0 @@ |
|||||
import{au as t}from"./index-b867c57c.js";function e(){return t.get("aliapp/config")}function p(a){return t.put("aliapp/config",a,{showSuccessMessage:!0})}function n(){return t.get("aliapp/static")}export{n as a,e as g,p as s}; |
|
||||
@ -0,0 +1 @@ |
|||||
|
import{d as I,f as V,j as M,r as y,l as N,J as R,h as r,c as x,a as e,t as s,u as a,k as o,e as u,w as c,F as j,O as D,z as T,m as z,i as O,B as k,bq as U,br as b,aw as w,E as q,C as J,ax as P,bs as Z,Z as $,L as G,p as H,g as K}from"./index-35ab0ec6.js";/* empty css *//* empty css */import{_ as Q}from"./apply_empty-6a5331b2.js";import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css */import{_ as W}from"./_plugin-vue_export-helper-c27b6911.js";const X=""+new URL("app_store_default-c0531792.png",import.meta.url).href,f=d=>(H("data-v-cd580eb6"),d=d(),K(),d),Y={class:"box-border pt-[68px] px-[76px] overview-top"},ee={key:0},te={class:"flex justify-between items-center"},se={class:"font-[600] text-[26px] text-[#222] leading-[37px]"},ae={class:"font-[500] text-[14px] text-[#222] leading-[20px] mt-[12px]"},oe=f(()=>e("div",{class:"mr-[9px] text-[#3F3F3F] iconfont iconxiazai01"},null,-1)),ne={class:"font-[600] text-[14px] text-[#222] leading-[20px]"},pe={class:"flex flex-wrap mt-[40px]"},ce=["onClick"],ie={class:"bg-[#F7FAFB] py-[18px] px-[24px] flex items-center app-item-head"},le=f(()=>e("div",{class:"image-slot"},[e("img",{class:"w-[40px] h-[40px] rounded-[8px]",src:X})],-1)),re={class:"py-[18px] px-[24px]"},de={class:"font-[600] leading-[1] text-[14px] text-[#222]"},_e={class:"text-[13px] text-[#6D7278] leading-[18px] mt-[6px] truncate"},xe=f(()=>e("div",{class:"w-[230px] mx-auto"},[e("img",{src:Q,class:"max-w-full",alt:""})],-1)),ue={class:"flex items-center"},me=I({__name:"app_manage",setup(d){const v=V(),m=M(),n=y(!0),_=N({appList:[]}),h=y({});(()=>{n.value=!0,U().then(p=>{Object.values(p.data).forEach((t,i)=>{t.type=="app"&&_.appList.push(t)}),m.routers.forEach((t,i)=>{t.children&&t.children.length?(t.name=b(t.children),h.value[t.meta.app]=b(t.children)):h.value[t.meta.app]=t.name}),n.value=!1}).catch(()=>{n.value=!1})})();const L=p=>{w.set({key:"menuAppStorage",data:p.key}),w.set({key:"plugMenuTypeStorage",data:""});const t=m.appMenuList;t.push(p.key),m.setAppMenuList(t);const i=h.value[p.key];v.push({name:i})},g=()=>{v.push("/app_manage/app_store")};return(p,t)=>{const i=q,F=J,E=P,S=Z,C=$,A=G;return R((r(),x("div",Y,[_.appList&&!n.value?(r(),x("div",ee,[e("div",te,[e("div",null,[e("div",se,s(a(o)("app")),1),e("div",ae,s(a(o)("versionInfo"))+" "+s(a(o)("currentVersion")),1)]),u(i,{onClick:g,class:"px-[15px]"},{default:c(()=>[oe,e("span",ne,s(a(o)("appStore")),1)]),_:1})]),e("div",pe,[(r(!0),x(j,null,D(_.appList,(l,B)=>(r(),x("div",{key:B,class:"app-item w-[280px] box-border !bg-[#fff] rounded-[6px] cursor-pointer mr-[20px] mb-[20px] overflow-hidden",onClick:fe=>L(l)},[e("div",ie,[u(F,{class:"w-[44px] h-[44px] rounded-[8px]",src:a(T)(l.icon),fit:"contain"},{error:c(()=>[le]),_:2},1032,["src"])]),e("div",re,[e("div",de,s(l.title),1),u(E,{class:"box-item",effect:"light",content:l.desc,placement:"bottom-start"},{default:c(()=>[e("div",_e,s(l.desc),1)]),_:2},1032,["content"])])],8,ce))),128)),!_.appList.length&&!n.value?(r(),z(C,{key:0,class:"mx-auto overview-empty"},{image:c(()=>[xe]),description:c(()=>[e("p",ue,[e("span",null,s(a(o)("descriptionLeft")),1),u(S,{type:"primary",onClick:g,class:"mx-[5px]"},{default:c(()=>[O(s(a(o)("link")),1)]),_:1}),e("span",null,s(a(o)("descriptionRight")),1)])]),_:1})):k("",!0)])])):k("",!0)])),[[A,n.value]])}}});const Ce=W(me,[["__scopeId","data-v-cd580eb6"]]);export{Ce as default}; |
||||
@ -1 +0,0 @@ |
|||||
import{d as I,f as V,j as M,r as y,l as N,J as R,h as r,c as x,a as e,t as s,u as a,k as o,e as u,w as c,F as j,O as D,z as T,m as z,i as O,B as k,bq as U,br as b,aw as w,E as q,C as J,ax as P,bs as Z,Z as $,L as G,p as H,g as K}from"./index-b867c57c.js";/* empty css *//* empty css */import{_ as Q}from"./apply_empty-6a5331b2.js";import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css */import{_ as W}from"./_plugin-vue_export-helper-c27b6911.js";const X=""+new URL("app_store_default-c0531792.png",import.meta.url).href,f=d=>(H("data-v-cd580eb6"),d=d(),K(),d),Y={class:"box-border pt-[68px] px-[76px] overview-top"},ee={key:0},te={class:"flex justify-between items-center"},se={class:"font-[600] text-[26px] text-[#222] leading-[37px]"},ae={class:"font-[500] text-[14px] text-[#222] leading-[20px] mt-[12px]"},oe=f(()=>e("div",{class:"mr-[9px] text-[#3F3F3F] iconfont iconxiazai01"},null,-1)),ne={class:"font-[600] text-[14px] text-[#222] leading-[20px]"},pe={class:"flex flex-wrap mt-[40px]"},ce=["onClick"],ie={class:"bg-[#F7FAFB] py-[18px] px-[24px] flex items-center app-item-head"},le=f(()=>e("div",{class:"image-slot"},[e("img",{class:"w-[40px] h-[40px] rounded-[8px]",src:X})],-1)),re={class:"py-[18px] px-[24px]"},de={class:"font-[600] leading-[1] text-[14px] text-[#222]"},_e={class:"text-[13px] text-[#6D7278] leading-[18px] mt-[6px] truncate"},xe=f(()=>e("div",{class:"w-[230px] mx-auto"},[e("img",{src:Q,class:"max-w-full",alt:""})],-1)),ue={class:"flex items-center"},me=I({__name:"app_manage",setup(d){const v=V(),m=M(),n=y(!0),_=N({appList:[]}),h=y({});(()=>{n.value=!0,U().then(p=>{Object.values(p.data).forEach((t,i)=>{t.type=="app"&&_.appList.push(t)}),m.routers.forEach((t,i)=>{t.children&&t.children.length?(t.name=b(t.children),h.value[t.meta.app]=b(t.children)):h.value[t.meta.app]=t.name}),n.value=!1}).catch(()=>{n.value=!1})})();const L=p=>{w.set({key:"menuAppStorage",data:p.key}),w.set({key:"plugMenuTypeStorage",data:""});const t=m.appMenuList;t.push(p.key),m.setAppMenuList(t);const i=h.value[p.key];v.push({name:i})},g=()=>{v.push("/app_manage/app_store")};return(p,t)=>{const i=q,F=J,E=P,S=Z,C=$,A=G;return R((r(),x("div",Y,[_.appList&&!n.value?(r(),x("div",ee,[e("div",te,[e("div",null,[e("div",se,s(a(o)("app")),1),e("div",ae,s(a(o)("versionInfo"))+" "+s(a(o)("currentVersion")),1)]),u(i,{onClick:g,class:"px-[15px]"},{default:c(()=>[oe,e("span",ne,s(a(o)("appStore")),1)]),_:1})]),e("div",pe,[(r(!0),x(j,null,D(_.appList,(l,B)=>(r(),x("div",{key:B,class:"app-item w-[280px] box-border !bg-[#fff] rounded-[6px] cursor-pointer mr-[20px] mb-[20px] overflow-hidden",onClick:fe=>L(l)},[e("div",ie,[u(F,{class:"w-[44px] h-[44px] rounded-[8px]",src:a(T)(l.icon),fit:"contain"},{error:c(()=>[le]),_:2},1032,["src"])]),e("div",re,[e("div",de,s(l.title),1),u(E,{class:"box-item",effect:"light",content:l.desc,placement:"bottom-start"},{default:c(()=>[e("div",_e,s(l.desc),1)]),_:2},1032,["content"])])],8,ce))),128)),!_.appList.length&&!n.value?(r(),z(C,{key:0,class:"mx-auto overview-empty"},{image:c(()=>[xe]),description:c(()=>[e("p",ue,[e("span",null,s(a(o)("descriptionLeft")),1),u(S,{type:"primary",onClick:g,class:"mx-[5px]"},{default:c(()=>[O(s(a(o)("link")),1)]),_:1}),e("span",null,s(a(o)("descriptionRight")),1)])]),_:1})):k("",!0)])])):k("",!0)])),[[A,n.value]])}}});const Ce=W(me,[["__scopeId","data-v-cd580eb6"]]);export{Ce as default}; |
|
||||
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@ |
|||||
import{au as s}from"./index-b867c57c.js";function r(e){return s.get("zhjw/articles",{params:e})}function u(e){return s.get(`zhjw/articles/${e}`)}function c(e){return s.post("zhjw/articles",e,{showErrorMessage:!0,showSuccessMessage:!0})}function i(e){return s.put(`zhjw/articles/${e.id}`,e,{showErrorMessage:!0,showSuccessMessage:!0})}function a(e){return s.delete(`zhjw/articles/${e}`,{showErrorMessage:!0,showSuccessMessage:!0})}function o(e){return s.get("zhjw/sys_user_all",{params:e})}export{o as a,u as b,c,a as d,i as e,r as g}; |
|
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue