Skip to content

Commit

Permalink
optimization: 文本框/下拉框详情展示内容调整&&独立子流程节点详情传参调整
Browse files Browse the repository at this point in the history
  • Loading branch information
ywywZhou authored and luofann committed Sep 7, 2023
1 parent 9dbfce7 commit eed4554
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</p>
<span v-show="!validateInfo.valid" class="common-error-tip error-info">{{validateInfo.message}}</span>
</div>
<span v-else class="rf-view-value">{{viewValue}}</span>
<span v-else class="rf-view-value">{{ value || '--' }}</span>
</div>
</template>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
<template>
<div class="tag-textarea">
<div class="rf-form-wrapper" v-if="formMode">
<div class="rf-form-wrapper">
<div class="rf-form-wrap" :class="{ 'input-focus': input.focus, 'input-disable': isDisabled, 'text-view-mode': !formMode }">
<div
ref="input"
Expand Down Expand Up @@ -47,7 +47,6 @@
</div>
</transition>
</div>
<div v-else class="rf-view-value">{{ value || '--' }}</div>
<span v-show="!validateInfo.valid" class="common-error-tip error-info">{{validateInfo.message}}</span>
</div>
</template>
Expand Down Expand Up @@ -119,7 +118,7 @@
}
},
isDisabled () {
return !this.editable || !this.formMode || this.disable
return !this.editable || !this.formMode || this.disable || this.scheme.attrs?.disabled
}
},
watch: {
Expand Down Expand Up @@ -158,7 +157,7 @@
mounted () {
const divInputDom = this.$el.querySelector('.div-input')
if (divInputDom) {
divInputDom.innerText = this.value
divInputDom.innerText = typeof this.value === 'string' ? this.value : JSON.stringify(this.value)
if (this.render) {
this.handleInputBlur()
// 把用户手动换行变成div标签
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@
query = { task_id, node_id, subprocess_stack }
res = await this.taskflowNodeDetail(query)
} else {
query.subprocess_simple_inputs = true // 标记独立子流程取{key: value}类型数据
res = await this.getNodeActDetail(query)
}
if (res.result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
const { has_key = false, keys_in_constants_parameter = [] } = instanceData.constants_info || {}
Object.keys(pipelineData.constants).forEach(key => {
const cnt = pipelineData.constants[key]
if (cnt.show_type === 'show' && !cnt.pre_render_mako) {
if (cnt.show_type === 'show') {
if (!has_key || keys_in_constants_parameter.includes(key)) {
// api调用时不做校验
cnt.validation = ''
Expand Down
3 changes: 2 additions & 1 deletion frontend/desktop/src/store/modules/task.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,14 @@ const task = {
*/
getNodeActDetail ({ commit }, data) {
const { project_id } = store.state.project
const { instance_id, node_id, component_code, subprocess_stack, loop } = data
const { instance_id, node_id, component_code, subprocess_stack, subprocess_simple_inputs, loop } = data
return axios.get(`taskflow/api/nodes/detail/${project_id}/`, {
params: {
instance_id,
node_id,
component_code,
subprocess_stack,
subprocess_simple_inputs,
loop
}
}).then(response => response.data)
Expand Down

0 comments on commit eed4554

Please sign in to comment.