lw-cdp-ui 1.2.30 → 1.2.31
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.
|
@@ -157,22 +157,22 @@ export default class Dagre {
|
|
|
157
157
|
// 根据源节点和目标节点的位置计算路径点
|
|
158
158
|
if (newSourceNodeData.x < newTargetNodeData.x) {
|
|
159
159
|
pointsList.push({
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
x: newSourceNodeData.x + sourceNodeModel.width / 2,
|
|
161
|
+
y: newSourceNodeData.y,
|
|
162
|
+
});
|
|
163
163
|
pointsList.push({
|
|
164
164
|
x: newSourceNodeData.x + sourceNodeModel.width / 2 + (model.offset || 50),
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
y: newSourceNodeData.y,
|
|
166
|
+
});
|
|
167
167
|
pointsList.push({
|
|
168
168
|
x: newSourceNodeData.x + sourceNodeModel.width / 2 + (model.offset || 50),
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
y: newTargetNodeData.y,
|
|
170
|
+
});
|
|
171
171
|
pointsList.push({
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
172
|
+
x: newTargetNodeData.x - targetNodeModel.width / 2,
|
|
173
|
+
y: newTargetNodeData.y,
|
|
174
|
+
});
|
|
175
|
+
return this.pointFilter(pointsList);
|
|
176
176
|
}
|
|
177
177
|
if (newSourceNodeData.x > newTargetNodeData.x) {
|
|
178
178
|
if (newSourceNodeData.y >= newTargetNodeData.y) {
|
|
@@ -283,7 +283,7 @@ export default {
|
|
|
283
283
|
})
|
|
284
284
|
this.initMenu()
|
|
285
285
|
await this.initNode()
|
|
286
|
-
if (this.modelValue && this.modelValue?.nodes
|
|
286
|
+
if (this.modelValue && this.modelValue?.nodes?.length > 0) {
|
|
287
287
|
this.logicFlow.render(this.modelValue)
|
|
288
288
|
} else {
|
|
289
289
|
// 根据节点数据初始化节点
|
|
@@ -101,7 +101,12 @@
|
|
|
101
101
|
</template>
|
|
102
102
|
<!-- date -->
|
|
103
103
|
<template v-else-if="item.component == 'date'">
|
|
104
|
-
|
|
104
|
+
<template v-if="typeof objItem.value == 'string'">
|
|
105
|
+
{{ dayjs(objItem.value).format(item?.options?.valueFormat || 'YYYY-MM-DD HH:mm:ss') }}
|
|
106
|
+
</template>
|
|
107
|
+
<template v-if="typeof objItem.value == 'object'">
|
|
108
|
+
{{ objItem.value.length > 0 ? dayjs(objItem.value[0]).format(item?.options?.valueFormat || 'YYYY-MM-DD HH:mm:ss') + ' - ' + dayjs(objItem.value[1]).format(item?.options?.valueFormat || 'YYYY-MM-DD HH:mm:ss') : '--' }}
|
|
109
|
+
</template>
|
|
105
110
|
</template>
|
|
106
111
|
<!-- number -->
|
|
107
112
|
<template v-else-if="item.component == 'number'">
|