revert 02e26691c0
revert Merge branch 'master' of http://101.43.112.107:3000/root/allLikeMall
This commit is contained in:
parent
02e26691c0
commit
1da4cf5a76
@ -12,11 +12,12 @@ export interface StaffVO {
|
|||||||
photo: string // 照片
|
photo: string // 照片
|
||||||
phone: string // 手机号
|
phone: string // 手机号
|
||||||
serviceTime: string // 服务时间段
|
serviceTime: string // 服务时间段
|
||||||
|
serviceStartTime: string
|
||||||
|
serviceEndTime: string
|
||||||
serviceScope: string // 服务范围
|
serviceScope: string // 服务范围
|
||||||
sign: number // 约满标记
|
sign: number // 约满标记
|
||||||
status: number // 状态
|
status: number // 状态
|
||||||
content: string // 介绍
|
content: string // 介绍
|
||||||
serviceTimeArray: string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 预约人员 API
|
// 预约人员 API
|
||||||
|
@ -108,27 +108,11 @@ export const getDictLabel = (dictType: string, value: any): string => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export enum DICT_TYPE {
|
export enum DICT_TYPE {
|
||||||
|
|
||||||
USER_TYPE = 'user_type',
|
USER_TYPE = 'user_type',
|
||||||
COMMON_STATUS = 'common_status',
|
COMMON_STATUS = 'common_status',
|
||||||
TERMINAL = 'terminal', // 终端
|
TERMINAL = 'terminal', // 终端
|
||||||
DATE_INTERVAL = 'date_interval', // 数据间隔
|
DATE_INTERVAL = 'date_interval', // 数据间隔
|
||||||
|
|
||||||
//预约:人员管理
|
|
||||||
STALL_SEX = 'stall_sex',
|
|
||||||
STAFF_STATUS = 'staff_status',
|
|
||||||
STAFF_FULL = 'staff_full',
|
|
||||||
STAFF_TYPE = 'staff_type',
|
|
||||||
|
|
||||||
//预约:预约管理
|
|
||||||
SUBSCRIBE_TYPE = 'subscribe_type',
|
|
||||||
SUBSCRIBE_CHECK_STATUS = 'subscribe_check_status',
|
|
||||||
SUBSCRIBE_STATUS = 'subscribe_status',
|
|
||||||
|
|
||||||
//预约:机构管理
|
|
||||||
ORGANIZATION_STATUS = 'organization_status',
|
|
||||||
|
|
||||||
|
|
||||||
// ========== SYSTEM 模块 ==========
|
// ========== SYSTEM 模块 ==========
|
||||||
SYSTEM_USER_SEX = 'system_user_sex',
|
SYSTEM_USER_SEX = 'system_user_sex',
|
||||||
SYSTEM_MENU_TYPE = 'system_menu_type',
|
SYSTEM_MENU_TYPE = 'system_menu_type',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
@ -68,13 +68,6 @@ const formData = ref({
|
|||||||
status: undefined,
|
status: undefined,
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
|
||||||
phone: [{ required: true, message: '手机号不能为空', trigger: 'blur' }],
|
|
||||||
email: [{ required: true, message: '邮箱不能为空', trigger: 'blur' }],
|
|
||||||
picturre: [{ required: true, message: '图片不能为空', trigger: 'blur' }],
|
|
||||||
address: [{ required: true, message: '地址不能为空', trigger: 'blur' }],
|
|
||||||
depict: [{ required: true, message: '简介不能为空', trigger: 'blur' }],
|
|
||||||
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }],
|
|
||||||
})
|
})
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
|
|
||||||
|
@ -1,13 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
||||||
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="90px" v-loading="formLoading">
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
:model="formData"
|
||||||
|
:rules="formRules"
|
||||||
|
label-width="90px"
|
||||||
|
v-loading="formLoading"
|
||||||
|
>
|
||||||
<!-- <el-form-item label="所属机构" prop="organizationId">
|
<!-- <el-form-item label="所属机构" prop="organizationId">
|
||||||
<el-input v-model="formData.organizationId" placeholder="请输入机构id" />
|
<el-input v-model="formData.organizationId" placeholder="请输入机构id" />
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="所属机构" prop="organizationId">
|
<el-form-item label="所属机构" prop="organizationId">
|
||||||
<el-select v-model="formData.organizationId" placeholder="请选择机构" clearable class="!w-240px">
|
<el-select
|
||||||
<el-option v-for="organizationNameOptions in option" :key="organizationNameOptions.id"
|
v-model="formData.organizationId"
|
||||||
:label="organizationNameOptions.name" :value="organizationNameOptions.id" />
|
placeholder="请选择机构"
|
||||||
|
clearable
|
||||||
|
class="!w-240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="organizationNameOptions in option"
|
||||||
|
:key="organizationNameOptions.id"
|
||||||
|
:label="organizationNameOptions.name"
|
||||||
|
:value="organizationNameOptions.id"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="编号" prop="serialNumber">
|
<el-form-item label="编号" prop="serialNumber">
|
||||||
@ -15,8 +30,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类型" prop="type">
|
<el-form-item label="类型" prop="type">
|
||||||
<el-select v-model="formData.type" placeholder="请选择类型">
|
<el-select v-model="formData.type" placeholder="请选择类型">
|
||||||
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.STAFF_TYPE)" :key="dict.value"
|
<el-option
|
||||||
:label="dict.label" :value="dict.value" />
|
v-for="dict in getIntDictOptions(DICT_TYPE.STAFF_TYPE)"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
@ -24,8 +43,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="性别" prop="sex">
|
<el-form-item label="性别" prop="sex">
|
||||||
<el-select v-model="formData.sex" placeholder="请选择性别">
|
<el-select v-model="formData.sex" placeholder="请选择性别">
|
||||||
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.STALL_SEX)" :key="dict.value"
|
<el-option
|
||||||
:label="dict.label" :value="dict.value" />
|
v-for="dict in getIntDictOptions(DICT_TYPE.STALL_SEX)"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="照片" prop="photo">
|
<el-form-item label="照片" prop="photo">
|
||||||
@ -36,51 +59,59 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="服务时间段" prop="serviceTime">
|
<el-form-item label="服务时间段" prop="serviceTime">
|
||||||
<div v-for="(item, index) in timeRanges" :key="index" class="time-range">
|
<!-- <el-date-picker
|
||||||
<div class="left">
|
v-model="formData.serviceTime"
|
||||||
|
type="date"
|
||||||
|
value-format="x"
|
||||||
|
placeholder="选择服务时间段"
|
||||||
|
/> -->
|
||||||
|
<el-col :span="11">
|
||||||
<el-time-select
|
<el-time-select
|
||||||
v-model="item.start"
|
placeholder="起始时间"
|
||||||
:max-time="item.end"
|
v-model="formData.serviceStartTime"
|
||||||
class="mr-4"
|
:picker-options="{
|
||||||
placeholder="开始时间"
|
start: '08:30',
|
||||||
start="07:00"
|
step: '00:15',
|
||||||
step="00:05"
|
end: '18:30'
|
||||||
end="23:30"
|
}"/>
|
||||||
/>
|
</el-col>
|
||||||
</div>
|
<el-col :span="2">
|
||||||
<div class="center">
|
<div style="text-align: center;">-</div>
|
||||||
-
|
</el-col>
|
||||||
</div>
|
<el-col :span="11">
|
||||||
<div class="right">
|
|
||||||
<el-time-select
|
<el-time-select
|
||||||
v-model="item.end"
|
|
||||||
:min-time="item.start"
|
|
||||||
placeholder="结束时间"
|
placeholder="结束时间"
|
||||||
start="07:00"
|
v-model="formData.serviceEndTime"
|
||||||
step="00:05"
|
:picker-options="{
|
||||||
end="23:30"
|
start: '08:30',
|
||||||
/>
|
step: '00:15',
|
||||||
</div>
|
end: '18:30',
|
||||||
<el-button @click="removeTime(index)" type="danger" size="mini">移除</el-button>
|
minTime: formData.serviceStartTime
|
||||||
</div>
|
}"/>
|
||||||
|
</el-col>
|
||||||
<el-button @click="addTime" type="primary" size="small">添加时间段</el-button>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item label="服务范围" prop="serviceScope">
|
<el-form-item label="服务范围" prop="serviceScope">
|
||||||
<el-input v-model="formData.serviceScope" placeholder="请输入服务范围" />
|
<el-input v-model="formData.serviceScope" placeholder="请输入服务范围" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="约满标记" prop="sign">
|
<el-form-item label="约满标记" prop="sign">
|
||||||
<el-select v-model="formData.sign" placeholder="请选择约满标记">
|
<el-select v-model="formData.sign" placeholder="请选择约满标记">
|
||||||
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.STAFF_FULL)" :key="dict.value"
|
<el-option
|
||||||
:label="dict.label" :value="dict.value" />
|
v-for="dict in getIntDictOptions(DICT_TYPE.STAFF_FULL)"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-select v-model="formData.status" placeholder="请选择状态">
|
<el-select v-model="formData.status" placeholder="请选择状态">
|
||||||
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.STAFF_STATUS)" :key="dict.value"
|
<el-option
|
||||||
:label="dict.label" :value="dict.value" />
|
v-for="dict in getIntDictOptions(DICT_TYPE.STAFF_STATUS)"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="介绍" prop="content">
|
<el-form-item label="介绍" prop="content">
|
||||||
@ -98,7 +129,6 @@
|
|||||||
import { StaffApi, StaffVO } from '@/api/subscribe/staff'
|
import { StaffApi, StaffVO } from '@/api/subscribe/staff'
|
||||||
import { OrganizationApi, OrganizationVO } from '@/api/subscribe/organization'
|
import { OrganizationApi, OrganizationVO } from '@/api/subscribe/organization'
|
||||||
|
|
||||||
|
|
||||||
/** 预约人员 表单 */
|
/** 预约人员 表单 */
|
||||||
defineOptions({ name: 'StaffForm' })
|
defineOptions({ name: 'StaffForm' })
|
||||||
|
|
||||||
@ -118,44 +148,21 @@
|
|||||||
sex: undefined,
|
sex: undefined,
|
||||||
photo: undefined,
|
photo: undefined,
|
||||||
phone: undefined,
|
phone: undefined,
|
||||||
serviceTime: '',
|
serviceTime: undefined,
|
||||||
serviceTimeArray: [{}],
|
serviceStartTime: undefined,
|
||||||
|
serviceEndTime: undefined,
|
||||||
serviceScope: undefined,
|
serviceScope: undefined,
|
||||||
sign: undefined,
|
sign: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
content: undefined,
|
content: undefined,
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
organizationId: [{ required: true, message: '所属机构不能为空', trigger: 'blur' }],
|
|
||||||
serialNumber: [{ required: true, message: '编号不能为空', trigger: 'blur' }],
|
|
||||||
type: [{ required: true, message: '类型不能为空', trigger: 'blur' }],
|
|
||||||
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
|
||||||
sex: [{ required: true, message: '性别不能为空', trigger: 'blur' }],
|
|
||||||
photo: [{ required: true, message: '照片不能为空', trigger: 'blur' }],
|
|
||||||
phone: [{ required: true, message: '手机号不能为空', trigger: 'blur' }],
|
|
||||||
// serviceTime: [{ required: true, message: '服务时间段不能为空', trigger: 'blur' }],
|
|
||||||
serviceScope: [{ required: true, message: '服务范围不能为空', trigger: 'blur' }],
|
|
||||||
sign: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }],
|
|
||||||
content: [{ required: true, message: '介绍不能为空', trigger: 'blur' }]
|
|
||||||
})
|
})
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
|
|
||||||
|
|
||||||
const timeRanges = ref([{ start: '', end: '' }]);
|
|
||||||
|
|
||||||
const addTime = () => {
|
|
||||||
timeRanges.value.push({ start: '', end: '' });
|
|
||||||
};
|
|
||||||
|
|
||||||
const removeTime = (index : number) => {
|
|
||||||
if (timeRanges.value.length > 1) {
|
|
||||||
timeRanges.value.splice(index, 1);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//初始化机构名称下拉框
|
//初始化机构名称下拉框
|
||||||
const getOrganizations = async () => {
|
const getOrganizations = async () => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
option.value = await OrganizationApi.getOrganizations()
|
option.value = await OrganizationApi.getOrganizations()
|
||||||
} finally {
|
} finally {
|
||||||
@ -167,39 +174,28 @@
|
|||||||
const open = async (type: string, id?: number) => {
|
const open = async (type: string, id?: number) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
dialogTitle.value = t('action.' + type)
|
dialogTitle.value = t('action.' + type)
|
||||||
timeRanges.value = ([]) //清空timeRanges的数据
|
|
||||||
timeRanges.value.push({ start: '', end: '' }); //再将timeRaanges设置为{ start: '', end: '' }
|
|
||||||
formType.value = type
|
formType.value = type
|
||||||
resetForm()
|
resetForm()
|
||||||
// 修改时,设置数据
|
// 修改时,设置数据
|
||||||
if (id) {
|
if (id) {
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
timeRanges.value = ([]); //修改页面:组件设置为空
|
|
||||||
formData.value = await StaffApi.getStaff(id)
|
formData.value = await StaffApi.getStaff(id)
|
||||||
const timeRange = JSON.parse(formData.value.serviceTime)
|
|
||||||
for (var i = 0; i < timeRange.length; i++) {
|
|
||||||
timeRanges.value.push(timeRange[i]); //原有的时间段push上去
|
|
||||||
}
|
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
/** 提交表单 */
|
/** 提交表单 */
|
||||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||||
const submitForm = async () => {
|
const submitForm = async () => {
|
||||||
|
|
||||||
// 校验表单
|
// 校验表单
|
||||||
await formRef.value.validate()
|
await formRef.value.validate()
|
||||||
// 提交请求
|
// 提交请求
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
formData.value.serviceTime = JSON.stringify(timeRanges.value);
|
|
||||||
const data = formData.value as unknown as StaffVO
|
const data = formData.value as unknown as StaffVO
|
||||||
if (formType.value === 'create') {
|
if (formType.value === 'create') {
|
||||||
await StaffApi.createStaff(data)
|
await StaffApi.createStaff(data)
|
||||||
@ -227,8 +223,9 @@
|
|||||||
sex: undefined,
|
sex: undefined,
|
||||||
photo: undefined,
|
photo: undefined,
|
||||||
phone: undefined,
|
phone: undefined,
|
||||||
serviceTime: '',
|
serviceTime: undefined,
|
||||||
serviceTimeArray: [{}],
|
serviceStartTime: undefined,
|
||||||
|
serviceEndTime: undefined,
|
||||||
serviceScope: undefined,
|
serviceScope: undefined,
|
||||||
sign: undefined,
|
sign: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
@ -241,37 +238,5 @@
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getOrganizations()
|
getOrganizations()
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.time-range {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
margin-right: 40px;
|
|
||||||
/* width: 300px;
|
|
||||||
height: 150px; */
|
|
||||||
display: flex;
|
|
||||||
/* justify-content: space-between; */
|
|
||||||
}
|
|
||||||
|
|
||||||
.left {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.center {
|
|
||||||
width: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.right {
|
|
||||||
width: 150px;
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* .separator {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.remove-btn {
|
|
||||||
text-align: right;
|
|
||||||
margin-top: 5px;
|
|
||||||
} */
|
|
||||||
</style>
|
|
@ -80,7 +80,7 @@
|
|||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="服务时间段" prop="serviceTime">
|
<el-form-item label="服务时间段" prop="serviceTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.serviceTime"
|
v-model="queryParams.serviceTime"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
@ -99,7 +99,7 @@
|
|||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item> -->
|
</el-form-item>
|
||||||
<el-form-item label="约满标记" prop="sign">
|
<el-form-item label="约满标记" prop="sign">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.sign"
|
v-model="queryParams.sign"
|
||||||
@ -197,8 +197,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="手机号" align="center" prop="phone" />
|
<el-table-column label="手机号" align="center" prop="phone" />
|
||||||
<el-table-column label="服务时间段" align="center" prop="serviceTimeArray" width="200" />
|
<el-table-column label="服务时间段" align="center" prop="serviceTime" width="100" />
|
||||||
<el-table-column label="服务范围" align="center" prop="serviceScope" />
|
<el-table-column label="服务范围" align="center" prop="serviceScope" :formatter="dateFormatter"/>
|
||||||
<el-table-column label="约满标记" align="center" prop="sign" width="100">
|
<el-table-column label="约满标记" align="center" prop="sign" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.STAFF_FULL" :value="scope.row.sign" />
|
<dict-tag :type="DICT_TYPE.STAFF_FULL" :value="scope.row.sign" />
|
||||||
@ -209,11 +209,7 @@
|
|||||||
<dict-tag :type="DICT_TYPE.STAFF_STATUS" :value="scope.row.status" />
|
<dict-tag :type="DICT_TYPE.STAFF_STATUS" :value="scope.row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="介绍" align="center" prop="content" >
|
<el-table-column label="介绍" align="center" prop="content" />
|
||||||
<template #default="scope">
|
|
||||||
<div v-html="scope.row.content"></div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
align="center"
|
align="center"
|
||||||
@ -284,7 +280,7 @@ const queryParams = reactive({
|
|||||||
sex: undefined,
|
sex: undefined,
|
||||||
photo: undefined,
|
photo: undefined,
|
||||||
phone: undefined,
|
phone: undefined,
|
||||||
serviceTime: undefined,
|
serviceTime: [],
|
||||||
serviceScope: undefined,
|
serviceScope: undefined,
|
||||||
sign: undefined,
|
sign: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
|
@ -20,12 +20,6 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属机构" prop="organizationId">
|
|
||||||
<el-select v-model="formData.organizationId" placeholder="请选择机构" clearable class="!w-240px">
|
|
||||||
<el-option v-for="organizationNameOptions in option" :key="organizationNameOptions.id"
|
|
||||||
:label="organizationNameOptions.name" :value="organizationNameOptions.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="预约人员id" prop="staffId">
|
<el-form-item label="预约人员id" prop="staffId">
|
||||||
<el-input v-model="formData.staffId" placeholder="请输入预约人员id" />
|
<el-input v-model="formData.staffId" placeholder="请输入预约人员id" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -37,20 +31,10 @@
|
|||||||
placeholder="选择预约时间"
|
placeholder="选择预约时间"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="预约状态" prop="subscribeStatus">
|
<el-form-item label="预约状态" prop="subscribeStatus">
|
||||||
<el-radio-group v-model="formData.subscribeStatus">
|
<el-radio-group v-model="formData.subscribeStatus">
|
||||||
<el-radio label="1">请选择字典生成</el-radio>
|
<el-radio label="1">请选择字典生成</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item label="预约状态" prop="subscribeStatus">
|
|
||||||
<el-select v-model="formData.subscribeStatus" placeholder="请选择预约状态">
|
|
||||||
<el-option
|
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.SUBSCRIBE_STATUS)"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审核状态" prop="checkStatus">
|
<el-form-item label="审核状态" prop="checkStatus">
|
||||||
<el-select v-model="formData.checkStatus" placeholder="请选择审核状态">
|
<el-select v-model="formData.checkStatus" placeholder="请选择审核状态">
|
||||||
@ -72,7 +56,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||||
import { ManageApi, ManageVO } from '@/api/subscribe/subscribemanage'
|
import { ManageApi, ManageVO } from '@/api/subscribe/subscribemanage'
|
||||||
import { OrganizationApi, OrganizationVO } from '@/api/subscribe/organization'
|
|
||||||
|
|
||||||
/** 预约 表单 */
|
/** 预约 表单 */
|
||||||
defineOptions({ name: 'ManageForm' })
|
defineOptions({ name: 'ManageForm' })
|
||||||
@ -82,7 +65,6 @@ const message = useMessage() // 消息弹窗
|
|||||||
|
|
||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const dialogTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const option = ref<OrganizationVO[]>([]);
|
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
@ -95,23 +77,9 @@ const formData = ref({
|
|||||||
checkStatus: undefined,
|
checkStatus: undefined,
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
userId: [{ required: true, message: '用户不能为空', trigger: 'blur' }],
|
|
||||||
type: [{ required: true, message: '预约类型不能为空', trigger: 'blur' }],
|
|
||||||
staffId: [{ required: true, message: '预约人员不能为空', trigger: 'blur' }],
|
|
||||||
subscribeTime: [{ required: true, message: '预约时间不能为空', trigger: 'blur' }],
|
|
||||||
subscribeStatus: [{ required: true, message: '预约状态不能为空', trigger: 'blur' }],
|
|
||||||
})
|
})
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
|
|
||||||
//初始化机构名称下拉框
|
|
||||||
const getOrganizations = async () => {
|
|
||||||
try {
|
|
||||||
option.value = await OrganizationApi.getOrganizations()
|
|
||||||
} finally {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (type: string, id?: number) => {
|
const open = async (type: string, id?: number) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
@ -154,10 +122,6 @@ const submitForm = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 初始化 **/
|
|
||||||
onMounted(() => {
|
|
||||||
getOrganizations()
|
|
||||||
})
|
|
||||||
/** 重置表单 */
|
/** 重置表单 */
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
:inline="true"
|
:inline="true"
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
>
|
>
|
||||||
<!-- <el-form-item label="用户" prop="userId">
|
<el-form-item label="用户" prop="userId">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.userId"
|
v-model="queryParams.userId"
|
||||||
placeholder="请输入用户"
|
placeholder="请输入用户"
|
||||||
@ -16,7 +16,7 @@
|
|||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item> -->
|
</el-form-item>
|
||||||
<el-form-item label="预约类型" prop="type">
|
<el-form-item label="预约类型" prop="type">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.type"
|
v-model="queryParams.type"
|
||||||
@ -32,7 +32,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="预约人员" prop="staffName">
|
<el-form-item label="预约人员" prop="staffName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.staffName"
|
v-model="queryParams.staffName"
|
||||||
placeholder="请输入预约人员"
|
placeholder="请输入预约人员"
|
||||||
@ -40,8 +40,8 @@
|
|||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item> -->
|
</el-form-item>
|
||||||
<!-- <el-form-item label="预约时间" prop="subscribeTime">
|
<el-form-item label="预约时间" prop="subscribeTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.subscribeTime"
|
v-model="queryParams.subscribeTime"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
@ -51,7 +51,7 @@
|
|||||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item> -->
|
</el-form-item>
|
||||||
<el-form-item label="预约状态" prop="subscribeStatus">
|
<el-form-item label="预约状态" prop="subscribeStatus">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.subscribeStatus"
|
v-model="queryParams.subscribeStatus"
|
||||||
@ -59,12 +59,7 @@
|
|||||||
clearable
|
clearable
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option label="请选择字典生成" value="" />
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.SUBSCRIBE_STATUS)"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审核状态" prop="checkStatus">
|
<el-form-item label="审核状态" prop="checkStatus">
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.srbscribe.controller.admin.staff.vo;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ServiceTimeVO {
|
|
||||||
private String start;
|
|
||||||
private String end;
|
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
package cn.iocoder.yudao.module.srbscribe.controller.admin.staff.vo;
|
package cn.iocoder.yudao.module.srbscribe.controller.admin.staff.vo;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -38,12 +37,14 @@ public class StaffPageReqVO extends PageParam {
|
|||||||
private String phone;
|
private String phone;
|
||||||
|
|
||||||
@Schema(description = "服务时间段")
|
@Schema(description = "服务时间段")
|
||||||
private String serviceTime;
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private String[] serviceTime;
|
||||||
// @Schema(description = "服务开始时间")
|
|
||||||
// private String serviceStartTime;
|
|
||||||
|
|
||||||
|
@Schema(description = "服务开始时间")
|
||||||
|
private String serviceStartTime;
|
||||||
|
|
||||||
|
@Schema(description = "服务结束时间")
|
||||||
|
private String serviceEndTime;
|
||||||
|
|
||||||
@Schema(description = "服务范围")
|
@Schema(description = "服务范围")
|
||||||
private String serviceScope;
|
private String serviceScope;
|
||||||
|
@ -52,10 +52,11 @@ public class StaffRespVO {
|
|||||||
@ExcelProperty("服务时间段")
|
@ExcelProperty("服务时间段")
|
||||||
private String serviceTime;
|
private String serviceTime;
|
||||||
|
|
||||||
// @Schema(description = "服务开始时间")
|
@Schema(description = "服务开始时间")
|
||||||
// private String serviceStartTime;
|
private String serviceStartTime;
|
||||||
//
|
|
||||||
private String serviceTimeArray;
|
@Schema(description = "服务结束时间")
|
||||||
|
private String serviceEndTime;
|
||||||
|
|
||||||
@Schema(description = "服务范围")
|
@Schema(description = "服务范围")
|
||||||
@ExcelProperty("服务范围")
|
@ExcelProperty("服务范围")
|
||||||
|
@ -36,6 +36,12 @@ public class StaffSaveReqVO {
|
|||||||
@Schema(description = "服务时间段")
|
@Schema(description = "服务时间段")
|
||||||
private String serviceTime;
|
private String serviceTime;
|
||||||
|
|
||||||
|
@Schema(description = "服务开始时间")
|
||||||
|
private String serviceStartTime;
|
||||||
|
|
||||||
|
@Schema(description = "服务结束时间")
|
||||||
|
private String serviceEndTime;
|
||||||
|
|
||||||
@Schema(description = "服务范围")
|
@Schema(description = "服务范围")
|
||||||
private String serviceScope;
|
private String serviceScope;
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package cn.iocoder.yudao.module.srbscribe.controller.admin.subscribemanage.vo;
|
package cn.iocoder.yudao.module.srbscribe.controller.admin.subscribemanage.vo;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -23,10 +22,6 @@ public class SubscribeManageRespVO {
|
|||||||
@ExcelProperty("用户id")
|
@ExcelProperty("用户id")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
@Schema(description = "用户姓名")
|
|
||||||
@ExcelProperty("用户姓名")
|
|
||||||
private String userName;
|
|
||||||
|
|
||||||
@Schema(description = "预约类型", example = "2")
|
@Schema(description = "预约类型", example = "2")
|
||||||
@ExcelProperty(value = "预约类型", converter = DictConvert.class)
|
@ExcelProperty(value = "预约类型", converter = DictConvert.class)
|
||||||
@DictFormat("subscribe_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
@DictFormat("subscribe_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||||
@ -36,10 +31,6 @@ public class SubscribeManageRespVO {
|
|||||||
@ExcelProperty("预约人员id")
|
@ExcelProperty("预约人员id")
|
||||||
private Long staffId;
|
private Long staffId;
|
||||||
|
|
||||||
@Schema(description = "预约人员")
|
|
||||||
@ExcelProperty("预约人员")
|
|
||||||
private String staffName;
|
|
||||||
|
|
||||||
@Schema(description = "预约时间")
|
@Schema(description = "预约时间")
|
||||||
@ExcelProperty("预约时间")
|
@ExcelProperty("预约时间")
|
||||||
private LocalDateTime subscribeTime;
|
private LocalDateTime subscribeTime;
|
||||||
@ -57,6 +48,8 @@ public class SubscribeManageRespVO {
|
|||||||
@ExcelProperty("创建时间")
|
@ExcelProperty("创建时间")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "预约人员")
|
||||||
|
@ExcelProperty("预约人员")
|
||||||
|
private String staffName;
|
||||||
|
|
||||||
}
|
}
|
@ -1,6 +1,5 @@
|
|||||||
package cn.iocoder.yudao.module.srbscribe.dal.dataobject.staff;
|
package cn.iocoder.yudao.module.srbscribe.dal.dataobject.staff;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.staff.vo.ServiceTimeVO;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -65,6 +64,14 @@ public class StaffDO extends BaseDO {
|
|||||||
* 服务时间段
|
* 服务时间段
|
||||||
*/
|
*/
|
||||||
private String serviceTime;
|
private String serviceTime;
|
||||||
|
/**
|
||||||
|
* 服务开始时间
|
||||||
|
*/
|
||||||
|
private String serviceStartTime;
|
||||||
|
/**
|
||||||
|
* 服务结束时间
|
||||||
|
*/
|
||||||
|
private String serviceEndTime;
|
||||||
/**
|
/**
|
||||||
* 服务范围
|
* 服务范围
|
||||||
*/
|
*/
|
||||||
@ -90,7 +97,4 @@ public class StaffDO extends BaseDO {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String organizationName;
|
private String organizationName;
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
private String serviceTimeArray ;
|
|
||||||
|
|
||||||
}
|
}
|
@ -23,7 +23,9 @@ public interface OrganizationMapper extends BaseMapperX<OrganizationDO> {
|
|||||||
.likeIfPresent(OrganizationDO::getName, reqVO.getName())
|
.likeIfPresent(OrganizationDO::getName, reqVO.getName())
|
||||||
.eqIfPresent(OrganizationDO::getPhone, reqVO.getPhone())
|
.eqIfPresent(OrganizationDO::getPhone, reqVO.getPhone())
|
||||||
.eqIfPresent(OrganizationDO::getEmail, reqVO.getEmail())
|
.eqIfPresent(OrganizationDO::getEmail, reqVO.getEmail())
|
||||||
.likeIfPresent(OrganizationDO::getAddress, reqVO.getAddress())
|
.eqIfPresent(OrganizationDO::getPicture, reqVO.getPicture())
|
||||||
|
.eqIfPresent(OrganizationDO::getAddress, reqVO.getAddress())
|
||||||
|
.eqIfPresent(OrganizationDO::getDepict, reqVO.getDepict())
|
||||||
.eqIfPresent(OrganizationDO::getStatus, reqVO.getStatus())
|
.eqIfPresent(OrganizationDO::getStatus, reqVO.getStatus())
|
||||||
.betweenIfPresent(OrganizationDO::getCreateTime, reqVO.getCreateTime())
|
.betweenIfPresent(OrganizationDO::getCreateTime, reqVO.getCreateTime())
|
||||||
.orderByDesc(OrganizationDO::getId));
|
.orderByDesc(OrganizationDO::getId));
|
||||||
|
@ -24,7 +24,7 @@ public interface StaffMapper extends BaseMapperX<StaffDO> {
|
|||||||
.eqIfPresent(StaffDO::getSex, reqVO.getSex())
|
.eqIfPresent(StaffDO::getSex, reqVO.getSex())
|
||||||
.eqIfPresent(StaffDO::getPhoto, reqVO.getPhoto())
|
.eqIfPresent(StaffDO::getPhoto, reqVO.getPhoto())
|
||||||
.eqIfPresent(StaffDO::getPhone, reqVO.getPhone())
|
.eqIfPresent(StaffDO::getPhone, reqVO.getPhone())
|
||||||
// .betweenIfPresent(StaffDO::getServiceTime, reqVO.getServiceTime())
|
.betweenIfPresent(StaffDO::getServiceTime, reqVO.getServiceTime())
|
||||||
.eqIfPresent(StaffDO::getServiceScope, reqVO.getServiceScope())
|
.eqIfPresent(StaffDO::getServiceScope, reqVO.getServiceScope())
|
||||||
.eqIfPresent(StaffDO::getSign, reqVO.getSign())
|
.eqIfPresent(StaffDO::getSign, reqVO.getSign())
|
||||||
.eqIfPresent(StaffDO::getStatus, reqVO.getStatus())
|
.eqIfPresent(StaffDO::getStatus, reqVO.getStatus())
|
||||||
|
@ -1,23 +1,16 @@
|
|||||||
package cn.iocoder.yudao.module.srbscribe.service.staff;
|
package cn.iocoder.yudao.module.srbscribe.service.staff;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.staff.vo.ServiceTimeVO;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.staff.vo.StaffPageReqVO;
|
import cn.iocoder.yudao.module.srbscribe.controller.admin.staff.vo.StaffPageReqVO;
|
||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.staff.vo.StaffSaveReqVO;
|
import cn.iocoder.yudao.module.srbscribe.controller.admin.staff.vo.StaffSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.organization.OrganizationDO;
|
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.organization.OrganizationDO;
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.staff.StaffDO;
|
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.staff.StaffDO;
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.mysql.organization.OrganizationMapper;
|
import cn.iocoder.yudao.module.srbscribe.dal.mysql.organization.OrganizationMapper;
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.mysql.staff.StaffMapper;
|
import cn.iocoder.yudao.module.srbscribe.dal.mysql.staff.StaffMapper;
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.alibaba.fastjson.TypeReference;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
import static cn.iocoder.yudao.module.subscribe.enums.ErrorCodeConstants.*;
|
import static cn.iocoder.yudao.module.subscribe.enums.ErrorCodeConstants.*;
|
||||||
|
|
||||||
@ -47,7 +40,6 @@ public class StaffServiceImpl implements StaffService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateStaff(StaffSaveReqVO updateReqVO) {
|
public void updateStaff(StaffSaveReqVO updateReqVO) {
|
||||||
JSON.toJSONString(updateReqVO.getServiceTime());
|
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateStaffExists(updateReqVO.getId());
|
validateStaffExists(updateReqVO.getId());
|
||||||
// 更新
|
// 更新
|
||||||
@ -77,24 +69,11 @@ public class StaffServiceImpl implements StaffService {
|
|||||||
@Override
|
@Override
|
||||||
public PageResult<StaffDO> getStaffPage(StaffPageReqVO pageReqVO) {
|
public PageResult<StaffDO> getStaffPage(StaffPageReqVO pageReqVO) {
|
||||||
PageResult<StaffDO> staffDOPageResult = staffMapper.selectPage(pageReqVO);
|
PageResult<StaffDO> staffDOPageResult = staffMapper.selectPage(pageReqVO);
|
||||||
|
|
||||||
String serviceTime = "";
|
|
||||||
for (int i = 0; i < staffDOPageResult.getList().size(); i++) {
|
for (int i = 0; i < staffDOPageResult.getList().size(); i++) {
|
||||||
StaffDO staffDO = staffDOPageResult.getList().get(i);
|
StaffDO staffDO = staffDOPageResult.getList().get(i);
|
||||||
OrganizationDO organizationDO = organizationMapper.selectOne("id", staffDO.getOrganizationId());
|
OrganizationDO organizationDO = organizationMapper.selectOne("id", staffDO.getOrganizationId());
|
||||||
staffDO.setOrganizationName(organizationDO.getName());
|
staffDO.setOrganizationName(organizationDO.getName());
|
||||||
|
|
||||||
//把StringJSON格式serviceTime转成对象
|
|
||||||
List<ServiceTimeVO> serviceTimeVOS = JSON.parseObject(staffDO.getServiceTime(), new TypeReference<List<ServiceTimeVO>>() {});
|
|
||||||
for (int j = 0; j < serviceTimeVOS.size(); j++) {
|
|
||||||
ServiceTimeVO serviceTimeVO = serviceTimeVOS.get(j);
|
|
||||||
serviceTime = serviceTime + serviceTimeVO.getStart() + " - " + serviceTimeVO.getEnd() + " , ";
|
|
||||||
}
|
}
|
||||||
String replaceAll = serviceTime.replaceAll(",\\s*$", "");
|
|
||||||
staffDO.setServiceTimeArray(replaceAll);
|
|
||||||
serviceTime = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
return staffDOPageResult;
|
return staffDOPageResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user