diff --git a/yudao-admin-vue3/src/api/infra/file/index.ts b/yudao-admin-vue3/src/api/infra/file/index.ts index 0e1b2e7..fbad22e 100644 --- a/yudao-admin-vue3/src/api/infra/file/index.ts +++ b/yudao-admin-vue3/src/api/infra/file/index.ts @@ -6,6 +6,7 @@ export interface FilePageReqVO extends PageParam { createTime?: Date[] } + // 文件预签名地址 Response VO export interface FilePresignedUrlRespVO { // 文件配置编号 @@ -43,3 +44,5 @@ export const createFile = (data: any) => { export const updateFile = (data: any) => { return request.upload({ url: '/infra/file/upload', data }) } + + diff --git a/yudao-admin-vue3/src/api/mall/promotion/verbaltrick/index.ts b/yudao-admin-vue3/src/api/mall/promotion/verbaltrick/index.ts index a751a23..b14a764 100644 --- a/yudao-admin-vue3/src/api/mall/promotion/verbaltrick/index.ts +++ b/yudao-admin-vue3/src/api/mall/promotion/verbaltrick/index.ts @@ -41,7 +41,7 @@ export const VerbalTrickApi = { }, // 查询客服话术 - getVerbalTrickList: async () => { - return await request.get({ url: `/promotion/verbal-trick/getVerbalTrickList` }) + getVerbalTrickList: async (id: string) => { + return await request.get({ url: `/promotion/verbal-trick/getVerbalTrickList?id=` +id }) } } \ No newline at end of file diff --git a/yudao-admin-vue3/src/api/system/dict/dict.data.ts b/yudao-admin-vue3/src/api/system/dict/dict.data.ts index f428648..1c0c867 100644 --- a/yudao-admin-vue3/src/api/system/dict/dict.data.ts +++ b/yudao-admin-vue3/src/api/system/dict/dict.data.ts @@ -47,3 +47,13 @@ export const deleteDictData = (id: number) => { export const exportDictData = (params) => { return request.download({ url: '/system/dict-data/export', params }) } + +// 图片素材管理分类 +export const getTypeList = () => { + return request.get({ url: '/system/dict-data/getTypeList' }) +} + +// 客服话术分类 +export const getHuaShuTypeList = () => { + return request.get({ url: '/system/dict-data/getHuaShuTypeList' }) +} diff --git a/yudao-admin-vue3/src/views/infra/file/index.vue b/yudao-admin-vue3/src/views/infra/file/index.vue index 2ff3364..07718e3 100644 --- a/yudao-admin-vue3/src/views/infra/file/index.vue +++ b/yudao-admin-vue3/src/views/infra/file/index.vue @@ -1,126 +1,130 @@ + \ No newline at end of file diff --git a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuMessageList.vue b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuMessageList.vue index 7d22683..ef3cb53 100644 --- a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuMessageList.vue +++ b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuMessageList.vue @@ -118,8 +118,11 @@ v-show="showNewMessageTip" class="newMessageTip flex items-center cursor-pointer
-
- 左边的内容 +
+ + {{item.label}} + +
@@ -156,7 +159,11 @@ v-show="showNewMessageTip" class="newMessageTip flex items-center cursor-pointer import { getStaffToken, setStaffToken} from '@/utils/auth' import type { DropdownInstance } from 'element-plus' import { ref } from 'vue' - + + + import * as DictDataApi from '@/api/system/dict/dict.data' + const huashuType = ref([]) // + const targetMenuId = ref('0') dayjs.extend(relativeTime) defineOptions({ name: 'KeFuMessageList' }) @@ -175,6 +182,7 @@ v-show="showNewMessageTip" class="newMessageTip flex items-center cursor-pointer import { KeFuConversationApi} from '@/api/mall/promotion/kefu/conversation' import { number } from 'vue-types' const onlineStaffList = ref([]) // 在线客服列表的数据 + const queryParams = reactive({ pageNo: 1, pageSize: 10, @@ -285,10 +293,17 @@ v-show="showNewMessageTip" class="newMessageTip flex items-center cursor-pointer /*点击话术库*/ const huashu = async () => { dialogVisible.value = true; + getVerbalTrickList(targetMenuId.value) } - - const getVerbalTrickList = async () => { - const response = await VerbalTrickApi.getVerbalTrickList(); + //话术分类菜单 + const getHuaShuTypeList = async () => { + const data = await DictDataApi.getHuaShuTypeList() + huashuType.value = data + + } + //话术内容 + const getVerbalTrickList = async (id: string) => { + const response = await VerbalTrickApi.getVerbalTrickList(id); verbalTrickList.value = response; // 将数据部分赋值给 verbalTrickList } @@ -298,6 +313,11 @@ v-show="showNewMessageTip" class="newMessageTip flex items-center cursor-pointer message.value = content; dialogVisible.value = false; } + const clickMenu = (id: string) => { + console.log('1111111111',id) + getVerbalTrickList(id) + } + /** 发送文本消息 */ const handleSendMessage = async () => { @@ -416,7 +436,8 @@ v-show="showNewMessageTip" class="newMessageTip flex items-center cursor-pointer } /** 初始化 **/ onMounted(() => { - getVerbalTrickList() + getHuaShuTypeList() + getVerbalTrickList(targetMenuId.value) }) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java index 8b2ce4f..301ca7b 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java @@ -9,6 +9,8 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.*; import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; import cn.iocoder.yudao.module.infra.service.file.FileService; +import cn.iocoder.yudao.module.system.api.dict.DictDataApi; +import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; @@ -25,6 +27,9 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; +import java.util.ArrayList; +import java.util.List; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.module.infra.framework.file.core.utils.FileTypeUtils.writeAttachment; @@ -38,6 +43,7 @@ public class FileController { @Resource private FileService fileService; + @PostMapping("/upload") @Operation(summary = "上传文件", description = "模式一:后端上传文件") public CommonResult uploadFile(FileUploadReqVO uploadReqVO) throws Exception { @@ -100,4 +106,7 @@ public class FileController { return success(BeanUtils.toBean(pageResult, FileRespVO.class)); } + + + } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/verbaltrick/VerbalTrickController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/verbaltrick/VerbalTrickController.java index 25e9829..4d671e2 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/verbaltrick/VerbalTrickController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/verbaltrick/VerbalTrickController.java @@ -101,9 +101,8 @@ public class VerbalTrickController { @GetMapping("/getVerbalTrickList") @Operation(summary = "获得客服话术数据") - @PreAuthorize("@ss.hasPermission('promotion:verbal-trick:query')") - public CommonResult> getVerbalTrickList() { - List result = verbalTrickService.getVerbalTrickList(); + public CommonResult> getVerbalTrickList(String id) { + List result = verbalTrickService.getVerbalTrickList(id); return success(result); } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/verbaltrick/VerbalTrickService.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/verbaltrick/VerbalTrickService.java index ac55dd0..9e57c76 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/verbaltrick/VerbalTrickService.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/verbaltrick/VerbalTrickService.java @@ -56,6 +56,6 @@ public interface VerbalTrickService { * 获取话术数据 * @return */ - List getVerbalTrickList(); + List getVerbalTrickList(String id); } \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/verbaltrick/VerbalTrickServiceImpl.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/verbaltrick/VerbalTrickServiceImpl.java index fc3b8b0..b935926 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/verbaltrick/VerbalTrickServiceImpl.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/verbaltrick/VerbalTrickServiceImpl.java @@ -72,8 +72,9 @@ public class VerbalTrickServiceImpl implements VerbalTrickService { } @Override - public List getVerbalTrickList() { - return verbalTrickMapper.selectList(); + public List getVerbalTrickList(String id) { + + return verbalTrickMapper.selectList("type",id); } } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java index d7402a1..eea3e29 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java @@ -7,6 +7,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.system.api.dict.DictDataApi; +import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO; import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataPageReqVO; import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataRespVO; import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataSaveReqVO; @@ -38,6 +40,10 @@ public class DictDataController { @Resource private DictDataService dictDataService; + @Resource + public DictDataApi dictDataApi; + + @PostMapping("/create") @Operation(summary = "新增字典数据") @PreAuthorize("@ss.hasPermission('system:dict:create')") @@ -101,4 +107,23 @@ public class DictDataController { BeanUtils.toBean(list, DictDataRespVO.class)); } + /** + * 根据字典类型查询字典数据信息:图片素材管理分类 + */ + @GetMapping(value = "/getTypeList") + public CommonResult> getTypeList() { + List dictDataList = dictDataApi.getDictDataList("infra_file_type"); + return success(dictDataList); + } + + + /** + * 根据字典类型查询字典数据信息:客服素材分类 + */ + @GetMapping(value = "/getHuaShuTypeList") + public CommonResult> getHuaShuTypeList() { + List dictDataList = dictDataApi.getDictDataList("kefu_verbal_trick_type"); + return success(dictDataList); + } + }