feat: 房型管理接口对接
This commit is contained in:
@@ -6,3 +6,4 @@ export * from './code';
|
||||
export * from './oauth2';
|
||||
export * from './pcUser';
|
||||
export * from './configChannel';
|
||||
export * from './typeMapping';
|
||||
|
||||
95
src/renderer/api/typeMapping.ts
Normal file
95
src/renderer/api/typeMapping.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
/* eslint-disable */
|
||||
// @ts-ignore
|
||||
import request from '@utils/request';
|
||||
|
||||
import * as API from './types';
|
||||
|
||||
/** 新增房型映射 新增房型映射新增房型映射 POST /hotelStaff/typeMapping/add */
|
||||
export function hotelStaffTypeMappingAddUsingPost({
|
||||
body,
|
||||
options,
|
||||
}: {
|
||||
body: API.RoomTypeMapping;
|
||||
options?: { [key: string]: unknown };
|
||||
}) {
|
||||
return request<API.RBoolean>('/hotelStaff/typeMapping/add', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取房型映射详细信息 获取房型映射详细信息获取房型映射详细信息 POST /hotelStaff/typeMapping/getInfo */
|
||||
export function hotelStaffTypeMappingGetInfoUsingPost({
|
||||
body,
|
||||
options,
|
||||
}: {
|
||||
body: API.RoomTypeMapping;
|
||||
options?: { [key: string]: unknown };
|
||||
}) {
|
||||
return request<API.RRoomTypeMapping>('/hotelStaff/typeMapping/getInfo', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询房型映射列表 查询房型映射列表查询房型映射列表 POST /hotelStaff/typeMapping/pageList */
|
||||
export function hotelStaffTypeMappingPageListUsingPost({
|
||||
body,
|
||||
options,
|
||||
}: {
|
||||
body: API.RoomTypeMapping;
|
||||
options?: { [key: string]: unknown };
|
||||
}) {
|
||||
return request<API.RPageRoomTypeMapping>('/hotelStaff/typeMapping/pageList', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除房型映射 删除房型映射删除房型映射 POST /hotelStaff/typeMapping/remove */
|
||||
export function hotelStaffTypeMappingRemoveUsingPost({
|
||||
body,
|
||||
options,
|
||||
}: {
|
||||
body: API.RoomTypeMapping;
|
||||
options?: { [key: string]: unknown };
|
||||
}) {
|
||||
return request<API.RBoolean>('/hotelStaff/typeMapping/remove', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 修改房型映射 修改房型映射修改房型映射 POST /hotelStaff/typeMapping/update */
|
||||
export function hotelStaffTypeMappingUpdateUsingPost({
|
||||
body,
|
||||
options,
|
||||
}: {
|
||||
body: API.RoomTypeMapping;
|
||||
options?: { [key: string]: unknown };
|
||||
}) {
|
||||
return request<API.RBoolean>('/hotelStaff/typeMapping/update', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
@@ -40,6 +40,44 @@ export type HotelStaffPcUserUpdatePasswordUsingPostResponses = {
|
||||
200: RBoolean;
|
||||
};
|
||||
|
||||
export type HotelStaffTypeMappingAddUsingPostResponses = {
|
||||
200: RBoolean;
|
||||
};
|
||||
|
||||
export type HotelStaffTypeMappingGetInfoUsingPostResponses = {
|
||||
200: RRoomTypeMapping;
|
||||
};
|
||||
|
||||
export type HotelStaffTypeMappingPageListUsingPostResponses = {
|
||||
200: RPageRoomTypeMapping;
|
||||
};
|
||||
|
||||
export type HotelStaffTypeMappingRemoveUsingPostResponses = {
|
||||
200: RBoolean;
|
||||
};
|
||||
|
||||
export type HotelStaffTypeMappingUpdateUsingPostResponses = {
|
||||
200: RBoolean;
|
||||
};
|
||||
|
||||
export type OrderItem = {
|
||||
column?: string;
|
||||
asc?: boolean;
|
||||
};
|
||||
|
||||
export type PageRoomTypeMapping = {
|
||||
records?: RoomTypeMapping[];
|
||||
total?: number;
|
||||
size?: number;
|
||||
current?: number;
|
||||
orders?: OrderItem[];
|
||||
optimizeCountSql?: boolean;
|
||||
searchCount?: boolean;
|
||||
optimizeJoinOfCountSql?: boolean;
|
||||
maxLimit?: number;
|
||||
countId?: string;
|
||||
};
|
||||
|
||||
export type PcConfig = {
|
||||
/** 创建者创建人 */
|
||||
createBy?: string;
|
||||
@@ -110,6 +148,51 @@ export type RListPcConfigChannel = {
|
||||
data?: PcConfigChannel[];
|
||||
};
|
||||
|
||||
export type RoomTypeMapping = {
|
||||
/** 创建者创建人 */
|
||||
createBy?: string;
|
||||
/** 创建时间 */
|
||||
createTime?: string;
|
||||
/** 更新者更新人 */
|
||||
updateBy?: string;
|
||||
/** 更新时间 */
|
||||
updateTime?: string;
|
||||
/** 主键 */
|
||||
id?: string;
|
||||
/** pms名称 */
|
||||
pmsName?: string;
|
||||
/** 携程渠道名称 */
|
||||
xcName?: string;
|
||||
/** 飞猪渠道名称 */
|
||||
fzName?: string;
|
||||
/** 美团渠道名称 */
|
||||
mtName?: string;
|
||||
/** 抖音酒店渠道名称 */
|
||||
dyHotelName?: string;
|
||||
/** 抖音温泉渠道名称 */
|
||||
dyHotSrpingName?: string;
|
||||
/** 配置信息id */
|
||||
pcConfigId?: string;
|
||||
/** 删除标志 true/false 删除/未删除 */
|
||||
delFlag?: number;
|
||||
/** 分页数量 */
|
||||
size?: number;
|
||||
/** 分页标识 从1开始 */
|
||||
current?: number;
|
||||
};
|
||||
|
||||
export type RPageRoomTypeMapping = {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
data?: PageRoomTypeMapping;
|
||||
};
|
||||
|
||||
export type RRoomTypeMapping = {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
data?: RoomTypeMapping;
|
||||
};
|
||||
|
||||
export type UpdatePasswordForm = {
|
||||
/** 旧密码 */
|
||||
oldPassword?: string;
|
||||
|
||||
@@ -83,11 +83,11 @@ import ChatAttach from './components/ChatAttach.vue';
|
||||
import ChatInputArea from './components/ChatInputArea.vue';
|
||||
import TaskCenter from './TaskCenter.vue';
|
||||
|
||||
import { Session } from '../../utils/storage';
|
||||
import { Session } from '@utils/storage';
|
||||
|
||||
import userAvatar from '@assets/images/login/user_icon.png';
|
||||
import aiAvatar from '@assets/images/login/blue_logo.png';
|
||||
import { createConversation, conversationMessageList } from '../../api/ConversationApi';
|
||||
import { createConversation, conversationMessageList } from '@api/ConversationApi';
|
||||
import { ElMessage, ElLoading } from 'element-plus'
|
||||
|
||||
// 支持外部通过 prop 控制是否为引导页
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
<!--
|
||||
* @Author: kongbeiwu lishaohua-520@qq.com
|
||||
* @Date: 2025-12-30 12:08:51
|
||||
* @LastEditors: kongbeiwu lishaohua-520@qq.com
|
||||
* @LastEditTime: 2026-01-04 10:30:54
|
||||
* @FilePath: /project/zn-ai/src/renderer/views/knowledge/components/EventManager/addDialog.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<template>
|
||||
<el-dialog v-model="model" title="上传图片" :width="width" :before-close="handleClose" :close-on-click-modal="false"
|
||||
:close-on-press-escape="false">
|
||||
:close-on-press-escape="false" append-to-body>
|
||||
<div class="flex justify-center">
|
||||
<div class="w-[500px] mt-[20px]">
|
||||
<el-steps style="max-width: 500px" :active="activeIndex" simple finish-status="success">
|
||||
@@ -39,7 +31,9 @@
|
||||
</el-alert>
|
||||
<div v-for="(item, index) in picList" :key="index"
|
||||
class="rounded-[12px] border border-[#E5E8EE] p-[16px] mt-[16px] relative">
|
||||
<div class="absolute right-[0px] top-[0px] w-[28px] h-[28px] text-center bg-[rgba(0,0,0,0.5)] cursor-pointer z-10" style="border-radius: 0px 8px 0 8px;" @click="picList.splice(index, 1)">
|
||||
<div
|
||||
class="absolute right-[0px] top-[0px] w-[28px] h-[28px] text-center bg-[rgba(0,0,0,0.5)] cursor-pointer z-10"
|
||||
style="border-radius: 0px 8px 0 8px;" @click="picList.splice(index, 1)">
|
||||
<component :is="RiDeleteBinLine" color="#FFFFFF" class="w-[12px] h-[12px] ml-[7px] mt-[7px]" />
|
||||
</div>
|
||||
<div class="flex">
|
||||
@@ -131,15 +125,20 @@ onMounted(() => {
|
||||
:deep(.el-step__head.is-process .el-step__icon.is-text) {
|
||||
border-color: #2B7FFF;
|
||||
}
|
||||
|
||||
:deep(.el-step__head.is-success) {
|
||||
color: #1FC16B;
|
||||
}
|
||||
|
||||
:deep(.el-step__head.is-success .el-step__icon.is-text) {
|
||||
background: #1FC16B;
|
||||
}:deep(.el-step__head.is-success .el-step__icon.is-text) {
|
||||
}
|
||||
|
||||
:deep(.el-step__head.is-success .el-step__icon.is-text) {
|
||||
border-color: #1FC16B;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
:deep(.el-step__title.is-success) {
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
<!--
|
||||
* @Author: kongbeiwu lishaohua-520@qq.com
|
||||
* @Date: 2025-12-30 12:08:51
|
||||
* @LastEditors: kongbeiwu lishaohua-520@qq.com
|
||||
* @LastEditTime: 2026-01-03 22:00:09
|
||||
* @FilePath: /project/zn-ai/src/renderer/views/knowledge/components/EventManager/addDialog.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<template>
|
||||
<el-dialog v-model="model" title="添加事件" width="500" :before-close="handleClose" :close-on-click-modal="false"
|
||||
:close-on-press-escape="false">
|
||||
<el-dialog v-model="visible" title="添加事件" width="500" :before-close="handleClose" :close-on-click-modal="false"
|
||||
:close-on-press-escape="false" append-to-body>
|
||||
<div class="p-[20px]">
|
||||
<el-form ref="ruleFormRef" style="max-width: 600px" :model="ruleForm" :rules="rules" label-position="top"
|
||||
label-width="auto">
|
||||
@@ -32,7 +24,7 @@
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="model = false">取消</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm(ruleFormRef)">
|
||||
确认
|
||||
</el-button>
|
||||
@@ -40,11 +32,12 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { FormInstance } from 'element-plus';
|
||||
import { ref, reactive, defineModel } from 'vue';
|
||||
import { ref, reactive } from 'vue';
|
||||
|
||||
const model = defineModel({ type: Boolean, default: false })
|
||||
const visible = ref(false)
|
||||
|
||||
interface RuleForm {
|
||||
name: string
|
||||
@@ -73,7 +66,7 @@ const ruleForm = reactive<RuleForm>({
|
||||
// const dialogVisible = ref(false);
|
||||
const handleClose = (done: () => void) => {
|
||||
done();
|
||||
model.value = false;
|
||||
visible.value = false;
|
||||
// dialogVisible.value = false;
|
||||
}
|
||||
const submitForm = async (formEl: FormInstance | undefined) => {
|
||||
|
||||
@@ -1,43 +1,37 @@
|
||||
<!--
|
||||
* @Author: kongbeiwu lishaohua-520@qq.com
|
||||
* @Date: 2025-12-22 01:11:57
|
||||
* @LastEditors: kongbeiwu lishaohua-520@qq.com
|
||||
* @LastEditTime: 2026-01-04 10:43:47
|
||||
* @FilePath: /project/zn-ai/src/renderer/views/knowledge/components/EventManagement/index.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-button class="button" type="primary" :icon="Plus" @click="dialogVisible = true">添加事件</el-button>
|
||||
<div class="zn-table mt-[20px]">
|
||||
<el-table :data="tableData" class="zn-table" style="width: 100%" show-overflow-tooltip>
|
||||
<el-table-column prop="date" label="事件名称" width="180" align="center" />
|
||||
<el-table-column prop="name" label="事件描述" width="180" align="center" />
|
||||
<el-table-column prop="address" label="生效时间" align="center" />
|
||||
<el-table-column prop="address" label="结束事件" align="center" />
|
||||
<el-table-column prop="address" label="关联图片" align="center" />
|
||||
<el-table-column prop="address" label="启用/停用" align="center">
|
||||
<template #default="scope">
|
||||
<el-switch v-model="scope.row.switch" size="small" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" type="primary" @click="emits('change', '查看图片', scope.row)">
|
||||
查看图片
|
||||
</el-button>
|
||||
<el-button link size="small" type="primary" @click="uploadImageChange(scope.row)">
|
||||
上传图片
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row class="mb-[20px]">
|
||||
<el-button class="button" type="primary" :icon="Plus" @click="dialogVisible = true">添加事件</el-button>
|
||||
</el-row>
|
||||
|
||||
<el-table :data="tableData" show-overflow-tooltip border>
|
||||
<el-table-column prop="date" label="事件名称" width="180" align="center" />
|
||||
<el-table-column prop="name" label="事件描述" width="180" align="center" />
|
||||
<el-table-column prop="address" label="生效时间" align="center" />
|
||||
<el-table-column prop="address" label="结束事件" align="center" />
|
||||
<el-table-column prop="address" label="关联图片" align="center" />
|
||||
<el-table-column prop="address" label="启用/停用" align="center">
|
||||
<template #default="scope">
|
||||
<el-switch v-model="scope.row.switch" size="small" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" type="primary" @click="emits('change', '查看图片', scope.row)">
|
||||
查看图片
|
||||
</el-button>
|
||||
<el-button link size="small" type="primary" @click="uploadImageChange(scope.row)">
|
||||
上传图片
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 添加事件弹窗 -->
|
||||
<AddDialog v-model="dialogVisible" />
|
||||
<!-- 上传图片弹窗 -->
|
||||
<UploadImage v-model="dialogVisibleUploadImage" width="80%" />
|
||||
</div>
|
||||
<!-- 添加事件弹窗 -->
|
||||
<AddDialog v-model="dialogVisible" />
|
||||
<!-- 上传图片弹窗 -->
|
||||
<UploadImage v-model="dialogVisibleUploadImage" width="80%" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -74,7 +68,7 @@ const tableData: TableData[] = [
|
||||
// 上传图片弹窗
|
||||
const dialogVisibleUploadImage = ref(false);
|
||||
const uploadImageChange = (row) => {
|
||||
dialogVisibleUploadImage.value = true;
|
||||
dialogVisibleUploadImage.value = true;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
<!--
|
||||
* @Author: kongbeiwu lishaohua-520@qq.com
|
||||
* @Date: 2025-12-29 13:45:28
|
||||
* @LastEditors: kongbeiwu lishaohua-520@qq.com
|
||||
* @LastEditTime: 2026-01-04 10:43:09
|
||||
* @FilePath: /project/zn-ai/src/renderer/views/knowledge/page.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<template>
|
||||
<div class="bg-white box-border w-full h-full p-[20px]">
|
||||
<TitleSection @back-to="handleBack" :title="data.date" :desc="data.name">
|
||||
@@ -23,7 +15,8 @@
|
||||
<template #content>
|
||||
<div class="flex">
|
||||
<span>https://image.baidu.com/search/index</span>
|
||||
<el-button :icon="DocumentCopy" size="small" text class="ml-[3px] bg-[#000]" @click="copyText('https://image.baidu.com/search/index')" />
|
||||
<el-button :icon="DocumentCopy" size="small" text class="ml-[3px] bg-[#000]"
|
||||
@click="copyText('https://image.baidu.com/search/index')" />
|
||||
</div>
|
||||
</template>
|
||||
<component :is="RiInformationLine" color="#99A0AE" class="w-[15px] ml-[11px] cursor-pointer" />
|
||||
@@ -42,9 +35,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 添加事件弹窗 -->
|
||||
<UploadImage v-model="dialogVisible" />
|
||||
</div>
|
||||
<!-- 添加事件弹窗 -->
|
||||
<UploadImage v-model="dialogVisible" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -55,17 +49,19 @@ import { RiInformationLine, RiEditLine, RiDeleteBinLine } from '@remixicon/vue';
|
||||
import TitleSection from '@renderer/components/TitleSection/index.vue';
|
||||
import UploadImage from '../../components/EventManager/UploadImage.vue';
|
||||
|
||||
interface Props {
|
||||
data: object;
|
||||
}
|
||||
const props = defineProps<Props>();
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => { },
|
||||
},
|
||||
});
|
||||
|
||||
const emits = defineEmits(["update:change"]);
|
||||
const emits = defineEmits(["change"]);
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
|
||||
// 复制文本
|
||||
const copyText = async (text) => {
|
||||
const copyText = async (text: string) => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(text);
|
||||
ElMessage({
|
||||
@@ -81,7 +77,7 @@ const copyText = async (text) => {
|
||||
};
|
||||
|
||||
// 返回上一页
|
||||
const handleBack = (val) => {
|
||||
const handleBack = (val: string) => {
|
||||
emits("change", '返回事件管理');
|
||||
};
|
||||
|
||||
@@ -96,6 +92,7 @@ const handleBack = (val) => {
|
||||
.event-pic-item:nth-child(4n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
:deep(.el-button.button) {
|
||||
background: linear-gradient(180deg, #4A8FF9 0%, rgba(0, 0, 0, 0) 100%), #2B7FFF;
|
||||
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 1px rgba(255, 255, 255, 0.24);
|
||||
|
||||
@@ -1,154 +1,75 @@
|
||||
<!--
|
||||
* @Author: kongbeiwu lishaohua-520@qq.com
|
||||
* @Date: 2025-12-22 01:11:57
|
||||
* @LastEditors: kongbeiwu lishaohua-520@qq.com
|
||||
* @LastEditTime: 2026-01-04 17:01:44
|
||||
* @FilePath: /project/zn-ai/src/renderer/views/knowledge/components/EventManagement/index.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<template>
|
||||
<div class="mt-[10px]">
|
||||
<div>
|
||||
<el-input v-model="input1" style="width: 240px" size="large" placeholder="请输入" :prefix-icon="Search" />
|
||||
<el-button type="primary" class="ml-[20px]" size="large">搜索</el-button>
|
||||
</div>
|
||||
<div class="zn-table mt-[20px]">
|
||||
<el-table :data="tableData" class="zn-table" style="width: 100%">
|
||||
<el-table-column prop="pms" label="PMS" align="center" />
|
||||
<el-table-column prop="xc" label="携程" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag v-for="(tag, index) in scope.row.xc" :key="index" type="info" closable :disable-transitions="false"
|
||||
@close="handleClose(scope.$index, index, 'xc')" class="mb-[10px] mr-[8px]">
|
||||
{{ tag }}
|
||||
</el-tag>
|
||||
<div>
|
||||
<el-input v-if="tableIndex === scope.$index + 'xc'" ref="InputRef" v-model="inputValue" class="w-20" size="small"
|
||||
@keyup.enter="handleInputConfirm(scope.$index, 'xc')" @blur="handleInputConfirm(scope.$index, 'xc')" />
|
||||
<el-button v-else class="button-new-tag" size="small" @click="showInput(scope.$index, 'xc')" :icon="Plus" />
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fz" label="飞猪" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag v-for="(tag, index) in scope.row.fz" :key="index" type="info" closable :disable-transitions="false"
|
||||
@close="handleClose(scope.$index, index, 'fz')" class="mb-[10px] mr-[8px]">
|
||||
{{ tag }}
|
||||
</el-tag>
|
||||
<div>
|
||||
<el-input v-if="tableIndex === scope.$index + 'fz'" ref="InputRef" v-model="inputValue" class="w-20" size="small"
|
||||
@keyup.enter="handleInputConfirm(scope.$index, 'fz')" @blur="handleInputConfirm(scope.$index, 'fz')" />
|
||||
<el-button v-else class="button-new-tag" size="small" @click="showInput(scope.$index, 'fz')" :icon="Plus" />
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="qne" label="去哪儿" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag v-for="(tag, index) in scope.row.qne" :key="index" type="info" closable :disable-transitions="false"
|
||||
@close="handleClose(scope.$index, index, 'qne')" class="mb-[10px] mr-[8px]">
|
||||
{{ tag }}
|
||||
</el-tag>
|
||||
<div>
|
||||
<el-input v-if="tableIndex === scope.$index + 'qne'" ref="InputRef" v-model="inputValue" class="w-20" size="small"
|
||||
@keyup.enter="handleInputConfirm(scope.$index, 'qne')" @blur="handleInputConfirm(scope.$index, 'qne')" />
|
||||
<el-button v-else class="button-new-tag" size="small" @click="showInput(scope.$index, 'qne')" :icon="Plus" />
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="dy" label="抖音" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag v-for="(tag, index) in scope.row.dy" :key="index" type="info" closable :disable-transitions="false"
|
||||
@close="handleClose(scope.$index, index, 'dy')" class="mb-[10px] mr-[8px]">
|
||||
{{ tag }}
|
||||
</el-tag>
|
||||
<div>
|
||||
<el-input v-if="tableIndex === scope.$index + 'dy'" ref="InputRef" v-model="inputValue" class="w-20" size="small"
|
||||
@keyup.enter="handleInputConfirm(scope.$index, 'dy')" @blur="handleInputConfirm(scope.$index, 'dy')" />
|
||||
<el-button v-else class="button-new-tag" size="small" @click="showInput(scope.$index, 'dy')" :icon="Plus" />
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="mt" label="美团" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag v-for="(tag, index) in scope.row.mt" :key="index" type="info" closable :disable-transitions="false"
|
||||
@close="handleClose(scope.$index, index, 'mt')" class="mb-[10px] mr-[8px]">
|
||||
{{ tag }}
|
||||
</el-tag>
|
||||
<div>
|
||||
<el-input v-if="tableIndex === scope.$index + 'mt'" ref="InputRef" v-model="inputValue" class="w-20" size="small"
|
||||
@keyup.enter="handleInputConfirm(scope.$index, 'mt')" @blur="handleInputConfirm(scope.$index, 'mt')" />
|
||||
<el-button v-else class="button-new-tag" size="small" @click="showInput(scope.$index, 'mt')" :icon="Plus" />
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-table :data="tableData" border>
|
||||
<el-table-column prop="pmsName" label="PMS" align="center" />
|
||||
<el-table-column prop="xcName" label="携程" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.xcName" type="info" :disable-transitions="false" class="mb-[10px] mr-[8px]">
|
||||
{{ row.xcName }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fzName" label="飞猪" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.fzName" type="info" :disable-transitions="false" class="mb-[10px] mr-[8px]">
|
||||
{{ row.fzName }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="dyHotelName" label="抖音(息烽南山天沐温泉酒店)" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.dyHotelName" type="info" :disable-transitions="false" class="mb-[10px] mr-[8px]">
|
||||
{{ row.dyHotelName }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="dyHotSrpingName" label="抖音(息烽南山天沐温泉)" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.dyHotSrpingName" type="info" :disable-transitions="false" class="mb-[10px] mr-[8px]">
|
||||
{{ row.dyHotSrpingName }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="mtName" label="美团" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.mtName" type="info" :disable-transitions="false" class="mb-[10px] mr-[8px]">
|
||||
{{ row.mtName }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, nextTick } from 'vue';
|
||||
import { Search, Plus } from '@element-plus/icons-vue';
|
||||
import type { InputInstance } from 'element-plus';
|
||||
const input1 = ref('');
|
||||
import { ref } from 'vue';
|
||||
import { hotelStaffTypeMappingPageListUsingPost, RoomTypeMapping } from '@api/index';
|
||||
|
||||
type TableData = {
|
||||
pms: string
|
||||
xc: string[]
|
||||
fz: string[]
|
||||
qne: string[]
|
||||
dy: string[]
|
||||
mt: string[]
|
||||
const tableData = ref([]);
|
||||
|
||||
// 获取房型列表数据
|
||||
const queryParams: RoomTypeMapping = ref({
|
||||
current: 1,
|
||||
size: 10
|
||||
})
|
||||
|
||||
const getRoomTypeList = async () => {
|
||||
const res = await hotelStaffTypeMappingPageListUsingPost({ body: queryParams.value });
|
||||
tableData.value = res.data?.records;
|
||||
}
|
||||
const tableData: TableData[] = ref([
|
||||
{
|
||||
pms: '大床房',
|
||||
xc: ['雅致大床房', '标准间'],
|
||||
mt: ['雅致大床房'],
|
||||
fz: ['雅致大床房'],
|
||||
qne: ['雅致大床房'],
|
||||
dy: ['雅致大床房'],
|
||||
},
|
||||
{
|
||||
pms: '标准间',
|
||||
xc: ['雅致大床房'],
|
||||
mt: ['雅致大床房'],
|
||||
fz: ['雅致大床房'],
|
||||
qne: ['雅致大床房'],
|
||||
dy: ['雅致大床房'],
|
||||
},
|
||||
]);
|
||||
|
||||
const inputValue = ref('');
|
||||
const InputRef = ref<InputInstance>()
|
||||
const handleClose = (row: number, index: number, key: string) => {
|
||||
tableData.value[row][key].splice(index, 1);
|
||||
};
|
||||
const tableIndex = ref('');
|
||||
const showInput = (index: any, key: string) => {
|
||||
tableIndex.value = index + key;
|
||||
nextTick(() => {
|
||||
InputRef.value!.input!.focus();
|
||||
});
|
||||
};
|
||||
|
||||
const handleInputConfirm = (index: number, key: string) => {
|
||||
if (inputValue.value) {
|
||||
tableData.value[index][key].push(inputValue.value);
|
||||
}
|
||||
tableIndex.value = '';
|
||||
inputValue.value = '';
|
||||
};
|
||||
|
||||
getRoomTypeList()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep(.el-table tr td:nth-of-type(1)) {
|
||||
background: #EFF6FF !important;
|
||||
}
|
||||
|
||||
:deep(.el-tag) {
|
||||
background: #FFFFFF!important;
|
||||
border-radius: 6px!important;
|
||||
border: 1px solid #E5E8EE!important;
|
||||
background: #FFFFFF !important;
|
||||
border-radius: 6px !important;
|
||||
border: 1px solid #E5E8EE !important;
|
||||
color: #525866;
|
||||
}
|
||||
</style>
|
||||
@@ -1,40 +1,42 @@
|
||||
<!--
|
||||
* @Author: kongbeiwu lishaohua-520@qq.com
|
||||
* @Date: 2025-12-28 16:08:45
|
||||
* @LastEditors: kongbeiwu lishaohua-520@qq.com
|
||||
* @LastEditTime: 2025-12-30 12:03:50
|
||||
* @FilePath: /project/zn-ai/src/renderer/views/knowledge/index.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<template>
|
||||
<component :is="componentData" @change="handleClick" :data="commData"></component>
|
||||
<!-- <knowledgePage /> -->
|
||||
<layout>
|
||||
<div class="bg-white box-border w-full h-full p-[20px] rounded-[16px]">
|
||||
<TitleSection title="知识库管理" desc="内容管理" />
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="房型管理" name="roomType">
|
||||
<RoomTypeManager />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="事件管理" name="event">
|
||||
<EventManager />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</layout>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="Knowledge">
|
||||
<script setup lang="ts" name="KnowledgePage">
|
||||
import TitleSection from '@renderer/components/TitleSection/index.vue'
|
||||
import EventManager from './components/EventManager/index.vue'
|
||||
import RoomTypeManager from './components/RoomTypeManager/index.vue'
|
||||
import { ref } from 'vue';
|
||||
import knowledgePage from './page.vue';
|
||||
import EventPicList from './components/EventPic/index.vue';
|
||||
const componentData = ref(knowledgePage);
|
||||
import type { TabsPaneContext } from 'element-plus';
|
||||
|
||||
const commData = ref(null);
|
||||
const handleClick = (type: string, val: any) => {
|
||||
console.log(type, val, 11111111);
|
||||
commData.value = val;
|
||||
if (type === '查看图片') {
|
||||
componentData.value = EventPicList;
|
||||
} else {
|
||||
componentData.value = knowledgePage;
|
||||
}
|
||||
const activeName = ref('roomType');
|
||||
|
||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||
console.log(tab, event);
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
:deep(.el-tabs__item) {
|
||||
color: #99A0AE;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__item.is-active) {
|
||||
color: #2B7FFF;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__active-bar) {
|
||||
background-color: #2B7FFF;
|
||||
}
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
<!--
|
||||
* @Author: kongbeiwu lishaohua-520@qq.com
|
||||
* @Date: 2025-12-29 13:45:28
|
||||
* @LastEditors: kongbeiwu lishaohua-520@qq.com
|
||||
* @LastEditTime: 2025-12-30 01:48:36
|
||||
* @FilePath: /project/zn-ai/src/renderer/views/knowledge/page.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<template>
|
||||
<layout>
|
||||
<div class="bg-white box-border w-full h-full p-[20px]">
|
||||
<TitleSection title="知识库管理" desc="内容管理" />
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="事件管理" name="first">
|
||||
<EventManager @change="handleChange" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="房型管理" name="second">
|
||||
<RoomTypeManager />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</layout>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="KnowledgePage">
|
||||
import TitleSection from '@renderer/components/TitleSection/index.vue'
|
||||
import EventManager from './components/EventManager/index.vue'
|
||||
import RoomTypeManager from './components/RoomTypeManager/index.vue'
|
||||
import { ref } from 'vue';
|
||||
import type { TabsPaneContext } from 'element-plus';
|
||||
|
||||
const emits = defineEmits(["update:change"]);
|
||||
|
||||
const activeName = ref('first');
|
||||
|
||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||
console.log(tab, event);
|
||||
};
|
||||
|
||||
const handleChange = (type: string, value: any) => {
|
||||
emits("change", type, value);
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
:deep(.el-tabs__item) {
|
||||
color: #99A0AE;
|
||||
}
|
||||
:deep(.el-tabs__item.is-active) {
|
||||
color: #2B7FFF;
|
||||
}
|
||||
:deep(.el-tabs__active-bar) {
|
||||
background-color: #2B7FFF;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user