@web-utils/component 4.0.15 → 4.0.16

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 (169) hide show
  1. package/address-input/index.mjs +13 -15
  2. package/card/index.mjs +18 -20
  3. package/carousel/index.mjs +10 -12
  4. package/chat/index.mjs +45 -56
  5. package/chunk-file-uploader/index.mjs +36 -378
  6. package/chunk-file-uploader/style.css +1 -1
  7. package/chunks/ElementBaseInfo.ZADwixb5.mjs +125 -0
  8. package/chunks/ElementForm.CQ3PN5qj.mjs +223 -0
  9. package/chunks/ElementListeners.De_PRuIm.mjs +215 -0
  10. package/chunks/ElementMultiInstance.DQo2wuAQ.mjs +181 -0
  11. package/chunks/ElementOtherConfig.B1NfMTYh.mjs +60 -0
  12. package/chunks/ElementProperties.CosfDrlW.mjs +112 -0
  13. package/chunks/{ElementTaskConfig.AvBOzAni.mjs → ElementTaskConfig.Bko0kgTp.mjs} +55 -63
  14. package/chunks/FlowCondition.Y6qEYi1T.mjs +102 -0
  15. package/chunks/FormTemp.BQxO5IQq.mjs +123 -0
  16. package/chunks/SignalAndMessage.Bb5PFX0N.mjs +85 -0
  17. package/chunks/UserTaskListeners.Bv3BDfEI.mjs +169 -0
  18. package/chunks/{confirmable-mixin.BFZb6pcK.mjs → confirmable-mixin.B2TtLAdk.mjs} +1 -1
  19. package/chunks/core.0Exl13Mz.mjs +54 -0
  20. package/chunks/{dataformat.DJoNBlmI.mjs → dataformat.CpqOeGBl.mjs} +6 -6
  21. package/chunks/{dic.BinnDitI.mjs → dic.Dkl-leRW.mjs} +9 -9
  22. package/chunks/dictionary.DGt59Ir7.mjs +68 -0
  23. package/chunks/{event.DSlcqYHL.mjs → event.9aDS6jcw.mjs} +2 -2
  24. package/chunks/{form-input.BtS_J5a2.mjs → form-input.CvFdwlEV.mjs} +2 -2
  25. package/chunks/form-item.LWjePsPa.mjs +233 -0
  26. package/chunks/{index.CIfe3UB3.mjs → index.9OxHjTIE.mjs} +2 -2
  27. package/chunks/{index.Cn7aq-Et.mjs → index.B2TRddqf.mjs} +8 -8
  28. package/chunks/{init.xOlFpTyZ.mjs → init.DAsXSoLW.mjs} +2 -2
  29. package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
  30. package/chunks/{util.DI42t5GU.mjs → util.DqFv_pWg.mjs} +22 -22
  31. package/chunks/utilSelf.Csq1766E.mjs +48 -0
  32. package/chunks/utils.DRcxC1Fb.mjs +60 -0
  33. package/color-picker/index.mjs +22 -101
  34. package/confirm-button/index.mjs +1 -1
  35. package/confirmable/index.mjs +1 -1
  36. package/data-box/index.mjs +12 -15
  37. package/data-card/index.mjs +10 -12
  38. package/data-card-text/index.mjs +10 -12
  39. package/data-display/index.mjs +15 -17
  40. package/data-icons/index.mjs +13 -16
  41. package/data-imgtext/index.mjs +15 -18
  42. package/data-operatext/index.mjs +14 -16
  43. package/data-panel/index.mjs +13 -16
  44. package/data-pay/index.mjs +16 -20
  45. package/data-price/index.mjs +14 -16
  46. package/data-progress/index.mjs +13 -17
  47. package/data-rotate/index.mjs +12 -15
  48. package/data-table-picker/index.mjs +15 -18
  49. package/data-tabs/index.mjs +12 -15
  50. package/dialog-form/index.mjs +16 -18
  51. package/dynamic-table/index.mjs +25 -30
  52. package/editable-progress/index.mjs +9 -11
  53. package/editable-tree/index.mjs +52 -56
  54. package/egd-collapse-item/index.mjs +9 -9
  55. package/element-dialog/index.mjs +22 -23
  56. package/element-listeners/style.css +1 -0
  57. package/element-multi-instance/style.css +1 -0
  58. package/flex-column/index.mjs +1 -1
  59. package/flex-item/index.mjs +1 -1
  60. package/flex-row/index.mjs +1 -1
  61. package/flow/index.mjs +10 -11
  62. package/flow-designer/index.mjs +699 -1973
  63. package/flow-designer/style.css +1 -1
  64. package/flow-node/index.mjs +1 -1
  65. package/flow-viewer/index.mjs +9 -9
  66. package/form-block/index.mjs +32 -34
  67. package/form-cascader/index.mjs +23 -24
  68. package/form-checkbox/index.mjs +16 -17
  69. package/form-checkbox-group/index.mjs +20 -23
  70. package/form-date-picker/index.mjs +18 -20
  71. package/form-holder/index.mjs +13 -14
  72. package/form-input/index.mjs +14 -15
  73. package/form-input-cron-expression/index.mjs +19 -22
  74. package/form-input-email/index.mjs +15 -16
  75. package/form-input-id-card/index.mjs +12 -13
  76. package/form-input-number/index.mjs +16 -17
  77. package/form-input-phone-number/index.mjs +21 -22
  78. package/form-input-tag/index.mjs +14 -15
  79. package/form-input-time/index.mjs +14 -15
  80. package/form-item/index.mjs +140 -3
  81. package/form-item-group/index.mjs +28 -31
  82. package/form-radio-group/index.mjs +27 -28
  83. package/form-select/index.mjs +21 -23
  84. package/form-switch/index.mjs +16 -17
  85. package/form-table/index.mjs +16 -17
  86. package/form-table-plus/index.mjs +21 -22
  87. package/form-textarea/index.mjs +15 -16
  88. package/form-tree-select/index.mjs +14 -15
  89. package/form-tree-select-multiple/index.mjs +14 -15
  90. package/form-view/index.mjs +35 -39
  91. package/fy-array/index.mjs +33 -37
  92. package/fy-cascader/index.mjs +16 -17
  93. package/fy-checkbox/index.mjs +11 -13
  94. package/fy-code/index.mjs +10 -10
  95. package/fy-curd/index.mjs +1128 -1152
  96. package/fy-date/index.mjs +10 -11
  97. package/fy-draggable/index.mjs +9 -10
  98. package/fy-dynamic/index.mjs +22 -25
  99. package/fy-empty/index.mjs +1 -1
  100. package/fy-form/index.mjs +638 -15
  101. package/fy-form-design/index.mjs +1307 -1345
  102. package/fy-from/crud/zh.d.ts +6 -6
  103. package/fy-input/index.mjs +12 -14
  104. package/fy-input-color/index.mjs +13 -15
  105. package/fy-input-icon/index.mjs +20 -23
  106. package/fy-input-map/index.mjs +28 -31
  107. package/fy-input-number/index.mjs +9 -10
  108. package/fy-input-table/index.mjs +18 -22
  109. package/fy-input-tree/index.mjs +33 -37
  110. package/fy-progress/index.mjs +9 -10
  111. package/fy-radio/index.mjs +15 -16
  112. package/fy-rate/index.mjs +10 -11
  113. package/fy-select/index.mjs +25 -29
  114. package/fy-slider/index.mjs +11 -12
  115. package/fy-switch/index.mjs +9 -10
  116. package/fy-tabs/index.mjs +15 -17
  117. package/fy-time/index.mjs +1 -1
  118. package/fy-title/index.mjs +1 -1
  119. package/fy-tree/index.mjs +18 -24
  120. package/fy-u-editor/index.mjs +1 -1
  121. package/fy-upload/index.mjs +74 -76
  122. package/guide-steps/index.mjs +11 -13
  123. package/iframe-window/index.mjs +9 -10
  124. package/image-cropper/index.mjs +28 -30
  125. package/image-preview/index.mjs +12 -14
  126. package/index.mjs +72 -72
  127. package/input-number/index.mjs +13 -14
  128. package/input-number-range/index.mjs +11 -12
  129. package/license/index.mjs +1 -1
  130. package/login/index.mjs +21 -26
  131. package/nav-bar/index.mjs +9 -10
  132. package/notice/index.mjs +9 -10
  133. package/package.json +1 -1
  134. package/page-index/index.mjs +12 -13
  135. package/page-index-top/index.mjs +23 -28
  136. package/page-skeleton/index.mjs +14 -14
  137. package/page-skeleton-new/index.mjs +8 -9
  138. package/pageable-table/index.mjs +172 -182
  139. package/pageable-view/index.mjs +15 -16
  140. package/picker-table-view/index.mjs +49 -58
  141. package/present-view/index.mjs +35 -39
  142. package/record-video/index.mjs +1 -1
  143. package/resize-observer/index.mjs +1 -1
  144. package/search/index.mjs +20 -22
  145. package/search-popover/index.mjs +1 -1
  146. package/sign/index.mjs +1 -1
  147. package/skeleton-panel/index.mjs +9 -10
  148. package/split-pane/index.mjs +36 -37
  149. package/static-pageable-table/index.mjs +11 -13
  150. package/sub-table/index.mjs +36 -49
  151. package/sub-table-plus/index.mjs +229 -18
  152. package/swiper/index.mjs +11 -12
  153. package/table-column/index.mjs +223 -3
  154. package/table-view/index.mjs +52 -60
  155. package/tabs-view/index.mjs +17 -19
  156. package/tag-render/index.mjs +16 -18
  157. package/text-ellipsis/index.mjs +9 -10
  158. package/toolbar/index.mjs +13 -14
  159. package/toolbar-button/index.mjs +13 -14
  160. package/verify/index.mjs +1 -1
  161. package/vue-cron/index.mjs +259 -267
  162. package/watermark/index.mjs +1 -1
  163. package/web-types.json +1 -1
  164. package/x-input-tag/index.mjs +21 -24
  165. package/chunks/FormItem.Bhsy_O2B.mjs +0 -372
  166. package/chunks/FyForm.DriwCJ7b.mjs +0 -765
  167. package/chunks/SignalAndMessage.BpjOoKhK.mjs +0 -92
  168. package/chunks/SubTablePlus.BH0IIv3X.mjs +0 -270
  169. package/chunks/TableColumn.BzivvXMF.mjs +0 -337
@@ -0,0 +1,223 @@
1
+ import { fastClone as s } from "@web-utils/core";
2
+ import { n as m } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
3
+ const d = {
4
+ name: "ElementForm",
5
+ inject: {
6
+ prefix: "prefix",
7
+ width: "width"
8
+ },
9
+ props: {
10
+ id: String,
11
+ element: Object,
12
+ bpmnInstances: Object
13
+ },
14
+ data() {
15
+ return {
16
+ formKey: "",
17
+ businessKey: "",
18
+ optionModelTitle: "",
19
+ fieldList: [],
20
+ formFieldForm: {},
21
+ fieldType: {
22
+ long: "长整型",
23
+ string: "字符串",
24
+ boolean: "布尔类",
25
+ date: "日期类",
26
+ enum: "枚举类",
27
+ custom: "自定义类型"
28
+ },
29
+ formFieldIndex: -1,
30
+ // 编辑中的字段, -1 为新增
31
+ formFieldOptionIndex: -1,
32
+ // 编辑中的字段配置项, -1 为新增
33
+ fieldModelVisible: !1,
34
+ fieldOptionModelVisible: !1,
35
+ fieldOptionForm: {},
36
+ // 当前激活的字段配置项数据
37
+ fieldOptionType: "",
38
+ // 当前激活的字段配置项弹窗 类型
39
+ fieldEnumList: [],
40
+ // 枚举值列表
41
+ fieldConstraintsList: [],
42
+ // 约束条件列表
43
+ fieldPropertiesList: []
44
+ // 绑定属性列表
45
+ };
46
+ },
47
+ watch: {
48
+ id: {
49
+ immediate: !0,
50
+ async handler(n) {
51
+ n && (await this.$nextTick(), this.resetFormList());
52
+ }
53
+ }
54
+ },
55
+ methods: {
56
+ resetFormList() {
57
+ var n;
58
+ this.formKey = this.element.businessObject.formKey, this.elExtensionElements = this.element.businessObject.get("extensionElements") || this.bpmnInstances.moddle.create("bpmn:ExtensionElements", { values: [] }), this.formData = ((n = this.elExtensionElements.values.filter((e) => e.$type === `${this.prefix}:FormData`)) == null ? void 0 : n[0]) || this.bpmnInstances.moddle.create(`${this.prefix}:FormData`, { fields: [] }), this.businessKey = this.formData.businessKey, this.otherExtensions = this.elExtensionElements.values.filter((e) => e.$type !== `${this.prefix}:FormData`), this.fieldList = s(this.formData.fields || []), this.updateElementExtensions();
59
+ },
60
+ updateElementFormKey() {
61
+ this.bpmnInstances.modeling.updateProperties(this.element, { formKey: this.formKey });
62
+ },
63
+ updateElementBusinessKey() {
64
+ this.bpmnInstances.modeling.updateModdleProperties(this.element, this.formData, {
65
+ businessKey: this.businessKey
66
+ });
67
+ },
68
+ // 根据类型调整字段type
69
+ changeFieldTypeType(n) {
70
+ this.$set(this.formFieldForm, "type", n === "custom" ? "" : n);
71
+ },
72
+ // 打开字段详情侧边栏
73
+ openFieldForm(n, e) {
74
+ var t, i;
75
+ if (this.formFieldIndex = e, e !== -1) {
76
+ const l = this.formData.fields[e];
77
+ this.formFieldForm = s(n), this.$set(this.formFieldForm, "typeType", this.fieldType[n.type] ? n.type : "custom"), n.type === "enum" && (this.fieldEnumList = s((l == null ? void 0 : l.values) || [])), this.fieldConstraintsList = s(((t = l == null ? void 0 : l.validation) == null ? void 0 : t.constraints) || []), this.fieldPropertiesList = s(((i = l == null ? void 0 : l.properties) == null ? void 0 : i.values) || []);
78
+ } else
79
+ this.formFieldForm = {}, this.fieldEnumList = [], this.fieldConstraintsList = [], this.fieldPropertiesList = [];
80
+ this.fieldModelVisible = !0;
81
+ },
82
+ // 打开字段 某个 配置项 弹窗
83
+ openFieldOptionForm(n, e, t) {
84
+ return this.fieldOptionModelVisible = !0, this.fieldOptionType = t, this.formFieldOptionIndex = e, t === "property" ? (this.fieldOptionForm = n ? s(n) : {}, this.optionModelTitle = "属性配置") : t === "enum" ? (this.fieldOptionForm = n ? s(n) : {}, this.optionModelTitle = "枚举值配置") : (this.fieldOptionForm = n ? s(n) : {}, this.optionModelTitle = "约束条件配置");
85
+ },
86
+ // 保存字段 某个 配置项
87
+ saveFieldOption() {
88
+ this.formFieldOptionIndex === -1 ? (this.fieldOptionType === "property" && this.fieldPropertiesList.push(this.fieldOptionForm), this.fieldOptionType === "constraint" && this.fieldConstraintsList.push(this.fieldOptionForm), this.fieldOptionType === "enum" && this.fieldEnumList.push(this.fieldOptionForm)) : this.fieldOptionType === "property" ? this.fieldPropertiesList.splice(this.formFieldOptionIndex, 1, this.fieldOptionForm) : this.fieldOptionType === "constraint" ? this.fieldConstraintsList.splice(this.formFieldOptionIndex, 1, this.fieldOptionForm) : this.fieldOptionType === "enum" && this.fieldEnumList.splice(this.formFieldOptionIndex, 1, this.fieldOptionForm), this.fieldOptionModelVisible = !1, this.fieldOptionForm = {};
89
+ },
90
+ // 保存字段配置
91
+ saveField() {
92
+ const { id: n, type: e, label: t, defaultValue: i, datePattern: l } = this.formFieldForm, o = this.bpmnInstances.moddle.create(`${this.prefix}:FormField`, { id: n, type: e, label: t });
93
+ if (i && (o.defaultValue = i), l && (o.datePattern = l), this.fieldPropertiesList && this.fieldPropertiesList.length) {
94
+ const r = this.fieldPropertiesList.map((a) => this.bpmnInstances.moddle.create(`${this.prefix}:Property`, { id: a.id, value: a.value }));
95
+ o.properties = this.bpmnInstances.moddle.create(`${this.prefix}:Properties`, {
96
+ values: r
97
+ });
98
+ }
99
+ if (this.fieldConstraintsList && this.fieldConstraintsList.length) {
100
+ const r = this.fieldConstraintsList.map((a) => this.bpmnInstances.moddle.create(`${this.prefix}:Constraint`, { name: a.name, config: a.config }));
101
+ o.validation = this.bpmnInstances.moddle.create(`${this.prefix}:Validation`, {
102
+ constraints: r
103
+ });
104
+ }
105
+ this.fieldEnumList && this.fieldEnumList.length && (o.values = this.fieldEnumList.map((r) => this.bpmnInstances.moddle.create(`${this.prefix}:Value`, { name: r.name, id: r.id }))), this.formFieldIndex === -1 ? (this.fieldList.push(this.formFieldForm), this.formData.fields.push(o)) : (this.fieldList.splice(this.formFieldIndex, 1, this.formFieldForm), this.formData.fields.splice(this.formFieldIndex, 1, o)), this.updateElementExtensions(), this.fieldModelVisible = !1;
106
+ },
107
+ // 移除某个 字段的 配置项
108
+ removeFieldOptionItem(n, e, t) {
109
+ if (t === "property") {
110
+ this.fieldPropertiesList.splice(e, 1);
111
+ return;
112
+ }
113
+ if (t === "enum") {
114
+ this.fieldEnumList.splice(e, 1);
115
+ return;
116
+ }
117
+ this.fieldConstraintsList.splice(e, 1);
118
+ },
119
+ // 移除 字段
120
+ removeField(n, e) {
121
+ this.fieldList.splice(e, 1), this.formData.fields.splice(e, 1), this.updateElementExtensions();
122
+ },
123
+ updateElementExtensions() {
124
+ const n = this.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
125
+ values: this.otherExtensions.concat(this.formData)
126
+ });
127
+ this.bpmnInstances.modeling.updateProperties(this.element, {
128
+ extensionElements: n
129
+ });
130
+ }
131
+ }
132
+ };
133
+ var p = function() {
134
+ var e = this, t = e._self._c;
135
+ return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { size: "mini", "label-width": "80px" }, nativeOn: { submit: function(i) {
136
+ i.preventDefault();
137
+ } } }, [t("ElFormItem", { attrs: { label: "表单标识" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateElementFormKey }, model: { value: e.formKey, callback: function(i) {
138
+ e.formKey = i;
139
+ }, expression: "formKey" } })], 1), t("ElFormItem", { attrs: { label: "业务标识" } }, [t("ElSelect", { on: { change: e.updateElementBusinessKey }, model: { value: e.businessKey, callback: function(i) {
140
+ e.businessKey = i;
141
+ }, expression: "businessKey" } }, [e._l(e.fieldList, function(i) {
142
+ return t("ElOption", { key: i.id, attrs: { value: i.id, label: i.label } });
143
+ }), t("ElOption", { attrs: { label: "无", value: "" } })], 2)], 1)], 1), t("div", { staticClass: "element-property list-property" }, [t("ElDivider", [t("i", { staticClass: "el-icon-coin" }), e._v(" 表单字段")]), t("ElTable", { attrs: { data: e.fieldList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", type: "index", width: "50px" } }), t("ElTableColumn", { attrs: { label: "字段名称", prop: "label", "min-width": "80px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "字段类型", prop: "type", "min-width": "80px", formatter: (i) => e.fieldType[i.type] || i.type, "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "默认值", prop: "defaultValue", "min-width": "80px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: l }) {
144
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(o) {
145
+ return e.openFieldForm(i, l);
146
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(o) {
147
+ return e.removeField(i, l);
148
+ } } }, [e._v("移除")])];
149
+ } }]) })], 1)], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(i) {
150
+ return e.openFieldForm(null, -1);
151
+ } } }, [e._v("添加字段")])], 1), t("ElDrawer", { staticClass: "flow-drawer", attrs: { visible: e.fieldModelVisible, title: "字段配置", size: `${e.width}px`, "wrapper-closable": !1, "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(i) {
152
+ e.fieldModelVisible = i;
153
+ } } }, [t("ElForm", { attrs: { model: e.formFieldForm, "label-width": "90px", size: "mini" }, nativeOn: { submit: function(i) {
154
+ i.preventDefault();
155
+ } } }, [t("ElFormItem", { attrs: { label: "字段ID" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.id, callback: function(i) {
156
+ e.$set(e.formFieldForm, "id", i);
157
+ }, expression: "formFieldForm.id" } })], 1), t("ElFormItem", { attrs: { label: "类型" } }, [t("ElSelect", { attrs: { placeholder: "请选择字段类型", clearable: "" }, on: { change: e.changeFieldTypeType }, model: { value: e.formFieldForm.typeType, callback: function(i) {
158
+ e.$set(e.formFieldForm, "typeType", i);
159
+ }, expression: "formFieldForm.typeType" } }, e._l(e.fieldType, function(i, l) {
160
+ return t("ElOption", { key: l, attrs: { label: i, value: l } });
161
+ }), 1)], 1), e.formFieldForm.typeType === "custom" ? t("ElFormItem", { attrs: { label: "类型名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.type, callback: function(i) {
162
+ e.$set(e.formFieldForm, "type", i);
163
+ }, expression: "formFieldForm.type" } })], 1) : e._e(), t("ElFormItem", { attrs: { label: "名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.label, callback: function(i) {
164
+ e.$set(e.formFieldForm, "label", i);
165
+ }, expression: "formFieldForm.label" } })], 1), e.formFieldForm.typeType === "date" ? t("ElFormItem", { attrs: { label: "时间格式" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.datePattern, callback: function(i) {
166
+ e.$set(e.formFieldForm, "datePattern", i);
167
+ }, expression: "formFieldForm.datePattern" } })], 1) : e._e(), t("ElFormItem", { attrs: { label: "默认值" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.defaultValue, callback: function(i) {
168
+ e.$set(e.formFieldForm, "defaultValue", i);
169
+ }, expression: "formFieldForm.defaultValue" } })], 1)], 1), e.formFieldForm.type === "enum" ? [t("ElDivider", { key: "enum-divider" }), t("p", { key: "enum-title", staticClass: "listener-filed__title" }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("枚举值列表:")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(i) {
170
+ return e.openFieldOptionForm(null, -1, "enum");
171
+ } } }, [e._v("添加枚举值")])], 1), t("ElTable", { key: "enum-table", attrs: { data: e.fieldEnumList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "枚举值编号", prop: "id", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "枚举值名称", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: l }) {
172
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(o) {
173
+ return e.openFieldOptionForm(i, l, "enum");
174
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(o) {
175
+ return e.removeFieldOptionItem(i, l, "enum");
176
+ } } }, [e._v("移除")])];
177
+ } }], null, !1, 747635382) })], 1)] : e._e(), t("ElDivider", { key: "validation-divider" }), t("p", { key: "validation-title", staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("约束条件列表:")]), t("ElButton", { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(i) {
178
+ return e.openFieldOptionForm(null, -1, "constraint");
179
+ } } }, [e._v("添加约束")])], 1), t("ElTable", { key: "validation-table", attrs: { data: e.fieldConstraintsList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "约束名称", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "约束配置", prop: "config", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: l }) {
180
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(o) {
181
+ return e.openFieldOptionForm(i, l, "constraint");
182
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(o) {
183
+ return e.removeFieldOptionItem(i, l, "constraint");
184
+ } } }, [e._v("移除")])];
185
+ } }]) })], 1), t("ElDivider", { key: "property-divider" }), t("p", { key: "property-title", staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("字段属性列表:")]), t("ElButton", { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(i) {
186
+ return e.openFieldOptionForm(null, -1, "property");
187
+ } } }, [e._v("添加属性")])], 1), t("ElTable", { key: "property-table", attrs: { data: e.fieldPropertiesList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "属性编号", prop: "id", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "属性值", prop: "value", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: l }) {
188
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(o) {
189
+ return e.openFieldOptionForm(i, l, "property");
190
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(o) {
191
+ return e.removeFieldOptionItem(i, l, "property");
192
+ } } }, [e._v("移除")])];
193
+ } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini" }, on: { click: function(i) {
194
+ e.fieldModelVisible = !1;
195
+ } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveField } }, [e._v("保 存")])], 1)], 2), t("ElementDialog", { staticClass: "flow-dialog", attrs: { visible: e.fieldOptionModelVisible, title: e.optionModelTitle, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(i) {
196
+ e.fieldOptionModelVisible = i;
197
+ } }, scopedSlots: e._u([{ key: "footer", fn: function() {
198
+ return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(i) {
199
+ e.fieldOptionModelVisible = !1;
200
+ } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveFieldOption } }, [e._v("确 定")])];
201
+ }, proxy: !0 }]) }, [t("ElForm", { attrs: { model: e.fieldOptionForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(i) {
202
+ i.preventDefault();
203
+ } } }, [e.fieldOptionType !== "constraint" ? t("ElFormItem", { key: "option-id", attrs: { label: "编号/ID" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.id, callback: function(i) {
204
+ e.$set(e.fieldOptionForm, "id", i);
205
+ }, expression: "fieldOptionForm.id" } })], 1) : e._e(), e.fieldOptionType !== "property" ? t("ElFormItem", { key: "option-name", attrs: { label: "名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.name, callback: function(i) {
206
+ e.$set(e.fieldOptionForm, "name", i);
207
+ }, expression: "fieldOptionForm.name" } })], 1) : e._e(), e.fieldOptionType === "constraint" ? t("ElFormItem", { key: "option-config", attrs: { label: "配置" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.config, callback: function(i) {
208
+ e.$set(e.fieldOptionForm, "config", i);
209
+ }, expression: "fieldOptionForm.config" } })], 1) : e._e(), e.fieldOptionType === "property" ? t("ElFormItem", { key: "option-value", attrs: { label: "值" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.value, callback: function(i) {
210
+ e.$set(e.fieldOptionForm, "value", i);
211
+ }, expression: "fieldOptionForm.value" } })], 1) : e._e()], 1)], 1)], 1);
212
+ }, f = [], u = /* @__PURE__ */ m(
213
+ d,
214
+ p,
215
+ f,
216
+ !1,
217
+ null,
218
+ null
219
+ );
220
+ const F = u.exports;
221
+ export {
222
+ F as default
223
+ };
@@ -0,0 +1,215 @@
1
+ import { c as m, u as c } from "./utils.DRcxC1Fb.mjs";
2
+ import { i as p, a as d, f as u, l as f } from "./utilSelf.Csq1766E.mjs";
3
+ import { fastClone as F, capitalize as b } from "@web-utils/core";
4
+ import { n as h } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
+ const v = (s) => ({
6
+ $type: "flowable:ExecutionListener",
7
+ event: s === "draft" ? "start" : s,
8
+ delegateExpression: "${httpInvokeExecutionListener}",
9
+ fields: [],
10
+ listenerType: "delegateExpressionListener"
11
+ }), y = (s, e) => [
12
+ { $type: "flowable:Field", name: "serviceId", string: e.serviceId, fieldType: "string" },
13
+ {
14
+ $type: "flowable:Field",
15
+ name: "url",
16
+ string: `${e != null && e.url ? `/${e.url}` : ""}/flow${b(s)}`,
17
+ fieldType: "string"
18
+ }
19
+ ], g = {
20
+ name: "ElementListeners",
21
+ inject: {
22
+ prefix: "prefix",
23
+ width: "width",
24
+ context: "context"
25
+ },
26
+ props: {
27
+ id: String,
28
+ element: Object,
29
+ bpmnInstances: Object
30
+ },
31
+ data() {
32
+ return {
33
+ elementListenersList: [],
34
+ // 监听器列表
35
+ listenerForm: {},
36
+ // 监听器详情表单
37
+ listenerFormModelVisible: !1,
38
+ // 监听器 编辑 侧边栏显示状态
39
+ fieldsListOfListener: [],
40
+ listenerFieldForm: {},
41
+ // 监听器 注入字段 详情表单
42
+ listenerFieldFormModelVisible: !1,
43
+ // 监听器 注入字段表单弹窗 显示状态
44
+ editingListenerIndex: -1,
45
+ // 监听器所在下标,-1 为新增
46
+ editingListenerFieldIndex: -1,
47
+ // 字段所在下标,-1 为新增
48
+ listenerTypeObject: f,
49
+ fieldTypeObject: u
50
+ };
51
+ },
52
+ computed: {
53
+ apis() {
54
+ var e;
55
+ return (((e = this.context) == null ? void 0 : e.apis) || ["flowDraft", "flowStart", "flowEnd"]).map((t) => {
56
+ var r;
57
+ return `${(r = this.context) != null && r.url ? `/${this.context.url}/` : ""}${t}`;
58
+ }) || [];
59
+ }
60
+ },
61
+ watch: {
62
+ id: {
63
+ immediate: !0,
64
+ async handler(s) {
65
+ s && (await this.$nextTick(), this.resetListenersList());
66
+ }
67
+ }
68
+ },
69
+ methods: {
70
+ resetListenersList() {
71
+ var s, e, t;
72
+ this.otherExtensionList = [], this.bpmnElementListeners = ((t = (e = (s = this.element.businessObject) == null ? void 0 : s.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter((r) => r.$type === `${this.prefix}:ExecutionListener`)) ?? [], this.elementListenersList = this.bpmnElementListeners.map((r) => d(r));
73
+ },
74
+ changeFiledType(s) {
75
+ s === "string" ? (delete this.listenerFieldForm.expression, this.$set(this.listenerFieldForm, "string", "")) : (delete this.listenerFieldForm.string, this.$set(this.listenerFieldForm, "expression", ""));
76
+ },
77
+ assignListener(s) {
78
+ const e = v(s, this.context);
79
+ e.fields = y(s, this.context), this.listenerForm = e, this.fieldsListOfListener = e.fields;
80
+ },
81
+ setDefaultFieldValue(s) {
82
+ s !== "url" ? this.$set(this.listenerFieldForm, "string", this.context[s] || "") : this.$set(this.listenerFieldForm, "string", "");
83
+ },
84
+ // 打开 监听器详情 侧边栏
85
+ async openListenerForm(s, e) {
86
+ var t;
87
+ s ? (this.listenerForm = p(s), this.fieldsListOfListener = s.fields ? s.fields.map((r) => ({ ...r })) : [], this.editingListenerIndex = e) : (this.listenerForm = { fields: [] }, this.fieldsListOfListener = [], this.editingListenerIndex = -1), this.listenerFormModelVisible = !0, await this.$nextTick(), (t = this.$refs.listenerFormRef) == null || t.clearValidate();
88
+ },
89
+ // 打开监听器字段编辑弹窗
90
+ openListenerFieldForm(s, e) {
91
+ this.listenerFieldForm = s ? F(s) : { fieldType: "string" }, this.editingListenerFieldIndex = s ? e : -1, this.listenerFieldFormModelVisible = !0, this.$nextTick(() => {
92
+ this.$refs.listenerFieldFormRef && this.$refs.listenerFieldFormRef.clearValidate();
93
+ });
94
+ },
95
+ // 保存监听器注入字段
96
+ async saveListenerFiled() {
97
+ await this.$refs.listenerFieldFormRef.validate() && (this.editingListenerFieldIndex === -1 ? (this.fieldsListOfListener.push(this.listenerFieldForm), this.listenerForm.fields.push(this.listenerFieldForm)) : (this.fieldsListOfListener.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm), this.listenerForm.fields.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm)), this.listenerFieldFormModelVisible = !1, await this.$nextTick(), this.listenerFieldForm = {});
98
+ },
99
+ // 移除监听器字段
100
+ async removeListenerField(s, e) {
101
+ try {
102
+ await this.$confirm("确认移除该字段吗?", "提示"), this.fieldsListOfListener.splice(e, 1), this.listenerForm.fields.splice(e, 1);
103
+ } catch {
104
+ }
105
+ },
106
+ // 移除监听器
107
+ async removeListener(s, e) {
108
+ try {
109
+ await this.$confirm("确认移除该监听器吗?", "提示"), this.bpmnElementListeners.splice(e, 1), this.elementListenersList.splice(e, 1), c(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners));
110
+ } catch {
111
+ }
112
+ },
113
+ // 保存监听器配置
114
+ async saveListenerConfig() {
115
+ var t, r, l;
116
+ if (!await this.$refs.listenerFormRef.validate()) return;
117
+ const e = m(this.bpmnInstances, this.listenerForm, !1, this.prefix);
118
+ this.editingListenerIndex === -1 ? (this.bpmnElementListeners.push(e), this.elementListenersList.push(this.listenerForm)) : (this.bpmnElementListeners.splice(this.editingListenerIndex, 1, e), this.elementListenersList.splice(this.editingListenerIndex, 1, this.listenerForm)), this.otherExtensionList = ((l = (r = (t = this.element.businessObject) == null ? void 0 : t.extensionElements) == null ? void 0 : r.values) == null ? void 0 : l.filter((a) => a.$type !== `${this.prefix}:ExecutionListener`)) ?? [], c(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners)), this.listenerFormModelVisible = !1, this.listenerForm = {};
119
+ }
120
+ }
121
+ };
122
+ var E = function() {
123
+ var r, l, a;
124
+ var e = this, t = e._self._c;
125
+ return t("div", { staticClass: "panel-tab__content element-listeners" }, [t("ElTable", { attrs: { data: e.elementListenersList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "事件类型", "min-width": "100px", prop: "event" } }), t("ElTableColumn", { attrs: { label: "监听器类型", "min-width": "100px", "show-overflow-tooltip": "", formatter: (i) => e.listenerTypeObject[i.listenerType] } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: n }) {
126
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(o) {
127
+ return e.openListenerForm(i, n);
128
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(o) {
129
+ return e.removeListener(i, n);
130
+ } } }, [e._v("移除")])];
131
+ } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(i) {
132
+ return e.openListenerForm(null);
133
+ } } }, [e._v("添加监听器")])], 1), t("ElDrawer", { staticClass: "flow-drawer element-listeners-drawer", attrs: { visible: e.listenerFormModelVisible, title: "执行监听器", size: `${e.width}px`, "wrapper-closable": !1, "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(i) {
134
+ e.listenerFormModelVisible = i;
135
+ } } }, [t("ElDivider"), t("p", { staticClass: "listener-filed__title" }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("监听器类型:")]), t("ElButton", { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(i) {
136
+ return e.assignListener("start");
137
+ } } }, [e._v("开始")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(i) {
138
+ return e.assignListener("end");
139
+ } } }, [e._v("结束")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(i) {
140
+ return e.assignListener("draft");
141
+ } } }, [e._v("草稿")])], 1), t("ElForm", { ref: "listenerFormRef", attrs: { size: "mini", model: e.listenerForm, "label-width": "96px" }, nativeOn: { submit: function(i) {
142
+ i.preventDefault();
143
+ } } }, [t("ElFormItem", { attrs: { label: "事件类型", prop: "event", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerForm.event, callback: function(i) {
144
+ e.$set(e.listenerForm, "event", i);
145
+ }, expression: "listenerForm.event" } }, [t("ElOption", { attrs: { label: "开始", value: "start" } }), t("ElOption", { attrs: { label: "结束", value: "end" } })], 1)], 1), t("ElFormItem", { attrs: { label: "监听器类型", prop: "listenerType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerForm.listenerType, callback: function(i) {
146
+ e.$set(e.listenerForm, "listenerType", i);
147
+ }, expression: "listenerForm.listenerType" } }, e._l(Object.keys(e.listenerTypeObject), function(i) {
148
+ return t("ElOption", { key: i, attrs: { label: e.listenerTypeObject[i], value: i } });
149
+ }), 1)], 1), e.listenerForm.listenerType === "classListener" ? t("ElFormItem", { key: "listener-class", attrs: { label: "Java类", prop: "class", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.class, callback: function(i) {
150
+ e.$set(e.listenerForm, "class", i);
151
+ }, expression: "listenerForm.class" } })], 1) : e._e(), e.listenerForm.listenerType === "expressionListener" ? t("ElFormItem", { key: "listener-expression", attrs: { label: "表达式", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.expression, callback: function(i) {
152
+ e.$set(e.listenerForm, "expression", i);
153
+ }, expression: "listenerForm.expression" } })], 1) : e._e(), e.listenerForm.listenerType === "delegateExpressionListener" ? t("ElFormItem", { key: "listener-delegate", attrs: { label: "代理表达式", prop: "delegateExpression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, model: { value: e.listenerForm.delegateExpression, callback: function(i) {
154
+ e.$set(e.listenerForm, "delegateExpression", i);
155
+ }, expression: "listenerForm.delegateExpression" } }, e._l(((r = e.context) == null ? void 0 : r.delegateExpressions) || [], function(i) {
156
+ return t("ElOption", { key: i, attrs: { value: i, label: i } });
157
+ }), 1)], 1) : e._e(), e.listenerForm.listenerType === "scriptListener" ? [t("ElFormItem", { key: "listener-script-format", attrs: { label: "脚本格式", prop: "scriptFormat", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本格式" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.scriptFormat, callback: function(i) {
158
+ e.$set(e.listenerForm, "scriptFormat", i);
159
+ }, expression: "listenerForm.scriptFormat" } })], 1), t("ElFormItem", { key: "listener-script-type", attrs: { label: "脚本类型", prop: "scriptType", rules: { required: !0, trigger: ["blur", "change"], message: "请选择脚本类型" } } }, [t("ElSelect", { model: { value: e.listenerForm.scriptType, callback: function(i) {
160
+ e.$set(e.listenerForm, "scriptType", i);
161
+ }, expression: "listenerForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inlineScript" } }), t("ElOption", { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.listenerForm.scriptType === "inlineScript" ? t("ElFormItem", { key: "listener-script", attrs: { label: "脚本内容", prop: "value", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本内容" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.value, callback: function(i) {
162
+ e.$set(e.listenerForm, "value", i);
163
+ }, expression: "listenerForm.value" } })], 1) : e._e(), e.listenerForm.scriptType === "externalScript" ? t("ElFormItem", { key: "listener-resource", attrs: { label: "资源地址", prop: "resource", rules: { required: !0, trigger: ["blur", "change"], message: "请填写资源地址" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.resource, callback: function(i) {
164
+ e.$set(e.listenerForm, "resource", i);
165
+ }, expression: "listenerForm.resource" } })], 1) : e._e()] : e._e()], 2), t("ElDivider"), t("p", { staticClass: "listener-filed__title" }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("注入字段:")]), t("ElButton", { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(i) {
166
+ return e.openListenerFieldForm(null);
167
+ } } }, [e._v(" 添加字段 ")])], 1), t("ElTable", { staticStyle: { flex: "none" }, attrs: { data: e.fieldsListOfListener, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "字段名称", "min-width": "100px", prop: "name" } }), t("ElTableColumn", { attrs: { label: "字段类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (i) => e.fieldTypeObject[i.fieldType] } }), t("ElTableColumn", { attrs: { label: "字段值/表达式", "min-width": "100px", "show-overflow-tooltip": "", formatter: (i) => i.string || i.expression } }), t("ElTableColumn", { attrs: { label: "操作", width: "100px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: n }) {
168
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(o) {
169
+ return e.openListenerFieldForm(i, n);
170
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(o) {
171
+ return e.removeListenerField(i, n);
172
+ } } }, [e._v(" 移除 ")])];
173
+ } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini" }, on: { click: function(i) {
174
+ e.listenerFormModelVisible = !1;
175
+ } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerConfig } }, [e._v("保 存")])], 1)], 1), t("ElementDialog", { staticClass: "flow-dialog", attrs: { title: "字段配置", visible: e.listenerFieldFormModelVisible, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(i) {
176
+ e.listenerFieldFormModelVisible = i;
177
+ } }, scopedSlots: e._u([{ key: "footer", fn: function() {
178
+ return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(i) {
179
+ e.listenerFieldFormModelVisible = !1;
180
+ } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerFiled } }, [e._v("确 定")])];
181
+ }, proxy: !0 }]) }, [t("ElForm", { ref: "listenerFieldFormRef", staticStyle: { height: "136px" }, attrs: { model: e.listenerFieldForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(i) {
182
+ i.preventDefault();
183
+ } } }, [t("ElFormItem", { attrs: { label: "字段名称:", prop: "name", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, on: { input: e.setDefaultFieldValue }, model: { value: e.listenerFieldForm.name, callback: function(i) {
184
+ e.$set(e.listenerFieldForm, "name", i);
185
+ }, expression: "listenerFieldForm.name" } }, e._l(((l = e.context) == null ? void 0 : l.fields) || [], function(i) {
186
+ return t("ElOption", { key: i, attrs: { value: i, label: i } });
187
+ }), 1)], 1), t("ElFormItem", { attrs: { label: "字段类型:", prop: "fieldType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { on: { input: e.changeFiledType }, model: { value: e.listenerFieldForm.fieldType, callback: function(i) {
188
+ e.$set(e.listenerFieldForm, "fieldType", i);
189
+ }, expression: "listenerFieldForm.fieldType" } }, e._l(Object.keys(e.fieldTypeObject), function(i) {
190
+ return t("ElOption", { key: i, attrs: { label: e.fieldTypeObject[i], value: i } });
191
+ }), 1)], 1), e.listenerFieldForm.fieldType === "string" ? t("ElFormItem", { key: "field-string", staticClass: "element-listeners-field-name", attrs: { label: "字段值:", prop: "string", rules: { required: !0, trigger: ["blur", "change"] } } }, [e.listenerFieldForm.name === "url" ? t("ElSelect", { attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(i) {
192
+ e.$set(e.listenerFieldForm, "string", i);
193
+ }, expression: "listenerFieldForm.string" } }, e._l(e.apis, function(i) {
194
+ return t("ElOption", { key: i, attrs: { value: i, label: i } });
195
+ }), 1) : e.listenerFieldForm.name === "serviceId" ? t("ElSelect", { attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(i) {
196
+ e.$set(e.listenerFieldForm, "string", i);
197
+ }, expression: "listenerFieldForm.string" } }, e._l(((a = e.context) == null ? void 0 : a.services) || [], function(i) {
198
+ return t("ElOption", { key: i, attrs: { value: i, label: i } });
199
+ }), 1) : t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(i) {
200
+ e.$set(e.listenerFieldForm, "string", i);
201
+ }, expression: "listenerFieldForm.string" } })], 1) : e._e(), e.listenerFieldForm.fieldType === "expression" ? t("ElFormItem", { key: "field-expression", attrs: { label: "表达式:", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.expression, callback: function(i) {
202
+ e.$set(e.listenerFieldForm, "expression", i);
203
+ }, expression: "listenerFieldForm.expression" } })], 1) : e._e()], 1)], 1)], 1);
204
+ }, x = [], L = /* @__PURE__ */ h(
205
+ g,
206
+ E,
207
+ x,
208
+ !1,
209
+ null,
210
+ null
211
+ );
212
+ const w = L.exports;
213
+ export {
214
+ w as default
215
+ };