Compare commits
No commits in common. "f7f702673bbd4370e3e1b18b5180a47e286044dd" and "e68b6ed57382b0fe52697a747151b9ffad1f23db" have entirely different histories.
f7f702673b
...
e68b6ed573
@ -45,8 +45,4 @@ export const updateFile = (data: any) => {
|
|||||||
return request.upload({ url: '/infra/file/upload', data })
|
return request.upload({ url: '/infra/file/upload', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
export const updatePicType = (id: number , picType: number) => {
|
|
||||||
return request.get({ url: '/infra/file/updatePicType?id=' + id + `&picType=` + picType })
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,23 +57,3 @@ export const getTypeList = () => {
|
|||||||
export const getHuaShuTypeList = () => {
|
export const getHuaShuTypeList = () => {
|
||||||
return request.get({ url: '/system/dict-data/getHuaShuTypeList' })
|
return request.get({ url: '/system/dict-data/getHuaShuTypeList' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增字典数据,客服话术分类
|
|
||||||
export const createType = (data: DictDataVO) => {
|
|
||||||
return request.post({ url: '/system/dict-data/createType', data })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增字典数据,素材管理图片分类
|
|
||||||
export const createPicType = (data: DictDataVO) => {
|
|
||||||
return request.post({ url: '/system/dict-data/createPicType', data })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增字典数据,素材管理图片分类
|
|
||||||
export const updateMenu = (id : number, name : string) => {
|
|
||||||
return request.get({ url: '/system/dict-data/updateMenu?id='+ id + `&name=` + name })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除字典数据
|
|
||||||
export const deleteMenu = (id: number | undefined) => {
|
|
||||||
return request.delete({ url: '/system/dict-data/deleteMenu?id=' + id })
|
|
||||||
}
|
|
||||||
|
@ -124,8 +124,6 @@ export enum DICT_TYPE {
|
|||||||
TECHNICIAN_STATUS = 'technician_status',
|
TECHNICIAN_STATUS = 'technician_status',
|
||||||
SEX = 'sex',
|
SEX = 'sex',
|
||||||
|
|
||||||
INFRA_FILE_TYPE = 'infra_file_type',
|
|
||||||
|
|
||||||
//预约:项目
|
//预约:项目
|
||||||
SUBSCRIBE_PROJECT_STATUS = 'subscribe_project_status',
|
SUBSCRIBE_PROJECT_STATUS = 'subscribe_project_status',
|
||||||
|
|
||||||
|
@ -4,36 +4,22 @@
|
|||||||
<div class="flex-container">
|
<div class="flex-container">
|
||||||
<!-- 菜单区域 -->
|
<!-- 菜单区域 -->
|
||||||
<div class="menu-area">
|
<div class="menu-area">
|
||||||
|
<el-menu :default-active="targetMenuId">
|
||||||
|
<el-menu-item v-for="item in typeMenu" :index="item.value" :key="item.value" @click="clickMenu(item.value)">{{item.label}}</el-menu-item>
|
||||||
|
|
||||||
<el-button type="primary" plain @click="createType" style="width: 90;font-size: 12px;">
|
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增分类
|
|
||||||
</el-button>
|
|
||||||
|
|
||||||
<el-menu :default-active="targetMenuId" style="width:182px">
|
|
||||||
<el-menu-item :index="targetMenuId" :key="targetMenuId" @click="clickMenu(targetMenuId)">
|
|
||||||
全部类型
|
|
||||||
</el-menu-item>
|
|
||||||
<el-menu-item v-for="item in typeMenu" :index="item.value" :key="item.value"
|
|
||||||
@click="clickMenu(item.value)">
|
|
||||||
{{ item.label }}
|
|
||||||
<el-icon style="margin-left: 60px;width: 10px;" @mouseover="showActions = item.value"
|
|
||||||
@mouseleave="showActions = null">
|
|
||||||
<MoreFilled />
|
|
||||||
<div v-if="showActions === item.value" class="action-buttons">
|
|
||||||
<el-button size="small" @click.stop="editItem(item.id,item.label)">编辑</el-button>
|
|
||||||
<br />
|
|
||||||
<el-button size="small" @click.stop="deleteItem(item.id)">删除</el-button>
|
|
||||||
</div>
|
|
||||||
</el-icon>
|
|
||||||
</el-menu-item>
|
|
||||||
</el-menu>
|
</el-menu>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 内容区域 -->
|
<!-- 内容区域 -->
|
||||||
<div class="content-wrap">
|
<div class="content-wrap">
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
|
<el-form
|
||||||
|
class="-mb-15px"
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryFormRef"
|
||||||
|
:inline="true"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
<!-- <el-form-item label="文件路径" prop="path">
|
<!-- <el-form-item label="文件路径" prop="path">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.path"
|
v-model="queryParams.path"
|
||||||
@ -43,22 +29,26 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="文件类型" prop="type" width="80">
|
<el-form-item label="文件类型" prop="type" width="80">
|
||||||
<el-input v-model="queryParams.type" placeholder="请输入文件类型" clearable
|
<el-input
|
||||||
@keyup.enter="handleQuery" />
|
v-model="queryParams.type"
|
||||||
|
placeholder="请输入文件类型"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="创建时间" prop="createTime">
|
<el-form-item label="创建时间" prop="createTime">
|
||||||
<el-date-picker v-model="queryParams.createTime" value-format="YYYY-MM-DD HH:mm:ss"
|
<el-date-picker
|
||||||
type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
|
v-model="queryParams.createTime"
|
||||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" />
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
type="daterange"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleQuery">
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||||
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||||
</el-button>
|
|
||||||
<el-button @click="resetQuery">
|
|
||||||
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" plain @click="openForm">
|
<el-button type="primary" plain @click="openForm">
|
||||||
<Icon icon="ep:upload" class="mr-5px" /> 上传文件
|
<Icon icon="ep:upload" class="mr-5px" /> 上传文件
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -67,140 +57,91 @@
|
|||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
||||||
|
|
||||||
<ContentWrap>
|
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
|
<el-table-column label="文件名" align="center" prop="name" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="文件路径" align="center" prop="path" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="URL" align="center" prop="url" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="文件大小" align="center" prop="size" width="120" :formatter="fileSizeFormatter" />
|
||||||
|
<el-table-column label="文件类型" align="center" prop="type" width="180px" />
|
||||||
<el-table-column label="文件内容" align="center" prop="url" width="110px">
|
<el-table-column label="文件内容" align="center" prop="url" width="110px">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-image v-if="row.type.includes('image')" class="h-80px w-80px" lazy :src="row.url"
|
<el-image
|
||||||
:preview-src-list="[row.url]" preview-teleported fit="cover" />
|
v-if="row.type.includes('image')"
|
||||||
<el-link v-else-if="row.type.includes('pdf')" type="primary" :href="row.url"
|
class="h-80px w-80px"
|
||||||
:underline="false" target="_blank">预览</el-link>
|
lazy
|
||||||
<el-link v-else type="primary" download :href="row.url" :underline="false"
|
:src="row.url"
|
||||||
target="_blank">下载</el-link>
|
:preview-src-list="[row.url]"
|
||||||
|
preview-teleported
|
||||||
|
fit="cover"
|
||||||
|
/>
|
||||||
|
<el-link
|
||||||
|
v-else-if="row.type.includes('pdf')"
|
||||||
|
type="primary"
|
||||||
|
:href="row.url"
|
||||||
|
:underline="false"
|
||||||
|
target="_blank"
|
||||||
|
>预览</el-link>
|
||||||
|
<el-link v-else type="primary" download :href="row.url" :underline="false" target="_blank"
|
||||||
|
>下载</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="文件名" align="center" prop="name" :show-overflow-tooltip="true" />
|
<el-table-column label="上传时间" align="center" prop="createTime" width="180" :formatter="dateFormatter" />
|
||||||
<!-- <el-table-column label="文件路径" align="center" prop="path" :show-overflow-tooltip="true" /> -->
|
|
||||||
<el-table-column label="URL" align="center" prop="url" :show-overflow-tooltip="true" />
|
|
||||||
<!-- <el-table-column label="文件大小" align="center" prop="size" width="120"
|
|
||||||
:formatter="fileSizeFormatter" /> -->
|
|
||||||
<!-- <el-table-column label="文件类型" align="center" prop="type" width="180px" />
|
|
||||||
<el-table-column label="图片分类" align="center" prop="picType">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :type="DICT_TYPE.INFRA_FILE_TYPE" :value="scope.row.picType" />
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
|
|
||||||
<el-table-column label="上传时间" align="center" prop="createTime" width="180"
|
|
||||||
:formatter="dateFormatter" />
|
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary"
|
<el-button
|
||||||
@click="updateForm('update', scope.row.id , scope.row.picType)">
|
link
|
||||||
更改类型
|
type="danger"
|
||||||
</el-button>
|
@click="handleDelete(scope.row.id)"
|
||||||
<el-button link type="danger" @click="handleDelete(scope.row.id)"
|
v-hasPermi="['infra:file:delete']"
|
||||||
v-hasPermi="['infra:file:delete']">
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</ContentWrap>
|
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
<Pagination
|
||||||
@pagination="getList" />
|
:total="total"
|
||||||
|
v-model:page="queryParams.pageNo"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<FileForm ref="formRef" @success="getList" />
|
<FileForm ref="formRef" @success="getList" />
|
||||||
|
|
||||||
<UpdateForm ref="forRef" @success="getList" />
|
|
||||||
|
|
||||||
<Dialog v-model="dialogVisibles" :title="dialogTitles">
|
|
||||||
<el-form ref="formRef" v-loading="formLoading" :model="formData" :rules="formRules" label-width="80px">
|
|
||||||
|
|
||||||
<el-form-item label="数据标签" prop="label">
|
|
||||||
<el-input v-model="formData.label" placeholder="请输入数据标签" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="显示排序" prop="sort">
|
|
||||||
<el-input-number v-model="formData.sort" :min="0" controls-position="right" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="dialogVisibles = false">取 消</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
|
||||||
|
|
||||||
<Dialog v-model="dialogVisible" :title="dialogTitle">
|
|
||||||
<el-form ref="formRef" v-loading="formLoading" :model="formData" label-width="80px">
|
|
||||||
<el-form-item label="数据标签" prop="label">
|
|
||||||
<el-input v-model="updateLabel" placeholder="请输入数据标签" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<el-button :disabled="formLoading" type="primary" @click="submitForms">确 定</el-button>
|
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
||||||
</template>
|
|
||||||
</Dialog>
|
|
||||||
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
|
||||||
import { fileSizeFormatter } from '@/utils'
|
import { fileSizeFormatter } from '@/utils'
|
||||||
import { Search, MoreFilled } from '@element-plus/icons-vue';
|
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
// import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
|
||||||
import * as FileApi from '@/api/infra/file'
|
import * as FileApi from '@/api/infra/file'
|
||||||
import FileForm from './FileForm.vue'
|
import FileForm from './FileForm.vue'
|
||||||
import UpdateForm from './updateForm.vue'
|
import { string } from 'vue-types';
|
||||||
|
import { number } from 'echarts';
|
||||||
import * as DictDataApi from '@/api/system/dict/dict.data'
|
import * as DictDataApi from '@/api/system/dict/dict.data'
|
||||||
const typeMenu = ref<DictDataApi.DictDataVO[]>([]) //
|
const typeMenu = ref<DictDataApi.DictDataVO[]>([]) //
|
||||||
const targetMenuId = ref('0')
|
const targetMenuId = ref('0')
|
||||||
defineOptions({ name: 'InfraFile' })
|
defineOptions({ name: 'InfraFile' })
|
||||||
const showActions = ref(null);
|
|
||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
|
||||||
const dialogTitle = ref('') // 弹窗的标题
|
|
||||||
const dialogVisibles = ref(false) // 弹窗的是否展示
|
|
||||||
const dialogTitles = ref('') // 弹窗的标题
|
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
|
||||||
const formData = ref({
|
|
||||||
id: undefined,
|
|
||||||
sort: undefined,
|
|
||||||
label: '',
|
|
||||||
value: '',
|
|
||||||
dictType: '',
|
|
||||||
// status: CommonStatusEnum.ENABLE,
|
|
||||||
colorType: '',
|
|
||||||
cssClass: '',
|
|
||||||
remark: ''
|
|
||||||
})
|
|
||||||
const formRules = reactive({
|
|
||||||
label: [{ required: true, message: '数据标签不能为空', trigger: 'blur' }],
|
|
||||||
sort: [{ required: true, message: '数据顺序不能为空', trigger: 'blur' }],
|
|
||||||
})
|
|
||||||
const updateLabel = ref('')
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
const total = ref(0) // 列表的总页数
|
const total = ref(0) // 列表的总页数
|
||||||
const list = ref([]) // 列表的
|
const list = ref([]) // 列表的
|
||||||
const menuId = ref()
|
|
||||||
|
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
type: undefined,
|
type: undefined,
|
||||||
picType: '',
|
|
||||||
path: undefined,
|
path: undefined,
|
||||||
createTime: [],
|
createTime: [],
|
||||||
|
menuType: '0',
|
||||||
})
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
|
|
||||||
@ -216,77 +157,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//新增分类
|
|
||||||
const createType = () => {
|
|
||||||
dialogVisibles.value = true
|
|
||||||
dialogTitles.value = '新增分类'
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 添加分类菜单 */
|
|
||||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
|
||||||
const submitForm = async () => {
|
|
||||||
// 校验表单
|
|
||||||
if (!formRef) return
|
|
||||||
const valid = await formRef.value.validate()
|
|
||||||
if (!valid) return
|
|
||||||
// 提交请求
|
|
||||||
formLoading.value = true
|
|
||||||
try {
|
|
||||||
const data = formData.value as DictDataApi.DictDataVO
|
|
||||||
await DictDataApi.createPicType(data)
|
|
||||||
message.success(t('common.createSuccess'))
|
|
||||||
dialogVisibles.value = false
|
|
||||||
// 发送操作成功的事件
|
|
||||||
emit('success')
|
|
||||||
getTypeList()
|
|
||||||
|
|
||||||
} finally {
|
|
||||||
formLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//修改分类菜单
|
|
||||||
const submitForms = async () => {
|
|
||||||
// 校验表单
|
|
||||||
if (!formRef) return
|
|
||||||
const valid = await formRef.value.validate()
|
|
||||||
if (!valid) return
|
|
||||||
// 提交请求
|
|
||||||
formLoading.value = true
|
|
||||||
try {
|
|
||||||
|
|
||||||
await DictDataApi.updateMenu(menuId.value, updateLabel.value)
|
|
||||||
message.success(t('common.createSuccess'))
|
|
||||||
dialogVisible.value = false
|
|
||||||
// 发送操作成功的事件
|
|
||||||
emit('success')
|
|
||||||
getTypeList()
|
|
||||||
|
|
||||||
} finally {
|
|
||||||
formLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//分类菜单修改按钮
|
|
||||||
const editItem = (id : number | undefined, lable : string) => {
|
|
||||||
dialogVisible.value = true
|
|
||||||
dialogTitle.value = '菜单编辑'
|
|
||||||
menuId.value = id
|
|
||||||
updateLabel.value = lable
|
|
||||||
// 处理编辑事件
|
|
||||||
console.log('编辑:',);
|
|
||||||
};
|
|
||||||
//分类菜单删除按钮
|
|
||||||
const deleteItem = async (id : number | undefined) => {
|
|
||||||
// 处理删除事件
|
|
||||||
// 删除的二次确认
|
|
||||||
await message.delConfirm()
|
|
||||||
await DictDataApi.deleteMenu(id)
|
|
||||||
message.success(t('common.delSuccess'))
|
|
||||||
getTypeList()
|
|
||||||
|
|
||||||
};
|
|
||||||
//图片素材管理分类菜单
|
//图片素材管理分类菜单
|
||||||
const getTypeList = async () => {
|
const getTypeList = async () => {
|
||||||
const data = await DictDataApi.getTypeList()
|
const data = await DictDataApi.getTypeList()
|
||||||
@ -297,7 +167,7 @@
|
|||||||
|
|
||||||
/** */
|
/** */
|
||||||
const clickMenu = (id: string) => {
|
const clickMenu = (id: string) => {
|
||||||
queryParams.picType = id
|
queryParams.menuType = id
|
||||||
queryParams.pageNo = 1
|
queryParams.pageNo = 1
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
@ -314,20 +184,12 @@
|
|||||||
handleQuery()
|
handleQuery()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 添加/修改操作 */
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const openForm = () => {
|
const openForm = () => {
|
||||||
formRef.value.open()
|
formRef.value.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
const forRef = ref()
|
|
||||||
/** 修改操作 */
|
|
||||||
const updateForm = (type : string, id : number, picType : number) => {
|
|
||||||
forRef.value.open(type, id, picType)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (id: number) => {
|
const handleDelete = async (id: number) => {
|
||||||
try {
|
try {
|
||||||
@ -343,34 +205,25 @@
|
|||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
queryParams.picType = targetMenuId.value
|
// queryParams.value.menuType = targetMenuId
|
||||||
getTypeList()
|
getTypeList()
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.flex-container {
|
.flex-container {
|
||||||
height: 100vh;
|
height: 100vh; /* 使容器填满视口高度 */
|
||||||
/* 使容器填满视口高度 */
|
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-area {
|
.menu-area {
|
||||||
padding: 25px;
|
|
||||||
background-color: white;
|
|
||||||
width: 180px;
|
|
||||||
height: 1000px;
|
|
||||||
/* 固定高度 */
|
|
||||||
overflow-y: hidden;
|
|
||||||
/* 禁止滚动 */
|
|
||||||
border-right: 1px solid #e0e0e0;
|
|
||||||
/* 可选:添加分隔线 */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
width: 200px;
|
||||||
|
height: 100vh; /* 固定高度 */
|
||||||
|
overflow-y: hidden; /* 禁止滚动 */
|
||||||
|
border-right: 1px solid #e0e0e0; /* 可选:添加分隔线 */
|
||||||
|
}
|
||||||
.content-wrap {
|
.content-wrap {
|
||||||
flex-grow: 1;
|
flex-grow: 1; /* 使内容区域占据剩余空间 */
|
||||||
/* 使内容区域占据剩余空间 */
|
overflow-y: auto; /* 允许内容区域滚动 */
|
||||||
overflow-y: auto;
|
|
||||||
/* 允许内容区域滚动 */
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -121,6 +121,7 @@ v-show="showNewMessageTip" class="newMessageTip flex items-center cursor-pointer
|
|||||||
<div style="flex: 0 0 20%; padding: 10px;">
|
<div style="flex: 0 0 20%; padding: 10px;">
|
||||||
<el-menu :default-active="targetMenuId">
|
<el-menu :default-active="targetMenuId">
|
||||||
<el-menu-item v-for="item in huashuType" :index="item.value" :key="item.value" @click="clickMenu(item.value)">{{item.label}}</el-menu-item>
|
<el-menu-item v-for="item in huashuType" :index="item.value" :key="item.value" @click="clickMenu(item.value)">{{item.label}}</el-menu-item>
|
||||||
|
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</div>
|
</div>
|
||||||
<!-- 右边占 70% -->
|
<!-- 右边占 70% -->
|
||||||
@ -298,6 +299,7 @@ v-show="showNewMessageTip" class="newMessageTip flex items-center cursor-pointer
|
|||||||
const getHuaShuTypeList = async () => {
|
const getHuaShuTypeList = async () => {
|
||||||
const data = await DictDataApi.getHuaShuTypeList()
|
const data = await DictDataApi.getHuaShuTypeList()
|
||||||
huashuType.value = data
|
huashuType.value = data
|
||||||
|
|
||||||
}
|
}
|
||||||
//话术内容
|
//话术内容
|
||||||
const getVerbalTrickList = async (id: string) => {
|
const getVerbalTrickList = async (id: string) => {
|
||||||
|
@ -1,52 +1,66 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<div class="flex-container">
|
|
||||||
<!-- 菜单区域 -->
|
|
||||||
<div class="menu-area">
|
|
||||||
<el-button type="primary" plain @click="createType" style="width: 90;font-size: 12px;">
|
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增分类
|
|
||||||
</el-button>
|
|
||||||
<el-menu :default-active="targetMenuId" style="width:183px">
|
|
||||||
<el-menu-item v-for="item in huashuType" :index="item.value" :key="item.value"
|
|
||||||
@click="clickMenu(item.value)">{{item.label}}</el-menu-item>
|
|
||||||
</el-menu>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 内容区域 -->
|
|
||||||
<div class="content-wrap">
|
|
||||||
|
|
||||||
|
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
|
<el-form
|
||||||
<!-- <el-form-item label="分类" prop="type">
|
class="-mb-15px"
|
||||||
<el-select v-model="queryParams.type" placeholder="请选择分类" clearable class="!w-240px">
|
:model="queryParams"
|
||||||
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.KEFU_VERBAL_TRICK_TYPE)"
|
ref="queryFormRef"
|
||||||
:key="dict.value" :label="dict.label" :value="dict.value" />
|
:inline="true"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item label="分类" prop="type">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.type"
|
||||||
|
placeholder="请选择分类"
|
||||||
|
clearable
|
||||||
|
class="!w-240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in getIntDictOptions(DICT_TYPE.KEFU_VERBAL_TRICK_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="title">
|
<el-form-item label="标题" prop="title">
|
||||||
<el-input v-model="queryParams.title" placeholder="请输入标题" clearable @keyup.enter="handleQuery"
|
<el-input
|
||||||
class="!w-240px" />
|
v-model="queryParams.title"
|
||||||
|
placeholder="请输入标题"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="创建时间" prop="createTime">
|
<el-form-item label="创建时间" prop="createTime">
|
||||||
<el-date-picker v-model="queryParams.createTime" value-format="YYYY-MM-DD HH:mm:ss"
|
<el-date-picker
|
||||||
type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
|
v-model="queryParams.createTime"
|
||||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" class="!w-240px" />
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
type="daterange"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleQuery">
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||||
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||||
</el-button>
|
<el-button
|
||||||
<el-button @click="resetQuery">
|
type="primary"
|
||||||
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
plain
|
||||||
</el-button>
|
@click="openForm('create')"
|
||||||
<el-button type="primary" plain @click="openForm('create')"
|
v-hasPermi="['promotion:verbal-trick:create']"
|
||||||
v-hasPermi="['promotion:verbal-trick:create']">
|
>
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="success" plain @click="handleExport" :loading="exportLoading"
|
<el-button
|
||||||
v-hasPermi="['promotion:verbal-trick:export']">
|
type="success"
|
||||||
|
plain
|
||||||
|
@click="handleExport"
|
||||||
|
:loading="exportLoading"
|
||||||
|
v-hasPermi="['promotion:verbal-trick:export']"
|
||||||
|
>
|
||||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -64,53 +78,45 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="标题" align="center" prop="title" />
|
<el-table-column label="标题" align="center" prop="title" />
|
||||||
<el-table-column label="详情" align="center" prop="details" />
|
<el-table-column label="详情" align="center" prop="details" />
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" :formatter="dateFormatter"
|
<el-table-column
|
||||||
width="180px" />
|
label="创建时间"
|
||||||
|
align="center"
|
||||||
|
prop="createTime"
|
||||||
|
:formatter="dateFormatter"
|
||||||
|
width="180px"
|
||||||
|
/>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="openForm('update', scope.row.id)"
|
<el-button
|
||||||
v-hasPermi="['promotion:verbal-trick:update']">
|
link
|
||||||
|
type="primary"
|
||||||
|
@click="openForm('update', scope.row.id)"
|
||||||
|
v-hasPermi="['promotion:verbal-trick:update']"
|
||||||
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button link type="danger" @click="handleDelete(scope.row.id)"
|
<el-button
|
||||||
v-hasPermi="['promotion:verbal-trick:delete']">
|
link
|
||||||
|
type="danger"
|
||||||
|
@click="handleDelete(scope.row.id)"
|
||||||
|
v-hasPermi="['promotion:verbal-trick:delete']"
|
||||||
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
</ContentWrap>
|
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
<Pagination
|
||||||
@pagination="getList" />
|
:total="total"
|
||||||
</div>
|
v-model:page="queryParams.pageNo"
|
||||||
</div>
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<VerbalTrickForm ref="formRef" @success="getList" />
|
<VerbalTrickForm ref="formRef" @success="getList" />
|
||||||
|
|
||||||
|
|
||||||
<Dialog v-model="dialogVisible" :title="dialogTitle">
|
|
||||||
<el-form ref="formRef" v-loading="formLoading" :model="formData" :rules="formRules" label-width="80px">
|
|
||||||
|
|
||||||
<el-form-item label="数据标签" prop="label">
|
|
||||||
<el-input v-model="formData.label" placeholder="请输入数据标签" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="显示排序" prop="sort">
|
|
||||||
<el-input-number v-model="formData.sort" :min="0" controls-position="right" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
||||||
</template>
|
|
||||||
</Dialog>
|
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -119,28 +125,6 @@
|
|||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import { VerbalTrickApi, VerbalTrickVO } from '@/api/mall/promotion/verbaltrick'
|
import { VerbalTrickApi, VerbalTrickVO } from '@/api/mall/promotion/verbaltrick'
|
||||||
import VerbalTrickForm from './VerbalTrickForm.vue'
|
import VerbalTrickForm from './VerbalTrickForm.vue'
|
||||||
import * as DictDataApi from '@/api/system/dict/dict.data'
|
|
||||||
const huashuType = ref<DictDataApi.DictDataVO[]>([]) //
|
|
||||||
const targetMenuId = ref('0')
|
|
||||||
|
|
||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
|
||||||
const dialogTitle = ref('新增分类') // 弹窗的标题
|
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
|
||||||
const formData = ref({
|
|
||||||
id: undefined,
|
|
||||||
sort: undefined,
|
|
||||||
label: '',
|
|
||||||
value: '',
|
|
||||||
dictType: '',
|
|
||||||
// status: CommonStatusEnum.ENABLE,
|
|
||||||
colorType: '',
|
|
||||||
cssClass: '',
|
|
||||||
remark: ''
|
|
||||||
})
|
|
||||||
const formRules = reactive({
|
|
||||||
label: [{ required: true, message: '数据标签不能为空', trigger: 'blur' }],
|
|
||||||
sort: [{ required: true, message: '数据顺序不能为空', trigger: 'blur' }],
|
|
||||||
})
|
|
||||||
|
|
||||||
/** 客服话术 列表 */
|
/** 客服话术 列表 */
|
||||||
defineOptions({ name: 'VerbalTrick' })
|
defineOptions({ name: 'VerbalTrick' })
|
||||||
@ -154,7 +138,7 @@
|
|||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
type: '',
|
type: undefined,
|
||||||
title: undefined,
|
title: undefined,
|
||||||
details: undefined,
|
details: undefined,
|
||||||
createTime: []
|
createTime: []
|
||||||
@ -174,48 +158,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//新增分类
|
|
||||||
const createType = () => {
|
|
||||||
dialogVisible.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 提交表单 */
|
|
||||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
|
||||||
const submitForm = async () => {
|
|
||||||
// 校验表单
|
|
||||||
if (!formRef) return
|
|
||||||
const valid = await formRef.value.validate()
|
|
||||||
if (!valid) return
|
|
||||||
// 提交请求
|
|
||||||
formLoading.value = true
|
|
||||||
try {
|
|
||||||
const data = formData.value as DictDataApi.DictDataVO
|
|
||||||
await DictDataApi.createType(data)
|
|
||||||
message.success(t('common.createSuccess'))
|
|
||||||
dialogVisible.value = false
|
|
||||||
// 发送操作成功的事件
|
|
||||||
emit('success')
|
|
||||||
queryParams.type = targetMenuId.value
|
|
||||||
getList()
|
|
||||||
getHuaShuTypeList()
|
|
||||||
} finally {
|
|
||||||
formLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const clickMenu = (id : string) => {
|
|
||||||
console.log('1111111111', id)
|
|
||||||
queryParams.type = id
|
|
||||||
getList()
|
|
||||||
}
|
|
||||||
|
|
||||||
//话术分类菜单
|
|
||||||
const getHuaShuTypeList = async () => {
|
|
||||||
const data = await DictDataApi.getHuaShuTypeList()
|
|
||||||
huashuType.value = data
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
queryParams.pageNo = 1
|
queryParams.pageNo = 1
|
||||||
@ -264,35 +206,6 @@
|
|||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
queryParams.type = targetMenuId.value
|
|
||||||
getList()
|
getList()
|
||||||
getHuaShuTypeList()
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.flex-container {
|
|
||||||
height: 100vh;
|
|
||||||
/* 使容器填满视口高度 */
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-area {
|
|
||||||
padding: 25px;
|
|
||||||
background-color: white;
|
|
||||||
width: 180px;
|
|
||||||
height: 1000px;
|
|
||||||
/* 固定高度 */
|
|
||||||
overflow-y: hidden;
|
|
||||||
/* 禁止滚动 */
|
|
||||||
border-right: 1px solid #e0e0e0;
|
|
||||||
/* 可选:添加分隔线 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-wrap {
|
|
||||||
flex-grow: 1;
|
|
||||||
/* 使内容区域占据剩余空间 */
|
|
||||||
overflow-y: auto;
|
|
||||||
/* 允许内容区域滚动 */
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -102,21 +102,11 @@ public class FileController {
|
|||||||
@Operation(summary = "获得文件分页")
|
@Operation(summary = "获得文件分页")
|
||||||
@PreAuthorize("@ss.hasPermission('infra:file:query')")
|
@PreAuthorize("@ss.hasPermission('infra:file:query')")
|
||||||
public CommonResult<PageResult<FileRespVO>> getFilePage(@Valid FilePageReqVO pageVO) {
|
public CommonResult<PageResult<FileRespVO>> getFilePage(@Valid FilePageReqVO pageVO) {
|
||||||
if (pageVO.getPicType() == 0){
|
|
||||||
pageVO.setPicType(null);
|
|
||||||
}
|
|
||||||
PageResult<FileDO> pageResult = fileService.getFilePage(pageVO);
|
PageResult<FileDO> pageResult = fileService.getFilePage(pageVO);
|
||||||
return success(BeanUtils.toBean(pageResult, FileRespVO.class));
|
return success(BeanUtils.toBean(pageResult, FileRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/updatePicType")
|
|
||||||
public CommonResult<Long> updatePicType(Integer id,Integer picType){
|
|
||||||
return success(fileService.updatePicType(id,picType));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -28,9 +28,6 @@ public class FileCreateReqVO {
|
|||||||
@Schema(description = "文件 MIME 类型", example = "application/octet-stream")
|
@Schema(description = "文件 MIME 类型", example = "application/octet-stream")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
@Schema(description = "图片类型")
|
|
||||||
private Integer picType;
|
|
||||||
|
|
||||||
@Schema(description = "文件大小", example = "2048", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "文件大小", example = "2048", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
private Integer size;
|
private Integer size;
|
||||||
|
|
||||||
|
@ -23,11 +23,6 @@ public class FilePageReqVO extends PageParam {
|
|||||||
@Schema(description = "文件类型,模糊匹配", example = "jpg")
|
@Schema(description = "文件类型,模糊匹配", example = "jpg")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
@Schema(description = "图片类型", example = "jpg")
|
|
||||||
private Integer picType;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
|
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
private LocalDateTime[] createTime;
|
private LocalDateTime[] createTime;
|
||||||
|
@ -27,9 +27,6 @@ public class FileRespVO {
|
|||||||
@Schema(description = "文件MIME类型", example = "application/octet-stream")
|
@Schema(description = "文件MIME类型", example = "application/octet-stream")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
@Schema(description = "图片类型")
|
|
||||||
private Integer picType;
|
|
||||||
|
|
||||||
@Schema(description = "文件大小", example = "2048", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "文件大小", example = "2048", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
private Integer size;
|
private Integer size;
|
||||||
|
|
||||||
|
@ -47,8 +47,6 @@ public class FileDO extends BaseDO {
|
|||||||
* 文件的 MIME 类型,例如 "application/octet-stream"
|
* 文件的 MIME 类型,例如 "application/octet-stream"
|
||||||
*/
|
*/
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
private Integer picType;
|
|
||||||
/**
|
/**
|
||||||
* 文件大小
|
* 文件大小
|
||||||
*/
|
*/
|
||||||
|
@ -18,7 +18,6 @@ public interface FileMapper extends BaseMapperX<FileDO> {
|
|||||||
default PageResult<FileDO> selectPage(FilePageReqVO reqVO) {
|
default PageResult<FileDO> selectPage(FilePageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<FileDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<FileDO>()
|
||||||
.likeIfPresent(FileDO::getPath, reqVO.getPath())
|
.likeIfPresent(FileDO::getPath, reqVO.getPath())
|
||||||
.eqIfPresent(FileDO::getPicType, reqVO.getPicType())
|
|
||||||
.likeIfPresent(FileDO::getType, reqVO.getType())
|
.likeIfPresent(FileDO::getType, reqVO.getType())
|
||||||
.betweenIfPresent(FileDO::getCreateTime, reqVO.getCreateTime())
|
.betweenIfPresent(FileDO::getCreateTime, reqVO.getCreateTime())
|
||||||
.orderByDesc(FileDO::getId));
|
.orderByDesc(FileDO::getId));
|
||||||
|
@ -63,8 +63,4 @@ public interface FileService {
|
|||||||
*/
|
*/
|
||||||
FilePresignedUrlRespVO getFilePresignedUrl(String path) throws Exception;
|
FilePresignedUrlRespVO getFilePresignedUrl(String path) throws Exception;
|
||||||
|
|
||||||
Long updatePicType(Integer id,Integer picType);
|
|
||||||
|
|
||||||
boolean deleteMenu(Long id);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,14 +13,11 @@ import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.FilePageReqVO
|
|||||||
import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.FilePresignedUrlRespVO;
|
import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.FilePresignedUrlRespVO;
|
||||||
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
|
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
|
||||||
import cn.iocoder.yudao.module.infra.dal.mysql.file.FileMapper;
|
import cn.iocoder.yudao.module.infra.dal.mysql.file.FileMapper;
|
||||||
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
|
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
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.infra.enums.ErrorCodeConstants.FILE_NOT_EXISTS;
|
import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.FILE_NOT_EXISTS;
|
||||||
|
|
||||||
@ -38,9 +35,6 @@ public class FileServiceImpl implements FileService {
|
|||||||
@Resource
|
@Resource
|
||||||
private FileMapper fileMapper;
|
private FileMapper fileMapper;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private DictDataApi dictDataApi;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<FileDO> getFilePage(FilePageReqVO pageReqVO) {
|
public PageResult<FileDO> getFilePage(FilePageReqVO pageReqVO) {
|
||||||
return fileMapper.selectPage(pageReqVO);
|
return fileMapper.selectPage(pageReqVO);
|
||||||
@ -120,23 +114,4 @@ public class FileServiceImpl implements FileService {
|
|||||||
object -> object.setConfigId(fileClient.getId()));
|
object -> object.setConfigId(fileClient.getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Long updatePicType(Integer id, Integer picType) {
|
|
||||||
FileDO fileDO = fileMapper.selectOne("id", id);
|
|
||||||
if (picType != null){
|
|
||||||
fileDO.setPicType(picType);
|
|
||||||
}
|
|
||||||
return (long)fileMapper.updateById(fileDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean deleteMenu(Long id) {
|
|
||||||
List<FileDO> pic_type = fileMapper.selectList("pic_type", id);
|
|
||||||
if (pic_type.isEmpty()){
|
|
||||||
dictDataApi.deleteMenu(id);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ public class MemberPointRecordServiceImpl implements MemberPointRecordService {
|
|||||||
}
|
}
|
||||||
MemberPointRecordDO memberPointRecordDO = new MemberPointRecordDO();
|
MemberPointRecordDO memberPointRecordDO = new MemberPointRecordDO();
|
||||||
memberPointRecordDO.setAddUp(addUp);
|
memberPointRecordDO.setAddUp(addUp);
|
||||||
memberPointRecordDO.setReduce(Math.abs(reduce));
|
memberPointRecordDO.setReduce(reduce);
|
||||||
return memberPointRecordDO;
|
return memberPointRecordDO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,29 +41,6 @@ public class ConfigurationController {
|
|||||||
@Resource
|
@Resource
|
||||||
private ConfigurationService configurationService;
|
private ConfigurationService configurationService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//根据项目预约天id查找预约套餐时间段
|
|
||||||
@GetMapping("/getConfiguration")
|
|
||||||
public CommonResult<List<ServiceTimeVO>> getConfiguration(Integer id) {
|
|
||||||
List<ServiceTimeVO> serviceTimeVOS = configurationService.getConfiguration(id);
|
|
||||||
return success(serviceTimeVOS);
|
|
||||||
}
|
|
||||||
|
|
||||||
//添加预约套餐时间段配置
|
|
||||||
@PostMapping("/addUpdConfiguration")
|
|
||||||
public CommonResult<Integer> addConfiguration(@RequestBody ConfigurationDO pageReqVO) {
|
|
||||||
Integer aLong = configurationService.addUpdConfiguration(pageReqVO);
|
|
||||||
return success(aLong);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建预约配置")
|
@Operation(summary = "创建预约配置")
|
||||||
@PreAuthorize("@ss.hasPermission('subscribe:configuration:create')")
|
@PreAuthorize("@ss.hasPermission('subscribe:configuration:create')")
|
||||||
@ -119,6 +96,18 @@ public class ConfigurationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//根据项目预约天id查找预约套餐时间段
|
||||||
|
@GetMapping("/getConfiguration")
|
||||||
|
public CommonResult<List<ServiceTimeVO>> getConfiguration(Integer id) {
|
||||||
|
List<ServiceTimeVO> serviceTimeVOS = configurationService.getConfiguration(id);
|
||||||
|
return success(serviceTimeVOS);
|
||||||
|
}
|
||||||
|
|
||||||
|
//添加预约套餐时间段配置
|
||||||
|
@PostMapping("/addUpdConfiguration")
|
||||||
|
public CommonResult<Integer> addConfiguration(@RequestBody ConfigurationDO pageReqVO) {
|
||||||
|
Integer aLong = configurationService.addUpdConfiguration(pageReqVO);
|
||||||
|
return success(aLong);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -149,7 +149,7 @@ public class ConfigurationServiceImpl implements ConfigurationService {
|
|||||||
|
|
||||||
for (int j = 0; j < serviceTimeVOS.size(); j++) {
|
for (int j = 0; j < serviceTimeVOS.size(); j++) {
|
||||||
ServiceTimeVO serviceTimeVO = serviceTimeVOS.get(j);
|
ServiceTimeVO serviceTimeVO = serviceTimeVOS.get(j);
|
||||||
String serviceTime = serviceTimeVO.getStart() + " ~ " + serviceTimeVO.getEnd();
|
String serviceTime = serviceTimeVO.getStart() + " - " + serviceTimeVO.getEnd();
|
||||||
|
|
||||||
//判断时间段是否存在
|
//判断时间段是否存在
|
||||||
/**
|
/**
|
||||||
|
@ -81,8 +81,4 @@ public interface DictDataApi {
|
|||||||
|
|
||||||
Long createDictDataApi(DictDataSaveReqApiVO createReqVO);
|
Long createDictDataApi(DictDataSaveReqApiVO createReqVO);
|
||||||
|
|
||||||
int updateMenu(Integer id,String name);
|
|
||||||
|
|
||||||
void deleteMenu(Long id);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ import lombok.Data;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class DictDataRespDTO {
|
public class DictDataRespDTO {
|
||||||
private Integer id;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典标签
|
* 字典标签
|
||||||
|
@ -50,16 +50,4 @@ public class DictDataApiImpl implements DictDataApi {
|
|||||||
return dictDataService.createDictDataApi(createReqVO);
|
return dictDataService.createDictDataApi(createReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int updateMenu(Integer id, String name) {
|
|
||||||
int i = dictDataService.updateMenu(id, name);
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void deleteMenu(Long id) {
|
|
||||||
dictDataService.deleteDictData(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -126,39 +126,4 @@ public class DictDataController {
|
|||||||
return success(dictDataList);
|
return success(dictDataList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//添加客服话术分类字典数据
|
|
||||||
@PostMapping("/createType")
|
|
||||||
public CommonResult<Long> createType( @RequestBody DictDataDO createReqVO) {
|
|
||||||
Long dictDataId = dictDataService.createType(createReqVO);
|
|
||||||
return success(dictDataId);
|
|
||||||
}
|
|
||||||
|
|
||||||
//添加客服话术分类字典数据
|
|
||||||
@PostMapping("/createPicType")
|
|
||||||
public CommonResult<Long> createPicType( @RequestBody DictDataDO createReqVO) {
|
|
||||||
Long dictDataId = dictDataService.createPicType(createReqVO);
|
|
||||||
return success(dictDataId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 素材管理菜单编辑
|
|
||||||
*/
|
|
||||||
@GetMapping(value = "/updateMenu")
|
|
||||||
public CommonResult<Integer> updateMenu(Integer id,String name) {
|
|
||||||
int i = dictDataApi.updateMenu(id, name);
|
|
||||||
return success(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@DeleteMapping("/deleteMenu")
|
|
||||||
public CommonResult<Boolean> deleteMenu(Long id) {
|
|
||||||
dictDataService.deleteDictData(id);
|
|
||||||
return success(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataPage
|
|||||||
import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictDataDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictDataDO;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Select;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -47,10 +46,4 @@ public interface DictDataMapper extends BaseMapperX<DictDataDO> {
|
|||||||
.eqIfPresent(DictDataDO::getDictType, dictType));
|
.eqIfPresent(DictDataDO::getDictType, dictType));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Select(" SELECT MAX(value) FROM system_dict_data where dict_type = 'kefu_verbal_trick_type' ")
|
|
||||||
int getMaxValue();
|
|
||||||
|
|
||||||
@Select(" SELECT MAX(value) FROM system_dict_data where dict_type = 'infra_file_type' ")
|
|
||||||
int getPicTypeMaxValue();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -39,8 +39,6 @@ public interface DictDataService {
|
|||||||
*/
|
*/
|
||||||
void deleteDictData(Long id);
|
void deleteDictData(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得字典数据列表
|
* 获得字典数据列表
|
||||||
*
|
*
|
||||||
@ -111,20 +109,4 @@ public interface DictDataService {
|
|||||||
List<DictDataDO> getDictDataListByDictType(String dictType);
|
List<DictDataDO> getDictDataListByDictType(String dictType);
|
||||||
|
|
||||||
Long createDictDataApi(DictDataSaveReqApiVO createReqVO);
|
Long createDictDataApi(DictDataSaveReqApiVO createReqVO);
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加客服话术分类
|
|
||||||
* @param createReqVO
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Long createType(DictDataDO createReqVO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加图片类型字典数据
|
|
||||||
* @param createReqVO
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Long createPicType(DictDataDO createReqVO);
|
|
||||||
|
|
||||||
int updateMenu(Integer id, String name);
|
|
||||||
}
|
}
|
||||||
|
@ -99,8 +99,6 @@ public class DictDataServiceImpl implements DictDataService {
|
|||||||
dictDataMapper.deleteById(id);
|
dictDataMapper.deleteById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getDictDataCountByDictType(String dictType) {
|
public long getDictDataCountByDictType(String dictType) {
|
||||||
return dictDataMapper.selectCountByDictType(dictType);
|
return dictDataMapper.selectCountByDictType(dictType);
|
||||||
@ -192,44 +190,4 @@ public class DictDataServiceImpl implements DictDataService {
|
|||||||
return dictData.getId();
|
return dictData.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Long createType(DictDataDO createReqVO) {
|
|
||||||
|
|
||||||
List<DictDataDO> dictDataDOS = dictDataMapper.selectList("dict_type", "infra_file_type");
|
|
||||||
int maxValue = 0;
|
|
||||||
if (!dictDataDOS.isEmpty()){
|
|
||||||
maxValue = dictDataMapper.getMaxValue();
|
|
||||||
}
|
|
||||||
createReqVO.setValue( String.valueOf( maxValue + 1 ) );
|
|
||||||
createReqVO.setDictType("kefu_verbal_trick_type");
|
|
||||||
createReqVO.setStatus(0);
|
|
||||||
// 插入字典类型
|
|
||||||
dictDataMapper.insert(createReqVO);
|
|
||||||
return createReqVO.getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Long createPicType(DictDataDO createReqVO) {
|
|
||||||
|
|
||||||
List<DictDataDO> dictDataDOS = dictDataMapper.selectList("dict_type", "infra_file_type");
|
|
||||||
int maxValue = 0;
|
|
||||||
if (!dictDataDOS.isEmpty()){
|
|
||||||
maxValue = dictDataMapper.getPicTypeMaxValue();
|
|
||||||
}
|
|
||||||
createReqVO.setValue( String.valueOf( maxValue + 1 ) );
|
|
||||||
createReqVO.setDictType("infra_file_type");
|
|
||||||
createReqVO.setStatus(0);
|
|
||||||
// 插入字典类型
|
|
||||||
dictDataMapper.insert(createReqVO);
|
|
||||||
return createReqVO.getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int updateMenu(Integer id, String name) {
|
|
||||||
DictDataDO id1 = dictDataMapper.selectOne("id", id);
|
|
||||||
id1.setLabel(name);
|
|
||||||
|
|
||||||
return dictDataMapper.updateById(id1);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user