@fecp/designer 5.4.9 → 5.4.11

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 (40) hide show
  1. package/es/designer/package.json.mjs +1 -1
  2. package/es/designer/src/api/index.mjs +30 -7
  3. package/es/designer/src/assets/document.png.mjs +4 -0
  4. package/es/designer/src/components/DocumentParam.vue.mjs +158 -0
  5. package/es/designer/src/components/FileTypeSelect.vue.mjs +139 -0
  6. package/es/designer/src/packages/advancedFilter/dialog.vue.mjs +2 -1
  7. package/es/designer/src/packages/eventFlow/dialog/action/Upload.vue2.mjs +19 -120
  8. package/es/designer/src/packages/form/aside/index.mjs +17 -1
  9. package/es/designer/src/packages/form/components/Document.vue.mjs +52 -0
  10. package/es/designer/src/packages/form/index.vue.mjs +25 -5
  11. package/es/designer/src/packages/form/property/document.vue.mjs +201 -0
  12. package/es/designer/src/packages/form/property/index.vue.mjs +5 -2
  13. package/es/designer.css +177 -72
  14. package/es/packages/vue/src/components/all.mjs +2 -0
  15. package/es/packages/vue/src/components/bus/document/Document.vue.mjs +133 -0
  16. package/es/packages/vue/src/components/bus/document/index.mjs +7 -0
  17. package/es/packages/vue/src/components/bus/index.mjs +3 -1
  18. package/es/packages/vue/src/components/forms/form/Form.vue.mjs +3 -1
  19. package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +10 -3
  20. package/lib/designer/package.json.js +1 -1
  21. package/lib/designer/src/api/index.js +29 -6
  22. package/lib/designer/src/assets/document.png.js +4 -0
  23. package/lib/designer/src/components/DocumentParam.vue.js +158 -0
  24. package/lib/designer/src/components/FileTypeSelect.vue.js +139 -0
  25. package/lib/designer/src/packages/advancedFilter/dialog.vue.js +2 -1
  26. package/lib/designer/src/packages/eventFlow/dialog/action/Upload.vue2.js +22 -123
  27. package/lib/designer/src/packages/form/aside/index.js +17 -1
  28. package/lib/designer/src/packages/form/components/Document.vue.js +52 -0
  29. package/lib/designer/src/packages/form/index.vue.js +25 -5
  30. package/lib/designer/src/packages/form/property/document.vue.js +201 -0
  31. package/lib/designer/src/packages/form/property/index.vue.js +5 -2
  32. package/lib/designer.css +177 -72
  33. package/lib/packages/vue/index.js +5 -5
  34. package/lib/packages/vue/src/components/all.js +8 -6
  35. package/lib/packages/vue/src/components/bus/document/Document.vue.js +133 -0
  36. package/lib/packages/vue/src/components/bus/document/index.js +7 -0
  37. package/lib/packages/vue/src/components/bus/index.js +2 -0
  38. package/lib/packages/vue/src/components/forms/form/Form.vue.js +3 -1
  39. package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +14 -7
  40. package/package.json +1 -1
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const vue = require("vue");
4
+ const index$1 = require("../../forms/subTitle/index.js");
5
+ const index = require("../../forms/h2/index.js");
6
+ const getInstance = require("../../../utils/getInstance.js");
7
+ const _hoisted_1 = {
8
+ key: 0,
9
+ style: { "height": "60px", "position": "relative" }
10
+ };
11
+ const _hoisted_2 = { class: "document-content" };
12
+ const path = "/tech/file/components/DocElement";
13
+ const _sfc_main = /* @__PURE__ */ Object.assign({
14
+ inheritAttrs: false
15
+ }, {
16
+ __name: "Document",
17
+ props: {
18
+ config: {
19
+ type: Object,
20
+ required: true
21
+ },
22
+ localConfig: {
23
+ type: Object,
24
+ required: true
25
+ },
26
+ formMode: {
27
+ type: String,
28
+ default: ""
29
+ }
30
+ },
31
+ setup(__props) {
32
+ const props = __props;
33
+ const ctx = getInstance.getCurrentVueInstance();
34
+ vue.ref("");
35
+ const formData = vue.inject("formData");
36
+ vue.inject("rowHeight");
37
+ vue.inject("gridLayout");
38
+ vue.inject("gridLayoutFieldsData");
39
+ vue.inject("setFormItemHeight");
40
+ const fieldsData = props.localConfig.fieldsData.map((item) => {
41
+ return item.component;
42
+ });
43
+ const hiddenFields = props.localConfig.hiddenFields;
44
+ const accept = vue.computed(() => {
45
+ const acceptArr = [];
46
+ const acceptType = props.config.acceptType;
47
+ if (acceptType.includes("image")) {
48
+ acceptArr.push("image/*");
49
+ }
50
+ if (acceptType.includes("video")) {
51
+ acceptArr.push("video/*");
52
+ }
53
+ if (acceptType.includes("audio")) {
54
+ acceptArr.push("audio/*");
55
+ }
56
+ if (acceptType.includes("text")) {
57
+ acceptArr.push("text/plain");
58
+ }
59
+ if (acceptType.includes("doc")) {
60
+ acceptArr.push(".doc");
61
+ acceptArr.push(".docx");
62
+ }
63
+ if (acceptType.includes("xls")) {
64
+ acceptArr.push(".xls");
65
+ acceptArr.push(".xlsx");
66
+ }
67
+ if (acceptType.includes("ppt")) {
68
+ acceptArr.push(".ppt");
69
+ acceptArr.push(".pptx");
70
+ }
71
+ if (acceptType.includes("pdf")) {
72
+ acceptArr.push("application/pdf");
73
+ }
74
+ if (acceptType.includes("zip")) {
75
+ acceptArr.push("application/zip");
76
+ acceptArr.push("application/x-rar-compressed");
77
+ }
78
+ let accept2 = "";
79
+ if (acceptArr.length < 13) {
80
+ accept2 = acceptArr.join(",");
81
+ }
82
+ return accept2;
83
+ });
84
+ const paramList = vue.computed(() => {
85
+ props.config.essentialParams.map((item) => {
86
+ const modeNo = item.scenario;
87
+ const businessObj = item.businessKey;
88
+ const fieldId = businessObj.value;
89
+ const field = [...fieldsData, ...hiddenFields].find(
90
+ (fieldItem) => fieldItem.id == fieldId
91
+ );
92
+ let busNo = "";
93
+ if (field) {
94
+ busNo = formData.value[field.fieldName];
95
+ }
96
+ return {
97
+ modeNo,
98
+ busNo
99
+ };
100
+ });
101
+ });
102
+ const currentComponent = vue.computed(() => {
103
+ var _a;
104
+ const route = ctx.$router.getRoutes().find((item) => item.path == path);
105
+ console.log("🚀 ~ ctx.$router.getRoutes():", ctx.$router.getRoutes());
106
+ return (_a = route == null ? void 0 : route.components) == null ? void 0 : _a.default;
107
+ });
108
+ return (_ctx, _cache) => {
109
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
110
+ __props.config.titleMode != "none" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
111
+ __props.config.titleMode == "label" ? (vue.openBlock(), vue.createBlock(vue.unref(index.H2), {
112
+ key: 0,
113
+ config: __props.config
114
+ }, null, 8, ["config"])) : __props.config.titleMode == "subLabel" ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.SubTitle), {
115
+ key: 1,
116
+ config: __props.config
117
+ }, null, 8, ["config"])) : vue.createCommentVNode("", true)
118
+ ])) : vue.createCommentVNode("", true),
119
+ vue.createElementVNode("div", _hoisted_2, [
120
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(currentComponent)), {
121
+ isEdit: __props.formMode != "query",
122
+ isSupplement: __props.config.isSupplement,
123
+ multiple: __props.config.multiple,
124
+ download: __props.config.download,
125
+ accept: vue.unref(accept),
126
+ paramList: vue.unref(paramList)
127
+ }, null, 8, ["isEdit", "isSupplement", "multiple", "download", "accept", "paramList"]))
128
+ ])
129
+ ], 64);
130
+ };
131
+ }
132
+ });
133
+ exports.default = _sfc_main;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const Document$1 = require("./Document.vue.js");
4
+ const install = require("../../../utils/install.js");
5
+ const Document = install.default.withInstall("Document", Document$1.default);
6
+ exports.Document = Document;
7
+ exports.default = Document;
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const index = require("./approvalHistory/index.js");
4
+ const index$1 = require("./document/index.js");
4
5
  exports.ApprovalHistory = index.ApprovalHistory;
6
+ exports.Document = index$1.Document;
@@ -231,6 +231,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
231
231
  }
232
232
  });
233
233
  }
234
+ debugger;
234
235
  formData.value = { ...defaultData, ...setFormData(props.modelValue, true) };
235
236
  formRules.value = rules;
236
237
  };
@@ -924,6 +925,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
924
925
  if (!linkaged) {
925
926
  return;
926
927
  }
928
+ debugger;
927
929
  const changedFields = findChangedFields(newVal, prevFormData.value);
928
930
  if (changedFields.length > 0) {
929
931
  applyLinkageEffectsForChangedFields(changedFields);
@@ -1054,5 +1056,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1054
1056
  };
1055
1057
  }
1056
1058
  });
1057
- const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-8baf793f"]]);
1059
+ const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-75d6c58f"]]);
1058
1060
  exports.default = _Form;
@@ -12,12 +12,13 @@ const index$2 = require("../h2/index.js");
12
12
  const index$4 = require("../subForm/index.js");
13
13
  const index$5 = require("../subTable/index.js");
14
14
  const index$6 = require("../../bus/approvalHistory/index.js");
15
+ const index$7 = require("../../bus/document/index.js");
15
16
  const index$1 = require("../index.js");
16
17
  const index = require("../../bus/index.js");
17
18
  ;/* empty css */
18
19
  const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
19
- const index$7 = require("../../../../../../node_modules/element-plus/es/components/form/index.js");
20
- const index$8 = require("../../../../../../node_modules/element-plus/es/components/tooltip/index.js");
20
+ const index$8 = require("../../../../../../node_modules/element-plus/es/components/form/index.js");
21
+ const index$9 = require("../../../../../../node_modules/element-plus/es/components/tooltip/index.js");
21
22
  const _hoisted_1 = {
22
23
  key: 0,
23
24
  class: "iconfont icon-iconZheng credit-icon"
@@ -109,8 +110,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
109
110
  getInnerComponentRef
110
111
  });
111
112
  return (_ctx, _cache) => {
112
- const _component_el_tooltip = index$8.ElTooltip;
113
- const _component_el_form_item = index$7.ElFormItem;
113
+ const _component_el_tooltip = index$9.ElTooltip;
114
+ const _component_el_form_item = index$8.ElFormItem;
114
115
  return __props.config.fieldType == "h2" ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.H2), {
115
116
  key: 0,
116
117
  config: __props.config
@@ -137,11 +138,17 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
137
138
  ref: innerComponentRef,
138
139
  config: __props.config,
139
140
  localConfig: __props.localConfig
140
- }, null, 8, ["config", "localConfig"])) : __props.config.fieldType == "blank" || __props.config.fieldType == "divider" ? (vue.openBlock(), vue.createElementBlock("div", {
141
+ }, null, 8, ["config", "localConfig"])) : __props.config.fieldType == "document" ? (vue.openBlock(), vue.createBlock(vue.unref(index$7.Document), {
141
142
  key: 5,
143
+ ref_key: "innerComponentRef",
144
+ ref: innerComponentRef,
145
+ config: __props.config,
146
+ localConfig: __props.localConfig
147
+ }, null, 8, ["config", "localConfig"])) : __props.config.fieldType == "blank" || __props.config.fieldType == "divider" ? (vue.openBlock(), vue.createElementBlock("div", {
148
+ key: 6,
142
149
  class: vue.normalizeClass(__props.config.fieldType)
143
150
  }, null, 2)) : (vue.openBlock(), vue.createBlock(_component_el_form_item, {
144
- key: 6,
151
+ key: 7,
145
152
  prop: __props.config.fieldName,
146
153
  required: __props.config.required,
147
154
  error: __props.error,
@@ -190,5 +197,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
190
197
  };
191
198
  }
192
199
  });
193
- const _FormItem = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-df2a70b8"]]);
200
+ const _FormItem = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-f9232dbc"]]);
194
201
  exports.default = _FormItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fecp/designer",
3
- "version": "5.4.9",
3
+ "version": "5.4.11",
4
4
  "main": "lib/designer/index.js",
5
5
  "module": "es/designer/index.mjs",
6
6
  "files": [