Merge branch 'master' of https://gitea.zianxin.com/zax/biz-pc-cloud
This commit is contained in:
commit
30e3bf6655
11 files changed
+47
-38
No files matched your search
@@ -88,3 +88,4 @@ export function exportProfitMarginReport(params?: object) {
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -32,27 +32,27 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="默认管理员" prop="adminId">
|
||||
<el-select
|
||||
v-model="form.adminId"
|
||||
placeholder="请选择默认管理员"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
:remote-method="handleAdminUserSearch"
|
||||
:loading="adminUserLoading"
|
||||
@visible-change="handleAdminUserVisibleChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in adminUserOptions"
|
||||
:key="item.id"
|
||||
:label="item.nameWithMobile"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12" class="mb20">-->
|
||||
<!-- <el-form-item label="默认管理员" prop="adminId">-->
|
||||
<!-- <el-select -->
|
||||
<!-- v-model="form.adminId" -->
|
||||
<!-- placeholder="请选择默认管理员" -->
|
||||
<!-- clearable-->
|
||||
<!-- filterable-->
|
||||
<!-- remote-->
|
||||
<!-- :remote-method="handleAdminUserSearch"-->
|
||||
<!-- :loading="adminUserLoading"-->
|
||||
<!-- @visible-change="handleAdminUserVisibleChange"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in adminUserOptions"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.nameWithMobile"-->
|
||||
<!-- :value="item.id"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="容纳人数" prop="capacity">
|
||||
@@ -86,11 +86,11 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="可用时间段" prop="availableTime">
|
||||
<el-input v-model="form.availableTime" placeholder="请输入可用时间段"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12" class="mb20">-->
|
||||
<!-- <el-form-item label="可用时间段" prop="availableTime">-->
|
||||
<!-- <el-input v-model="form.availableTime" placeholder="请输入可用时间段"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="位置" prop="location">
|
||||
@@ -340,9 +340,9 @@ const openDialog = (id: string) => {
|
||||
|
||||
// 获取用户下拉数据(保洁和会务人员)
|
||||
getUserOptions()
|
||||
|
||||
|
||||
// 获取管理员用户数据
|
||||
getAdminUserOptions()
|
||||
// getAdminUserOptions()
|
||||
|
||||
// 获取meetingRoom信息
|
||||
if (id) {
|
||||
@@ -356,7 +356,7 @@ const getUserOptions = async () => {
|
||||
try {
|
||||
const res = await dropdown()
|
||||
const allUsers = Array.isArray(res.data) ? res.data : []
|
||||
|
||||
|
||||
// 根据type字段分别赋值(type为字符串类型)
|
||||
cleanUserOptions.value = allUsers.filter(user => user.type === '1') // type: '1' 为保洁
|
||||
serviceUserOptions.value = allUsers.filter(user => user.type === '2') // type: '2' 为会务人员
|
||||
@@ -370,23 +370,23 @@ const getAdminUserOptions = async (searchKeyword?: string) => {
|
||||
try {
|
||||
adminUserLoading.value = true
|
||||
const params: any = {}
|
||||
|
||||
|
||||
// 如果有搜索关键词,添加到参数中
|
||||
if (searchKeyword) {
|
||||
params.name = searchKeyword
|
||||
params.mobile = searchKeyword
|
||||
}
|
||||
|
||||
|
||||
const res = await getSimpleUserAll(params)
|
||||
let allUsers = Array.isArray(res.data) ? res.data : []
|
||||
|
||||
|
||||
// 如果接口不支持搜索参数,在前端进行过滤
|
||||
if (searchKeyword && allUsers.length > 0) {
|
||||
allUsers = allUsers.filter(user =>
|
||||
allUsers = allUsers.filter(user =>
|
||||
user.nameWithMobile.toLowerCase().includes(searchKeyword.toLowerCase())
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
adminUserOptions.value = allUsers
|
||||
} catch (err: any) {
|
||||
console.error('获取管理员用户列表失败:', err)
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="deptId" label="部门id" show-overflow-tooltip/>-->
|
||||
<el-table-column prop="adminId" label="默认管理员" show-overflow-tooltip/>
|
||||
<!-- <el-table-column prop="adminId" label="默认管理员" show-overflow-tooltip/>-->
|
||||
<el-table-column prop="location" label="位置" show-overflow-tooltip/>
|
||||
<el-table-column prop="capacity" label="容纳人数" show-overflow-tooltip/>
|
||||
<el-table-column prop="availableTime" label="可用时间段" show-overflow-tooltip/>
|
||||
<el-table-column prop="cleanUserId" label="保洁人员" show-overflow-tooltip/>
|
||||
<el-table-column prop="serviceUserId" label="会务人员" show-overflow-tooltip/>
|
||||
<!-- <el-table-column prop="availableTime" label="可用时间段" show-overflow-tooltip/>-->
|
||||
<!-- <el-table-column prop="cleanUserId" label="保洁人员" show-overflow-tooltip/>-->
|
||||
<!-- <el-table-column prop="serviceUserId" label="会务人员" show-overflow-tooltip/>-->
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'integrated_meetingRoom_edit'"
|
||||
|
||||
@@ -338,3 +338,4 @@ const handleCurrentChange = (page: number) => {
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -190,3 +190,4 @@ defineExpose({
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -202,3 +202,4 @@ const trendClass = computed(() => {
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -6,3 +6,4 @@ export { default as SalesChart } from './SalesChart.vue';
|
||||
export { default as SummaryCard } from './SummaryCard.vue';
|
||||
export { default as ProductRankingTable } from './ProductRankingTable.vue';
|
||||
|
||||
|
||||
@@ -206,3 +206,4 @@ export const SUCCESS_MESSAGES = {
|
||||
CACHE_REFRESHED: '缓存刷新成功',
|
||||
};
|
||||
|
||||
|
||||
@@ -135,3 +135,4 @@ export function formatTimePeriodDataForExport(data: any[]) {
|
||||
增长率: `${item.growthRate || 0}%`
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -195,3 +195,4 @@ export const TABLE_CONFIG = {
|
||||
showOverflowTooltip: true,
|
||||
};
|
||||
|
||||
|
||||
@@ -365,3 +365,4 @@ class ProfitMarginReportServiceTest {
|
||||
7. **测试覆盖**: 完善单元测试和集成测试
|
||||
|
||||
这样重构后的代码将更加清晰、可维护,并且性能更好。
|
||||
|
||||
Reference in new issue
Block a user