askbot-dragon 1.0.21 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +27 -27
  2. package/babel.config.js +6 -6
  3. package/dragon.iml +7 -7
  4. package/package.json +56 -56
  5. package/public/index.html +43 -43
  6. package/src/App.vue +31 -31
  7. package/src/api/index.js +1 -1
  8. package/src/api/mock.http +2 -2
  9. package/src/api/requestUrl.js +185 -185
  10. package/src/assets/js/AliyunlssUtil.js +92 -92
  11. package/src/assets/js/Base64Util.js +22 -22
  12. package/src/assets/js/script.js +36 -36
  13. package/src/assets/less/common.css +6773 -6773
  14. package/src/assets/less/converSationContainer/common.less +191 -191
  15. package/src/assets/less/converSationContainer/converSatonContainer.less +493 -493
  16. package/src/assets/less/iconfont.css +37 -37
  17. package/src/assets/less/ticketMessage.less +211 -211
  18. package/src/components/ActionAlertIframe.vue +112 -112
  19. package/src/components/AiGuide.vue +467 -467
  20. package/src/components/AnswerDocknowledge.vue +131 -131
  21. package/src/components/AskIFrame.vue +15 -15
  22. package/src/components/ConversationContainer.vue +4658 -4658
  23. package/src/components/FileType.vue +86 -86
  24. package/src/components/Message.vue +27 -27
  25. package/src/components/actionSatisfaction.vue +107 -107
  26. package/src/components/actionSendToBot.vue +62 -62
  27. package/src/components/answerDissatisfaction.vue +62 -62
  28. package/src/components/answerRadio.vue +76 -76
  29. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  30. package/src/components/ask-components/Msgloading.vue +37 -37
  31. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  32. package/src/components/askVideo.vue +138 -138
  33. package/src/components/assetDetails.vue +370 -370
  34. package/src/components/assetMessage.vue +228 -228
  35. package/src/components/associationIntention.vue +269 -269
  36. package/src/components/botActionSatisfactor.vue +68 -68
  37. package/src/components/chatContent.vue +513 -513
  38. package/src/components/feedBack.vue +136 -136
  39. package/src/components/fielListView.vue +346 -346
  40. package/src/components/file/AliyunOssComponents.vue +108 -108
  41. package/src/components/formTemplate.vue +3344 -3344
  42. package/src/components/loadingProcess.vue +164 -164
  43. package/src/components/message/ActionAlertIframe.vue +112 -112
  44. package/src/components/message/ShopMessage.vue +164 -164
  45. package/src/components/message/TextMessage.vue +924 -924
  46. package/src/components/message/TicketMessage.vue +177 -177
  47. package/src/components/message/swiper/index.js +4 -4
  48. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  49. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  50. package/src/components/msgLoading.vue +231 -231
  51. package/src/components/myPopup.vue +70 -70
  52. package/src/components/popup.vue +227 -227
  53. package/src/components/receiverMessagePlatform.vue +65 -65
  54. package/src/components/recommend.vue +89 -89
  55. package/src/components/selector/hOption.vue +20 -20
  56. package/src/components/selector/hSelector.vue +199 -199
  57. package/src/components/selector/hWrapper.vue +216 -216
  58. package/src/components/senderMessagePlatform.vue +50 -50
  59. package/src/components/source/BotMessage.vue +24 -24
  60. package/src/components/source/CustomMessage.vue +24 -24
  61. package/src/components/test.vue +260 -260
  62. package/src/components/tree.vue +294 -275
  63. package/src/components/utils/AliyunIssUtil.js +72 -72
  64. package/src/components/utils/ckeditor.js +155 -155
  65. package/src/components/utils/ckeditorImageUpload/command.js +109 -109
  66. package/src/components/utils/ckeditorImageUpload/editing.js +11 -11
  67. package/src/components/utils/ckeditorImageUpload/plugin-image.js +11 -11
  68. package/src/components/utils/ckeditorImageUpload/toolbar-ui.js +40 -40
  69. package/src/components/utils/ckeditorfileUpload/common.js +111 -111
  70. package/src/components/utils/ckeditorfileUpload/editing.js +11 -11
  71. package/src/components/utils/ckeditorfileUpload/plugin_file.js +11 -11
  72. package/src/components/utils/ckeditorfileUpload/toolbar_ui.js +34 -34
  73. package/src/components/utils/format_date.js +25 -25
  74. package/src/components/utils/index.js +6 -6
  75. package/src/components/utils/math_utils.js +29 -29
  76. package/src/components/voiceComponent.vue +119 -119
  77. package/src/main.js +60 -60
  78. package/vue.config.js +47 -47
@@ -1,185 +1,185 @@
1
- const requestUrl = {
2
- auth: { // 用户
3
- login: '/api/auth/sign-in', // 登录 POST
4
- logout: '/api/auth/sign-out', // 登出 POST
5
- register: '/api/auth/sign-up', // 注册 POST
6
- logged:'/api/sso/auth/logged', //检查是否登录当前系统 若没有 http状态码为 403
7
- ssoLogin:'/api/sso/auth', // SSO 登录GET/POST
8
- ssoLogout: '/api/sso/auth/sign-out', // SSO 登出接口
9
- },
10
- bot: { // 用户
11
- createBot: '/api/bot', // 创建机器人 POST
12
- getBotInfo: '/api/bot', // 获取机器人详情 GET
13
- getBotList: '/api/bot/list', // 获取机器人列表 GET
14
- deleteBot: '/api/bot', // 删除机器人 DELETE
15
- updateBot: '/api/bot', // 更新机器人 PUT
16
- createRefBot: '/api/bot/template/create', //根据模板创建机器人 POST
17
- getBotadvancedSetting: '/api/bot/advanced-settings', // 获取机器人高级设置 GET
18
- },
19
- skill: { // 知识库
20
- getSkillList: '/api/skill', // 机器人知识库列表 GET
21
- createSkill: '/api/skill', // 创建知识库 POST
22
- },
23
- intentQuestion: { // 意图问法
24
- addIntentQ: '/api/intent-question', // 添加单个问法 POST
25
- deleteIntentQ: '/api/intent-question', // 删除问法 DELETE
26
- batchuploadIntentQ: '/api/intent-question/batch', // 批量导入问题 POST
27
- batchuploadIntentQProcess: '/api/intent-question/batch/progress', // 请求文件上传进度
28
- getIntentQList: '/api/intent-question/list', // 问法列表 GET
29
- downloadIntentQTemp: '/api/intent-question/template', // 下载问题导入模板
30
- changeQuestionIntent: '/api/intent-question/change-question-intent', // 更改问题所属意图 POST
31
- },
32
- intentKeywordRule: { // 意图规则关键词
33
- addIntentKR: '/api/intent-keyword-rule', // 新增意图规则 POST
34
- getIntentKRList: '/api/intent-keyword-rule/list', // 获取意图规则列表 GET
35
- updateIntentKR: '/api/intent-keyword-rule', // 更新意图规则列表 PUT
36
- deleteIntentKR: '/api/intent-keyword-rule', // 删除意图规则 DELETE
37
- },
38
- intent: { // 意图相关
39
- // 意图分类
40
- getIntentTypeList: '/api/intent/types', // 获取意图分类列表 GET
41
- addIntentType: '/api/intent/types', // 新增or更新意图分类 POST
42
- updateIntentType: '/api/intent/type', // 更新意图分类 PUT
43
- deleteIntentType: '/api/intent/type', // 删除意图分类 DELETE
44
- // 单个意图操作
45
- getIntentList: '/api/intent/list', // 获取意图列表 GET
46
- getIntentTree: '/api/intent/tree', // 获取意图树状结构 GET
47
- addIntent: '/api/intent', // 新增意图 POST
48
- updateIntent: '/api/intent', // 更新意图 PUT
49
- deleteIntent: '/api/intent', // 删除意图 DELETE
50
- },
51
- intentAnswer: { // 意图答案
52
- addIntentAnswer: '/api/intent-answer', // 新增答案 POST
53
- updateIntentAnswer: '/api/intent-answer', // 更新答案 PUT
54
- deleteIntentAnswer: '/api/intent-answer', // 删除答案 DELETE
55
- },
56
- entity: { // 实体
57
- getEntityList: '/api/v1/entity', // 获取实体列表 GET
58
- addEntity: '/api/v1/entity', // 添加实体 POST
59
- updateEntity: '/api/v1/entity', // 更新实体 PUT
60
- deleteEntity: '/api/v1/entity', // 删除实体 DELETE
61
- getEntitySkills: '/api/v1/entity/skills', // 获取技能列表及所属的实体数量 GET
62
- getAllEntityBySkill: '/api/v1/entity/all', // 获取指定知识库下所有实体 GET
63
- getEntityTree: '/api/v1/entity/tree', //获取实体结构树
64
- },
65
- dialog: {
66
- test: '/api/v1/dialog/test', // 测试窗问题
67
- test_v2: '/api/v2/dialog/test', // 测试窗问题
68
- },
69
- trainList: {
70
- intentTree: '/api/intent/tree', // 意图树 GET
71
- search: '/api/intent/tag/search', // 查询待标注问题 GET
72
- skill: '/api/skill', // 机器人知识库列表 GET
73
- intentList: '/api/intent/list', // 关键字分类查询意图GET
74
- intentTypes: '/api/intent/types', // 查询分类 GET
75
- mark: '/api/intent/tag/mark', // 标注意图POST
76
- markBatch: '/api/intent/tag/mark-batch', // 批量标注意图POST
77
- trainList: '/api/record/train/search', // 训练记录 GET
78
- trainDetails: '/api/record/train/get', // 训练记录详情GET
79
- trainTag: '/api/intent/tag/train', // 训练机器人 POST
80
- removeTag: '/api/record/train/remove', // 移除标注记录 POST
81
- trainStatus: '/api/record/train/get-latest/', // 机器人训练状态 GET
82
- noteCount: '/api/intent/tag/count/', // 获取标注数量 GET
83
- skillIntent: '/api/intent/list/skill-intent', // 搜索意图 GET
84
- },
85
- chatFlowComponent: { // 对话流程组件
86
- getComponentsTypes: '/api/v1/dialog/design/component', // 获取流程组件类型列表 GET
87
- getConditionList: '/api/v1/dialog/design/component/condition', // 获取条件列表 GET
88
- getContitionScopeList: '/api/v1/dialog/design/component/condition/scope', // 获取条件作用于列表 GET
89
- },
90
- chatFlowNode: { // 对话流程组件
91
- getIntentChatFlow: '/api/v1/dialog/process', // 获取指定意图流程 GET
92
- getStertChatFlow: '/api/v1/dialog/process/start_node', // 获取开始节点流程 GET
93
- getEndChatFlow: '/api/v1/dialog/process/end_node', // 获取结束节点流程 GET
94
- addNode: '/api/v1/dialog/process/node', // 添加节点 POST
95
- deleteNode: '/api/v1/dialog/process/node', // 删除节点 DELETE
96
- updateNode: '/api/v1/dialog/process/node/action', // 更新节点 PUT
97
- updateNodeName: '/api/v1/dialog/process/node/name', // 更新节点名称 PUT
98
- ipdateStartNodeNew: '/api/bot/start_node', // 更新保存开始节点
99
- ipdateEndNodeNew: '/api/bot/end_node', // 更新保存开始节点
100
- moveNode: '/api/v1/dialog/process/node/move', // 移动节点
101
- },
102
- eWechatBind :{//企业微信接入组件
103
- getAuthUrl: '/api/bind/ewechat/get/auth-url',//获取授权URL
104
- getAuthDomain: '/api/bind/ewechat/get/domain',//获取授权域
105
- getBindList: '/api/bind/ewechat/list',//绑定应用列表
106
- postUnbind: '/api/bind/ewechat/unbind',//解绑应用
107
- //'/api/bind/ewechat/detail/{bindId}'/api//查看绑定详细信息
108
- },
109
- wechatBind :{//企业微信接入组件
110
- getAuthUrl: '/api/bind/wechat/get/auth-url',//获取授权URL GET
111
- getBindList: '/api/bind/wechat/list',//绑定应用列表GET
112
- unbind: '/api/bind/wechat/unbind',//解绑应用POST
113
- detail: '/api/bind/wechat/detail/{bindId}', //查看绑定详细信息 GET
114
-
115
- },
116
- miniProgramBind: { // 小程序接入
117
- wxMiniCode: '/api/wx/mini/acode', // 获取小程序码
118
- },
119
- websiteBind: { // 网站接入
120
- getBindWebsiteList: '/api/bot/web/access/list', // 获取绑定网站列表GET
121
- addWebsiteBind: '/api/bot/web/access', //新增网站接入信息POST
122
- deleteWebsiteBind: '/api/bot/web/access', //删除网站接入信息DELETE
123
- },
124
- messageController :{//聊天记录组件
125
- getChatbotMessageList: '/api/message/dialog/',//获取机器人聊天列表GET
126
- getUserDialog: '/api/message/history/',//获取聊天记录GET
127
- getUserInformation: '/api/message/userInfo/',//获取用户信息GET
128
-
129
- },
130
- superIntent :{//超级意图模板
131
- updateSuperIntentSwitch: '/api/template/intent/enable',//开启关闭超级意图模板功能PUT
132
- getIntentMatchTemplate: '/api/template/intent/get/',//获取意图对应的模板GET
133
- updateIntentMatchTemplate: '/api/template/intent/save',//保存意图对应的模板POST
134
- getSuperIntentList: '/api/template/list',//获取超级意图列表GET
135
-
136
- },
137
- statistics :{//统计分析
138
- getStatisticsData: '/api/statistics/data',//获取统计数据GET
139
- getChannelList: '/api/statistics/source',//获取接入渠道GET
140
-
141
- },
142
- accountManage :{//成员管理
143
- getAccountList: '/api/member/list',//获取成员列表GET
144
- account: '/api/member',//成员管理
145
- deleteAccount: '', // 删除账号
146
- updateAccount: '/api/member', // 更新账号
147
-
148
- },
149
- role :{//角色管理
150
- getRoleList: '/api/role',//获取角色列表GET
151
-
152
- },
153
- accountGroup :{//用户分组管理
154
- getAccountGroupList: '/api/user/group',//获取用户分组列表GET
155
- addAccountGroup: '/api/user/group',//新增用户组POST
156
- updateAccountGroup: '/api/user/group',//更新用户分组PUT
157
- deleteAccountGroup: '/api/user/group',//删除用户分组DELETE
158
-
159
- },
160
- relatedQuestion :{//关联问法推荐
161
- getRelatedQuestionList: '/api/rq/list',//获取用户分组列表GET
162
- addOneRelatedQuestion: '/api/rq/add',//添加一个关联问法POST
163
- addAllRelatedQuestion: '/api/rq/add-all',//添加全部关联问法POST
164
- ignoreOneRelatedQuestion: '/api/rq/ignore',//忽略一个关联问法POST
165
- ignoreAllRelatedQuestion: '/api/rq/ignore-all',//忽略全部关联问法POST
166
-
167
- },
168
- webhook :{
169
- getWebhookDir : '/api/webhook/dir/list', //获取Webhook目录列表GET
170
- addDir : '/api/webhook/dir' ,//新增目录POST
171
- deleteDir: '/api/webhook/dir', //删除目录DELETE
172
- deleteWebhook: '/api/webhook', //删除Webhook DELETE
173
- webhookDetail: '/api/webhook/', //查询api详情 GET
174
- webhookAdd: '/api/webhook', //新增修改webhook POST
175
- webhookSend: '/api/webhook/send', //发送webhook请求 POST
176
- webhookCopy: '/api/webhook/copy', //拷贝webhook POST
177
- webhookRelease: '/api/webhook', //发布webhook PUT
178
- uploadFile: '/api/oss', //上传文件 POST
179
- webhookNameCheck: '/api/webhook/check/name', //webhook名称重复校验 GET
180
- webhookbaseList: 'api/webhook/base-list', // webhook列表(组件配置使用)
181
- }
182
-
183
- }
184
-
185
- export { requestUrl };
1
+ const requestUrl = {
2
+ auth: { // 用户
3
+ login: '/api/auth/sign-in', // 登录 POST
4
+ logout: '/api/auth/sign-out', // 登出 POST
5
+ register: '/api/auth/sign-up', // 注册 POST
6
+ logged:'/api/sso/auth/logged', //检查是否登录当前系统 若没有 http状态码为 403
7
+ ssoLogin:'/api/sso/auth', // SSO 登录GET/POST
8
+ ssoLogout: '/api/sso/auth/sign-out', // SSO 登出接口
9
+ },
10
+ bot: { // 用户
11
+ createBot: '/api/bot', // 创建机器人 POST
12
+ getBotInfo: '/api/bot', // 获取机器人详情 GET
13
+ getBotList: '/api/bot/list', // 获取机器人列表 GET
14
+ deleteBot: '/api/bot', // 删除机器人 DELETE
15
+ updateBot: '/api/bot', // 更新机器人 PUT
16
+ createRefBot: '/api/bot/template/create', //根据模板创建机器人 POST
17
+ getBotadvancedSetting: '/api/bot/advanced-settings', // 获取机器人高级设置 GET
18
+ },
19
+ skill: { // 知识库
20
+ getSkillList: '/api/skill', // 机器人知识库列表 GET
21
+ createSkill: '/api/skill', // 创建知识库 POST
22
+ },
23
+ intentQuestion: { // 意图问法
24
+ addIntentQ: '/api/intent-question', // 添加单个问法 POST
25
+ deleteIntentQ: '/api/intent-question', // 删除问法 DELETE
26
+ batchuploadIntentQ: '/api/intent-question/batch', // 批量导入问题 POST
27
+ batchuploadIntentQProcess: '/api/intent-question/batch/progress', // 请求文件上传进度
28
+ getIntentQList: '/api/intent-question/list', // 问法列表 GET
29
+ downloadIntentQTemp: '/api/intent-question/template', // 下载问题导入模板
30
+ changeQuestionIntent: '/api/intent-question/change-question-intent', // 更改问题所属意图 POST
31
+ },
32
+ intentKeywordRule: { // 意图规则关键词
33
+ addIntentKR: '/api/intent-keyword-rule', // 新增意图规则 POST
34
+ getIntentKRList: '/api/intent-keyword-rule/list', // 获取意图规则列表 GET
35
+ updateIntentKR: '/api/intent-keyword-rule', // 更新意图规则列表 PUT
36
+ deleteIntentKR: '/api/intent-keyword-rule', // 删除意图规则 DELETE
37
+ },
38
+ intent: { // 意图相关
39
+ // 意图分类
40
+ getIntentTypeList: '/api/intent/types', // 获取意图分类列表 GET
41
+ addIntentType: '/api/intent/types', // 新增or更新意图分类 POST
42
+ updateIntentType: '/api/intent/type', // 更新意图分类 PUT
43
+ deleteIntentType: '/api/intent/type', // 删除意图分类 DELETE
44
+ // 单个意图操作
45
+ getIntentList: '/api/intent/list', // 获取意图列表 GET
46
+ getIntentTree: '/api/intent/tree', // 获取意图树状结构 GET
47
+ addIntent: '/api/intent', // 新增意图 POST
48
+ updateIntent: '/api/intent', // 更新意图 PUT
49
+ deleteIntent: '/api/intent', // 删除意图 DELETE
50
+ },
51
+ intentAnswer: { // 意图答案
52
+ addIntentAnswer: '/api/intent-answer', // 新增答案 POST
53
+ updateIntentAnswer: '/api/intent-answer', // 更新答案 PUT
54
+ deleteIntentAnswer: '/api/intent-answer', // 删除答案 DELETE
55
+ },
56
+ entity: { // 实体
57
+ getEntityList: '/api/v1/entity', // 获取实体列表 GET
58
+ addEntity: '/api/v1/entity', // 添加实体 POST
59
+ updateEntity: '/api/v1/entity', // 更新实体 PUT
60
+ deleteEntity: '/api/v1/entity', // 删除实体 DELETE
61
+ getEntitySkills: '/api/v1/entity/skills', // 获取技能列表及所属的实体数量 GET
62
+ getAllEntityBySkill: '/api/v1/entity/all', // 获取指定知识库下所有实体 GET
63
+ getEntityTree: '/api/v1/entity/tree', //获取实体结构树
64
+ },
65
+ dialog: {
66
+ test: '/api/v1/dialog/test', // 测试窗问题
67
+ test_v2: '/api/v2/dialog/test', // 测试窗问题
68
+ },
69
+ trainList: {
70
+ intentTree: '/api/intent/tree', // 意图树 GET
71
+ search: '/api/intent/tag/search', // 查询待标注问题 GET
72
+ skill: '/api/skill', // 机器人知识库列表 GET
73
+ intentList: '/api/intent/list', // 关键字分类查询意图GET
74
+ intentTypes: '/api/intent/types', // 查询分类 GET
75
+ mark: '/api/intent/tag/mark', // 标注意图POST
76
+ markBatch: '/api/intent/tag/mark-batch', // 批量标注意图POST
77
+ trainList: '/api/record/train/search', // 训练记录 GET
78
+ trainDetails: '/api/record/train/get', // 训练记录详情GET
79
+ trainTag: '/api/intent/tag/train', // 训练机器人 POST
80
+ removeTag: '/api/record/train/remove', // 移除标注记录 POST
81
+ trainStatus: '/api/record/train/get-latest/', // 机器人训练状态 GET
82
+ noteCount: '/api/intent/tag/count/', // 获取标注数量 GET
83
+ skillIntent: '/api/intent/list/skill-intent', // 搜索意图 GET
84
+ },
85
+ chatFlowComponent: { // 对话流程组件
86
+ getComponentsTypes: '/api/v1/dialog/design/component', // 获取流程组件类型列表 GET
87
+ getConditionList: '/api/v1/dialog/design/component/condition', // 获取条件列表 GET
88
+ getContitionScopeList: '/api/v1/dialog/design/component/condition/scope', // 获取条件作用于列表 GET
89
+ },
90
+ chatFlowNode: { // 对话流程组件
91
+ getIntentChatFlow: '/api/v1/dialog/process', // 获取指定意图流程 GET
92
+ getStertChatFlow: '/api/v1/dialog/process/start_node', // 获取开始节点流程 GET
93
+ getEndChatFlow: '/api/v1/dialog/process/end_node', // 获取结束节点流程 GET
94
+ addNode: '/api/v1/dialog/process/node', // 添加节点 POST
95
+ deleteNode: '/api/v1/dialog/process/node', // 删除节点 DELETE
96
+ updateNode: '/api/v1/dialog/process/node/action', // 更新节点 PUT
97
+ updateNodeName: '/api/v1/dialog/process/node/name', // 更新节点名称 PUT
98
+ ipdateStartNodeNew: '/api/bot/start_node', // 更新保存开始节点
99
+ ipdateEndNodeNew: '/api/bot/end_node', // 更新保存开始节点
100
+ moveNode: '/api/v1/dialog/process/node/move', // 移动节点
101
+ },
102
+ eWechatBind :{//企业微信接入组件
103
+ getAuthUrl: '/api/bind/ewechat/get/auth-url',//获取授权URL
104
+ getAuthDomain: '/api/bind/ewechat/get/domain',//获取授权域
105
+ getBindList: '/api/bind/ewechat/list',//绑定应用列表
106
+ postUnbind: '/api/bind/ewechat/unbind',//解绑应用
107
+ //'/api/bind/ewechat/detail/{bindId}'/api//查看绑定详细信息
108
+ },
109
+ wechatBind :{//企业微信接入组件
110
+ getAuthUrl: '/api/bind/wechat/get/auth-url',//获取授权URL GET
111
+ getBindList: '/api/bind/wechat/list',//绑定应用列表GET
112
+ unbind: '/api/bind/wechat/unbind',//解绑应用POST
113
+ detail: '/api/bind/wechat/detail/{bindId}', //查看绑定详细信息 GET
114
+
115
+ },
116
+ miniProgramBind: { // 小程序接入
117
+ wxMiniCode: '/api/wx/mini/acode', // 获取小程序码
118
+ },
119
+ websiteBind: { // 网站接入
120
+ getBindWebsiteList: '/api/bot/web/access/list', // 获取绑定网站列表GET
121
+ addWebsiteBind: '/api/bot/web/access', //新增网站接入信息POST
122
+ deleteWebsiteBind: '/api/bot/web/access', //删除网站接入信息DELETE
123
+ },
124
+ messageController :{//聊天记录组件
125
+ getChatbotMessageList: '/api/message/dialog/',//获取机器人聊天列表GET
126
+ getUserDialog: '/api/message/history/',//获取聊天记录GET
127
+ getUserInformation: '/api/message/userInfo/',//获取用户信息GET
128
+
129
+ },
130
+ superIntent :{//超级意图模板
131
+ updateSuperIntentSwitch: '/api/template/intent/enable',//开启关闭超级意图模板功能PUT
132
+ getIntentMatchTemplate: '/api/template/intent/get/',//获取意图对应的模板GET
133
+ updateIntentMatchTemplate: '/api/template/intent/save',//保存意图对应的模板POST
134
+ getSuperIntentList: '/api/template/list',//获取超级意图列表GET
135
+
136
+ },
137
+ statistics :{//统计分析
138
+ getStatisticsData: '/api/statistics/data',//获取统计数据GET
139
+ getChannelList: '/api/statistics/source',//获取接入渠道GET
140
+
141
+ },
142
+ accountManage :{//成员管理
143
+ getAccountList: '/api/member/list',//获取成员列表GET
144
+ account: '/api/member',//成员管理
145
+ deleteAccount: '', // 删除账号
146
+ updateAccount: '/api/member', // 更新账号
147
+
148
+ },
149
+ role :{//角色管理
150
+ getRoleList: '/api/role',//获取角色列表GET
151
+
152
+ },
153
+ accountGroup :{//用户分组管理
154
+ getAccountGroupList: '/api/user/group',//获取用户分组列表GET
155
+ addAccountGroup: '/api/user/group',//新增用户组POST
156
+ updateAccountGroup: '/api/user/group',//更新用户分组PUT
157
+ deleteAccountGroup: '/api/user/group',//删除用户分组DELETE
158
+
159
+ },
160
+ relatedQuestion :{//关联问法推荐
161
+ getRelatedQuestionList: '/api/rq/list',//获取用户分组列表GET
162
+ addOneRelatedQuestion: '/api/rq/add',//添加一个关联问法POST
163
+ addAllRelatedQuestion: '/api/rq/add-all',//添加全部关联问法POST
164
+ ignoreOneRelatedQuestion: '/api/rq/ignore',//忽略一个关联问法POST
165
+ ignoreAllRelatedQuestion: '/api/rq/ignore-all',//忽略全部关联问法POST
166
+
167
+ },
168
+ webhook :{
169
+ getWebhookDir : '/api/webhook/dir/list', //获取Webhook目录列表GET
170
+ addDir : '/api/webhook/dir' ,//新增目录POST
171
+ deleteDir: '/api/webhook/dir', //删除目录DELETE
172
+ deleteWebhook: '/api/webhook', //删除Webhook DELETE
173
+ webhookDetail: '/api/webhook/', //查询api详情 GET
174
+ webhookAdd: '/api/webhook', //新增修改webhook POST
175
+ webhookSend: '/api/webhook/send', //发送webhook请求 POST
176
+ webhookCopy: '/api/webhook/copy', //拷贝webhook POST
177
+ webhookRelease: '/api/webhook', //发布webhook PUT
178
+ uploadFile: '/api/oss', //上传文件 POST
179
+ webhookNameCheck: '/api/webhook/check/name', //webhook名称重复校验 GET
180
+ webhookbaseList: 'api/webhook/base-list', // webhook列表(组件配置使用)
181
+ }
182
+
183
+ }
184
+
185
+ export { requestUrl };
@@ -1,92 +1,92 @@
1
-
2
-
3
- const OSS = require('ali-oss');
4
-
5
- const ossConfig={
6
- region: "oss-cn-zhangjiakou",
7
- //云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用STS方式来进行API访问
8
- accessKeyId: "LTAI4G3QtdEdwkEbihBngAsK",
9
- accessKeySecret: "OwgdVfc5PeCkIgqIdug660xmiSPchn",
10
- // stsToken: '<Your securityToken(STS)>',
11
- bucket: "guoranopen-zjk",
12
- };
13
-
14
- let IDX = 256, HEX = [], SIZE = 256, BUFFER;
15
- while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);
16
- let mainId = sessionStorage.getItem('_mainId') ? sessionStorage.getItem('_mainId') : "";
17
- function uid(len) {
18
- let i = 0, tmp = (len || 11);
19
- if (!BUFFER || ((IDX + tmp) > SIZE * 2)) {
20
- for (BUFFER = '', IDX = 0; i < SIZE; i++) {
21
- BUFFER += HEX[Math.random() * 256 | 0];
22
- }
23
- }
24
-
25
- return BUFFER.substring(IDX, IDX++ + tmp);
26
- }
27
-
28
- function dataFormat(fmt, date = new Date()) {
29
- const o = {
30
- "M+": date.getMonth() + 1, //月份
31
- "d+": date.getDate(), //日
32
- "h+": date.getHours(), //小时
33
- "m+": date.getMinutes(), //分
34
- "s+": date.getSeconds(), //秒
35
- "q+": Math.floor((date.getMonth() + 3) / 3), //季度
36
- "S": date.getMilliseconds() //毫秒
37
- };
38
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
39
- for (const k in o)
40
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
41
- return fmt;
42
- }
43
-
44
- function pathGenerate(filename) {
45
- return "front-oss/" + mainId + '/' + dataFormat("yyyy/MM/dd/hh/mm/") + uid(32) + "/" + filename;
46
- }
47
-
48
-
49
- async function upload(ossConfig, data) {
50
- let ossClient = new OSS(ossConfig);
51
- // object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形式,实现将文件上传至当前Bucket或Bucket下的指定目录。
52
- let objectKey = pathGenerate(data.name);
53
- let result = await ossClient.put(objectKey, data);
54
- console.debug(result);
55
- return result;
56
- }
57
-
58
- async function multipartUpload(ossConfig, data, callback,extCallback) {
59
- let ossClient = new OSS(ossConfig);
60
- // object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形式,实现将文件上传至当前Bucket或Bucket下的指定目录。
61
- let objectKey = pathGenerate(data.name);
62
- let res = await ossClient.multipartUpload(objectKey, data, {
63
- progress: function (p, checkpoint) {
64
- console.debug('progress callback', p, checkpoint);
65
- // 断点记录点。浏览器重启后无法直接继续上传,您需要手动触发上传操作。
66
- if (callback && callback instanceof Function) {
67
- callback(p, checkpoint,data,extCallback);
68
- }
69
- }
70
- });
71
- return res;
72
- }
73
-
74
- function ossFileUrl(ossConfig, path, cname) {
75
- if (cname == null) {
76
- return '//' + ossConfig.bucket + '.' + ossConfig.region + '.aliyuncs.com/' + path;
77
- } else {
78
- return cname + '/' + path;
79
- }
80
- }
81
-
82
- function uploadImageByBase64(ossConfig,blob) {
83
- let ossClient = new OSS(ossConfig);
84
-
85
- // object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形 式,实现将文件上传至当前Bucket或Bucket下的指定目录。
86
- let objectKey = pathGenerate(new Date().getTime());
87
- let result = ossClient.put(objectKey, blob);
88
- console.debug(result);
89
- return result;
90
- }
91
-
92
- export {upload, multipartUpload, ossFileUrl,uploadImageByBase64,ossConfig}
1
+
2
+
3
+ const OSS = require('ali-oss');
4
+
5
+ const ossConfig={
6
+ region: "oss-cn-zhangjiakou",
7
+ //云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用STS方式来进行API访问
8
+ accessKeyId: "LTAI4G3QtdEdwkEbihBngAsK",
9
+ accessKeySecret: "OwgdVfc5PeCkIgqIdug660xmiSPchn",
10
+ // stsToken: '<Your securityToken(STS)>',
11
+ bucket: "guoranopen-zjk",
12
+ };
13
+
14
+ let IDX = 256, HEX = [], SIZE = 256, BUFFER;
15
+ while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);
16
+ let mainId = sessionStorage.getItem('_mainId') ? sessionStorage.getItem('_mainId') : "";
17
+ function uid(len) {
18
+ let i = 0, tmp = (len || 11);
19
+ if (!BUFFER || ((IDX + tmp) > SIZE * 2)) {
20
+ for (BUFFER = '', IDX = 0; i < SIZE; i++) {
21
+ BUFFER += HEX[Math.random() * 256 | 0];
22
+ }
23
+ }
24
+
25
+ return BUFFER.substring(IDX, IDX++ + tmp);
26
+ }
27
+
28
+ function dataFormat(fmt, date = new Date()) {
29
+ const o = {
30
+ "M+": date.getMonth() + 1, //月份
31
+ "d+": date.getDate(), //日
32
+ "h+": date.getHours(), //小时
33
+ "m+": date.getMinutes(), //分
34
+ "s+": date.getSeconds(), //秒
35
+ "q+": Math.floor((date.getMonth() + 3) / 3), //季度
36
+ "S": date.getMilliseconds() //毫秒
37
+ };
38
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
39
+ for (const k in o)
40
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
41
+ return fmt;
42
+ }
43
+
44
+ function pathGenerate(filename) {
45
+ return "front-oss/" + mainId + '/' + dataFormat("yyyy/MM/dd/hh/mm/") + uid(32) + "/" + filename;
46
+ }
47
+
48
+
49
+ async function upload(ossConfig, data) {
50
+ let ossClient = new OSS(ossConfig);
51
+ // object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形式,实现将文件上传至当前Bucket或Bucket下的指定目录。
52
+ let objectKey = pathGenerate(data.name);
53
+ let result = await ossClient.put(objectKey, data);
54
+ console.debug(result);
55
+ return result;
56
+ }
57
+
58
+ async function multipartUpload(ossConfig, data, callback,extCallback) {
59
+ let ossClient = new OSS(ossConfig);
60
+ // object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形式,实现将文件上传至当前Bucket或Bucket下的指定目录。
61
+ let objectKey = pathGenerate(data.name);
62
+ let res = await ossClient.multipartUpload(objectKey, data, {
63
+ progress: function (p, checkpoint) {
64
+ console.debug('progress callback', p, checkpoint);
65
+ // 断点记录点。浏览器重启后无法直接继续上传,您需要手动触发上传操作。
66
+ if (callback && callback instanceof Function) {
67
+ callback(p, checkpoint,data,extCallback);
68
+ }
69
+ }
70
+ });
71
+ return res;
72
+ }
73
+
74
+ function ossFileUrl(ossConfig, path, cname) {
75
+ if (cname == null) {
76
+ return '//' + ossConfig.bucket + '.' + ossConfig.region + '.aliyuncs.com/' + path;
77
+ } else {
78
+ return cname + '/' + path;
79
+ }
80
+ }
81
+
82
+ function uploadImageByBase64(ossConfig,blob) {
83
+ let ossClient = new OSS(ossConfig);
84
+
85
+ // object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形 式,实现将文件上传至当前Bucket或Bucket下的指定目录。
86
+ let objectKey = pathGenerate(new Date().getTime());
87
+ let result = ossClient.put(objectKey, blob);
88
+ console.debug(result);
89
+ return result;
90
+ }
91
+
92
+ export {upload, multipartUpload, ossFileUrl,uploadImageByBase64,ossConfig}
@@ -1,22 +1,22 @@
1
- function base64toBlob(b64Data, contentType='', sliceSize=512) {
2
- const byteCharacters = atob(b64Data);
3
- const byteArrays = [];
4
-
5
- for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {
6
- const slice = byteCharacters.slice(offset, offset + sliceSize);
7
-
8
- const byteNumbers = new Array(slice.length);
9
- for (let i = 0; i < slice.length; i++) {
10
- byteNumbers[i] = slice.charCodeAt(i);
11
- }
12
-
13
- const byteArray = new Uint8Array(byteNumbers);
14
-
15
- byteArrays.push(byteArray);
16
- }
17
-
18
- const blob = new Blob(byteArrays, {type: contentType});
19
- return blob;
20
- }
21
-
22
- export {base64toBlob}
1
+ function base64toBlob(b64Data, contentType='', sliceSize=512) {
2
+ const byteCharacters = atob(b64Data);
3
+ const byteArrays = [];
4
+
5
+ for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {
6
+ const slice = byteCharacters.slice(offset, offset + sliceSize);
7
+
8
+ const byteNumbers = new Array(slice.length);
9
+ for (let i = 0; i < slice.length; i++) {
10
+ byteNumbers[i] = slice.charCodeAt(i);
11
+ }
12
+
13
+ const byteArray = new Uint8Array(byteNumbers);
14
+
15
+ byteArrays.push(byteArray);
16
+ }
17
+
18
+ const blob = new Blob(byteArrays, {type: contentType});
19
+ return blob;
20
+ }
21
+
22
+ export {base64toBlob}