Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
380d573
Merge pull request #1391 from luofann/feat_integration_bkflow
terlinhe Nov 5, 2024
12d909c
Merge pull request #1393 from luofann/feat_integration_bkflow
terlinhe Nov 6, 2024
01920f2
Merge pull request #1394 from luofann/feat_integration_bkflow
terlinhe Nov 7, 2024
8ac018b
Merge pull request #1396 from luofann/feat_integration_bkflow
terlinhe Nov 7, 2024
f82013b
Merge pull request #1397 from luofann/feat_integration_bkflow
terlinhe Nov 7, 2024
af7c4f3
Merge pull request #1401 from luofann/feat_integration_bkflow
terlinhe Nov 7, 2024
90cc8e1
Merge pull request #1404 from luofann/feat_integration_bkflow
terlinhe Nov 13, 2024
a655787
fix: 生成sql优化
terlinhe Feb 19, 2025
eca7ed9
修改AI返回的数据结构
zhanxu33 Feb 27, 2025
a45a6e0
Merge pull request #1436 from zhanxu33/develop
terlinhe Feb 27, 2025
c1f3b0d
ai 切换成 hunyuan & 修改sql参数
zhanxu33 Mar 18, 2025
b3c3993
Merge pull request #1438 from zhanxu33/develop
terlinhe Mar 18, 2025
5e93b51
修改sql参数的写法
zhanxu33 Mar 18, 2025
af46b8d
Merge pull request #1439 from zhanxu33/develop
terlinhe Mar 18, 2025
6e1b234
feat: 生成sql优化
terlinhe Mar 18, 2025
cebd030
fix: vue2 table 多选列时header展示异常
terlinhe Mar 18, 2025
5c7a4db
Merge pull request #1440 from terlinhe/feat_config
ielgnaw Mar 18, 2025
48e81cd
refactor: 修改表单容器操作按钮文案
luofann Apr 20, 2025
93207bd
--story=120157583 流程关联表单页、数据管理页、流程管理页
luofann Apr 22, 2025
e7bb39c
新建绑定更新&源码支持提单触发流程
luofann Apr 22, 2025
77dab7b
feat: 手动创建的数据管理容器关联流程节点
luofann Apr 23, 2025
6891d42
refactor: 组件源码国际化
luofann Apr 23, 2025
7313901
Merge pull request #1442 from TencentBlueKing/develop
terlinhe Apr 23, 2025
27e24e4
Merge pull request #1441 from luofann/feat_form_container
terlinhe Apr 23, 2025
9fde0db
Merge pull request #1443 from TencentBlueKing/develop
terlinhe Apr 23, 2025
fdd424a
refactor: 关联表单页编辑
luofann Apr 23, 2025
e4ad7a6
refactor: 已关联页面回填
luofann Apr 23, 2025
00d36cf
fix: 流程关联页面问题修复
luofann Apr 23, 2025
3efa757
fix: 流程绑定页面id取值不正确问题修复
luofann Apr 23, 2025
7d7da0e
fix: 修复流程管理容器关联页面查询重复的问题
luofann Apr 23, 2025
20eaec2
feat: 增加流程工作台容器
luofann May 13, 2025
0478a67
feat: 流程列表页增加生成工作台页面入口以及流程工作台体验问题修复
luofann May 20, 2025
f078949
refactor: 流程管理页关联工作台页面支持绑定已有页面
luofann May 27, 2025
02031fb
refactor: 流程管理容器、流程工作台容器编辑态拉取表格数据
luofann May 27, 2025
ba25f78
refactor: 关联页面下拉框样式优化
luofann May 27, 2025
f71a452
refactor: 应用源码同步
luofann May 27, 2025
99f120b
应用源码生成修复
luofann May 28, 2025
1a4f6e6
Merge pull request #1452 from luofann/fix_form_page_bind
terlinhe May 29, 2025
d03784e
vue3应用源码属性取值修复
luofann May 29, 2025
ee63284
Merge pull request #1453 from luofann/fix_vue2_source_code
terlinhe May 29, 2025
b9a8a67
vue3应用源码ref设置不正确修复
luofann May 30, 2025
b658af5
vue3应用源码ref设置不正确修复
luofann May 30, 2025
5aea927
Merge pull request #1457 from luofann/fix_vue2_source_code
terlinhe May 30, 2025
19c4516
vue3应用源码人员选择器host值注入时机修改
luofann Jun 3, 2025
da0622b
Merge pull request #1458 from luofann/fix_vue2_source_code
terlinhe Jun 3, 2025
269385d
refactor: 上云版、社区版bkflow网关名称区分
luofann Jun 3, 2025
1fe3b13
fix: 人工节点复用表单模式绑定表单页失败修复
luofann Jun 3, 2025
abee573
Merge pull request #1462 from luofann/fix_manual_node_use_form
terlinhe Jun 3, 2025
dcc2b7e
Merge pull request #1460 from luofann/feat_bkflow_apigw_name
terlinhe Jun 3, 2025
3f9057c
feat: 问题修复
terlinhe Jul 5, 2025
f50846c
feat: version 1.1.11
terlinhe Jul 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bk.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ module.exports = {
VueI18n: path.resolve(__dirname, './node_modules/vue-i18n')
},
fallback: {
buffer: require.resolve('buffer')
buffer: require.resolve('buffer'),
vm: require.resolve('vm-browserify')
}
},
devServer: {
Expand Down
6 changes: 5 additions & 1 deletion lib/client/src/api/pureAxios.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ async function getPromise (method, url, data, userConfig = {}) {
try {
const response = await axiosRequest
Object.assign(config, response.config || {})
handleResponse({ config, response, resolve, reject })
if (Object.prototype.hasOwnProperty.call(response, 'code') && response.code !== 0) {
reject(response)
} else {
handleResponse({ config, response, resolve, reject })
}
} catch (error) {
Object.assign(config, error.config)
reject(error)
Expand Down
55 changes: 38 additions & 17 deletions lib/client/src/common/ai.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,19 @@ export class Ai {
this.pushPrompt(this.systemPrompt, 'system')
}

receiveMessage (message) {
this.content += message
receiveMessage (message, cover) {
this.content = cover ? message : this.content + message
const cmdIndex = this.content.indexOf('``')
const aiMessage = cmdIndex > 0 ? this.content.slice(0, cmdIndex).trim() : this.content
// 触发消息更新
this.handleMessage(aiMessage, this.content)
}

async endReceiveMessage () {
if (!this.content.trim()) {
this.handleApiError('模型调用失败,返回空文本')
return
}
this.pushPrompt(this.content, 'assistant')
// 触发指令
const cmdIndex = this.content.indexOf('``')
Expand Down Expand Up @@ -127,27 +131,44 @@ export class Ai {
while (true) {
try {
const { value, done } = await reader.read()
if (done) break
const values = (temp + value.toString()).split(/(?<=})\s*(?={"result")/)
// 接口异常处理
if (!response.ok) {
this.handleApiError(value || response.statusText)
break
}
// 接口完成
if (done) {
this.endReceiveMessage()
break
}
const values = (temp + value.toString()).split('\n')
values.forEach((value) => {
const item = value.trim()
const item = value.replace('data:', '').trim()
if (isJSON(item)) {
const {
event,
content,
cover,
result,
data,
message
} = JSON.parse(item)
if (result === true) {
const choice = data?.result?.choices?.[0]
if (!choice) {
this.handleApiError('模型调用失败,返回对象为空')
} else if (choice.finish_reason) {
this.endReceiveMessage()
} else if (choice.delta.content) {
this.receiveMessage(choice.delta.content)
}
} else {

// 业务错误处理
if (result === false || response.status !== 200) {
this.handleApiError(message || '模型调用失败')
return
}

switch (event) {
case 'text':
this.receiveMessage(content, cover)
break
case 'done':
this.endReceiveMessage()
break
case 'error':
this.handleApiError(message || '模型调用失败')
break
}
temp = ''
} else if (item) {
Expand Down Expand Up @@ -182,7 +203,7 @@ export class Ai {
if (!choice) {
this.handleApiError('模型调用失败,返回对象为空')
} else {
this.receiveMessage(choice.message.content)
this.receiveMessage(choice.delta.content)
this.endReceiveMessage()
}
} else {
Expand Down
6 changes: 6 additions & 0 deletions lib/client/src/common/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import { messageSuccess } from '@/common/bkmagic'
import domToImage from './dom-to-image'
import DOMPurify from 'dompurify'
import Vue from 'vue'
import LC from '@/element-materials/core'
import store from '@/store'
Expand Down Expand Up @@ -1025,3 +1026,8 @@ export const isJSON = (str) => {
return false
}
}

export const filterImgSrc = (src) => {
src?.replaceAll('console', '')?.replaceAll('logout', '')
return DOMPurify.sanitize(src)
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@
break
case 'array':
case 'object':
renderVal = getValueFromString(val)
// renderVal = getValueFromString(val)
renderVal = val
break
case 'number':
renderVal = Number(val)
Expand Down
15 changes: 7 additions & 8 deletions lib/client/src/components/project/create-page-dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@
type: String,
default: ''
},
useCustomSave: {
type: Boolean,
default: false
},
// form和flow的数据管理页需要填写默认的pageCode和pageName,带上formId或flowId
initPageData: {
type: Object,
Expand Down Expand Up @@ -249,7 +253,7 @@
},
handleConfirmClick () {
// 判断是不是流程页面或流程管理页面
if (['FLOW', 'FLOW_MANAGE'].includes(this.nocodeType)) {
if (this.useCustomSave || ['FLOW', 'FLOW_MANAGE'].includes(this.nocodeType)) {
this.$emit('save')
} else {
this.save()
Expand Down Expand Up @@ -284,12 +288,7 @@
content.push(JSON.parse(template.content))
templateFormData = { previewImg: template.previewImg, content: JSON.stringify(content) }
}

const formData = {
pageName: this.formData.pageName,
pageCode: this.formData.pageCode
}


const payload = {
data: {
pageData: Object.assign({}, this.formData, templateFormData),
Expand All @@ -307,7 +306,7 @@
const res = await this.$store.dispatch('page/create', payload)
if (res) {
// 页面不是流程页面或流程管理页面
if (!['FLOW', 'FLOW_MANAGE'].includes(this.nocodeType)) {
if (!this.useCustomSave && !['FLOW', 'FLOW_MANAGE'].includes(this.nocodeType)) {
this.$bkMessage({
theme: 'success',
message: this.$t('新建页面成功')
Expand Down
3 changes: 2 additions & 1 deletion lib/client/src/components/project/page-from-template.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
import PreivewErrImg from '@/images/preview-error.png'
import { PAGE_TEMPLATE_TYPE } from '@/common/constant'
import TemplateEditDialog from '@/views/project/template-manage/components/template-edit-dialog'
import { filterImgSrc } from '@/common/util'

export default {
name: 'page-from-template',
Expand Down Expand Up @@ -160,7 +161,7 @@
},
getPreviewImg (previewImg) {
if (previewImg && previewImg.length > 20) {
return previewImg
return filterImgSrc(previewImg)
}
return PreivewErrImg
},
Expand Down
2 changes: 2 additions & 0 deletions lib/client/src/components/render/pc/render-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import WidgetVanPicker from './widget/van-picker'
import WidgetFormContainer from './widget/form-container'
import WidgetDataManageContainer from './widget/data-manage-container/form-data-manage/edit/index'
import WidgetFlowManageContainer from './widget/flow-manage-container/edit/index'
import WidgetFlowWorkbenchContainer from './widget/flow-workbench-container/edit/index'
import WidgetVanTab from './widget/van-tab'
import BkCharts from './widget/bk-charts/bk-charts'
import Chart from './widget/chart/chart'
Expand Down Expand Up @@ -53,6 +54,7 @@ export default {
WidgetFormContainer,
WidgetDataManageContainer,
WidgetFlowManageContainer,
WidgetFlowWorkbenchContainer,
WidgetVanTab,
BkLuckyCanvas
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function (type) {
return ['widget-form-container', 'widget-data-manage-container'].includes(type)
return ['widget-form-container', 'widget-data-manage-container', 'widget-flow-manage-container', 'widget-flow-workbench-container'].includes(type)
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

/* v3 table 样式 */
.bk-lesscode-table {
.bk-lesscode-table-head table th.column_fixed {
background: inherit;
}
.bk-lesscode-table-body {
overflow: visible;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,10 @@ export default {
return h({
component: 'bk-table',
props: {
border: framework === 'vue2' ? false : ['outer', 'row'],
data: this.tableData,
pagination: this.pagination,
remotePagination: true,
remotePagination: true
},
on: {
'page-change': (val) => {
Expand All @@ -193,6 +194,7 @@ export default {
self.handlePageChange(val)
},
'page-limit-change': (val) => {
self.pagination.current = 1
self.handlePageLimitChange(val)
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default {
component: 'div',
class: 'widget-data-manage-container',
children: this.loading ? null : [
h({
(this.buttons.length > 0 || this.filters.length > 0) ? h({
component: 'div',
class: 'data-manage-operate-area',
children: [
Expand Down Expand Up @@ -97,7 +97,7 @@ export default {
]
}) : null
]
}),
}) : null,
(this.hideFilters || this.filters.length === 0) ? null : h({
component: filters,
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,10 @@
color: #3a84ff;
}
}
.bk-lesscode-table {
border-bottom: 1px solid #dcdee5;
.bk-lesscode-table-body tbody tr td {
border-bottom-color: #dcdee5;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
background: #FFFFFF;
border: 1px dashed #CCCCCC;
overflow: hidden;
.flow-manage-title {
font-size: 16px;
color: #313238;
}
&.empty{
padding: 24px 32px;
background: #F9F8FC;
Expand All @@ -28,7 +32,8 @@
pointer-events: auto !important;
}
}
.process-render {
.process-render * {
pointer-events: auto !important;
.filter-render-wrapper {
padding: 16px 24px;
background: #FAFBFC;
Expand Down Expand Up @@ -120,4 +125,10 @@
}
}
}
.bk-lesscode-table {
border-bottom: 1px solid #dcdee5;
.bk-lesscode-table-body tbody tr td {
border-bottom-color: #dcdee5;
}
}
}
Loading